Skip to content

YOLOv5 ๐Ÿš€ in PyTorch > ONNX > CoreML > TFLite

License

Notifications You must be signed in to change notification settings

Hojland/yolov5-eggs

ย 
ย 

Yolov5-eggs

No Maintenance Awesome build passing

This project is a fork of the awesome yolov5 from Glenn Jocher which is implemented in PyTorch, with added files from ByteTrack (in the object-tracker folder). I have used this for counting eggs in a video for easter;

Yolov5

I trained the model using the guidelines given by the yolov5 repository, see their tutorials here:

Tutorials

This project was used because we can gain very fast inference, while also being simple to train and had good performance

Bytetrack

Then I added the object tracking folder from Bytetrack, which was chosen because I could do simple multiple object tracking by detection with MOTA performance, and therefore not relying on tagging id's of the movements of every object myself. This was easy to use out of the box with any object detection model. ByteTrack has shown good MOTA performance

ByteTrack: Multi-Object Tracking by Associating Every Detection Box

Yifu Zhang, Peize Sun, Yi Jiang, Dongdong Yu, Zehuan Yuan, Ping Luo, Wenyu Liu, Xinggang Wang

arXiv 2110.06864

The result being

How To

First, do

  1. Do annotations in label-studio and export to yolo format
Make labelstudio
  1. Create relevant files for yolov5 as specified in the train custom model tutorial
  2. Train the model as specified in the tutorial
  3. Do detection on your on video by running
python3 detect.py --source <YOUR_VIDEO> --data <YOUR_DATA_SPEC> --weights <YOUR_BEST_TRAINED_WEIGHTS>

Getting Started

Prerequisites

Dependencies are installed with poetry, which is installed using

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

Most likely you would also like your virtual environment to reside in the project folder, do once as

poetry config virtualenvs.in-project true

Installing

Link to your version of python using

poetry env use <python-version>

And you can install the dependencies using

poetry install (or update)

Authors

  • Martin Hรธjland - Initial work - hojland

See also the list of contributors who participated in this project.

Acknowledgments

Big acknowledgements to authors of Yolov5 and ByteTrack

About

YOLOv5 ๐Ÿš€ in PyTorch > ONNX > CoreML > TFLite

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 96.4%
  • C++ 2.8%
  • Other 0.8%