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đ
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
đ 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
đSupport Weighted-Boxes-Fusion(WBF)
đ 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
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.
đ 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
About the code. Follow the design principle of YOLOv5.
The usage is consistent with the YOLOv5 framework.
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
$ python train.py --data coco128.yaml --cfg configs/yolov5/yolov5s.yaml #Default is yolo
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
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
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
Consistent with the YOLOv5 framework
- Train Custom Data đ RECOMMENDED
- Tips for Best Training Results âď¸ RECOMMENDED
- Weights & Biases Logging đ NEW
- Roboflow for Datasets, Labeling, and Active Learning đ NEW
- Multi-GPU Training
- PyTorch Hub â NEW
- TFLite, ONNX, CoreML, TensorRT Export đ
- Test-Time Augmentation (TTA)
- Model Ensembling
- Model Pruning/Sparsity
- Hyperparameter Evolution
- Transfer Learning with Frozen Layers â NEW
- Architecture Summary â NEW
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
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
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 himwen@126.com.