//
Search
🔨

[1_4] MMOCR 에서 제공되는 임의의 detection 모델을 1% (또는 10%, 100%) 물류데이터로 학습한다.

상태
In progress
담당
마감일
2022/11/28
요약
해당 데이터로 모델 학습, 평가, I/O확인이 가능하면 끝. 더불어, from the scratch / pretrained / transfered 모델 각각을 평가해서 비교한다.
선행 태스크
선행 태스크 상태
후행 태스크
관련 마일스톤
2 more properties
Aihub 물류 test score
from the scratch (Aihub 물류 train)
pretrained (no transfer learned)
transfer learned (Aihub 물류 train)
1% bbox hmean
할필요없음
할필요없음
할필요없음
10% bbox hmean
할필요없음
할필요없음
할필요없음
100% bbox hmean
0.9747
할필요없음
할필요없음
pretrained (no transfer learned) IMG_OCR_6_T_ET-F001_0006.png
pretrained (no transfer learned) IMG_OCR_6_T_NV-F001_0011.png
pretrained (no transfer learned) IMG_OCR_6_T_BL-F001_0020.png
문제점: 학습 속도가 너무 느리다.
문제의 원인 추론
이미지의 사이즈가 너무 크다. → 아니다. 동일하다.
물류
IMG_OCR_6_T_BL-F001_0020.png
2480 x 3508
물류
IMG_OCR_6_T_ET-F001_0006.png
2480 x 3508
금융
IMG_OCR_6_F_02508.png
2481 x 3508
금융
IMG_OCR_6_F_07747.png
2480 x 3508
선택한 알고리즘이 느리다. → 아니다. finance 데이터셋으로 했을 때는 느리지 않았다.
배치 크기가 너무 작다. → 아니다. 똑같다.
물류 도메인의 데이터가 훨씬 dense 하다.
그럼 여기서 전처리를 하는 시간이 비싼가? 아니면 모델 후처리 시간이 비싼가?
1.
전처리하는 시간이 비쌌던 것 같다 (왜냐하면 CPU 할당량을 늘리고 전처리 파이프라인을 단순화하니 빨라졌다)
100% from the scratch
nohup tools/dist_train.sh \ configs/textdet/dbnet/dbnet_resnet18_fpnc_2e_aihubtransit100of100.py \ 2 > nohup.out &
Bash
복사
train
cp work_dirs/dbnet_resnet18_fpnc_2e_aihubtransit100of100/epoch_2.pth \ pretrained/dbnet_resnet18_fpnc_2e_aihubtransit100of100_hopeful-leaf-117.pth nohup tools/dist_test.sh \ configs/textdet/dbnet/dbnet_resnet18_fpnc_2e_aihubtransit100of100.py \ pretrained/dbnet_resnet18_fpnc_2e_aihubtransit100of100_hopeful-leaf-117.pth \ 2 > nohup.out &
Bash
복사
eval
11/29 16:15:43 - mmengine - INFO - Epoch(test) [5700/5700] AihubTransit100of100/icdar/precision: 0.9902 AihubTransit100of100/icdar/recall: 0.9598 AihubTransit100of100/icdar/hmean: 0.9747 AihubTransit100of100RandomSampled/icdar/precision: 0.9912 AihubTransit100of100RandomSampled/icdar/recall: 0.9496 AihubTransit100of100RandomSampled/icdar/hmean: 0.9699 IC15/icdar/precision: 0.0000 IC15/icdar/recall: 0.0000 IC15/icdar/hmean: 0.0000
Bash
복사
eval ret
python3 -m mmocr.ocr \ --det-config configs/textdet/dbnet/dbnet_resnet18_fpnc_2e_aihubtransit100of100.py \ --det-ckpt pretrained/dbnet_resnet18_fpnc_2e_aihubtransit100of100_hopeful-leaf-117.pth \ data/det/aihub_transit/part_1of100/train/IMG_OCR_6_T_BL-F001_0020.png \ --img-out-dir work_dirs/dbnet_resnet18_fpnc_2e_aihubtransit100of100 \ --pred-out-file work_dirs/dbnet_resnet18_fpnc_2e_aihubtransit100of100/output.pkl \ --device cpu
Bash
복사
io
//"data/det/aihub_transit/part_1of100/train/IMG_OCR_6_T_BL-F001_0020.png", //"data/det/aihub_transit/part_1of100/train/IMG_OCR_6_T_ET-F001_0006.png", //"data/det/aihub_transit/part_1of100/train/IMG_OCR_6_T_NV-F001_0011.png",
JSON
복사