Skip to content
/ yoc Public
forked from iloveai8086/YOLOC

🚀🚀🚀YOLOC is Combining different modules to build an different Object detection model.Including YOLOv5、YOLOv6、YOLOv7、YOLOX、YOLOv3、YOLOv4、Scaled_YOLOv4、YOLOR、YOLOv5-Lite、transformer、PPYOLO、TPH、PicoDet...

License

Notifications You must be signed in to change notification settings

Bestsongc/yoc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLOC: Unified Paradigm, Combined

YOLOC is Combining different modules to build an different Object detection model. Including YOLOv3, YOLOv4, Scaled_YOLOv4, YOLOv5, YOLOv6, YOLOv7, YOLOX, YOLOR, Transformer...

English | 简体中文

Features🚀 • Usage🍉 • Documentation📒 • Reporting Issues🌟

Support

The YOLOC algorithm library is a series of open source toolboxes for YOLO target detection based on PyTorch. Unified model code framework, unified task form, unified application method, unified deployment, unified parameter adjustment, and building a more powerful network model. It is based on the YOLOv5 code framework and synchronously adapts to the YOLOv5 (v6.0/v6.1 update) deployment ecosystem. Before using this project, you can learn about the YOLOv5 library. Module componentization: Help users to customize and quickly combine Backbone, Neck, and Head to diversify network models, help scientific research improve detection algorithms, and deploy engineering algorithms more conveniently. Build stronger network models.

Project address: https://github.com/Him-wen/YOLOC

Main features🚀

🚀 Support more YOLO series algorithm models (continuously updated...)

The YOLOC algorithm library summarizes a variety of mainstream YOLO series detection models, and a set of codes integrates multiple models:

  • Built-in integrated YOLOv7 model network structure
  • Built-in integrated YOLOv6 model network structure
  • Built-in integrated YOLOX model network structure
  • Built-in integrated YOLOR model network structure
  • Built-in integrated YOLOv5 model network structure
  • Built-in integrated Scaled_YOLOv4 model network structure
  • Built-in integrated YOLOv4 model network structure
  • Built-in integrated YOLOv3 model network structure
  • and some improved models
  • TPH-YOLOv5 model network structure
  • YOLOv5-Lite model network structure
  • PPYOLO model network structure
  • PicoDet model network structure ...

The above multiple detection algorithms use a unified model code framework, which is integrated in the YOLOC library, with a unified task form and a unified application method. 🌟It is convenient for researchers to improve the algorithm model of the paper, compare models, and realize the diversification of network combinations. 🌟The deployment of engineering algorithms is more convenient, including lightweight models and models with higher accuracy, which can be reasonably selected according to the scene, and achieve a balance between accuracy and speed. At the same time, the library supports decoupling of different structures and module components to make modules componentized. By combining different module components, users can customize and build different detection models according to different data sets or different business scenarios.

🚀 The model supports exporting ONNX for TensorRT inference and deployment.

🚀Support loading the official pre-training weights of YOLOv3, YOLOv4, YOLOv5, YOLOv7, YOLOR and other networks for transfer learning

🚀 Supports Anchor-base detector and Anchor-Free detector

🚀 Support more Backbone

  • Backbone includes CSPDarkNet, ConvNext, RepBlock series, ResNet series, Transformer series (Continuous update of Transformer, Swin series, BotNet, CoTNet, etc.), and lightweight network ShuffleNet series, Ghost series, MobileNet series and other network structures.

🚀Support more Necks

  • The neck includes mainstream structures such as FPN, PANet, and BiFPN.

🚀 Support more detection heads

  • YOLOv5 detection head,
  • Decoupled Head of YOLOX,
  • More concise and efficient Decoupled Head of YOLOv6,
  • Adaptive Spatial Feature Fusion ASFF Detection Head,
  • YOLOv7 IAuxDetect Head, IDetect Head, etc.;

🚀 Support more plug-and-play attention mechanisms

  • Plug and play attention mechanism in any part of the network, such as SE, CBAM, CA, GAM, ECA... and many other mainstream attention mechanisms Details

🚀 Support more IoU loss functions

  • CIoU, DIoU, GIoU, EIoU, SIoU, alpha IOU and other loss functions; Details

🚀 Support more NMS

  • NMS, Merge-NMS, DIoU-NMS, Soft-NMS, etc.; Details

🚀 Support more data enhancements

  • Mosaic、Copy paste、Random affine(Rotation, Scale, Translation and Shear)、MixUp、Augment HSV(Hue, Saturation, Value、Random horizontal flip

🚀 Support more Loss

  • ComputeLoss、Computev6Loss、ComputeXLoss、ComputeLossAuxOTA(v7)、ComputeLossOTA(v7); Details

🚀 Built-in multiple network model modular components

  • Conv, GhostConv, Bottleneck, GhostBottleneck, SPP, SPPF, DWConv, MixConv2d, Focus, CrossConv, BottleneckCSP, CBAM, ResBlock_CBAM, CoordAtt, CrossConv, C3, CTR3, Involution, C3SPP, C3Ghost, CARAFE, nn.ConvTranspose2d, DWConvTranspose2d, C3x, SPPCSPC, GhostSPPCSPC, BottleneckCSPA, BottleneckCSPB, ConvSig, BottleneckCSPC, RepConv, RepConv_OREPA, RepBottleneck, RepBottleneckCSPA, RepBottleneckCSPB, RepBottleneckCSPC, Res, ResCSPA, ResCSPB, ResCSPC, RepRes, RepResCSPA, RepResCSPB, RepResCSPC, ResX, ResXCSPA, ResXCSPB, ResXCSPC, RepResX, RepResXCSPA, RepResXCSPB, RepResXCSPC, Ghost, GhostCSPA, GhostCSPB, GhostCSPC, SwinTransformerBlock, STCSPA, STCSPB, STCSPC, SwinTransformer2Block, ST2CSPA, ST2CSPB, ST2CSPC, conv_bn_relu_maxpool, Shuffle_Block, RepVGGBlock, CBH, LC_Block, Dense, DWConvblock, BottleneckCSP2, DWT, BottleneckCSP2SAM, VoVCSP等 Detailed code ./models/common.py file search 🔍👉corresponding module link

  • 👉Network Model Structure Diagram

The above component modules use a unified model code framework, unified task form, and unified application method. Module componentization🚀 can help users customize and quickly combine Backbone, Neck, Head, diversify network models, and help scientific research improve detection algorithms. Build stronger network models.

Built-in network model configuration support ✨

🚀 A summary of yaml configuration files including YOLOv3, YOLOv4, Scaled_YOLOv4, YOLOv5, YOLOv6, YOLOv7, YOLOX, YOLOR, Transformer, PicoDet, YOLOv5-Lite, PPYOLO, TPH-YOLOv5, other various improved network structures and other algorithm models

Multiple built-in yaml network model configurations (recommended 🌟🌟🌟🌟🌟)

🚀Users can improve the network by themselves

Usage🍉

About the code. Follow the design principle of YOLOv5.
The usage is consistent with the YOLOv5 framework.

Installation

Clone the repository and install the requirements.txt in the Python>=3.7.0 environment, including PyTorch>=1.7.

$ git clone https://github.com/Him-wen/YOLOC.git  # Clone
$ cd YOLOC
$ pip install -r requirements.txt  # Install

Train

$ python train.py --data coco128.yaml --cfg configs/yolov5/yolov5s.yaml #Default is yolo

Switching between different model training

The training and inference of different models can be switched by the parameter command --mode.

$ python train.py --mode yolo # yolov3, yolov4, yolor, scaled_yolov4, PicoDet, ppyolo models and related improved models
$ python train.py --mode yolox # YOLOX model and related improved models
$ python train.py --mode yolov6 # YOLOv6 model and related improved models
$ python train.py --mode yolov7 # YOLOv7 model and related improved models

Inference

detect.py runs inference on a variety of sources, saving results to runs/detect.

$ python detect.py --source 0  # webcam
                          img.jpg  # image
                          vid.mp4  # video
                          path/  # directory
                          path/*.jpg  # glob

Ensemble

If you inference dataset with different models, then you can ensemble the result by weighted boxes fusion using wbf.py.
You should set img path and txt path in wbf.py.

$ python wbf.py

Benchmark

Tutorials✨

Consistent with the YOLOv5 framework

Program support✨

In the future, we will continue to build and improve the YOLOC ecosystem Improve and integrate more YOLO series models, continue to combine different modules to build more different network models Horizontal expansion and introduction of associative techniques such as semi-supervised, self-supervised learning, etc. Follow up: YOLO-mask & YOLO-pose


Acknowledgement

Expand

Thanks to their great works.

darknet 、yolov3 、yolov4 、scaled_yolov4 、yolov5 、yolov6 、yolov7 、yolor 、yolox 、yolou 、attention 、yolov5_research 、yolov5-lite 、yolov5-mc、tph-yolov5

Statement

Expand
  • The content of this site is only for sharing notes. If some content is infringing, please sending email.

  • If you have any question, please discuss with me by sending email to [email protected].

About

🚀🚀🚀YOLOC is Combining different modules to build an different Object detection model.Including YOLOv5、YOLOv6、YOLOv7、YOLOX、YOLOv3、YOLOv4、Scaled_YOLOv4、YOLOR、YOLOv5-Lite、transformer、PPYOLO、TPH、PicoDet...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.5%
  • Shell 1.1%
  • Dockerfile 0.4%