wangermeng2021 / Scaled-YOLOv4-tensorflow2

A Tensorflow2.x implementation of Scaled-YOLOv4 as described in Scaled-YOLOv4: Scaling Cross Stage Partial Network
Apache License 2.0
47 stars 18 forks source link
object-detection scaledyolov4 tensorflow tensorflow-serving tensorflow2 tf2 yolo yolov4

Scaled-YOLOv4-tensorflow2

Python 3.7 TensorFlow 2.4

A Tensorflow2.x implementation of Scaled-YOLOv4 as described in Scaled-YOLOv4: Scaling Cross Stage Partial Network

Update Log

[2021-07-02]:

[2021-06-29]:

Major Features and Improvements:

Bug Fixes and Changes:

[2021-06-27] Add support for: resuming training from checkpoints.

[2021-02-21] Add support for: model.fit(dramatic improvement in GPU utilization); online coco evaluation callback; change default optimizer from sgd to adam

[2021-02-11] Add support for: one-click deployment using tensorflow Serving(very fast)

[2021-01-29] Add support for: mosaic,ssd_random_crop

[2021-01-25] Add support for: ciou loss,hard-nms,DIoU-nms,label_smooth,transfer learning,tensorboard

[2021-01-23] Add support for: scales_x_y/eliminate grid sensitivity,accumulate gradients for using big batch size,focal loss,diou loss

[2021-01-16] Add support for: warmup,Cosine annealing scheduler,Eager mode training with tf.GradientTape,support voc/coco dataset format

[2021-01-10] Add support for: yolov4-tiny,yolov4-large p5/p6/p7,online coco evaluation,multi scale training

Demo

ScaledYOLOv4_p5_detection_result:

pothole_p5_detection_3.png chess_p5_detection.png

ScaledYOLOv4_tiny_detection_result:

safehat_tiny_detection_1.png safehat_tiny_detection_2.png

Installation

1. Clone project

  git clone https://github.com/wangermeng2021/Scaled-YOLOv4-tensorflow2.git
  cd Scaled-YOLOv4-tensorflow2

2. Install environment

Note:

I strongly recommend using voc dataset type(default dataset type), because my GPU is old, so coco dataset type is not fully tested.

Training:

Evaluation results(GTX2080,mAP@0.5):

model Chess Pieces pothole VOC COCO
Scaled-YoloV4-tiny(416) 0.985
Scaled-YoloV4-tiny(416)+ema 0.990
AlexeyAB's YoloV4(416) 0.814
Scaled-YoloV4-p5(416) 0.826

Customzied training

References