Image classification model training¶
The recommended processing pipeline uses a detection model with only one generic class ("insect"). The low input resolution enables a high inference speed, which is necessary to reliably track moving/flying insects. Images of the detected and tracked insects are cropped from synchronized HQ frames in real time.
By using the provided script for automated monitoring, cropped detections of individual insects are saved as .jpg files and relevant metadata is saved to .csv for each recording interval. The insect images can be classified in a subsequent step on your local PC, by using a classification model exported to ONNX format for faster CPU inference.
Read the classification instructions for more info on how to deploy your classification model.
YOLOv5¶
Since release v6.2, classification model training and deployment is supported by YOLOv5.
To train your own image classification model, you can select between YOLOv5-cls,
ResNet and EfficientNet classification
models,
pretrained on the ImageNet-1k dataset. An
EfficientNet-B0 model is provided in the
insect-detect-ml
GitHub repo.
-
YOLOv5 classification model training
The notebook for classification model training includes export to ONNX format for faster CPU inference.
Check the introduction and features overview, if this is your first time using a Colab notebook.