다음 argument를 설정해줌으로써 특정 object만 탐지할 수 있다.
하나의 클래스 뿐만 아니라 여러 개의 클래스를 필터링 할 수도 있음.

YOLOv7의 경우 weight값만 변경하여 같은 command로 실행 가능
# example (only person class)
python detect.py --weight yolov5n.pt --source 0 --classes 0
- class id는 다음 링크에서 확인 (id 1부터 시작)
What Object Categories / Labels Are In COCO Dataset?
One important element of deep learning and machine learning at large is dataset. A good dataset will contribute to a model with good precision and recall. In the realm of object detection in images…
tech.amikelive.com
예시) RK3399 테스트 결과 (Webcam)
환경
- CPU 사용
- YOLOv5, YOLOv7 모두 pretrained model 중 가장 가벼운 모델 사용
- YOLOv5: yolov5n.pt
- YOLOv7: yolov7.pt
YOLOv5 (yolov5n)
- inference time : 1500 ~ 1800ms

YOLOv7 (yolov7)
- inference time : 8700 ~ 9700ms

Reference
- https://github.com/ultralytics/yolov5/issues/726
- https://github.com/ultralytics/yolov5
- https://github.com/WongKinYiu/yolov7
'ML & DL' 카테고리의 다른 글
Grounded Segment Anything(Grounded SAM)을 사용한 auto-labeling (autodistill) (0) | 2023.06.23 |
---|---|
[강화 학습 PyTorch] Reinforcement Learning Tutorial (Part 2) (0) | 2022.04.30 |
[강화 학습 PyTorch] Reinforcement Learning Tutorial (Part 1) (0) | 2022.04.29 |
[optuna] hyper-parameter 최적화 하기 (0) | 2022.02.24 |