Need help with Yolov5_tf?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

143 Stars 57 Forks 16 Commits 19 Opened issues


Yolov5/Yolov4/ Yolov3/ Yolo_tiny in tensorflow

Services available


Need anything else?

Contributors list

No Data



  1. Install NVIDIA driver
  2. Install CUDA10.1 and cudnn7.5
  3. Install Anaconda3, download website
  4. Install tensorflow, such as "sudo pip install tensorflow>=1.15 or tensorflow > 2.0" etc.


A tensorflow implementation of YOLOv5 inspired by

A tensorflow implementation of YOLOv4 inspired by

Frame code from

Backbone: Darknet53; CSPDarknet53[1], Mish[2]; MobileNetV2; MobileNetV3(large and small)

Neck: SPP[3], PAN[4];

Head: YOLOv5/YOLOv4(Mish), YOLOv3(Leaky_ReLU)[10];

Loss: DIOU CIOU[5], FocalLoss[6]; Other: LabelSmoothing[7];


Python 3.6.8

Tensorflow 1.13.1 or Tensorflow 2.0 up

Quick Start

  1. Download YOLOv5 weights from yolov5.weights.
  2. Download YOLOv4 weights from yolov4.weights.
  3. Convert the Darknet YOLOv4 model to a tf model.
  4. Train Yolov5/Yolov4/Yolov3/Yolo_tiny.
  5. Run Yolov5/Yolov4/Yolov3/Yolo_tiny detection.

Convert weights

Running will get tf yolov4 weight file yolov4_coco.ckpt.

python scripts/

Running will get tf yolov4 weight file yolov4.pb.

python scripts/

Or running directly.

python scripts/


In core/ add your own path.

usage: python gpuid nettype(yolov5/yolov4/yolov3/tiny)

python 0 yolov5





[1] Cross Stage Partial Network (CSPNet)

[2] A Self Regularized Non-Monotonic Neural Activation Function

[3] Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition

[4] Path Aggregation Network for Instance Segmentation

[5] Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression

[6] Focal Loss for Dense Object Detection

[7] When Does Label Smoothing Help?

[8] Convolutional Block Attention Module

[9] YOLOv4: Optimal Speed and Accuracy of Object Detection

[10] YOLOv3: An Incremental Improvement

[11] Aggregated Residual Transformations for Deep Neural Networks




We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.