Skip to content

Recognize bees, wasps, european hornets, asian hornets, and oriental hornets on images/videos

License

Notifications You must be signed in to change notification settings

CampominosiMarco/Hymenoptera-Recognizer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hymenoptera Recognizer

In this data set, we identify 5 differents classes : Confusion Matrix (bees, wasps, european hornet, asian hornet, oriental hornet)

Initialisation

git clone git@github.com:ultralytics/yolov5.git
cd yolov5
pip install -r requirements.txt

Train the Yolo model

If you want to retrain the yolov5 model to add more classes, train on your own dataset, or for other reason, you can make your other version like this:

cd dataset
unzip Hymenoptera.v2i.yolov5pytorch.zip
cd ../yolov5
python train.py --img 640 --batch 16 --epochs 100 --data ../dataset/Hymenoptera.v2i.yolov5pytorch/data.yaml --weights yolov5m.pt

(You can add --device cpu to use CPU. Default is GPU.)

Validate the Yolo model

You can see the train and validate results in yolov5/runs/train/exp.
If the model looks good, you can run the following command before use it:

mv ./yolov5/runs/train/exp/weights/best.pt ./models/yolov5m.pt

Use the Yolo model

For example, you can run our model on a simple image, like that:

./run.sh yolov5m_v2 ./src/image_1.jpg

The first argument is the model to use (yolov5m_v1 or yolov5m_v2). The second argument is the path to the image to run. It's work also on video files. If you want to run the model on the webcam, you can give 0 as the second argument.
The result is save on the ./src/results/ folder.

Versions

In the models folder, you can find our 2 version of yolov5 trained.

yolov5m_v1

Is trained with a dataset buildt using google image, label flow and roboflow. We have around 580 datas include all classes.
There is the confusion matrix on validations data : Confusion Matrix There is some exemple of waiting vs prredicted data :
Label_v1
Pred_v1

yolov5m_v2

Is trained with a dataset buildt using google image, label flow and roboflow. We have around 2k datas include all classes.
There is the confusion matrix on validations data : Confusion Matrix There is some exemple of waiting vs prredicted data :
Label_v2
Pred_v2

About

Recognize bees, wasps, european hornets, asian hornets, and oriental hornets on images/videos

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • HTML 72.0%
  • Python 26.3%
  • Shell 1.7%