모델 학습시킬 때 argument 지정
예시)
python train.py --img 640 --batch 16 --epochs 100 --data dpic.yaml --weights yolov5l.pt
weight
(학습한 모델의 best weight 사용 train/exp/weights 폴더 내의 last.pt(마지막 epoch의 weight)
best.pt(가장 좋은 epoch의 weight(best mAP) 들어 있음))
pretrain된 weight를 넣어줄 수도 있음(yolov5l.pt)
ex: --weights 'runs/train/exp2/weights/best.pt'
data 원하는 데이터 있는 경로 train과 test데이터간에 차이 알아볼 필요 있음🤔️
img 640 size (학습할 때 쓴 이미지 사이즈와 동일하게)
batch (default :32)
epochs (test에선 의미 x)
detection할 때의 argument 입력
예시) python detect.py --source data/obj_test_data --conf 0.65 --weights 'runs/train/exp6/weights/best.pt'
task
test 경로에 있는 데이터로 결과를 보려면 'test' 해줘야 함
conf
conf_threshold(0~1)
지정된 값을 넘겨야, 바운딩 박스를 그림
내 프로젝트에서는 사출품(object)의 defect를 관찰하는 것이 목표였다.
따라서 object와 defect의 detect가 모두 필요하다.
실제 현장 환경이 주변 물품이 나오냐 안나오냐(복잡성)에 따라 conf의 수치를 결정했다.