All Projects → AntonMu → Trainyourownyolo

AntonMu / Trainyourownyolo

Licence: other
Train a state-of-the-art yolov3 object detector from scratch!

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Trainyourownyolo

Bmw Labeltool Lite
This repository provides you with a easy to use labeling tool for State-of-the-art Deep Learning training purposes.
Stars: ✭ 145 (-63.66%)
Mutual labels:  object-detection, yolo, yolov3, inference
Bmw Yolov4 Inference Api Gpu
This is a repository for an nocode object detection inference API using the Yolov3 and Yolov4 Darknet framework.
Stars: ✭ 237 (-40.6%)
Mutual labels:  gpu, yolo, yolov3, inference
Object Detection Api
Yolov3 Object Detection implemented as APIs, using TensorFlow and Flask
Stars: ✭ 177 (-55.64%)
Mutual labels:  object-detection, yolo, yolov3, inference
Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (+84.96%)
Mutual labels:  object-detection, jupyter-notebook, yolo, transfer-learning
Yolov3 Tf2
YoloV3 Implemented in Tensorflow 2.0
Stars: ✭ 2,327 (+483.21%)
Mutual labels:  object-detection, jupyter-notebook, yolo, yolov3
Tensorflow Yolo V3
Implementation of YOLO v3 object detector in Tensorflow (TF-Slim)
Stars: ✭ 862 (+116.04%)
Mutual labels:  object-detection, yolo, yolov3, detector
Yoloncs
YOLO object detector for Movidius Neural Compute Stick (NCS)
Stars: ✭ 176 (-55.89%)
Mutual labels:  object-detection, yolo, detector
Yolo v3 tutorial from scratch
Accompanying code for Paperspace tutorial series "How to Implement YOLO v3 Object Detector from Scratch"
Stars: ✭ 2,192 (+449.37%)
Mutual labels:  object-detection, yolo, yolov3
Deep Sort Yolov4
People detection and optional tracking with Tensorflow backend.
Stars: ✭ 306 (-23.31%)
Mutual labels:  object-detection, yolo, yolov3
Pine
🌲 Aimbot powered by real-time object detection with neural networks, GPU accelerated with Nvidia. Optimized for use with CS:GO.
Stars: ✭ 202 (-49.37%)
Mutual labels:  object-detection, yolo, yolov3
Yolo V3 Iou
YOLO3 动漫人脸检测 (Based on keras and tensorflow) 2019-1-19
Stars: ✭ 116 (-70.93%)
Mutual labels:  object-detection, yolo, yolov3
Bmw Yolov4 Inference Api Cpu
This is a repository for an nocode object detection inference API using the Yolov4 and Yolov3 Opencv.
Stars: ✭ 180 (-54.89%)
Mutual labels:  object-detection, yolov3, inference
Alturos.yolo
C# Yolo Darknet Wrapper (real-time object detection)
Stars: ✭ 308 (-22.81%)
Mutual labels:  object-detection, yolo, yolov3
Microsoft Rocket Video Analytics Platform
A highly extensible software stack to empower everyone to build practical real-world live video analytics applications for object detection and counting with cutting edge machine learning algorithms.
Stars: ✭ 162 (-59.4%)
Mutual labels:  object-detection, gpu, yolov3
Yolo label
GUI for marking bounded boxes of objects in images for training neural network Yolo v3 and v2 https://github.com/AlexeyAB/darknet, https://github.com/pjreddie/darknet
Stars: ✭ 128 (-67.92%)
Mutual labels:  object-detection, yolo, yolov3
Mmdetection To Tensorrt
convert mmdetection model to tensorrt, support fp16, int8, batch input, dynamic shape etc.
Stars: ✭ 262 (-34.34%)
Mutual labels:  object-detection, yolov3, inference
Open-Source-Models
Address book for computer vision models.
Stars: ✭ 30 (-92.48%)
Mutual labels:  detector, transfer-learning, yolov3
Bmw Tensorflow Inference Api Gpu
This is a repository for an object detection inference API using the Tensorflow framework.
Stars: ✭ 277 (-30.58%)
Mutual labels:  object-detection, gpu, inference
Pytorch Yolo V3
A PyTorch implementation of the YOLO v3 object detection algorithm
Stars: ✭ 3,148 (+688.97%)
Mutual labels:  object-detection, yolo, yolov3
Yolov5
YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
Stars: ✭ 19,914 (+4890.98%)
Mutual labels:  object-detection, yolo, yolov3

TrainYourOwnYOLO: Building a Custom Object Detector from Scratch License: CC BY 4.0

This repo let's you train a custom image detector using the state-of-the-art YOLOv3 computer vision algorithm. For a short write up check out this medium post. This repo works with TensorFlow 2.3 and Keras 2.4.

Pipeline Overview

To build and test your YOLO object detection algorithm follow the below steps:

  1. Image Annotation
    • Install Microsoft's Visual Object Tagging Tool (VoTT)
    • Annotate images
  2. Training
    • Download pre-trained weights
    • Train your custom YOLO model on annotated images
  3. Inference
    • Detect objects in new images and videos

Repo structure

  • 1_Image_Annotation: Scripts and instructions on annotating images
  • 2_Training: Scripts and instructions on training your YOLOv3 model
  • 3_Inference: Scripts and instructions on testing your trained YOLO model on new images and videos
  • Data: Input Data, Output Data, Model Weights and Results
  • Utils: Utility scripts used by main scripts

Getting Started

Google Colab Tutorial Open In Colab

With Google Colab you can skip most of the set up steps and start training your own model right away.

Requisites

The only hard requirement is a running version of python 3.6 or 3.7. To install python 3.7 go to

and follow the installation instructions. Note that this repo has only been tested with python 3.6 and python 3.7 thus it is recommened to use either python3.6 or python3.7.

To speed up training, it is recommended to use a GPU with CUDA support. For example on AWS you can use a p2.xlarge instance (Tesla K80 GPU with 12GB memory). Inference is very fast even on a CPU with approximately ~2 images per second. If you want to use your own machine, follow the instructions at tensorflow.org/install/gpu to install CUDA drivers. Make sure to install the correct version of CUDA and cuDNN.

Installation

Setting up Virtual Environment [Linux or Mac]

Clone this repo with:

git clone https://github.com/AntonMu/TrainYourOwnYOLO
cd TrainYourOwnYOLO/

Create Virtual (Linux/Mac) Environment:

python3 -m venv env
source env/bin/activate

Make sure that, from now on, you run all commands from within your virtual environment.

Setting up Virtual Environment [Windows]

Use the Github Desktop GUI to clone this repo to your local machine. Navigate to the TrainYourOwnYOLO project folder and open a power shell window by pressing Shift + Right Click and selecting Open PowerShell window here in the drop-down menu.

Create Virtual (Windows) Environment:

py -m venv env
.\env\Scripts\activate

PowerShell Make sure that, from now on, you run all commands from within your virtual environment.

Install Required Packages [Windows, Mac or Linux]

Install required packages (from within your virtual environment) via:

pip install -r requirements.txt

If this fails, you may have to upgrade your pip version first with pip install pip --upgrade.

Quick Start (Inference only)

To test the cat face detector on test images located in TrainYourOwnYOLO/Data/Source_Images/Test_Images run the Minimal_Example.py script in the root folder with:

python Minimal_Example.py

The outputs are saved in TrainYourOwnYOLO/Data/Source_Images/Test_Image_Detection_Results. This includes:

  • Cat pictures with bounding boxes around faces with confidence scores and
  • Detection_Results.csv file with file names and locations of bounding boxes.

If you want to detect cat faces in your own pictures, replace the cat images in Data/Source_Images/Test_Images with your own images.

Full Start (Training and Inference)

To train your own custom YOLO object detector please follow the instructions detailed in the three numbered subfolders of this repo:

To make everything run smoothly it is highly recommended to keep the original folder structure of this repo!

Each *.py script has various command line options that help tweak performance and change things such as input and output directories. All scripts are initialized with good default values that help accomplish all tasks as long as the original folder structure is preserved. To learn more about available command line options of a python script <script_name.py> run:

python <script_name.py> -h

NEW: Weights and Biases

TrainYourOwnYOLO supports Weights & Biases to track your experiments online. Sign up at wandb.ai to get an API key and run:

wandb -login <API_KEY>

where <API_KEY> is your Weights & Biases API key.

Multi-Stream-Multi-Model-Multi-GPU

If you want to run multiple streams in parallel, head over to github.com/bertelschmitt/multistreamYOLO. Thanks to @bertelschmitt for putting the work into this.

License

Unless explicitly stated otherwise at the top of a file, all code is licensed under CC BY 4.0. This repo makes use of ilmonteux/logohunter which itself is inspired by qqwweee/keras-yolo3.

Troubleshooting

  1. If you encounter any error, please make sure you follow the instructions exactly (word by word). Once you are familiar with the code, you're welcome to modify it as needed but in order to minimize error, I encourage you to not deviate from the instructions above. If you would like to file an issue, please use the provided template and make sure to fill out all fields.

  2. If you encounter a FileNotFoundError, Module not found or similar error, make sure that you did not change the folder structure. Your directory structure must look exactly like this:

    TrainYourOwnYOLO
    └─── 1_Image_Annotation
    └─── 2_Training
    └─── 3_Inference
    └─── Data
    └─── Utils
    

    If you use a different name such as e.g. TrainYourOwnYOLO-master you will have to specify the correct paths as command line arguments in every function call.

    Don't use spaces in file or folder names, i.e. instead of my folder use my_folder.

  3. If you are a Linux user and having trouble installing *.snap package files try:

    snap install --dangerous vott-2.1.0-linux.snap
    

    See Snap Tutorial for more information.

Need more help? File an Issue!

If you would like to file an issue, please use the provided issue template and make sure to complete all fields. This makes it easier to reproduce the issue for someone trying to help you.

Issue

Issues without a completed issue template will be closed after 7 days.

Stay Up-to-Date

  • star this repo to get notifications on future improvements and
  • 🍴 fork this repo if you like to use it as part of your own project.

CatVideo

Licensing

This work is licensed under a Creative Commons Attribution 4.0 International License. This means that you are free to:

  • Share — copy and redistribute the material in any medium or format
  • Adapt — remix, transform, and build upon the material for any purpose, even commercially.

Under the following terms:

  • Attribution

Cite as:

@misc{TrainYourOwnYOLO,
  title={TrainYourOwnYOLO: Building a Custom Object Detector from Scratch},
  author={Anton Muehlemann},
  year={2019},
  url={https://github.com/AntonMu/TrainYourOwnYOLO}
}

If your work doesn't include a citation list, simply link this github repo!

CC BY 4.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].