ultralytics-opencv-headless 8.3.242__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tests/__init__.py +23 -0
- tests/conftest.py +59 -0
- tests/test_cli.py +131 -0
- tests/test_cuda.py +216 -0
- tests/test_engine.py +157 -0
- tests/test_exports.py +309 -0
- tests/test_integrations.py +151 -0
- tests/test_python.py +777 -0
- tests/test_solutions.py +371 -0
- ultralytics/__init__.py +48 -0
- ultralytics/assets/bus.jpg +0 -0
- ultralytics/assets/zidane.jpg +0 -0
- ultralytics/cfg/__init__.py +1026 -0
- ultralytics/cfg/datasets/Argoverse.yaml +78 -0
- ultralytics/cfg/datasets/DOTAv1.5.yaml +37 -0
- ultralytics/cfg/datasets/DOTAv1.yaml +36 -0
- ultralytics/cfg/datasets/GlobalWheat2020.yaml +68 -0
- ultralytics/cfg/datasets/HomeObjects-3K.yaml +32 -0
- ultralytics/cfg/datasets/ImageNet.yaml +2025 -0
- ultralytics/cfg/datasets/Objects365.yaml +447 -0
- ultralytics/cfg/datasets/SKU-110K.yaml +58 -0
- ultralytics/cfg/datasets/VOC.yaml +102 -0
- ultralytics/cfg/datasets/VisDrone.yaml +87 -0
- ultralytics/cfg/datasets/african-wildlife.yaml +25 -0
- ultralytics/cfg/datasets/brain-tumor.yaml +22 -0
- ultralytics/cfg/datasets/carparts-seg.yaml +44 -0
- ultralytics/cfg/datasets/coco-pose.yaml +64 -0
- ultralytics/cfg/datasets/coco.yaml +118 -0
- ultralytics/cfg/datasets/coco128-seg.yaml +101 -0
- ultralytics/cfg/datasets/coco128.yaml +101 -0
- ultralytics/cfg/datasets/coco8-grayscale.yaml +103 -0
- ultralytics/cfg/datasets/coco8-multispectral.yaml +104 -0
- ultralytics/cfg/datasets/coco8-pose.yaml +47 -0
- ultralytics/cfg/datasets/coco8-seg.yaml +101 -0
- ultralytics/cfg/datasets/coco8.yaml +101 -0
- ultralytics/cfg/datasets/construction-ppe.yaml +32 -0
- ultralytics/cfg/datasets/crack-seg.yaml +22 -0
- ultralytics/cfg/datasets/dog-pose.yaml +52 -0
- ultralytics/cfg/datasets/dota8-multispectral.yaml +38 -0
- ultralytics/cfg/datasets/dota8.yaml +35 -0
- ultralytics/cfg/datasets/hand-keypoints.yaml +50 -0
- ultralytics/cfg/datasets/kitti.yaml +27 -0
- ultralytics/cfg/datasets/lvis.yaml +1240 -0
- ultralytics/cfg/datasets/medical-pills.yaml +21 -0
- ultralytics/cfg/datasets/open-images-v7.yaml +663 -0
- ultralytics/cfg/datasets/package-seg.yaml +22 -0
- ultralytics/cfg/datasets/signature.yaml +21 -0
- ultralytics/cfg/datasets/tiger-pose.yaml +41 -0
- ultralytics/cfg/datasets/xView.yaml +155 -0
- ultralytics/cfg/default.yaml +130 -0
- ultralytics/cfg/models/11/yolo11-cls-resnet18.yaml +17 -0
- ultralytics/cfg/models/11/yolo11-cls.yaml +33 -0
- ultralytics/cfg/models/11/yolo11-obb.yaml +50 -0
- ultralytics/cfg/models/11/yolo11-pose.yaml +51 -0
- ultralytics/cfg/models/11/yolo11-seg.yaml +50 -0
- ultralytics/cfg/models/11/yolo11.yaml +50 -0
- ultralytics/cfg/models/11/yoloe-11-seg.yaml +48 -0
- ultralytics/cfg/models/11/yoloe-11.yaml +48 -0
- ultralytics/cfg/models/12/yolo12-cls.yaml +32 -0
- ultralytics/cfg/models/12/yolo12-obb.yaml +48 -0
- ultralytics/cfg/models/12/yolo12-pose.yaml +49 -0
- ultralytics/cfg/models/12/yolo12-seg.yaml +48 -0
- ultralytics/cfg/models/12/yolo12.yaml +48 -0
- ultralytics/cfg/models/rt-detr/rtdetr-l.yaml +53 -0
- ultralytics/cfg/models/rt-detr/rtdetr-resnet101.yaml +45 -0
- ultralytics/cfg/models/rt-detr/rtdetr-resnet50.yaml +45 -0
- ultralytics/cfg/models/rt-detr/rtdetr-x.yaml +57 -0
- ultralytics/cfg/models/v10/yolov10b.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10l.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10m.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10n.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10s.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10x.yaml +45 -0
- ultralytics/cfg/models/v3/yolov3-spp.yaml +49 -0
- ultralytics/cfg/models/v3/yolov3-tiny.yaml +40 -0
- ultralytics/cfg/models/v3/yolov3.yaml +49 -0
- ultralytics/cfg/models/v5/yolov5-p6.yaml +62 -0
- ultralytics/cfg/models/v5/yolov5.yaml +51 -0
- ultralytics/cfg/models/v6/yolov6.yaml +56 -0
- ultralytics/cfg/models/v8/yoloe-v8-seg.yaml +48 -0
- ultralytics/cfg/models/v8/yoloe-v8.yaml +48 -0
- ultralytics/cfg/models/v8/yolov8-cls-resnet101.yaml +28 -0
- ultralytics/cfg/models/v8/yolov8-cls-resnet50.yaml +28 -0
- ultralytics/cfg/models/v8/yolov8-cls.yaml +32 -0
- ultralytics/cfg/models/v8/yolov8-ghost-p2.yaml +58 -0
- ultralytics/cfg/models/v8/yolov8-ghost-p6.yaml +60 -0
- ultralytics/cfg/models/v8/yolov8-ghost.yaml +50 -0
- ultralytics/cfg/models/v8/yolov8-obb.yaml +49 -0
- ultralytics/cfg/models/v8/yolov8-p2.yaml +57 -0
- ultralytics/cfg/models/v8/yolov8-p6.yaml +59 -0
- ultralytics/cfg/models/v8/yolov8-pose-p6.yaml +60 -0
- ultralytics/cfg/models/v8/yolov8-pose.yaml +50 -0
- ultralytics/cfg/models/v8/yolov8-rtdetr.yaml +49 -0
- ultralytics/cfg/models/v8/yolov8-seg-p6.yaml +59 -0
- ultralytics/cfg/models/v8/yolov8-seg.yaml +49 -0
- ultralytics/cfg/models/v8/yolov8-world.yaml +51 -0
- ultralytics/cfg/models/v8/yolov8-worldv2.yaml +49 -0
- ultralytics/cfg/models/v8/yolov8.yaml +49 -0
- ultralytics/cfg/models/v9/yolov9c-seg.yaml +41 -0
- ultralytics/cfg/models/v9/yolov9c.yaml +41 -0
- ultralytics/cfg/models/v9/yolov9e-seg.yaml +64 -0
- ultralytics/cfg/models/v9/yolov9e.yaml +64 -0
- ultralytics/cfg/models/v9/yolov9m.yaml +41 -0
- ultralytics/cfg/models/v9/yolov9s.yaml +41 -0
- ultralytics/cfg/models/v9/yolov9t.yaml +41 -0
- ultralytics/cfg/trackers/botsort.yaml +21 -0
- ultralytics/cfg/trackers/bytetrack.yaml +12 -0
- ultralytics/data/__init__.py +26 -0
- ultralytics/data/annotator.py +66 -0
- ultralytics/data/augment.py +2801 -0
- ultralytics/data/base.py +435 -0
- ultralytics/data/build.py +437 -0
- ultralytics/data/converter.py +855 -0
- ultralytics/data/dataset.py +834 -0
- ultralytics/data/loaders.py +704 -0
- ultralytics/data/scripts/download_weights.sh +18 -0
- ultralytics/data/scripts/get_coco.sh +61 -0
- ultralytics/data/scripts/get_coco128.sh +18 -0
- ultralytics/data/scripts/get_imagenet.sh +52 -0
- ultralytics/data/split.py +138 -0
- ultralytics/data/split_dota.py +344 -0
- ultralytics/data/utils.py +798 -0
- ultralytics/engine/__init__.py +1 -0
- ultralytics/engine/exporter.py +1574 -0
- ultralytics/engine/model.py +1124 -0
- ultralytics/engine/predictor.py +508 -0
- ultralytics/engine/results.py +1522 -0
- ultralytics/engine/trainer.py +974 -0
- ultralytics/engine/tuner.py +448 -0
- ultralytics/engine/validator.py +384 -0
- ultralytics/hub/__init__.py +166 -0
- ultralytics/hub/auth.py +151 -0
- ultralytics/hub/google/__init__.py +174 -0
- ultralytics/hub/session.py +422 -0
- ultralytics/hub/utils.py +162 -0
- ultralytics/models/__init__.py +9 -0
- ultralytics/models/fastsam/__init__.py +7 -0
- ultralytics/models/fastsam/model.py +79 -0
- ultralytics/models/fastsam/predict.py +169 -0
- ultralytics/models/fastsam/utils.py +23 -0
- ultralytics/models/fastsam/val.py +38 -0
- ultralytics/models/nas/__init__.py +7 -0
- ultralytics/models/nas/model.py +98 -0
- ultralytics/models/nas/predict.py +56 -0
- ultralytics/models/nas/val.py +38 -0
- ultralytics/models/rtdetr/__init__.py +7 -0
- ultralytics/models/rtdetr/model.py +63 -0
- ultralytics/models/rtdetr/predict.py +88 -0
- ultralytics/models/rtdetr/train.py +89 -0
- ultralytics/models/rtdetr/val.py +216 -0
- ultralytics/models/sam/__init__.py +25 -0
- ultralytics/models/sam/amg.py +275 -0
- ultralytics/models/sam/build.py +365 -0
- ultralytics/models/sam/build_sam3.py +377 -0
- ultralytics/models/sam/model.py +169 -0
- ultralytics/models/sam/modules/__init__.py +1 -0
- ultralytics/models/sam/modules/blocks.py +1067 -0
- ultralytics/models/sam/modules/decoders.py +495 -0
- ultralytics/models/sam/modules/encoders.py +794 -0
- ultralytics/models/sam/modules/memory_attention.py +298 -0
- ultralytics/models/sam/modules/sam.py +1160 -0
- ultralytics/models/sam/modules/tiny_encoder.py +979 -0
- ultralytics/models/sam/modules/transformer.py +344 -0
- ultralytics/models/sam/modules/utils.py +512 -0
- ultralytics/models/sam/predict.py +3940 -0
- ultralytics/models/sam/sam3/__init__.py +3 -0
- ultralytics/models/sam/sam3/decoder.py +546 -0
- ultralytics/models/sam/sam3/encoder.py +529 -0
- ultralytics/models/sam/sam3/geometry_encoders.py +415 -0
- ultralytics/models/sam/sam3/maskformer_segmentation.py +286 -0
- ultralytics/models/sam/sam3/model_misc.py +199 -0
- ultralytics/models/sam/sam3/necks.py +129 -0
- ultralytics/models/sam/sam3/sam3_image.py +339 -0
- ultralytics/models/sam/sam3/text_encoder_ve.py +307 -0
- ultralytics/models/sam/sam3/vitdet.py +547 -0
- ultralytics/models/sam/sam3/vl_combiner.py +160 -0
- ultralytics/models/utils/__init__.py +1 -0
- ultralytics/models/utils/loss.py +466 -0
- ultralytics/models/utils/ops.py +315 -0
- ultralytics/models/yolo/__init__.py +7 -0
- ultralytics/models/yolo/classify/__init__.py +7 -0
- ultralytics/models/yolo/classify/predict.py +90 -0
- ultralytics/models/yolo/classify/train.py +202 -0
- ultralytics/models/yolo/classify/val.py +216 -0
- ultralytics/models/yolo/detect/__init__.py +7 -0
- ultralytics/models/yolo/detect/predict.py +122 -0
- ultralytics/models/yolo/detect/train.py +227 -0
- ultralytics/models/yolo/detect/val.py +507 -0
- ultralytics/models/yolo/model.py +430 -0
- ultralytics/models/yolo/obb/__init__.py +7 -0
- ultralytics/models/yolo/obb/predict.py +56 -0
- ultralytics/models/yolo/obb/train.py +79 -0
- ultralytics/models/yolo/obb/val.py +302 -0
- ultralytics/models/yolo/pose/__init__.py +7 -0
- ultralytics/models/yolo/pose/predict.py +65 -0
- ultralytics/models/yolo/pose/train.py +110 -0
- ultralytics/models/yolo/pose/val.py +248 -0
- ultralytics/models/yolo/segment/__init__.py +7 -0
- ultralytics/models/yolo/segment/predict.py +109 -0
- ultralytics/models/yolo/segment/train.py +69 -0
- ultralytics/models/yolo/segment/val.py +307 -0
- ultralytics/models/yolo/world/__init__.py +5 -0
- ultralytics/models/yolo/world/train.py +173 -0
- ultralytics/models/yolo/world/train_world.py +178 -0
- ultralytics/models/yolo/yoloe/__init__.py +22 -0
- ultralytics/models/yolo/yoloe/predict.py +162 -0
- ultralytics/models/yolo/yoloe/train.py +287 -0
- ultralytics/models/yolo/yoloe/train_seg.py +122 -0
- ultralytics/models/yolo/yoloe/val.py +206 -0
- ultralytics/nn/__init__.py +27 -0
- ultralytics/nn/autobackend.py +958 -0
- ultralytics/nn/modules/__init__.py +182 -0
- ultralytics/nn/modules/activation.py +54 -0
- ultralytics/nn/modules/block.py +1947 -0
- ultralytics/nn/modules/conv.py +669 -0
- ultralytics/nn/modules/head.py +1183 -0
- ultralytics/nn/modules/transformer.py +793 -0
- ultralytics/nn/modules/utils.py +159 -0
- ultralytics/nn/tasks.py +1768 -0
- ultralytics/nn/text_model.py +356 -0
- ultralytics/py.typed +1 -0
- ultralytics/solutions/__init__.py +41 -0
- ultralytics/solutions/ai_gym.py +108 -0
- ultralytics/solutions/analytics.py +264 -0
- ultralytics/solutions/config.py +107 -0
- ultralytics/solutions/distance_calculation.py +123 -0
- ultralytics/solutions/heatmap.py +125 -0
- ultralytics/solutions/instance_segmentation.py +86 -0
- ultralytics/solutions/object_blurrer.py +89 -0
- ultralytics/solutions/object_counter.py +190 -0
- ultralytics/solutions/object_cropper.py +87 -0
- ultralytics/solutions/parking_management.py +280 -0
- ultralytics/solutions/queue_management.py +93 -0
- ultralytics/solutions/region_counter.py +133 -0
- ultralytics/solutions/security_alarm.py +151 -0
- ultralytics/solutions/similarity_search.py +219 -0
- ultralytics/solutions/solutions.py +828 -0
- ultralytics/solutions/speed_estimation.py +114 -0
- ultralytics/solutions/streamlit_inference.py +260 -0
- ultralytics/solutions/templates/similarity-search.html +156 -0
- ultralytics/solutions/trackzone.py +88 -0
- ultralytics/solutions/vision_eye.py +67 -0
- ultralytics/trackers/__init__.py +7 -0
- ultralytics/trackers/basetrack.py +115 -0
- ultralytics/trackers/bot_sort.py +257 -0
- ultralytics/trackers/byte_tracker.py +469 -0
- ultralytics/trackers/track.py +116 -0
- ultralytics/trackers/utils/__init__.py +1 -0
- ultralytics/trackers/utils/gmc.py +339 -0
- ultralytics/trackers/utils/kalman_filter.py +482 -0
- ultralytics/trackers/utils/matching.py +154 -0
- ultralytics/utils/__init__.py +1450 -0
- ultralytics/utils/autobatch.py +118 -0
- ultralytics/utils/autodevice.py +205 -0
- ultralytics/utils/benchmarks.py +728 -0
- ultralytics/utils/callbacks/__init__.py +5 -0
- ultralytics/utils/callbacks/base.py +233 -0
- ultralytics/utils/callbacks/clearml.py +146 -0
- ultralytics/utils/callbacks/comet.py +625 -0
- ultralytics/utils/callbacks/dvc.py +197 -0
- ultralytics/utils/callbacks/hub.py +110 -0
- ultralytics/utils/callbacks/mlflow.py +134 -0
- ultralytics/utils/callbacks/neptune.py +126 -0
- ultralytics/utils/callbacks/platform.py +73 -0
- ultralytics/utils/callbacks/raytune.py +42 -0
- ultralytics/utils/callbacks/tensorboard.py +123 -0
- ultralytics/utils/callbacks/wb.py +188 -0
- ultralytics/utils/checks.py +998 -0
- ultralytics/utils/cpu.py +85 -0
- ultralytics/utils/dist.py +123 -0
- ultralytics/utils/downloads.py +529 -0
- ultralytics/utils/errors.py +35 -0
- ultralytics/utils/events.py +113 -0
- ultralytics/utils/export/__init__.py +7 -0
- ultralytics/utils/export/engine.py +237 -0
- ultralytics/utils/export/imx.py +315 -0
- ultralytics/utils/export/tensorflow.py +231 -0
- ultralytics/utils/files.py +219 -0
- ultralytics/utils/git.py +137 -0
- ultralytics/utils/instance.py +484 -0
- ultralytics/utils/logger.py +444 -0
- ultralytics/utils/loss.py +849 -0
- ultralytics/utils/metrics.py +1560 -0
- ultralytics/utils/nms.py +337 -0
- ultralytics/utils/ops.py +664 -0
- ultralytics/utils/patches.py +201 -0
- ultralytics/utils/plotting.py +1045 -0
- ultralytics/utils/tal.py +403 -0
- ultralytics/utils/torch_utils.py +984 -0
- ultralytics/utils/tqdm.py +440 -0
- ultralytics/utils/triton.py +112 -0
- ultralytics/utils/tuner.py +160 -0
- ultralytics_opencv_headless-8.3.242.dist-info/METADATA +374 -0
- ultralytics_opencv_headless-8.3.242.dist-info/RECORD +298 -0
- ultralytics_opencv_headless-8.3.242.dist-info/WHEEL +5 -0
- ultralytics_opencv_headless-8.3.242.dist-info/entry_points.txt +3 -0
- ultralytics_opencv_headless-8.3.242.dist-info/licenses/LICENSE +661 -0
- ultralytics_opencv_headless-8.3.242.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Tiger Pose dataset by Ultralytics
|
|
4
|
+
# Documentation: https://docs.ultralytics.com/datasets/pose/tiger-pose/
|
|
5
|
+
# Example usage: yolo train data=tiger-pose.yaml
|
|
6
|
+
# parent
|
|
7
|
+
# ├── ultralytics
|
|
8
|
+
# └── datasets
|
|
9
|
+
# └── tiger-pose ← downloads here (49.8 MB)
|
|
10
|
+
|
|
11
|
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
+
path: tiger-pose # dataset root dir
|
|
13
|
+
train: images/train # train images (relative to 'path') 210 images
|
|
14
|
+
val: images/val # val images (relative to 'path') 53 images
|
|
15
|
+
|
|
16
|
+
# Keypoints
|
|
17
|
+
kpt_shape: [12, 2] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
|
|
18
|
+
flip_idx: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
|
19
|
+
|
|
20
|
+
# Classes
|
|
21
|
+
names:
|
|
22
|
+
0: tiger
|
|
23
|
+
|
|
24
|
+
# Keypoint names per class
|
|
25
|
+
kpt_names:
|
|
26
|
+
0:
|
|
27
|
+
- nose
|
|
28
|
+
- head
|
|
29
|
+
- withers
|
|
30
|
+
- tail_base
|
|
31
|
+
- right_hind_hock
|
|
32
|
+
- right_hind_paw
|
|
33
|
+
- left_hind_paw
|
|
34
|
+
- left_hind_hock
|
|
35
|
+
- right_front_wrist
|
|
36
|
+
- right_front_paw
|
|
37
|
+
- left_front_wrist
|
|
38
|
+
- left_front_paw
|
|
39
|
+
|
|
40
|
+
# Download script/URL (optional)
|
|
41
|
+
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/tiger-pose.zip
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# DIUx xView 2018 Challenge dataset https://challenge.xviewdataset.org by U.S. National Geospatial-Intelligence Agency (NGA)
|
|
4
|
+
# -------- Download and extract data manually to `datasets/xView` before running the train command. --------
|
|
5
|
+
# Documentation: https://docs.ultralytics.com/datasets/detect/xview/
|
|
6
|
+
# Example usage: yolo train data=xView.yaml
|
|
7
|
+
# parent
|
|
8
|
+
# ├── ultralytics
|
|
9
|
+
# └── datasets
|
|
10
|
+
# └── xView ← downloads here (20.7 GB)
|
|
11
|
+
|
|
12
|
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
13
|
+
path: xView # dataset root dir
|
|
14
|
+
train: images/autosplit_train.txt # train images (relative to 'path') 90% of 847 train images
|
|
15
|
+
val: images/autosplit_val.txt # val images (relative to 'path') 10% of 847 train images
|
|
16
|
+
|
|
17
|
+
# Classes
|
|
18
|
+
names:
|
|
19
|
+
0: Fixed-wing Aircraft
|
|
20
|
+
1: Small Aircraft
|
|
21
|
+
2: Cargo Plane
|
|
22
|
+
3: Helicopter
|
|
23
|
+
4: Passenger Vehicle
|
|
24
|
+
5: Small Car
|
|
25
|
+
6: Bus
|
|
26
|
+
7: Pickup Truck
|
|
27
|
+
8: Utility Truck
|
|
28
|
+
9: Truck
|
|
29
|
+
10: Cargo Truck
|
|
30
|
+
11: Truck w/Box
|
|
31
|
+
12: Truck Tractor
|
|
32
|
+
13: Trailer
|
|
33
|
+
14: Truck w/Flatbed
|
|
34
|
+
15: Truck w/Liquid
|
|
35
|
+
16: Crane Truck
|
|
36
|
+
17: Railway Vehicle
|
|
37
|
+
18: Passenger Car
|
|
38
|
+
19: Cargo Car
|
|
39
|
+
20: Flat Car
|
|
40
|
+
21: Tank car
|
|
41
|
+
22: Locomotive
|
|
42
|
+
23: Maritime Vessel
|
|
43
|
+
24: Motorboat
|
|
44
|
+
25: Sailboat
|
|
45
|
+
26: Tugboat
|
|
46
|
+
27: Barge
|
|
47
|
+
28: Fishing Vessel
|
|
48
|
+
29: Ferry
|
|
49
|
+
30: Yacht
|
|
50
|
+
31: Container Ship
|
|
51
|
+
32: Oil Tanker
|
|
52
|
+
33: Engineering Vehicle
|
|
53
|
+
34: Tower crane
|
|
54
|
+
35: Container Crane
|
|
55
|
+
36: Reach Stacker
|
|
56
|
+
37: Straddle Carrier
|
|
57
|
+
38: Mobile Crane
|
|
58
|
+
39: Dump Truck
|
|
59
|
+
40: Haul Truck
|
|
60
|
+
41: Scraper/Tractor
|
|
61
|
+
42: Front loader/Bulldozer
|
|
62
|
+
43: Excavator
|
|
63
|
+
44: Cement Mixer
|
|
64
|
+
45: Ground Grader
|
|
65
|
+
46: Hut/Tent
|
|
66
|
+
47: Shed
|
|
67
|
+
48: Building
|
|
68
|
+
49: Aircraft Hangar
|
|
69
|
+
50: Damaged Building
|
|
70
|
+
51: Facility
|
|
71
|
+
52: Construction Site
|
|
72
|
+
53: Vehicle Lot
|
|
73
|
+
54: Helipad
|
|
74
|
+
55: Storage Tank
|
|
75
|
+
56: Shipping container lot
|
|
76
|
+
57: Shipping Container
|
|
77
|
+
58: Pylon
|
|
78
|
+
59: Tower
|
|
79
|
+
|
|
80
|
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
|
81
|
+
download: |
|
|
82
|
+
import json
|
|
83
|
+
from pathlib import Path
|
|
84
|
+
import shutil
|
|
85
|
+
|
|
86
|
+
import numpy as np
|
|
87
|
+
from PIL import Image
|
|
88
|
+
|
|
89
|
+
from ultralytics.utils import TQDM
|
|
90
|
+
from ultralytics.data.split import autosplit
|
|
91
|
+
from ultralytics.utils.ops import xyxy2xywhn
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def convert_labels(fname=Path("xView/xView_train.geojson")):
|
|
95
|
+
"""Convert xView GeoJSON labels to YOLO format (classes 0-59) and save them as text files."""
|
|
96
|
+
path = fname.parent
|
|
97
|
+
with open(fname, encoding="utf-8") as f:
|
|
98
|
+
print(f"Loading {fname}...")
|
|
99
|
+
data = json.load(f)
|
|
100
|
+
|
|
101
|
+
# Make dirs
|
|
102
|
+
labels = path / "labels" / "train"
|
|
103
|
+
shutil.rmtree(labels, ignore_errors=True)
|
|
104
|
+
labels.mkdir(parents=True, exist_ok=True)
|
|
105
|
+
|
|
106
|
+
# xView classes 11-94 to 0-59
|
|
107
|
+
xview_class2index = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, -1, 3, -1, 4, 5, 6, 7, 8, -1, 9, 10, 11,
|
|
108
|
+
12, 13, 14, 15, -1, -1, 16, 17, 18, 19, 20, 21, 22, -1, 23, 24, 25, -1, 26, 27, -1, 28, -1,
|
|
109
|
+
29, 30, 31, 32, 33, 34, 35, 36, 37, -1, 38, 39, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, 46,
|
|
110
|
+
47, 48, 49, -1, 50, 51, -1, 52, -1, -1, -1, 53, 54, -1, 55, -1, -1, 56, -1, 57, -1, 58, 59]
|
|
111
|
+
|
|
112
|
+
shapes = {}
|
|
113
|
+
for feature in TQDM(data["features"], desc=f"Converting {fname}"):
|
|
114
|
+
p = feature["properties"]
|
|
115
|
+
if p["bounds_imcoords"]:
|
|
116
|
+
image_id = p["image_id"]
|
|
117
|
+
image_file = path / "train_images" / image_id
|
|
118
|
+
if image_file.exists(): # 1395.tif missing
|
|
119
|
+
try:
|
|
120
|
+
box = np.array([int(num) for num in p["bounds_imcoords"].split(",")])
|
|
121
|
+
assert box.shape[0] == 4, f"incorrect box shape {box.shape[0]}"
|
|
122
|
+
cls = p["type_id"]
|
|
123
|
+
cls = xview_class2index[int(cls)] # xView class to 0-59
|
|
124
|
+
assert 59 >= cls >= 0, f"incorrect class index {cls}"
|
|
125
|
+
|
|
126
|
+
# Write YOLO label
|
|
127
|
+
if image_id not in shapes:
|
|
128
|
+
shapes[image_id] = Image.open(image_file).size
|
|
129
|
+
box = xyxy2xywhn(box[None].astype(float), w=shapes[image_id][0], h=shapes[image_id][1], clip=True)
|
|
130
|
+
with open((labels / image_id).with_suffix(".txt"), "a", encoding="utf-8") as f:
|
|
131
|
+
f.write(f"{cls} {' '.join(f'{x:.6f}' for x in box[0])}\n") # write label.txt
|
|
132
|
+
except Exception as e:
|
|
133
|
+
print(f"WARNING: skipping one label for {image_file}: {e}")
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
# Download manually from https://challenge.xviewdataset.org
|
|
137
|
+
dir = Path(yaml["path"]) # dataset root dir
|
|
138
|
+
# urls = [
|
|
139
|
+
# "https://d307kc0mrhucc3.cloudfront.net/train_labels.zip", # train labels
|
|
140
|
+
# "https://d307kc0mrhucc3.cloudfront.net/train_images.zip", # 15G, 847 train images
|
|
141
|
+
# "https://d307kc0mrhucc3.cloudfront.net/val_images.zip", # 5G, 282 val images (no labels)
|
|
142
|
+
# ]
|
|
143
|
+
# download(urls, dir=dir)
|
|
144
|
+
|
|
145
|
+
# Convert labels
|
|
146
|
+
convert_labels(dir / "xView_train.geojson")
|
|
147
|
+
|
|
148
|
+
# Move images
|
|
149
|
+
images = Path(dir / "images")
|
|
150
|
+
images.mkdir(parents=True, exist_ok=True)
|
|
151
|
+
Path(dir / "train_images").rename(dir / "images" / "train")
|
|
152
|
+
Path(dir / "val_images").rename(dir / "images" / "val")
|
|
153
|
+
|
|
154
|
+
# Split
|
|
155
|
+
autosplit(dir / "images" / "train")
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Global configuration YAML with settings and hyperparameters for YOLO training, validation, prediction and export
|
|
4
|
+
# For documentation see https://docs.ultralytics.com/usage/cfg/
|
|
5
|
+
|
|
6
|
+
task: detect # (str) YOLO task, i.e. detect, segment, classify, pose, obb
|
|
7
|
+
mode: train # (str) YOLO mode, i.e. train, val, predict, export, track, benchmark
|
|
8
|
+
|
|
9
|
+
# Train settings -------------------------------------------------------------------------------------------------------
|
|
10
|
+
model: # (str, optional) path to model file, i.e. yolov8n.pt or yolov8n.yaml
|
|
11
|
+
data: # (str, optional) path to data file, i.e. coco8.yaml
|
|
12
|
+
epochs: 100 # (int) number of epochs to train for
|
|
13
|
+
time: # (float, optional) max hours to train; overrides epochs if set
|
|
14
|
+
patience: 100 # (int) early stop after N epochs without val improvement
|
|
15
|
+
batch: 16 # (int) batch size; use -1 for AutoBatch
|
|
16
|
+
imgsz: 640 # (int | list) train/val use int (square); predict/export may use [h,w]
|
|
17
|
+
save: True # (bool) save train checkpoints and predict results
|
|
18
|
+
save_period: -1 # (int) save checkpoint every N epochs; disabled if < 1
|
|
19
|
+
cache: False # (bool | str) cache images in RAM (True/'ram') or on 'disk' to speed dataloading; False disables
|
|
20
|
+
device: # (int | str | list) device: 0 or [0,1,2,3] for CUDA, 'cpu'/'mps', or -1/[-1,-1] to auto-select idle GPUs
|
|
21
|
+
workers: 8 # (int) dataloader workers (per RANK if DDP)
|
|
22
|
+
project: # (str, optional) project name for results root
|
|
23
|
+
name: # (str, optional) experiment name; results in 'project/name'
|
|
24
|
+
exist_ok: False # (bool) overwrite existing 'project/name' if True
|
|
25
|
+
pretrained: True # (bool | str) use pretrained weights (bool) or load weights from path (str)
|
|
26
|
+
optimizer: auto # (str) optimizer: SGD, Adam, Adamax, AdamW, NAdam, RAdam, RMSProp, or auto
|
|
27
|
+
verbose: True # (bool) print verbose logs during training/val
|
|
28
|
+
seed: 0 # (int) random seed for reproducibility
|
|
29
|
+
deterministic: True # (bool) enable deterministic ops; reproducible but may be slower
|
|
30
|
+
single_cls: False # (bool) treat all classes as a single class
|
|
31
|
+
rect: False # (bool) rectangular batches for train; rectangular batching for val when mode='val'
|
|
32
|
+
cos_lr: False # (bool) cosine learning rate scheduler
|
|
33
|
+
close_mosaic: 10 # (int) disable mosaic augmentation for final N epochs (0 to keep enabled)
|
|
34
|
+
resume: False # (bool) resume training from last checkpoint in the run dir
|
|
35
|
+
amp: True # (bool) Automatic Mixed Precision (AMP) training; True runs AMP capability check
|
|
36
|
+
fraction: 1.0 # (float) fraction of training dataset to use (1.0 = all)
|
|
37
|
+
profile: False # (bool) profile ONNX/TensorRT speeds during training for loggers
|
|
38
|
+
freeze: # (int | list, optional) freeze first N layers (int) or specific layer indices (list)
|
|
39
|
+
multi_scale: False # (bool) multiscale training by varying image size
|
|
40
|
+
compile: False # (bool | str) enable torch.compile() backend='inductor'; True="default", False=off, or "default|reduce-overhead|max-autotune-no-cudagraphs"
|
|
41
|
+
|
|
42
|
+
# Segmentation
|
|
43
|
+
overlap_mask: True # (bool) merge instance masks into one mask during training (segment only)
|
|
44
|
+
mask_ratio: 4 # (int) mask downsample ratio (segment only)
|
|
45
|
+
|
|
46
|
+
# Classification
|
|
47
|
+
dropout: 0.0 # (float) dropout for classification head (classify only)
|
|
48
|
+
|
|
49
|
+
# Val/Test settings ----------------------------------------------------------------------------------------------------
|
|
50
|
+
val: True # (bool) run validation/testing during training
|
|
51
|
+
split: val # (str) dataset split to evaluate: 'val', 'test' or 'train'
|
|
52
|
+
save_json: False # (bool) save results to COCO JSON for external evaluation
|
|
53
|
+
conf: # (float, optional) confidence threshold; defaults: predict=0.25, val=0.001
|
|
54
|
+
iou: 0.7 # (float) IoU threshold used for NMS
|
|
55
|
+
max_det: 300 # (int) maximum number of detections per image
|
|
56
|
+
half: False # (bool) use half precision (FP16) if supported
|
|
57
|
+
dnn: False # (bool) use OpenCV DNN for ONNX inference
|
|
58
|
+
plots: True # (bool) save plots and images during train/val
|
|
59
|
+
|
|
60
|
+
# Predict settings -----------------------------------------------------------------------------------------------------
|
|
61
|
+
source: # (str, optional) path/dir/URL/stream for images or videos; e.g. 'ultralytics/assets' or '0' for webcam
|
|
62
|
+
vid_stride: 1 # (int) read every Nth frame for video sources
|
|
63
|
+
stream_buffer: False # (bool) True buffers all frames; False keeps the most recent frame for low-latency streams
|
|
64
|
+
visualize: False # (bool) visualize model features (predict) or TP/FP/FN confusion (val)
|
|
65
|
+
augment: False # (bool) apply test-time augmentation during prediction
|
|
66
|
+
agnostic_nms: False # (bool) class-agnostic NMS
|
|
67
|
+
classes: # (int | list[int], optional) filter by class id(s), e.g. 0 or [0,2,3]
|
|
68
|
+
retina_masks: False # (bool) use high-resolution segmentation masks (segment)
|
|
69
|
+
embed: # (list[int], optional) return feature embeddings from given layer indices
|
|
70
|
+
|
|
71
|
+
# Visualize settings ---------------------------------------------------------------------------------------------------
|
|
72
|
+
show: False # (bool) show images/videos in a window if supported
|
|
73
|
+
save_frames: False # (bool) save individual frames from video predictions
|
|
74
|
+
save_txt: False # (bool) save results as .txt files (xywh format)
|
|
75
|
+
save_conf: False # (bool) save confidence scores with results
|
|
76
|
+
save_crop: False # (bool) save cropped prediction regions to files
|
|
77
|
+
show_labels: True # (bool) draw class labels on images, e.g. 'person'
|
|
78
|
+
show_conf: True # (bool) draw confidence values on images, e.g. '0.99'
|
|
79
|
+
show_boxes: True # (bool) draw bounding boxes on images
|
|
80
|
+
line_width: # (int, optional) line width of boxes; auto-scales with image size if not set
|
|
81
|
+
|
|
82
|
+
# Export settings ------------------------------------------------------------------------------------------------------
|
|
83
|
+
format: torchscript # (str) target format, e.g. torchscript|onnx|openvino|engine|coreml|saved_model|pb|tflite|edgetpu|tfjs|paddle|mnn|ncnn|imx|rknn|executorch
|
|
84
|
+
keras: False # (bool) TF SavedModel only (format=saved_model); enable Keras layers during export
|
|
85
|
+
optimize: False # (bool) TorchScript only; apply mobile optimizations to the scripted model
|
|
86
|
+
int8: False # (bool) INT8/PTQ where supported (openvino, tflite, tfjs, engine, imx); needs calibration data/fraction
|
|
87
|
+
dynamic: False # (bool) dynamic shapes for torchscript, onnx, openvino, engine; enable variable image sizes
|
|
88
|
+
simplify: True # (bool) ONNX/engine only; run graph simplifier for cleaner ONNX before runtime conversion
|
|
89
|
+
opset: # (int, optional) ONNX/engine only; opset version for export; leave unset to use a tested default
|
|
90
|
+
workspace: # (float, optional) engine (TensorRT) only; workspace size in GiB, e.g. 4
|
|
91
|
+
nms: False # (bool) fuse NMS into exported model when backend supports; if True, conf/iou apply (agnostic_nms except coreml)
|
|
92
|
+
|
|
93
|
+
# Hyperparameters ------------------------------------------------------------------------------------------------------
|
|
94
|
+
lr0: 0.01 # (float) initial learning rate (SGD=1e-2, Adam/AdamW=1e-3)
|
|
95
|
+
lrf: 0.01 # (float) final LR fraction; final LR = lr0 * lrf
|
|
96
|
+
momentum: 0.937 # (float) SGD momentum or Adam beta1
|
|
97
|
+
weight_decay: 0.0005 # (float) weight decay (L2 regularization)
|
|
98
|
+
warmup_epochs: 3.0 # (float) warmup epochs (fractions allowed)
|
|
99
|
+
warmup_momentum: 0.8 # (float) initial momentum during warmup
|
|
100
|
+
warmup_bias_lr: 0.1 # (float) bias learning rate during warmup
|
|
101
|
+
box: 7.5 # (float) box loss gain
|
|
102
|
+
cls: 0.5 # (float) classification loss gain
|
|
103
|
+
dfl: 1.5 # (float) distribution focal loss gain
|
|
104
|
+
pose: 12.0 # (float) pose loss gain (pose tasks)
|
|
105
|
+
kobj: 1.0 # (float) keypoint objectness loss gain (pose tasks)
|
|
106
|
+
nbs: 64 # (int) nominal batch size used for loss normalization
|
|
107
|
+
hsv_h: 0.015 # (float) HSV hue augmentation fraction
|
|
108
|
+
hsv_s: 0.7 # (float) HSV saturation augmentation fraction
|
|
109
|
+
hsv_v: 0.4 # (float) HSV value (brightness) augmentation fraction
|
|
110
|
+
degrees: 0.0 # (float) rotation degrees (+/-)
|
|
111
|
+
translate: 0.1 # (float) translation fraction (+/-)
|
|
112
|
+
scale: 0.5 # (float) scale gain (+/-)
|
|
113
|
+
shear: 0.0 # (float) shear degrees (+/-)
|
|
114
|
+
perspective: 0.0 # (float) perspective fraction (0–0.001 typical)
|
|
115
|
+
flipud: 0.0 # (float) vertical flip probability
|
|
116
|
+
fliplr: 0.5 # (float) horizontal flip probability
|
|
117
|
+
bgr: 0.0 # (float) RGB↔BGR channel swap probability
|
|
118
|
+
mosaic: 1.0 # (float) mosaic augmentation probability
|
|
119
|
+
mixup: 0.0 # (float) MixUp augmentation probability
|
|
120
|
+
cutmix: 0.0 # (float) CutMix augmentation probability
|
|
121
|
+
copy_paste: 0.0 # (float) segmentation copy-paste probability
|
|
122
|
+
copy_paste_mode: flip # (str) copy-paste strategy for segmentation: flip or mixup
|
|
123
|
+
auto_augment: randaugment # (str) classification auto augmentation policy: randaugment, autoaugment, augmix
|
|
124
|
+
erasing: 0.4 # (float) random erasing probability for classification (0–0.9), <1.0
|
|
125
|
+
|
|
126
|
+
# Custom config.yaml ---------------------------------------------------------------------------------------------------
|
|
127
|
+
cfg: # (str, optional) path to a config.yaml that overrides defaults
|
|
128
|
+
|
|
129
|
+
# Tracker settings ------------------------------------------------------------------------------------------------------
|
|
130
|
+
tracker: botsort.yaml # (str) tracker config file: botsort.yaml or bytetrack.yaml
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Ultralytics YOLO11-cls image classification model with ResNet18 backbone
|
|
4
|
+
# Model docs: https://docs.ultralytics.com/models/yolo11
|
|
5
|
+
# Task docs: https://docs.ultralytics.com/tasks/classify
|
|
6
|
+
|
|
7
|
+
# Parameters
|
|
8
|
+
nc: 1000 # number of classes
|
|
9
|
+
|
|
10
|
+
# ResNet18 backbone
|
|
11
|
+
backbone:
|
|
12
|
+
# [from, repeats, module, args]
|
|
13
|
+
- [-1, 1, TorchVision, [512, resnet18, DEFAULT, True, 2]] # truncate two layers from the end
|
|
14
|
+
|
|
15
|
+
# YOLO11n head
|
|
16
|
+
head:
|
|
17
|
+
- [-1, 1, Classify, [nc]] # Classify
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Ultralytics YOLO11-cls image classification model
|
|
4
|
+
# Model docs: https://docs.ultralytics.com/models/yolo11
|
|
5
|
+
# Task docs: https://docs.ultralytics.com/tasks/classify
|
|
6
|
+
|
|
7
|
+
# Parameters
|
|
8
|
+
nc: 1000 # number of classes
|
|
9
|
+
scales: # model compound scaling constants, i.e. 'model=yolo11n-cls.yaml' will call yolo11-cls.yaml with scale 'n'
|
|
10
|
+
# [depth, width, max_channels]
|
|
11
|
+
n: [0.50, 0.25, 1024] # summary: 86 layers, 1633584 parameters, 1633584 gradients, 0.5 GFLOPs
|
|
12
|
+
s: [0.50, 0.50, 1024] # summary: 86 layers, 5545488 parameters, 5545488 gradients, 1.6 GFLOPs
|
|
13
|
+
m: [0.50, 1.00, 512] # summary: 106 layers, 10455696 parameters, 10455696 gradients, 5.0 GFLOPs
|
|
14
|
+
l: [1.00, 1.00, 512] # summary: 176 layers, 12937104 parameters, 12937104 gradients, 6.2 GFLOPs
|
|
15
|
+
x: [1.00, 1.50, 512] # summary: 176 layers, 28458544 parameters, 28458544 gradients, 13.7 GFLOPs
|
|
16
|
+
|
|
17
|
+
# YOLO11n backbone
|
|
18
|
+
backbone:
|
|
19
|
+
# [from, repeats, module, args]
|
|
20
|
+
- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
|
|
21
|
+
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
|
22
|
+
- [-1, 2, C3k2, [256, False, 0.25]]
|
|
23
|
+
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
|
24
|
+
- [-1, 2, C3k2, [512, False, 0.25]]
|
|
25
|
+
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
|
26
|
+
- [-1, 2, C3k2, [512, True]]
|
|
27
|
+
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
|
|
28
|
+
- [-1, 2, C3k2, [1024, True]]
|
|
29
|
+
- [-1, 2, C2PSA, [1024]] # 9
|
|
30
|
+
|
|
31
|
+
# YOLO11n head
|
|
32
|
+
head:
|
|
33
|
+
- [-1, 1, Classify, [nc]] # Classify
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Ultralytics YOLO11-obb Oriented Bounding Boxes (OBB) model with P3/8 - P5/32 outputs
|
|
4
|
+
# Model docs: https://docs.ultralytics.com/models/yolo11
|
|
5
|
+
# Task docs: https://docs.ultralytics.com/tasks/obb
|
|
6
|
+
|
|
7
|
+
# Parameters
|
|
8
|
+
nc: 80 # number of classes
|
|
9
|
+
scales: # model compound scaling constants, i.e. 'model=yolo11n-obb.yaml' will call yolo11-obb.yaml with scale 'n'
|
|
10
|
+
# [depth, width, max_channels]
|
|
11
|
+
n: [0.50, 0.25, 1024] # summary: 196 layers, 2695747 parameters, 2695731 gradients, 6.9 GFLOPs
|
|
12
|
+
s: [0.50, 0.50, 1024] # summary: 196 layers, 9744931 parameters, 9744915 gradients, 22.7 GFLOPs
|
|
13
|
+
m: [0.50, 1.00, 512] # summary: 246 layers, 20963523 parameters, 20963507 gradients, 72.2 GFLOPs
|
|
14
|
+
l: [1.00, 1.00, 512] # summary: 372 layers, 26220995 parameters, 26220979 gradients, 91.3 GFLOPs
|
|
15
|
+
x: [1.00, 1.50, 512] # summary: 372 layers, 58875331 parameters, 58875315 gradients, 204.3 GFLOPs
|
|
16
|
+
|
|
17
|
+
# YOLO11n backbone
|
|
18
|
+
backbone:
|
|
19
|
+
# [from, repeats, module, args]
|
|
20
|
+
- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
|
|
21
|
+
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
|
22
|
+
- [-1, 2, C3k2, [256, False, 0.25]]
|
|
23
|
+
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
|
24
|
+
- [-1, 2, C3k2, [512, False, 0.25]]
|
|
25
|
+
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
|
26
|
+
- [-1, 2, C3k2, [512, True]]
|
|
27
|
+
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
|
|
28
|
+
- [-1, 2, C3k2, [1024, True]]
|
|
29
|
+
- [-1, 1, SPPF, [1024, 5]] # 9
|
|
30
|
+
- [-1, 2, C2PSA, [1024]] # 10
|
|
31
|
+
|
|
32
|
+
# YOLO11n head
|
|
33
|
+
head:
|
|
34
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
35
|
+
- [[-1, 6], 1, Concat, [1]] # cat backbone P4
|
|
36
|
+
- [-1, 2, C3k2, [512, False]] # 13
|
|
37
|
+
|
|
38
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
39
|
+
- [[-1, 4], 1, Concat, [1]] # cat backbone P3
|
|
40
|
+
- [-1, 2, C3k2, [256, False]] # 16 (P3/8-small)
|
|
41
|
+
|
|
42
|
+
- [-1, 1, Conv, [256, 3, 2]]
|
|
43
|
+
- [[-1, 13], 1, Concat, [1]] # cat head P4
|
|
44
|
+
- [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium)
|
|
45
|
+
|
|
46
|
+
- [-1, 1, Conv, [512, 3, 2]]
|
|
47
|
+
- [[-1, 10], 1, Concat, [1]] # cat head P5
|
|
48
|
+
- [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large)
|
|
49
|
+
|
|
50
|
+
- [[16, 19, 22], 1, OBB, [nc, 1]] # Detect(P3, P4, P5)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Ultralytics YOLO11-pose keypoints/pose estimation model with P3/8 - P5/32 outputs
|
|
4
|
+
# Model docs: https://docs.ultralytics.com/models/yolo11
|
|
5
|
+
# Task docs: https://docs.ultralytics.com/tasks/pose
|
|
6
|
+
|
|
7
|
+
# Parameters
|
|
8
|
+
nc: 80 # number of classes
|
|
9
|
+
kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
|
|
10
|
+
scales: # model compound scaling constants, i.e. 'model=yolo11n-pose.yaml' will call yolo11-pose.yaml with scale 'n'
|
|
11
|
+
# [depth, width, max_channels]
|
|
12
|
+
n: [0.50, 0.25, 1024] # summary: 196 layers, 2908507 parameters, 2908491 gradients, 7.7 GFLOPs
|
|
13
|
+
s: [0.50, 0.50, 1024] # summary: 196 layers, 9948811 parameters, 9948795 gradients, 23.5 GFLOPs
|
|
14
|
+
m: [0.50, 1.00, 512] # summary: 246 layers, 20973273 parameters, 20973257 gradients, 72.3 GFLOPs
|
|
15
|
+
l: [1.00, 1.00, 512] # summary: 372 layers, 26230745 parameters, 26230729 gradients, 91.4 GFLOPs
|
|
16
|
+
x: [1.00, 1.50, 512] # summary: 372 layers, 58889881 parameters, 58889865 gradients, 204.3 GFLOPs
|
|
17
|
+
|
|
18
|
+
# YOLO11n backbone
|
|
19
|
+
backbone:
|
|
20
|
+
# [from, repeats, module, args]
|
|
21
|
+
- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
|
|
22
|
+
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
|
23
|
+
- [-1, 2, C3k2, [256, False, 0.25]]
|
|
24
|
+
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
|
25
|
+
- [-1, 2, C3k2, [512, False, 0.25]]
|
|
26
|
+
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
|
27
|
+
- [-1, 2, C3k2, [512, True]]
|
|
28
|
+
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
|
|
29
|
+
- [-1, 2, C3k2, [1024, True]]
|
|
30
|
+
- [-1, 1, SPPF, [1024, 5]] # 9
|
|
31
|
+
- [-1, 2, C2PSA, [1024]] # 10
|
|
32
|
+
|
|
33
|
+
# YOLO11n head
|
|
34
|
+
head:
|
|
35
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
36
|
+
- [[-1, 6], 1, Concat, [1]] # cat backbone P4
|
|
37
|
+
- [-1, 2, C3k2, [512, False]] # 13
|
|
38
|
+
|
|
39
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
40
|
+
- [[-1, 4], 1, Concat, [1]] # cat backbone P3
|
|
41
|
+
- [-1, 2, C3k2, [256, False]] # 16 (P3/8-small)
|
|
42
|
+
|
|
43
|
+
- [-1, 1, Conv, [256, 3, 2]]
|
|
44
|
+
- [[-1, 13], 1, Concat, [1]] # cat head P4
|
|
45
|
+
- [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium)
|
|
46
|
+
|
|
47
|
+
- [-1, 1, Conv, [512, 3, 2]]
|
|
48
|
+
- [[-1, 10], 1, Concat, [1]] # cat head P5
|
|
49
|
+
- [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large)
|
|
50
|
+
|
|
51
|
+
- [[16, 19, 22], 1, Pose, [nc, kpt_shape]] # Detect(P3, P4, P5)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Ultralytics YOLO11-seg instance segmentation model with P3/8 - P5/32 outputs
|
|
4
|
+
# Model docs: https://docs.ultralytics.com/models/yolo11
|
|
5
|
+
# Task docs: https://docs.ultralytics.com/tasks/segment
|
|
6
|
+
|
|
7
|
+
# Parameters
|
|
8
|
+
nc: 80 # number of classes
|
|
9
|
+
scales: # model compound scaling constants, i.e. 'model=yolo11n-seg.yaml' will call yolo11-seg.yaml with scale 'n'
|
|
10
|
+
# [depth, width, max_channels]
|
|
11
|
+
n: [0.50, 0.25, 1024] # summary: 203 layers, 2876848 parameters, 2876832 gradients, 10.5 GFLOPs
|
|
12
|
+
s: [0.50, 0.50, 1024] # summary: 203 layers, 10113248 parameters, 10113232 gradients, 35.8 GFLOPs
|
|
13
|
+
m: [0.50, 1.00, 512] # summary: 253 layers, 22420896 parameters, 22420880 gradients, 123.9 GFLOPs
|
|
14
|
+
l: [1.00, 1.00, 512] # summary: 379 layers, 27678368 parameters, 27678352 gradients, 143.0 GFLOPs
|
|
15
|
+
x: [1.00, 1.50, 512] # summary: 379 layers, 62142656 parameters, 62142640 gradients, 320.2 GFLOPs
|
|
16
|
+
|
|
17
|
+
# YOLO11n backbone
|
|
18
|
+
backbone:
|
|
19
|
+
# [from, repeats, module, args]
|
|
20
|
+
- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
|
|
21
|
+
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
|
22
|
+
- [-1, 2, C3k2, [256, False, 0.25]]
|
|
23
|
+
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
|
24
|
+
- [-1, 2, C3k2, [512, False, 0.25]]
|
|
25
|
+
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
|
26
|
+
- [-1, 2, C3k2, [512, True]]
|
|
27
|
+
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
|
|
28
|
+
- [-1, 2, C3k2, [1024, True]]
|
|
29
|
+
- [-1, 1, SPPF, [1024, 5]] # 9
|
|
30
|
+
- [-1, 2, C2PSA, [1024]] # 10
|
|
31
|
+
|
|
32
|
+
# YOLO11n head
|
|
33
|
+
head:
|
|
34
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
35
|
+
- [[-1, 6], 1, Concat, [1]] # cat backbone P4
|
|
36
|
+
- [-1, 2, C3k2, [512, False]] # 13
|
|
37
|
+
|
|
38
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
39
|
+
- [[-1, 4], 1, Concat, [1]] # cat backbone P3
|
|
40
|
+
- [-1, 2, C3k2, [256, False]] # 16 (P3/8-small)
|
|
41
|
+
|
|
42
|
+
- [-1, 1, Conv, [256, 3, 2]]
|
|
43
|
+
- [[-1, 13], 1, Concat, [1]] # cat head P4
|
|
44
|
+
- [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium)
|
|
45
|
+
|
|
46
|
+
- [-1, 1, Conv, [512, 3, 2]]
|
|
47
|
+
- [[-1, 10], 1, Concat, [1]] # cat head P5
|
|
48
|
+
- [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large)
|
|
49
|
+
|
|
50
|
+
- [[16, 19, 22], 1, Segment, [nc, 32, 256]] # Detect(P3, P4, P5)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Ultralytics YOLO11 object detection model with P3/8 - P5/32 outputs
|
|
4
|
+
# Model docs: https://docs.ultralytics.com/models/yolo11
|
|
5
|
+
# Task docs: https://docs.ultralytics.com/tasks/detect
|
|
6
|
+
|
|
7
|
+
# Parameters
|
|
8
|
+
nc: 80 # number of classes
|
|
9
|
+
scales: # model compound scaling constants, i.e. 'model=yolo11n.yaml' will call yolo11.yaml with scale 'n'
|
|
10
|
+
# [depth, width, max_channels]
|
|
11
|
+
n: [0.50, 0.25, 1024] # summary: 181 layers, 2624080 parameters, 2624064 gradients, 6.6 GFLOPs
|
|
12
|
+
s: [0.50, 0.50, 1024] # summary: 181 layers, 9458752 parameters, 9458736 gradients, 21.7 GFLOPs
|
|
13
|
+
m: [0.50, 1.00, 512] # summary: 231 layers, 20114688 parameters, 20114672 gradients, 68.5 GFLOPs
|
|
14
|
+
l: [1.00, 1.00, 512] # summary: 357 layers, 25372160 parameters, 25372144 gradients, 87.6 GFLOPs
|
|
15
|
+
x: [1.00, 1.50, 512] # summary: 357 layers, 56966176 parameters, 56966160 gradients, 196.0 GFLOPs
|
|
16
|
+
|
|
17
|
+
# YOLO11n backbone
|
|
18
|
+
backbone:
|
|
19
|
+
# [from, repeats, module, args]
|
|
20
|
+
- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
|
|
21
|
+
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
|
22
|
+
- [-1, 2, C3k2, [256, False, 0.25]]
|
|
23
|
+
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
|
24
|
+
- [-1, 2, C3k2, [512, False, 0.25]]
|
|
25
|
+
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
|
26
|
+
- [-1, 2, C3k2, [512, True]]
|
|
27
|
+
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
|
|
28
|
+
- [-1, 2, C3k2, [1024, True]]
|
|
29
|
+
- [-1, 1, SPPF, [1024, 5]] # 9
|
|
30
|
+
- [-1, 2, C2PSA, [1024]] # 10
|
|
31
|
+
|
|
32
|
+
# YOLO11n head
|
|
33
|
+
head:
|
|
34
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
35
|
+
- [[-1, 6], 1, Concat, [1]] # cat backbone P4
|
|
36
|
+
- [-1, 2, C3k2, [512, False]] # 13
|
|
37
|
+
|
|
38
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
39
|
+
- [[-1, 4], 1, Concat, [1]] # cat backbone P3
|
|
40
|
+
- [-1, 2, C3k2, [256, False]] # 16 (P3/8-small)
|
|
41
|
+
|
|
42
|
+
- [-1, 1, Conv, [256, 3, 2]]
|
|
43
|
+
- [[-1, 13], 1, Concat, [1]] # cat head P4
|
|
44
|
+
- [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium)
|
|
45
|
+
|
|
46
|
+
- [-1, 1, Conv, [512, 3, 2]]
|
|
47
|
+
- [[-1, 10], 1, Concat, [1]] # cat head P5
|
|
48
|
+
- [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large)
|
|
49
|
+
|
|
50
|
+
- [[16, 19, 22], 1, Detect, [nc]] # Detect(P3, P4, P5)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Ultralytics YOLOE-11-seg instance segmentation model. For usage examples, see https://docs.ultralytics.com/tasks/segment
|
|
4
|
+
|
|
5
|
+
# Parameters
|
|
6
|
+
nc: 80 # number of classes
|
|
7
|
+
scales: # model compound scaling constants, i.e. 'model=yoloe-11n-seg.yaml' will call yoloe-11-seg.yaml with scale 'n'
|
|
8
|
+
# [depth, width, max_channels]
|
|
9
|
+
n: [0.50, 0.25, 1024] # summary: 355 layers, 2876848 parameters, 2876832 gradients, 10.5 GFLOPs
|
|
10
|
+
s: [0.50, 0.50, 1024] # summary: 355 layers, 10113248 parameters, 10113232 gradients, 35.8 GFLOPs
|
|
11
|
+
m: [0.50, 1.00, 512] # summary: 445 layers, 22420896 parameters, 22420880 gradients, 123.9 GFLOPs
|
|
12
|
+
l: [1.00, 1.00, 512] # summary: 667 layers, 27678368 parameters, 27678352 gradients, 143.0 GFLOPs
|
|
13
|
+
x: [1.00, 1.50, 512] # summary: 667 layers, 62142656 parameters, 62142640 gradients, 320.2 GFLOPs
|
|
14
|
+
|
|
15
|
+
# YOLO11n backbone
|
|
16
|
+
backbone:
|
|
17
|
+
# [from, repeats, module, args]
|
|
18
|
+
- [-1, 1, Conv, [64, 3, 2]] # 0-P1/2
|
|
19
|
+
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
|
20
|
+
- [-1, 2, C3k2, [256, False, 0.25]]
|
|
21
|
+
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
|
22
|
+
- [-1, 2, C3k2, [512, False, 0.25]]
|
|
23
|
+
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
|
24
|
+
- [-1, 2, C3k2, [512, True]]
|
|
25
|
+
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
|
|
26
|
+
- [-1, 2, C3k2, [1024, True]]
|
|
27
|
+
- [-1, 1, SPPF, [1024, 5]] # 9
|
|
28
|
+
- [-1, 2, C2PSA, [1024]] # 10
|
|
29
|
+
|
|
30
|
+
# YOLO11n head
|
|
31
|
+
head:
|
|
32
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
33
|
+
- [[-1, 6], 1, Concat, [1]] # cat backbone P4
|
|
34
|
+
- [-1, 2, C3k2, [512, False]] # 13
|
|
35
|
+
|
|
36
|
+
- [-1, 1, nn.Upsample, [None, 2, "nearest"]]
|
|
37
|
+
- [[-1, 4], 1, Concat, [1]] # cat backbone P3
|
|
38
|
+
- [-1, 2, C3k2, [256, False]] # 16 (P3/8-small)
|
|
39
|
+
|
|
40
|
+
- [-1, 1, Conv, [256, 3, 2]]
|
|
41
|
+
- [[-1, 13], 1, Concat, [1]] # cat head P4
|
|
42
|
+
- [-1, 2, C3k2, [512, False]] # 19 (P4/16-medium)
|
|
43
|
+
|
|
44
|
+
- [-1, 1, Conv, [512, 3, 2]]
|
|
45
|
+
- [[-1, 10], 1, Concat, [1]] # cat head P5
|
|
46
|
+
- [-1, 2, C3k2, [1024, True]] # 22 (P5/32-large)
|
|
47
|
+
|
|
48
|
+
- [[16, 19, 22], 1, YOLOESegment, [nc, 32, 256, 512, True]] # Detect(P3, P4, P5)
|