yolov5-ichthyolith is an application of yolov5 for detecting microfossil fish teeth called ichthyolith.
code originality: ultralytics/yolov5
@software{yolov5-ichthyolith,
author = {Kazuhide Mimura},
month = {5},
title = {{Automated detection of microfossils by combining YOLO-v5 and EfficientNet}},
url = {https://github.com/KazuhideMimura/yolov5-ichthyolith/},
year = {2022}
}
Combining detection and classification model is useful when many FPs are contained in images.
In original yolo-v5, number of classes for 1st (detection) model and 2nd (classification) model should be the same.
However, enabling number of classes for 2nd models may benefit many object detection problem using yolov5. See ultralytics/yolov5/issues/7429 for detail.
For this purpose, detect.py and classifier.py were modified so that second model can classifiy objects into larger number of classes than that of 1st models.
The code is also designed to try "fine- and coarse- grain labeling" reported by Chen et al. (2018).
python train.py --img 800 --batch 16 --epoch 80 --data ichthyolith_detection.yaml --weights yolov5l.pt --name 20220510_model1
python classifier.py --model efficientnet_b0 --data path/to/dataset --project second_classifier --name 20220510_model2 --epochs 15 --img 224
python detect.py --source path/to/detection/directory --weights runs/train/20220510_model1/weights/best.pt --img 800
python detect.py --source path/to/detection/directory --weights runs/train/20220510_model1/weights/best.pt --second second_classifier/20220510_model2/weights/best.pt --img 800
python detect.py --source path/to/detection/directory --weights runs/train/20220510_model1/weights/best.pt --second second_classifier/20220510_model2/weights/best.pt --return-coarse --img 800
also see: ultralytics/yolov5/issues/7429
2022/6/7: started counting visitors
2022/6/4: Added some program codes that were missing in utils/~.
2022/5/14: enabled to return to coarse labels & added some detection images to readme.md
2022/5/10: released