YOLODet's strongest PyTorch version of YOLOv5, YOLOv4, PP-YOLO, YOLOv3 reproduce

github address: https://github.com/wuzhihao7788/yolodet-pytorch

YOLODet-PyTorch

YOLODet-PyTorch is an end-to-end target detection development kit based on the pytorch framework to reproduce the latest Yolo algorithm. It aims to help developers complete the whole process of detection model training, accuracy and speed optimization, and deployment faster and better. YOLODet-PyTorch implements a variety of mainstream YOLO target detection algorithms with a modular design, and provides a wealth of data enhancement, network components, loss functions and other modules.

At present, the models under the detection library require the use of PyTorch 1.5 and above or the appropriate develop version.

content

Introduction

characteristic:

  • Rich models:

    YOLODet provides a wealth of models, covering the reproduction of the latest YOLO detection algorithm, including YOLOv5, YOLOv4, PP-YOLO, YOLOv3 and other YOLO series target detection algorithms.

  • High flexibility:

    YOLODet decouples various components through modular design, and can easily build various detection models based on configuration files.

Supported models:

More Backone:

  • DarkNet
  • CSPDarkNet
  • ResNet
  • YOLOv5Darknet

Data enhancement method:

  • Mosaic
  • MixUp
  • Resize
  • LetterBox
  • RandomCrop
  • RandomFlip
  • RandomHSV
  • RandomBlur
  • RandomNoise
  • RandomAffine
  • RandomTranslation
  • Normalize
  • ImageToTensor
  • For related configuration instructions, please refer to【here

Loss function support:

  • bbox loss (IOU, GIOU, DIOU, CIOU)
  • confidence loss(YOLOv4,YOLOv5,PP-YOLO)
  • IOU_Aware_Loss(PP-YOLO)
  • FocalLoss

Training skills support:

  • Exponential moving average
  • Warm up
  • Gradient shear
  • Gradient cumulative update
  • Multi-scale training
  • Learning rate adjustment: Fixed, Step, Exp, Poly, Inv, Consine
  • Label Smooth
  • It is strongly stated that the definition of positive and negative sample division and loss function definition of YOLOv5 is found through experimental comparison, which makes the model converge faster, far exceeding the division and loss definition of positive and negative samples of the original yolo series. If the card resources are not sufficient and you want to converge the model in a short time, you can use yolov5's positive and negative sample partition and loss function definition, the relevant parameters are yolo_loss_type=yolov5.
  • The definition of YOLOv5 for positive samples is additionally supplemented: as long as the ratio of the true frame to the given anchor frame is within 4 times at different scales, the anchor frame can be responsible for predicting the true value frame. And according to the offset of gx and gy in the center of the grid, two additional grid coordinates will be added to predict. Through this series of operations, the number of positive samples is increased and the model convergence speed is accelerated. For the original YOLO series, for the true frame, only the anchor frame with the largest IOU intersection at this scale is responsible for predicting the true frame at different scales, and other anchor frames are not responsible, so due to the smaller positive sample size, the model converges faster. slow.

Extended features:

  • [x] Group Norm
  • [x] Modulated Deformable Convolution
  • [x] Focus
  • [x] Spatial Pyramid Pooling
  • [x] FPN-PAN
  • [x] coord conv
  • [x] drop block
  • [x] SAM

Code structure description

yolodet-pytorch
├──cfg              #模型配置文件所在目录(yolov5,yolov4等)
├──tools            #工具包,包含训练代码,测试代码和推断代码入口。
├──yolodet          #YOLO检测框架核心代码库
│  ├──apis          #提供检测框架的训练,测试和推断和模型保存的接口
│  ├──dataset       #包含DateSet,DateLoader和数据增强等通用方法
│  ├──models        #YOLO检测框架的核心组件集结地
│  │  ├──detectors  #所有类型检测器集结地
│  │  ├──backbones  #所有骨干网络集结地
│  │  ├──necks      #所有necks集结地
│  │  ├──heads      #heads集结地
│  │  ├──loss       #所有损失函数集结地
│  │  ├──hooks      #hooks集结地(学习率调整,模型保存,训练日志,权重更新等)
│  │  ├──utils      #所有工具方法集结地

Installation Notes

Please refer to INSTALL.md for installation and data set preparation .

Quick start

See GETTING_STARTED.md understand the basic usage of YOLODet.

Pre-trained model

To view the pre-trained model, please click【here

Guess you like

Origin blog.51cto.com/14989260/2546517