Skip to content

Efficient implementation of YOLOV5 in TensorFlow2

Notifications You must be signed in to change notification settings

yuetan1988/Yolov5

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yolov5

LICENSE

YoloV5 implemented by TensorFlow2 , with support for training, evaluation and inference.

NOT perfect project currently, but I will continue to improve this, so you might want to watch/star this repo to revisit. Any contribution is highly welcomed

demo

Key Features

  • minimal Yolov5 by pure tensorflow2
  • yaml file to configure the model
  • custom data training
  • mosaic data augmentation
  • label encoding by iou or wh ratio of anchor
  • positive sample augment
  • multi-gpu training
  • detailed code comments
  • full of drawbacks with huge space to improve

Usage

Clone and install requirements

$ git clone git@github.com:LongxingTan/Yolov5.git
$ cd Yolov5/
$ pip3 install -r requirements.txt

Download VOC

$ data/scripts/get_voc.sh
$ cd yolo
$ python dataset/prepare_data.py

Train

$ python train.py

If you want to train on custom dataset, PLEASE note the input data should like this:

image_dir/001.jpg x_min, y_min, x_max, y_max, class_id x_min2, y_min2, x_max2, y_max2, class_id2
/home/longxing/Yolov5/data/VOC2012/Images/19880315.jpg 315,626,638,801,1

And maybe new anchor need to be created depending on the data, don't forget to change the nc(number classes) in yolo-yaml.

Inference

$ python detect.py

References and Further Reading

About

Efficient implementation of YOLOV5 in TensorFlow2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Shell 0.4%