├── val_fpn.py ├── val_yolo.py ├── predict_sn2yolo.py ├── datasets └── coco128 │ ├── labels │ └── train2017 │ │ ├── 000000000250.txt │ │ ├── 000000000508.txt │ │ ├── 000000000034.txt │ │ ├── 000000000042.txt │ │ ├── 000000000078.txt │ │ ├── 000000000081.txt │ │ ├── 000000000472.txt │ │ ├── 000000000502.txt │ │ ├── 000000000514.txt │ │ ├── 000000000575.txt │ │ ├── 000000000581.txt │ │ ├── 000000000595.txt │ │ ├── 000000000629.txt │ │ ├── 000000000636.txt │ │ ├── 000000000490.txt │ │ ├── 000000000030.txt │ │ ├── 000000000094.txt │ │ ├── 000000000471.txt │ │ ├── 000000000474.txt │ │ ├── 000000000589.txt │ │ ├── 000000000590.txt │ │ ├── 000000000025.txt │ │ ├── 000000000036.txt │ │ ├── 000000000072.txt │ │ ├── 000000000073.txt │ │ ├── 000000000092.txt │ │ ├── 000000000133.txt │ │ ├── 000000000194.txt │ │ ├── 000000000263.txt │ │ ├── 000000000322.txt │ │ ├── 000000000326.txt │ │ ├── 000000000370.txt │ │ ├── 000000000394.txt │ │ ├── 000000000400.txt │ │ ├── 000000000415.txt │ │ ├── 000000000436.txt │ │ ├── 000000000459.txt │ │ ├── 000000000620.txt │ │ ├── 000000000626.txt │ │ ├── 000000000650.txt │ │ ├── 000000000360.txt │ │ ├── 000000000086.txt │ │ ├── 000000000144.txt │ │ ├── 000000000151.txt │ │ ├── 000000000307.txt │ │ ├── 000000000321.txt │ │ ├── 000000000382.txt │ │ ├── 000000000387.txt │ │ ├── 000000000428.txt │ │ ├── 000000000431.txt │ │ ├── 000000000510.txt │ │ ├── 000000000529.txt │ │ ├── 000000000572.txt │ │ ├── 000000000154.txt │ │ ├── 000000000142.txt │ │ ├── 000000000359.txt │ │ ├── 000000000450.txt │ │ ├── 000000000605.txt │ │ ├── 000000000623.txt │ │ ├── 000000000136.txt │ │ ├── 000000000491.txt │ │ ├── 000000000349.txt │ │ ├── 000000000625.txt │ │ ├── 000000000064.txt │ │ ├── 000000000165.txt │ │ ├── 000000000208.txt │ │ ├── 000000000309.txt │ │ ├── 000000000562.txt │ │ ├── 000000000192.txt │ │ ├── 000000000061.txt │ │ ├── 000000000404.txt │ │ ├── 000000000599.txt │ │ ├── 000000000283.txt │ │ ├── 000000000560.txt │ │ ├── 000000000569.txt │ │ ├── 000000000338.txt │ │ ├── 000000000634.txt │ │ ├── 000000000312.txt │ │ ├── 000000000443.txt │ │ ├── 000000000260.txt │ │ ├── 000000000138.txt │ │ ├── 000000000332.txt │ │ ├── 000000000419.txt │ │ ├── 000000000597.txt │ │ ├── 000000000397.txt │ │ ├── 000000000077.txt │ │ ├── 000000000143.txt │ │ ├── 000000000074.txt │ │ ├── 000000000109.txt │ │ ├── 000000000201.txt │ │ ├── 000000000247.txt │ │ ├── 000000000486.txt │ │ ├── 000000000532.txt │ │ ├── 000000000009.txt │ │ ├── 000000000049.txt │ │ ├── 000000000488.txt │ │ ├── 000000000089.txt │ │ ├── 000000000612.txt │ │ ├── 000000000520.txt │ │ ├── 000000000328.txt │ │ ├── 000000000384.txt │ │ ├── 000000000536.txt │ │ ├── 000000000641.txt │ │ ├── 000000000368.txt │ │ ├── 000000000395.txt │ │ ├── 000000000308.txt │ │ ├── 000000000438.txt │ │ ├── 000000000446.txt │ │ ├── 000000000389.txt │ │ ├── 000000000584.txt │ │ ├── 000000000241.txt │ │ ├── 000000000531.txt │ │ ├── 000000000544.txt │ │ ├── 000000000071.txt │ │ ├── 000000000564.txt │ │ ├── 000000000357.txt │ │ ├── 000000000542.txt │ │ ├── 000000000127.txt │ │ ├── 000000000113.txt │ │ ├── 000000000643.txt │ │ ├── 000000000540.txt │ │ ├── 000000000294.txt │ │ ├── 000000000149.txt │ │ ├── 000000000110.txt │ │ ├── 000000000257.txt │ │ ├── 000000000315.txt │ │ ├── 000000000164.txt │ │ └── 000000000196.txt │ ├── images │ └── train2017 │ │ ├── .DS_Store │ │ ├── 000000000009.jpg │ │ ├── 000000000025.jpg │ │ ├── 000000000030.jpg │ │ ├── 000000000034.jpg │ │ ├── 000000000036.jpg │ │ ├── 000000000042.jpg │ │ ├── 000000000049.jpg │ │ ├── 000000000061.jpg │ │ ├── 000000000064.jpg │ │ ├── 000000000071.jpg │ │ ├── 000000000072.jpg │ │ ├── 000000000073.jpg │ │ ├── 000000000074.jpg │ │ ├── 000000000077.jpg │ │ ├── 000000000078.jpg │ │ ├── 000000000081.jpg │ │ ├── 000000000086.jpg │ │ ├── 000000000089.jpg │ │ ├── 000000000092.jpg │ │ ├── 000000000094.jpg │ │ ├── 000000000109.jpg │ │ ├── 000000000110.jpg │ │ ├── 000000000113.jpg │ │ ├── 000000000127.jpg │ │ ├── 000000000133.jpg │ │ ├── 000000000136.jpg │ │ ├── 000000000138.jpg │ │ ├── 000000000142.jpg │ │ ├── 000000000143.jpg │ │ ├── 000000000144.jpg │ │ ├── 000000000149.jpg │ │ ├── 000000000151.jpg │ │ ├── 000000000154.jpg │ │ ├── 000000000164.jpg │ │ ├── 000000000165.jpg │ │ ├── 000000000192.jpg │ │ ├── 000000000194.jpg │ │ ├── 000000000196.jpg │ │ ├── 000000000201.jpg │ │ ├── 000000000208.jpg │ │ ├── 000000000241.jpg │ │ ├── 000000000247.jpg │ │ ├── 000000000250.jpg │ │ ├── 000000000257.jpg │ │ ├── 000000000260.jpg │ │ ├── 000000000263.jpg │ │ ├── 000000000283.jpg │ │ ├── 000000000294.jpg │ │ ├── 000000000307.jpg │ │ ├── 000000000308.jpg │ │ ├── 000000000309.jpg │ │ ├── 000000000312.jpg │ │ ├── 000000000315.jpg │ │ ├── 000000000321.jpg │ │ ├── 000000000322.jpg │ │ ├── 000000000326.jpg │ │ ├── 000000000328.jpg │ │ ├── 000000000332.jpg │ │ ├── 000000000338.jpg │ │ ├── 000000000349.jpg │ │ ├── 000000000357.jpg │ │ ├── 000000000359.jpg │ │ ├── 000000000360.jpg │ │ ├── 000000000368.jpg │ │ ├── 000000000370.jpg │ │ ├── 000000000382.jpg │ │ ├── 000000000384.jpg │ │ ├── 000000000387.jpg │ │ ├── 000000000389.jpg │ │ ├── 000000000394.jpg │ │ ├── 000000000395.jpg │ │ ├── 000000000397.jpg │ │ ├── 000000000400.jpg │ │ ├── 000000000404.jpg │ │ ├── 000000000415.jpg │ │ ├── 000000000419.jpg │ │ ├── 000000000428.jpg │ │ ├── 000000000431.jpg │ │ ├── 000000000436.jpg │ │ ├── 000000000438.jpg │ │ ├── 000000000443.jpg │ │ ├── 000000000446.jpg │ │ ├── 000000000450.jpg │ │ ├── 000000000459.jpg │ │ ├── 000000000471.jpg │ │ ├── 000000000472.jpg │ │ ├── 000000000474.jpg │ │ ├── 000000000486.jpg │ │ ├── 000000000488.jpg │ │ ├── 000000000490.jpg │ │ ├── 000000000491.jpg │ │ ├── 000000000502.jpg │ │ ├── 000000000508.jpg │ │ ├── 000000000510.jpg │ │ ├── 000000000514.jpg │ │ ├── 000000000520.jpg │ │ ├── 000000000529.jpg │ │ ├── 000000000531.jpg │ │ ├── 000000000532.jpg │ │ ├── 000000000536.jpg │ │ ├── 000000000540.jpg │ │ ├── 000000000542.jpg │ │ ├── 000000000544.jpg │ │ ├── 000000000560.jpg │ │ ├── 000000000562.jpg │ │ ├── 000000000564.jpg │ │ ├── 000000000569.jpg │ │ ├── 000000000572.jpg │ │ ├── 000000000575.jpg │ │ ├── 000000000581.jpg │ │ ├── 000000000584.jpg │ │ ├── 000000000589.jpg │ │ ├── 000000000590.jpg │ │ ├── 000000000595.jpg │ │ ├── 000000000597.jpg │ │ ├── 000000000599.jpg │ │ ├── 000000000605.jpg │ │ ├── 000000000612.jpg │ │ ├── 000000000620.jpg │ │ ├── 000000000623.jpg │ │ ├── 000000000625.jpg │ │ ├── 000000000626.jpg │ │ ├── 000000000629.jpg │ │ ├── 000000000634.jpg │ │ ├── 000000000636.jpg │ │ ├── 000000000641.jpg │ │ ├── 000000000643.jpg │ │ └── 000000000650.jpg │ └── README.txt ├── slimneck_v2 ├── for_fpn │ └── fpnpytorch │ │ ├── lib │ │ ├── model │ │ │ ├── __init__.py │ │ │ ├── fpn │ │ │ │ └── __init__.py │ │ │ ├── nms │ │ │ │ ├── __init__.py │ │ │ │ ├── _ext │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── nms │ │ │ │ │ │ └── __init__.py │ │ │ │ ├── .gitignore │ │ │ │ ├── make.sh │ │ │ │ ├── src │ │ │ │ │ ├── nms_cuda_kernel.h │ │ │ │ │ └── nms_cuda.h │ │ │ │ ├── nms_gpu.py │ │ │ │ ├── nms_wrapper.py │ │ │ │ └── build.py │ │ │ ├── rpn │ │ │ │ └── __init__.py │ │ │ ├── utils │ │ │ │ ├── __init__.py │ │ │ │ ├── .gitignore │ │ │ │ └── blob.py │ │ │ ├── roi_align │ │ │ │ ├── __init__.py │ │ │ │ ├── _ext │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── roi_align │ │ │ │ │ │ └── __init__.py │ │ │ │ ├── functions │ │ │ │ │ └── __init__.py │ │ │ │ ├── modules │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── roi_align.py │ │ │ │ ├── make.sh │ │ │ │ ├── src │ │ │ │ │ ├── roi_align_cuda.h │ │ │ │ │ └── roi_align_kernel.h │ │ │ │ └── build.py │ │ │ ├── roi_crop │ │ │ │ ├── __init__.py │ │ │ │ ├── _ext │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── roi_crop │ │ │ │ │ │ └── __init__.py │ │ │ │ │ └── crop_resize │ │ │ │ │ │ └── __init__.py │ │ │ │ ├── functions │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── roi_crop.py │ │ │ │ │ └── crop_resize.py │ │ │ │ ├── modules │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── roi_crop.py │ │ │ │ ├── make.sh │ │ │ │ ├── src │ │ │ │ │ ├── roi_crop_cuda.h │ │ │ │ │ └── roi_crop.h │ │ │ │ └── build.py │ │ │ └── roi_pooling │ │ │ │ ├── __init__.py │ │ │ │ ├── _ext │ │ │ │ ├── __init__.py │ │ │ │ └── roi_pooling │ │ │ │ │ └── __init__.py │ │ │ │ ├── modules │ │ │ │ ├── __init__.py │ │ │ │ └── roi_pool.py │ │ │ │ ├── functions │ │ │ │ └── __init__.py │ │ │ │ ├── src │ │ │ │ ├── roi_pooling.h │ │ │ │ ├── roi_pooling_cuda.h │ │ │ │ └── roi_pooling_kernel.h │ │ │ │ └── build.py │ │ ├── pycocotools │ │ │ └── __init__.py │ │ ├── datasets │ │ │ ├── __init__.py │ │ │ ├── VOCdevkit-matlab-wrapper │ │ │ │ ├── xVOCap.m │ │ │ │ ├── get_voc_opts.m │ │ │ │ └── voc_eval.m │ │ │ ├── ds_utils.py │ │ │ └── tools │ │ │ │ └── mcg_munge.py │ │ ├── roi_data_layer │ │ │ └── __init__.py │ │ └── make.sh │ │ ├── .gitignore │ │ ├── cfgs │ │ ├── vgg16.yml │ │ ├── res50.yml │ │ ├── res101.yml │ │ └── res101_ls.yml │ │ ├── _init_paths.py │ │ ├── LICENSE │ │ └── README.md └── for_yolo │ ├── sn2-yolov9-11 │ └── README.md │ └── sn2-yolov5-v8 │ ├── ultralytics │ ├── nn │ │ └── __init__.py │ ├── yolo │ │ ├── engine │ │ │ └── __init__.py │ │ ├── data │ │ │ ├── dataloaders │ │ │ │ └── __init__.py │ │ │ ├── __init__.py │ │ │ ├── scripts │ │ │ │ ├── get_coco128.sh │ │ │ │ ├── download_weights.sh │ │ │ │ └── get_imagenet.sh │ │ │ └── dataset_wrappers.py │ │ ├── __init__.py │ │ ├── utils │ │ │ └── callbacks │ │ │ │ ├── __init__.py │ │ │ │ ├── tensorboard.py │ │ │ │ └── comet.py │ │ ├── v8 │ │ │ ├── detect │ │ │ │ └── __init__.py │ │ │ ├── segment │ │ │ │ └── __init__.py │ │ │ ├── __init__.py │ │ │ └── classify │ │ │ │ └── __init__.py │ │ └── configs │ │ │ └── __init__.py │ ├── assets │ │ ├── bus.jpg │ │ └── zidane.jpg │ ├── __init__.py │ └── models │ │ ├── v8 │ │ ├── cls │ │ │ ├── yolov8l-cls.yaml │ │ │ ├── yolov8m-cls.yaml │ │ │ ├── yolov8n-cls.yaml │ │ │ ├── yolov8s-cls.yaml │ │ │ └── yolov8x-cls.yaml │ │ ├── yolov8l.yaml │ │ ├── yolov8m.yaml │ │ ├── yolov8x.yaml │ │ ├── yolov8n.yaml │ │ ├── yolov8s.yaml │ │ ├── seg │ │ │ ├── yolov8l-seg.yaml │ │ │ ├── yolov8m-seg.yaml │ │ │ ├── yolov8x-seg.yaml │ │ │ ├── yolov8n-seg.yaml │ │ │ └── yolov8s-seg.yaml │ │ └── yolov8x6.yaml │ │ ├── v3 │ │ ├── yolov3-tiny.yaml │ │ ├── yolov3.yaml │ │ └── yolov3-spp.yaml │ │ └── v5 │ │ ├── yolov5l.yaml │ │ ├── yolov5m.yaml │ │ ├── yolov5n.yaml │ │ ├── yolov5x.yaml │ │ └── yolov5s.yaml │ ├── docs │ ├── CNAME │ ├── reference │ │ ├── model.md │ │ ├── exporter.md │ │ ├── results.md │ │ ├── base_val.md │ │ ├── base_pred.md │ │ ├── base_trainer.md │ │ └── nn.md │ ├── assets │ │ └── favicon.ico │ ├── stylesheets │ │ └── style.css │ └── app.md │ ├── models-cfg │ ├── sn2-yolov10.yaml │ ├── sn2-yolov9.yaml │ ├── yolov5n-ihp.yaml │ ├── sn2-yolov5n.yaml │ └── sn2-yolov8n.yaml │ ├── MANIFEST.in │ ├── val_sn2yolo.py │ ├── .github │ ├── ISSUE_TEMPLATE │ │ ├── config.yml │ │ └── question.yml │ ├── translate-readme.yml │ ├── dependabot.yml │ └── workflows │ │ ├── cla.yml │ │ └── docker.yaml │ ├── train_sn2yolo.py │ ├── CITATION.cff │ ├── requirements.txt │ ├── .pre-commit-config.yaml │ └── docker │ └── Dockerfile-cpu ├── figs ├── esd.pdf ├── sni.pdf ├── sni.png ├── gsconve.pdf ├── sniex.jpg ├── sniex.pdf └── all-archi.pdf ├── train_sn2yolo.py └── requirements.txt /val_fpn.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /val_yolo.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /predict_sn2yolo.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000250.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000508.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/fpn/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/rpn/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov9-11/README.md: -------------------------------------------------------------------------------- 1 | coming soon... -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/_ext/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/nn/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.so 3 | *.a 4 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/_ext/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/_ext/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_pooling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/CNAME: -------------------------------------------------------------------------------- 1 | docs.ultralytics.com -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/functions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/functions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_pooling/_ext/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_pooling/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/engine/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_pooling/functions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/models-cfg/sn2-yolov10.yaml: -------------------------------------------------------------------------------- 1 | # coming soon -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/models-cfg/sn2-yolov9.yaml: -------------------------------------------------------------------------------- 1 | # coming soon -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/.gitignore: -------------------------------------------------------------------------------- 1 | *.c 2 | *.cpp 3 | *.so 4 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/pycocotools/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'tylin' 2 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/data/dataloaders/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /figs/esd.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/figs/esd.pdf -------------------------------------------------------------------------------- /figs/sni.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/figs/sni.pdf -------------------------------------------------------------------------------- /figs/sni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/figs/sni.png -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/utils/.gitignore: -------------------------------------------------------------------------------- 1 | *.c 2 | *.cpp 3 | *.so 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000034.txt: -------------------------------------------------------------------------------- 1 | 22 0.346211 0.493259 0.689422 0.892118 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000042.txt: -------------------------------------------------------------------------------- 1 | 16 0.606687 0.341381 0.544156 0.51 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000078.txt: -------------------------------------------------------------------------------- 1 | 74 0.762851 0.196119 0.349886 0.385474 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000081.txt: -------------------------------------------------------------------------------- 1 | 4 0.516492 0.469388 0.912516 0.748282 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000472.txt: -------------------------------------------------------------------------------- 1 | 4 0.685102 0.320398 0.136266 0.139204 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000502.txt: -------------------------------------------------------------------------------- 1 | 21 0.568008 0.507892 0.426766 0.603607 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000514.txt: -------------------------------------------------------------------------------- 1 | 59 0.551931 0.664195 0.896139 0.622484 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000575.txt: -------------------------------------------------------------------------------- 1 | 15 0.283203 0.423216 0.552687 0.691657 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000581.txt: -------------------------------------------------------------------------------- 1 | 16 0.386237 0.56175 0.33167 0.51822 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000595.txt: -------------------------------------------------------------------------------- 1 | 62 0.685258 0.735312 0.220297 0.233167 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000629.txt: -------------------------------------------------------------------------------- 1 | 3 0.694297 0.786124 0.385562 0.367939 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000636.txt: -------------------------------------------------------------------------------- 1 | 61 0.444448 0.558563 0.552563 0.837844 2 | -------------------------------------------------------------------------------- /figs/gsconve.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/figs/gsconve.pdf -------------------------------------------------------------------------------- /figs/sniex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/figs/sniex.jpg -------------------------------------------------------------------------------- /figs/sniex.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/figs/sniex.pdf -------------------------------------------------------------------------------- /figs/all-archi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/figs/all-archi.pdf -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/reference/model.md: -------------------------------------------------------------------------------- 1 | ::: ultralytics.yolo.engine.model 2 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000490.txt: -------------------------------------------------------------------------------- 1 | 16 0.182 0.534343 0.18 0.288889 2 | 36 0.70079 0.530333 0.18242 0.507859 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000030.txt: -------------------------------------------------------------------------------- 1 | 58 0.519219 0.451121 0.39825 0.75729 2 | 75 0.501188 0.592138 0.26 0.456192 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000094.txt: -------------------------------------------------------------------------------- 1 | 2 0.590102 0.689578 0.066984 0.09007 2 | 7 0.911406 0.725422 0.129062 0.218993 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000471.txt: -------------------------------------------------------------------------------- 1 | 5 0.547992 0.511241 0.718172 0.496628 2 | 0 0.342398 0.415995 0.025328 0.10534 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000474.txt: -------------------------------------------------------------------------------- 1 | 0 0.504429 0.51461 0.988619 0.85842 2 | 35 0.162357 0.54031 0.265495 0.14262 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000589.txt: -------------------------------------------------------------------------------- 1 | 29 0.73943 0.4845 0.029297 0.013125 2 | 0 0.657227 0.57649 0.227234 0.383937 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000590.txt: -------------------------------------------------------------------------------- 1 | 71 0.289658 0.60159 0.208313 0.02314 2 | 45 0.292017 0.61358 0.227066 0.0552 3 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | from . import v8 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000025.txt: -------------------------------------------------------------------------------- 1 | 23 0.770336 0.489695 0.335891 0.697559 2 | 23 0.185977 0.901608 0.206297 0.129554 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000036.txt: -------------------------------------------------------------------------------- 1 | 25 0.475759 0.414523 0.951518 0.672422 2 | 0 0.671279 0.617945 0.645759 0.726859 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000072.txt: -------------------------------------------------------------------------------- 1 | 23 0.658478 0.592133 0.677002 0.779766 2 | 23 0.391581 0.556305 0.546862 0.887391 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000073.txt: -------------------------------------------------------------------------------- 1 | 3 0.497327 0.511852 0.948637 0.952609 2 | 3 0.240637 0.217617 0.475398 0.424859 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000092.txt: -------------------------------------------------------------------------------- 1 | 42 0.782797 0.638876 0.257312 0.722248 2 | 55 0.490266 0.344941 0.587719 0.685386 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000133.txt: -------------------------------------------------------------------------------- 1 | 59 0.51093 0.442073 0.978141 0.872188 2 | 77 0.858305 0.073521 0.074922 0.059833 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000194.txt: -------------------------------------------------------------------------------- 1 | 43 0.868227 0.932448 0.158453 0.135104 2 | 53 0.500844 0.535958 0.998312 0.901125 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000263.txt: -------------------------------------------------------------------------------- 1 | 20 0.632327 0.626688 0.735347 0.724219 2 | 20 0.330499 0.483117 0.655381 0.924672 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000322.txt: -------------------------------------------------------------------------------- 1 | 0 0.273141 0.516372 0.322344 0.573368 2 | 29 0.474578 0.441486 0.067562 0.026507 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000326.txt: -------------------------------------------------------------------------------- 1 | 0 0.523289 0.605539 0.569797 0.786347 2 | 40 0.554906 0.390925 0.385781 0.618525 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000370.txt: -------------------------------------------------------------------------------- 1 | 0 0.594594 0.519141 0.810813 0.961719 2 | 50 0.752552 0.592227 0.494896 0.381172 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000394.txt: -------------------------------------------------------------------------------- 1 | 16 0.488914 0.494869 0.977828 0.936809 2 | 29 0.645445 0.542463 0.555422 0.477889 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000400.txt: -------------------------------------------------------------------------------- 1 | 16 0.730893 0.294305 0.153009 0.123078 2 | 8 0.501129 0.474156 0.997743 0.746063 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000415.txt: -------------------------------------------------------------------------------- 1 | 38 0.225947 0.658273 0.116908 0.069391 2 | 0 0.171253 0.637891 0.342507 0.471281 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000436.txt: -------------------------------------------------------------------------------- 1 | 0 0.508443 0.493242 0.983115 0.977484 2 | 54 0.635679 0.427477 0.242225 0.113328 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000459.txt: -------------------------------------------------------------------------------- 1 | 27 0.374777 0.623273 0.119438 0.374703 2 | 0 0.498915 0.560672 0.997829 0.856188 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000620.txt: -------------------------------------------------------------------------------- 1 | 72 0.753187 0.459555 0.493625 0.910109 2 | 53 0.432146 0.508687 0.461667 0.226938 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000626.txt: -------------------------------------------------------------------------------- 1 | 74 0.520594 0.303323 0.064562 0.088479 2 | 74 0.635297 0.319094 0.032625 0.097729 3 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000650.txt: -------------------------------------------------------------------------------- 1 | 15 0.519398 0.544087 0.476359 0.572061 2 | 2 0.501859 0.820726 0.996281 0.332178 3 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/reference/exporter.md: -------------------------------------------------------------------------------- 1 | ### Exporter API Reference 2 | 3 | :::ultralytics.yolo.engine.exporter.Exporter -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/.DS_Store -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/utils/callbacks/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import add_integration_callbacks, default_callbacks 2 | -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000009.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000025.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000025.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000030.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000030.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000034.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000034.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000036.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000036.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000042.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000042.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000049.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000049.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000061.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000061.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000064.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000064.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000071.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000071.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000072.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000072.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000073.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000073.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000074.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000074.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000077.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000077.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000078.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000078.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000081.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000081.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000086.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000086.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000089.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000089.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000092.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000092.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000094.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000094.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000109.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000109.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000110.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000110.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000113.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000113.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000127.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000127.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000133.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000133.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000136.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000136.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000138.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000138.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000142.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000142.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000143.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000143.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000144.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000144.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000149.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000149.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000151.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000151.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000154.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000154.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000164.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000164.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000165.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000165.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000192.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000192.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000194.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000194.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000196.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000196.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000201.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000201.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000208.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000208.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000241.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000241.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000247.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000247.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000250.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000250.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000257.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000257.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000260.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000260.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000263.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000263.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000283.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000283.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000294.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000294.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000307.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000307.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000308.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000308.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000309.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000309.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000312.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000312.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000315.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000315.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000321.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000321.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000322.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000322.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000326.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000326.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000328.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000328.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000332.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000332.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000338.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000338.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000349.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000349.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000357.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000357.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000359.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000359.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000360.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000360.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000368.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000368.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000370.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000370.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000382.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000382.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000384.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000384.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000387.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000387.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000389.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000389.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000394.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000394.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000395.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000395.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000397.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000397.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000400.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000400.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000404.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000415.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000415.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000419.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000419.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000428.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000428.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000431.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000431.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000436.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000436.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000438.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000438.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000443.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000443.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000446.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000446.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000450.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000450.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000459.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000459.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000471.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000471.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000472.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000472.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000474.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000474.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000486.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000486.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000488.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000488.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000490.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000490.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000491.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000491.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000502.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000502.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000508.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000508.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000510.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000510.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000514.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000514.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000520.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000520.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000529.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000529.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000531.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000531.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000532.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000532.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000536.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000536.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000540.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000540.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000542.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000542.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000544.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000544.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000560.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000560.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000562.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000562.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000564.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000564.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000569.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000569.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000572.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000572.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000575.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000575.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000581.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000581.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000584.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000584.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000589.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000589.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000590.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000590.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000595.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000595.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000597.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000597.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000599.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000599.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000605.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000605.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000612.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000612.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000620.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000620.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000623.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000623.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000625.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000625.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000626.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000626.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000629.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000629.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000634.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000634.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000636.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000636.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000641.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000641.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000643.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000643.jpg -------------------------------------------------------------------------------- /datasets/coco128/images/train2017/000000000650.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/datasets/coco128/images/train2017/000000000650.jpg -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000360.txt: -------------------------------------------------------------------------------- 1 | 0 0.57414 0.419293 0.1042 0.098533 2 | 0 0.22258 0.757587 0.0532 0.057093 3 | 31 0.53309 0.46868 0.10438 0.11064 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000086.txt: -------------------------------------------------------------------------------- 1 | 0 0.423213 0.57982 0.252246 0.587453 2 | 3 0.541543 0.766937 0.574727 0.451 3 | 26 0.649219 0.546375 0.262891 0.172156 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000144.txt: -------------------------------------------------------------------------------- 1 | 23 0.650563 0.626781 0.573031 0.746438 2 | 23 0.536969 0.637385 0.469781 0.725229 3 | 23 0.38343 0.583146 0.615172 0.833708 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000151.txt: -------------------------------------------------------------------------------- 1 | 0 0.937271 0.137734 0.063667 0.08325 2 | 6 0.719542 0.503594 0.560917 0.992812 3 | 11 0.482646 0.541977 0.079417 0.055297 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000307.txt: -------------------------------------------------------------------------------- 1 | 16 0.768938 0.586875 0.268187 0.3495 2 | 2 0.637672 0.120135 0.075344 0.034521 3 | 29 0.604211 0.875281 0.109547 0.222479 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000321.txt: -------------------------------------------------------------------------------- 1 | 52 0.762352 0.666667 0.388234 0.501167 2 | 52 0.762352 0.382354 0.367047 0.505875 3 | 48 0.291234 0.485719 0.337 0.789604 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000382.txt: -------------------------------------------------------------------------------- 1 | 0 0.83507 0.841042 0.083547 0.169333 2 | 30 0.830586 0.927583 0.121453 0.052208 3 | 24 0.822352 0.785698 0.026859 0.048021 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000387.txt: -------------------------------------------------------------------------------- 1 | 63 0.682586 0.394385 0.586516 0.577521 2 | 63 0.605953 0.430167 0.735719 0.650792 3 | 67 0.683594 0.33074 0.328125 0.195312 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000428.txt: -------------------------------------------------------------------------------- 1 | 27 0.659195 0.771528 0.147891 0.429222 2 | 0 0.632656 0.539681 0.556125 0.897972 3 | 55 0.770273 0.820944 0.273641 0.337833 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000431.txt: -------------------------------------------------------------------------------- 1 | 32 0.570594 0.514087 0.019031 0.029923 2 | 0 0.363117 0.497057 0.245766 0.649023 3 | 38 0.527227 0.488419 0.126984 0.159614 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000510.txt: -------------------------------------------------------------------------------- 1 | 0 0.515203 0.582208 0.2365 0.621625 2 | 13 0.508992 0.682021 0.886516 0.420208 3 | 9 0.05225 0.079781 0.057313 0.119104 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000529.txt: -------------------------------------------------------------------------------- 1 | 3 0.46548 0.645531 0.848244 0.544594 2 | 0 0.522658 0.440125 0.537119 0.641625 3 | 0 0.378642 0.30618 0.637705 0.306422 4 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000572.txt: -------------------------------------------------------------------------------- 1 | 0 0.497506 0.514227 0.340304 0.846516 2 | 0 0.316557 0.668648 0.30178 0.541047 3 | 28 0.838735 0.765313 0.322529 0.346531 4 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/slimneck_v2/for_yolo/sn2-yolov5-v8/docs/assets/favicon.ico -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000154.txt: -------------------------------------------------------------------------------- 1 | 22 0.436815 0.746555 0.817518 0.506891 2 | 22 0.415152 0.410258 0.640796 0.217453 3 | 22 0.676944 0.196086 0.232295 0.099578 4 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/assets/bus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/assets/bus.jpg -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/assets/zidane.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alanli1997/rethinking-fpn/HEAD/slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/assets/zidane.jpg -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000142.txt: -------------------------------------------------------------------------------- 1 | 39 0.701552 0.337305 0.333479 0.396672 2 | 60 0.5 0.530422 1 0.353469 3 | 46 0.505229 0.73543 0.568 0.300453 4 | 48 0.534083 0.794016 0.757417 0.411969 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000359.txt: -------------------------------------------------------------------------------- 1 | 9 0.37311 0.354111 0.13074 0.103163 2 | 9 0.53852 0.334759 0.102 0.06747 3 | 9 0.56142 0.890166 0.00892 0.01238 4 | 2 0.12372 0.930422 0.24744 0.113193 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000450.txt: -------------------------------------------------------------------------------- 1 | 40 0.797922 0.079594 0.153031 0.145729 2 | 41 0.939078 0.20101 0.121844 0.402021 3 | 53 0.442508 0.505812 0.885016 0.954375 4 | 60 0.5 0.501125 1 0.99775 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000605.txt: -------------------------------------------------------------------------------- 1 | 60 0.5 0.502448 1 0.995104 2 | 41 0.63007 0.440312 0.351359 0.364875 3 | 44 0.453117 0.52624 0.092078 0.204229 4 | 41 0.751687 0.211229 0.222469 0.296625 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000623.txt: -------------------------------------------------------------------------------- 1 | 13 0.86172 0.38362 0.27656 0.47676 2 | 77 0.4764 0.52584 0.946827 0.92584 3 | 56 0.86248 0.36568 0.265653 0.47968 4 | 0 0.71516 0.49351 0.564507 0.98182 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000136.txt: -------------------------------------------------------------------------------- 1 | 0 0.05522 0.65123 0.10708 0.689037 2 | 0 0.06892 0.582019 0.13784 0.835963 3 | 23 0.34974 0.648984 0.37148 0.675615 4 | 23 0.76148 0.572072 0.25608 0.439171 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000491.txt: -------------------------------------------------------------------------------- 1 | 77 0.53007 0.511406 0.52238 0.950799 2 | 77 0.77515 0.250783 0.39914 0.496645 3 | 77 0.09187 0.305192 0.18374 0.579201 4 | 77 0.3722 0.194617 0.42652 0.383419 5 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.md 2 | include requirements.txt 3 | include LICENSE 4 | include setup.py 5 | recursive-include ultralytics *.yaml 6 | recursive-exclude __pycache__ * 7 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000349.txt: -------------------------------------------------------------------------------- 1 | 6 0.421352 0.540448 0.842703 0.537062 2 | 58 0.6685 0.665531 0.09825 0.163271 3 | 58 0.750336 0.629198 0.079047 0.130479 4 | 58 0.80107 0.635146 0.044859 0.083167 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000625.txt: -------------------------------------------------------------------------------- 1 | 0 0.725 0.697578 0.1875 0.479821 2 | 0 0.503906 0.646749 0.157812 0.607623 3 | 0 0.361859 0.732578 0.144281 0.417982 4 | 29 0.452195 0.275191 0.052734 0.048498 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000064.txt: -------------------------------------------------------------------------------- 1 | 2 0.292792 0.729031 0.367417 0.246281 2 | 7 0.239438 0.599242 0.259542 0.092922 3 | 11 0.279896 0.412773 0.077125 0.117453 4 | 74 0.394146 0.184914 0.321458 0.237984 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000165.txt: -------------------------------------------------------------------------------- 1 | 27 0.321953 0.526194 0.141688 0.405187 2 | 0 0.687836 0.600877 0.598703 0.798246 3 | 0 0.286062 0.515728 0.553312 0.941567 4 | 76 0.341414 0.502248 0.467797 0.533787 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000208.txt: -------------------------------------------------------------------------------- 1 | 71 0.500844 0.60899 0.998312 0.764062 2 | 71 0.23793 0.427583 0.475859 0.228667 3 | 79 0.396391 0.447198 0.299625 0.185188 4 | 79 0.213313 0.34026 0.247406 0.171438 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000309.txt: -------------------------------------------------------------------------------- 1 | 77 0.367442 0.532933 0.224283 0.355033 2 | 77 0.553933 0.475283 0.1955 0.235967 3 | 16 0.777608 0.222125 0.154717 0.206083 4 | 77 0.223017 0.607233 0.202367 0.430033 5 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000562.txt: -------------------------------------------------------------------------------- 1 | 79 0.423227 0.342477 0.185839 0.185453 2 | 79 0.538463 0.263258 0.185343 0.346859 3 | 79 0.248203 0.270102 0.19721 0.285391 4 | 41 0.514492 0.532648 0.731111 0.823266 5 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_pooling/src/roi_pooling.h: -------------------------------------------------------------------------------- 1 | int roi_pooling_forward(int pooled_height, int pooled_width, float spatial_scale, 2 | THFloatTensor * features, THFloatTensor * rois, THFloatTensor * output); -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000192.txt: -------------------------------------------------------------------------------- 1 | 0 0.648875 0.757302 0.205625 0.458437 2 | 0 0.744398 0.713219 0.122516 0.516729 3 | 0 0.029992 0.785385 0.057078 0.428146 4 | 0 0.505914 0.619375 0.173984 0.491 5 | 34 0.04875 0.891417 0.05625 0.193708 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000061.txt: -------------------------------------------------------------------------------- 1 | 0 0.445688 0.480615 0.075125 0.117295 2 | 0 0.640086 0.471742 0.050828 0.081434 3 | 20 0.643211 0.558852 0.129828 0.097623 4 | 20 0.459703 0.592121 0.22175 0.159242 5 | 0 0.435383 0.45832 0.053453 0.111025 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000404.txt: -------------------------------------------------------------------------------- 1 | 8 0.496162 0.629578 0.737535 0.135094 2 | 8 0.684789 0.598344 0.467512 0.071813 3 | 8 0.776596 0.576383 0.368732 0.046266 4 | 8 0.718721 0.571922 0.201338 0.025438 5 | 8 0.669155 0.564172 0.057981 0.017219 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000599.txt: -------------------------------------------------------------------------------- 1 | 58 0.912555 0.304939 0.173953 0.582948 2 | 15 0.323703 0.540553 0.644531 0.898649 3 | 57 0.484102 0.497002 0.968203 0.985012 4 | 65 0.826 0.594816 0.280094 0.215725 5 | 65 0.763406 0.485356 0.309375 0.148649 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000283.txt: -------------------------------------------------------------------------------- 1 | 39 0.243879 0.310086 0.192523 0.487109 2 | 56 0.070117 0.290289 0.139159 0.134922 3 | 56 0.673657 0.330523 0.652687 0.451609 4 | 60 0.496098 0.657641 0.992196 0.656469 5 | 40 0.488061 0.411484 0.206215 0.334719 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000560.txt: -------------------------------------------------------------------------------- 1 | 58 0.178391 0.504327 0.120261 0.199808 2 | 71 0.297717 0.729647 0.24813 0.210321 3 | 67 0.361152 0.612308 0.022826 0.018718 4 | 71 0.509391 0.495673 0.064696 0.014038 5 | 61 0.704239 0.520064 0.086783 0.117179 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000569.txt: -------------------------------------------------------------------------------- 1 | 0 0.200297 0.712146 0.125281 0.302875 2 | 33 0.318227 0.461302 0.046984 0.064896 3 | 33 0.278828 0.485896 0.026031 0.067875 4 | 33 0.245305 0.502354 0.035922 0.049375 5 | 33 0.230844 0.523781 0.040094 0.048521 6 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/v8/detect/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | from .predict import DetectionPredictor, predict 4 | from .train import DetectionTrainer, train 5 | from .val import DetectionValidator, val 6 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/v8/segment/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | from .predict import SegmentationPredictor, predict 4 | from .train import SegmentationTrainer, train 5 | from .val import SegmentationValidator, val 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000338.txt: -------------------------------------------------------------------------------- 1 | 72 0.414813 0.72896 0.149656 0.54208 2 | 74 0.734047 0.308853 0.036312 0.07526 3 | 0 0.581609 0.715352 0.141344 0.561774 4 | 0 0.730945 0.765627 0.088922 0.468746 5 | 69 0.146391 0.866284 0.217 0.240459 6 | 26 0.746844 0.768563 0.040094 0.120306 7 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000634.txt: -------------------------------------------------------------------------------- 1 | 0 0.474906 0.577531 0.680351 0.328094 2 | 36 0.551557 0.739773 0.3774 0.084484 3 | 0 0.37534 0.049539 0.050773 0.048078 4 | 0 0.896546 0.089906 0.206909 0.179375 5 | 0 0.438841 0.045594 0.049204 0.03775 6 | 0 0.212927 0.082453 0.059859 0.044656 7 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000312.txt: -------------------------------------------------------------------------------- 1 | 20 0.181414 0.676405 0.353828 0.48541 2 | 20 0.516023 0.666159 0.326328 0.423747 3 | 20 0.56668 0.784906 0.126422 0.190094 4 | 20 0.883914 0.646311 0.232172 0.467002 5 | 20 0.768664 0.706171 0.068766 0.33192 6 | 20 0.770625 0.727787 0.230813 0.287237 7 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000443.txt: -------------------------------------------------------------------------------- 1 | 15 0.601289 0.507552 0.581891 0.793104 2 | 0 0.589883 0.494385 0.812359 0.984271 3 | 0 0.881742 0.320229 0.236516 0.631458 4 | 65 0.891086 0.564917 0.217828 0.317875 5 | 57 0.446102 0.493792 0.888828 0.979667 6 | 0 0.115742 0.642802 0.224078 0.649396 7 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/v8/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | from ultralytics.yolo.configs import hydra_patch # noqa (patch hydra CLI) 4 | from ultralytics.yolo.v8 import classify, detect, segment 5 | 6 | __all__ = ["classify", "segment", "detect"] 7 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/make.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # CUDA_PATH=/usr/local/cuda/ 4 | 5 | cd src 6 | echo "Compiling stnm kernels by nvcc..." 7 | nvcc -c -o nms_cuda_kernel.cu.o nms_cuda_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_52 8 | 9 | cd ../ 10 | python build.py 11 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/src/nms_cuda_kernel.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | void nms_cuda_compute(int* keep_out, int *num_out, float* boxes_host, int boxes_num, 6 | int boxes_dim, float nms_overlap_thresh); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/make.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CUDA_PATH=/usr/local/cuda/ 4 | 5 | cd src 6 | echo "Compiling my_lib kernels by nvcc..." 7 | nvcc -c -o roi_align_kernel.cu.o roi_align_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_52 8 | 9 | cd ../ 10 | python build.py 11 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/reference/results.md: -------------------------------------------------------------------------------- 1 | ### Results API Reference 2 | 3 | :::ultralytics.yolo.engine.results.Results 4 | 5 | ### Boxes API Reference 6 | 7 | :::ultralytics.yolo.engine.results.Boxes 8 | 9 | ### Masks API Reference 10 | 11 | :::ultralytics.yolo.engine.results.Masks 12 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000260.txt: -------------------------------------------------------------------------------- 1 | 5 0.07066 0.518619 0.13228 0.474054 2 | 0 0.57375 0.674565 0.1035 0.509009 3 | 0 0.05825 0.468724 0.04734 0.083634 4 | 2 0.51001 0.549895 0.0663 0.047237 5 | 28 0.70801 0.78985 0.0869 0.185345 6 | 28 0.77623 0.774324 0.0567 0.209369 7 | 28 0.73022 0.677327 0.12156 0.12 8 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------- 2 | # Fast R-CNN 3 | # Copyright (c) 2015 Microsoft 4 | # Licensed under The MIT License [see LICENSE for details] 5 | # Written by Ross Girshick 6 | # -------------------------------------------------------- 7 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/make.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CUDA_PATH=/usr/local/cuda/ 4 | 5 | cd src 6 | echo "Compiling my_lib kernels by nvcc..." 7 | nvcc -c -o roi_crop_cuda_kernel.cu.o roi_crop_cuda_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_52 8 | 9 | cd ../ 10 | python build.py 11 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/roi_data_layer/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------- 2 | # Fast R-CNN 3 | # Copyright (c) 2015 Microsoft 4 | # Licensed under The MIT License [see LICENSE for details] 5 | # Written by Ross Girshick 6 | # -------------------------------------------------------- 7 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000138.txt: -------------------------------------------------------------------------------- 1 | 72 0.122172 0.393944 0.192281 0.429529 2 | 74 0.546672 0.093979 0.107031 0.119546 3 | 45 0.281648 0.338351 0.071234 0.034084 4 | 69 0.499961 0.617976 0.187109 0.624712 5 | 71 0.877086 0.401291 0.201766 0.093403 6 | 58 0.910391 0.130305 0.06875 0.1026 7 | 75 0.3675 0.13712 0.052562 0.082304 8 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000332.txt: -------------------------------------------------------------------------------- 1 | 41 0.273875 0.074938 0.271344 0.149875 2 | 41 0.958891 0.155625 0.082219 0.31125 3 | 45 0.502531 0.533708 0.994938 0.910125 4 | 51 0.505586 0.42824 0.485297 0.522354 5 | 41 0.709187 0.05499 0.188344 0.109813 6 | 42 0.019484 0.829865 0.038969 0.303896 7 | 51 0.177828 0.667969 0.168813 0.240312 8 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000419.txt: -------------------------------------------------------------------------------- 1 | 0 0.230375 0.430385 0.070625 0.318396 2 | 38 0.249766 0.264875 0.059531 0.034208 3 | 32 0.199219 0.197885 0.010219 0.014979 4 | 0 0.818789 0.660177 0.204703 0.366896 5 | 2 0.689875 0.436823 0.022812 0.029937 6 | 2 0.839852 0.43499 0.025578 0.022896 7 | 2 0.541586 0.434542 0.052109 0.024417 8 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000597.txt: -------------------------------------------------------------------------------- 1 | 20 0.559867 0.724113 0.063703 0.094597 2 | 20 0.653281 0.685323 0.108 0.173468 3 | 20 0.788078 0.691815 0.113875 0.174758 4 | 20 0.365687 0.671008 0.117656 0.191048 5 | 20 0.2565 0.693044 0.093031 0.139476 6 | 20 0.167117 0.706694 0.054453 0.105403 7 | 20 0.045711 0.692137 0.086203 0.134839 8 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000397.txt: -------------------------------------------------------------------------------- 1 | 56 0.858875 0.102146 0.224187 0.204292 2 | 53 0.499719 0.521344 0.985969 0.858438 3 | 41 0.028711 0.688562 0.057422 0.14975 4 | 41 0.867859 0.822083 0.235719 0.329875 5 | 42 0.965031 0.897042 0.069937 0.108542 6 | 60 0.395461 0.863635 0.787016 0.272729 7 | 0 0.182141 0.213885 0.352594 0.427771 8 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/src/nms_cuda.h: -------------------------------------------------------------------------------- 1 | // int nms_cuda(THCudaTensor *keep_out, THCudaTensor *num_out, 2 | // THCudaTensor *boxes_host, THCudaTensor *nms_overlap_thresh); 3 | 4 | int nms_cuda(THCudaIntTensor *keep_out, THCudaTensor *boxes_host, 5 | THCudaIntTensor *num_out, float nms_overlap_thresh); 6 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/data/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | from .base import BaseDataset 4 | from .build import build_classification_dataloader, build_dataloader 5 | from .dataset import ClassificationDataset, SemanticDataset, YOLODataset 6 | from .dataset_wrappers import MixAndRectDataset 7 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/reference/base_val.md: -------------------------------------------------------------------------------- 1 | All task Validators are inherited from `BaseValidator` class that contains the model validation routine boilerplate. You 2 | can override any function of these Trainers to suit your needs. 3 | 4 | --- 5 | 6 | ### BaseValidator API Reference 7 | 8 | :::ultralytics.yolo.engine.validator.BaseValidator -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000077.txt: -------------------------------------------------------------------------------- 1 | 0 0.53553 0.308733 0.2069 0.317147 2 | 0 0.73609 0.272987 0.18926 0.259413 3 | 36 0.13364 0.88656 0.10108 0.06464 4 | 36 0.50059 0.413213 0.05466 0.07608 5 | 0 0.14666 0.667293 0.194 0.441093 6 | 0 0.59734 0.325733 0.0494 0.111253 7 | 36 0.73492 0.39656 0.04812 0.040107 8 | 0 0.55563 0.265173 0.04586 0.220053 9 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/reference/base_pred.md: -------------------------------------------------------------------------------- 1 | All task Predictors are inherited from `BasePredictors` class that contains the model validation routine boilerplate. 2 | You can override any function of these Trainers to suit your needs. 3 | 4 | --- 5 | 6 | ### BasePredictor API Reference 7 | 8 | :::ultralytics.yolo.engine.predictor.BasePredictor -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/v8/classify/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | from ultralytics.yolo.v8.classify.predict import ClassificationPredictor, predict 4 | from ultralytics.yolo.v8.classify.train import ClassificationTrainer, train 5 | from ultralytics.yolo.v8.classify.val import ClassificationValidator, val 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000143.txt: -------------------------------------------------------------------------------- 1 | 14 0.820783 0.56129 0.218633 0.3527 2 | 14 0.293458 0.37634 0.159617 0.33484 3 | 14 0.525983 0.41653 0.166667 0.32554 4 | 14 0.486708 0.66271 0.16165 0.24138 5 | 14 0.267033 0.79969 0.1538 0.3225 6 | 14 0.139517 0.17415 0.159167 0.26742 7 | 14 0.2955 0.60918 0.1904 0.26864 8 | 14 0.859717 0.79617 0.157067 0.30918 9 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/nms_gpu.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import numpy as np 3 | from _ext import nms 4 | import pdb 5 | 6 | def nms_gpu(dets, thresh): 7 | keep = dets.new(dets.size(0), 1).zero_().int() 8 | num_out = dets.new(1).zero_().int() 9 | nms.nms_cuda(keep, dets, num_out, thresh) 10 | keep = keep[:num_out[0]] 11 | return keep 12 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/reference/base_trainer.md: -------------------------------------------------------------------------------- 1 | All task Trainers are inherited from `BaseTrainer` class that contains the model training and optimzation routine 2 | boilerplate. You can override any function of these Trainers to suit your needs. 3 | 4 | --- 5 | 6 | ### BaseTrainer API Reference 7 | 8 | :::ultralytics.yolo.engine.trainer.BaseTrainer -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/datasets/VOCdevkit-matlab-wrapper/xVOCap.m: -------------------------------------------------------------------------------- 1 | function ap = xVOCap(rec,prec) 2 | % From the PASCAL VOC 2011 devkit 3 | 4 | mrec=[0 ; rec ; 1]; 5 | mpre=[0 ; prec ; 0]; 6 | for i=numel(mpre)-1:-1:1 7 | mpre(i)=max(mpre(i),mpre(i+1)); 8 | end 9 | i=find(mrec(2:end)~=mrec(1:end-1))+1; 10 | ap=sum((mrec(i)-mrec(i-1)).*mpre(i)); 11 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000074.txt: -------------------------------------------------------------------------------- 1 | 16 0.32825 0.769577 0.463156 0.242207 2 | 1 0.128828 0.375258 0.249063 0.733333 3 | 0 0.476187 0.289613 0.028781 0.138099 4 | 0 0.52143 0.258251 0.021172 0.060869 5 | 0 0.569492 0.285235 0.024547 0.122254 6 | 0 0.746734 0.295869 0.049469 0.098357 7 | 0 0.444961 0.298779 0.023953 0.110047 8 | 0 0.450773 0.271209 0.018266 0.056925 9 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000109.txt: -------------------------------------------------------------------------------- 1 | 16 0.861211 0.73232 0.035797 0.044207 2 | 0 0.817984 0.691791 0.033187 0.078678 3 | 0 0.929648 0.6725 0.028422 0.054856 4 | 0 0.859836 0.609724 0.007109 0.019495 5 | 13 0.615359 0.657127 0.053844 0.057091 6 | 13 0.732055 0.705204 0.062953 0.055745 7 | 0 0.121414 0.493966 0.009828 0.036731 8 | 0 0.951336 0.666106 0.014359 0.027163 9 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000201.txt: -------------------------------------------------------------------------------- 1 | 31 0.642445 0.497757 0.241953 0.847196 2 | 31 0.558789 0.463306 0.228891 0.845631 3 | 31 0.490047 0.457991 0.148594 0.687944 4 | 31 0.446477 0.466554 0.134797 0.684556 5 | 31 0.39518 0.444825 0.129297 0.670257 6 | 0 0.971078 0.47597 0.0195 0.038715 7 | 0 0.924641 0.475257 0.018344 0.041869 8 | 31 0.493016 0.492839 0.147281 0.689743 9 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000247.txt: -------------------------------------------------------------------------------- 1 | 2 0.153867 0.480637 0.133922 0.083868 2 | 2 0.830969 0.44546 0.054688 0.042948 3 | 2 0.771828 0.441403 0.048313 0.053561 4 | 4 0.502234 0.494375 0.995531 0.986486 5 | 2 0.856453 0.413667 0.012687 0.014552 6 | 2 0.839664 0.412288 0.011641 0.015566 7 | 4 0.828281 0.267818 0.343438 0.132288 8 | 2 0.799281 0.409741 0.024344 0.01816 9 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000486.txt: -------------------------------------------------------------------------------- 1 | 72 0.661219 0.540585 0.0985 0.257283 2 | 69 0.806289 0.82192 0.387422 0.356159 3 | 39 0.987359 0.590995 0.025031 0.089391 4 | 43 0.354859 0.511148 0.010812 0.121686 5 | 39 0.797414 0.681768 0.036016 0.059274 6 | 39 0.133781 0.54733 0.008 0.068103 7 | 43 0.370891 0.489778 0.006094 0.038712 8 | 45 0.49707 0.805504 0.205297 0.206604 9 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000532.txt: -------------------------------------------------------------------------------- 1 | 5 0.495508 0.537823 0.721359 0.546063 2 | 0 0.455234 0.651458 0.069562 0.325542 3 | 0 0.229922 0.646854 0.071344 0.237542 4 | 0 0.359898 0.462552 0.028109 0.038312 5 | 0 0.250852 0.471458 0.019172 0.040958 6 | 5 0.076148 0.538552 0.151234 0.395854 7 | 26 0.25575 0.596667 0.032969 0.074042 8 | 26 0.199906 0.686667 0.023594 0.052833 9 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/datasets/VOCdevkit-matlab-wrapper/get_voc_opts.m: -------------------------------------------------------------------------------- 1 | function VOCopts = get_voc_opts(path) 2 | 3 | tmp = pwd; 4 | cd(path); 5 | try 6 | addpath('VOCcode'); 7 | VOCinit; 8 | catch 9 | rmpath('VOCcode'); 10 | cd(tmp); 11 | error(sprintf('VOCcode directory not found under %s', path)); 12 | end 13 | rmpath('VOCcode'); 14 | cd(tmp); 15 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/modules/roi_crop.py: -------------------------------------------------------------------------------- 1 | from torch.nn.modules.module import Module 2 | from ..functions.roi_crop import RoICropFunction 3 | 4 | class _RoICrop(Module): 5 | def __init__(self, layout = 'BHWD'): 6 | super(_RoICrop, self).__init__() 7 | def forward(self, input1, input2): 8 | return RoICropFunction()(input1, input2) 9 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000009.txt: -------------------------------------------------------------------------------- 1 | 45 0.479492 0.688771 0.955609 0.5955 2 | 45 0.736516 0.247188 0.498875 0.476417 3 | 50 0.637063 0.732938 0.494125 0.510583 4 | 45 0.339438 0.418896 0.678875 0.7815 5 | 49 0.646836 0.132552 0.118047 0.096937 6 | 49 0.773148 0.129802 0.090734 0.097229 7 | 49 0.668297 0.226906 0.131281 0.146896 8 | 49 0.642859 0.079219 0.148063 0.148062 9 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | __version__ = "8.0.8" 4 | 5 | from ultralytics.yolo.engine.model import YOLO 6 | from ultralytics.yolo.utils import ops 7 | from ultralytics.yolo.utils.checks import check_yolo as checks 8 | 9 | __all__ = ["__version__", "YOLO", "hub", "checks"] # allow simpler import 10 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/cfgs/vgg16.yml: -------------------------------------------------------------------------------- 1 | EXP_DIR: vgg16 2 | TRAIN: 3 | HAS_RPN: True 4 | BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True 5 | RPN_POSITIVE_OVERLAP: 0.7 6 | RPN_BATCHSIZE: 256 7 | PROPOSAL_METHOD: gt 8 | BG_THRESH_LO: 0.0 9 | BATCH_SIZE: 256 10 | LEARNING_RATE: 0.01 11 | TEST: 12 | HAS_RPN: True 13 | POOLING_MODE: align 14 | CROP_RESIZE_WITH_MAX_POOL: False 15 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000049.txt: -------------------------------------------------------------------------------- 1 | 17 0.597835 0.63755 0.342283 0.36886 2 | 17 0.324291 0.64808 0.219711 0.3164 3 | 0 0.620039 0.5939 0.172415 0.14608 4 | 0 0.385525 0.58557 0.14937 0.12586 5 | 0 0.328898 0.70199 0.031339 0.06714 6 | 58 0.622546 0.89961 0.185932 0.09446 7 | 0 0.760577 0.69423 0.028556 0.05486 8 | 0 0.510709 0.69215 0.018793 0.04682 9 | 0 0.929554 0.67602 0.038845 0.01844 10 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/_ext/nms/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from torch.utils.ffi import _wrap_function 3 | from ._nms import lib as _lib, ffi as _ffi 4 | 5 | __all__ = [] 6 | def _import_symbols(locals): 7 | for symbol in dir(_lib): 8 | fn = getattr(_lib, symbol) 9 | locals[symbol] = _wrap_function(fn, _ffi) 10 | __all__.append(symbol) 11 | 12 | _import_symbols(locals()) 13 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/_init_paths.py: -------------------------------------------------------------------------------- 1 | import os.path as osp 2 | import sys 3 | 4 | def add_path(path): 5 | if path not in sys.path: 6 | sys.path.insert(0, path) 7 | 8 | this_dir = osp.dirname(__file__) 9 | 10 | # Add lib to PYTHONPATH 11 | lib_path = osp.join(this_dir, 'lib') 12 | add_path(lib_path) 13 | 14 | coco_path = osp.join(this_dir, 'data', 'coco', 'PythonAPI') 15 | add_path(coco_path) 16 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/_ext/roi_crop/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from torch.utils.ffi import _wrap_function 3 | from ._roi_crop import lib as _lib, ffi as _ffi 4 | 5 | __all__ = [] 6 | def _import_symbols(locals): 7 | for symbol in dir(_lib): 8 | fn = getattr(_lib, symbol) 9 | locals[symbol] = _wrap_function(fn, _ffi) 10 | __all__.append(symbol) 11 | 12 | _import_symbols(locals()) 13 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/_ext/roi_align/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from torch.utils.ffi import _wrap_function 3 | from ._roi_align import lib as _lib, ffi as _ffi 4 | 5 | __all__ = [] 6 | def _import_symbols(locals): 7 | for symbol in dir(_lib): 8 | fn = getattr(_lib, symbol) 9 | locals[symbol] = _wrap_function(fn, _ffi) 10 | __all__.append(symbol) 11 | 12 | _import_symbols(locals()) 13 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/_ext/crop_resize/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from torch.utils.ffi import _wrap_function 3 | from ._crop_resize import lib as _lib, ffi as _ffi 4 | 5 | __all__ = [] 6 | def _import_symbols(locals): 7 | for symbol in dir(_lib): 8 | fn = getattr(_lib, symbol) 9 | locals[symbol] = _wrap_function(fn, _ffi) 10 | __all__.append(symbol) 11 | 12 | _import_symbols(locals()) 13 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_pooling/_ext/roi_pooling/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from torch.utils.ffi import _wrap_function 3 | from ._roi_pooling import lib as _lib, ffi as _ffi 4 | 5 | __all__ = [] 6 | def _import_symbols(locals): 7 | for symbol in dir(_lib): 8 | fn = getattr(_lib, symbol) 9 | locals[symbol] = _wrap_function(fn, _ffi) 10 | __all__.append(symbol) 11 | 12 | _import_symbols(locals()) 13 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/src/roi_align_cuda.h: -------------------------------------------------------------------------------- 1 | int roi_align_forward_cuda(int aligned_height, int aligned_width, float spatial_scale, 2 | THCudaTensor * features, THCudaTensor * rois, THCudaTensor * output); 3 | 4 | int roi_align_backward_cuda(int aligned_height, int aligned_width, float spatial_scale, 5 | THCudaTensor * top_grad, THCudaTensor * rois, THCudaTensor * bottom_grad); 6 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000488.txt: -------------------------------------------------------------------------------- 1 | 32 0.680102 0.631552 0.012953 0.01867 2 | 0 0.36418 0.679347 0.163484 0.322734 3 | 0 0.274594 0.74064 0.198437 0.272808 4 | 34 0.385367 0.612722 0.099141 0.113128 5 | 35 0.361008 0.702106 0.037734 0.050468 6 | 35 0.887125 0.633781 0.016406 0.01968 7 | 0 0.346883 0.574544 0.039703 0.174261 8 | 0 0.888102 0.593793 0.068953 0.12133 9 | 0 0.125453 0.7 0.142562 0.375271 10 | 0 0.354016 0.457796 0.006906 0.019729 11 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/cfgs/res50.yml: -------------------------------------------------------------------------------- 1 | EXP_DIR: res50 2 | TRAIN: 3 | HAS_RPN: True 4 | # IMS_PER_BATCH: 1 5 | BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True 6 | RPN_POSITIVE_OVERLAP: 0.7 7 | RPN_BATCHSIZE: 256 8 | PROPOSAL_METHOD: gt 9 | BG_THRESH_LO: 0.0 10 | DISPLAY: 20 11 | BATCH_SIZE: 256 12 | WEIGHT_DECAY: 0.0001 13 | DOUBLE_BIAS: False 14 | SNAPSHOT_PREFIX: res50_faster_rcnn 15 | TEST: 16 | HAS_RPN: True 17 | POOLING_MODE: crop 18 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000089.txt: -------------------------------------------------------------------------------- 1 | 43 0.805492 0.357625 0.040359 0.275792 2 | 43 0.760125 0.376135 0.030812 0.221062 3 | 43 0.84693 0.35051 0.041359 0.287271 4 | 43 0.884539 0.354979 0.032609 0.289542 5 | 43 0.917523 0.34999 0.042141 0.297479 6 | 69 0.478883 0.703823 0.525328 0.563062 7 | 68 0.092344 0.241927 0.184688 0.301896 8 | 73 0.815477 0.727354 0.141328 0.06325 9 | 73 0.865914 0.795917 0.178203 0.070208 10 | 73 0.900883 0.891187 0.198234 0.104417 11 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/cfgs/res101.yml: -------------------------------------------------------------------------------- 1 | EXP_DIR: res101 2 | TRAIN: 3 | HAS_RPN: True 4 | BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True 5 | RPN_POSITIVE_OVERLAP: 0.7 6 | RPN_BATCHSIZE: 256 7 | PROPOSAL_METHOD: gt 8 | BG_THRESH_LO: 0.0 9 | DISPLAY: 20 10 | BATCH_SIZE: 128 11 | WEIGHT_DECAY: 0.0001 12 | DOUBLE_BIAS: False 13 | LEARNING_RATE: 0.001 14 | TEST: 15 | HAS_RPN: True 16 | POOLING_SIZE: 7 17 | POOLING_MODE: align 18 | CROP_RESIZE_WITH_MAX_POOL: False 19 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/val_sn2yolo.py: -------------------------------------------------------------------------------- 1 | from ultralytics import YOLO 2 | 3 | # slim_neck_v2(SN) for yolo 4 | if __name__ == '__main__': 5 | model = YOLO("runs/sn2-yolo/weights/best.pt") # model.yaml config 6 | results = model.val( 7 | data="ultralytics/yolo/data/datasets/coco128.yaml", # datasets 8 | device='0', 9 | imgsz=640, 10 | batch=64, 11 | workers=16, 12 | name='sn2-yolo-val', 13 | half=False, 14 | ) -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: 📄Docs 4 | url: https://docs.ultralytics.com/ 5 | about: Full Ultralytics YOLOv8 Documentation 6 | - name: 💬 Forum 7 | url: https://community.ultralytics.com/ 8 | about: Ask on Ultralytics Community Forum 9 | - name: Stack Overflow 10 | url: https://stackoverflow.com/search?q=YOLOv8 11 | about: Ask on Stack Overflow with 'YOLOv8' tag 12 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_pooling/src/roi_pooling_cuda.h: -------------------------------------------------------------------------------- 1 | int roi_pooling_forward_cuda(int pooled_height, int pooled_width, float spatial_scale, 2 | THCudaTensor * features, THCudaTensor * rois, THCudaTensor * output, THCudaIntTensor * argmax); 3 | 4 | int roi_pooling_backward_cuda(int pooled_height, int pooled_width, float spatial_scale, 5 | THCudaTensor * top_grad, THCudaTensor * rois, THCudaTensor * bottom_grad, THCudaIntTensor * argmax); -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000612.txt: -------------------------------------------------------------------------------- 1 | 59 0.516891 0.739875 0.665531 0.5 2 | 77 0.556156 0.65676 0.111062 0.182729 3 | 77 0.455187 0.671396 0.096875 0.168958 4 | 77 0.516672 0.633417 0.193719 0.225917 5 | 77 0.612797 0.539677 0.114813 0.166896 6 | 77 0.688164 0.55575 0.053766 0.079375 7 | 77 0.363398 0.496229 0.161516 0.20125 8 | 77 0.546492 0.523333 0.067453 0.03675 9 | 77 0.655359 0.598187 0.090625 0.138 10 | 77 0.737375 0.703396 0.216438 0.216042 11 | 77 0.566086 0.431719 0.077953 0.119979 12 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000520.txt: -------------------------------------------------------------------------------- 1 | 14 0.49382 0.314292 0.050016 0.042208 2 | 14 0.386117 0.287854 0.053391 0.029083 3 | 0 0.390039 0.677031 0.023766 0.071396 4 | 14 0.716469 0.471865 0.029 0.037062 5 | 14 0.018312 0.406875 0.036281 0.03225 6 | 14 0.711508 0.379385 0.034328 0.033521 7 | 14 0.951742 0.383375 0.030703 0.021708 8 | 14 0.180062 0.429021 0.055969 0.047583 9 | 14 0.262891 0.396615 0.039844 0.024729 10 | 0 0.721891 0.679969 0.027906 0.039313 11 | 0 0.800156 0.688458 0.012656 0.028542 12 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000328.txt: -------------------------------------------------------------------------------- 1 | 67 0.706648 0.595662 0.054703 0.037963 2 | 0 0.244859 0.502128 0.349688 0.726904 3 | 0 0.469492 0.580835 0.320516 0.792953 4 | 0 0.721602 0.552953 0.390484 0.867699 5 | 13 0.460055 0.594969 0.918234 0.763218 6 | 73 0.451359 0.488106 0.135063 0.076212 7 | 2 0.626516 0.224267 0.157844 0.133625 8 | 27 0.736273 0.406202 0.028609 0.089226 9 | 27 0.510344 0.408758 0.035156 0.118086 10 | 24 0.112117 0.430092 0.186641 0.162179 11 | 24 0.143891 0.376314 0.13325 0.097434 12 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000384.txt: -------------------------------------------------------------------------------- 1 | 57 0.204596 0.826305 0.409193 0.341047 2 | 74 0.493274 0.452961 0.063363 0.043859 3 | 73 0.394025 0.861227 0.094507 0.027453 4 | 73 0.288105 0.857508 0.091996 0.037672 5 | 64 0.23991 0.733586 0.026996 0.015047 6 | 65 0.842276 0.782094 0.047646 0.011125 7 | 73 0.31065 0.832328 0.100942 0.032969 8 | 65 0.383374 0.834039 0.069978 0.010359 9 | 65 0.343767 0.854695 0.023274 0.008766 10 | 73 0.395762 0.809555 0.072287 0.026016 11 | 63 0.32046 0.747688 0.087601 0.030187 12 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000536.txt: -------------------------------------------------------------------------------- 1 | 56 0.818248 0.704598 0.348951 0.581935 2 | 0 0.826853 0.693705 0.346295 0.590089 3 | 0 0.499152 0.617054 0.242009 0.760774 4 | 0 0.306741 0.59625 0.219107 0.784286 5 | 26 0.098493 0.883988 0.098326 0.232024 6 | 26 0.528594 0.647589 0.155089 0.188155 7 | 26 0.818225 0.718661 0.101719 0.036607 8 | 67 0.476049 0.348571 0.030536 0.062917 9 | 67 0.252422 0.319509 0.064576 0.117113 10 | 56 0.093571 0.711176 0.184107 0.577649 11 | 67 0.815558 0.687158 0.017946 0.037113 12 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000641.txt: -------------------------------------------------------------------------------- 1 | 1 0.200758 0.625491 0.040734 0.140093 2 | 1 0.896867 0.644696 0.027328 0.050981 3 | 5 0.548531 0.501121 0.652219 0.534813 4 | 0 0.91232 0.560888 0.017484 0.030561 5 | 0 0.896828 0.603061 0.027281 0.080327 6 | 0 0.940219 0.559556 0.015219 0.030888 7 | 0 0.873758 0.567886 0.010984 0.053388 8 | 0 0.728437 0.557897 0.007875 0.061495 9 | 0 0.953398 0.55868 0.011141 0.033762 10 | 0 0.065008 0.511799 0.045922 0.053738 11 | 0 0.021906 0.517243 0.031875 0.053645 12 | 0 0.004938 0.538411 0.009875 0.044252 13 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/src/roi_crop_cuda.h: -------------------------------------------------------------------------------- 1 | // Bilinear sampling is done in BHWD (coalescing is not obvious in BDHW) 2 | // we assume BHWD format in inputImages 3 | // we assume BHW(YX) format on grids 4 | 5 | int BilinearSamplerBHWD_updateOutput_cuda(THCudaTensor *inputImages, THCudaTensor *grids, THCudaTensor *output); 6 | 7 | int BilinearSamplerBHWD_updateGradInput_cuda(THCudaTensor *inputImages, THCudaTensor *grids, THCudaTensor *gradInputImages, 8 | THCudaTensor *gradGrids, THCudaTensor *gradOutput); 9 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000368.txt: -------------------------------------------------------------------------------- 1 | 32 0.481063 0.411055 0.098833 0.077672 2 | 0 0.583583 0.380906 0.478375 0.4255 3 | 0 0.384729 0.212602 0.111958 0.171141 4 | 0 0.193021 0.337789 0.118792 0.055672 5 | 0 0.323625 0.296398 0.082375 0.128828 6 | 0 0.602583 0.176211 0.077208 0.128203 7 | 0 0.930615 0.293727 0.091896 0.154234 8 | 0 0.673833 0.376867 0.159542 0.372234 9 | 0 0.794187 0.291156 0.077458 0.15325 10 | 0 0.19875 0.265281 0.0605 0.103531 11 | 0 0.155104 0.265516 0.03925 0.099625 12 | 0 0.466875 0.211078 0.0415 0.046344 13 | 0 0.019542 0.287961 0.039083 0.145234 14 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/cfgs/res101_ls.yml: -------------------------------------------------------------------------------- 1 | EXP_DIR: res101 2 | TRAIN: 3 | HAS_RPN: True 4 | BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True 5 | RPN_POSITIVE_OVERLAP: 0.7 6 | RPN_BATCHSIZE: 256 7 | PROPOSAL_METHOD: gt 8 | BG_THRESH_LO: 0.0 9 | DISPLAY: 20 10 | BATCH_SIZE: 128 11 | WEIGHT_DECAY: 0.0001 12 | SCALES: [800] 13 | DOUBLE_BIAS: False 14 | LEARNING_RATE: 0.001 15 | TEST: 16 | HAS_RPN: True 17 | SCALES: [800] 18 | MAX_SIZE: 1200 19 | RPN_POST_NMS_TOP_N: 1000 20 | POOLING_SIZE: 7 21 | POOLING_MODE: align 22 | CROP_RESIZE_WITH_MAX_POOL: False 23 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000395.txt: -------------------------------------------------------------------------------- 1 | 67 0.470422 0.518578 0.031 0.039603 2 | 0 0.523391 0.613483 0.676125 0.750552 3 | 0 0.063133 0.597897 0.126266 0.480897 4 | 0 0.184836 0.643534 0.128984 0.352862 5 | 0 0.902508 0.672655 0.194984 0.65469 6 | 67 0.979633 0.537129 0.024734 0.019983 7 | 0 0.200016 0.441362 0.060719 0.080862 8 | 0 0.284094 0.507862 0.128312 0.188759 9 | 0 0.670172 0.427164 0.051469 0.182707 10 | 0 0.7045 0.453991 0.068594 0.195086 11 | 0 0.296867 0.630474 0.094359 0.115466 12 | 0 0.123273 0.479983 0.075609 0.218862 13 | 0 0.755555 0.513638 0.110609 0.154586 14 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/reference/nn.md: -------------------------------------------------------------------------------- 1 | # nn Module 2 | 3 | Ultralytics nn module contains 3 main components: 4 | 5 | 1. **AutoBackend**: A module that can run inference on all popular model formats 6 | 2. **BaseModel**: `BaseModel` class defines the operations supported by tasks like Detection and Segmentation 7 | 3. **modules**: Optimized and reusable neural network blocks built on PyTorch. 8 | 9 | ## AutoBackend 10 | 11 | :::ultralytics.nn.autobackend.AutoBackend 12 | 13 | ## BaseModel 14 | 15 | :::ultralytics.nn.tasks.BaseModel 16 | 17 | ## Modules 18 | 19 | TODO -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000308.txt: -------------------------------------------------------------------------------- 1 | 0 0.314906 0.531385 0.208937 0.928263 2 | 0 0.144594 0.555528 0.289188 0.888944 3 | 0 0.198789 0.348087 0.254641 0.624155 4 | 0 0.20068 0.287934 0.053922 0.206103 5 | 0 0.732797 0.519847 0.274688 0.929507 6 | 40 0.588633 0.595822 0.038203 0.140329 7 | 40 0.267453 0.482876 0.077594 0.233122 8 | 40 0.387227 0.419648 0.038828 0.137512 9 | 0 0.093484 0.771901 0.186969 0.433709 10 | 40 0.05282 0.549413 0.105547 0.298545 11 | 0 0.579289 0.378498 0.077953 0.413803 12 | 74 0.691852 0.573744 0.020453 0.030728 13 | 25 0.50007 0.235728 0.136891 0.175023 14 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000438.txt: -------------------------------------------------------------------------------- 1 | 54 0.411156 0.675896 0.230375 0.2175 2 | 54 0.153063 0.552448 0.188531 0.161396 3 | 54 0.378656 0.554531 0.229594 0.225271 4 | 54 0.388883 0.40674 0.218859 0.220563 5 | 54 0.186703 0.432417 0.189188 0.196625 6 | 54 0.177125 0.300896 0.19625 0.177 7 | 54 0.844383 0.531458 0.188766 0.240458 8 | 54 0.832984 0.318583 0.19075 0.21225 9 | 54 0.17807 0.796469 0.241828 0.249396 10 | 54 0.851273 0.797854 0.208109 0.300917 11 | 54 0.634969 0.821396 0.266531 0.258292 12 | 54 0.392531 0.850656 0.259094 0.189604 13 | 54 0.550859 0.513729 0.132656 0.394375 14 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000446.txt: -------------------------------------------------------------------------------- 1 | 0 0.451896 0.597008 0.588333 0.805984 2 | 65 0.743948 0.588086 0.092688 0.029047 3 | 73 0.551552 0.683148 0.021104 0.109703 4 | 73 0.154083 0.278789 0.015042 0.024547 5 | 73 0.076021 0.27925 0.019292 0.045125 6 | 73 0.064958 0.279477 0.0175 0.045797 7 | 73 0.107365 0.280766 0.059187 0.047188 8 | 73 0.125104 0.190445 0.196375 0.071797 9 | 73 0.18649 0.121867 0.028771 0.045047 10 | 57 0.09499 0.879836 0.183063 0.209859 11 | 58 0.925958 0.498328 0.121708 0.132469 12 | 58 0.845135 0.422563 0.130229 0.154219 13 | 58 0.944417 0.358805 0.111167 0.162297 14 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/train_sn2yolo.py: -------------------------------------------------------------------------------- 1 | from ultralytics import YOLO 2 | 3 | # slim_neck_v2(SN) for yolo 4 | if __name__ == '__main__': 5 | model = YOLO("models-cfg/sn2-yolov8n.yaml") # model.yaml config 6 | results = model.train( 7 | data="ultralytics/yolo/data/datasets/coco128.yaml", # datasets 8 | device='0', 9 | epochs=400, 10 | imgsz=640, 11 | batch=64, 12 | workers=16, 13 | # amp=False, 14 | optimizer='SGD', 15 | cache=True, 16 | name='sn2-yolo', 17 | resume=False, 18 | half=False, 19 | ) -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000389.txt: -------------------------------------------------------------------------------- 1 | 27 0.530258 0.81326 0.102234 0.373479 2 | 0 0.110391 0.766292 0.220781 0.462917 3 | 0 0.806555 0.804365 0.152672 0.391271 4 | 0 0.214297 0.697792 0.143281 0.355458 5 | 0 0.942922 0.693979 0.114156 0.260167 6 | 0 0.075586 0.405979 0.021984 0.092333 7 | 0 0.30443 0.643573 0.074984 0.098646 8 | 0 0.705258 0.586 0.067703 0.100375 9 | 0 0.641781 0.532667 0.050875 0.055583 10 | 0 0.93925 0.887135 0.120687 0.225062 11 | 24 0.663227 0.777552 0.120516 0.444896 12 | 0 0.507852 0.580937 0.575109 0.811667 13 | 0 0.815102 0.572406 0.013141 0.020063 14 | 0 0.865328 0.7145 0.115312 0.304125 15 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000584.txt: -------------------------------------------------------------------------------- 1 | 44 0.272852 0.08446 0.527703 0.16216 2 | 50 0.536797 0.70669 0.098156 0.12108 3 | 50 0.463555 0.580915 0.303047 0.253474 4 | 51 0.625687 0.844707 0.142531 0.192934 5 | 51 0.762328 0.686068 0.127344 0.181901 6 | 51 0.784656 0.536467 0.115906 0.183545 7 | 51 0.852633 0.665904 0.104766 0.179319 8 | 51 0.392148 0.376291 0.058922 0.08446 9 | 51 0.421758 0.199108 0.115141 0.154742 10 | 45 0.5 0.507864 1 0.94831 11 | 51 0.374008 0.492535 0.134422 0.182817 12 | 51 0.263648 0.537782 0.104266 0.162746 13 | 51 0.638195 0.15473 0.091734 0.104296 14 | 51 0.602 0.503779 0.086625 0.128638 15 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000241.txt: -------------------------------------------------------------------------------- 1 | 39 0.106344 0.932656 0.062271 0.134688 2 | 57 0.825125 0.623328 0.348333 0.462531 3 | 57 0.149771 0.638133 0.298167 0.406922 4 | 0 0.48524 0.499461 0.417563 0.978391 5 | 0 0.217229 0.683711 0.428458 0.543828 6 | 0 0.727677 0.61193 0.223229 0.401797 7 | 41 0.268917 0.96507 0.105667 0.069859 8 | 41 0.045312 0.966008 0.090292 0.067984 9 | 65 0.289917 0.519969 0.091917 0.034625 10 | 26 0.784573 0.791211 0.136063 0.114797 11 | 0 0.047031 0.741297 0.094062 0.317781 12 | 0 0.91199 0.707867 0.176021 0.359547 13 | 58 0.303687 0.268297 0.228833 0.314375 14 | 58 0.331958 0.603742 0.103708 0.112922 15 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_pooling/modules/roi_pool.py: -------------------------------------------------------------------------------- 1 | from torch.nn.modules.module import Module 2 | from ..functions.roi_pool import RoIPoolFunction 3 | 4 | 5 | class _RoIPooling(Module): 6 | def __init__(self, pooled_height, pooled_width, spatial_scale): 7 | super(_RoIPooling, self).__init__() 8 | 9 | self.pooled_width = int(pooled_width) 10 | self.pooled_height = int(pooled_height) 11 | self.spatial_scale = float(spatial_scale) 12 | 13 | def forward(self, features, rois, scale): 14 | return RoIPoolFunction(self.pooled_height, self.pooled_width, scale)(features, rois) 15 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000531.txt: -------------------------------------------------------------------------------- 1 | 1 0.096148 0.577531 0.039609 0.035062 2 | 0 0.441242 0.610219 0.061578 0.185812 3 | 1 0.048727 0.581052 0.039359 0.032438 4 | 0 0.158914 0.60201 0.058859 0.136771 5 | 0 0.402781 0.554979 0.019156 0.054792 6 | 32 0.4245 0.616625 0.002906 0.00575 7 | 0 0.34607 0.556073 0.016609 0.049604 8 | 0 0.708234 0.550083 0.020063 0.073792 9 | 0 0.797523 0.542563 0.019859 0.066458 10 | 38 0.471602 0.638062 0.023047 0.066208 11 | 0 0.618039 0.555833 0.018891 0.043458 12 | 0 0.027633 0.575719 0.035078 0.074604 13 | 38 0.097961 0.567479 0.106297 0.074333 14 | 38 0.398789 0.564906 0.006766 0.008813 15 | 1 0.990477 0.564375 0.016391 0.019917 16 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000544.txt: -------------------------------------------------------------------------------- 1 | 32 0.94293 0.696721 0.021578 0.017424 2 | 0 0.484273 0.759555 0.176922 0.377518 3 | 0 0.269125 0.83596 0.202406 0.260679 4 | 0 0.11932 0.797857 0.158859 0.334403 5 | 0 0.141641 0.501288 0.045062 0.104871 6 | 0 0.40918 0.492845 0.045578 0.117119 7 | 0 0.32525 0.523993 0.046938 0.064473 8 | 0 0.257008 0.502787 0.048672 0.098314 9 | 0 0.026266 0.60918 0.052312 0.182436 10 | 0 0.86825 0.520492 0.033969 0.04918 11 | 34 0.389859 0.713326 0.082406 0.017799 12 | 35 0.35707 0.796745 0.031672 0.071616 13 | 0 0.065344 0.624848 0.06675 0.139204 14 | 0 0.287078 0.530316 0.029531 0.058337 15 | 0 0.049359 0.509801 0.040063 0.106862 16 | 0 0.813289 0.510515 0.025609 0.069602 17 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000071.txt: -------------------------------------------------------------------------------- 1 | 2 0.752648 0.525833 0.043359 0.033216 2 | 2 0.835727 0.538498 0.038047 0.028169 3 | 2 0.700875 0.521455 0.036437 0.020235 4 | 2 0.937398 0.559777 0.042422 0.033592 5 | 6 0.452477 0.576408 0.755359 0.280892 6 | 2 0.794984 0.538779 0.036812 0.02615 7 | 2 0.953469 0.514906 0.026125 0.012723 8 | 7 0.539727 0.464061 0.037328 0.023897 9 | 7 0.58518 0.471397 0.037984 0.016596 10 | 2 0.982555 0.572371 0.034891 0.030047 11 | 2 0.767367 0.531279 0.037391 0.029695 12 | 2 0.617961 0.476373 0.025016 0.01007 13 | 2 0.588344 0.471491 0.030781 0.018333 14 | 2 0.560102 0.471303 0.030234 0.011995 15 | 2 0.796047 0.521796 0.029969 0.014577 16 | 2 0.734094 0.523427 0.029375 0.02723 17 | -------------------------------------------------------------------------------- /train_sn2yolo.py: -------------------------------------------------------------------------------- 1 | from ultralytics import YOLO 2 | 3 | if __name__ == '__main__': 4 | # 初始训练 5 | model = YOLO("slimneck_v2/for_yolo/sn2-yolov5-v8/models-cfg/sn2-yolov8n.yaml") # 加载预训练模型,如果本地没有会自动下载 6 | results = model.train( 7 | data="slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/data/datasets/coco128.yaml", 8 | # task='segment', 9 | # model='ultralytics/models/v8/seg/yolov8n-seg.yaml', 10 | device='0', 11 | epochs=200, 12 | imgsz=640, 13 | batch=16, 14 | workers=16, 15 | #amp=False, 16 | optimizer='SGD', 17 | cache=True, 18 | name='sn2-yolo', 19 | resume=False, 20 | half=False, 21 | 22 | ) -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000564.txt: -------------------------------------------------------------------------------- 1 | 0 0.585096 0.742031 0.283615 0.43625 2 | 0 0.914212 0.391609 0.171577 0.146719 3 | 38 0.672365 0.708156 0.202846 0.063781 4 | 56 0.16275 0.383633 0.083577 0.034797 5 | 56 0.252885 0.382375 0.087654 0.03975 6 | 56 0.435712 0.380219 0.091346 0.040656 7 | 56 0.525846 0.503047 0.108769 0.044188 8 | 56 0.309221 0.427586 0.096404 0.047266 9 | 56 0.219269 0.420742 0.097038 0.040328 10 | 56 0.120962 0.425578 0.090231 0.037 11 | 56 0.071904 0.385688 0.091808 0.035063 12 | 56 0.851952 0.511687 0.118288 0.072719 13 | 56 0.676125 0.453242 0.099096 0.033766 14 | 56 0.632846 0.501867 0.098808 0.042609 15 | 56 0.512096 0.417664 0.127808 0.120953 16 | 56 0.340683 0.395742 0.093673 0.064891 17 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/data/scripts/get_coco128.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Ultralytics YOLO 🚀, GPL-3.0 license 3 | # Download COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017) 4 | # Example usage: bash data/scripts/get_coco128.sh 5 | # parent 6 | # ├── yolov5 7 | # └── datasets 8 | # └── coco128 ← downloads here 9 | 10 | # Download/unzip images and labels 11 | d='../datasets' # unzip directory 12 | url=https://github.com/ultralytics/yolov5/releases/download/v1.0/ 13 | f='coco128.zip' # or 'coco128-segments.zip', 68 MB 14 | echo 'Downloading' $url$f ' ...' 15 | curl -L $url$f -o $f -# && unzip -q $f -d $d && rm $f & 16 | 17 | wait # finish background tasks 18 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | preferred-citation: 3 | type: software 4 | message: If you use this software, please cite it as below. 5 | authors: 6 | - family-names: Jocher 7 | given-names: Glenn 8 | orcid: "https://orcid.org/0000-0001-5950-6979" 9 | - family-names: Chaurasia 10 | given-names: Ayush 11 | orcid: "https://orcid.org/0000-0002-7603-6750" 12 | - family-names: Qiu 13 | given-names: Jing 14 | orcid: "https://orcid.org/0000-0003-3783-7069" 15 | title: "YOLO by Ultralytics" 16 | version: 8.0.0 17 | # doi: 10.5281/zenodo.3908559 # TODO 18 | date-released: 2023-1-10 19 | license: GPL-3.0 20 | url: "https://github.com/ultralytics/ultralytics" 21 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000357.txt: -------------------------------------------------------------------------------- 1 | 34 0.845453 0.619358 0.00625 0.124954 2 | 35 0.892836 0.870573 0.013922 0.030688 3 | 35 0.125352 0.466812 0.010891 0.042248 4 | 35 0.440953 0.125642 0.008531 0.021651 5 | 0 0.595023 0.178188 0.026953 0.126743 6 | 0 0.444703 0.169633 0.042219 0.170459 7 | 0 0.344438 0.174839 0.034687 0.142248 8 | 0 0.13107 0.473211 0.028953 0.22055 9 | 0 0.852109 0.750023 0.045375 0.250413 10 | 0 0.907797 0.821261 0.041813 0.17445 11 | 0 0.946813 0.81656 0.042469 0.213761 12 | 0 0.879648 0.132087 0.021703 0.044358 13 | 0 0.859398 0.156514 0.015078 0.12 14 | 0 0.939578 0.06094 0.014 0.04656 15 | 0 0.428398 0.092202 0.027641 0.125413 16 | 0 0.897008 0.188716 0.018547 0.108899 17 | 0 0.913047 0.202523 0.0105 0.109725 18 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000542.txt: -------------------------------------------------------------------------------- 1 | 4 0.502547 0.340444 0.994906 0.662913 2 | 0 0.401805 0.584236 0.107797 0.384463 3 | 0 0.27082 0.604473 0.075578 0.341219 4 | 0 0.738406 0.569669 0.062875 0.330331 5 | 0 0.593484 0.575 0.073969 0.276488 6 | 0 0.527797 0.573667 0.062813 0.27407 7 | 0 0.488664 0.57376 0.052266 0.294752 8 | 0 0.324 0.578771 0.068906 0.280558 9 | 0 0.74418 0.366963 0.067297 0.195165 10 | 0 0.470961 0.322727 0.105297 0.15781 11 | 0 0.459164 0.583027 0.048047 0.280723 12 | 26 0.295695 0.602986 0.027766 0.058326 13 | 26 0.311008 0.575919 0.028516 0.054318 14 | 27 0.730539 0.47436 0.001922 0.02095 15 | 26 0.770984 0.573388 0.031563 0.061901 16 | 0 0.704641 0.290393 0.030781 0.054256 17 | 0 0.451312 0.530269 0.022906 0.154711 18 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/src/roi_crop.h: -------------------------------------------------------------------------------- 1 | int BilinearSamplerBHWD_updateOutput(THFloatTensor *inputImages, THFloatTensor *grids, THFloatTensor *output); 2 | 3 | int BilinearSamplerBHWD_updateGradInput(THFloatTensor *inputImages, THFloatTensor *grids, THFloatTensor *gradInputImages, 4 | THFloatTensor *gradGrids, THFloatTensor *gradOutput); 5 | 6 | 7 | 8 | int BilinearSamplerBCHW_updateOutput(THFloatTensor *inputImages, THFloatTensor *grids, THFloatTensor *output); 9 | 10 | int BilinearSamplerBCHW_updateGradInput(THFloatTensor *inputImages, THFloatTensor *grids, THFloatTensor *gradInputImages, 11 | THFloatTensor *gradGrids, THFloatTensor *gradOutput); 12 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/nms/nms_wrapper.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------- 2 | # Fast R-CNN 3 | # Copyright (c) 2015 Microsoft 4 | # Licensed under The MIT License [see LICENSE for details] 5 | # Written by Ross Girshick 6 | # -------------------------------------------------------- 7 | import torch 8 | from model.utils.config import cfg 9 | from model.nms.nms_gpu import nms_gpu 10 | 11 | def nms(dets, thresh, force_cpu=False): 12 | """Dispatch to either CPU or GPU NMS implementations.""" 13 | if dets.shape[0] == 0: 14 | return [] 15 | # ---numpy version--- 16 | # original: return gpu_nms(dets, thresh, device_id=cfg.GPU_ID) 17 | # ---pytorch version--- 18 | return nms_gpu(dets, thresh) 19 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000127.txt: -------------------------------------------------------------------------------- 1 | 58 0.384211 0.176424 0.101078 0.146778 2 | 60 0.58357 0.652942 0.831141 0.694116 3 | 41 0.741516 0.589574 0.289375 0.259356 4 | 43 0.551609 0.760468 0.162844 0.330374 5 | 44 0.608008 0.659958 0.132672 0.171143 6 | 55 0.37832 0.694688 0.196797 0.293451 7 | 73 0.502742 0.49973 0.201672 0.192349 8 | 13 0.050273 0.394875 0.100547 0.170374 9 | 13 0.281094 0.19657 0.068719 0.034179 10 | 25 0.541289 0.108805 0.163828 0.217609 11 | 25 0.230813 0.064563 0.051125 0.115863 12 | 26 0.542062 0.426798 0.734312 0.339501 13 | 0 0.711789 0.055187 0.035547 0.074324 14 | 13 0.216469 0.257308 0.101562 0.102807 15 | 13 0.348836 0.344044 0.082422 0.075405 16 | 60 0.582313 0.222152 0.334781 0.048669 17 | 25 0.185305 0.049397 0.044516 0.092599 18 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/data/scripts/download_weights.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Ultralytics YOLO 🚀, GPL-3.0 license 3 | # Download latest models from https://github.com/ultralytics/yolov5/releases 4 | # Example usage: bash data/scripts/download_weights.sh 5 | # parent 6 | # └── yolov5 7 | # ├── yolov5s.pt ← downloads here 8 | # ├── yolov5m.pt 9 | # └── ... 10 | 11 | python - <=1.2.0 6 | matplotlib>=3.2.2 7 | numpy>=1.18.5 8 | opencv-python>=4.1.1 9 | Pillow>=7.1.2 10 | PyYAML>=5.3.1 11 | requests>=2.23.0 12 | scipy>=1.4.1 13 | torch>=1.7.0 14 | torchvision>=0.8.1 15 | tqdm>=4.64.0 16 | 17 | # Logging ------------------------------------- 18 | tensorboard>=2.4.1 19 | # clearml 20 | # comet 21 | 22 | # Plotting ------------------------------------ 23 | pandas>=1.1.4 24 | seaborn>=0.11.0 25 | 26 | # Export -------------------------------------- 27 | # coremltools>=6.0 # CoreML export 28 | # onnx>=1.12.0 # ONNX export 29 | # onnx-simplifier>=0.4.1 # ONNX simplifier 30 | # nvidia-pyindex # TensorRT export 31 | # nvidia-tensorrt # TensorRT export 32 | # scikit-learn==0.19.2 # CoreML quantization 33 | # tensorflow>=2.4.1 # TF exports (-cpu, -aarch64, -macos) 34 | # tensorflowjs>=3.9.0 # TF.js export 35 | # openvino-dev # OpenVINO export 36 | 37 | # Extras -------------------------------------- 38 | ipython # interactive notebook 39 | psutil # system utilization 40 | thop>=0.1.1 # FLOPs computation 41 | # albumentations>=1.0.3 42 | # pycocotools>=2.0.6 # COCO mAP 43 | # roboflow 44 | 45 | # HUB ----------------------------------------- 46 | GitPython>=3.1.24 47 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v3/yolov3-tiny.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | # YOLOv3-tiny backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Conv, [16, 3, 1]], # 0 12 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 1-P1/2 13 | [-1, 1, Conv, [32, 3, 1]], 14 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 3-P2/4 15 | [-1, 1, Conv, [64, 3, 1]], 16 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 5-P3/8 17 | [-1, 1, Conv, [128, 3, 1]], 18 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 7-P4/16 19 | [-1, 1, Conv, [256, 3, 1]], 20 | [-1, 1, nn.MaxPool2d, [2, 2, 0]], # 9-P5/32 21 | [-1, 1, Conv, [512, 3, 1]], 22 | [-1, 1, nn.ZeroPad2d, [[0, 1, 0, 1]]], # 11 23 | [-1, 1, nn.MaxPool2d, [2, 1, 0]], # 12 24 | ] 25 | 26 | # YOLOv3-tiny head 27 | head: 28 | [[-1, 1, Conv, [1024, 3, 1]], 29 | [-1, 1, Conv, [256, 1, 1]], 30 | [-1, 1, Conv, [512, 3, 1]], # 15 (P5/32-large) 31 | 32 | [-2, 1, Conv, [128, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 8], 1, Concat, [1]], # cat backbone P4 35 | [-1, 1, Conv, [256, 3, 1]], # 19 (P4/16-medium) 36 | 37 | [[19, 15], 1, Detect, [nc]], # Detect(P4, P5) 38 | ] 39 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/.github/ISSUE_TEMPLATE/question.yml: -------------------------------------------------------------------------------- 1 | name: ❓ Question 2 | description: Ask a YOLOv8 question 3 | # title: " " 4 | labels: [question] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thank you for asking a YOLOv8 ❓ Question! 10 | 11 | - type: checkboxes 12 | attributes: 13 | label: Search before asking 14 | description: > 15 | Please search the [issues](https://github.com/ultralytics/ultralytics/issues) and [discussions](https://github.com/ultralytics/ultralytics/discussions) to see if a similar question already exists. 16 | options: 17 | - label: > 18 | I have searched the YOLOv8 [issues](https://github.com/ultralytics/ultralytics/issues) and [discussions](https://github.com/ultralytics/ultralytics/discussions) and found no similar questions. 19 | required: true 20 | 21 | - type: textarea 22 | attributes: 23 | label: Question 24 | description: What is your question? 25 | placeholder: | 26 | 💡 ProTip! Include as much information as possible (screenshots, logs, tracebacks etc.) to receive the most helpful response. 27 | validations: 28 | required: true 29 | 30 | - type: textarea 31 | attributes: 32 | label: Additional 33 | description: Anything else you would like to share? 34 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/requirements.txt: -------------------------------------------------------------------------------- 1 | # Ultralytics requirements 2 | # Usage: pip install -r requirements.txt 3 | 4 | # Base ---------------------------------------- 5 | hydra-core>=1.2.0 6 | matplotlib>=3.2.2 7 | numpy>=1.18.5 8 | opencv-python>=4.1.1 9 | Pillow>=7.1.2 10 | PyYAML>=5.3.1 11 | requests>=2.23.0 12 | scipy>=1.4.1 13 | torch>=1.7.0 14 | torchvision>=0.8.1 15 | tqdm>=4.64.0 16 | 17 | # Logging ------------------------------------- 18 | tensorboard>=2.4.1 19 | # clearml 20 | # comet 21 | 22 | # Plotting ------------------------------------ 23 | pandas>=1.1.4 24 | seaborn>=0.11.0 25 | 26 | # Export -------------------------------------- 27 | # coremltools>=6.0 # CoreML export 28 | # onnx>=1.12.0 # ONNX export 29 | # onnx-simplifier>=0.4.1 # ONNX simplifier 30 | # nvidia-pyindex # TensorRT export 31 | # nvidia-tensorrt # TensorRT export 32 | # scikit-learn==0.19.2 # CoreML quantization 33 | # tensorflow>=2.4.1 # TF exports (-cpu, -aarch64, -macos) 34 | # tensorflowjs>=3.9.0 # TF.js export 35 | # openvino-dev # OpenVINO export 36 | 37 | # Extras -------------------------------------- 38 | ipython # interactive notebook 39 | psutil # system utilization 40 | thop>=0.1.1 # FLOPs computation 41 | # albumentations>=1.0.3 42 | # pycocotools>=2.0.6 # COCO mAP 43 | # roboflow 44 | 45 | # HUB ----------------------------------------- 46 | GitPython>=3.1.24 47 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000257.txt: -------------------------------------------------------------------------------- 1 | 9 0.157914 0.445062 0.036766 0.068292 2 | 9 0.098148 0.439604 0.039203 0.0495 3 | 24 0.314625 0.812406 0.07875 0.115604 4 | 7 0.549438 0.707177 0.320219 0.256188 5 | 7 0.896609 0.700875 0.204312 0.133083 6 | 0 0.273953 0.859979 0.11175 0.280042 7 | 0 0.392078 0.763167 0.044344 0.166083 8 | 0 0.348062 0.755698 0.034813 0.126021 9 | 0 0.42543 0.764771 0.025578 0.151833 10 | 0 0.475633 0.782583 0.051797 0.160417 11 | 0 0.90368 0.726896 0.023047 0.088 12 | 0 0.203523 0.716594 0.015828 0.077146 13 | 0 0.510633 0.774021 0.031516 0.155833 14 | 0 0.137188 0.730198 0.031719 0.100354 15 | 0 0.227945 0.718365 0.024297 0.080104 16 | 0 0.363711 0.754375 0.023766 0.144875 17 | 9 0.364094 0.629573 0.017656 0.023729 18 | 9 0.047539 0.638865 0.008891 0.014813 19 | 9 0.04975 0.5885 0.009094 0.0245 20 | 24 0.334562 0.730542 0.017656 0.040792 21 | 26 0.489055 0.764677 0.019547 0.028687 22 | 0 0.314289 0.730177 0.032234 0.082854 23 | 7 0.906219 0.837302 0.187563 0.325396 24 | 7 0.196648 0.689646 0.220672 0.124667 25 | 7 0.759375 0.682094 0.038719 0.029062 26 | 9 0.152258 0.386031 0.023484 0.030521 27 | 26 0.150109 0.730167 0.009187 0.026 28 | 0 0.850312 0.726604 0.022 0.082958 29 | 9 0.477383 0.558146 0.011078 0.029542 30 | 9 0.466867 0.557292 0.009984 0.025417 31 | 9 0.090375 0.62775 0.007625 0.008958 32 | 26 0.33518 0.741677 0.017516 0.060521 33 | 26 0.743234 0.714958 0.009594 0.009583 34 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/configs/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | from pathlib import Path 4 | from typing import Dict, Union 5 | 6 | from omegaconf import DictConfig, OmegaConf 7 | 8 | from ultralytics.yolo.configs.hydra_patch import check_config_mismatch 9 | 10 | 11 | def get_config(config: Union[str, Path, DictConfig], overrides: Union[str, Dict] = None): 12 | """ 13 | Load and merge configuration data from a file or dictionary. 14 | 15 | Args: 16 | config (str) or (Path) or (DictConfig): Configuration data in the form of a file name or a DictConfig object. 17 | overrides (str) or(Dict), optional: Overrides in the form of a file name or a dictionary. Default is None. 18 | 19 | Returns: 20 | OmegaConf.Namespace: Training arguments namespace. 21 | """ 22 | if overrides is None: 23 | overrides = {} 24 | if isinstance(config, (str, Path)): 25 | config = OmegaConf.load(config) 26 | elif isinstance(config, Dict): 27 | config = OmegaConf.create(config) 28 | # override 29 | if isinstance(overrides, str): 30 | overrides = OmegaConf.load(overrides) 31 | elif isinstance(overrides, Dict): 32 | overrides = OmegaConf.create(overrides) 33 | 34 | check_config_mismatch(dict(overrides).keys(), dict(config).keys()) 35 | 36 | return OmegaConf.merge(config, overrides) 37 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/yolov8l.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.00 # scales module repeats 6 | width_multiple: 1.00 # scales convolution channels 7 | 8 | # YOLOv8.0l backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [512, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [512, True]] 20 | - [-1, 1, SPPF, [512, 5]] # 9 21 | 22 | # YOLOv8.0l head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [512]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/yolov8m.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.67 # scales module repeats 6 | width_multiple: 0.75 # scales convolution channels 7 | 8 | # YOLOv8.0m backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [768, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [768, True]] 20 | - [-1, 1, SPPF, [768, 5]] # 9 21 | 22 | # YOLOv8.0m head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [768]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/yolov8x.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.00 # scales module repeats 6 | width_multiple: 1.25 # scales convolution channels 7 | 8 | # YOLOv8.0x backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [512, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [512, True]] 20 | - [-1, 1, SPPF, [512, 5]] # 9 21 | 22 | # YOLOv8.0x head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [512]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/yolov8n.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # scales module repeats 6 | width_multiple: 0.25 # scales convolution channels 7 | 8 | # YOLOv8.0n backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [1024, True]] 20 | - [-1, 1, SPPF, [1024, 5]] # 9 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [1024]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/yolov8s.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # scales module repeats 6 | width_multiple: 0.50 # scales convolution channels 7 | 8 | # YOLOv8.0s backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [1024, True]] 20 | - [-1, 1, SPPF, [1024, 5]] # 9 21 | 22 | # YOLOv8.0s head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [1024]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/seg/yolov8l-seg.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.00 # scales module repeats 6 | width_multiple: 1.00 # scales convolution channels 7 | 8 | # YOLOv8.0l backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [512, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [512, True]] 20 | - [-1, 1, SPPF, [512, 5]] # 9 21 | 22 | # YOLOv8.0l head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [512]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Segment, [nc, 32, 256]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/seg/yolov8m-seg.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.67 # scales module repeats 6 | width_multiple: 0.75 # scales convolution channels 7 | 8 | # YOLOv8.0m backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [768, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [768, True]] 20 | - [-1, 1, SPPF, [768, 5]] # 9 21 | 22 | # YOLOv8.0m head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [768]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Segment, [nc, 32, 256]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/seg/yolov8x-seg.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.00 # scales module repeats 6 | width_multiple: 1.25 # scales convolution channels 7 | 8 | # YOLOv8.0x backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [512, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [512, True]] 20 | - [-1, 1, SPPF, [512, 5]] # 9 21 | 22 | # YOLOv8.0x head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [512]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Segment, [nc, 32, 256]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/seg/yolov8n-seg.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # scales module repeats 6 | width_multiple: 0.25 # scales convolution channels 7 | 8 | # YOLOv8.0n backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [1024, True]] 20 | - [-1, 1, SPPF, [1024, 5]] # 9 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [1024]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Segment, [nc, 32, 256]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/seg/yolov8s-seg.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 0.33 # scales module repeats 6 | width_multiple: 0.50 # scales convolution channels 7 | 8 | # YOLOv8.0s backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [1024, True]] 20 | - [-1, 1, SPPF, [1024, 5]] # 9 21 | 22 | # YOLOv8.0s head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 17 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2f, [1024]] # 23 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Segment, [nc, 32, 256]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/src/roi_align_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef _ROI_ALIGN_KERNEL 2 | #define _ROI_ALIGN_KERNEL 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | __global__ void ROIAlignForward(const int nthreads, const float* bottom_data, 9 | const float spatial_scale, const int height, const int width, 10 | const int channels, const int aligned_height, const int aligned_width, 11 | const float* bottom_rois, float* top_data); 12 | 13 | int ROIAlignForwardLaucher( 14 | const float* bottom_data, const float spatial_scale, const int num_rois, const int height, 15 | const int width, const int channels, const int aligned_height, 16 | const int aligned_width, const float* bottom_rois, 17 | float* top_data, cudaStream_t stream); 18 | 19 | __global__ void ROIAlignBackward(const int nthreads, const float* top_diff, 20 | const float spatial_scale, const int height, const int width, 21 | const int channels, const int aligned_height, const int aligned_width, 22 | float* bottom_diff, const float* bottom_rois); 23 | 24 | int ROIAlignBackwardLaucher(const float* top_diff, const float spatial_scale, const int batch_size, const int num_rois, 25 | const int height, const int width, const int channels, const int aligned_height, 26 | const int aligned_width, const float* bottom_rois, 27 | float* bottom_diff, cudaStream_t stream); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/models-cfg/sn2-yolov5n.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | # YOLOv5 v6.0 backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Conv, [64, 6, 2, 2]], # 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, 6, 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, 3, C3, [1024]], 20 | [-1, 1, SPPF, [1024, 5]], # 9 21 | ] 22 | 23 | # YOLOv5 v6.0 head 24 | head: 25 | [[-1, 1, Conv, [512, 1, 1]], 26 | [-1, 1, SNI, [512, 2]], 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, SNI, [256, 2]], 32 | [[-1, 4], 1, Concat, [1]], # cat backbone P3 33 | [-1, 3, C3, [256, False]], # 17 (P3/8-small) 34 | 35 | [-1, 1, GSConvE, [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, GSConvE, [512, 3, 2]], 40 | [[-1, 10], 1, Concat, [1]], # cat head P5 41 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 42 | 43 | [[17, 20, 23], 1, Detect, [nc]], # Detect(P3, P4, P5) 44 | ] -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docs/app.md: -------------------------------------------------------------------------------- 1 | # Ultralytics HUB App for YOLOv8 2 | 3 |
4 | 5 | 6 |
7 |
8 | 9 | Welcome to the Ultralytics HUB app for demonstrating YOLOv5 and YOLOv8 models! In this app, available on the [Apple App 10 | Store](https://apps.apple.com/xk/app/ultralytics/id1583935240) and the 11 | [Google Play Store](https://play.google.com/store/apps/details?id=com.ultralytics.ultralytics_app), you will be able 12 | to see the power and capabilities of YOLOv5, a state-of-the-art object detection model developed by Ultralytics. 13 | 14 | **To install simply scan the QR code above**. The App currently features YOLOv5 models, with YOLOv8 models coming soon. 15 | 16 | With YOLOv5, you can detect and classify objects in images and videos with high accuracy and speed. The model has been 17 | trained on a large dataset and is able to detect a wide range of objects, including cars, pedestrians, and traffic 18 | signs. 19 | 20 | In this app, you will be able to try out YOLOv5 on your own images and videos, and see the model in action. You can also 21 | learn more about how YOLOv5 works and how it can be used in real-world applications. 22 | 23 | We hope you enjoy using YOLOv5 and seeing its capabilities firsthand. Thank you for choosing Ultralytics for your object 24 | detection needs! -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/README.md: -------------------------------------------------------------------------------- 1 | fpn.pytorch 2 | Pytorch implementation of Feature Pyramid Network (FPN) for Object Detection 3 | 4 | ## Introduction 5 | 6 | This project inherits the property of our [pytorch implementation of faster r-cnn](https://github.com/jwyang/faster-rcnn.pytorch). Hence, it also has the following unique features: 7 | 8 | * **It is pure Pytorch code**. We convert all the numpy implementations to pytorch. 9 | 10 | * **It supports trainig batchsize > 1**. We revise all the layers, including dataloader, rpn, roi-pooling, etc., to train with multiple images at each iteration. 11 | 12 | * **It supports multiple GPUs**. We use a multiple GPU wrapper (nn.DataParallel here) to make it flexible to use one or more GPUs, as a merit of the above two features. 13 | 14 | * **It supports three pooling methods**. We integrate three pooling methods: roi pooing, roi align and roi crop. Besides, we convert them to support multi-image batch training. 15 | 16 | ## Benchmarking 17 | 18 | We benchmark our code thoroughly on three datasets: pascal voc, coco. Below are the results: 19 | 20 | 1). PASCAL VOC 2007 (Train/Test: 07trainval/07test, scale=600, ROI Align) 21 | 22 | model | GPUs | Batch Size | lr | lr_decay | max_epoch | Speed/epoch | Memory/GPU | mAP 23 | ---------|-----------|----|-----------|-----|-----|-------|--------|-------- 24 | Res-101   | 8 TitanX | 24| 1e-2 | 10 | 12 | 0.22 hr | 9688MB | 74.2 25 | 26 | **Results on coco are on the way**. 27 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/models-cfg/sn2-yolov8n.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv8 object detection model with P3-P5 outputs. For Usage examples see https://docs.ultralytics.com/tasks/detect 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | depth_multiple: 0.33 # scales module repeats 7 | width_multiple: 0.25 # scales convolution channels 8 | 9 | # YOLOv8.0n backbone 10 | backbone: 11 | # [from, repeats, module, args] 12 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 13 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 14 | - [-1, 3, C2f, [128, True]] 15 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 16 | - [-1, 6, C2f, [256, True]] 17 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 18 | - [-1, 6, C2f, [512, True]] 19 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 20 | - [-1, 3, C2f, [1024, True]] 21 | - [-1, 1, SPPF, [1024, 5]] # 9 22 | 23 | # Slim_neck_v2 (SNs) 24 | head: 25 | - [-1, 1, SNI, [1024, 2]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f, [512]] # 12 28 | 29 | - [-1, 1, SNI, [512, 2]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f, [256]] # 15 (P3/8-small) 32 | 33 | - [-1, 1, GSConvE, [256, 3, 2]] 34 | - [[-1, 12], 1, Concat, [1]] # cat head P4 35 | - [-1, 3, C2f, [512]] # 18 (P4/16-medium) 36 | 37 | - [-1, 1, GSConvE, [512, 3, 2]] 38 | - [[-1, 9], 1, Concat, [1]] # cat head P5 39 | - [-1, 3, C2f, [1024]] # 21 (P5/32-large) 40 | 41 | - [[15, 18, 21], 1, Detect, [nc]] # Detect(P3, P4, P5) 42 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v5/yolov5l.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | # YOLOv5 v6.0 backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Conv, [64, 6, 2, 2]], # 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, 6, 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, 3, C3, [1024]], 20 | [-1, 1, SPPF, [1024, 5]], # 9 21 | ] 22 | 23 | # YOLOv5 v6.0 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 | [[17, 20, 23], 1, Detect, [nc]], # Detect(P3, P4, P5) 44 | ] -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v5/yolov5m.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | # YOLOv5 v6.0 backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Conv, [64, 6, 2, 2]], # 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, 6, 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, 3, C3, [1024]], 20 | [-1, 1, SPPF, [1024, 5]], # 9 21 | ] 22 | 23 | # YOLOv5 v6.0 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 | [[17, 20, 23], 1, Detect, [nc]], # Detect(P3, P4, P5) 44 | ] -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v5/yolov5n.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | # YOLOv5 v6.0 backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Conv, [64, 6, 2, 2]], # 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, 6, 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, 3, C3, [1024]], 20 | [-1, 1, SPPF, [1024, 5]], # 9 21 | ] 22 | 23 | # YOLOv5 v6.0 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 | [[17, 20, 23], 1, Detect, [nc]], # Detect(P3, P4, P5) 44 | ] -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v5/yolov5x.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | # YOLOv5 v6.0 backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Conv, [64, 6, 2, 2]], # 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, 6, 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, 3, C3, [1024]], 20 | [-1, 1, SPPF, [1024, 5]], # 9 21 | ] 22 | 23 | # YOLOv5 v6.0 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 | [[17, 20, 23], 1, Detect, [nc]], # Detect(P3, P4, P5) 44 | ] -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v5/yolov5s.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | 9 | # YOLOv5 v6.0 backbone 10 | backbone: 11 | # [from, number, module, args] 12 | [[-1, 1, Conv, [64, 6, 2, 2]], # 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, 6, 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, 3, C3, [1024]], 21 | [-1, 1, SPPF, [1024, 5]], # 9 22 | ] 23 | 24 | # YOLOv5 v6.0 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, [256, 3, 2]], 37 | [[-1, 14], 1, Concat, [1]], # cat head P4 38 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium) 39 | 40 | [-1, 1, Conv, [512, 3, 2]], 41 | [[-1, 10], 1, Concat, [1]], # cat head P5 42 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large) 43 | 44 | [[17, 20, 23], 1, Detect, [nc]], # Detect(P3, P4, P5) 45 | ] -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/data/dataset_wrappers.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | import collections 4 | from copy import deepcopy 5 | 6 | from .augment import LetterBox 7 | 8 | 9 | class MixAndRectDataset: 10 | """A wrapper of multiple images mixed dataset. 11 | 12 | Args: 13 | dataset (:obj:`BaseDataset`): The dataset to be mixed. 14 | transforms (Sequence[dict]): config dict to be composed. 15 | """ 16 | 17 | def __init__(self, dataset): 18 | self.dataset = dataset 19 | self.imgsz = dataset.imgsz 20 | 21 | def __len__(self): 22 | return len(self.dataset) 23 | 24 | def __getitem__(self, index): 25 | labels = deepcopy(self.dataset[index]) 26 | for transform in self.dataset.transforms.tolist(): 27 | # mosaic and mixup 28 | if hasattr(transform, "get_indexes"): 29 | indexes = transform.get_indexes(self.dataset) 30 | if not isinstance(indexes, collections.abc.Sequence): 31 | indexes = [indexes] 32 | mix_labels = [deepcopy(self.dataset[index]) for index in indexes] 33 | labels["mix_labels"] = mix_labels 34 | if self.dataset.rect and isinstance(transform, LetterBox): 35 | transform.new_shape = self.dataset.batch_shapes[self.dataset.batch[index]] 36 | labels = transform(labels) 37 | if "mix_labels" in labels: 38 | labels.pop("mix_labels") 39 | return labels 40 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/datasets/VOCdevkit-matlab-wrapper/voc_eval.m: -------------------------------------------------------------------------------- 1 | function res = voc_eval(path, comp_id, test_set, output_dir) 2 | 3 | VOCopts = get_voc_opts(path); 4 | VOCopts.testset = test_set; 5 | 6 | for i = 1:length(VOCopts.classes) 7 | cls = VOCopts.classes{i}; 8 | res(i) = voc_eval_cls(cls, VOCopts, comp_id, output_dir); 9 | end 10 | 11 | fprintf('\n~~~~~~~~~~~~~~~~~~~~\n'); 12 | fprintf('Results:\n'); 13 | aps = [res(:).ap]'; 14 | fprintf('%.1f\n', aps * 100); 15 | fprintf('%.1f\n', mean(aps) * 100); 16 | fprintf('~~~~~~~~~~~~~~~~~~~~\n'); 17 | 18 | function res = voc_eval_cls(cls, VOCopts, comp_id, output_dir) 19 | 20 | test_set = VOCopts.testset; 21 | year = VOCopts.dataset(4:end); 22 | 23 | addpath(fullfile(VOCopts.datadir, 'VOCcode')); 24 | 25 | res_fn = sprintf(VOCopts.detrespath, comp_id, cls); 26 | 27 | recall = []; 28 | prec = []; 29 | ap = 0; 30 | ap_auc = 0; 31 | 32 | do_eval = (str2num(year) <= 2007) | ~strcmp(test_set, 'test'); 33 | if do_eval 34 | % Bug in VOCevaldet requires that tic has been called first 35 | tic; 36 | [recall, prec, ap] = VOCevaldet(VOCopts, comp_id, cls, true); 37 | ap_auc = xVOCap(recall, prec); 38 | 39 | % force plot limits 40 | ylim([0 1]); 41 | xlim([0 1]); 42 | 43 | print(gcf, '-djpeg', '-r0', ... 44 | [output_dir '/' cls '_pr.jpg']); 45 | end 46 | fprintf('!!! %s : %.4f %.4f\n', cls, ap, ap_auc); 47 | 48 | res.recall = recall; 49 | res.prec = prec; 50 | res.ap = ap; 51 | res.ap_auc = ap_auc; 52 | 53 | save([output_dir '/' cls '_pr.mat'], ... 54 | 'res', 'recall', 'prec', 'ap', 'ap_auc'); 55 | 56 | rmpath(fullfile(VOCopts.datadir, 'VOCcode')); 57 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000315.txt: -------------------------------------------------------------------------------- 1 | 25 0.186758 0.378372 0.331422 0.310749 2 | 25 0.341836 0.377963 0.239891 0.208993 3 | 25 0.417359 0.344977 0.200625 0.166534 4 | 25 0.491461 0.356194 0.105953 0.0974 5 | 25 0.508773 0.292518 0.139297 0.048173 6 | 25 0.625211 0.343747 0.077734 0.057892 7 | 25 0.692219 0.205328 0.059719 0.210468 8 | 25 0.124633 0.531745 0.249266 0.610749 9 | 25 0.061469 0.450562 0.122938 0.258407 10 | 25 0.300609 0.395515 0.193406 0.242693 11 | 25 0.424828 0.384192 0.139469 0.158642 12 | 0 0.577516 0.551721 0.096625 0.451124 13 | 0 0.809414 0.564438 0.076703 0.432576 14 | 0 0.261148 0.716956 0.133266 0.405386 15 | 0 0.867797 0.503489 0.072375 0.131335 16 | 0 0.866078 0.424204 0.037844 0.099789 17 | 0 0.938289 0.512904 0.078422 0.111241 18 | 0 0.865492 0.367553 0.021703 0.07993 19 | 25 0.574656 0.352775 0.13125 0.093372 20 | 26 0.192102 0.948665 0.093391 0.077845 21 | 56 0.545742 0.797752 0.455797 0.305621 22 | 0 0.377937 0.544368 0.080031 0.054637 23 | 0 0.490539 0.465328 0.041297 0.077963 24 | 0 0.922148 0.379965 0.009047 0.030328 25 | 0 0.380133 0.932213 0.185922 0.135574 26 | 0 0.520289 0.446979 0.023672 0.085386 27 | 56 0.39143 0.63767 0.132609 0.108689 28 | 56 0.13493 0.711862 0.217891 0.256042 29 | 56 0.084047 0.96363 0.157688 0.046745 30 | 56 0.403836 0.656464 0.113922 0.069883 31 | 56 0.049484 0.855738 0.098969 0.197658 32 | 56 0.39432 0.596745 0.094234 0.045761 33 | 56 0.424039 0.703337 0.119797 0.044895 34 | 56 0.379156 0.553513 0.098781 0.058782 35 | 0 0.979359 0.411124 0.01175 0.06089 36 | 25 0.777305 0.286768 0.104047 0.075831 37 | 26 0.192758 0.853525 0.064672 0.027564 38 | 26 0.231523 0.838747 0.099578 0.145597 39 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/datasets/ds_utils.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------- 2 | # Fast/er R-CNN 3 | # Licensed under The MIT License [see LICENSE for details] 4 | # Written by Ross Girshick 5 | # -------------------------------------------------------- 6 | from __future__ import absolute_import 7 | from __future__ import division 8 | from __future__ import print_function 9 | 10 | import numpy as np 11 | 12 | 13 | def unique_boxes(boxes, scale=1.0): 14 | """Return indices of unique boxes.""" 15 | v = np.array([1, 1e3, 1e6, 1e9]) 16 | hashes = np.round(boxes * scale).dot(v) 17 | _, index = np.unique(hashes, return_index=True) 18 | return np.sort(index) 19 | 20 | 21 | def xywh_to_xyxy(boxes): 22 | """Convert [x y w h] box format to [x1 y1 x2 y2] format.""" 23 | return np.hstack((boxes[:, 0:2], boxes[:, 0:2] + boxes[:, 2:4] - 1)) 24 | 25 | 26 | def xyxy_to_xywh(boxes): 27 | """Convert [x1 y1 x2 y2] box format to [x y w h] format.""" 28 | return np.hstack((boxes[:, 0:2], boxes[:, 2:4] - boxes[:, 0:2] + 1)) 29 | 30 | 31 | def validate_boxes(boxes, width=0, height=0): 32 | """Check that a set of boxes are valid.""" 33 | x1 = boxes[:, 0] 34 | y1 = boxes[:, 1] 35 | x2 = boxes[:, 2] 36 | y2 = boxes[:, 3] 37 | assert (x1 >= 0).all() 38 | assert (y1 >= 0).all() 39 | assert (x2 >= x1).all() 40 | assert (y2 >= y1).all() 41 | assert (x2 < width).all() 42 | assert (y2 < height).all() 43 | 44 | 45 | def filter_small_boxes(boxes, min_size): 46 | w = boxes[:, 2] - boxes[:, 0] 47 | h = boxes[:, 3] - boxes[:, 1] 48 | keep = np.where((w >= min_size) & (h > min_size))[0] 49 | return keep 50 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/.github/workflows/cla.yml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | name: "CLA Assistant" 4 | on: 5 | issue_comment: 6 | types: 7 | - created 8 | pull_request_target: 9 | types: 10 | - reopened 11 | - opened 12 | - synchronize 13 | 14 | jobs: 15 | CLA: 16 | if: github.repository == 'ultralytics/ultralytics' 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: "CLA Assistant" 20 | if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I sign the CLA') || github.event_name == 'pull_request_target' 21 | uses: contributor-assistant/github-action@v2.2.1 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | # must be repository secret token 25 | PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} 26 | with: 27 | path-to-signatures: 'signatures/version1/cla.json' 28 | path-to-document: 'https://github.com/ultralytics/assets/blob/main/documents/CLA.md' # CLA document 29 | # branch should not be protected 30 | branch: 'main' 31 | allowlist: dependabot[bot],github-actions,[pre-commit*,pre-commit*,bot* 32 | 33 | remote-organization-name: ultralytics 34 | remote-repository-name: cla 35 | custom-pr-sign-comment: 'I have read the CLA Document and I sign the CLA' 36 | custom-allsigned-prcomment: All Contributors have signed the CLA. ✅ 37 | #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign' 38 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/datasets/tools/mcg_munge.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | """Hacky tool to convert file system layout of MCG boxes downloaded from 5 | http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/mcg/ 6 | so that it's consistent with those computed by Jan Hosang (see: 7 | http://www.mpi-inf.mpg.de/departments/computer-vision-and-multimodal- 8 | computing/research/object-recognition-and-scene-understanding/how- 9 | good-are-detection-proposals-really/) 10 | 11 | NB: Boxes from the MCG website are in (y1, x1, y2, x2) order. 12 | Boxes from Hosang et al. are in (x1, y1, x2, y2) order. 13 | """ 14 | 15 | def munge(src_dir): 16 | # stored as: ./MCG-COCO-val2014-boxes/COCO_val2014_000000193401.mat 17 | # want: ./MCG/mat/COCO_val2014_0/COCO_val2014_000000141/COCO_val2014_000000141334.mat 18 | 19 | files = os.listdir(src_dir) 20 | for fn in files: 21 | base, ext = os.path.splitext(fn) 22 | # first 14 chars / first 22 chars / all chars + .mat 23 | # COCO_val2014_0/COCO_val2014_000000447/COCO_val2014_000000447991.mat 24 | first = base[:14] 25 | second = base[:22] 26 | dst_dir = os.path.join('MCG', 'mat', first, second) 27 | if not os.path.exists(dst_dir): 28 | os.makedirs(dst_dir) 29 | src = os.path.join(src_dir, fn) 30 | dst = os.path.join(dst_dir, fn) 31 | print 'MV: {} -> {}'.format(src, dst) 32 | os.rename(src, dst) 33 | 34 | if __name__ == '__main__': 35 | # src_dir should look something like: 36 | # src_dir = 'MCG-COCO-val2014-boxes' 37 | src_dir = sys.argv[1] 38 | munge(src_dir) 39 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v3/yolov3.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | # darknet53 backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Conv, [32, 3, 1]], # 0 12 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 13 | [-1, 1, Bottleneck, [64]], 14 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 15 | [-1, 2, Bottleneck, [128]], 16 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 17 | [-1, 8, Bottleneck, [256]], 18 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 19 | [-1, 8, Bottleneck, [512]], 20 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 21 | [-1, 4, Bottleneck, [1024]], # 10 22 | ] 23 | 24 | # YOLOv3 head 25 | head: 26 | [[-1, 1, Bottleneck, [1024, False]], 27 | [-1, 1, Conv, [512, 1, 1]], 28 | [-1, 1, Conv, [1024, 3, 1]], 29 | [-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, Conv, [1024, 3, 1]], # 15 (P5/32-large) 31 | 32 | [-2, 1, Conv, [256, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 8], 1, Concat, [1]], # cat backbone P4 35 | [-1, 1, Bottleneck, [512, False]], 36 | [-1, 1, Bottleneck, [512, False]], 37 | [-1, 1, Conv, [256, 1, 1]], 38 | [-1, 1, Conv, [512, 3, 1]], # 22 (P4/16-medium) 39 | 40 | [-2, 1, Conv, [128, 1, 1]], 41 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 42 | [[-1, 6], 1, Concat, [1]], # cat backbone P3 43 | [-1, 1, Bottleneck, [256, False]], 44 | [-1, 2, Bottleneck, [256, False]], # 27 (P3/8-small) 45 | 46 | [[27, 22, 15], 1, Detect, [nc]], # Detect(P3, P4, P5) 47 | ] 48 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v3/yolov3-spp.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, 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 | 8 | # darknet53 backbone 9 | backbone: 10 | # [from, number, module, args] 11 | [[-1, 1, Conv, [32, 3, 1]], # 0 12 | [-1, 1, Conv, [64, 3, 2]], # 1-P1/2 13 | [-1, 1, Bottleneck, [64]], 14 | [-1, 1, Conv, [128, 3, 2]], # 3-P2/4 15 | [-1, 2, Bottleneck, [128]], 16 | [-1, 1, Conv, [256, 3, 2]], # 5-P3/8 17 | [-1, 8, Bottleneck, [256]], 18 | [-1, 1, Conv, [512, 3, 2]], # 7-P4/16 19 | [-1, 8, Bottleneck, [512]], 20 | [-1, 1, Conv, [1024, 3, 2]], # 9-P5/32 21 | [-1, 4, Bottleneck, [1024]], # 10 22 | ] 23 | 24 | # YOLOv3-SPP head 25 | head: 26 | [[-1, 1, Bottleneck, [1024, False]], 27 | [-1, 1, SPP, [512, [5, 9, 13]]], 28 | [-1, 1, Conv, [1024, 3, 1]], 29 | [-1, 1, Conv, [512, 1, 1]], 30 | [-1, 1, Conv, [1024, 3, 1]], # 15 (P5/32-large) 31 | 32 | [-2, 1, Conv, [256, 1, 1]], 33 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 34 | [[-1, 8], 1, Concat, [1]], # cat backbone P4 35 | [-1, 1, Bottleneck, [512, False]], 36 | [-1, 1, Bottleneck, [512, False]], 37 | [-1, 1, Conv, [256, 1, 1]], 38 | [-1, 1, Conv, [512, 3, 1]], # 22 (P4/16-medium) 39 | 40 | [-2, 1, Conv, [128, 1, 1]], 41 | [-1, 1, nn.Upsample, [None, 2, 'nearest']], 42 | [[-1, 6], 1, Concat, [1]], # cat backbone P3 43 | [-1, 1, Bottleneck, [256, False]], 44 | [-1, 2, Bottleneck, [256, False]], # 27 (P3/8-small) 45 | 46 | [[27, 22, 15], 1, Detect, [nc]], # Detect(P3, P4, P5) 47 | ] 48 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000164.txt: -------------------------------------------------------------------------------- 1 | 39 0.615391 0.411156 0.012531 0.055979 2 | 39 0.590367 0.416885 0.010734 0.043604 3 | 39 0.58018 0.413521 0.011016 0.057375 4 | 39 0.60432 0.416 0.011266 0.0505 5 | 39 0.692109 0.61676 0.028625 0.065354 6 | 72 0.745406 0.500187 0.151125 0.287583 7 | 39 0.731344 0.62699 0.0155 0.076146 8 | 39 0.632141 0.354646 0.014688 0.035625 9 | 39 0.591961 0.298708 0.016391 0.031583 10 | 39 0.639766 0.292698 0.015281 0.032813 11 | 39 0.65693 0.290938 0.016641 0.035125 12 | 56 0.36675 0.926208 0.2365 0.147583 13 | 40 0.250586 0.425167 0.020047 0.058875 14 | 40 0.232906 0.435479 0.025156 0.076125 15 | 40 0.180586 0.443792 0.022359 0.069583 16 | 40 0.106906 0.447781 0.030719 0.078396 17 | 40 0.139813 0.448458 0.024125 0.0825 18 | 40 0.15907 0.447073 0.018484 0.076938 19 | 41 0.25 0.508854 0.041844 0.043333 20 | 41 0.197148 0.513687 0.036297 0.040667 21 | 41 0.291938 0.50151 0.031469 0.033604 22 | 41 0.322883 0.49299 0.031234 0.032313 23 | 45 0.834883 0.472427 0.087734 0.021937 24 | 68 0.631812 0.505479 0.08325 0.06325 25 | 69 0.465656 0.584354 0.073156 0.071292 26 | 40 0.127484 0.447563 0.016938 0.082667 27 | 40 0.198609 0.437896 0.024781 0.079 28 | 40 0.21668 0.438781 0.016797 0.073687 29 | 41 0.266141 0.504708 0.033937 0.04425 30 | 41 0.813328 0.301812 0.024063 0.044542 31 | 41 0.844102 0.305635 0.023734 0.028563 32 | 41 0.795687 0.314125 0.009781 0.017083 33 | 41 0.279133 0.44301 0.027734 0.039271 34 | 41 0.220984 0.507156 0.023938 0.042104 35 | 45 0.813344 0.445646 0.045594 0.00975 36 | 45 0.833727 0.461135 0.088891 0.008771 37 | 45 0.836367 0.454271 0.081297 0.010917 38 | 45 0.835375 0.449427 0.086906 0.012646 39 | 45 0.577438 0.366531 0.020875 0.018854 40 | 60 0.689609 0.972083 0.214281 0.031167 41 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_crop/functions/crop_resize.py: -------------------------------------------------------------------------------- 1 | # functions/add.py 2 | import torch 3 | from torch.autograd import Function 4 | from .._ext import roi_crop 5 | from cffi import FFI 6 | ffi = FFI() 7 | 8 | class RoICropFunction(Function): 9 | def forward(self, input1, input2): 10 | self.input1 = input1 11 | self.input2 = input2 12 | self.device_c = ffi.new("int *") 13 | output = torch.zeros(input2.size()[0], input1.size()[1], input2.size()[1], input2.size()[2]) 14 | #print('decice %d' % torch.cuda.current_device()) 15 | if input1.is_cuda: 16 | self.device = torch.cuda.current_device() 17 | else: 18 | self.device = -1 19 | self.device_c[0] = self.device 20 | if not input1.is_cuda: 21 | roi_crop.BilinearSamplerBHWD_updateOutput(input1, input2, output) 22 | else: 23 | output = output.cuda(self.device) 24 | roi_crop.BilinearSamplerBHWD_updateOutput_cuda(input1, input2, output) 25 | return output 26 | 27 | def backward(self, grad_output): 28 | grad_input1 = torch.zeros(self.input1.size()) 29 | grad_input2 = torch.zeros(self.input2.size()) 30 | #print('backward decice %d' % self.device) 31 | if not grad_output.is_cuda: 32 | roi_crop.BilinearSamplerBHWD_updateGradInput(self.input1, self.input2, grad_input1, grad_input2, grad_output) 33 | else: 34 | grad_input1 = grad_input1.cuda(self.device) 35 | grad_input2 = grad_input2.cuda(self.device) 36 | roi_crop.BilinearSamplerBHWD_updateGradInput_cuda(self.input1, self.input2, grad_input1, grad_input2, grad_output) 37 | return grad_input1, grad_input2 38 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/utils/blob.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------- 2 | # Fast R-CNN 3 | # Copyright (c) 2015 Microsoft 4 | # Licensed under The MIT License [see LICENSE for details] 5 | # Written by Ross Girshick 6 | # -------------------------------------------------------- 7 | 8 | """Blob helper functions.""" 9 | 10 | import numpy as np 11 | #from scipy.misc import imread, imresize 12 | import cv2 13 | 14 | 15 | 16 | def im_list_to_blob(ims): 17 | """Convert a list of images into a network input. 18 | 19 | Assumes images are already prepared (means subtracted, BGR order, ...). 20 | """ 21 | max_shape = np.array([im.shape for im in ims]).max(axis=0) 22 | num_images = len(ims) 23 | blob = np.zeros((num_images, max_shape[0], max_shape[1], 3), 24 | dtype=np.float32) 25 | for i in xrange(num_images): 26 | im = ims[i] 27 | blob[i, 0:im.shape[0], 0:im.shape[1], :] = im 28 | 29 | return blob 30 | 31 | def prep_im_for_blob(im, pixel_means, target_size, max_size): 32 | """Mean subtract and scale an image for use in a blob.""" 33 | 34 | im = im.astype(np.float32, copy=False) 35 | im -= pixel_means 36 | # im = im[:, :, ::-1] 37 | im_shape = im.shape 38 | im_size_min = np.min(im_shape[0:2]) 39 | im_size_max = np.max(im_shape[0:2]) 40 | im_scale = float(target_size) / float(im_size_min) 41 | # Prevent the biggest axis from being more than MAX_SIZE 42 | # if np.round(im_scale * im_size_max) > max_size: 43 | # im_scale = float(max_size) / float(im_size_max) 44 | # im = imresize(im, im_scale) 45 | im = cv2.resize(im, None, None, fx=im_scale, fy=im_scale, 46 | interpolation=cv2.INTER_LINEAR) 47 | 48 | return im, im_scale 49 | -------------------------------------------------------------------------------- /datasets/coco128/labels/train2017/000000000196.txt: -------------------------------------------------------------------------------- 1 | 44 0.554898 0.468469 0.329391 0.101354 2 | 51 0.718219 0.802031 0.035906 0.088563 3 | 51 0.630547 0.836625 0.038469 0.112125 4 | 51 0.696375 0.809823 0.010656 0.054229 5 | 51 0.688344 0.874729 0.087469 0.064042 6 | 44 0.891422 0.648594 0.115187 0.254896 7 | 44 0.885594 0.490448 0.153031 0.089771 8 | 44 0.416 0.134375 0.111625 0.0905 9 | 44 0.909359 0.608073 0.112 0.167937 10 | 44 0.820719 0.90601 0.189906 0.183646 11 | 45 0.531563 0.186646 0.200906 0.13075 12 | 45 0.775672 0.610417 0.226375 0.236917 13 | 45 0.901391 0.805719 0.197219 0.297354 14 | 45 0.499047 0.502073 0.264688 0.179646 15 | 45 0.693187 0.847594 0.251938 0.289937 16 | 45 0.62275 0.399625 0.207313 0.143833 17 | 45 0.652055 0.308385 0.236328 0.134521 18 | 45 0.365664 0.186219 0.138109 0.068896 19 | 45 0.637227 0.16401 0.145297 0.130979 20 | 50 0.325914 0.562802 0.028516 0.065812 21 | 50 0.467734 0.85 0.058875 0.060208 22 | 50 0.283016 0.592469 0.033656 0.060604 23 | 51 0.743414 0.869427 0.041203 0.066021 24 | 51 0.659156 0.903385 0.021313 0.066146 25 | 60 0.5 0.543688 1 0.912625 26 | 42 0.395453 0.918188 0.132469 0.137667 27 | 44 0.749438 0.282969 0.068875 0.060438 28 | 45 0.255195 0.225646 0.150203 0.081958 29 | 45 0.144422 0.291271 0.183094 0.125417 30 | 45 0.055742 0.380312 0.111484 0.153167 31 | 50 0.211406 0.736573 0.0625 0.053021 32 | 51 0.621133 0.892375 0.056922 0.0625 33 | 51 0.911609 0.801094 0.019031 0.031313 34 | 51 0.607164 0.838719 0.049016 0.056771 35 | 51 0.296297 0.792573 0.06525 0.087021 36 | 51 0.675023 0.80176 0.034984 0.046646 37 | 51 0.694406 0.941417 0.03225 0.022083 38 | 44 0.838328 0.280281 0.030687 0.019354 39 | 50 0.410172 0.699927 0.038156 0.042771 40 | 50 0.465234 0.639437 0.027375 0.069375 41 | 50 0.248742 0.561771 0.025672 0.029 42 | 45 0.134875 0.489365 0.26975 0.191688 43 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/models/v8/yolov8x6.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | # Parameters 4 | nc: 80 # number of classes 5 | depth_multiple: 1.00 # scales module repeats 6 | width_multiple: 1.25 # scales convolution channels 7 | 8 | # YOLOv8.0x6 backbone 9 | backbone: 10 | # [from, repeats, module, args] 11 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 12 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 13 | - [-1, 3, C2f, [128, True]] 14 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 15 | - [-1, 6, C2f, [256, True]] 16 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 17 | - [-1, 6, C2f, [512, True]] 18 | - [-1, 1, Conv, [512, 3, 2]] # 7-P5/32 19 | - [-1, 3, C2f, [512, True]] 20 | - [-1, 1, Conv, [512, 3, 2]] # 9-P6/64 21 | - [-1, 3, C2f, [512, True]] 22 | - [-1, 1, SPPF, [512, 5]] # 11 23 | 24 | # YOLOv8.0x6 head 25 | head: 26 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 27 | - [[-1, 8], 1, Concat, [1]] # cat backbone P5 28 | - [-1, 3, C2, [512, False]] # 14 29 | 30 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 31 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 32 | - [-1, 3, C2, [512, False]] # 17 33 | 34 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 35 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 36 | - [-1, 3, C2, [256, False]] # 20 (P3/8-small) 37 | 38 | - [-1, 1, Conv, [256, 3, 2]] 39 | - [[-1, 17], 1, Concat, [1]] # cat head P4 40 | - [-1, 3, C2, [512, False]] # 23 (P4/16-medium) 41 | 42 | - [-1, 1, Conv, [512, 3, 2]] 43 | - [[-1, 14], 1, Concat, [1]] # cat head P5 44 | - [-1, 3, C2, [512, False]] # 26 (P5/32-large) 45 | 46 | - [-1, 1, Conv, [512, 3, 2]] 47 | - [[-1, 11], 1, Concat, [1]] # cat head P6 48 | - [-1, 3, C2, [512, False]] # 29 (P6/64-xlarge) 49 | 50 | - [[20, 23, 26, 29], 1, Detect, [nc]] # Detect(P3, P4, P5, P6) 51 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/utils/callbacks/comet.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | 3 | from ultralytics.yolo.utils.torch_utils import get_flops, get_num_params 4 | 5 | try: 6 | import comet_ml 7 | 8 | except (ModuleNotFoundError, ImportError): 9 | comet_ml = None 10 | 11 | 12 | def on_pretrain_routine_start(trainer): 13 | experiment = comet_ml.Experiment(project_name=trainer.args.project or "YOLOv8") 14 | experiment.log_parameters(dict(trainer.args)) 15 | 16 | 17 | def on_train_epoch_end(trainer): 18 | experiment = comet_ml.get_global_experiment() 19 | experiment.log_metrics(trainer.label_loss_items(trainer.tloss, prefix="train"), step=trainer.epoch + 1) 20 | if trainer.epoch == 1: 21 | for f in trainer.save_dir.glob('train_batch*.jpg'): 22 | experiment.log_image(f, name=f.stem, step=trainer.epoch + 1) 23 | 24 | 25 | def on_fit_epoch_end(trainer): 26 | experiment = comet_ml.get_global_experiment() 27 | experiment.log_metrics(trainer.metrics, step=trainer.epoch + 1) 28 | if trainer.epoch == 0: 29 | model_info = { 30 | "model/parameters": get_num_params(trainer.model), 31 | "model/GFLOPs": round(get_flops(trainer.model), 3), 32 | "model/speed(ms)": round(trainer.validator.speed[1], 3)} 33 | experiment.log_metrics(model_info, step=trainer.epoch + 1) 34 | 35 | 36 | def on_train_end(trainer): 37 | experiment = comet_ml.get_global_experiment() 38 | experiment.log_model("YOLOv8", file_or_folder=trainer.best, file_name="best.pt", overwrite=True) 39 | 40 | 41 | callbacks = { 42 | "on_pretrain_routine_start": on_pretrain_routine_start, 43 | "on_train_epoch_end": on_train_epoch_end, 44 | "on_fit_epoch_end": on_fit_epoch_end, 45 | "on_train_end": on_train_end} if comet_ml else {} 46 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/.github/workflows/docker.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | # Builds ultralytics/ultralytics:latest images on DockerHub https://hub.docker.com/r/ultralytics 3 | 4 | name: Publish Docker Images 5 | 6 | on: 7 | push: 8 | branches: [main] 9 | 10 | jobs: 11 | docker: 12 | if: github.repository == 'ultralytics/ultralytics' 13 | name: Push Docker image to Docker Hub 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout repo 17 | uses: actions/checkout@v3 18 | 19 | - name: Set up QEMU 20 | uses: docker/setup-qemu-action@v2 21 | 22 | - name: Set up Docker Buildx 23 | uses: docker/setup-buildx-action@v2 24 | 25 | - name: Login to Docker Hub 26 | uses: docker/login-action@v2 27 | with: 28 | username: ${{ secrets.DOCKERHUB_USERNAME }} 29 | password: ${{ secrets.DOCKERHUB_TOKEN }} 30 | 31 | - name: Build and push arm64 image 32 | uses: docker/build-push-action@v3 33 | continue-on-error: true 34 | with: 35 | context: . 36 | platforms: linux/arm64 37 | file: docker/Dockerfile-arm64 38 | push: true 39 | tags: ultralytics/ultralytics:latest-arm64 40 | 41 | - name: Build and push CPU image 42 | uses: docker/build-push-action@v3 43 | continue-on-error: true 44 | with: 45 | context: . 46 | file: docker/Dockerfile-cpu 47 | push: true 48 | tags: ultralytics/ultralytics:latest-cpu 49 | 50 | - name: Build and push GPU image 51 | uses: docker/build-push-action@v3 52 | continue-on-error: true 53 | with: 54 | context: . 55 | file: docker/Dockerfile 56 | push: true 57 | tags: ultralytics/ultralytics:latest 58 | -------------------------------------------------------------------------------- /slimneck_v2/for_fpn/fpnpytorch/lib/model/roi_align/modules/roi_align.py: -------------------------------------------------------------------------------- 1 | from torch.nn.modules.module import Module 2 | from torch.nn.functional import avg_pool2d, max_pool2d 3 | from ..functions.roi_align import RoIAlignFunction 4 | 5 | 6 | class RoIAlign(Module): 7 | def __init__(self, aligned_height, aligned_width, spatial_scale): 8 | super(RoIAlign, self).__init__() 9 | 10 | self.aligned_width = int(aligned_width) 11 | self.aligned_height = int(aligned_height) 12 | self.spatial_scale = float(spatial_scale) 13 | 14 | def forward(self, features, rois, scale): 15 | return RoIAlignFunction(self.aligned_height, self.aligned_width, 16 | scale)(features, rois) 17 | 18 | class RoIAlignAvg(Module): 19 | def __init__(self, aligned_height, aligned_width, spatial_scale): 20 | super(RoIAlignAvg, self).__init__() 21 | 22 | self.aligned_width = int(aligned_width) 23 | self.aligned_height = int(aligned_height) 24 | self.spatial_scale = float(spatial_scale) 25 | 26 | def forward(self, features, rois, scale): 27 | x = RoIAlignFunction(self.aligned_height+1, self.aligned_width+1, 28 | scale)(features, rois) 29 | return avg_pool2d(x, kernel_size=2, stride=1) 30 | 31 | class RoIAlignMax(Module): 32 | def __init__(self, aligned_height, aligned_width, spatial_scale): 33 | super(RoIAlignMax, self).__init__() 34 | 35 | self.aligned_width = int(aligned_width) 36 | self.aligned_height = int(aligned_height) 37 | self.spatial_scale = float(spatial_scale) 38 | 39 | def forward(self, features, rois, scale): 40 | x = RoIAlignFunction(self.aligned_height+1, self.aligned_width+1, 41 | scale)(features, rois) 42 | return max_pool2d(x, kernel_size=2, stride=1) 43 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # Define hooks for code formations 2 | # Will be applied on any updated commit files if a user has installed and linked commit hook 3 | 4 | default_language_version: 5 | python: python3.8 6 | 7 | exclude: 'docs/' 8 | # Define bot property if installed via https://github.com/marketplace/pre-commit-ci 9 | ci: 10 | autofix_prs: true 11 | autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions' 12 | autoupdate_schedule: monthly 13 | # submodules: true 14 | 15 | repos: 16 | - repo: https://github.com/pre-commit/pre-commit-hooks 17 | rev: v4.3.0 18 | hooks: 19 | # - id: end-of-file-fixer 20 | - id: trailing-whitespace 21 | - id: check-case-conflict 22 | - id: check-yaml 23 | - id: check-toml 24 | - id: pretty-format-json 25 | - id: check-docstring-first 26 | 27 | - repo: https://github.com/asottile/pyupgrade 28 | rev: v2.37.3 29 | hooks: 30 | - id: pyupgrade 31 | name: Upgrade code 32 | args: [ --py37-plus ] 33 | 34 | - repo: https://github.com/PyCQA/isort 35 | rev: 5.10.1 36 | hooks: 37 | - id: isort 38 | name: Sort imports 39 | 40 | - repo: https://github.com/pre-commit/mirrors-yapf 41 | rev: v0.32.0 42 | hooks: 43 | - id: yapf 44 | name: YAPF formatting 45 | 46 | - repo: https://github.com/executablebooks/mdformat 47 | rev: 0.7.16 48 | hooks: 49 | - id: mdformat 50 | name: MD formatting 51 | additional_dependencies: 52 | - mdformat-gfm 53 | - mdformat-black 54 | # exclude: "README.md|README.zh-CN.md|CONTRIBUTING.md" 55 | 56 | - repo: https://github.com/PyCQA/flake8 57 | rev: 5.0.4 58 | hooks: 59 | - id: flake8 60 | name: PEP8 61 | 62 | #- repo: https://github.com/asottile/yesqa 63 | # rev: v1.4.0 64 | # hooks: 65 | # - id: yesqa -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/ultralytics/yolo/data/scripts/get_imagenet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Ultralytics YOLO 🚀, GPL-3.0 license 3 | # Download ILSVRC2012 ImageNet dataset https://image-net.org 4 | # Example usage: bash data/scripts/get_imagenet.sh 5 | # parent 6 | # ├── yolov5 7 | # └── datasets 8 | # └── imagenet ← downloads here 9 | 10 | # Arguments (optional) Usage: bash data/scripts/get_imagenet.sh --train --val 11 | if [ "$#" -gt 0 ]; then 12 | for opt in "$@"; do 13 | case "${opt}" in 14 | --train) train=true ;; 15 | --val) val=true ;; 16 | esac 17 | done 18 | else 19 | train=true 20 | val=true 21 | fi 22 | 23 | # Make dir 24 | d='../datasets/imagenet' # unzip directory 25 | mkdir -p $d && cd $d 26 | 27 | # Download/unzip train 28 | if [ "$train" == "true" ]; then 29 | wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_train.tar # download 138G, 1281167 images 30 | mkdir train && mv ILSVRC2012_img_train.tar train/ && cd train 31 | tar -xf ILSVRC2012_img_train.tar && rm -f ILSVRC2012_img_train.tar 32 | find . -name "*.tar" | while read NAME; do 33 | mkdir -p "${NAME%.tar}" 34 | tar -xf "${NAME}" -C "${NAME%.tar}" 35 | rm -f "${NAME}" 36 | done 37 | cd .. 38 | fi 39 | 40 | # Download/unzip val 41 | if [ "$val" == "true" ]; then 42 | wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_val.tar # download 6.3G, 50000 images 43 | mkdir val && mv ILSVRC2012_img_val.tar val/ && cd val && tar -xf ILSVRC2012_img_val.tar 44 | wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh | bash # move into subdirs 45 | fi 46 | 47 | # Delete corrupted image (optional: PNG under JPEG name that may cause dataloaders to fail) 48 | # rm train/n04266014/n04266014_10835.JPEG 49 | 50 | # TFRecords (optional) 51 | # wget https://raw.githubusercontent.com/tensorflow/models/master/research/slim/datasets/imagenet_lsvrc_2015_synsets.txt 52 | -------------------------------------------------------------------------------- /slimneck_v2/for_yolo/sn2-yolov5-v8/docker/Dockerfile-cpu: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, GPL-3.0 license 2 | # Builds ultralytics/ultralytics:latest-cpu image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics 3 | # Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLOv8 deployments 4 | 5 | # Start FROM Ubuntu image https://hub.docker.com/_/ubuntu 6 | FROM ubuntu:20.04 7 | 8 | # Downloads to user config dir 9 | ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/ 10 | 11 | # Install linux packages 12 | ENV DEBIAN_FRONTEND noninteractive 13 | RUN apt update 14 | RUN TZ=Etc/UTC apt install -y tzdata 15 | RUN apt install --no-install-recommends -y python3-pip git zip curl htop libgl1-mesa-glx libglib2.0-0 libpython3-dev gnupg 16 | # RUN alias python=python3 17 | 18 | # Create working directory 19 | RUN mkdir -p /usr/src/ultralytics 20 | WORKDIR /usr/src/ultralytics 21 | 22 | # Copy contents 23 | # COPY . /usr/src/app (issues as not a .git directory) 24 | RUN git clone https://github.com/ultralytics/ultralytics /usr/src/ultralytics 25 | 26 | # Install pip packages 27 | COPY requirements.txt . 28 | RUN python3 -m pip install --upgrade pip wheel 29 | RUN pip install --no-cache ultralytics albumentations gsutil notebook \ 30 | coremltools onnx onnx-simplifier onnxruntime tensorflow-cpu \ 31 | # openvino-dev tensorflowjs \ 32 | --extra-index-url https://download.pytorch.org/whl/cpu 33 | 34 | # Cleanup 35 | ENV DEBIAN_FRONTEND teletype 36 | 37 | 38 | # Usage Examples ------------------------------------------------------------------------------------------------------- 39 | 40 | # Build and Push 41 | # t=ultralytics/ultralytics:latest-cpu && sudo docker build -f docker/Dockerfile-cpu -t $t . && sudo docker push $t 42 | 43 | # Pull and Run 44 | # t=ultralytics/ultralytics:latest-cpu && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/datasets:/usr/src/datasets $t 45 | --------------------------------------------------------------------------------