Skip to main content

Series yolo detection in TensorFlow

Project description



LICENSE PyPI Version Build Status Docs Status

Documentation | Tutorials | Release Notes | 中文

tfyolo is a YOLO (You only look once) library implemented by TensorFlow2

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

Tutorial

prepare the data

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

Clone and install requirements

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

Train

$ python train.py

Inference

$ python detect.py
$ python test.py

Train on custom data

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

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

$ python dataset/create_anchor.py

Performance

Model Size APval AP50val AP75val cfg weights
YOLOV5s 672 47.7% 52.6% 61.4% cfg weights
YOLOV5m 672 47.7% 52.6% 61.4% cfg weights
YOLOV5l 672 47.7% 52.6% 61.4% cfg weights
YOLOV5x 672 47.7% 52.6% 61.4% cfg weights

Citation

If you find tf-yolo project useful in your research, please consider cite:

@misc{tfyolo2021,
    title={TFYOLO: yolo series benchmark in tensorflow},
    author={Longxing Tan},
    howpublished = {\url{https://github.com/longxingtan/tfyolo}},
    year={2021}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tfyolo-0.0.1.tar.gz (25.5 kB view hashes)

Uploaded Source

Built Distribution

tfyolo-0.0.1-py3-none-any.whl (31.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page