Skip to content

Sample code for using YOLOv5 with custom datasets (training and inference)

Notifications You must be signed in to change notification settings

datasith/ds-experiments-yolov5

Repository files navigation

Object Detection with YOLOv5

Getting Started

Clone this repo and install requirements.txt in a Python>=3.7.0 environment, including PyTorch>=1.7. The models and datasets download automatically from the latest YOLOv5 release.

git clone https://github.com/datasith/ds-experiments-yolov5
cd ds-experiments-yolov5
git submodule init
git submodule update
pip install -r yolov5/requirements.txt

Alternatively, use the links provided below to open them in Google Colab.

Training on Custom Data

All the notebooks in this repo make use of the @Ultralytics scripts for training YOLOv5 models on custom data.

Name Dataset Description Notebook
Demo SKU110K SKU110K Densely packed images of objects on shelves
Demo CoTS (Kaggle) CoTS Detect Crown-of-Thorns Starfish in real-time by training a model on underwater videos of coral reefs

Errata

For running the notebooks locally, if you're training on an Intel Mac, you might encounter the error below after installing the requirements:

OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized.

The solution (found on Stack Overflow) for this is to:

conda update --all --yes
conda install nomkl

Datasets

I'm using a few datasets to train on. This list will be updated with each added one.

  • SKU110K
  • CoTS (Kaggle)

🐞 If you find any bugs or have any questions regarding these notebooks, please open an issue. I'll address it as soon as I can.

🐦 Reach out on Twitter if you have any questions.

🔗 Please cite the following if you use the code examples in your research:

@misc{zabala2022ml,
  author    = {Zabala, Francisco},
  title     = {DS Experiments YOLOv5},
  journal   = {GitHub},
  year      = {2022},
  url       = {https://github.com/datasith/ds-experiments-yolov5},
}

About

Sample code for using YOLOv5 with custom datasets (training and inference)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published