Back to rankings

🔥 TensorFlow Code for technical report: "YOLOv3: An Incremental Improvement"

yolov3tensorflowobject-detectiondeep-learning
Star Growth
Stars
3.6k
Forks
1.3k
Weekly Growth
Issues
466
1k2k3k
Dec 2018Jun 2021Jan 2024Jul 2026
ArtifactsPyPIpip install tensorflow-yolov3
README

🆕 Are you looking for a new YOLOv3 implemented by TF2.0 ?

If you hate the fucking tensorflow1.x very much, no worries! I have implemented a new YOLOv3 repo with TF2.0, and also made a chinese blog on how to implement YOLOv3 object detector from scratch.
code | blog | issue

part 1. Quick start

  1. Clone this file
$ git clone https://github.com/YunYang1994/tensorflow-yolov3.git
  1. You are supposed to install some dependencies before getting out hands with these codes.
$ cd tensorflow-yolov3
$ pip install -r ./docs/requirements.txt
  1. Exporting loaded COCO weights as TF checkpoint(yolov3_coco.ckpt)【BaiduCloud
$ cd checkpoint
$ wget https://github.com/YunYang1994/tensorflow-yolov3/releases/download/v1.0/yolov3_coco.tar.gz
$ tar -xvf yolov3_coco.tar.gz
$ cd ..
$ python convert_weight.py
$ python freeze_graph.py
  1. Then you will get some .pb files in the root path., and run the demo script
$ python image_demo.py
$ python video_demo.py # if use camera, set video_path = 0

part 2. Train your own dataset

Two files are required as follows:

xxx/xxx.jpg 18.19,6.32,424.13,421.83,20 323.86,2.65,640.0,421.94,20 
xxx/xxx.jpg 48,240,195,371,11 8,12,352,498,14
# image_path x_min, y_min, x_max, y_max, class_id  x_min, y_min ,..., class_id 
# make sure that x_max < width and y_max < height
person
bicycle
car
...
toothbrush

2.1 Train on VOC dataset

Download VOC PASCAL trainval and test data

$ wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
$ wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
$ wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar

Extract all of these tars into one directory and rename them, which should have the following basic structure.


VOC           # path:  /home/yang/dataset/VOC
├── test
|    └──VOCdevkit
|        └──VOC2007 (from VOCtest_06-Nov-2007.tar)
└── train
     └──VOCdevkit
         └──VOC2007 (from VOCtrainval_06-Nov-2007.tar)
         └──VOC2012 (from VOCtrainval_11-May-2012.tar)
                     
$ python scripts/voc_annotation.py --data_path /home/yang/test/VOC

Then edit your ./core/config.py to make some necessary configurations

__C.YOLO.CLASSES                = "./data/classes/voc.names"
__C.TRAIN.ANNOT_PATH            = "./data/dataset/voc_train.txt"
__C.TEST.ANNOT_PATH             = "./data/dataset/voc_test.txt"

Here are two kinds of training method:

(1) train from scratch:
$ python train.py
$ tensorboard --logdir ./data
(2) train from COCO weights(recommend):
$ cd checkpoint
$ wget https://github.com/YunYang1994/tensorflow-yolov3/releases/download/v1.0/yolov3_coco.tar.gz
$ tar -xvf yolov3_coco.tar.gz
$ cd ..
$ python convert_weight.py --train_from_coco
$ python train.py

2.2 Evaluate on VOC dataset

$ python evaluate.py
$ cd mAP
$ python main.py -na

the mAP on the VOC2012 dataset:

part 3. Other Implementations

-YOLOv3目标检测有了TensorFlow实现,可用自己的数据来训练

-Stronger-yolo

- Implementing YOLO v3 in Tensorflow (TF-Slim)

- YOLOv3_TensorFlow

- Object Detection using YOLOv2 on Pascal VOC2012

-Understanding YOLO

Related repositories
ultralytics/yolov5

Ultralytics YOLOv5 in PyTorch > ONNX > CoreML > TFLite

PythonPyPIGNU Affero General Public License v3.0yolov3yolov5
docs.ultralytics.com
57.7k17.5k
PaddlePaddle/PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.

PythonPyPIApache License 2.0object-detectioninstance-segmentation
14.3k3k
WongKinYiu/yolov7

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors

Jupyter NotebookGNU General Public License v3.0scaled-yolov4yolor
14.1k4.4k
ultralytics/yolov3

Ultralytics YOLOv3 in PyTorch > ONNX > CoreML > TFLite

PythonPyPIGNU Affero General Public License v3.0yolov3object-detection
docs.ultralytics.com
10.6k3.4k
Megvii-BaseDetection/YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/

PythonPyPIApache License 2.0yoloxyolov3
10.5k2.5k
wang-xinyu/tensorrtx

Implementation of popular deep learning networks with TensorRT network definition API

C++MIT Licensetensorrtmnasnet
7.8k1.9k
Tianxiaomo/pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4

PythonPyPIApache License 2.0yolov4pytorch
4.5k1.5k
ayooshkathuria/pytorch-yolo-v3

A PyTorch implementation of the YOLO v3 object detection algorithm

PythonPyPIyolov3yolo
3.3k1k
ZQPei/deep_sort_pytorch

MOT using deepsort and yolov3 with pytorch

PythonPyPIMIT Licensedeepsortpytorch
3k726
iscyy/ultralyticsPro

🔥🔥🔥 专注于YOLO11,YOLOv8、TYOLOv12、YOLOv10、RT-DETR、YOLOv7、YOLOv5改进模型,Support to improve backbone, neck, head, loss, IoU, NMS and other modules🚀

PythonPyPIyolov5backbone
github.com/iscyy/ultralyticsPro
2.9k460
iscyy/yoloair

🔥🔥🔥 专注于YOLOv5,YOLOv7、YOLOv8、YOLOv9改进模型,Support to improve backbone, neck, head, loss, IoU, NMS and other modules🚀

PythonPyPIyolov5attention
github.com/iscyy/yoloair
2.6k438
zzh8829/yolov3-tf2

YoloV3 Implemented in Tensorflow 2.0

Jupyter NotebookMIT Licensetensorflowtf2
2.5k890