Giter Site home page Giter Site logo

techwitz / tensorflow-2.x-yolov3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pythonlessons/tensorflow-2.x-yolov3

0.0 1.0 0.0 70.74 MB

YOLOv3 implementation in TensorFlow 2.x

Home Page: https://pylessons.com/

License: MIT License

Python 9.88% Jupyter Notebook 90.12%

tensorflow-2.x-yolov3's Introduction

TensorFlow-2.x-YOLOv3 and YOLOv4 tutorials

YOLOv3 and YOLOv4 implementation in TensorFlow 2.x, with support for training, transfer training, object tracking mAP and so on...

Installation

First, clone or download this GitHub repository. Install requirements and download pretrained weights:

pip install -r ./requirements.txt

# yolov3
wget -P model_data https://pjreddie.com/media/files/yolov3.weights

# yolov3-tiny
wget -P model_data https://pjreddie.com/media/files/yolov3-tiny.weights

# yolov4
wget -P model_data https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights

# yolov4-tiny
wget -P model_data https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights

Quick start

Start with using pretrained weights to test predictions on both image and video:

python detection_demo.py

Quick training for custom mnist dataset

mnist folder contains mnist images, create training data:

python mnist/make_data.py

./yolov3/configs.py file is already configured for mnist training.

Now, you can train it and then evaluate your model

python train.py
tensorboard --logdir=log

Track training progress in Tensorboard and go to http://localhost:6006/:

Test detection with detect_mnist.py script:

python detect_mnist.py

Results:

Custom Yolo v3 object detection training

Custom training required to prepare dataset first, how to prepare dataset and train custom model you can read in following link:
https://pylessons.com/YOLOv3-TF2-custrom-train/

Google Colab Custom Yolo v3 training

To learn more about Google Colab Free gpu training, visit my text version tutorial

Yolo v3 Tiny train and detection

To get detailed instructions how to use Yolov3-Tiny, follow my text version tutorial YOLOv3-Tiny support. Short instructions:

  • Get YOLOv3-Tiny weights: wget -P model_data https://pjreddie.com/media/files/yolov3-tiny.weights
  • From yolov3/configs.py change TRAIN_YOLO_TINY from False to True
  • Run detection_demo.py script.

Yolo v3 Object tracking

To learn more about Object tracking with Deep SORT, visit Following link. Quick test:

  • Clone this repository;
  • Make sure object detection works for you;
  • Run object_tracking.py script

YOLOv3 vs YOLOv4 comparison on 1080TI:

Detection 320x320 416x416 512x512
YoloV3 FPS 24.38 20.94 18.57
YoloV4 FPS 22.15 18.69 16.50

mAP on COCO 2017 Dataset:

Detection 320x320 416x416 512x512
YoloV3 mAP50 49.85 55.31 57.48
YoloV4 mAP50 48.58 56.92 61.71

What is done:

To be continued...

  • Converting to TensorFlow Lite
  • YOLO on Android (Leaving it for future, will need to convert everythin to java... not ready for this)
  • Convert to TensorRT model
  • Generating anchors
  • YOLACT: Real-time Instance Segmentation
  • Model pruning (Pruning is a technique in deep learning that aids in the development of smaller and more efficient neural networks. It's a model optimization technique that involves eliminating unnecessary values in the weight tensor.)
  • YOLOv4 and YOLOv4-tiny detection training
  • Add multiprocessing after detection (drawing bbox)

tensorflow-2.x-yolov3's People

Contributors

pythonlessons avatar san-b-09 avatar tkwant avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.