├── .DS_Store ├── .gitignore ├── LICENSE ├── README.md ├── __pycache__ └── val.cpython-38.pyc ├── configs ├── .DS_Store ├── scaled_yolov4 │ ├── yolov4-p5.yaml │ ├── yolov4-p6.yaml │ └── yolov4-p7.yaml ├── yolo_combining │ ├── .DS_Store │ ├── Paradigm │ │ └── ExquisiteNetV2 │ │ │ ├── block.py │ │ │ ├── exquisite.yaml │ │ │ └── parse.py │ ├── hub │ │ ├── PicoDet-l.yaml │ │ ├── PicoDet-m.yaml │ │ ├── PicoDet-s.yaml │ │ ├── PicoDet-x.yaml │ │ ├── anchors.yaml │ │ ├── gcnet.yaml │ │ ├── repyolov5s.yaml │ │ ├── yolov5-efficient-lite0.yaml │ │ ├── yolov5-mbv3l.yaml │ │ ├── yolov5-mbv3s.yaml │ │ ├── yolov5-p2.yaml │ │ ├── yolov5-repvgg_A1.yaml │ │ ├── yolov5_repvgg_prune.yaml │ │ ├── yolov5ss-0.5-p4.yaml │ │ ├── yolov5ss-0.5.yaml │ │ └── yolov5ss-dw.yaml │ ├── lightModels │ │ ├── yolov5lEfficientLite.yaml │ │ ├── yolov5lGhost.yaml │ │ ├── yolov5lMobilenetv3Small.yaml │ │ ├── yolov5lPP-LC.yaml │ │ └── yolov5lShffule.yaml │ ├── research │ │ ├── yolov5_SwinV2.yaml │ │ ├── yolov5_all_swin2.yaml │ │ ├── yolov5l_smallob.yaml │ │ ├── yolov5s-carafe.yaml │ │ ├── yolov5s_asff.yaml │ │ ├── yolov5s_bifpn.yaml │ │ ├── yolov5s_bot.yaml │ │ ├── yolov5s_coordAtt.yaml │ │ ├── yolov5s_decoupled.yaml │ │ ├── yolov5s_gam.yaml │ │ ├── yolov5s_involution.yaml │ │ ├── yolov5s_swinv2_head.yaml │ │ └── yolov5x_bifpn.yaml │ ├── v5Lite-c.yaml │ ├── v5Lite-e.yaml │ ├── v5Lite-g.yaml │ ├── v5Lite-s.yaml │ ├── yolov5s_cbam.yaml │ └── yolox-lite │ │ ├── yoloxnano_Lite_e.yaml │ │ ├── yoloxnano_Lite_s.yaml │ │ ├── yoloxs_Lite_c.yaml │ │ ├── yoloxs_Lite_e.yaml │ │ ├── yoloxs_Lite_g.yaml │ │ └── yoloxs_Lite_s.yaml ├── yolor │ ├── r50-csp.yaml │ ├── x50-csp.yaml │ ├── yolor-csp-x.yaml │ ├── yolor-csp.yaml │ ├── yolor-d6.yaml │ ├── yolor-e6.yaml │ ├── yolor-p6.yaml │ ├── yolor-ssss-dwt.yaml │ ├── yolor-ssss-s2d.yaml │ └── yolor-w6.yaml ├── yolov3 │ ├── yolov3-spp.yaml │ ├── yolov3-tiny.yaml │ └── yolov3.yaml ├── yolov4 │ ├── .DS_Store │ ├── csp-p6-mish.yaml │ ├── csp-p7-mish.yaml │ ├── yolov4-csp.yaml │ ├── yolov4-tiny.yaml │ ├── yolov4l-mish.yaml │ ├── yolov4m-mish.yaml │ ├── yolov4s-mish.yaml │ └── yolov4x-mish.yaml ├── yolov5 │ ├── .DS_Store │ ├── hub │ │ ├── anchors.yaml │ │ ├── yolov5-bifpn.yaml │ │ ├── yolov5-fpn.yaml │ │ ├── yolov5-p2.yaml │ │ ├── yolov5-p6.yaml │ │ ├── yolov5-p7.yaml │ │ ├── yolov5-panet.yaml │ │ ├── yolov5l6.yaml │ │ ├── yolov5m6.yaml │ │ ├── yolov5n6.yaml │ │ ├── yolov5s-ghost.yaml │ │ ├── yolov5s-transformer.yaml │ │ ├── yolov5s6.yaml │ │ └── yolov5x6.yaml │ ├── yolov5l.yaml │ ├── yolov5m.yaml │ ├── yolov5n.yaml │ ├── yolov5s.yaml │ └── yolov5x.yaml ├── yolov6 │ ├── yolov6l.yaml │ ├── yolov6m.yaml │ ├── yolov6n.yaml │ ├── yolov6s.yaml │ └── yolov6x.yaml ├── yolov7 │ ├── .DS_Store │ ├── v7_cfg │ │ ├── .DS_Store │ │ ├── deploy │ │ │ ├── yolov7-d6.yaml │ │ │ ├── yolov7-e6.yaml │ │ │ ├── yolov7-e6e.yaml │ │ │ ├── yolov7-tiny-silu.yaml │ │ │ ├── yolov7-tiny.yaml │ │ │ ├── yolov7-w6.yaml │ │ │ ├── yolov7.yaml │ │ │ └── yolov7x.yaml │ │ └── training │ │ │ ├── yolov7.yaml │ │ │ ├── yolov7d6.yaml │ │ │ ├── yolov7e6.yaml │ │ │ ├── yolov7e6e.yaml │ │ │ ├── yolov7w6.yaml │ │ │ └── yolov7x.yaml │ ├── yolov7.yaml │ ├── yolov7d6.yaml │ ├── yolov7e6.yaml │ ├── yolov7e6e.yaml │ ├── yolov7w6.yaml │ └── yolov7x.yaml └── yolox │ ├── yoloxl.yaml │ ├── yoloxm.yaml │ ├── yoloxn.yaml │ ├── yoloxs.yaml │ ├── yoloxt.yaml │ ├── yoloxx.yaml │ └── yoloxxs.yaml ├── data ├── .DS_Store ├── .ipynb_checkpoints │ └── coco128-checkpoint.yaml ├── Argoverse.yaml ├── GlobalWheat2020.yaml ├── Objects365.yaml ├── SKU-110K.yaml ├── VisDrone.yaml ├── coco.yaml ├── coco128.yaml ├── hyps │ ├── hyp.Objects365.yaml │ ├── hyp.VOC.yaml │ ├── hyp.finetune.yaml │ ├── hyp.finetune_objects365.yaml │ ├── hyp.scaratch-v7.yaml │ ├── hyp.scratch-high.yaml │ ├── hyp.scratch-low.yaml │ ├── hyp.scratch-med.yaml │ ├── hyp.scratch-p6.yaml │ └── hyp.scratch.yaml ├── images │ ├── bus.jpg │ └── zidane.jpg ├── scripts │ ├── download_weights.sh │ ├── get_coco.sh │ ├── get_coco128.sh │ └── get_voc.sh ├── voc.yaml └── xView.yaml ├── detect.py ├── docs ├── .DS_Store ├── attention_model │ ├── __init__.py │ ├── attention │ │ ├── A2Atttention.py │ │ ├── AFT.py │ │ ├── BAM.py │ │ ├── CBAM.py │ │ ├── CoAtNet.py │ │ ├── CoTAttention.py │ │ ├── CoordAttention.py │ │ ├── DANet.py │ │ ├── ECAAttention.py │ │ ├── EMSA.py │ │ ├── ExternalAttention.py │ │ ├── HaloAttention.py │ │ ├── MUSEAttention.py │ │ ├── MobileViTAttention.py │ │ ├── OutlookAttention.py │ │ ├── PSA.py │ │ ├── ParNetAttention.py │ │ ├── PolarizedSelfAttention.py │ │ ├── ResidualAttention.py │ │ ├── S2Attention.py │ │ ├── SEAttention.py │ │ ├── SGE.py │ │ ├── SKAttention.py │ │ ├── SelfAttention.py │ │ ├── ShuffleAttention.py │ │ ├── SimplifiedSelfAttention.py │ │ ├── TripletAttention.py │ │ ├── UFOAttention.py │ │ ├── ViP.py │ │ └── gfnet.py │ ├── backbone │ │ ├── ConvMixer.py │ │ ├── MobileViT.py │ │ ├── resnet.py │ │ └── resnext.py │ ├── conv │ │ ├── CondConv.py │ │ ├── DepthwiseSeparableConvolution.py │ │ ├── DynamicConv.py │ │ ├── Involution.py │ │ └── MBConv.py │ ├── img │ │ ├── A2.png │ │ ├── AFT.jpg │ │ ├── BAM.png │ │ ├── CBAM1.png │ │ ├── CBAM2.png │ │ ├── CoT.png │ │ ├── CondConv.png │ │ ├── ConvMixer.png │ │ ├── CoordAttention.png │ │ ├── DepthwiseSeparableConv.png │ │ ├── DynamicConv.png │ │ ├── ECA.png │ │ ├── EMSA.png │ │ ├── External_Attention.png │ │ ├── GFNet.jpg │ │ ├── HaloNet.png │ │ ├── Involution.png │ │ ├── MBConv.jpg │ │ ├── MUSE.png │ │ ├── MobileViTAttention.png │ │ ├── OutlookAttention.png │ │ ├── ParNet.png │ │ ├── PoSA.png │ │ ├── ResAtt.png │ │ ├── S2Attention.png │ │ ├── SA.png │ │ ├── SE.png │ │ ├── SGE.png │ │ ├── SK.png │ │ ├── SSA.png │ │ ├── ShuffleAttention.jpg │ │ ├── UFO.png │ │ ├── ViP.png │ │ ├── acnet.png │ │ ├── danet.png │ │ ├── ddb.png │ │ ├── gMLP.jpg │ │ ├── mlpmixer.png │ │ ├── mobileViT.jpg │ │ ├── psa.png │ │ ├── repmlp.png │ │ ├── repvgg.png │ │ ├── resmlp.png │ │ ├── resnet.png │ │ ├── resnet2.jpg │ │ ├── resnext.png │ │ ├── sMLP.jpg │ │ └── triplet.png │ ├── mlp │ │ ├── g_mlp.py │ │ ├── mlp_mixer.py │ │ ├── repmlp.py │ │ ├── resmlp.py │ │ └── sMLP_block.py │ └── rep │ │ ├── acnet.py │ │ ├── ddb.py │ │ └── repvgg.py ├── image │ ├── .DS_Store │ ├── Activation.png │ ├── logo1.png │ ├── ppyolo2_model.png │ ├── ppyolo_model.png │ ├── ppyoloe_model.png │ ├── scaled_yolov4.png │ ├── yolor_model.jpg │ ├── yolov3_model.jpg │ ├── yolov4_model.jpg │ ├── yolov4_model.png │ ├── yolov5_model.jpg │ ├── yolov5_model2.png │ ├── yolov6_model.jpg │ ├── yolov7_model.jpg │ └── yolox_model.png └── model.md ├── export.py ├── export_onnx_nms.py ├── image ├── bus.jpg └── zidane.jpg ├── models ├── .DS_Store ├── __init__.py ├── attention │ ├── .DS_Store │ ├── CA.py │ └── CBAM.py ├── common.py ├── experimental.py ├── yolo.py ├── yolor.py ├── yolov3.py ├── yolov4.py ├── yolov5.py ├── yolov6.py ├── yolov7.py └── yolox.py ├── requirements.txt ├── train.py ├── utils ├── .DS_Store ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-37.pyc │ ├── __init__.cpython-38.pyc │ ├── activations.cpython-37.pyc │ ├── add_nms.cpython-37.pyc │ ├── augmentations.cpython-37.pyc │ ├── augmentations.cpython-38.pyc │ ├── autoanchor.cpython-37.pyc │ ├── autoanchor.cpython-38.pyc │ ├── autobatch.cpython-37.pyc │ ├── autobatch.cpython-38.pyc │ ├── callbacks.cpython-37.pyc │ ├── callbacks.cpython-38.pyc │ ├── dataloaders.cpython-37.pyc │ ├── dataloaders.cpython-38.pyc │ ├── downloads.cpython-37.pyc │ ├── downloads.cpython-38.pyc │ ├── general.cpython-37.pyc │ ├── general.cpython-38.pyc │ ├── loss.cpython-37.pyc │ ├── loss.cpython-38.pyc │ ├── metrics.cpython-37.pyc │ ├── metrics.cpython-38.pyc │ ├── plots.cpython-37.pyc │ ├── plots.cpython-38.pyc │ ├── torch_utils.cpython-37.pyc │ └── torch_utils.cpython-38.pyc ├── activations.py ├── add_nms.py ├── augmentations.py ├── autoanchor.py ├── autobatch.py ├── aws │ ├── __init__.py │ ├── mime.sh │ ├── resume.py │ └── userdata.sh ├── benchmarks.py ├── callbacks.py ├── dataloaders.py ├── docker │ ├── .dockerignore │ ├── Dockerfile │ ├── Dockerfile-arm64 │ └── Dockerfile-cpu ├── downloads.py ├── flask_rest_api │ ├── README.md │ ├── example_request.py │ └── restapi.py ├── general.py ├── google_app_engine │ ├── Dockerfile │ ├── additional_requirements.txt │ └── app.yaml ├── google_utils.py ├── loggers │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ └── __init__.cpython-38.pyc │ └── wandb │ │ ├── README.md │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── wandb_utils.cpython-37.pyc │ │ └── wandb_utils.cpython-38.pyc │ │ ├── log_dataset.py │ │ ├── sweep.py │ │ ├── sweep.yaml │ │ └── wandb_utils.py ├── loss.py ├── matrix_nms.py ├── metrics.py ├── plots.py └── torch_utils.py ├── val.py └── weights └── yolov5s.pt /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Himwen_ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /__pycache__/val.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/__pycache__/val.cpython-38.pyc -------------------------------------------------------------------------------- /configs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/configs/.DS_Store -------------------------------------------------------------------------------- /configs/scaled_yolov4/yolov4-p5.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [13,17, 31,25, 24,51, 61,45] # P3/8 9 | - [48,102, 119,96, 97,189, 217,184] # P4/16 10 | - [171,384, 324,451, 616,618, 800,800] # P5/32 11 | 12 | # csp-p5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, BottleneckCSP, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 3, BottleneckCSP, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 15, BottleneckCSP, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 15, BottleneckCSP, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 7, BottleneckCSP, [1024]], # 10 26 | ] 27 | 28 | # yolov4-p5 head 29 | # na = len(anchors[0]) 30 | head: 31 | [[-1, 1, SPPCSP, [512]], # 11 32 | [-1, 1, Conv, [256, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [8, 1, Conv, [256, 1, 1]], # route backbone P4 35 | [[-1, -2], 1, Concat, [1]], 36 | [-1, 3, BottleneckCSP2, [256]], # 16 37 | [-1, 1, Conv, [128, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [6, 1, Conv, [128, 1, 1]], # route backbone P3 40 | [[-1, -2], 1, Concat, [1]], 41 | [-1, 3, BottleneckCSP2, [128]], # 21 42 | [-1, 1, Conv, [256, 3, 1]], 43 | [-2, 1, Conv, [256, 3, 2]], 44 | [[-1, 16], 1, Concat, [1]], # cat 45 | [-1, 3, BottleneckCSP2, [256]], # 25 46 | [-1, 1, Conv, [512, 3, 1]], 47 | [-2, 1, Conv, [512, 3, 2]], 48 | [[-1, 11], 1, Concat, [1]], # cat 49 | [-1, 3, BottleneckCSP2, [512]], # 29 50 | [-1, 1, Conv, [1024, 3, 1]], 51 | 52 | [[22,26,30], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 53 | ] 54 | -------------------------------------------------------------------------------- /configs/yolo_combining/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/configs/yolo_combining/.DS_Store -------------------------------------------------------------------------------- /configs/yolo_combining/Paradigm/ExquisiteNetV2/exquisite.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.5 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, FCT, [3,12]], # 0-P1/2 16 | [-1, 1, DFSEBV2, [12,3,True]], # 1-P2/4 17 | [-1, 1, EVE, [12,48]], 18 | [-1, 1, DFSEBV2, [48,3,True]], # 3-P3/8 19 | [-1, 1, ME, [48,96]], 20 | [-1, 1, DFSEBV2, [96,3,True]], # 5-P4/16 21 | [-1, 1, ME, [96,192]], 22 | [-1, 1, DFSEBV2, [192,3,True]], # 7-P5/32 23 | [-1, 1, ME, [192,384]], 24 | [-1, 1, DFSEBV2, [384,3,True]], # 9 25 | [-1, 1, DW, [384,3]], 26 | ] 27 | 28 | # YOLOv5 head 29 | head: 30 | [[-1, 1, Conv, [192, 1, 1]], 31 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 32 | #[[-1, 7], 1, Concat, [1]], # cat backbone P4 33 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 34 | [-1, 3, C3, [192, False]], # 13 35 | 36 | [-1, 1, Conv, [96, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | #[[-1, 5], 1, Concat, [1]], # cat backbone P3 39 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 40 | [-1, 3, C3, [96, False]], # 17 (P3/8-small) 41 | 42 | [-1, 1, Conv, [96, 3, 2]], 43 | [[-1, 15], 1, Concat, [1]], # cat head P4 44 | [-1, 3, C3, [192, False]], # 20 (P4/16-medium) 45 | 46 | [-1, 1, Conv, [192, 3, 2]], 47 | [[-1, 11], 1, Concat, [1]], # cat head P5 48 | [-1, 3, C3, [384, False]], # 23 (P5/32-large) 49 | 50 | [[18, 21, 24], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 51 | ] 52 | -------------------------------------------------------------------------------- /configs/yolo_combining/Paradigm/ExquisiteNetV2/parse.py: -------------------------------------------------------------------------------- 1 | # 代码 加入到common.py 2 | # elif m in [DW, DFSEBV2]: 3 | # c1, c2 = ch[f], args[0] 4 | # args = [c1, *args[1:]] 5 | # elif m in [FCT, EVE, ME]: 6 | # c1, c2 = ch[f], args[1] 7 | # args = [c1, *args[1:]] -------------------------------------------------------------------------------- /configs/yolo_combining/hub/PicoDet-l.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.67 # model depth multiple 4 | width_multiple: 1.00 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 4 # auto-anchor 4 anchors per P output layer 8 | 9 | # ESNet 10 | backbone: 11 | # [from, number, module, args] 12 | [ [ -1, 1, CBH, [ 48, 3, 2 ] ], # 0-P2/4 13 | [ -1, 1, ES_Bottleneck, [ 96, 2 ] ], # 1-P3/8 14 | [ -1, 3, ES_Bottleneck, [ 96, 1 ] ], # 2 15 | [ -1, 1, ES_Bottleneck, [ 192, 2 ] ], # 3-P5/16 16 | [ -1, 7, ES_Bottleneck, [ 192, 1 ] ], # 4 17 | [ -1, 1, ES_Bottleneck, [ 384, 2 ] ], # 5-P7/32 18 | [ -1, 3, ES_Bottleneck, [ 384, 1 ] ], # 6 19 | ] 20 | 21 | # CSP-PAN 22 | head: 23 | [ [ -1, 1, Conv, [ 192, 1, 1 ] ], # 7 24 | [ [ -1, 6 ], 1, Concat, [ 1 ] ], # cat backbone P4 25 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 9 (P3/8-small) 26 | 27 | [ -1, 1, Conv, [ 192, 1, 1 ] ], # 10 28 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 29 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P4 30 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 13 31 | 32 | [ -1, 1, Conv, [ 192, 1, 1 ] ], # 14 33 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 34 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P3 35 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 17 (P3/8-small) 36 | 37 | [-1, 1, DWConvblock, [ 192, 5, 2 ]], # 18 38 | [ [ -1, 14 ], 1, Concat, [ 1 ] ], # cat head P4 39 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 20 (P4/16-medium) 40 | 41 | [ -1, 1, DWConvblock, [ 192, 5, 2 ] ], 42 | [ [ -1, 10 ], 1, Concat, [ 1 ] ], # cat head P5 43 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 23 (P5/32-large) 44 | 45 | [ [ -1, 7 ], 1, Concat, [ 1 ] ], # cat head P6 46 | [ -1, 1, DWConvblock, [ 192, 5, 2 ] ], # 26 (P5/32-large) 47 | 48 | [ [ 17, 20, 23, 25 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5, P6) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/PicoDet-m.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.67 # model depth multiple 4 | width_multiple: 0.75 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 4 # auto-anchor 4 anchors per P output layer 8 | 9 | # ESNet 10 | backbone: 11 | # [from, number, module, args] 12 | [ [ -1, 1, CBH, [ 48, 3, 2 ] ], # 0-P2/4 13 | [ -1, 1, ES_Bottleneck, [ 96, 2 ] ], # 1-P3/8 14 | [ -1, 3, ES_Bottleneck, [ 96, 1 ] ], # 2 15 | [ -1, 1, ES_Bottleneck, [ 192, 2 ] ], # 3-P5/16 16 | [ -1, 7, ES_Bottleneck, [ 192, 1 ] ], # 4 17 | [ -1, 1, ES_Bottleneck, [ 384, 2 ] ], # 5-P7/32 18 | [ -1, 3, ES_Bottleneck, [ 384, 1 ] ], # 6 19 | ] 20 | 21 | # CSP-PAN 22 | head: 23 | [ [ -1, 1, Conv, [ 192, 1, 1 ] ], # 7 24 | [ [ -1, 6 ], 1, Concat, [ 1 ] ], # cat backbone P4 25 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 9 (P3/8-small) 26 | 27 | [ -1, 1, Conv, [ 192, 1, 1 ] ], # 10 28 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 29 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P4 30 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 13 31 | 32 | [ -1, 1, Conv, [ 192, 1, 1 ] ], # 14 33 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 34 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P3 35 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 17 (P3/8-small) 36 | 37 | [-1, 1, DWConvblock, [ 192, 5, 2 ]], # 18 38 | [ [ -1, 14 ], 1, Concat, [ 1 ] ], # cat head P4 39 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 20 (P4/16-medium) 40 | 41 | [ -1, 1, DWConvblock, [ 192, 5, 2 ] ], 42 | [ [ -1, 10 ], 1, Concat, [ 1 ] ], # cat head P5 43 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 23 (P5/32-large) 44 | 45 | [ [ -1, 7 ], 1, Concat, [ 1 ] ], # cat head P6 46 | [ -1, 1, DWConvblock, [ 192, 5, 2 ] ], # 26 (P5/32-large) 47 | 48 | [ [ 17, 20, 23, 25 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5, P6) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/PicoDet-s.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.67 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 4 # auto-anchor 4 anchors per P output layer 8 | 9 | # ESNet 10 | backbone: 11 | # [from, number, module, args] 12 | [ [ -1, 1, CBH, [ 48, 3, 2 ] ], # 0-P2/4 13 | [ -1, 1, ES_Bottleneck, [ 96, 2 ] ], # 1-P3/8 14 | [ -1, 3, ES_Bottleneck, [ 96, 1 ] ], # 2 15 | [ -1, 1, ES_Bottleneck, [ 192, 2 ] ], # 3-P5/16 16 | [ -1, 7, ES_Bottleneck, [ 192, 1 ] ], # 4 17 | [ -1, 1, ES_Bottleneck, [ 384, 2 ] ], # 5-P7/32 18 | [ -1, 3, ES_Bottleneck, [ 384, 1 ] ], # 6 19 | ] 20 | 21 | # CSP-PAN 22 | head: 23 | [ [ -1, 1, Conv, [ 192, 1, 1 ] ], # 7 24 | [ [ -1, 6 ], 1, Concat, [ 1 ] ], # cat backbone P4 25 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 9 (P3/8-small) 26 | 27 | [ -1, 1, Conv, [ 192, 1, 1 ] ], # 10 28 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 29 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P4 30 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 13 31 | 32 | [ -1, 1, Conv, [ 192, 1, 1 ] ], # 14 33 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 34 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P3 35 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 17 (P3/8-small) 36 | 37 | [-1, 1, DWConvblock, [ 192, 5, 2 ]], # 18 38 | [ [ -1, 14 ], 1, Concat, [ 1 ] ], # cat head P4 39 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 20 (P4/16-medium) 40 | 41 | [ -1, 1, DWConvblock, [ 192, 5, 2 ] ], 42 | [ [ -1, 10 ], 1, Concat, [ 1 ] ], # cat head P5 43 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 23 (P5/32-large) 44 | 45 | [ [ -1, 7 ], 1, ADD, [ 1 ] ], # cat head P6 46 | [ -1, 1, DWConvblock, [ 192, 5, 2 ] ], # 26 (P5/32-large) 47 | 48 | [ [ 17, 20, 23, 25 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5, P6) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/PicoDet-x.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.00 # model depth multiple 4 | width_multiple: 1.00 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 4 # auto-anchor 4 anchors per P output layer 8 | 9 | # ESNet 10 | backbone: 11 | # [from, number, module, args] 12 | [ [ -1, 1, CBH, [ 48, 3, 2 ] ], # 0-P2/4 13 | [ -1, 1, ES_Bottleneck, [ 96, 2 ] ], # 1-P3/8 14 | [ -1, 3, ES_Bottleneck, [ 96, 1 ] ], # 2 15 | [ -1, 1, ES_Bottleneck, [ 192, 2 ] ], # 3-P5/16 16 | [ -1, 7, ES_Bottleneck, [ 192, 1 ] ], # 4 17 | [ -1, 1, ES_Bottleneck, [ 384, 2 ] ], # 5-P7/32 18 | [ -1, 3, ES_Bottleneck, [ 384, 1 ] ], # 6 19 | ] 20 | 21 | # CSP-PAN 22 | head: 23 | [ [ -1, 1, Conv, [ 192, 1, 1 ] ], # 7 24 | [ [ -1, 6 ], 1, Concat, [ 1 ] ], # cat backbone P4 25 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 9 (P3/8-small) 26 | 27 | [ -1, 1, Conv, [ 192, 1, 1 ] ], # 10 28 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 29 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P4 30 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 13 31 | 32 | [ -1, 1, Conv, [ 192, 1, 1 ] ], # 14 33 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 34 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P3 35 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 17 (P3/8-small) 36 | 37 | [-1, 1, DWConvblock, [ 192, 5, 2 ]], # 18 38 | [ [ -1, 14 ], 1, Concat, [ 1 ] ], # cat head P4 39 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 20 (P4/16-medium) 40 | 41 | [ -1, 1, DWConvblock, [ 192, 5, 2 ] ], 42 | [ [ -1, 10 ], 1, Concat, [ 1 ] ], # cat head P5 43 | [ -1, 1, BottleneckCSP, [ 192, False ] ], # 23 (P5/32-large) 44 | 45 | [ [ -1, 7 ], 1, Concat, [ 1 ] ], # cat head P6 46 | [ -1, 1, DWConvblock, [ 192, 5, 2 ] ], # 26 (P5/32-large) 47 | 48 | [ [ 17, 20, 23, 25 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5, P6) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/gcnet.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3_GC, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3_GC, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3_GC, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/repyolov5s.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1 # model depth multiple 4 | width_multiple: 1 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Focus, [32, 3]], # 0-P1/2 16 | [-1, 1, RepVGGBlock, [64, 3, 2]], # 1-P2/4 17 | [-1, 1, C3, [64]], 18 | [-1, 1, RepVGGBlock, [128, 3, 2]], # 3-P3/8 19 | [-1, 3, C3, [128]], 20 | [-1, 1, RepVGGBlock, [256, 3, 2]], # 5-P4/16 21 | [-1, 3, C3, [256]], 22 | [-1, 1, RepVGGBlock, [512, 3, 2]], # 7-P4/16 23 | [-1, 1, SPP, [512, [5, 9, 13]]], 24 | [-1, 1, C3, [512, False]], # 9 25 | ] 26 | 27 | # YOLOv5 head 28 | head: 29 | [[-1, 1, Conv, [256, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 1, C3, [256, False]], # 13 33 | 34 | [-1, 1, Conv, [128, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 1, C3, [128, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, RepVGGBlock, [128, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 1, C3, [256, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, RepVGGBlock, [256, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 1, C3, [512, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/yolov5-efficient-lite0.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # custom backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [ [ -1, 1, stem, [ 16 ] ], # 0-P2/4 16 | [ -1, 1, MBConvBlock, [ 16, 32, 3, 1 ] ], # 1-P3/8 17 | [ -1, 3, MBConvBlock, [ 16, 24, 3, 2 ] ], # 2 18 | [ -1, 1, MBConvBlock, [ 24, 40, 3, 2 ] ], # 3-P4/16 19 | [ -1, 7, MBConvBlock, [ 40, 80, 3, 2 ] ], # 4 20 | [ -1, 1, MBConvBlock, [ 80, 112, 3, 1 ] ], # 5-P5/32 21 | [ -1, 3, MBConvBlock, [ 112, 192, 3, 2 ] ], # 6 22 | [ -1, 3, MBConvBlock, [ 192, 320, 3, 1 ] ], # 7 23 | ] 24 | 25 | # v5Lite-s head 26 | head: 27 | [[-1, 1, Conv, [256, 1, 1]], 28 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 29 | [[-1, 5], 1, Concat, [1]], # cat backbone P4 30 | [-1, 1, C3, [256, False]], # 11 31 | 32 | [-1, 1, Conv, [128, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 3], 1, Concat, [1]], # cat backbone P3 35 | [-1, 1, C3, [128, False]], # 15 (P3/8-small) 36 | 37 | [-1, 1, Conv, [128, 3, 2]], 38 | [[-1, 12], 1, Concat, [1]], # cat head P4 39 | [-1, 1, C3, [256, False]], # 18 (P4/16-medium) 40 | 41 | [-1, 1, Conv, [256, 3, 2]], 42 | [[-1, 8], 1, Concat, [1]], # cat head P5 43 | [-1, 1, C3, [512, False]], # 21 (P5/32-large) 44 | 45 | [[15, 18, 21], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 46 | ] -------------------------------------------------------------------------------- /configs/yolo_combining/hub/yolov5-p2.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 3 8 | 9 | # YOLOv5 backbone 10 | backbone: 11 | # [from, number, module, args] 12 | [ [ -1, 1, Focus, [ 64, 3 ] ], # 0-P1/2 13 | [ -1, 1, Conv, [ 128, 3, 2 ] ], # 1-P2/4 14 | [ -1, 3, C3, [ 128 ] ], 15 | [ -1, 1, Conv, [ 256, 3, 2 ] ], # 3-P3/8 16 | [ -1, 9, C3, [ 256 ] ], 17 | [ -1, 1, Conv, [ 512, 3, 2 ] ], # 5-P4/16 18 | [ -1, 9, C3, [ 512 ] ], 19 | [ -1, 1, Conv, [ 1024, 3, 2 ] ], # 7-P5/32 20 | [ -1, 1, SPP, [ 1024, [ 5, 9, 13 ] ] ], 21 | [ -1, 3, C3, [ 1024, False ] ], # 9 22 | ] 23 | 24 | # YOLOv5 head 25 | head: 26 | [ [ -1, 1, Conv, [ 512, 1, 1 ] ], 27 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 28 | [ [ -1, 6 ], 1, Concat, [ 1 ] ], # cat backbone P4 29 | [ -1, 3, C3, [ 512, False ] ], # 13 30 | 31 | [ -1, 1, Conv, [ 256, 1, 1 ] ], 32 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 33 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P3 34 | [ -1, 3, C3, [ 256, False ] ], # 17 (P3/8-small) 35 | 36 | [ -1, 1, Conv, [ 128, 1, 1 ] ], 37 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 38 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P2 39 | [ -1, 1, C3, [ 128, False ] ], # 21 (P2/4-xsmall) 40 | 41 | [ -1, 1, Conv, [ 128, 3, 2 ] ], 42 | [ [ -1, 18 ], 1, Concat, [ 1 ] ], # cat head P3 43 | [ -1, 3, C3, [ 256, False ] ], # 24 (P3/8-small) 44 | 45 | [ -1, 1, Conv, [ 256, 3, 2 ] ], 46 | [ [ -1, 14 ], 1, Concat, [ 1 ] ], # cat head P4 47 | [ -1, 3, C3, [ 512, False ] ], # 27 (P4/16-medium) 48 | 49 | [ -1, 1, Conv, [ 512, 3, 2 ] ], 50 | [ [ -1, 10 ], 1, Concat, [ 1 ] ], # cat head P5 51 | [ -1, 3, C3, [ 1024, False ] ], # 30 (P5/32-large) 52 | 53 | [ [ 24, 27, 30 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5) 54 | ] 55 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/yolov5-repvgg_A1.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # repvgg backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, RepVGGBlock, [64, 3, 2]], # 0-P1/2 16 | [-1, 1, RepVGGBlock, [64, 3, 2]], # 1-P2/4 17 | [-1, 1, RepVGGBlock, [64, 3, 1]], # 2-P2/4 18 | [-1, 1, RepVGGBlock, [128, 3, 2]], # 3-P3/8 19 | [-1, 3, RepVGGBlock, [128, 3, 1]], 20 | [-1, 1, RepVGGBlock, [256, 3, 2]], # 5-P4/16 21 | [-1, 13, RepVGGBlock, [256, 3, 1]], 22 | [-1, 1, RepVGGBlock, [512, 3, 2]], # 7-P4/16 23 | ] 24 | # YOLOv5 head 25 | head: 26 | [[-1, 1, Conv, [256, 1, 1]], 27 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 28 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 29 | [-1, 1, C3, [256, False]], # 11 30 | 31 | [-1, 1, Conv, [128, 1, 1]], 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 34 | [-1, 1, C3, [128, False]], # 15 (P3/8-small) 35 | 36 | [-1, 1, Conv, [128, 3, 2]], 37 | [[-1, 12], 1, Concat, [1]], # cat head P4 38 | [-1, 1, C3, [256, False]], # 18 (P4/16-medium) 39 | 40 | [-1, 1, Conv, [256, 3, 2]], 41 | [[-1, 8], 1, Concat, [1]], # cat head P5 42 | [-1, 1, C3, [512, False]], # 21 (P5/32-large) 43 | 44 | [[15, 18, 21], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 45 | ] 46 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/yolov5_repvgg_prune.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # repvgg backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, RepVGGBlock, [40, 3, 2]], # 0-P1/2 16 | [-1, 1, RepVGGBlock, [48, 3, 2]], # 1-P2/4 17 | [-1, 1, RepVGGBlock, [40, 3, 1]], # 2-P2/4 18 | [-1, 1, RepVGGBlock, [96, 3, 2]], # 3-P3/8 19 | [-1, 1, RepVGGBlock, [80, 3, 1]], 20 | [-1, 1, RepVGGBlock, [80, 3, 1]], 21 | [-1, 1, RepVGGBlock, [80, 3, 1]], # cat 4 22 | [-1, 1, RepVGGBlock, [192, 3, 2]], # 5-P4/16 23 | [-1, 1, RepVGGBlock, [176, 3, 1]], 24 | [-1, 1, RepVGGBlock, [176, 3, 1]], 25 | [-1, 1, RepVGGBlock, [176, 3, 1]], # CAT 6 26 | [-1, 1, RepVGGBlock, [512, 3, 2]], # 7-P4/16 27 | ] 28 | # YOLOv5 head 29 | head: 30 | [[-1, 1, Conv, [256, 1, 1]], 31 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 32 | [[-1, 10], 1, Concat, [1]], # cat backbone P4 33 | [-1, 2, C3, [256, False]], # 11 34 | 35 | [-1, 1, Conv, [128, 1, 1]], 36 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 37 | [[-1, 6], 1, Concat, [1]], # cat backbone P3 38 | [-1, 2, C3, [128, False]], # 15 (P3/8-small) 39 | 40 | [-1, 1, Conv, [128, 3, 2]], 41 | [[-1, 16], 1, Concat, [1]], # cat head P4 42 | [-1, 2, C3, [128, False]], # 18 (P4/16-medium) 43 | 44 | [-1, 1, Conv, [256, 3, 2]], 45 | [[-1, 12], 1, Concat, [1]], # cat head P5 46 | [-1, 2, C3, [512, False]], # 21 (P5/32-large) 47 | 48 | [[19, 22, 25], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolo_combining/hub/yolov5ss-0.5-p4.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [ 4,5, 8,10, 13,16 ] # P3/8 9 | - [ 23,29, 43,55, 73,105 ] # P4/16 10 | - [ 146,217, 231,300, 335,433 ] # P5/32 11 | 12 | # custom backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [ [ -1, 1, conv_bn_relu_maxpool, [ 24 ] ], # 0-P2/4 16 | [ -1, 1, Shuffle_Block, [ 48, 2 ] ], # 1-P3/8 17 | [ -1, 3, Shuffle_Block, [ 48, 1 ] ], # 2 18 | [ -1, 1, Shuffle_Block, [ 96, 2 ] ], # 3-P4/16 19 | [ -1, 7, Shuffle_Block, [ 96, 1 ] ], # 4 20 | [ -1, 1, Shuffle_Block, [ 192, 2 ] ], # 5-P5/32 21 | [ -1, 3, Shuffle_Block, [ 192, 1 ] ], # 6 22 | ] 23 | 24 | # YOLOv5 head 25 | head: 26 | [ [ -1, 1, Conv, [ 64, 1 ] ], 27 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 28 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P4 29 | [ -1, 1, C3, [ 64, False ] ], # 10 30 | 31 | [ -1, 1, Conv, [ 64, 1, 1 ] ], 32 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 33 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P3 34 | [ -1, 1, C3, [ 64, False ] ], # 14 (P3/8-small) 35 | 36 | [ -1, 1, Conv, [ 64, 3, 2 ] ], 37 | [ [ -1, 11 ], 1, Concat, [ 1 ] ], # cat head P4 38 | [ -1, 1, C3, [ 64, False ] ], # 17 (P4/16-medium) 39 | 40 | [ -1, 1, Conv, [ 64, 3, 2 ] ], 41 | [ [ -1, 7 ], 1, Concat, [ 1 ] ], # cat head P5 42 | [ -1, 1, C3, [ 64, False ] ], # 20 (P5/32-large) 43 | 44 | [ [ 14, 17, 20 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5) 45 | ] -------------------------------------------------------------------------------- /configs/yolo_combining/hub/yolov5ss-0.5.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [11,16, 28,27, 33,74, ] # P3/8 9 | - [ 83,61, 107,162, 297,278 ] # P4/16 10 | 11 | # custom backbone 12 | backbone: 13 | # [from, number, module, args] 14 | [ [ -1, 1, conv_bn_relu_maxpool, [ 24 ] ], # 0-P2/4 15 | [ -1, 1, Shuffle_Block, [ 48, 2 ] ], # 1-P3/8 16 | [ -1, 3, Shuffle_Block, [ 48, 1 ] ], # 2 17 | [ -1, 1, Shuffle_Block, [ 96, 2 ] ], # 3-P4/16 18 | [ -1, 7, Shuffle_Block, [ 96, 1 ] ], # 4 19 | [ -1, 1, Shuffle_Block, [ 192, 2 ] ], # 5-P5/32 20 | [ -1, 3, Shuffle_Block, [ 192, 1 ] ], # 6 21 | ] 22 | 23 | # YOLOv5 head 24 | head: 25 | [ [ -1, 1, Conv, [ 128, 1, 1 ] ], # 7 26 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], # 8 27 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P4 9 28 | [ -1, 1, Light_C3, [ 128, False ] ], # 10 29 | 30 | [ -1, 1, Conv, [ 128, 1, 1 ] ], # 11 31 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], # 12 32 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P3 # 13 33 | [ -1, 1, Light_C3, [ 128, False ] ], # 14 (P3/8-small) 34 | 35 | [ [ 14, 10 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5) 36 | ] -------------------------------------------------------------------------------- /configs/yolo_combining/hub/yolov5ss-dw.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [ 4,5, 8,10, 13,16 ] # P3/8 9 | - [ 23,29, 43,55, 73,105 ] # P4/16 10 | 11 | 12 | # custom backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [ [ -1, 1, conv_bn_relu_maxpool, [ 24 ] ], # 0-P2/4 16 | [ -1, 1, Shuffle_Block, [ 48, 2 ] ], # 1-P3/8 17 | [ -1, 3, Shuffle_Block, [ 48, 1 ] ], # 2 18 | [ -1, 1, Shuffle_Block, [ 96, 2 ] ], # 3-P4/16 19 | [ -1, 7, Shuffle_Block, [ 96, 1 ] ], # 4 20 | [ -1, 1, Shuffle_Block, [ 192, 2 ] ], # 5-P5/32 21 | [ -1, 3, Shuffle_Block, [ 192, 1 ] ], # 6 22 | ] 23 | 24 | # YOLOv5 head 25 | head: 26 | [ [ -1, 1, Conv, [ 192, 1, 1 ] ], 27 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 28 | [ [ -1, 4 ], 1, ADD, [ 1 ] ], # cat backbone P4 29 | [ -1, 1, DWConvblock, [ 192 ] ], # 10 30 | 31 | [ -1, 1, Conv, [ 96, 1, 1 ] ], 32 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 33 | [ [ -1, 2 ], 1, ADD, [ 1 ] ], # cat backbone P3 34 | [ -1, 1, DWConvblock, [ 96 ] ], # 14 35 | 36 | [ [ 14, 10 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5) 37 | ] -------------------------------------------------------------------------------- /configs/yolo_combining/lightModels/yolov5lPP-LC.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # PP-LCNet backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [16, 3, 2, 1]], # 0-P1/2 ch_out, kernel, stride, padding 16 | [-1, 1, DepthSepConv, [32, 3, 1, False]], # 1 17 | 18 | [-1, 1, DepthSepConv, [64, 3, 2, False]], # 2-P2/4 19 | [-1, 1, DepthSepConv, [64, 3, 1, False]], # 3 20 | 21 | [-1, 1, DepthSepConv, [128, 3, 2, False]], # 4-P3/8 22 | [-1, 1, DepthSepConv, [128, 3, 1, False]], # 5 23 | 24 | [-1, 1, DepthSepConv, [256, 3, 2, False]], # 6-P4/16 25 | [-1, 5, DepthSepConv, [256, 5, 1, False]], # 7 26 | 27 | [-1, 1, DepthSepConv, [512, 5, 2, True]], # 8-P5/32 28 | [-1, 1, DepthSepConv, [512, 5, 1, True]], # 9 29 | 30 | [-1, 1, SPPF, [1024, 5]], # 10 31 | ] 32 | 33 | # YOLOv5 v6.0 head 34 | head: 35 | [[-1, 1, Conv, [512, 1, 1]], # 11 36 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 37 | [[-1, 7], 1, Concat, [1]], # cat backbone P4 38 | [-1, 3, C3, [512, False]], # 14 39 | 40 | [-1, 1, Conv, [256, 1, 1]], 41 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 42 | [[-1, 5], 1, Concat, [1]], # cat backbone P3 43 | [-1, 3, C3, [256, False]], # 18 (P3/8-small) 44 | 45 | [-1, 1, Conv, [256, 3, 2]], 46 | [[-1, 14], 1, Concat, [1]], # cat head P4 47 | [-1, 3, C3, [512, False]], # 21 (P4/16-medium) 48 | 49 | [-1, 1, Conv, [512, 3, 2]], 50 | [[-1, 11], 1, Concat, [1]], # cat head P5 51 | [-1, 3, C3, [1024, False]], # 24 (P5/32-large) 52 | 53 | [[18, 21, 24], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 54 | ] 55 | -------------------------------------------------------------------------------- /configs/yolo_combining/lightModels/yolov5lShffule.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # ShuffleNetV2 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv_maxpool, [24]], # 0-P2/4 16 | 17 | [-1, 1, ShuffleNetV2_InvertedResidual, [116, 2]], # 1-P3/8 18 | [-1, 3, ShuffleNetV2_InvertedResidual, [116, 1]], # 2 19 | 20 | [-1, 1, ShuffleNetV2_InvertedResidual, [232, 2]], # 3-P4/16 21 | [-1, 7, ShuffleNetV2_InvertedResidual, [232, 1]], # 4 22 | 23 | [-1, 1, ShuffleNetV2_InvertedResidual, [464, 2]], # 5-P5/32 24 | [-1, 3, ShuffleNetV2_InvertedResidual, [464, 1]], # 6 25 | 26 | [-1, 1, SPPF, [1024, 5]], # 7 27 | ] 28 | 29 | # YOLOv5 v6.0 head 30 | head: 31 | [[-1, 1, Conv, [512, 1, 1]], # 8 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [[-1, 4], 1, Concat, [1]], # cat backbone P4 34 | [-1, 3, C3, [512, False]], # 11 35 | 36 | [-1, 1, Conv, [256, 1, 1]], # 12 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [[-1, 2], 1, Concat, [1]], # cat backbone P3 39 | [-1, 3, C3, [256, False]], # 15 (P3/8-small) 40 | 41 | [-1, 1, Conv, [256, 3, 2]], 42 | [[-1, 12], 1, Concat, [1]], # cat head P4 43 | [-1, 3, C3, [512, False]], # 18 (P4/16-medium) 44 | 45 | [-1, 1, Conv, [512, 3, 2]], 46 | [[-1, 8], 1, Concat, [1]], # cat head P5 47 | [-1, 3, C3, [1024, False]], # 21 (P5/32-large) 48 | 49 | [[15, 18, 21], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 50 | ] 51 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5_all_swin2.yaml: -------------------------------------------------------------------------------- 1 | # reference all_swin_transformerV2 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, PatchEmbed, [4,3,96]], # 0-P1/2 16 | [-1, 1, SwinTransformer_Layer, [96,2,3]], # 1-P2/4 [1, 192, 32, 32]) 17 | [-1, 1, SwinTransformer_Layer, [192,2,6]], # [1, 384, 16, 16]) 18 | [-1, 1, SwinTransformer_Layer, [384,6,12]], # 3-P4/8 [1, 768, 8, 8]) 19 | [-1, 1, SwinTransformer_Layer, [768,2,24,True]], # True:last_layer no PathchMerging [1, 768, 8, 8]) 20 | 21 | ] 22 | 23 | # YOLOv5 v6.0 head 24 | head: 25 | [ 26 | [-1, 1, PatchEmbed, [1,768,384]], #5 384,8,8 27 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 28 | [[-1, 2], 1, Concat, [1]], # cat backbone P4 29 | [-1, 1, SwinTransformer_Layer, [768,2,12,True,4]], # [1, 768, 16, 16]) 30 | 31 | [-1, 1, PatchEmbed, [1,768,192]], #9 [1, 192, 16, 16] 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [[-1, 1], 1, Concat, [1]], # cat backbone P3 34 | [-1, 1, SwinTransformer_Layer, [384,2,12,True,4]], # 12 (P3/8-small) torch.Size([1, 384, 32, 32]) 35 | 36 | [-1, 1, PatchEmbed, [2,384,192]], #13 37 | [[-1, 9], 1, Concat, [1]], # cat head P4 38 | [-1, 1, SwinTransformer_Layer, [384,2,12,True,4]], # 15 (P4/16-medium) 16 16 39 | 40 | [-1, 1, PatchEmbed, [2,384,384]], #16 41 | [[-1, 5], 1, Concat, [1]], # cat head P5 42 | [-1, 1, SwinTransformer_Layer, [768,2,24,True,4]], # 18 (P5/32-large) 43 | 44 | [[12, 15, 18], 1, Detect, [nc, anchors,[384,384,768]]], # Detect(P3, P4, P5) 45 | ] 46 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5l_smallob.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 1 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [5,6, 8,14, 15,11] #4 9 | - [10,13, 16,30, 33,23] # P3/8 10 | - [30,61, 62,45, 59,119] # P4/16 11 | - [116,90, 156,198, 373,326] # P5/32 12 | 13 | 14 | # YOLOv5 v6.0 backbone 15 | backbone: 16 | # [from, number, module, args] 17 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 18 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 19 | [-1, 3, C3, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 21 | [-1, 6, C3, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 23 | [-1, 9, C3, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 25 | [-1, 3, C3, [1024]], 26 | [-1, 1, SPPF, [1024, 5]], # 9 27 | ] 28 | 29 | # YOLOv5 v6.0 head 30 | head: 31 | [[-1, 1, Conv, [512, 1, 1]], 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 34 | [-1, 3, C3, [512, False]], # 13 35 | 36 | [-1, 1, Conv, [512, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 39 | [-1, 3, C3, [512, False]], # 17 (P3/8-small) 40 | 41 | [-1, 1, Conv, [256, 1, 1]], #18 80*80 42 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], #19 160*160 43 | [[-1, 2], 1, Concat, [1]], #20 cat backbone p2 160*160 44 | [-1, 3, C3, [256, False]], #21 160*160 45 | 46 | [-1, 1, Conv, [256, 3, 2]], #22 80*80 47 | [[-1, 18], 1, Concat, [1]], #23 80*80 48 | [-1, 3, C3, [256, False]], #24 80*80 49 | 50 | 51 | [-1, 1, Conv, [256, 3, 2]], #25 52 | [[-1, 14], 1, Concat, [1]], # cat head P4 53 | [-1, 3, C3, [512, False]], # 27 (P4/16-medium) 54 | 55 | [-1, 1, Conv, [512, 3, 2]], 56 | [[-1, 10], 1, Concat, [1]], # cat head P5 57 | [-1, 3, C3, [1024, False]], # 30 (P5/32-large) 58 | 59 | [[21, 24, 27, 30], 1, Detect, [nc, anchors]], # Detect(p2, P3, P4, P5) 60 | ] 61 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5s-carafe.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 1, SPPF, [1024, 5]], 24 | [-1, 3, C3, [1024]], 25 | 26 | ] 27 | 28 | # YOLOv5 head 29 | head: 30 | [[-1, 1, Conv, [512, 1, 1]], 31 | [-1, 1, CARAFE, [512,3,2]], 32 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 33 | [-1, 3, C3, [512, False]], # 13 34 | 35 | [-1, 1, Conv, [256, 1, 1]], 36 | [-1, 1, CARAFE, [256,3,2]], 37 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 38 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 39 | 40 | [-1, 1, Conv, [256, 3, 2]], 41 | [[-1, 14], 1, Concat, [1]], # cat head P4 42 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 43 | 44 | [-1, 1, Conv, [512, 3, 2]], 45 | [[-1, 10], 1, Concat, [1]], # cat head P5 46 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 47 | 48 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5s_asff.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, ASFF_Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5s_bifpn.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], 25 | ] 26 | 27 | # YOLOv5 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1,6], 1, Concat_bifpn, [256,256]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat_bifpn, [128,128]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | 40 | [-1, 1, Conv, [512, 3, 2]], # 320, 640 # 41 | [[-1, 6, 13], 1, Concat_bifpn, [256,256]], # cat head P4 42 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 43 | 44 | [-1, 1, Conv, [1024, 3, 2]], # 640, 1280 # 45 | [[-1, 9], 1, Concat_bifpn, [512, 512]], # cat head P5 cat 20,20 #22 46 | [-1, 3, C3, [1024, False]], # 25 (P5/32-large) # 1280, 1280 #23 47 | 48 | 49 | [[17, 20, 23], 1, Detect, [nc, anchors]] # Detect(P3, P4, P5) 50 | ] 51 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5s_bot.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | #- [5,6, 7,9, 12,10] # P2/4 9 | - [10,13, 16,30, 33,23] # P3/8 10 | - [30,61, 62,45, 59,119] # P4/16 11 | - [116,90, 156,198, 373,326] # P5/32 12 | 13 | # YOLOv5 backbone 14 | backbone: 15 | # [from, number, module, args] # [c=channels,module,kernlsize,strides] 16 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 [c=3,64*0.5=32,3] 17 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 18 | [-1, 3, C3, [128]], 19 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 20 | [-1, 6, C3, [256]], 21 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 22 | [-1, 9, C3, [512]], 23 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 24 | [-1, 1, SPPF, [1024,5]], 25 | [-1, 3, CTR3, [1024]], # 9 26 | 27 | ] 28 | 29 | # YOLOv5 head 30 | head: 31 | [[-1, 1, Conv, [512, 1, 1]], 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [[-1, 5], 1, Concat, [1]], # cat backbone P4 34 | [-1, 3, C3, [512, False]], # 13 35 | 36 | [-1, 1, Conv, [256, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [[-1, 3], 1, Concat, [1]], # cat backbone P3 39 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 40 | 41 | 42 | 43 | [-1, 1, Conv, [256, 3, 2]], 44 | [[-1, 14], 1, Concat, [1]], # cat head P4 45 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) [256, 256, 1, False] 46 | 47 | 48 | 49 | [-1, 1, Conv, [512, 3, 2]], #[256, 256, 3, 2] 50 | [[-1, 10], 1, Concat, [1]], # cat head P5 51 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) [512, 512, 1, False] 52 | 53 | 54 | 55 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 56 | ] 57 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5s_decoupled.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Decoupled_Detect, [nc, anchors]], # Detect(P3, P4, P5),解耦 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5s_involution.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], 17 | [-1, 1, Involution, [128,3,2]], # 2-P2/4 18 | [-1, 3, C3, [128,True]], 19 | [-1, 1, Conv, [256, 3, 2]], 20 | [-1, 1, Involution, [256,3,2]], # 5-P3/8 21 | [-1, 6, C3, [256,True]], 22 | [-1, 1, Conv, [512,3,2]], #7 23 | [-1, 1, Involution, [512,3,1]], # 8-P4/16 24 | [-1, 9, C3, [512]], 25 | [-1, 1, Conv, [1024, 3, 2]], 26 | [-1, 1, Involution, [1024,3,1]], # 11-P5/32 27 | [-1, 3, C3, [1024]] 28 | [-1, 1, SPPF, [1024,5]], 29 | ] 30 | 31 | # YOLOv5 head 32 | head: 33 | [[-1, 1, Conv, [512, 1, 1]], 34 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 35 | [[-1, 8], 1, Concat, [1]], # cat backbone P4 36 | [-1, 3, C3, [512, False]], # 17 37 | 38 | [-1, 1, Conv, [256, 1, 1]], 39 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 40 | [[-1, 5], 1, Concat, [1]], # cat backbone P3 41 | [-1, 3, C3, [256, False]], # 21 (P3/8-small) 42 | 43 | [-1, 1, Conv, [256, 3, 2]], 44 | [[-1, 18], 1, Concat, [1]], # cat head P4 45 | [-1, 3, C3, [512, False]], # 24 (P4/16-medium) 46 | 47 | [-1, 1, Conv, [512, 3, 2]], 48 | [[-1, 14], 1, Concat, [1]], # cat head P5 49 | [-1, 3, C3, [1024, False]], # 27 (P5/32-large) 50 | 51 | [[21, 24, 27], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 52 | ] 53 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5s_swinv2_head.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 1, SwinTransformer_Layer, [128,2,8,True,8]], #4 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 1, SwinTransformer_Layer, [256,2,8,True,8]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 1, SwinTransformer_Layer, [512,2,8,True,4]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | [-1, 1, GAM_Attention, [128,128]], 39 | 40 | [-1, 1, Conv, [256, 3, 2]], 41 | [[-1, 14], 1, Concat, [1]], # cat head P4 42 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 43 | #[-1, 1, SwinTransformer_Layer, [256,2,2,True,8]], # 20 (P4/16-medium) 44 | [-1, 1, GAM_Attention, [256,256]], 45 | 46 | [-1, 1, Conv, [512, 3, 2]], 47 | [[-1, 10], 1, Concat, [1]], # cat head P5 48 | [-1, 3, C3, [1024, False]], # 20 (P4/16-medium) 49 | [-1, 1, SwinTransformer_Layer, [512,2,2,True,4]], # 23 (P5/32-large) 50 | #[-1, 1, GAM_Attention, [512,512]], 51 | 52 | [[18, 22, 26], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 53 | ] 54 | -------------------------------------------------------------------------------- /configs/yolo_combining/research/yolov5x_bifpn.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.33 # model depth multiple 4 | width_multiple: 1.25 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat_bifpn, [640,640]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat_bifpn, [320,320]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | 40 | [-1, 1, Conv, [512, 3, 2]], # 320, 640 # 41 | [[-1, 6, 13], 1, Concat_bifpn, [640,640]], # cat head P4 42 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 43 | 44 | [-1, 1, Conv, [1024, 3, 2]], # 640, 1280 # 45 | [[-1, 9], 1, Concat_bifpn, [1280, 1280]], # cat head P5 46 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) # 1280, 1280 #23 47 | 48 | 49 | [[17, 20, 23], 1, Detect, [nc, anchors]] # Detect(P3, P4, P5) 50 | ] 51 | -------------------------------------------------------------------------------- /configs/yolo_combining/v5Lite-e.yaml: -------------------------------------------------------------------------------- 1 | # create by pogg 2 | # parameters 3 | nc: 80 # number of classes 4 | depth_multiple: 1.0 # model depth multiple 5 | width_multiple: 1.0 # layer channel multiple 6 | 7 | # anchors 8 | anchors: 9 | - [ 10,13, 16,30, 33,23 ] # P3/8 10 | - [ 30,61, 62,45, 59,119 ] # P4/16 11 | - [ 116,90, 156,198, 373,326 ] # P5/32 12 | 13 | # custom backbone 14 | backbone: 15 | # [from, number, module, args] 16 | [ [ -1, 1, conv_bn_relu_maxpool, [ 32 ] ], # 0-P2/4 17 | [ -1, 1, Shuffle_Block, [ 116, 2 ] ], # 1-P3/8 18 | [ -1, 3, Shuffle_Block, [ 116, 1 ] ], # 2 19 | [ -1, 1, Shuffle_Block, [ 232, 2 ] ], # 3-P4/16 20 | [ -1, 7, Shuffle_Block, [ 232, 1 ] ], # 4 21 | [ -1, 1, Shuffle_Block, [ 464, 2 ] ], # 5-P5/32 22 | [ -1, 1, Shuffle_Block, [ 464, 1 ] ], # 6 23 | ] 24 | 25 | # v5lite-e head 26 | head: 27 | [ [ -1, 1, Conv, [ 96, 1, 1 ] ], 28 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 29 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P4 30 | [ -1, 1, DWConvblock, [96, 3, 1] ], # 10 31 | 32 | [ -1, 1, Conv, [ 96, 1, 1 ] ], 33 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 34 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P3 35 | [ -1, 1, DWConvblock, [96, 3, 1] ], # 14 (P3/8-small) 36 | 37 | [-1, 1, DWConvblock, [96, 3, 2]], 38 | [ [ -1, 11 ], 1, ADD, [ 1 ] ], # cat head P4 39 | [ -1, 1, DWConvblock, [96, 3, 1] ], # 17 (P4/16-medium) 40 | 41 | [ -1, 1, DWConvblock, [ 96, 3, 2 ] ], 42 | [ [ -1, 7 ], 1, ADD, [ 1 ] ], # cat head P5 43 | [ -1, 1, DWConvblock, [96, 3, 1] ], # 20 (P5/32-large) 44 | 45 | [ [ 14, 17, 20 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5) 46 | ] 47 | -------------------------------------------------------------------------------- /configs/yolo_combining/v5Lite-g.yaml: -------------------------------------------------------------------------------- 1 | # create by pogg 2 | # parameters 3 | nc: 80 # number of classes 4 | depth_multiple: 1 # model depth multiple 5 | width_multiple: 1 # layer channel multiple 6 | 7 | # anchors 8 | anchors: 9 | - [10,13, 16,30, 33,23] # P3/8 10 | - [30,61, 62,45, 59,119] # P4/16 11 | - [116,90, 156,198, 373,326] # P5/32 12 | 13 | # YOLOv5-repvgg backbone 14 | backbone: 15 | # [from, number, module, args] 16 | [[-1, 1, Focus, [32, 3]], # 0-P1/2 17 | [-1, 1, RepVGGBlock, [64, 3, 2]], # 1-P2/4 18 | [-1, 1, C3, [64]], 19 | [-1, 1, RepVGGBlock, [128, 3, 2]], # 3-P3/8 20 | [-1, 3, C3, [128]], 21 | [-1, 1, RepVGGBlock, [256, 3, 2]], # 5-P4/16 22 | [-1, 3, C3, [256]], 23 | [-1, 1, RepVGGBlock, [512, 3, 2]], # 7-P4/16 24 | [-1, 1, SPP, [512, [5, 9, 13]]], 25 | [-1, 1, C3, [512, False]], # 9 26 | ] 27 | 28 | # YOLOv5 head 29 | head: 30 | [[-1, 1, Conv, [128, 1, 1]], 31 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 32 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 33 | [-1, 3, C3, [128, False]], # 13 34 | 35 | [-1, 1, Conv, [128, 1, 1]], 36 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 37 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 38 | [-1, 3, C3, [128, False]], # 17 (P3/8-small) 39 | 40 | [-1, 1, Conv, [128, 3, 2]], 41 | [[-1, 14], 1, Concat, [1]], # cat head P4 42 | [-1, 3, C3, [128, False]], # 20 (P4/16-medium) 43 | 44 | [-1, 1, Conv, [128, 3, 2]], 45 | [[-1, 10], 1, Concat, [1]], # cat head P5 46 | [-1, 3, C3, [128, False]], # 23 (P5/32-large) 47 | 48 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolo_combining/v5Lite-s.yaml: -------------------------------------------------------------------------------- 1 | # create by pogg 2 | # parameters 3 | nc: 80 # number of classes 4 | depth_multiple: 1.0 # model depth multiple 5 | width_multiple: 1.0 # layer channel multiple 6 | 7 | # anchors 8 | anchors: 9 | - [ 10,13, 16,30, 33,23 ] # P3/8 10 | - [ 30,61, 62,45, 59,119 ] # P4/16 11 | - [ 116,90, 156,198, 373,326 ] # P5/32 12 | 13 | # custom backbone 14 | backbone: 15 | # [from, number, module, args] 16 | [ [ -1, 1, conv_bn_relu_maxpool, [ 32 ] ], # 0-P2/4 17 | [ -1, 1, Shuffle_Block, [ 116, 2 ] ], # 1-P3/8 18 | [ -1, 3, Shuffle_Block, [ 116, 1 ] ], # 2 19 | [ -1, 1, Shuffle_Block, [ 232, 2 ] ], # 3-P4/16 20 | [ -1, 7, Shuffle_Block, [ 232, 1 ] ], # 4 21 | [ -1, 1, Shuffle_Block, [ 464, 2 ] ], # 5-P5/32 22 | [ -1, 3, Shuffle_Block, [ 464, 1 ] ], # 6 23 | ] 24 | 25 | # YOLOv5 head 26 | head: 27 | [ [ -1, 1, Conv, [ 128, 1, 1 ] ], 28 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 29 | [ [ -1, 4 ], 1, Concat, [ 1 ] ], # cat backbone P4 30 | [ -1, 1, C3, [ 128, False ] ], # 10 31 | 32 | [ -1, 1, Conv, [ 64, 1, 1 ] ], 33 | [ -1, 1, nn.Upsample, [ None, 2, 'nearest' ] ], 34 | [ [ -1, 2 ], 1, Concat, [ 1 ] ], # cat backbone P3 35 | [ -1, 1, C3, [ 64, False ] ], # 14 (P3/8-small) 36 | 37 | [ -1, 1, Conv, [ 64, 3, 2 ] ], 38 | [ [ -1, 11 ], 1, Concat, [ 1 ] ], # cat head P4 39 | [ -1, 1, C3, [ 128, False ] ], # 17 (P4/16-medium) 40 | 41 | [ -1, 1, Conv, [ 128, 3, 2 ] ], 42 | [ [ -1, 7 ], 1, Concat, [ 1 ] ], # cat head P5 43 | [ -1, 1, C3, [ 256, False ] ], # 20 (P5/32-large) 44 | 45 | [ [ 14, 17, 20 ], 1, Detect, [ nc, anchors ] ], # Detect(P3, P4, P5) 46 | ] 47 | -------------------------------------------------------------------------------- /configs/yolo_combining/yolov5s_cbam.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 10 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | #- [5,6, 7,9, 12,10] # P2/4 9 | - [10,13, 16,30, 33,23] # P3/8 10 | - [30,61, 62,45, 59,119] # P4/16 11 | - [116,90, 156,198, 373,326] # P5/32 12 | 13 | # YOLOv5 backbone 14 | backbone: 15 | # [from, number, module, args] # [c=channels,module,kernlsize,strides] 16 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 [c=3,64*0.5=32,3] 17 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 18 | [-1, 3, C3, [128]], 19 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 20 | [-1, 6, C3, [256]], 21 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 22 | [-1, 9, C3, [512]], 23 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 24 | [-1, 3, C3, [1024]], 25 | [-1, 1, CBAM, [1024]], #9 26 | [-1, 1, SPPF, [1024,5]], #10 27 | ] 28 | 29 | # YOLOv5 head 30 | head: 31 | [[-1, 1, Conv, [512, 1, 1]], 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 34 | [-1, 3, C3, [512, False]], # 14 35 | 36 | [-1, 1, Conv, [256, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 39 | [-1, 3, C3, [256, False]], # 18 (P3/8-small) 40 | [-1, 1, CBAM, [256]], #19 41 | 42 | 43 | [-1, 1, Conv, [256, 3, 2]], 44 | [[-1, 15], 1, Concat, [1]], # cat head P4 45 | [-1, 3, C3, [512, False]], # 22 (P4/16-medium) [256, 256, 1, False] 46 | [-1, 1, CBAM, [512]], 47 | 48 | 49 | [-1, 1, Conv, [512, 3, 2]], #[256, 256, 3, 2] 50 | [[-1, 11], 1, Concat, [1]], # cat head P5 51 | [-1, 3, C3, [1024, False]], # 25 (P5/32-large) [512, 512, 1, False] 52 | [-1, 1, CBAM, [1024]], 53 | 54 | 55 | [[19, 23, 27], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 56 | ] 57 | -------------------------------------------------------------------------------- /configs/yolor/r50-csp.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # CSP-ResNet backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Stem, [128]], # 0-P1/2 16 | [-1, 3, ResCSPC, [128]], 17 | [-1, 1, Conv, [256, 3, 2]], # 2-P3/8 18 | [-1, 4, ResCSPC, [256]], 19 | [-1, 1, Conv, [512, 3, 2]], # 4-P3/8 20 | [-1, 6, ResCSPC, [512]], 21 | [-1, 1, Conv, [1024, 3, 2]], # 6-P3/8 22 | [-1, 3, ResCSPC, [1024]], # 7 23 | ] 24 | 25 | # CSP-Res-PAN head 26 | head: 27 | [[-1, 1, SPPCSPC, [512]], # 8 28 | [-1, 1, Conv, [256, 1, 1]], 29 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 30 | [5, 1, Conv, [256, 1, 1]], # route backbone P4 31 | [[-1, -2], 1, Concat, [1]], 32 | [-1, 2, ResCSPB, [256]], # 13 33 | [-1, 1, Conv, [128, 1, 1]], 34 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 35 | [3, 1, Conv, [128, 1, 1]], # route backbone P3 36 | [[-1, -2], 1, Concat, [1]], 37 | [-1, 2, ResCSPB, [128]], # 18 38 | [-1, 1, Conv, [256, 3, 1]], 39 | [-2, 1, Conv, [256, 3, 2]], 40 | [[-1, 13], 1, Concat, [1]], # cat 41 | [-1, 2, ResCSPB, [256]], # 22 42 | [-1, 1, Conv, [512, 3, 1]], 43 | [-2, 1, Conv, [512, 3, 2]], 44 | [[-1, 8], 1, Concat, [1]], # cat 45 | [-1, 2, ResCSPB, [512]], # 26 46 | [-1, 1, Conv, [1024, 3, 1]], 47 | 48 | [[19,23,27], 1, IDetect, [nc, anchors]], # Detect(P3, P4, P5) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolor/x50-csp.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # CSP-ResNeXt backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Stem, [128]], # 0-P1/2 16 | [-1, 3, ResXCSPC, [128]], 17 | [-1, 1, Conv, [256, 3, 2]], # 2-P3/8 18 | [-1, 4, ResXCSPC, [256]], 19 | [-1, 1, Conv, [512, 3, 2]], # 4-P3/8 20 | [-1, 6, ResXCSPC, [512]], 21 | [-1, 1, Conv, [1024, 3, 2]], # 6-P3/8 22 | [-1, 3, ResXCSPC, [1024]], # 7 23 | ] 24 | 25 | # CSP-ResX-PAN head 26 | head: 27 | [[-1, 1, SPPCSPC, [512]], # 8 28 | [-1, 1, Conv, [256, 1, 1]], 29 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 30 | [5, 1, Conv, [256, 1, 1]], # route backbone P4 31 | [[-1, -2], 1, Concat, [1]], 32 | [-1, 2, ResXCSPB, [256]], # 13 33 | [-1, 1, Conv, [128, 1, 1]], 34 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 35 | [3, 1, Conv, [128, 1, 1]], # route backbone P3 36 | [[-1, -2], 1, Concat, [1]], 37 | [-1, 2, ResXCSPB, [128]], # 18 38 | [-1, 1, Conv, [256, 3, 1]], 39 | [-2, 1, Conv, [256, 3, 2]], 40 | [[-1, 13], 1, Concat, [1]], # cat 41 | [-1, 2, ResXCSPB, [256]], # 22 42 | [-1, 1, Conv, [512, 3, 1]], 43 | [-2, 1, Conv, [512, 3, 2]], 44 | [[-1, 8], 1, Concat, [1]], # cat 45 | [-1, 2, ResXCSPB, [512]], # 26 46 | [-1, 1, Conv, [1024, 3, 1]], 47 | 48 | [[19,23,27], 1, IDetect, [nc, anchors]], # Detect(P3, P4, P5) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolor/yolor-csp-x.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.33 # model depth multiple 4 | width_multiple: 1.25 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # CSP-Darknet backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, BottleneckCSPC, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, BottleneckCSPC, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, BottleneckCSPC, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, BottleneckCSPC, [1024]], # 10 26 | ] 27 | 28 | # CSP-Dark-PAN head 29 | head: 30 | [[-1, 1, SPPCSPC, [512]], # 11 31 | [-1, 1, Conv, [256, 1, 1]], 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [8, 1, Conv, [256, 1, 1]], # route backbone P4 34 | [[-1, -2], 1, Concat, [1]], 35 | [-1, 2, BottleneckCSPB, [256]], # 16 36 | [-1, 1, Conv, [128, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [6, 1, Conv, [128, 1, 1]], # route backbone P3 39 | [[-1, -2], 1, Concat, [1]], 40 | [-1, 2, BottleneckCSPB, [128]], # 21 41 | [-1, 1, Conv, [256, 3, 1]], 42 | [-2, 1, Conv, [256, 3, 2]], 43 | [[-1, 16], 1, Concat, [1]], # cat 44 | [-1, 2, BottleneckCSPB, [256]], # 25 45 | [-1, 1, Conv, [512, 3, 1]], 46 | [-2, 1, Conv, [512, 3, 2]], 47 | [[-1, 11], 1, Concat, [1]], # cat 48 | [-1, 2, BottleneckCSPB, [512]], # 29 49 | [-1, 1, Conv, [1024, 3, 1]], 50 | 51 | [[22,26,30], 1, IDetect, [nc, anchors]], # Detect(P3, P4, P5) 52 | ] 53 | -------------------------------------------------------------------------------- /configs/yolor/yolor-csp.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # CSP-Darknet backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, BottleneckCSPC, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, BottleneckCSPC, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, BottleneckCSPC, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, BottleneckCSPC, [1024]], # 10 26 | ] 27 | 28 | # CSP-Dark-PAN head 29 | head: 30 | [[-1, 1, SPPCSPC, [512]], # 11 31 | [-1, 1, Conv, [256, 1, 1]], 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [8, 1, Conv, [256, 1, 1]], # route backbone P4 34 | [[-1, -2], 1, Concat, [1]], 35 | [-1, 2, BottleneckCSPB, [256]], # 16 36 | [-1, 1, Conv, [128, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [6, 1, Conv, [128, 1, 1]], # route backbone P3 39 | [[-1, -2], 1, Concat, [1]], 40 | [-1, 2, BottleneckCSPB, [128]], # 21 41 | [-1, 1, Conv, [256, 3, 1]], 42 | [-2, 1, Conv, [256, 3, 2]], 43 | [[-1, 16], 1, Concat, [1]], # cat 44 | [-1, 2, BottleneckCSPB, [256]], # 25 45 | [-1, 1, Conv, [512, 3, 1]], 46 | [-2, 1, Conv, [512, 3, 2]], 47 | [[-1, 11], 1, Concat, [1]], # cat 48 | [-1, 2, BottleneckCSPB, [512]], # 29 49 | [-1, 1, Conv, [1024, 3, 1]], 50 | 51 | [[22,26,30], 1, IDetect, [nc, anchors]], # Detect(P3, P4, P5) 52 | ] 53 | -------------------------------------------------------------------------------- /configs/yolor/yolor-ssss-dwt.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # yolov4s backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, DWT, []], # 0 16 | [-1, 1, DWT, []], # 1 17 | [-1, 1, DWT, []], # 2 18 | [-1, 8, BottleneckCSP, [256]], 19 | [-1, 1, Conv, [512, 3, 2]], # 4-P4/16 20 | [-1, 8, BottleneckCSP, [512]], 21 | [-1, 1, Conv, [1024, 3, 2]], # 6-P5/32 22 | [-1, 4, BottleneckCSP, [1024]], # 7 23 | ] 24 | 25 | # yolov4s head 26 | # na = len(anchors[0]) 27 | head: 28 | [[-1, 1, SPPCSPC, [512]], # 8 29 | [-1, 1, Conv, [256, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [5, 1, Conv, [256, 1, 1]], # route backbone P4 32 | [[-1, -2], 1, Concat, [1]], 33 | [-1, 2, BottleneckCSP2, [256]], # 13 34 | [-1, 1, Conv, [128, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [3, 1, Conv, [128, 1, 1]], # route backbone P3 37 | [[-1, -2], 1, Concat, [1]], 38 | [-1, 2, BottleneckCSP2, [128]], # 18 39 | [-1, 1, Conv, [256, 3, 1]], 40 | [-2, 1, Conv, [256, 3, 2]], 41 | [[-1, 13], 1, Concat, [1]], # cat 42 | [-1, 2, BottleneckCSP2, [256]], # 22 43 | [-1, 1, Conv, [512, 3, 1]], 44 | [-2, 1, Conv, [512, 3, 2]], 45 | [[-1, 8], 1, Concat, [1]], # cat 46 | [-1, 2, BottleneckCSP2, [512]], # 26 47 | [-1, 1, Conv, [1024, 3, 1]], 48 | 49 | [[19,23,27], 1, IDetect, [nc, anchors]], # Detect(P3, P4, P5) 50 | ] 51 | -------------------------------------------------------------------------------- /configs/yolor/yolor-ssss-s2d.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # yolov4s backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, ReOrg, []], # 0 16 | [-1, 1, ReOrg, []], # 1 17 | [-1, 1, ReOrg, []], # 2 18 | [-1, 8, BottleneckCSP, [256]], 19 | [-1, 1, Conv, [512, 3, 2]], # 4-P4/16 20 | [-1, 8, BottleneckCSP, [512]], 21 | [-1, 1, Conv, [1024, 3, 2]], # 6-P5/32 22 | [-1, 4, BottleneckCSP, [1024]], # 7 23 | ] 24 | 25 | # yolov4s head 26 | # na = len(anchors[0]) 27 | head: 28 | [[-1, 1, SPPCSP, [512]], # 8 29 | [-1, 1, Conv, [256, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [5, 1, Conv, [256, 1, 1]], # route backbone P4 32 | [[-1, -2], 1, Concat, [1]], 33 | [-1, 2, BottleneckCSP2, [256]], # 13 34 | [-1, 1, Conv, [128, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [3, 1, Conv, [128, 1, 1]], # route backbone P3 37 | [[-1, -2], 1, Concat, [1]], 38 | [-1, 2, BottleneckCSP2, [128]], # 18 39 | [-1, 1, Conv, [256, 3, 1]], 40 | [-2, 1, Conv, [256, 3, 2]], 41 | [[-1, 13], 1, Concat, [1]], # cat 42 | [-1, 2, BottleneckCSP2, [256]], # 22 43 | [-1, 1, Conv, [512, 3, 1]], 44 | [-2, 1, Conv, [512, 3, 2]], 45 | [[-1, 8], 1, Concat, [1]], # cat 46 | [-1, 2, BottleneckCSP2, [512]], # 26 47 | [-1, 1, Conv, [1024, 3, 1]], 48 | 49 | [[19,23,27], 1, IDetect, [nc, anchors]], # Detect(P3, P4, P5) 50 | ] 51 | -------------------------------------------------------------------------------- /configs/yolov3/yolov3-spp.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # darknet53 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, Bottleneck, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, Bottleneck, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, Bottleneck, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, Bottleneck, [1024]], # 10 26 | ] 27 | 28 | # YOLOv3-SPP head 29 | head: 30 | [[-1, 1, Bottleneck, [1024, False]], 31 | [-1, 1, SPP, [512, [5, 9, 13]]], 32 | [-1, 1, Conv, [1024, 3, 1]], 33 | [-1, 1, Conv, [512, 1, 1]], 34 | [-1, 1, Conv, [1024, 3, 1]], # 15 (P5/32-large) 35 | 36 | [-2, 1, Conv, [256, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [[-1, 8], 1, Concat, [1]], # cat backbone P4 39 | [-1, 1, Bottleneck, [512, False]], 40 | [-1, 1, Bottleneck, [512, False]], 41 | [-1, 1, Conv, [256, 1, 1]], 42 | [-1, 1, Conv, [512, 3, 1]], # 22 (P4/16-medium) 43 | 44 | [-2, 1, Conv, [128, 1, 1]], 45 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 46 | [[-1, 6], 1, Concat, [1]], # cat backbone P3 47 | [-1, 1, Bottleneck, [256, False]], 48 | [-1, 2, Bottleneck, [256, False]], # 27 (P3/8-small) 49 | 50 | [[27, 22, 15], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 51 | ] 52 | -------------------------------------------------------------------------------- /configs/yolov3/yolov3-tiny.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv3 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 1 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [10,14, 23,27, 37,58] # P4/16 9 | - [81,82, 135,169, 344,319] # P5/32 10 | 11 | # YOLOv3-tiny backbone 12 | backbone: 13 | # [from, number, module, args] 14 | [[-1, 1, Conv, [16, 3, 1]], # 0 15 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 1-P1/2 16 | [-1, 1, Conv, [32, 3, 1]], 17 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 3-P2/4 18 | [-1, 1, Conv, [64, 3, 1]], 19 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 5-P3/8 20 | [-1, 1, Conv, [128, 3, 1]], 21 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 7-P4/16 22 | [-1, 1, Conv, [256, 3, 1]], 23 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 9-P5/32 24 | [-1, 1, Conv, [512, 3, 1]], 25 | [-1, 1, nn.ZeroPad2d, [[0, 1, 0, 1]]], # 11 26 | [-1, 1, nn.MaxPool2d, [2, 1, 0]], # 12 27 | ] 28 | 29 | # YOLOv3-tiny head 30 | head: 31 | [[-1, 1, Conv, [1024, 3, 1]], 32 | [-1, 1, Conv, [256, 1, 1]], 33 | [-1, 1, Conv, [512, 3, 1]], # 15 (P5/32-large) 34 | 35 | [-2, 1, Conv, [128, 1, 1]], 36 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 37 | [[-1, 8], 1, Concat, [1]], # cat backbone P4 38 | [-1, 1, Conv, [256, 3, 1]], # 19 (P4/16-medium) 39 | 40 | [[19, 15], 1, Detect, [nc, anchors]], # Detect(P4, P5) 41 | ] 42 | -------------------------------------------------------------------------------- /configs/yolov3/yolov3.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # darknet53 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, Bottleneck, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, Bottleneck, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, Bottleneck, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, Bottleneck, [1024]], # 10 26 | ] 27 | 28 | # YOLOv3 head 29 | head: 30 | [[-1, 1, Bottleneck, [1024, False]], 31 | [-1, 1, Conv, [512, [1, 1]]], 32 | [-1, 1, Conv, [1024, 3, 1]], 33 | [-1, 1, Conv, [512, 1, 1]], 34 | [-1, 1, Conv, [1024, 3, 1]], # 15 (P5/32-large) 35 | 36 | [-2, 1, Conv, [256, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [[-1, 8], 1, Concat, [1]], # cat backbone P4 39 | [-1, 1, Bottleneck, [512, False]], 40 | [-1, 1, Bottleneck, [512, False]], 41 | [-1, 1, Conv, [256, 1, 1]], 42 | [-1, 1, Conv, [512, 3, 1]], # 22 (P4/16-medium) 43 | 44 | [-2, 1, Conv, [128, 1, 1]], 45 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 46 | [[-1, 6], 1, Concat, [1]], # cat backbone P3 47 | [-1, 1, Bottleneck, [256, False]], 48 | [-1, 2, Bottleneck, [256, False]], # 27 (P3/8-small) 49 | 50 | [[27, 22, 15], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 51 | ] 52 | -------------------------------------------------------------------------------- /configs/yolov4/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/configs/yolov4/.DS_Store -------------------------------------------------------------------------------- /configs/yolov4/yolov4-csp.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # CSP-Darknet backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, BottleneckCSPC, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, BottleneckCSPC, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, BottleneckCSPC, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, BottleneckCSPC, [1024]], # 10 26 | ] 27 | 28 | # CSP-Dark-PAN head 29 | head: 30 | [[-1, 1, SPPCSPC, [512]], # 11 31 | [-1, 1, Conv, [256, 1, 1]], 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [8, 1, Conv, [256, 1, 1]], # route backbone P4 34 | [[-1, -2], 1, Concat, [1]], 35 | [-1, 2, BottleneckCSPB, [256]], # 16 36 | [-1, 1, Conv, [128, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [6, 1, Conv, [128, 1, 1]], # route backbone P3 39 | [[-1, -2], 1, Concat, [1]], 40 | [-1, 2, BottleneckCSPB, [128]], # 21 41 | [-1, 1, Conv, [256, 3, 1]], 42 | [-2, 1, Conv, [256, 3, 2]], 43 | [[-1, 16], 1, Concat, [1]], # cat 44 | [-1, 2, BottleneckCSPB, [256]], # 25 45 | [-1, 1, Conv, [512, 3, 1]], 46 | [-2, 1, Conv, [512, 3, 2]], 47 | [[-1, 11], 1, Concat, [1]], # cat 48 | [-1, 2, BottleneckCSPB, [512]], # 29 49 | [-1, 1, Conv, [1024, 3, 1]], 50 | 51 | [[22,26,30], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 52 | ] 53 | -------------------------------------------------------------------------------- /configs/yolov4/yolov4-tiny.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # expand model depth 4 | width_multiple: 1.0 # expand layer channels 5 | 6 | # anchors 7 | anchors: 8 | - [23,27, 37,58, 81,82] # P4/16 9 | - [81,82, 135,169, 344,319] # P5/32 10 | 11 | # CSPVoVNet backbone 12 | backbone: 13 | # [from, number, module, args] 14 | [[-1, 1, Conv, [32, 3, 2]], # 0-P1/2 15 | [-1, 1, Conv, [64, 3, 2]], # 1-P2/4 16 | 17 | [-1, 1, Conv, [64, 3, 1]], 18 | [-1, 1, VoVCSP, [64]], 19 | [[-2, -1], 1, Concat, [1]], 20 | [-1, 1, MP, [2]], # 5-P3/8 21 | 22 | [-1, 1, Conv, [128, 3, 1]], 23 | [-1, 1, VoVCSP, [128]], 24 | [[-2, -1], 1, Concat, [1]], 25 | [-1, 1, MP, [2]], # 9-P4/16 26 | 27 | [-1, 1, Conv, [256, 3, 1]], 28 | [-1, 1, VoVCSP, [256]], 29 | [[-2, -1], 1, Concat, [1]], 30 | [-1, 1, MP, [2]], # 13-P5/32 31 | 32 | [-1, 1, Conv, [512, 3, 1]], # 14 33 | ] 34 | 35 | # yolov4-tiny head 36 | # na = len(anchors[0]) 37 | head: 38 | [[-1, 1, Conv, [256, 1, 1]], 39 | [-1, 1, Conv, [512, 3, 1]], 40 | [-1, 1, nn.Conv2d, [na * (nc + 5), 1, 1]], 41 | 42 | [-2, 1, Conv, [256, 1, 1]], 43 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 44 | [[-1, 11], 1, Concat, [1]], 45 | [-1, 1, Conv, [256, 3, 1]], 46 | [-1, 1, nn.Conv2d, [na * (nc + 5), 1, 1]], 47 | 48 | [[], 1, Detect, [nc, anchors]], # Detect(P4, P5) 49 | ] 50 | -------------------------------------------------------------------------------- /configs/yolov4/yolov4l-mish.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # expand model depth 4 | width_multiple: 1.0 # expand layer channels 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # yolov4l backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, BottleneckCSP, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, BottleneckCSP, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, BottleneckCSP, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, BottleneckCSP, [1024]], # 10 26 | ] 27 | 28 | # yolov4l head 29 | # na = len(anchors[0]) 30 | head: 31 | [[-1, 1, SPPCSP, [512]], # 11 32 | [-1, 1, Conv, [256, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [8, 1, Conv, [256, 1, 1]], # route backbone P4 35 | [[-1, -2], 1, Concat, [1]], 36 | [-1, 2, BottleneckCSP2, [256]], # 16 37 | [-1, 1, Conv, [128, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [6, 1, Conv, [128, 1, 1]], # route backbone P3 40 | [[-1, -2], 1, Concat, [1]], 41 | [-1, 2, BottleneckCSP2, [128]], # 21 42 | [-1, 1, Conv, [256, 3, 1]], 43 | [-2, 1, Conv, [256, 3, 2]], 44 | [[-1, 16], 1, Concat, [1]], # cat 45 | [-1, 2, BottleneckCSP2, [256]], # 25 46 | [-1, 1, Conv, [512, 3, 1]], 47 | [-2, 1, Conv, [512, 3, 2]], 48 | [[-1, 11], 1, Concat, [1]], # cat 49 | [-1, 2, BottleneckCSP2, [512]], # 29 50 | [-1, 1, Conv, [1024, 3, 1]], 51 | 52 | [[22,26,30], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 53 | ] 54 | -------------------------------------------------------------------------------- /configs/yolov4/yolov4m-mish.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.67 # model depth multiple 4 | width_multiple: 0.75 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # yolov4m backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, BottleneckCSP, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, BottleneckCSP, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, BottleneckCSP, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, BottleneckCSP, [1024]], # 10 26 | ] 27 | 28 | # yolov4m head 29 | # na = len(anchors[0]) 30 | head: 31 | [[-1, 1, SPPCSP, [512]], # 11 32 | [-1, 1, Conv, [256, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [8, 1, Conv, [256, 1, 1]], # route backbone P4 35 | [[-1, -2], 1, Concat, [1]], 36 | [-1, 2, BottleneckCSP2, [256]], # 16 37 | [-1, 1, Conv, [128, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [6, 1, Conv, [128, 1, 1]], # route backbone P3 40 | [[-1, -2], 1, Concat, [1]], 41 | [-1, 2, BottleneckCSP2, [128]], # 21 42 | [-1, 1, Conv, [256, 3, 1]], 43 | [-2, 1, Conv, [256, 3, 2]], 44 | [[-1, 16], 1, Concat, [1]], # cat 45 | [-1, 2, BottleneckCSP2, [256]], # 25 46 | [-1, 1, Conv, [512, 3, 1]], 47 | [-2, 1, Conv, [512, 3, 2]], 48 | [[-1, 11], 1, Concat, [1]], # cat 49 | [-1, 2, BottleneckCSP2, [512]], # 29 50 | [-1, 1, Conv, [1024, 3, 1]], 51 | 52 | [[22,26,30], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 53 | ] 54 | -------------------------------------------------------------------------------- /configs/yolov4/yolov4s-mish.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # yolov4s backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, BottleneckCSP, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, BottleneckCSP, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, BottleneckCSP, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, BottleneckCSP, [1024]], # 10 26 | ] 27 | 28 | # yolov4s head 29 | # na = len(anchors[0]) 30 | head: 31 | [[-1, 1, SPPCSP, [512]], # 11 32 | [-1, 1, Conv, [256, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [8, 1, Conv, [256, 1, 1]], # route backbone P4 35 | [[-1, -2], 1, Concat, [1]], 36 | [-1, 2, BottleneckCSP2, [256]], # 16 37 | [-1, 1, Conv, [128, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [6, 1, Conv, [128, 1, 1]], # route backbone P3 40 | [[-1, -2], 1, Concat, [1]], 41 | [-1, 2, BottleneckCSP2, [128]], # 21 42 | [-1, 1, Conv, [256, 3, 1]], 43 | [-2, 1, Conv, [256, 3, 2]], 44 | [[-1, 16], 1, Concat, [1]], # cat 45 | [-1, 2, BottleneckCSP2, [256]], # 25 46 | [-1, 1, Conv, [512, 3, 1]], 47 | [-2, 1, Conv, [512, 3, 2]], 48 | [[-1, 11], 1, Concat, [1]], # cat 49 | [-1, 2, BottleneckCSP2, [512]], # 29 50 | [-1, 1, Conv, [1024, 3, 1]], 51 | 52 | [[22,26,30], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 53 | ] 54 | -------------------------------------------------------------------------------- /configs/yolov4/yolov4x-mish.yaml: -------------------------------------------------------------------------------- 1 | # parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.33 # model depth multiple 4 | width_multiple: 1.25 # layer channel multiple 5 | 6 | # anchors 7 | anchors: 8 | - [12,16, 19,36, 40,28] # P3/8 9 | - [36,75, 76,55, 72,146] # P4/16 10 | - [142,110, 192,243, 459,401] # P5/32 11 | 12 | # yolov4x backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [32, 3, 1]], # 0 16 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 17 | [-1, 1, Bottleneck, [64]], 18 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 19 | [-1, 2, BottleneckCSP, [128]], 20 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 21 | [-1, 8, BottleneckCSP, [256]], 22 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 23 | [-1, 8, BottleneckCSP, [512]], 24 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 25 | [-1, 4, BottleneckCSP, [1024]], # 10 26 | ] 27 | 28 | # yolov4x head 29 | # na = len(anchors[0]) 30 | head: 31 | [[-1, 1, SPPCSP, [512]], # 11 32 | [-1, 1, Conv, [256, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [8, 1, Conv, [256, 1, 1]], # route backbone P4 35 | [[-1, -2], 1, Concat, [1]], 36 | [-1, 2, BottleneckCSP2, [256]], # 16 37 | [-1, 1, Conv, [128, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [6, 1, Conv, [128, 1, 1]], # route backbone P3 40 | [[-1, -2], 1, Concat, [1]], 41 | [-1, 2, BottleneckCSP2, [128]], # 21 42 | [-1, 1, Conv, [256, 3, 1]], 43 | [-2, 1, Conv, [256, 3, 2]], 44 | [[-1, 16], 1, Concat, [1]], # cat 45 | [-1, 2, BottleneckCSP2, [256]], # 25 46 | [-1, 1, Conv, [512, 3, 1]], 47 | [-2, 1, Conv, [512, 3, 2]], 48 | [[-1, 11], 1, Concat, [1]], # cat 49 | [-1, 2, BottleneckCSP2, [512]], # 29 50 | [-1, 1, Conv, [1024, 3, 1]], 51 | 52 | [[22,26,30], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 53 | ] 54 | -------------------------------------------------------------------------------- /configs/yolov5/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/configs/yolov5/.DS_Store -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5-bifpn.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 9, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]] 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 1, SPP, [1024, [5, 9, 13]]], 24 | [-1, 3, C3, [1024, False]], # 9 25 | ] 26 | 27 | # YOLOv5 BiFPN head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14, 6], 1, Concat, [1]], # cat P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5-fpn.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, Bottleneck, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 9, BottleneckCSP, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, BottleneckCSP, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 1, SPP, [1024, [5, 9, 13]]], 24 | [-1, 6, BottleneckCSP, [1024]], # 9 25 | ] 26 | 27 | # YOLOv5 FPN head 28 | head: 29 | [[-1, 3, BottleneckCSP, [1024, False]], # 10 (P5/32-large) 30 | 31 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 32 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 33 | [-1, 1, Conv, [512, 1, 1]], 34 | [-1, 3, BottleneckCSP, [512, False]], # 14 (P4/16-medium) 35 | 36 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 37 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 38 | [-1, 1, Conv, [256, 1, 1]], 39 | [-1, 3, BottleneckCSP, [256, False]], # 18 (P3/8-small) 40 | 41 | [[18, 14, 10], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 42 | ] 43 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5-p2.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 3 8 | 9 | # YOLOv5 backbone 10 | backbone: 11 | # [from, number, module, args] 12 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 13 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 14 | [-1, 3, C3, [128]], 15 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 16 | [-1, 9, C3, [256]], 17 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 18 | [-1, 9, C3, [512]], 19 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 20 | [-1, 1, SPP, [1024, [5, 9, 13]]], 21 | [-1, 3, C3, [1024, False]], # 9 22 | ] 23 | 24 | # YOLOv5 head 25 | head: 26 | [[-1, 1, Conv, [512, 1, 1]], 27 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 28 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 29 | [-1, 3, C3, [512, False]], # 13 30 | 31 | [-1, 1, Conv, [256, 1, 1]], 32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 33 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 34 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 35 | 36 | [-1, 1, Conv, [128, 1, 1]], 37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 38 | [[-1, 2], 1, Concat, [1]], # cat backbone P2 39 | [-1, 1, C3, [128, False]], # 21 (P2/4-xsmall) 40 | 41 | [-1, 1, Conv, [128, 3, 2]], 42 | [[-1, 18], 1, Concat, [1]], # cat head P3 43 | [-1, 3, C3, [256, False]], # 24 (P3/8-small) 44 | 45 | [-1, 1, Conv, [256, 3, 2]], 46 | [[-1, 14], 1, Concat, [1]], # cat head P4 47 | [-1, 3, C3, [512, False]], # 27 (P4/16-medium) 48 | 49 | [-1, 1, Conv, [512, 3, 2]], 50 | [[-1, 10], 1, Concat, [1]], # cat head P5 51 | [-1, 3, C3, [1024, False]], # 30 (P5/32-large) 52 | 53 | [[21, 24, 27, 30], 1, Detect, [nc, anchors]], # Detect(P2, P3, P4, P5) 54 | ] 55 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5-p6.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 3 8 | 9 | # YOLOv5 backbone 10 | backbone: 11 | # [from, number, module, args] 12 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 13 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 14 | [-1, 3, C3, [128]], 15 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 16 | [-1, 9, C3, [256]], 17 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 18 | [-1, 9, C3, [512]], 19 | [-1, 1, Conv, [768, 3, 2]], # 7-P5/32 20 | [-1, 3, C3, [768]], 21 | [-1, 1, Conv, [1024, 3, 2]], # 9-P6/64 22 | [-1, 1, SPP, [1024, [3, 5, 7]]], 23 | [-1, 3, C3, [1024, False]], # 11 24 | ] 25 | 26 | # YOLOv5 head 27 | head: 28 | [[-1, 1, Conv, [768, 1, 1]], 29 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 30 | [[-1, 8], 1, Concat, [1]], # cat backbone P5 31 | [-1, 3, C3, [768, False]], # 15 32 | 33 | [-1, 1, Conv, [512, 1, 1]], 34 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 35 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 36 | [-1, 3, C3, [512, False]], # 19 37 | 38 | [-1, 1, Conv, [256, 1, 1]], 39 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 40 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 41 | [-1, 3, C3, [256, False]], # 23 (P3/8-small) 42 | 43 | [-1, 1, Conv, [256, 3, 2]], 44 | [[-1, 20], 1, Concat, [1]], # cat head P4 45 | [-1, 3, C3, [512, False]], # 26 (P4/16-medium) 46 | 47 | [-1, 1, Conv, [512, 3, 2]], 48 | [[-1, 16], 1, Concat, [1]], # cat head P5 49 | [-1, 3, C3, [768, False]], # 29 (P5/32-large) 50 | 51 | [-1, 1, Conv, [768, 3, 2]], 52 | [[-1, 12], 1, Concat, [1]], # cat head P6 53 | [-1, 3, C3, [1024, False]], # 32 (P5/64-xlarge) 54 | 55 | [[23, 26, 29, 32], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5, P6) 56 | ] 57 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5-panet.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, BottleneckCSP, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 9, BottleneckCSP, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, BottleneckCSP, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 1, SPP, [1024, [5, 9, 13]]], 24 | [-1, 3, BottleneckCSP, [1024, False]], # 9 25 | ] 26 | 27 | # YOLOv5 PANet head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, BottleneckCSP, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, BottleneckCSP, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, BottleneckCSP, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, BottleneckCSP, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5l6.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [19,27, 44,40, 38,94] # P3/8 9 | - [96,68, 86,152, 180,137] # P4/16 10 | - [140,301, 303,264, 238,542] # P5/32 11 | - [436,615, 739,380, 925,792] # P6/64 12 | 13 | # YOLOv5 v6.0 backbone 14 | backbone: 15 | # [from, number, module, args] 16 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 17 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 18 | [-1, 3, C3, [128]], 19 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 20 | [-1, 6, C3, [256]], 21 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 22 | [-1, 9, C3, [512]], 23 | [-1, 1, Conv, [768, 3, 2]], # 7-P5/32 24 | [-1, 3, C3, [768]], 25 | [-1, 1, Conv, [1024, 3, 2]], # 9-P6/64 26 | [-1, 3, C3, [1024]], 27 | [-1, 1, SPPF, [1024, 5]], # 11 28 | ] 29 | 30 | # YOLOv5 v6.0 head 31 | head: 32 | [[-1, 1, Conv, [768, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 8], 1, Concat, [1]], # cat backbone P5 35 | [-1, 3, C3, [768, False]], # 15 36 | 37 | [-1, 1, Conv, [512, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 40 | [-1, 3, C3, [512, False]], # 19 41 | 42 | [-1, 1, Conv, [256, 1, 1]], 43 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 44 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 45 | [-1, 3, C3, [256, False]], # 23 (P3/8-small) 46 | 47 | [-1, 1, Conv, [256, 3, 2]], 48 | [[-1, 20], 1, Concat, [1]], # cat head P4 49 | [-1, 3, C3, [512, False]], # 26 (P4/16-medium) 50 | 51 | [-1, 1, Conv, [512, 3, 2]], 52 | [[-1, 16], 1, Concat, [1]], # cat head P5 53 | [-1, 3, C3, [768, False]], # 29 (P5/32-large) 54 | 55 | [-1, 1, Conv, [768, 3, 2]], 56 | [[-1, 12], 1, Concat, [1]], # cat head P6 57 | [-1, 3, C3, [1024, False]], # 32 (P6/64-xlarge) 58 | 59 | [[23, 26, 29, 32], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5, P6) 60 | ] 61 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5m6.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.67 # model depth multiple 6 | width_multiple: 0.75 # layer channel multiple 7 | anchors: 8 | - [19,27, 44,40, 38,94] # P3/8 9 | - [96,68, 86,152, 180,137] # P4/16 10 | - [140,301, 303,264, 238,542] # P5/32 11 | - [436,615, 739,380, 925,792] # P6/64 12 | 13 | # YOLOv5 v6.0 backbone 14 | backbone: 15 | # [from, number, module, args] 16 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 17 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 18 | [-1, 3, C3, [128]], 19 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 20 | [-1, 6, C3, [256]], 21 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 22 | [-1, 9, C3, [512]], 23 | [-1, 1, Conv, [768, 3, 2]], # 7-P5/32 24 | [-1, 3, C3, [768]], 25 | [-1, 1, Conv, [1024, 3, 2]], # 9-P6/64 26 | [-1, 3, C3, [1024]], 27 | [-1, 1, SPPF, [1024, 5]], # 11 28 | ] 29 | 30 | # YOLOv5 v6.0 head 31 | head: 32 | [[-1, 1, Conv, [768, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 8], 1, Concat, [1]], # cat backbone P5 35 | [-1, 3, C3, [768, False]], # 15 36 | 37 | [-1, 1, Conv, [512, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 40 | [-1, 3, C3, [512, False]], # 19 41 | 42 | [-1, 1, Conv, [256, 1, 1]], 43 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 44 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 45 | [-1, 3, C3, [256, False]], # 23 (P3/8-small) 46 | 47 | [-1, 1, Conv, [256, 3, 2]], 48 | [[-1, 20], 1, Concat, [1]], # cat head P4 49 | [-1, 3, C3, [512, False]], # 26 (P4/16-medium) 50 | 51 | [-1, 1, Conv, [512, 3, 2]], 52 | [[-1, 16], 1, Concat, [1]], # cat head P5 53 | [-1, 3, C3, [768, False]], # 29 (P5/32-large) 54 | 55 | [-1, 1, Conv, [768, 3, 2]], 56 | [[-1, 12], 1, Concat, [1]], # cat head P6 57 | [-1, 3, C3, [1024, False]], # 32 (P6/64-xlarge) 58 | 59 | [[23, 26, 29, 32], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5, P6) 60 | ] 61 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5n6.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.25 # layer channel multiple 7 | anchors: 8 | - [19,27, 44,40, 38,94] # P3/8 9 | - [96,68, 86,152, 180,137] # P4/16 10 | - [140,301, 303,264, 238,542] # P5/32 11 | - [436,615, 739,380, 925,792] # P6/64 12 | 13 | # YOLOv5 v6.0 backbone 14 | backbone: 15 | # [from, number, module, args] 16 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 17 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 18 | [-1, 3, C3, [128]], 19 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 20 | [-1, 6, C3, [256]], 21 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 22 | [-1, 9, C3, [512]], 23 | [-1, 1, Conv, [768, 3, 2]], # 7-P5/32 24 | [-1, 3, C3, [768]], 25 | [-1, 1, Conv, [1024, 3, 2]], # 9-P6/64 26 | [-1, 3, C3, [1024]], 27 | [-1, 1, SPPF, [1024, 5]], # 11 28 | ] 29 | 30 | # YOLOv5 v6.0 head 31 | head: 32 | [[-1, 1, Conv, [768, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 8], 1, Concat, [1]], # cat backbone P5 35 | [-1, 3, C3, [768, False]], # 15 36 | 37 | [-1, 1, Conv, [512, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 40 | [-1, 3, C3, [512, False]], # 19 41 | 42 | [-1, 1, Conv, [256, 1, 1]], 43 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 44 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 45 | [-1, 3, C3, [256, False]], # 23 (P3/8-small) 46 | 47 | [-1, 1, Conv, [256, 3, 2]], 48 | [[-1, 20], 1, Concat, [1]], # cat head P4 49 | [-1, 3, C3, [512, False]], # 26 (P4/16-medium) 50 | 51 | [-1, 1, Conv, [512, 3, 2]], 52 | [[-1, 16], 1, Concat, [1]], # cat head P5 53 | [-1, 3, C3, [768, False]], # 29 (P5/32-large) 54 | 55 | [-1, 1, Conv, [768, 3, 2]], 56 | [[-1, 12], 1, Concat, [1]], # cat head P6 57 | [-1, 3, C3, [1024, False]], # 32 (P6/64-xlarge) 58 | 59 | [[23, 26, 29, 32], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5, P6) 60 | ] 61 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5s-ghost.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 16 | [-1, 1, GhostConv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3Ghost, [128]], 18 | [-1, 1, GhostConv, [256, 3, 2]], # 3-P3/8 19 | [-1, 9, C3Ghost, [256]], 20 | [-1, 1, GhostConv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3Ghost, [512]], 22 | [-1, 1, GhostConv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 1, SPP, [1024, [5, 9, 13]]], 24 | [-1, 3, C3Ghost, [1024, False]], # 9 25 | ] 26 | 27 | # YOLOv5 head 28 | head: 29 | [[-1, 1, GhostConv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3Ghost, [512, False]], # 13 33 | 34 | [-1, 1, GhostConv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3Ghost, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, GhostConv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3Ghost, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, GhostConv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3Ghost, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5s-transformer.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 9, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 1, SPP, [1024, [5, 9, 13]]], 24 | [-1, 3, C3TR, [1024, False]], # 9 <-------- C3TR() Transformer module 25 | ] 26 | 27 | # YOLOv5 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5s6.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [19,27, 44,40, 38,94] # P3/8 9 | - [96,68, 86,152, 180,137] # P4/16 10 | - [140,301, 303,264, 238,542] # P5/32 11 | - [436,615, 739,380, 925,792] # P6/64 12 | 13 | # YOLOv5 v6.0 backbone 14 | backbone: 15 | # [from, number, module, args] 16 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 17 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 18 | [-1, 3, C3, [128]], 19 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 20 | [-1, 6, C3, [256]], 21 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 22 | [-1, 9, C3, [512]], 23 | [-1, 1, Conv, [768, 3, 2]], # 7-P5/32 24 | [-1, 3, C3, [768]], 25 | [-1, 1, Conv, [1024, 3, 2]], # 9-P6/64 26 | [-1, 3, C3, [1024]], 27 | [-1, 1, SPPF, [1024, 5]], # 11 28 | ] 29 | 30 | # YOLOv5 v6.0 head 31 | head: 32 | [[-1, 1, Conv, [768, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 8], 1, Concat, [1]], # cat backbone P5 35 | [-1, 3, C3, [768, False]], # 15 36 | 37 | [-1, 1, Conv, [512, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 40 | [-1, 3, C3, [512, False]], # 19 41 | 42 | [-1, 1, Conv, [256, 1, 1]], 43 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 44 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 45 | [-1, 3, C3, [256, False]], # 23 (P3/8-small) 46 | 47 | [-1, 1, Conv, [256, 3, 2]], 48 | [[-1, 20], 1, Concat, [1]], # cat head P4 49 | [-1, 3, C3, [512, False]], # 26 (P4/16-medium) 50 | 51 | [-1, 1, Conv, [512, 3, 2]], 52 | [[-1, 16], 1, Concat, [1]], # cat head P5 53 | [-1, 3, C3, [768, False]], # 29 (P5/32-large) 54 | 55 | [-1, 1, Conv, [768, 3, 2]], 56 | [[-1, 12], 1, Concat, [1]], # cat head P6 57 | [-1, 3, C3, [1024, False]], # 32 (P6/64-xlarge) 58 | 59 | [[23, 26, 29, 32], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5, P6) 60 | ] 61 | -------------------------------------------------------------------------------- /configs/yolov5/hub/yolov5x6.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.33 # model depth multiple 6 | width_multiple: 1.25 # layer channel multiple 7 | anchors: 8 | - [19,27, 44,40, 38,94] # P3/8 9 | - [96,68, 86,152, 180,137] # P4/16 10 | - [140,301, 303,264, 238,542] # P5/32 11 | - [436,615, 739,380, 925,792] # P6/64 12 | 13 | # YOLOv5 v6.0 backbone 14 | backbone: 15 | # [from, number, module, args] 16 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 17 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 18 | [-1, 3, C3, [128]], 19 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 20 | [-1, 6, C3, [256]], 21 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 22 | [-1, 9, C3, [512]], 23 | [-1, 1, Conv, [768, 3, 2]], # 7-P5/32 24 | [-1, 3, C3, [768]], 25 | [-1, 1, Conv, [1024, 3, 2]], # 9-P6/64 26 | [-1, 3, C3, [1024]], 27 | [-1, 1, SPPF, [1024, 5]], # 11 28 | ] 29 | 30 | # YOLOv5 v6.0 head 31 | head: 32 | [[-1, 1, Conv, [768, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 8], 1, Concat, [1]], # cat backbone P5 35 | [-1, 3, C3, [768, False]], # 15 36 | 37 | [-1, 1, Conv, [512, 1, 1]], 38 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 39 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 40 | [-1, 3, C3, [512, False]], # 19 41 | 42 | [-1, 1, Conv, [256, 1, 1]], 43 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 44 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 45 | [-1, 3, C3, [256, False]], # 23 (P3/8-small) 46 | 47 | [-1, 1, Conv, [256, 3, 2]], 48 | [[-1, 20], 1, Concat, [1]], # cat head P4 49 | [-1, 3, C3, [512, False]], # 26 (P4/16-medium) 50 | 51 | [-1, 1, Conv, [512, 3, 2]], 52 | [[-1, 16], 1, Concat, [1]], # cat head P5 53 | [-1, 3, C3, [768, False]], # 29 (P5/32-large) 54 | 55 | [-1, 1, Conv, [768, 3, 2]], 56 | [[-1, 12], 1, Concat, [1]], # cat head P6 57 | [-1, 3, C3, [1024, False]], # 32 (P6/64-xlarge) 58 | 59 | [[23, 26, 29, 32], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5, P6) 60 | ] 61 | -------------------------------------------------------------------------------- /configs/yolov5/yolov5l.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.0 # model depth multiple 6 | width_multiple: 1.0 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov5/yolov5m.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.67 # model depth multiple 6 | width_multiple: 0.75 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov5/yolov5n.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.25 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov5/yolov5s.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # model depth multiple 6 | width_multiple: 0.50 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov5/yolov5x.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.33 # model depth multiple 6 | width_multiple: 1.25 # layer channel multiple 7 | anchors: 8 | - [10,13, 16,30, 33,23] # P3/8 9 | - [30,61, 62,45, 59,119] # P4/16 10 | - [116,90, 156,198, 373,326] # P5/32 11 | 12 | # YOLOv5 v6.0 backbone 13 | backbone: 14 | # [from, number, module, args] 15 | [[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2 16 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 17 | [-1, 3, C3, [128]], 18 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 19 | [-1, 6, C3, [256]], 20 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 21 | [-1, 9, C3, [512]], 22 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 23 | [-1, 3, C3, [1024]], 24 | [-1, 1, SPPF, [1024, 5]], # 9 25 | ] 26 | 27 | # YOLOv5 v6.0 head 28 | head: 29 | [[-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 32 | [-1, 3, C3, [512, False]], # 13 33 | 34 | [-1, 1, Conv, [256, 1, 1]], 35 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 36 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 37 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 38 | 39 | [-1, 1, Conv, [256, 3, 2]], 40 | [[-1, 14], 1, Concat, [1]], # cat head P4 41 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 42 | 43 | [-1, 1, Conv, [512, 3, 2]], 44 | [[-1, 10], 1, Concat, [1]], # cat head P5 45 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 46 | 47 | [[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5) 48 | ] 49 | -------------------------------------------------------------------------------- /configs/yolov6/yolov6l.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | anchors: 1 # number of anchors 6 | 7 | # YOLOv6 backbone 8 | backbone: 9 | # [from, number, module, args] 10 | [[-1, 1, RepVGGBlock, [64, 3, 2]], # 0-P1/2 11 | [-1, 1, RepVGGBlock, [128, 3, 2]], # 1-P2/4 12 | [-1, 6, RepBlock , [64, 64]], # 2 13 | [-1, 1, RepVGGBlock, [256, 3, 2]], # 3-P3/8 14 | [-1, 12, RepBlock , [128, 128]], # 4 15 | [-1, 1, RepVGGBlock, [512, 3, 2] ], # 5-P3/16 16 | [-1, 18, RepBlock , [256, 256] ], # 6 17 | [-1, 1, RepVGGBlock, [1024, 3, 2] ], # 7-P3/32 18 | [-1, 6, RepBlock , [512, 512] ], # 8 19 | [-1, 1, SimSPPF , [512, 512, 5]], # 9 20 | ] 21 | 22 | # YOLOv6 head 23 | head: 24 | [[-1, 1, SimConv, [512, 128, 1, 1]], # 10 25 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 26 | [[-1, 6], 1, Concat, [1]], # 12 cat backbone P4 27 | [-1, 12, RepBlock, [384, 128]], # 13 28 | 29 | [-1, 1, SimConv, [128, 64, 1, 1]], # 14 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 4], 1, Concat, [1]], # 16 cat backbone P3 32 | [-1, 12, RepBlock, [192, 64]], # 17 (P3/8-small) [64, 80, 80] 33 | 34 | [-1, 1, SimConv, [64, 64, 3, 2]], # 18 35 | [[-1, 14], 1, Concat, [1]], # 19 cat head P4 36 | [-1, 12, RepBlock, [128, 128]], # 20 (P4/16-medium) [128, 40, 40] 37 | 38 | [-1, 1, SimConv, [128, 128, 3, 2]], # 21 39 | [[-1, 10], 1, Concat, [1]], # 22 cat head P5 40 | [-1, 12, RepBlock, [256, 256]], # 23 (P5/32-large) [256, 20, 20] 41 | [[17, 20, 23], 1, Detectv6, [nc, [64, 128, 256]]], # Detect(P3, P4, P5) 42 | ] 43 | -------------------------------------------------------------------------------- /configs/yolov6/yolov6m.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.67 # model depth multiple 4 | width_multiple: 0.75 # layer channel multiple no 5 | anchors: 1 # number of anchors 6 | 7 | # YOLOv6 backbone 8 | backbone: 9 | # [from, number, module, args] 10 | [[-1, 1, RepVGGBlock, [64, 3, 2]], # 0-P1/2 11 | [-1, 1, RepVGGBlock, [128, 3, 2]], # 1-P2/4 12 | [-1, 6, RepBlock , [64, 64]], # 2 13 | [-1, 1, RepVGGBlock, [256, 3, 2]], # 3-P3/8 14 | [-1, 12, RepBlock , [128, 128]], # 4 15 | [-1, 1, RepVGGBlock, [512, 3, 2] ], # 5-P3/16 16 | [-1, 18, RepBlock , [256, 256] ], # 6 17 | [-1, 1, RepVGGBlock, [1024, 3, 2] ], # 7-P3/32 18 | [-1, 6, RepBlock , [512, 512] ], # 8 19 | [-1, 1, SimSPPF , [512, 512, 5]], # 9 20 | ] 21 | 22 | # YOLOv6 head 23 | head: 24 | [[-1, 1, SimConv, [512, 128, 1, 1]], # 10 25 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 26 | [[-1, 6], 1, Concat, [1]], # 12 cat backbone P4 27 | [-1, 12, RepBlock, [384, 128]], # 13 28 | 29 | [-1, 1, SimConv, [128, 64, 1, 1]], # 14 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 4], 1, Concat, [1]], # 16 cat backbone P3 32 | [-1, 12, RepBlock, [192, 64]], # 17 (P3/8-small) [64, 80, 80] 33 | 34 | [-1, 1, SimConv, [64, 64, 3, 2]], # 18 35 | [[-1, 14], 1, Concat, [1]], # 19 cat head P4 36 | [-1, 12, RepBlock, [128, 128]], # 20 (P4/16-medium) [128, 40, 40] 37 | 38 | [-1, 1, SimConv, [128, 128, 3, 2]], # 21 39 | [[-1, 10], 1, Concat, [1]], # 22 cat head P5 40 | [-1, 12, RepBlock, [256, 256]], # 23 (P5/32-large) [256, 20, 20] 41 | [[17, 20, 23], 1, Detectv6, [nc, [64, 128, 256]]], # Detect(P3, P4, P5) 42 | ] 43 | -------------------------------------------------------------------------------- /configs/yolov6/yolov6n.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.25 # layer channel multiple no 5 | anchors: 1 # number of anchors 6 | 7 | # YOLOv6 backbone 8 | backbone: 9 | # [from, number, module, args] 10 | [[-1, 1, RepVGGBlock, [64, 3, 2]], # 0-P1/2 11 | [-1, 1, RepVGGBlock, [128, 3, 2]], # 1-P2/4 12 | [-1, 6, RepBlock , [64, 64]], # 2 13 | [-1, 1, RepVGGBlock, [256, 3, 2]], # 3-P3/8 14 | [-1, 12, RepBlock , [128, 128]], # 4 15 | [-1, 1, RepVGGBlock, [512, 3, 2] ], # 5-P3/16 16 | [-1, 18, RepBlock , [256, 256] ], # 6 17 | [-1, 1, RepVGGBlock, [1024, 3, 2] ], # 7-P3/32 18 | [-1, 6, RepBlock , [512, 512] ], # 8 19 | [-1, 1, SimSPPF , [512, 512, 5]], # 9 20 | ] 21 | 22 | # YOLOv6 head 23 | head: 24 | [[-1, 1, SimConv, [512, 128, 1, 1]], # 10 25 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 26 | [[-1, 6], 1, Concat, [1]], # 12 cat backbone P4 27 | [-1, 12, RepBlock, [384, 128]], # 13 28 | 29 | [-1, 1, SimConv, [128, 64, 1, 1]], # 14 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 4], 1, Concat, [1]], # 16 cat backbone P3 32 | [-1, 12, RepBlock, [192, 64]], # 17 (P3/8-small) [64, 80, 80] 33 | 34 | [-1, 1, SimConv, [64, 64, 3, 2]], # 18 35 | [[-1, 14], 1, Concat, [1]], # 19 cat head P4 36 | [-1, 12, RepBlock, [128, 128]], # 20 (P4/16-medium) [128, 40, 40] 37 | 38 | [-1, 1, SimConv, [128, 128, 3, 2]], # 21 39 | [[-1, 10], 1, Concat, [1]], # 22 cat head P5 40 | [-1, 12, RepBlock, [256, 256]], # 23 (P5/32-large) [256, 20, 20] 41 | [[17, 20, 23], 1, Detectv6, [nc, [64, 128, 256]]], # Detect(P3, P4, P5) 42 | ] 43 | -------------------------------------------------------------------------------- /configs/yolov6/yolov6s.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | anchors: 1 # number of anchors 6 | 7 | # YOLOv6 backbone 8 | backbone: 9 | # [from, number, module, args] 10 | [[-1, 1, RepVGGBlock, [32, 3, 2]], # 0-P1/2 11 | [-1, 1, RepVGGBlock, [64, 3, 2]], # 1-P2/4 12 | [-1, 6, RepBlock , [32, 32]], # 2 输入输出通道不变 13 | [-1, 1, RepVGGBlock, [128, 3, 2]], # 3-P3/8 14 | [-1, 12, RepBlock , [64, 64]], # 4 输入输出通道不变 15 | [-1, 1, RepVGGBlock, [256, 3, 2] ], # 5-P3/16 16 | [-1, 18, RepBlock , [128, 128] ], # 6 输入输出通道不变 17 | [-1, 1, RepVGGBlock, [512, 3, 2] ], # 7-P3/32 18 | [-1, 6, RepBlock , [256, 256] ], # 8 输入输出通道不变 19 | [-1, 1, SimSPPF , [256, 256, 5]], # 9 输入输出通道不变 20 | ] 21 | 22 | # YOLOv6 head 23 | head: 24 | [[-1, 1, SimConv, [256, 64, 1, 1]], # 10 25 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 26 | [[-1, 6], 1, Concat, [1]], # 12 cat backbone P4 27 | [-1, 12, RepBlock, [192, 64]], # 13 28 | 29 | [-1, 1, SimConv, [64, 32, 1, 1]], # 14 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 4], 1, Concat, [1]], # 16 cat backbone P3 32 | [-1, 12, RepBlock, [96, 32]], # 17 (P3/8-small) [64, 80, 80] 33 | 34 | [-1, 1, SimConv, [32, 32, 3, 2]], # 18 35 | [[-1, 14], 1, Concat, [1]], # 19 cat head P4 36 | [-1, 12, RepBlock, [64, 64]], # 20 (P4/16-medium) [128, 40, 40] 输入输出通道不变 37 | 38 | [-1, 1, SimConv, [64, 64, 3, 2]], # 21 39 | [[-1, 10], 1, Concat, [1]], # 22 cat head P5 40 | [-1, 12, RepBlock, [128, 128]], # 23 (P5/32-large) [256, 20, 20] 输入输出通道不变 41 | [[17, 20, 23], 1, Detectv6, [nc, [32, 64, 128]]], # Detect(P3, P4, P5) P17、20、23的输出通道 42 | ] 43 | -------------------------------------------------------------------------------- /configs/yolov6/yolov6x.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | depth_multiple: 1.33 # model depth multiple 4 | width_multiple: 1.25 # layer channel multiple no 5 | anchors: 1 # number of anchors 6 | 7 | # YOLOv6 backbone 8 | backbone: 9 | # [from, number, module, args] 10 | [[-1, 1, RepVGGBlock, [64, 3, 2]], # 0-P1/2 11 | [-1, 1, RepVGGBlock, [128, 3, 2]], # 1-P2/4 12 | [-1, 6, RepBlock , [64, 64]], # 2 13 | [-1, 1, RepVGGBlock, [256, 3, 2]], # 3-P3/8 14 | [-1, 12, RepBlock , [128, 128]], # 4 15 | [-1, 1, RepVGGBlock, [512, 3, 2] ], # 5-P3/16 16 | [-1, 18, RepBlock , [256, 256] ], # 6 17 | [-1, 1, RepVGGBlock, [1024, 3, 2] ], # 7-P3/32 18 | [-1, 6, RepBlock , [512, 512] ], # 8 19 | [-1, 1, SimSPPF , [512, 512, 5]], # 9 20 | ] 21 | 22 | # YOLOv6 head 23 | head: 24 | [[-1, 1, SimConv, [512, 128, 1, 1]], # 10 25 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 26 | [[-1, 6], 1, Concat, [1]], # 12 cat backbone P4 27 | [-1, 12, RepBlock, [384, 128]], # 13 28 | 29 | [-1, 1, SimConv, [128, 64, 1, 1]], # 14 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 4], 1, Concat, [1]], # 16 cat backbone P3 32 | [-1, 12, RepBlock, [192, 64]], # 17 (P3/8-small) [64, 80, 80] 33 | 34 | [-1, 1, SimConv, [64, 64, 3, 2]], # 18 35 | [[-1, 14], 1, Concat, [1]], # 19 cat head P4 36 | [-1, 12, RepBlock, [128, 128]], # 20 (P4/16-medium) [128, 40, 40] 37 | 38 | [-1, 1, SimConv, [128, 128, 3, 2]], # 21 39 | [[-1, 10], 1, Concat, [1]], # 22 cat head P5 40 | [-1, 12, RepBlock, [256, 256]], # 23 (P5/32-large) [256, 20, 20] 41 | [[17, 20, 23], 1, Detectv6, [nc, [64, 128, 256]]], # Detect(P3, P4, P5) 42 | ] 43 | -------------------------------------------------------------------------------- /configs/yolov7/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/configs/yolov7/.DS_Store -------------------------------------------------------------------------------- /configs/yolov7/v7_cfg/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/configs/yolov7/v7_cfg/.DS_Store -------------------------------------------------------------------------------- /configs/yolox/yoloxl.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 1 # number of classes 3 | depth_multiple: 1.0 # model depth multiple 4 | width_multiple: 1.0 # layer channel multiple 5 | anchors: 1 # number of anchors 6 | loss: ComputeXLoss 7 | 8 | # YOLOv5 backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 12 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 13 | [-1, 3, C3, [128]], 14 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 15 | [-1, 9, C3, [256]], 16 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 17 | [-1, 9, C3, [512]], 18 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 19 | [-1, 1, SPP, [1024, [5, 9, 13]]], 20 | [-1, 3, C3, [1024, False]], # 9 21 | ] 22 | 23 | # YOLOv5 head 24 | head: 25 | [[-1, 1, Conv, [512, 1, 1]], 26 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 27 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 28 | [-1, 3, C3, [512, False]], # 13 29 | 30 | [-1, 1, Conv, [256, 1, 1]], 31 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 32 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 33 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 34 | 35 | [-1, 1, Conv, [256, 3, 2]], 36 | [[-1, 14], 1, Concat, [1]], # cat head P4 37 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 38 | 39 | [-1, 1, Conv, [512, 3, 2]], 40 | [[-1, 10], 1, Concat, [1]], # cat head P5 41 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 42 | 43 | # yolox head 44 | [17, 1, Conv, [256, 1, 1]], # 24 lateral0 (P3/8-small) 45 | [20, 1, Conv, [256, 1, 1]], # 25 lateral1 (P4/16-medium) 46 | [23, 1, Conv, [256, 1, 1]], # 26 lateral2 (P5/32-large) 47 | 48 | [24, 2, Conv, [256, 3, 1]], # 27 cls0 (P3/8-small) 49 | [24, 2, Conv, [256, 3, 1]], # 28 reg0 (P3/8-small) 50 | 51 | [25, 2, Conv, [256, 3, 1]], # 29 cls1 (P4/16-medium) 52 | [25, 2, Conv, [256, 3, 1]], # 30 reg1 (P4/16-medium) 53 | 54 | [26, 2, Conv, [256, 3, 1]], # 31 cls2 (P5/32-large) 55 | [26, 2, Conv, [256, 3, 1]], # 32 reg2 (P5/32-large) 56 | 57 | [[27, 28, 29, 30, 31, 32], 1, DetectX, [nc, anchors]], # Detect(P3, P4, P5) 58 | ] 59 | -------------------------------------------------------------------------------- /configs/yolox/yoloxs.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 1 # number of classes 3 | depth_multiple: 0.33 # model depth multiple 4 | width_multiple: 0.50 # layer channel multiple 5 | anchors: 1 # number of anchors 6 | 7 | # YOLOv5 backbone 8 | backbone: 9 | # [from, number, module, args] 10 | [[-1, 1, Focus, [64, 3]], # 0-P1/2 11 | [-1, 1, Conv, [128, 3, 2]], # 1-P2/4 12 | [-1, 3, C3, [128]], 13 | [-1, 1, Conv, [256, 3, 2]], # 3-P3/8 14 | [-1, 9, C3, [256]], 15 | [-1, 1, Conv, [512, 3, 2]], # 5-P4/16 16 | [-1, 9, C3, [512]], 17 | [-1, 1, Conv, [1024, 3, 2]], # 7-P5/32 18 | [-1, 1, SPP, [1024, [5, 9, 13]]], 19 | [-1, 3, C3, [1024, False]], # 9 20 | ] 21 | 22 | # YOLOv5 head 23 | head: 24 | [[-1, 1, Conv, [512, 1, 1]], 25 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 26 | [[-1, 6], 1, Concat, [1]], # cat backbone P4 27 | [-1, 3, C3, [512, False]], # 13 28 | 29 | [-1, 1, Conv, [256, 1, 1]], 30 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 31 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 32 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 33 | 34 | [-1, 1, Conv, [256, 3, 2]], 35 | [[-1, 14], 1, Concat, [1]], # cat head P4 36 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 37 | 38 | [-1, 1, Conv, [512, 3, 2]], 39 | [[-1, 10], 1, Concat, [1]], # cat head P5 40 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 41 | 42 | # yolox head 43 | [17, 1, Conv, [256, 1, 1]], # 24 lateral0 (P3/8-small) 44 | [20, 1, Conv, [256, 1, 1]], # 25 lateral1 (P4/16-medium) 45 | [23, 1, Conv, [256, 1, 1]], # 26 lateral2 (P5/32-large) 46 | 47 | [24, 2, Conv, [256, 3, 1]], # 27 cls0 (P3/8-small) 48 | [24, 2, Conv, [256, 3, 1]], # 28 reg0 (P3/8-small) 49 | 50 | [25, 2, Conv, [256, 3, 1]], # 29 cls1 (P4/16-medium) 51 | [25, 2, Conv, [256, 3, 1]], # 30 reg1 (P4/16-medium) 52 | 53 | [26, 2, Conv, [256, 3, 1]], # 31 cls2 (P5/32-large) 54 | [26, 2, Conv, [256, 3, 1]], # 32 reg2 (P5/32-large) 55 | 56 | [[27, 28, 29, 30, 31, 32], 1, DetectX, [nc, anchors]], # Detect(P3, P4, P5) 57 | ] 58 | -------------------------------------------------------------------------------- /data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/data/.DS_Store -------------------------------------------------------------------------------- /data/.ipynb_checkpoints/coco128-checkpoint.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics 3 | # Example usage: python train.py --data coco128.yaml 4 | # parent 5 | # ├── yolov5 6 | # └── datasets 7 | # └── coco128 ← downloads here (7 MB) 8 | 9 | 10 | # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..] 11 | path: /root/autodl-tmp/coco128 # dataset root dir 12 | # path: ../COCO2017/ # dataset root dir 13 | train: images/train2017 # train images (relative to 'path') 128 images 14 | val: images/train2017 # val images (relative to 'path') 128 images 15 | test: # test images (optional) 16 | 17 | # Classes 18 | nc: 80 # number of classes 19 | #names: ['face'] # class names 20 | 21 | names: ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 22 | 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 23 | 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 24 | 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 25 | 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 26 | 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 27 | 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 28 | 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 29 | 'hair drier', 'toothbrush'] # class names 30 | 31 | -------------------------------------------------------------------------------- /data/coco128.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics 3 | # Example usage: python train.py --data coco128.yaml 4 | # parent 5 | # ├── yolov5 6 | # └── datasets 7 | # └── coco128 ← downloads here (7 MB) 8 | 9 | # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..] 10 | path: /Users/himwen/Study/Code代码/github/coco128 # dataset root dir 11 | # path: ../COCO2017/ # dataset root dir 12 | train: images/train2017 # train images (relative to 'path') 128 images 13 | val: images/train2017 # val images (relative to 'path') 128 images 14 | test: # test images (optional) 15 | 16 | # Classes 17 | nc: 80 # number of classes 18 | #names: ['face'] # class names 19 | 20 | names: ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 21 | 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 22 | 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 23 | 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 24 | 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 25 | 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 26 | 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 27 | 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 28 | 'hair drier', 'toothbrush'] # class names 29 | 30 | -------------------------------------------------------------------------------- /data/hyps/hyp.Objects365.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # Hyperparameters for Objects365 training 3 | # python train.py --weights yolov5m.pt --data Objects365.yaml --evolve 4 | # See Hyperparameter Evolution tutorial for details https://github.com/ultralytics/yolov5#tutorials 5 | 6 | lr0: 0.00258 7 | lrf: 0.17 8 | momentum: 0.779 9 | weight_decay: 0.00058 10 | warmup_epochs: 1.33 11 | warmup_momentum: 0.86 12 | warmup_bias_lr: 0.0711 13 | box: 0.0539 14 | cls: 0.299 15 | cls_pw: 0.825 16 | obj: 0.632 17 | obj_pw: 1.0 18 | iou_t: 0.2 19 | anchor_t: 3.44 20 | anchors: 3.2 21 | fl_gamma: 0.0 22 | hsv_h: 0.0188 23 | hsv_s: 0.704 24 | hsv_v: 0.36 25 | degrees: 0.0 26 | translate: 0.0902 27 | scale: 0.491 28 | shear: 0.0 29 | perspective: 0.0 30 | flipud: 0.0 31 | fliplr: 0.5 32 | mosaic: 1.0 33 | mixup: 0.0 34 | copy_paste: 0.0 35 | -------------------------------------------------------------------------------- /data/hyps/hyp.VOC.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # Hyperparameters for VOC training 3 | # python train.py --batch 128 --weights yolov5m6.pt --data VOC.yaml --epochs 50 --img 512 --hyp hyp.scratch-med.yaml --evolve 4 | # See Hyperparameter Evolution tutorial for details https://github.com/ultralytics/yolov5#tutorials 5 | 6 | # YOLOv5 Hyperparameter Evolution Results 7 | # Best generation: 319 8 | # Last generation: 434 9 | # metrics/precision, metrics/recall, metrics/mAP_0.5, metrics/mAP_0.5:0.95, val/box_loss, val/obj_loss, val/cls_loss 10 | # 0.86236, 0.86184, 0.91274, 0.72647, 0.0077056, 0.0042449, 0.0013846 11 | 12 | lr0: 0.00334 13 | lrf: 0.15135 14 | momentum: 0.74832 15 | weight_decay: 0.00025 16 | warmup_epochs: 3.3835 17 | warmup_momentum: 0.59462 18 | warmup_bias_lr: 0.18657 19 | box: 0.02 20 | cls: 0.21638 21 | cls_pw: 0.5 22 | obj: 0.51728 23 | obj_pw: 0.67198 24 | iou_t: 0.2 25 | anchor_t: 3.3744 26 | fl_gamma: 0.0 27 | hsv_h: 0.01041 28 | hsv_s: 0.54703 29 | hsv_v: 0.27739 30 | degrees: 0.0 31 | translate: 0.04591 32 | scale: 0.75544 33 | shear: 0.0 34 | perspective: 0.0 35 | flipud: 0.0 36 | fliplr: 0.5 37 | mosaic: 0.85834 38 | mixup: 0.04266 39 | copy_paste: 0.0 40 | anchors: 3.412 -------------------------------------------------------------------------------- /data/hyps/hyp.finetune.yaml: -------------------------------------------------------------------------------- 1 | 2 | # Hyperparameters for VOC finetuning 3 | # python train.py --batch 64 --weights yolov5m.pt --data VOC.yaml --img 512 --epochs 50 4 | # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials 5 | 6 | # Hyperparameter Evolution Results 7 | # Generations: 306 8 | # P R mAP.5 mAP.5:.95 box obj cls 9 | # Metrics: 0.6 0.936 0.896 0.684 0.0115 0.00805 0.00146 10 | 11 | lr0: 0.0032 12 | lrf: 0.12 13 | momentum: 0.843 14 | weight_decay: 0.00036 15 | warmup_epochs: 2.0 16 | warmup_momentum: 0.5 17 | warmup_bias_lr: 0.05 18 | box: 0.0296 19 | cls: 0.243 20 | cls_pw: 0.631 21 | obj: 0.301 22 | obj_pw: 0.911 23 | iou_t: 0.2 24 | anchor_t: 2.91 25 | # anchors: 3.63 26 | fl_gamma: 0.0 27 | hsv_h: 0.0138 28 | hsv_s: 0.664 29 | hsv_v: 0.464 30 | degrees: 0.373 31 | translate: 0.245 32 | scale: 0.898 33 | shear: 0.602 34 | perspective: 0.0 35 | flipud: 0.00856 36 | fliplr: 0.5 37 | mosaic: 1.0 38 | mixup: 0.243 39 | copy_paste: 0.0 40 | paste_in: 0.0 41 | -------------------------------------------------------------------------------- /data/hyps/hyp.finetune_objects365.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | lr0: 0.00258 4 | lrf: 0.17 5 | momentum: 0.779 6 | weight_decay: 0.00058 7 | warmup_epochs: 1.33 8 | warmup_momentum: 0.86 9 | warmup_bias_lr: 0.0711 10 | box: 0.0539 11 | cls: 0.299 12 | cls_pw: 0.825 13 | obj: 0.632 14 | obj_pw: 1.0 15 | iou_t: 0.2 16 | anchor_t: 3.44 17 | anchors: 3.2 18 | fl_gamma: 0.0 19 | hsv_h: 0.0188 20 | hsv_s: 0.704 21 | hsv_v: 0.36 22 | degrees: 0.0 23 | translate: 0.0902 24 | scale: 0.491 25 | shear: 0.0 26 | perspective: 0.0 27 | flipud: 0.0 28 | fliplr: 0.5 29 | mosaic: 1.0 30 | mixup: 0.0 31 | copy_paste: 0.0 32 | -------------------------------------------------------------------------------- /data/hyps/hyp.scaratch-v7.yaml: -------------------------------------------------------------------------------- 1 | lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3) 2 | lrf: 0.1 # final OneCycleLR learning rate (lr0 * lrf) 3 | momentum: 0.937 # SGD momentum/Adam beta1 4 | weight_decay: 0.0005 # optimizer weight decay 5e-4 5 | warmup_epochs: 3.0 # warmup epochs (fractions ok) 6 | warmup_momentum: 0.8 # warmup initial momentum 7 | warmup_bias_lr: 0.1 # warmup initial bias lr 8 | box: 0.05 # box loss gain 9 | cls: 0.3 # cls loss gain 10 | cls_pw: 1.0 # cls BCELoss positive_weight 11 | obj: 0.7 # obj loss gain (scale with pixels) 12 | obj_pw: 1.0 # obj BCELoss positive_weight 13 | iou_t: 0.20 # IoU training threshold 14 | anchor_t: 4.0 # anchor-multiple threshold 15 | fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5) 16 | hsv_h: 0.015 # image HSV-Hue augmentation (fraction) 17 | hsv_s: 0.7 # image HSV-Saturation augmentation (fraction) 18 | hsv_v: 0.4 # image HSV-Value augmentation (fraction) 19 | degrees: 0.0 # image rotation (+/- deg) 20 | translate: 0.2 # image translation (+/- fraction) 21 | scale: 0.5 # image scale (+/- gain) 22 | shear: 0.0 # image shear (+/- deg) 23 | perspective: 0.0 # image perspective (+/- fraction), range 0-0.001 24 | flipud: 0.0 # image flip up-down (probability) 25 | fliplr: 0.5 # image flip left-right (probability) 26 | mosaic: 1.0 # image mosaic (probability) 27 | mixup: 0.0 # image mixup (probability) 28 | copy_paste: 0.0 # image copy paste (probability) 29 | paste_in: 0.0 # image copy paste (probability) #from yolov7 -------------------------------------------------------------------------------- /data/hyps/hyp.scratch-high.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # Hyperparameters for high-augmentation COCO training from scratch 3 | # python train.py --batch 32 --cfg yolov5m6.yaml --weights '' --data coco.yaml --img 1280 --epochs 300 4 | # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials 5 | 6 | lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3) 7 | lrf: 0.1 # final OneCycleLR learning rate (lr0 * lrf) 8 | momentum: 0.937 # SGD momentum/Adam beta1 9 | weight_decay: 0.0005 # optimizer weight decay 5e-4 10 | warmup_epochs: 3.0 # warmup epochs (fractions ok) 11 | warmup_momentum: 0.8 # warmup initial momentum 12 | warmup_bias_lr: 0.1 # warmup initial bias lr 13 | box: 0.05 # box loss gain 14 | cls: 0.3 # cls loss gain 15 | cls_pw: 1.0 # cls BCELoss positive_weight 16 | obj: 0.7 # obj loss gain (scale with pixels) 17 | obj_pw: 1.0 # obj BCELoss positive_weight 18 | iou_t: 0.20 # IoU training threshold 19 | anchor_t: 4.0 # anchor-multiple threshold 20 | # anchors: 3 # anchors per output layer (0 to ignore) 21 | fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5) 22 | hsv_h: 0.015 # image HSV-Hue augmentation (fraction) 23 | hsv_s: 0.7 # image HSV-Saturation augmentation (fraction) 24 | hsv_v: 0.4 # image HSV-Value augmentation (fraction) 25 | degrees: 0.0 # image rotation (+/- deg) 26 | translate: 0.1 # image translation (+/- fraction) 27 | scale: 0.9 # image scale (+/- gain) 28 | shear: 0.0 # image shear (+/- deg) 29 | perspective: 0.0 # image perspective (+/- fraction), range 0-0.001 30 | flipud: 0.0 # image flip up-down (probability) 31 | fliplr: 0.5 # image flip left-right (probability) 32 | mosaic: 1.0 # image mosaic (probability) 33 | mixup: 0.1 # image mixup (probability) 34 | copy_paste: 0.1 # segment copy-paste (probability) -------------------------------------------------------------------------------- /data/hyps/hyp.scratch-low.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # Hyperparameters for low-augmentation COCO training from scratch 3 | # python train.py --batch 64 --cfg yolov5n6.yaml --weights '' --data coco.yaml --img 640 --epochs 300 --linear 4 | # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials 5 | 6 | lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3) 7 | lrf: 0.01 # final OneCycleLR learning rate (lr0 * lrf) 8 | momentum: 0.937 # SGD momentum/Adam beta1 9 | weight_decay: 0.0005 # optimizer weight decay 5e-4 10 | warmup_epochs: 3.0 # warmup epochs (fractions ok) 11 | warmup_momentum: 0.8 # warmup initial momentum 12 | warmup_bias_lr: 0.1 # warmup initial bias lr 13 | box: 0.05 # box loss gain 14 | cls: 0.5 # cls loss gain 15 | cls_pw: 1.0 # cls BCELoss positive_weight 16 | obj: 1.0 # obj loss gain (scale with pixels) 17 | obj_pw: 1.0 # obj BCELoss positive_weight 18 | iou_t: 0.20 # IoU training threshold 19 | anchor_t: 4.0 # anchor-multiple threshold 20 | # anchors: 3 # anchors per output layer (0 to ignore) 21 | fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5) 22 | hsv_h: 0.015 # image HSV-Hue augmentation (fraction) 23 | hsv_s: 0.7 # image HSV-Saturation augmentation (fraction) 24 | hsv_v: 0.4 # image HSV-Value augmentation (fraction) 25 | degrees: 0.0 # image rotation (+/- deg) 26 | translate: 0.1 # image translation (+/- fraction) 27 | scale: 0.5 # image scale (+/- gain) 28 | shear: 0.0 # image shear (+/- deg) 29 | perspective: 0.0 # image perspective (+/- fraction), range 0-0.001 30 | flipud: 0.0 # image flip up-down (probability) 31 | fliplr: 0.5 # image flip left-right (probability) 32 | mosaic: 1.0 # image mosaic (probability) 33 | mixup: 0.0 # image mixup (probability) 34 | copy_paste: 0.0 # segment copy-paste (probability) 35 | -------------------------------------------------------------------------------- /data/hyps/hyp.scratch-med.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # Hyperparameters for medium-augmentation COCO training from scratch 3 | # python train.py --batch 32 --cfg yolov5m6.yaml --weights '' --data coco.yaml --img 1280 --epochs 300 4 | # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials 5 | 6 | lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3) 7 | lrf: 0.1 # final OneCycleLR learning rate (lr0 * lrf) 8 | momentum: 0.937 # SGD momentum/Adam beta1 9 | weight_decay: 0.0005 # optimizer weight decay 5e-4 10 | warmup_epochs: 3.0 # warmup epochs (fractions ok) 11 | warmup_momentum: 0.8 # warmup initial momentum 12 | warmup_bias_lr: 0.1 # warmup initial bias lr 13 | box: 0.05 # box loss gain 14 | cls: 0.3 # cls loss gain 15 | cls_pw: 1.0 # cls BCELoss positive_weight 16 | obj: 0.7 # obj loss gain (scale with pixels) 17 | obj_pw: 1.0 # obj BCELoss positive_weight 18 | iou_t: 0.20 # IoU training threshold 19 | anchor_t: 4.0 # anchor-multiple threshold 20 | # anchors: 3 # anchors per output layer (0 to ignore) 21 | fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5) 22 | hsv_h: 0.015 # image HSV-Hue augmentation (fraction) 23 | hsv_s: 0.7 # image HSV-Saturation augmentation (fraction) 24 | hsv_v: 0.4 # image HSV-Value augmentation (fraction) 25 | degrees: 0.0 # image rotation (+/- deg) 26 | translate: 0.1 # image translation (+/- fraction) 27 | scale: 0.9 # image scale (+/- gain) 28 | shear: 0.0 # image shear (+/- deg) 29 | perspective: 0.0 # image perspective (+/- fraction), range 0-0.001 30 | flipud: 0.0 # image flip up-down (probability) 31 | fliplr: 0.5 # image flip left-right (probability) 32 | mosaic: 1.0 # image mosaic (probability) 33 | mixup: 0.1 # image mixup (probability) 34 | copy_paste: 0.0 # segment copy-paste (probability) 35 | -------------------------------------------------------------------------------- /data/hyps/hyp.scratch-p6.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # Hyperparameters for COCO training from scratch 3 | # python train.py --batch 32 --cfg yolov5m6.yaml --weights '' --data coco.yaml --img 1280 --epochs 300 4 | # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials 5 | 6 | lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3) 7 | lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf) 8 | momentum: 0.937 # SGD momentum/Adam beta1 9 | weight_decay: 0.0005 # optimizer weight decay 5e-4 10 | warmup_epochs: 3.0 # warmup epochs (fractions ok) 11 | warmup_momentum: 0.8 # warmup initial momentum 12 | warmup_bias_lr: 0.1 # warmup initial bias lr 13 | box: 0.05 # box loss gain 14 | cls: 0.3 # cls loss gain 15 | cls_pw: 1.0 # cls BCELoss positive_weight 16 | obj: 0.7 # obj loss gain (scale with pixels) 17 | obj_pw: 1.0 # obj BCELoss positive_weight 18 | iou_t: 0.20 # IoU training threshold 19 | anchor_t: 4.0 # anchor-multiple threshold 20 | # anchors: 3 # anchors per output layer (0 to ignore) 21 | fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5) 22 | hsv_h: 0.015 # image HSV-Hue augmentation (fraction) 23 | hsv_s: 0.7 # image HSV-Saturation augmentation (fraction) 24 | hsv_v: 0.4 # image HSV-Value augmentation (fraction) 25 | degrees: 0.0 # image rotation (+/- deg) 26 | translate: 0.1 # image translation (+/- fraction) 27 | scale: 0.9 # image scale (+/- gain) 28 | shear: 0.0 # image shear (+/- deg) 29 | perspective: 0.0 # image perspective (+/- fraction), range 0-0.001 30 | flipud: 0.0 # image flip up-down (probability) 31 | fliplr: 0.5 # image flip left-right (probability) 32 | mosaic: 1.0 # image mosaic (probability) 33 | mixup: 0.0 # image mixup (probability) 34 | copy_paste: 0.0 # segment copy-paste (probability) 35 | -------------------------------------------------------------------------------- /data/hyps/hyp.scratch.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # Hyperparameters for COCO training from scratch 3 | # python train.py --batch 40 --cfg yolov5m.yaml --weights '' --data coco.yaml --img 640 --epochs 300 4 | # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials 5 | 6 | lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3) 7 | lrf: 0.1 # final OneCycleLR learning rate (lr0 * lrf) 8 | momentum: 0.937 # SGD momentum/Adam beta1 9 | weight_decay: 0.0005 # optimizer weight decay 5e-4 10 | warmup_epochs: 3.0 # warmup epochs (fractions ok) 11 | warmup_momentum: 0.8 # warmup initial momentum 12 | warmup_bias_lr: 0.1 # warmup initial bias lr 13 | box: 0.05 # box loss gain 14 | cls: 0.5 # cls loss gain 15 | cls_pw: 1.0 # cls BCELoss positive_weight 16 | obj: 1.0 # obj loss gain (scale with pixels) 17 | obj_pw: 1.0 # obj BCELoss positive_weight 18 | iou_t: 0.20 # IoU training threshold 19 | anchor_t: 4.0 # anchor-multiple threshold 20 | # anchors: 3 # anchors per output layer (0 to ignore) 21 | fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5) 22 | fl_eiou_gamma: 0.0 #focal eiou loss gamma 23 | hsv_h: 0.015 # image HSV-Hue augmentation (fraction) 24 | hsv_s: 0.7 # image HSV-Saturation augmentation (fraction) 25 | hsv_v: 0.4 # image HSV-Value augmentation (fraction) 26 | degrees: 0.0 # image rotation (+/- deg) 27 | translate: 0.1 # image translation (+/- fraction) 28 | scale: 0.5 # image scale (+/- gain) 29 | shear: 0.0 # image shear (+/- deg) 30 | perspective: 0.0 # image perspective (+/- fraction), range 0-0.001 31 | flipud: 0.0 # image flip up-down (probability) 32 | fliplr: 0.5 # image flip left-right (probability) 33 | mosaic: 1.0 # image mosaic (probability) 34 | mixup: 0.0 # image mixup (probability) 35 | copy_paste: 0.0 # segment copy-paste (probability) 36 | paste_in: 0.0 37 | -------------------------------------------------------------------------------- /data/images/bus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/data/images/bus.jpg -------------------------------------------------------------------------------- /data/images/zidane.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/data/images/zidane.jpg -------------------------------------------------------------------------------- /data/scripts/download_weights.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 3 | # Download latest models from https://github.com/ultralytics/yolov5/releases 4 | # Example usage: bash path/to/download_weights.sh 5 | # parent 6 | # └── yolov5 7 | # ├── yolov5s.pt ← downloads here 8 | # ├── yolov5m.pt 9 | # └── ... 10 | 11 | python - <=3.2.2 5 | numpy>=1.18.5 6 | opencv-python>=4.1.2 7 | Pillow>=7.1.2 8 | PyYAML>=5.3.1 9 | requests>=2.23.0 10 | scipy>=1.4.1 11 | torch>=1.7.0 12 | torchvision>=0.8.1 13 | tqdm>=4.41.0 14 | 15 | # Logging ------------------------------------- 16 | tensorboard>=2.4.1 17 | # wandb 18 | 19 | # Plotting ------------------------------------ 20 | pandas>=1.1.4 21 | seaborn>=0.11.0 22 | 23 | # Export -------------------------------------- 24 | # coremltools>=4.1 # CoreML export 25 | # onnx>=1.9.0 # ONNX export 26 | # onnx-simplifier>=0.3.6 # ONNX simplifier 27 | # scikit-learn==0.19.2 # CoreML quantization 28 | # tensorflow>=2.4.1 # TFLite export 29 | # tensorflowjs>=3.9.0 # TF.js export 30 | # openvino-dev # OpenVINO export 31 | 32 | # Extras -------------------------------------- 33 | # albumentations>=1.0.3 34 | # Cython # for pycocotools https://github.com/cocodataset/cocoapi/issues/172 35 | # pycocotools>=2.0 # COCO mAP 36 | # roboflow 37 | thop # FLOPs computation 38 | -------------------------------------------------------------------------------- /utils/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/.DS_Store -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | """ 3 | utils/initialization 4 | """ 5 | 6 | 7 | def notebook_init(verbose=True): 8 | # Check system software and hardware 9 | print('Checking setup...') 10 | 11 | import os 12 | import shutil 13 | 14 | from utils.general import check_requirements, emojis, is_colab 15 | from utils.torch_utils import select_device # imports 16 | 17 | check_requirements(('psutil', 'IPython')) 18 | import psutil 19 | from IPython import display # to display images and clear console output 20 | 21 | if is_colab(): 22 | shutil.rmtree('/content/sample_data', ignore_errors=True) # remove colab /sample_data directory 23 | 24 | # System info 25 | if verbose: 26 | gb = 1 << 30 # bytes to GiB (1024 ** 3) 27 | ram = psutil.virtual_memory().total 28 | total, used, free = shutil.disk_usage("/") 29 | display.clear_output() 30 | s = f'({os.cpu_count()} CPUs, {ram / gb:.1f} GB RAM, {(total - free) / gb:.1f}/{total / gb:.1f} GB disk)' 31 | else: 32 | s = '' 33 | 34 | select_device(newline=False) 35 | print(emojis(f'Setup complete 🚀 {s}')) 36 | return display 37 | -------------------------------------------------------------------------------- /utils/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/activations.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/activations.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/add_nms.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/add_nms.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/augmentations.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/augmentations.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/augmentations.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/augmentations.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/autoanchor.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/autoanchor.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/autoanchor.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/autoanchor.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/autobatch.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/autobatch.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/autobatch.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/autobatch.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/callbacks.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/callbacks.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/callbacks.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/callbacks.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/dataloaders.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/dataloaders.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/dataloaders.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/dataloaders.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/downloads.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/downloads.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/downloads.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/downloads.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/general.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/general.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/general.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/general.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/loss.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/loss.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/loss.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/loss.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/metrics.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/metrics.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/metrics.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/metrics.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/plots.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/plots.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/plots.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/plots.cpython-38.pyc -------------------------------------------------------------------------------- /utils/__pycache__/torch_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/torch_utils.cpython-37.pyc -------------------------------------------------------------------------------- /utils/__pycache__/torch_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/__pycache__/torch_utils.cpython-38.pyc -------------------------------------------------------------------------------- /utils/aws/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/aws/__init__.py -------------------------------------------------------------------------------- /utils/aws/mime.sh: -------------------------------------------------------------------------------- 1 | # AWS EC2 instance startup 'MIME' script https://aws.amazon.com/premiumsupport/knowledge-center/execute-user-data-ec2/ 2 | # This script will run on every instance restart, not only on first start 3 | # --- DO NOT COPY ABOVE COMMENTS WHEN PASTING INTO USERDATA --- 4 | 5 | Content-Type: multipart/mixed; boundary="//" 6 | MIME-Version: 1.0 7 | 8 | --// 9 | Content-Type: text/cloud-config; charset="us-ascii" 10 | MIME-Version: 1.0 11 | Content-Transfer-Encoding: 7bit 12 | Content-Disposition: attachment; filename="cloud-config.txt" 13 | 14 | #cloud-config 15 | cloud_final_modules: 16 | - [scripts-user, always] 17 | 18 | --// 19 | Content-Type: text/x-shellscript; charset="us-ascii" 20 | MIME-Version: 1.0 21 | Content-Transfer-Encoding: 7bit 22 | Content-Disposition: attachment; filename="userdata.txt" 23 | 24 | #!/bin/bash 25 | # --- paste contents of userdata.sh here --- 26 | --// 27 | -------------------------------------------------------------------------------- /utils/aws/resume.py: -------------------------------------------------------------------------------- 1 | # Resume all interrupted trainings in yolov5/ dir including DDP trainings 2 | # Usage: $ python utils/aws/resume.py 3 | 4 | import os 5 | import sys 6 | from pathlib import Path 7 | 8 | import torch 9 | import yaml 10 | 11 | FILE = Path(__file__).resolve() 12 | ROOT = FILE.parents[2] # YOLOv5 root directory 13 | if str(ROOT) not in sys.path: 14 | sys.path.append(str(ROOT)) # add ROOT to PATH 15 | 16 | port = 0 # --master_port 17 | path = Path('').resolve() 18 | for last in path.rglob('*/**/last.pt'): 19 | ckpt = torch.load(last) 20 | if ckpt['optimizer'] is None: 21 | continue 22 | 23 | # Load opt.yaml 24 | with open(last.parent.parent / 'opt.yaml', errors='ignore') as f: 25 | opt = yaml.safe_load(f) 26 | 27 | # Get device count 28 | d = opt['device'].split(',') # devices 29 | nd = len(d) # number of devices 30 | ddp = nd > 1 or (nd == 0 and torch.cuda.device_count() > 1) # distributed data parallel 31 | 32 | if ddp: # multi-GPU 33 | port += 1 34 | cmd = f'python -m torch.distributed.run --nproc_per_node {nd} --master_port {port} train.py --resume {last}' 35 | else: # single-GPU 36 | cmd = f'python train.py --resume {last}' 37 | 38 | cmd += ' > /dev/null 2>&1 &' # redirect output to dev/null and run in daemon thread 39 | print(cmd) 40 | os.system(cmd) 41 | -------------------------------------------------------------------------------- /utils/aws/userdata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # AWS EC2 instance startup script https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html 3 | # This script will run only once on first instance start (for a re-start script see mime.sh) 4 | # /home/ubuntu (ubuntu) or /home/ec2-user (amazon-linux) is working dir 5 | # Use >300 GB SSD 6 | 7 | cd home/ubuntu 8 | if [ ! -d yolov5 ]; then 9 | echo "Running first-time script." # install dependencies, download COCO, pull Docker 10 | git clone https://github.com/ultralytics/yolov5 -b master && sudo chmod -R 777 yolov5 11 | cd yolov5 12 | bash data/scripts/get_coco.sh && echo "COCO done." & 13 | sudo docker pull ultralytics/yolov5:latest && echo "Docker done." & 14 | python -m pip install --upgrade pip && pip install -r requirements.txt && python detect.py && echo "Requirements done." & 15 | wait && echo "All tasks done." # finish background tasks 16 | else 17 | echo "Running re-start script." # resume interrupted runs 18 | i=0 19 | list=$(sudo docker ps -qa) # container list i.e. $'one\ntwo\nthree\nfour' 20 | while IFS= read -r id; do 21 | ((i++)) 22 | echo "restarting container $i: $id" 23 | sudo docker start $id 24 | # sudo docker exec -it $id python train.py --resume # single-GPU 25 | sudo docker exec -d $id python utils/aws/resume.py # multi-scenario 26 | done <<<"$list" 27 | fi 28 | -------------------------------------------------------------------------------- /utils/docker/Dockerfile-arm64: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | # aarch64-compatible YOLOv5 Docker image for use with Apple M1 and other ARM architectures like Jetson Nano and Raspberry Pi 3 | 4 | # Start FROM Ubuntu image https://hub.docker.com/_/ubuntu 5 | FROM arm64v8/ubuntu:20.04 6 | 7 | # Downloads to user config dir 8 | ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/ 9 | 10 | # Install linux packages 11 | RUN apt update 12 | RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y tzdata 13 | RUN apt install --no-install-recommends -y python3-pip git zip curl htop gcc \ 14 | libgl1-mesa-glx libglib2.0-0 libpython3.8-dev 15 | # RUN alias python=python3 16 | 17 | # Install pip packages 18 | COPY requirements.txt . 19 | RUN python3 -m pip install --upgrade pip 20 | RUN pip install --no-cache -r requirements.txt gsutil notebook \ 21 | tensorflow-aarch64 22 | # tensorflowjs \ 23 | # onnx onnx-simplifier onnxruntime \ 24 | # coremltools openvino-dev \ 25 | 26 | # Create working directory 27 | RUN mkdir -p /usr/src/app 28 | WORKDIR /usr/src/app 29 | 30 | # Copy contents 31 | COPY . /usr/src/app 32 | RUN git clone https://github.com/ultralytics/yolov5 /usr/src/yolov5 33 | 34 | 35 | # Usage Examples ------------------------------------------------------------------------------------------------------- 36 | 37 | # Build and Push 38 | # t=ultralytics/yolov5:latest-M1 && sudo docker build --platform linux/arm64 -f utils/docker/Dockerfile-arm64 -t $t . && sudo docker push $t 39 | 40 | # Pull and Run 41 | # t=ultralytics/yolov5:latest-M1 && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/datasets:/usr/src/datasets $t 42 | -------------------------------------------------------------------------------- /utils/docker/Dockerfile-cpu: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | 3 | # Start FROM Ubuntu image https://hub.docker.com/_/ubuntu 4 | FROM ubuntu:20.04 5 | 6 | # Downloads to user config dir 7 | ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/ 8 | 9 | # Install linux packages 10 | RUN apt update 11 | RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y tzdata 12 | RUN apt install --no-install-recommends -y python3-pip git zip curl htop libgl1-mesa-glx libglib2.0-0 libpython3.8-dev 13 | # RUN alias python=python3 14 | 15 | # Install pip packages 16 | COPY requirements.txt . 17 | RUN python3 -m pip install --upgrade pip 18 | RUN pip install --no-cache -r requirements.txt albumentations gsutil notebook \ 19 | coremltools onnx onnx-simplifier onnxruntime openvino-dev tensorflow-cpu tensorflowjs \ 20 | --extra-index-url https://download.pytorch.org/whl/cpu 21 | 22 | # Create working directory 23 | RUN mkdir -p /usr/src/app 24 | WORKDIR /usr/src/app 25 | 26 | # Copy contents 27 | COPY . /usr/src/app 28 | RUN git clone https://github.com/ultralytics/yolov5 /usr/src/yolov5 29 | 30 | 31 | # Usage Examples ------------------------------------------------------------------------------------------------------- 32 | 33 | # Build and Push 34 | # t=ultralytics/yolov5:latest-cpu && sudo docker build -f utils/docker/Dockerfile-cpu -t $t . && sudo docker push $t 35 | 36 | # Pull and Run 37 | # t=ultralytics/yolov5:latest-cpu && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/datasets:/usr/src/datasets $t 38 | -------------------------------------------------------------------------------- /utils/flask_rest_api/README.md: -------------------------------------------------------------------------------- 1 | # Flask REST API 2 | 3 | [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) [API](https://en.wikipedia.org/wiki/API)s are 4 | commonly used to expose Machine Learning (ML) models to other services. This folder contains an example REST API 5 | created using Flask to expose the YOLOv5s model from [PyTorch Hub](https://pytorch.org/hub/ultralytics_yolov5/). 6 | 7 | ## Requirements 8 | 9 | [Flask](https://palletsprojects.com/p/flask/) is required. Install with: 10 | 11 | ```shell 12 | $ pip install Flask 13 | ``` 14 | 15 | ## Run 16 | 17 | After Flask installation run: 18 | 19 | ```shell 20 | $ python3 restapi.py --port 5000 21 | ``` 22 | 23 | Then use [curl](https://curl.se/) to perform a request: 24 | 25 | ```shell 26 | $ curl -X POST -F image=@zidane.jpg 'http://localhost:5000/v1/object-detection/yolov5s' 27 | ``` 28 | 29 | The model inference results are returned as a JSON response: 30 | 31 | ```json 32 | [ 33 | { 34 | "class": 0, 35 | "confidence": 0.8900438547, 36 | "height": 0.9318675399, 37 | "name": "person", 38 | "width": 0.3264600933, 39 | "xcenter": 0.7438579798, 40 | "ycenter": 0.5207948685 41 | }, 42 | { 43 | "class": 0, 44 | "confidence": 0.8440024257, 45 | "height": 0.7155083418, 46 | "name": "person", 47 | "width": 0.6546785235, 48 | "xcenter": 0.427829951, 49 | "ycenter": 0.6334488392 50 | }, 51 | { 52 | "class": 27, 53 | "confidence": 0.3771208823, 54 | "height": 0.3902671337, 55 | "name": "tie", 56 | "width": 0.0696444362, 57 | "xcenter": 0.3675483763, 58 | "ycenter": 0.7991207838 59 | }, 60 | { 61 | "class": 27, 62 | "confidence": 0.3527112305, 63 | "height": 0.1540903747, 64 | "name": "tie", 65 | "width": 0.0336618312, 66 | "xcenter": 0.7814827561, 67 | "ycenter": 0.5065554976 68 | } 69 | ] 70 | ``` 71 | 72 | An example python script to perform inference using [requests](https://docs.python-requests.org/en/master/) is given 73 | in `example_request.py` 74 | -------------------------------------------------------------------------------- /utils/flask_rest_api/example_request.py: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | """ 3 | Perform test request 4 | """ 5 | 6 | import pprint 7 | 8 | import requests 9 | 10 | DETECTION_URL = "http://localhost:5000/v1/object-detection/yolov5s" 11 | IMAGE = "zidane.jpg" 12 | 13 | # Read image 14 | with open(IMAGE, "rb") as f: 15 | image_data = f.read() 16 | 17 | response = requests.post(DETECTION_URL, files={"image": image_data}).json() 18 | 19 | pprint.pprint(response) 20 | -------------------------------------------------------------------------------- /utils/flask_rest_api/restapi.py: -------------------------------------------------------------------------------- 1 | # YOLOv5 🚀 by Ultralytics, GPL-3.0 license 2 | """ 3 | Run a Flask REST API exposing a YOLOv5s model 4 | """ 5 | 6 | import argparse 7 | import io 8 | 9 | import torch 10 | from flask import Flask, request 11 | from PIL import Image 12 | 13 | app = Flask(__name__) 14 | 15 | DETECTION_URL = "/v1/object-detection/yolov5s" 16 | 17 | 18 | @app.route(DETECTION_URL, methods=["POST"]) 19 | def predict(): 20 | if request.method != "POST": 21 | return 22 | 23 | if request.files.get("image"): 24 | # Method 1 25 | # with request.files["image"] as f: 26 | # im = Image.open(io.BytesIO(f.read())) 27 | 28 | # Method 2 29 | im_file = request.files["image"] 30 | im_bytes = im_file.read() 31 | im = Image.open(io.BytesIO(im_bytes)) 32 | 33 | results = model(im, size=640) # reduce size=320 for faster inference 34 | return results.pandas().xyxy[0].to_json(orient="records") 35 | 36 | 37 | if __name__ == "__main__": 38 | parser = argparse.ArgumentParser(description="Flask API exposing YOLOv5 model") 39 | parser.add_argument("--port", default=5000, type=int, help="port number") 40 | opt = parser.parse_args() 41 | 42 | # Fix known issue urllib.error.HTTPError 403: rate limit exceeded https://github.com/ultralytics/yolov5/pull/7210 43 | torch.hub._validate_not_a_forked_repo = lambda a, b, c: True 44 | 45 | model = torch.hub.load("ultralytics/yolov5", "yolov5s", force_reload=True) # force_reload to recache 46 | app.run(host="0.0.0.0", port=opt.port) # debug=True causes Restarting with stat 47 | -------------------------------------------------------------------------------- /utils/google_app_engine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gcr.io/google-appengine/python 2 | 3 | # Create a virtualenv for dependencies. This isolates these packages from 4 | # system-level packages. 5 | # Use -p python3 or -p python3.7 to select python version. Default is version 2. 6 | RUN virtualenv /env -p python3 7 | 8 | # Setting these environment variables are the same as running 9 | # source /env/bin/activate. 10 | ENV VIRTUAL_ENV /env 11 | ENV PATH /env/bin:$PATH 12 | 13 | RUN apt-get update && apt-get install -y python-opencv 14 | 15 | # Copy the application's requirements.txt and run pip to install all 16 | # dependencies into the virtualenv. 17 | ADD requirements.txt /app/requirements.txt 18 | RUN pip install -r /app/requirements.txt 19 | 20 | # Add the application source code. 21 | ADD . /app 22 | 23 | # Run a WSGI server to serve the application. gunicorn must be declared as 24 | # a dependency in requirements.txt. 25 | CMD gunicorn -b :$PORT main:app 26 | -------------------------------------------------------------------------------- /utils/google_app_engine/additional_requirements.txt: -------------------------------------------------------------------------------- 1 | # add these requirements in your app on top of the existing ones 2 | pip==21.1 3 | Flask==1.0.2 4 | gunicorn==19.9.0 5 | -------------------------------------------------------------------------------- /utils/google_app_engine/app.yaml: -------------------------------------------------------------------------------- 1 | runtime: custom 2 | env: flex 3 | 4 | service: yolov5app 5 | 6 | liveness_check: 7 | initial_delay_sec: 600 8 | 9 | manual_scaling: 10 | instances: 1 11 | resources: 12 | cpu: 1 13 | memory_gb: 4 14 | disk_size_gb: 20 -------------------------------------------------------------------------------- /utils/loggers/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/loggers/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /utils/loggers/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/loggers/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /utils/loggers/wandb/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/loggers/wandb/__init__.py -------------------------------------------------------------------------------- /utils/loggers/wandb/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/loggers/wandb/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /utils/loggers/wandb/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/loggers/wandb/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /utils/loggers/wandb/__pycache__/wandb_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/loggers/wandb/__pycache__/wandb_utils.cpython-37.pyc -------------------------------------------------------------------------------- /utils/loggers/wandb/__pycache__/wandb_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/utils/loggers/wandb/__pycache__/wandb_utils.cpython-38.pyc -------------------------------------------------------------------------------- /utils/loggers/wandb/log_dataset.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | from wandb_utils import WandbLogger 4 | 5 | from utils.general import LOGGER 6 | 7 | WANDB_ARTIFACT_PREFIX = 'wandb-artifact://' 8 | 9 | 10 | def create_dataset_artifact(opt): 11 | logger = WandbLogger(opt, None, job_type='Dataset Creation') # TODO: return value unused 12 | if not logger.wandb: 13 | LOGGER.info("install wandb using `pip install wandb` to log the dataset") 14 | 15 | 16 | if __name__ == '__main__': 17 | parser = argparse.ArgumentParser() 18 | parser.add_argument('--data', type=str, default='data/coco128.yaml', help='data.yaml path') 19 | parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset') 20 | parser.add_argument('--project', type=str, default='YOLOv5', help='name of W&B Project') 21 | parser.add_argument('--entity', default=None, help='W&B entity') 22 | parser.add_argument('--name', type=str, default='log dataset', help='name of W&B run') 23 | 24 | opt = parser.parse_args() 25 | opt.resume = False # Explicitly disallow resume check for dataset upload job 26 | 27 | create_dataset_artifact(opt) 28 | -------------------------------------------------------------------------------- /utils/loggers/wandb/sweep.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from pathlib import Path 3 | 4 | import wandb 5 | 6 | FILE = Path(__file__).resolve() 7 | ROOT = FILE.parents[3] # YOLOv5 root directory 8 | if str(ROOT) not in sys.path: 9 | sys.path.append(str(ROOT)) # add ROOT to PATH 10 | 11 | from train import parse_opt, train 12 | from utils.callbacks import Callbacks 13 | from utils.general import increment_path 14 | from utils.torch_utils import select_device 15 | 16 | 17 | def sweep(): 18 | wandb.init() 19 | # Get hyp dict from sweep agent. Copy because train() modifies parameters which confused wandb. 20 | hyp_dict = vars(wandb.config).get("_items").copy() 21 | 22 | # Workaround: get necessary opt args 23 | opt = parse_opt(known=True) 24 | opt.batch_size = hyp_dict.get("batch_size") 25 | opt.save_dir = str(increment_path(Path(opt.project) / opt.name, exist_ok=opt.exist_ok or opt.evolve)) 26 | opt.epochs = hyp_dict.get("epochs") 27 | opt.nosave = True 28 | opt.data = hyp_dict.get("data") 29 | opt.weights = str(opt.weights) 30 | opt.cfg = str(opt.cfg) 31 | opt.data = str(opt.data) 32 | opt.hyp = str(opt.hyp) 33 | opt.project = str(opt.project) 34 | device = select_device(opt.device, batch_size=opt.batch_size) 35 | 36 | # train 37 | train(hyp_dict, opt, device, callbacks=Callbacks()) 38 | 39 | 40 | if __name__ == "__main__": 41 | sweep() 42 | -------------------------------------------------------------------------------- /weights/yolov5s.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iloveai8086/YOLOC/e2b74796d2dcdacc0f298a8ffd7e570b7aa79155/weights/yolov5s.pt --------------------------------------------------------------------------------