Skip to content

bt5-coder/yolov3-tf2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YoloV3 Implemented in Tensorflow 2.0

This repo provides a clean implementation of YoloV3 in Tensorflow 2.0 using all the best practices.

Key Features

  • Tensorflow 2.0
  • yolov3 with pre-trained Weights
  • yolov3-tiny with pre-trained Weights
  • Inference example
  • Transfer learning example
  • Training from scratch example
  • Eager training with tf.GradientTape
  • Functional model with tf.keras.layers
  • Input pipeline using tf.data
  • Vectorized transformations
  • GPU accelerated
  • Fully integrated with absl-py abseil.io
  • Clean implementation
  • Following the best practices
  • MIT License

demo

Usage

Installation

pip install -r requirements.txt

Convert pre-trained Darknet weights

wget https://pjreddie.com/media/files/yolov3.weights -O data/yolov3.weights
python convert.py

Detection

python detect.py

Training

python train.py

Implementation Details

Eager execution

Great addition for existing Tensorflow experts. Not very easy to use without some intermediate understanding of Tensorflow graphs.

@tf.function

@tf.function is very cool. Do have some caveats tho.

Loading pre-trained Darknet weights

very hard without compromising the model structure.

tf.keras.layers.BatchNormalization

It doesn't work very well for transfer learning

References

It is pretty much impossible to implement this from the yolov3 paper alone. I had to reference the official (very hard to understand) and many un-official (many minor errors) repos to piece together the complete picture.

About

YoloV3 Implemented in Tensorflow 2.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.0%
  • Python 2.0%