dgenerate-ultralytics-headless 8.3.214__py3-none-any.whl → 8.4.7__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.
- {dgenerate_ultralytics_headless-8.3.214.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/METADATA +64 -74
- dgenerate_ultralytics_headless-8.4.7.dist-info/RECORD +311 -0
- {dgenerate_ultralytics_headless-8.3.214.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/WHEEL +1 -1
- tests/__init__.py +7 -9
- tests/conftest.py +8 -15
- tests/test_cli.py +1 -1
- tests/test_cuda.py +13 -10
- tests/test_engine.py +9 -9
- tests/test_exports.py +65 -13
- tests/test_integrations.py +13 -13
- tests/test_python.py +125 -69
- tests/test_solutions.py +161 -152
- ultralytics/__init__.py +1 -1
- ultralytics/cfg/__init__.py +86 -92
- ultralytics/cfg/datasets/Argoverse.yaml +7 -6
- ultralytics/cfg/datasets/DOTAv1.5.yaml +1 -1
- ultralytics/cfg/datasets/DOTAv1.yaml +1 -1
- ultralytics/cfg/datasets/ImageNet.yaml +1 -1
- ultralytics/cfg/datasets/TT100K.yaml +346 -0
- ultralytics/cfg/datasets/VOC.yaml +15 -16
- ultralytics/cfg/datasets/african-wildlife.yaml +1 -1
- ultralytics/cfg/datasets/coco-pose.yaml +21 -0
- ultralytics/cfg/datasets/coco12-formats.yaml +101 -0
- ultralytics/cfg/datasets/coco128-seg.yaml +1 -1
- ultralytics/cfg/datasets/coco8-pose.yaml +21 -0
- ultralytics/cfg/datasets/dog-pose.yaml +28 -0
- ultralytics/cfg/datasets/dota8-multispectral.yaml +1 -1
- ultralytics/cfg/datasets/dota8.yaml +2 -2
- ultralytics/cfg/datasets/hand-keypoints.yaml +26 -2
- ultralytics/cfg/datasets/kitti.yaml +27 -0
- ultralytics/cfg/datasets/lvis.yaml +5 -5
- ultralytics/cfg/datasets/open-images-v7.yaml +1 -1
- ultralytics/cfg/datasets/tiger-pose.yaml +16 -0
- ultralytics/cfg/datasets/xView.yaml +16 -16
- ultralytics/cfg/default.yaml +4 -2
- ultralytics/cfg/models/11/yolo11-pose.yaml +1 -1
- ultralytics/cfg/models/11/yoloe-11-seg.yaml +2 -2
- ultralytics/cfg/models/11/yoloe-11.yaml +2 -2
- ultralytics/cfg/models/26/yolo26-cls.yaml +33 -0
- ultralytics/cfg/models/26/yolo26-obb.yaml +52 -0
- ultralytics/cfg/models/26/yolo26-p2.yaml +60 -0
- ultralytics/cfg/models/26/yolo26-p6.yaml +62 -0
- ultralytics/cfg/models/26/yolo26-pose.yaml +53 -0
- ultralytics/cfg/models/26/yolo26-seg.yaml +52 -0
- ultralytics/cfg/models/26/yolo26.yaml +52 -0
- ultralytics/cfg/models/26/yoloe-26-seg.yaml +53 -0
- ultralytics/cfg/models/26/yoloe-26.yaml +53 -0
- ultralytics/cfg/models/rt-detr/rtdetr-l.yaml +1 -1
- ultralytics/cfg/models/rt-detr/rtdetr-resnet101.yaml +1 -1
- ultralytics/cfg/models/rt-detr/rtdetr-resnet50.yaml +1 -1
- ultralytics/cfg/models/rt-detr/rtdetr-x.yaml +1 -1
- ultralytics/cfg/models/v10/yolov10b.yaml +2 -2
- ultralytics/cfg/models/v10/yolov10l.yaml +2 -2
- ultralytics/cfg/models/v10/yolov10m.yaml +2 -2
- ultralytics/cfg/models/v10/yolov10n.yaml +2 -2
- ultralytics/cfg/models/v10/yolov10s.yaml +2 -2
- ultralytics/cfg/models/v10/yolov10x.yaml +2 -2
- ultralytics/cfg/models/v3/yolov3-tiny.yaml +1 -1
- ultralytics/cfg/models/v6/yolov6.yaml +1 -1
- ultralytics/cfg/models/v8/yoloe-v8-seg.yaml +9 -6
- ultralytics/cfg/models/v8/yoloe-v8.yaml +9 -6
- ultralytics/cfg/models/v8/yolov8-cls-resnet101.yaml +1 -1
- ultralytics/cfg/models/v8/yolov8-cls-resnet50.yaml +1 -1
- ultralytics/cfg/models/v8/yolov8-ghost-p2.yaml +2 -2
- ultralytics/cfg/models/v8/yolov8-ghost-p6.yaml +2 -2
- ultralytics/cfg/models/v8/yolov8-ghost.yaml +2 -2
- ultralytics/cfg/models/v8/yolov8-obb.yaml +1 -1
- ultralytics/cfg/models/v8/yolov8-p2.yaml +1 -1
- ultralytics/cfg/models/v8/yolov8-pose-p6.yaml +1 -1
- ultralytics/cfg/models/v8/yolov8-rtdetr.yaml +1 -1
- ultralytics/cfg/models/v8/yolov8-seg-p6.yaml +1 -1
- ultralytics/cfg/models/v8/yolov8-world.yaml +1 -1
- ultralytics/cfg/models/v8/yolov8-worldv2.yaml +6 -6
- ultralytics/cfg/models/v9/yolov9s.yaml +1 -1
- ultralytics/data/__init__.py +4 -4
- ultralytics/data/annotator.py +5 -6
- ultralytics/data/augment.py +300 -475
- ultralytics/data/base.py +18 -26
- ultralytics/data/build.py +147 -25
- ultralytics/data/converter.py +108 -87
- ultralytics/data/dataset.py +47 -75
- ultralytics/data/loaders.py +42 -49
- ultralytics/data/split.py +5 -6
- ultralytics/data/split_dota.py +8 -15
- ultralytics/data/utils.py +36 -45
- ultralytics/engine/exporter.py +351 -263
- ultralytics/engine/model.py +186 -225
- ultralytics/engine/predictor.py +45 -54
- ultralytics/engine/results.py +198 -325
- ultralytics/engine/trainer.py +165 -106
- ultralytics/engine/tuner.py +41 -43
- ultralytics/engine/validator.py +55 -38
- ultralytics/hub/__init__.py +16 -19
- ultralytics/hub/auth.py +6 -12
- ultralytics/hub/google/__init__.py +7 -10
- ultralytics/hub/session.py +15 -25
- ultralytics/hub/utils.py +5 -8
- ultralytics/models/__init__.py +1 -1
- ultralytics/models/fastsam/__init__.py +1 -1
- ultralytics/models/fastsam/model.py +8 -10
- ultralytics/models/fastsam/predict.py +18 -30
- ultralytics/models/fastsam/utils.py +1 -2
- ultralytics/models/fastsam/val.py +5 -7
- ultralytics/models/nas/__init__.py +1 -1
- ultralytics/models/nas/model.py +5 -8
- ultralytics/models/nas/predict.py +7 -9
- ultralytics/models/nas/val.py +1 -2
- ultralytics/models/rtdetr/__init__.py +1 -1
- ultralytics/models/rtdetr/model.py +5 -8
- ultralytics/models/rtdetr/predict.py +15 -19
- ultralytics/models/rtdetr/train.py +10 -13
- ultralytics/models/rtdetr/val.py +21 -23
- ultralytics/models/sam/__init__.py +15 -2
- ultralytics/models/sam/amg.py +14 -20
- ultralytics/models/sam/build.py +26 -19
- ultralytics/models/sam/build_sam3.py +377 -0
- ultralytics/models/sam/model.py +29 -32
- ultralytics/models/sam/modules/blocks.py +83 -144
- ultralytics/models/sam/modules/decoders.py +19 -37
- ultralytics/models/sam/modules/encoders.py +44 -101
- ultralytics/models/sam/modules/memory_attention.py +16 -30
- ultralytics/models/sam/modules/sam.py +200 -73
- ultralytics/models/sam/modules/tiny_encoder.py +64 -83
- ultralytics/models/sam/modules/transformer.py +18 -28
- ultralytics/models/sam/modules/utils.py +174 -50
- ultralytics/models/sam/predict.py +2248 -350
- 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/loss.py +14 -26
- ultralytics/models/utils/ops.py +13 -17
- ultralytics/models/yolo/__init__.py +1 -1
- ultralytics/models/yolo/classify/predict.py +10 -13
- ultralytics/models/yolo/classify/train.py +12 -33
- ultralytics/models/yolo/classify/val.py +30 -29
- ultralytics/models/yolo/detect/predict.py +9 -12
- ultralytics/models/yolo/detect/train.py +17 -23
- ultralytics/models/yolo/detect/val.py +77 -59
- ultralytics/models/yolo/model.py +43 -60
- ultralytics/models/yolo/obb/predict.py +7 -16
- ultralytics/models/yolo/obb/train.py +14 -17
- ultralytics/models/yolo/obb/val.py +40 -37
- ultralytics/models/yolo/pose/__init__.py +1 -1
- ultralytics/models/yolo/pose/predict.py +7 -22
- ultralytics/models/yolo/pose/train.py +13 -16
- ultralytics/models/yolo/pose/val.py +39 -58
- ultralytics/models/yolo/segment/predict.py +17 -21
- ultralytics/models/yolo/segment/train.py +7 -10
- ultralytics/models/yolo/segment/val.py +95 -47
- ultralytics/models/yolo/world/train.py +8 -14
- ultralytics/models/yolo/world/train_world.py +11 -34
- ultralytics/models/yolo/yoloe/__init__.py +7 -7
- ultralytics/models/yolo/yoloe/predict.py +16 -23
- ultralytics/models/yolo/yoloe/train.py +36 -44
- ultralytics/models/yolo/yoloe/train_seg.py +11 -11
- ultralytics/models/yolo/yoloe/val.py +15 -20
- ultralytics/nn/__init__.py +7 -7
- ultralytics/nn/autobackend.py +159 -85
- ultralytics/nn/modules/__init__.py +68 -60
- ultralytics/nn/modules/activation.py +4 -6
- ultralytics/nn/modules/block.py +260 -224
- ultralytics/nn/modules/conv.py +52 -97
- ultralytics/nn/modules/head.py +831 -299
- ultralytics/nn/modules/transformer.py +76 -88
- ultralytics/nn/modules/utils.py +16 -21
- ultralytics/nn/tasks.py +180 -195
- ultralytics/nn/text_model.py +45 -69
- ultralytics/optim/__init__.py +5 -0
- ultralytics/optim/muon.py +338 -0
- ultralytics/solutions/__init__.py +12 -12
- ultralytics/solutions/ai_gym.py +13 -19
- ultralytics/solutions/analytics.py +15 -16
- ultralytics/solutions/config.py +6 -7
- ultralytics/solutions/distance_calculation.py +10 -13
- ultralytics/solutions/heatmap.py +8 -14
- ultralytics/solutions/instance_segmentation.py +6 -9
- ultralytics/solutions/object_blurrer.py +7 -10
- ultralytics/solutions/object_counter.py +12 -19
- ultralytics/solutions/object_cropper.py +8 -14
- ultralytics/solutions/parking_management.py +34 -32
- ultralytics/solutions/queue_management.py +10 -12
- ultralytics/solutions/region_counter.py +9 -12
- ultralytics/solutions/security_alarm.py +15 -20
- ultralytics/solutions/similarity_search.py +10 -15
- ultralytics/solutions/solutions.py +77 -76
- ultralytics/solutions/speed_estimation.py +7 -10
- ultralytics/solutions/streamlit_inference.py +2 -4
- ultralytics/solutions/templates/similarity-search.html +7 -18
- ultralytics/solutions/trackzone.py +7 -10
- ultralytics/solutions/vision_eye.py +5 -8
- ultralytics/trackers/__init__.py +1 -1
- ultralytics/trackers/basetrack.py +3 -5
- ultralytics/trackers/bot_sort.py +10 -27
- ultralytics/trackers/byte_tracker.py +21 -37
- ultralytics/trackers/track.py +4 -7
- ultralytics/trackers/utils/gmc.py +11 -22
- ultralytics/trackers/utils/kalman_filter.py +37 -48
- ultralytics/trackers/utils/matching.py +12 -15
- ultralytics/utils/__init__.py +124 -124
- ultralytics/utils/autobatch.py +2 -4
- ultralytics/utils/autodevice.py +17 -18
- ultralytics/utils/benchmarks.py +57 -71
- ultralytics/utils/callbacks/base.py +8 -10
- ultralytics/utils/callbacks/clearml.py +5 -13
- ultralytics/utils/callbacks/comet.py +32 -46
- ultralytics/utils/callbacks/dvc.py +13 -18
- ultralytics/utils/callbacks/mlflow.py +4 -5
- ultralytics/utils/callbacks/neptune.py +7 -15
- ultralytics/utils/callbacks/platform.py +423 -38
- ultralytics/utils/callbacks/raytune.py +3 -4
- ultralytics/utils/callbacks/tensorboard.py +25 -31
- ultralytics/utils/callbacks/wb.py +16 -14
- ultralytics/utils/checks.py +127 -85
- ultralytics/utils/cpu.py +3 -8
- ultralytics/utils/dist.py +9 -12
- ultralytics/utils/downloads.py +25 -33
- ultralytics/utils/errors.py +6 -14
- ultralytics/utils/events.py +2 -4
- ultralytics/utils/export/__init__.py +4 -236
- ultralytics/utils/export/engine.py +246 -0
- ultralytics/utils/export/imx.py +117 -63
- ultralytics/utils/export/tensorflow.py +231 -0
- ultralytics/utils/files.py +26 -30
- ultralytics/utils/git.py +9 -11
- ultralytics/utils/instance.py +30 -51
- ultralytics/utils/logger.py +212 -114
- ultralytics/utils/loss.py +601 -215
- ultralytics/utils/metrics.py +128 -156
- ultralytics/utils/nms.py +13 -16
- ultralytics/utils/ops.py +117 -166
- ultralytics/utils/patches.py +75 -21
- ultralytics/utils/plotting.py +75 -80
- ultralytics/utils/tal.py +125 -59
- ultralytics/utils/torch_utils.py +53 -79
- ultralytics/utils/tqdm.py +24 -21
- ultralytics/utils/triton.py +13 -19
- ultralytics/utils/tuner.py +19 -10
- dgenerate_ultralytics_headless-8.3.214.dist-info/RECORD +0 -283
- {dgenerate_ultralytics_headless-8.3.214.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/entry_points.txt +0 -0
- {dgenerate_ultralytics_headless-8.3.214.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/licenses/LICENSE +0 -0
- {dgenerate_ultralytics_headless-8.3.214.dist-info → dgenerate_ultralytics_headless-8.4.7.dist-info}/top_level.txt +0 -0
ultralytics/cfg/__init__.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import ast
|
|
5
6
|
import shutil
|
|
6
7
|
import subprocess
|
|
7
8
|
import sys
|
|
@@ -61,11 +62,11 @@ TASK2DATA = {
|
|
|
61
62
|
"obb": "dota8.yaml",
|
|
62
63
|
}
|
|
63
64
|
TASK2MODEL = {
|
|
64
|
-
"detect": "
|
|
65
|
-
"segment": "
|
|
66
|
-
"classify": "
|
|
67
|
-
"pose": "
|
|
68
|
-
"obb": "
|
|
65
|
+
"detect": "yolo26n.pt",
|
|
66
|
+
"segment": "yolo26n-seg.pt",
|
|
67
|
+
"classify": "yolo26n-cls.pt",
|
|
68
|
+
"pose": "yolo26n-pose.pt",
|
|
69
|
+
"obb": "yolo26n-obb.pt",
|
|
69
70
|
}
|
|
70
71
|
TASK2METRIC = {
|
|
71
72
|
"detect": "metrics/mAP50-95(B)",
|
|
@@ -77,7 +78,7 @@ TASK2METRIC = {
|
|
|
77
78
|
|
|
78
79
|
ARGV = sys.argv or ["", ""] # sometimes sys.argv = []
|
|
79
80
|
SOLUTIONS_HELP_MSG = f"""
|
|
80
|
-
Arguments received: {
|
|
81
|
+
Arguments received: {["yolo", *ARGV[1:]]!s}. Ultralytics 'yolo solutions' usage overview:
|
|
81
82
|
|
|
82
83
|
yolo solutions SOLUTION ARGS
|
|
83
84
|
|
|
@@ -88,14 +89,14 @@ SOLUTIONS_HELP_MSG = f"""
|
|
|
88
89
|
1. Call object counting solution
|
|
89
90
|
yolo solutions count source="path/to/video.mp4" region="[(20, 400), (1080, 400), (1080, 360), (20, 360)]"
|
|
90
91
|
|
|
91
|
-
2. Call
|
|
92
|
-
yolo solutions heatmap colormap=cv2.COLORMAP_PARULA model=
|
|
92
|
+
2. Call heatmap solution
|
|
93
|
+
yolo solutions heatmap colormap=cv2.COLORMAP_PARULA model=yolo26n.pt
|
|
93
94
|
|
|
94
95
|
3. Call queue management solution
|
|
95
|
-
yolo solutions queue region="[(20, 400), (1080, 400), (1080, 360), (20, 360)]" model=
|
|
96
|
+
yolo solutions queue region="[(20, 400), (1080, 400), (1080, 360), (20, 360)]" model=yolo26n.pt
|
|
96
97
|
|
|
97
|
-
4. Call
|
|
98
|
-
yolo solutions workout model=
|
|
98
|
+
4. Call workout monitoring solution for push-ups
|
|
99
|
+
yolo solutions workout model=yolo26n-pose.pt kpts=[6, 8, 10]
|
|
99
100
|
|
|
100
101
|
5. Generate analytical graphs
|
|
101
102
|
yolo solutions analytics analytics_type="pie"
|
|
@@ -107,7 +108,7 @@ SOLUTIONS_HELP_MSG = f"""
|
|
|
107
108
|
yolo streamlit-predict
|
|
108
109
|
"""
|
|
109
110
|
CLI_HELP_MSG = f"""
|
|
110
|
-
Arguments received: {
|
|
111
|
+
Arguments received: {["yolo", *ARGV[1:]]!s}. Ultralytics 'yolo' commands use the following syntax:
|
|
111
112
|
|
|
112
113
|
yolo TASK MODE ARGS
|
|
113
114
|
|
|
@@ -117,19 +118,19 @@ CLI_HELP_MSG = f"""
|
|
|
117
118
|
See all ARGS at https://docs.ultralytics.com/usage/cfg or with 'yolo cfg'
|
|
118
119
|
|
|
119
120
|
1. Train a detection model for 10 epochs with an initial learning_rate of 0.01
|
|
120
|
-
yolo train data=coco8.yaml model=
|
|
121
|
+
yolo train data=coco8.yaml model=yolo26n.pt epochs=10 lr0=0.01
|
|
121
122
|
|
|
122
123
|
2. Predict a YouTube video using a pretrained segmentation model at image size 320:
|
|
123
|
-
yolo predict model=
|
|
124
|
+
yolo predict model=yolo26n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320
|
|
124
125
|
|
|
125
|
-
3.
|
|
126
|
-
yolo val model=
|
|
126
|
+
3. Validate a pretrained detection model at batch-size 1 and image size 640:
|
|
127
|
+
yolo val model=yolo26n.pt data=coco8.yaml batch=1 imgsz=640
|
|
127
128
|
|
|
128
|
-
4. Export a
|
|
129
|
-
yolo export model=
|
|
129
|
+
4. Export a YOLO26n classification model to ONNX format at image size 224 by 128 (no TASK required)
|
|
130
|
+
yolo export model=yolo26n-cls.pt format=onnx imgsz=224,128
|
|
130
131
|
|
|
131
132
|
5. Ultralytics solutions usage
|
|
132
|
-
yolo solutions count or
|
|
133
|
+
yolo solutions count or any of {list(SOLUTION_MAP.keys())[1:-1]} source="path/to/video.mp4"
|
|
133
134
|
|
|
134
135
|
6. Run special commands:
|
|
135
136
|
yolo help
|
|
@@ -185,6 +186,7 @@ CFG_FRACTION_KEYS = frozenset(
|
|
|
185
186
|
"conf",
|
|
186
187
|
"iou",
|
|
187
188
|
"fraction",
|
|
189
|
+
"multi_scale",
|
|
188
190
|
}
|
|
189
191
|
)
|
|
190
192
|
CFG_INT_KEYS = frozenset(
|
|
@@ -236,18 +238,16 @@ CFG_BOOL_KEYS = frozenset(
|
|
|
236
238
|
"simplify",
|
|
237
239
|
"nms",
|
|
238
240
|
"profile",
|
|
239
|
-
"multi_scale",
|
|
240
241
|
}
|
|
241
242
|
)
|
|
242
243
|
|
|
243
244
|
|
|
244
245
|
def cfg2dict(cfg: str | Path | dict | SimpleNamespace) -> dict:
|
|
245
|
-
"""
|
|
246
|
-
Convert a configuration object to a dictionary.
|
|
246
|
+
"""Convert a configuration object to a dictionary.
|
|
247
247
|
|
|
248
248
|
Args:
|
|
249
|
-
cfg (str | Path | dict | SimpleNamespace): Configuration object to be converted. Can be a file path,
|
|
250
|
-
|
|
249
|
+
cfg (str | Path | dict | SimpleNamespace): Configuration object to be converted. Can be a file path, a string, a
|
|
250
|
+
dictionary, or a SimpleNamespace object.
|
|
251
251
|
|
|
252
252
|
Returns:
|
|
253
253
|
(dict): Configuration object in dictionary format.
|
|
@@ -276,9 +276,10 @@ def cfg2dict(cfg: str | Path | dict | SimpleNamespace) -> dict:
|
|
|
276
276
|
return cfg
|
|
277
277
|
|
|
278
278
|
|
|
279
|
-
def get_cfg(
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
def get_cfg(
|
|
280
|
+
cfg: str | Path | dict | SimpleNamespace = DEFAULT_CFG_DICT, overrides: dict | None = None
|
|
281
|
+
) -> SimpleNamespace:
|
|
282
|
+
"""Load and merge configuration data from a file or dictionary, with optional overrides.
|
|
282
283
|
|
|
283
284
|
Args:
|
|
284
285
|
cfg (str | Path | dict | SimpleNamespace): Configuration data source. Can be a file path, dictionary, or
|
|
@@ -304,8 +305,6 @@ def get_cfg(cfg: str | Path | dict | SimpleNamespace = DEFAULT_CFG_DICT, overrid
|
|
|
304
305
|
# Merge overrides
|
|
305
306
|
if overrides:
|
|
306
307
|
overrides = cfg2dict(overrides)
|
|
307
|
-
if "save_dir" not in cfg:
|
|
308
|
-
overrides.pop("save_dir", None) # special override keys to ignore
|
|
309
308
|
check_dict_alignment(cfg, overrides)
|
|
310
309
|
cfg = {**cfg, **overrides} # merge cfg and overrides dicts (prefer overrides)
|
|
311
310
|
|
|
@@ -325,11 +324,10 @@ def get_cfg(cfg: str | Path | dict | SimpleNamespace = DEFAULT_CFG_DICT, overrid
|
|
|
325
324
|
|
|
326
325
|
|
|
327
326
|
def check_cfg(cfg: dict, hard: bool = True) -> None:
|
|
328
|
-
"""
|
|
329
|
-
Check configuration argument types and values for the Ultralytics library.
|
|
327
|
+
"""Check configuration argument types and values for the Ultralytics library.
|
|
330
328
|
|
|
331
|
-
This function validates the types and values of configuration arguments, ensuring correctness and converting
|
|
332
|
-
|
|
329
|
+
This function validates the types and values of configuration arguments, ensuring correctness and converting them if
|
|
330
|
+
necessary. It checks for specific key types defined in global variables such as `CFG_FLOAT_KEYS`,
|
|
333
331
|
`CFG_FRACTION_KEYS`, `CFG_INT_KEYS`, and `CFG_BOOL_KEYS`.
|
|
334
332
|
|
|
335
333
|
Args:
|
|
@@ -386,15 +384,14 @@ def check_cfg(cfg: dict, hard: bool = True) -> None:
|
|
|
386
384
|
cfg[k] = bool(v)
|
|
387
385
|
|
|
388
386
|
|
|
389
|
-
def get_save_dir(args: SimpleNamespace, name: str = None) -> Path:
|
|
390
|
-
"""
|
|
391
|
-
Return the directory path for saving outputs, derived from arguments or default settings.
|
|
387
|
+
def get_save_dir(args: SimpleNamespace, name: str | None = None) -> Path:
|
|
388
|
+
"""Return the directory path for saving outputs, derived from arguments or default settings.
|
|
392
389
|
|
|
393
390
|
Args:
|
|
394
|
-
args (SimpleNamespace): Namespace object containing configurations such as 'project', 'name', 'task',
|
|
395
|
-
|
|
396
|
-
name (str | None): Optional name for the output directory. If not provided, it defaults to 'args.name'
|
|
397
|
-
|
|
391
|
+
args (SimpleNamespace): Namespace object containing configurations such as 'project', 'name', 'task', 'mode',
|
|
392
|
+
and 'save_dir'.
|
|
393
|
+
name (str | None): Optional name for the output directory. If not provided, it defaults to 'args.name' or the
|
|
394
|
+
'args.mode'.
|
|
398
395
|
|
|
399
396
|
Returns:
|
|
400
397
|
(Path): Directory path where outputs should be saved.
|
|
@@ -404,14 +401,16 @@ def get_save_dir(args: SimpleNamespace, name: str = None) -> Path:
|
|
|
404
401
|
>>> args = SimpleNamespace(project="my_project", task="detect", mode="train", exist_ok=True)
|
|
405
402
|
>>> save_dir = get_save_dir(args)
|
|
406
403
|
>>> print(save_dir)
|
|
407
|
-
|
|
404
|
+
runs/detect/my_project/train
|
|
408
405
|
"""
|
|
409
406
|
if getattr(args, "save_dir", None):
|
|
410
407
|
save_dir = args.save_dir
|
|
411
408
|
else:
|
|
412
409
|
from ultralytics.utils.files import increment_path
|
|
413
410
|
|
|
414
|
-
project = args.project or
|
|
411
|
+
project = args.project or ""
|
|
412
|
+
if not Path(project).is_absolute():
|
|
413
|
+
project = (ROOT.parent / "tests/tmp/runs" if TESTS_RUNNING else RUNS_DIR) / args.task / project
|
|
415
414
|
name = name or args.name or f"{args.mode}"
|
|
416
415
|
save_dir = increment_path(Path(project) / name, exist_ok=args.exist_ok if RANK in {-1, 0} else True)
|
|
417
416
|
|
|
@@ -419,8 +418,7 @@ def get_save_dir(args: SimpleNamespace, name: str = None) -> Path:
|
|
|
419
418
|
|
|
420
419
|
|
|
421
420
|
def _handle_deprecation(custom: dict) -> dict:
|
|
422
|
-
"""
|
|
423
|
-
Handle deprecated configuration keys by mapping them to current equivalents with deprecation warnings.
|
|
421
|
+
"""Handle deprecated configuration keys by mapping them to current equivalents with deprecation warnings.
|
|
424
422
|
|
|
425
423
|
Args:
|
|
426
424
|
custom (dict): Configuration dictionary potentially containing deprecated keys.
|
|
@@ -462,15 +460,17 @@ def _handle_deprecation(custom: dict) -> dict:
|
|
|
462
460
|
return custom
|
|
463
461
|
|
|
464
462
|
|
|
465
|
-
def check_dict_alignment(
|
|
466
|
-
|
|
467
|
-
|
|
463
|
+
def check_dict_alignment(
|
|
464
|
+
base: dict, custom: dict, e: Exception | None = None, allowed_custom_keys: set | None = None
|
|
465
|
+
) -> None:
|
|
466
|
+
"""Check alignment between custom and base configuration dictionaries, handling deprecated keys and providing error
|
|
468
467
|
messages for mismatched keys.
|
|
469
468
|
|
|
470
469
|
Args:
|
|
471
470
|
base (dict): The base configuration dictionary containing valid keys.
|
|
472
471
|
custom (dict): The custom configuration dictionary to be checked for alignment.
|
|
473
472
|
e (Exception | None): Optional error instance passed by the calling function.
|
|
473
|
+
allowed_custom_keys (set | None): Optional set of additional keys that are allowed in the custom dictionary.
|
|
474
474
|
|
|
475
475
|
Raises:
|
|
476
476
|
SystemExit: If mismatched keys are found between the custom and base dictionaries.
|
|
@@ -490,7 +490,10 @@ def check_dict_alignment(base: dict, custom: dict, e: Exception = None) -> None:
|
|
|
490
490
|
"""
|
|
491
491
|
custom = _handle_deprecation(custom)
|
|
492
492
|
base_keys, custom_keys = (frozenset(x.keys()) for x in (base, custom))
|
|
493
|
-
|
|
493
|
+
# Allow 'augmentations' as a valid custom parameter for custom Albumentations transforms
|
|
494
|
+
if allowed_custom_keys is None:
|
|
495
|
+
allowed_custom_keys = {"augmentations", "save_dir"}
|
|
496
|
+
if mismatched := [k for k in custom_keys if k not in base_keys and k not in allowed_custom_keys]:
|
|
494
497
|
from difflib import get_close_matches
|
|
495
498
|
|
|
496
499
|
string = ""
|
|
@@ -503,8 +506,7 @@ def check_dict_alignment(base: dict, custom: dict, e: Exception = None) -> None:
|
|
|
503
506
|
|
|
504
507
|
|
|
505
508
|
def merge_equals_args(args: list[str]) -> list[str]:
|
|
506
|
-
"""
|
|
507
|
-
Merge arguments around isolated '=' in a list of strings and join fragments with brackets.
|
|
509
|
+
"""Merge arguments around isolated '=' in a list of strings and join fragments with brackets.
|
|
508
510
|
|
|
509
511
|
This function handles the following cases:
|
|
510
512
|
1. ['arg', '=', 'val'] becomes ['arg=val']
|
|
@@ -516,7 +518,8 @@ def merge_equals_args(args: list[str]) -> list[str]:
|
|
|
516
518
|
args (list[str]): A list of strings where each element represents an argument or fragment.
|
|
517
519
|
|
|
518
520
|
Returns:
|
|
519
|
-
(list[str]): A list of strings where the arguments around isolated '=' are merged and fragments with brackets
|
|
521
|
+
(list[str]): A list of strings where the arguments around isolated '=' are merged and fragments with brackets
|
|
522
|
+
are joined.
|
|
520
523
|
|
|
521
524
|
Examples:
|
|
522
525
|
>>> args = ["arg1", "=", "value", "arg2=", "value2", "arg3", "=value3", "imgsz=[3,", "640,", "640]"]
|
|
@@ -562,15 +565,14 @@ def merge_equals_args(args: list[str]) -> list[str]:
|
|
|
562
565
|
|
|
563
566
|
|
|
564
567
|
def handle_yolo_hub(args: list[str]) -> None:
|
|
565
|
-
"""
|
|
566
|
-
Handle Ultralytics HUB command-line interface (CLI) commands for authentication.
|
|
568
|
+
"""Handle Ultralytics HUB command-line interface (CLI) commands for authentication.
|
|
567
569
|
|
|
568
570
|
This function processes Ultralytics HUB CLI commands such as login and logout. It should be called when executing a
|
|
569
571
|
script with arguments related to HUB authentication.
|
|
570
572
|
|
|
571
573
|
Args:
|
|
572
|
-
args (list[str]): A list of command line arguments. The first argument should be either 'login'
|
|
573
|
-
|
|
574
|
+
args (list[str]): A list of command line arguments. The first argument should be either 'login' or 'logout'. For
|
|
575
|
+
'login', an optional second argument can be the API key.
|
|
574
576
|
|
|
575
577
|
Examples:
|
|
576
578
|
$ yolo login YOUR_API_KEY
|
|
@@ -592,8 +594,7 @@ def handle_yolo_hub(args: list[str]) -> None:
|
|
|
592
594
|
|
|
593
595
|
|
|
594
596
|
def handle_yolo_settings(args: list[str]) -> None:
|
|
595
|
-
"""
|
|
596
|
-
Handle YOLO settings command-line interface (CLI) commands.
|
|
597
|
+
"""Handle YOLO settings command-line interface (CLI) commands.
|
|
597
598
|
|
|
598
599
|
This function processes YOLO settings CLI commands such as reset and updating individual settings. It should be
|
|
599
600
|
called when executing a script with arguments related to YOLO settings management.
|
|
@@ -603,7 +604,7 @@ def handle_yolo_settings(args: list[str]) -> None:
|
|
|
603
604
|
|
|
604
605
|
Examples:
|
|
605
606
|
>>> handle_yolo_settings(["reset"]) # Reset YOLO settings
|
|
606
|
-
>>> handle_yolo_settings(["default_cfg_path=
|
|
607
|
+
>>> handle_yolo_settings(["default_cfg_path=yolo26n.yaml"]) # Update a specific setting
|
|
607
608
|
|
|
608
609
|
Notes:
|
|
609
610
|
- If no arguments are provided, the function will display the current settings.
|
|
@@ -635,13 +636,10 @@ def handle_yolo_settings(args: list[str]) -> None:
|
|
|
635
636
|
|
|
636
637
|
|
|
637
638
|
def handle_yolo_solutions(args: list[str]) -> None:
|
|
638
|
-
"""
|
|
639
|
-
Process YOLO solutions arguments and run the specified computer vision solutions pipeline.
|
|
639
|
+
"""Process YOLO solutions arguments and run the specified computer vision solutions pipeline.
|
|
640
640
|
|
|
641
641
|
Args:
|
|
642
|
-
args (list[str]): Command-line arguments for configuring and running the Ultralytics YOLO
|
|
643
|
-
solutions: https://docs.ultralytics.com/solutions/, It can include solution name, source,
|
|
644
|
-
and other configuration parameters.
|
|
642
|
+
args (list[str]): Command-line arguments for configuring and running the Ultralytics YOLO solutions.
|
|
645
643
|
|
|
646
644
|
Examples:
|
|
647
645
|
Run people counting solution with default settings:
|
|
@@ -651,7 +649,7 @@ def handle_yolo_solutions(args: list[str]) -> None:
|
|
|
651
649
|
>>> handle_yolo_solutions(["analytics", "conf=0.25", "source=path/to/video.mp4"])
|
|
652
650
|
|
|
653
651
|
Run inference with custom configuration, requires Streamlit version 1.29.0 or higher.
|
|
654
|
-
>>> handle_yolo_solutions(["inference", "model=
|
|
652
|
+
>>> handle_yolo_solutions(["inference", "model=yolo26n.pt"])
|
|
655
653
|
|
|
656
654
|
Notes:
|
|
657
655
|
- Arguments can be provided in the format 'key=value' or as boolean flags
|
|
@@ -709,7 +707,7 @@ def handle_yolo_solutions(args: list[str]) -> None:
|
|
|
709
707
|
str(ROOT / "solutions/streamlit_inference.py"),
|
|
710
708
|
"--server.headless",
|
|
711
709
|
"true",
|
|
712
|
-
overrides.pop("model", "
|
|
710
|
+
overrides.pop("model", "yolo26n.pt"),
|
|
713
711
|
]
|
|
714
712
|
)
|
|
715
713
|
else:
|
|
@@ -717,7 +715,7 @@ def handle_yolo_solutions(args: list[str]) -> None:
|
|
|
717
715
|
|
|
718
716
|
from ultralytics import solutions
|
|
719
717
|
|
|
720
|
-
solution = getattr(solutions, SOLUTION_MAP[solution_name])(is_cli=True, **overrides) # class i.e ObjectCounter
|
|
718
|
+
solution = getattr(solutions, SOLUTION_MAP[solution_name])(is_cli=True, **overrides) # class i.e. ObjectCounter
|
|
721
719
|
|
|
722
720
|
cap = cv2.VideoCapture(solution.CFG["source"]) # read the video file
|
|
723
721
|
if solution_name != "crop":
|
|
@@ -727,8 +725,8 @@ def handle_yolo_solutions(args: list[str]) -> None:
|
|
|
727
725
|
)
|
|
728
726
|
if solution_name == "analytics": # analytical graphs follow fixed shape for output i.e w=1920, h=1080
|
|
729
727
|
w, h = 1280, 720
|
|
730
|
-
save_dir = get_save_dir(SimpleNamespace(
|
|
731
|
-
save_dir.mkdir(parents=True) # create the output directory i.e. runs/solutions/exp
|
|
728
|
+
save_dir = get_save_dir(SimpleNamespace(task="solutions", name="exp", exist_ok=False, project=None))
|
|
729
|
+
save_dir.mkdir(parents=True, exist_ok=True) # create the output directory i.e. runs/solutions/exp
|
|
732
730
|
vw = cv2.VideoWriter(str(save_dir / f"{solution_name}.avi"), cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
|
|
733
731
|
|
|
734
732
|
try: # Process video frames
|
|
@@ -747,8 +745,7 @@ def handle_yolo_solutions(args: list[str]) -> None:
|
|
|
747
745
|
|
|
748
746
|
|
|
749
747
|
def parse_key_value_pair(pair: str = "key=value") -> tuple:
|
|
750
|
-
"""
|
|
751
|
-
Parse a key-value pair string into separate key and value components.
|
|
748
|
+
"""Parse a key-value pair string into separate key and value components.
|
|
752
749
|
|
|
753
750
|
Args:
|
|
754
751
|
pair (str): A string containing a key-value pair in the format "key=value".
|
|
@@ -761,9 +758,9 @@ def parse_key_value_pair(pair: str = "key=value") -> tuple:
|
|
|
761
758
|
AssertionError: If the value is missing or empty.
|
|
762
759
|
|
|
763
760
|
Examples:
|
|
764
|
-
>>> key, value = parse_key_value_pair("model=
|
|
761
|
+
>>> key, value = parse_key_value_pair("model=yolo26n.pt")
|
|
765
762
|
>>> print(f"Key: {key}, Value: {value}")
|
|
766
|
-
Key: model, Value:
|
|
763
|
+
Key: model, Value: yolo26n.pt
|
|
767
764
|
|
|
768
765
|
>>> key, value = parse_key_value_pair("epochs=100")
|
|
769
766
|
>>> print(f"Key: {key}, Value: {value}")
|
|
@@ -781,8 +778,7 @@ def parse_key_value_pair(pair: str = "key=value") -> tuple:
|
|
|
781
778
|
|
|
782
779
|
|
|
783
780
|
def smart_value(v: str) -> Any:
|
|
784
|
-
"""
|
|
785
|
-
Convert a string representation of a value to its appropriate Python type.
|
|
781
|
+
"""Convert a string representation of a value to its appropriate Python type.
|
|
786
782
|
|
|
787
783
|
This function attempts to convert a given string into a Python object of the most appropriate type. It handles
|
|
788
784
|
conversions to None, bool, int, float, and other types that can be evaluated safely.
|
|
@@ -791,8 +787,8 @@ def smart_value(v: str) -> Any:
|
|
|
791
787
|
v (str): The string representation of the value to be converted.
|
|
792
788
|
|
|
793
789
|
Returns:
|
|
794
|
-
(Any): The converted value. The type can be None, bool, int, float, or the original string if no conversion
|
|
795
|
-
|
|
790
|
+
(Any): The converted value. The type can be None, bool, int, float, or the original string if no conversion is
|
|
791
|
+
applicable.
|
|
796
792
|
|
|
797
793
|
Examples:
|
|
798
794
|
>>> smart_value("42")
|
|
@@ -808,7 +804,7 @@ def smart_value(v: str) -> Any:
|
|
|
808
804
|
|
|
809
805
|
Notes:
|
|
810
806
|
- The function uses a case-insensitive comparison for boolean and None values.
|
|
811
|
-
- For other types, it attempts to use Python's
|
|
807
|
+
- For other types, it attempts to use Python's ast.literal_eval() function for safe evaluation.
|
|
812
808
|
- If no conversion is possible, the original string is returned.
|
|
813
809
|
"""
|
|
814
810
|
v_lower = v.lower()
|
|
@@ -820,30 +816,29 @@ def smart_value(v: str) -> Any:
|
|
|
820
816
|
return False
|
|
821
817
|
else:
|
|
822
818
|
try:
|
|
823
|
-
return
|
|
819
|
+
return ast.literal_eval(v)
|
|
824
820
|
except Exception:
|
|
825
821
|
return v
|
|
826
822
|
|
|
827
823
|
|
|
828
824
|
def entrypoint(debug: str = "") -> None:
|
|
829
|
-
"""
|
|
830
|
-
Ultralytics entrypoint function for parsing and executing command-line arguments.
|
|
825
|
+
"""Ultralytics entrypoint function for parsing and executing command-line arguments.
|
|
831
826
|
|
|
832
|
-
This function serves as the main entry point for the Ultralytics CLI, parsing command-line arguments and
|
|
833
|
-
|
|
827
|
+
This function serves as the main entry point for the Ultralytics CLI, parsing command-line arguments and executing
|
|
828
|
+
the corresponding tasks such as training, validation, prediction, exporting models, and more.
|
|
834
829
|
|
|
835
830
|
Args:
|
|
836
831
|
debug (str): Space-separated string of command-line arguments for debugging purposes.
|
|
837
832
|
|
|
838
833
|
Examples:
|
|
839
834
|
Train a detection model for 10 epochs with an initial learning_rate of 0.01:
|
|
840
|
-
>>> entrypoint("train data=coco8.yaml model=
|
|
835
|
+
>>> entrypoint("train data=coco8.yaml model=yolo26n.pt epochs=10 lr0=0.01")
|
|
841
836
|
|
|
842
837
|
Predict a YouTube video using a pretrained segmentation model at image size 320:
|
|
843
|
-
>>> entrypoint("predict model=
|
|
838
|
+
>>> entrypoint("predict model=yolo26n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320")
|
|
844
839
|
|
|
845
840
|
Validate a pretrained detection model at batch-size 1 and image size 640:
|
|
846
|
-
>>> entrypoint("val model=
|
|
841
|
+
>>> entrypoint("val model=yolo26n.pt data=coco8.yaml batch=1 imgsz=640")
|
|
847
842
|
|
|
848
843
|
Notes:
|
|
849
844
|
- If no arguments are passed, the function will display the usage help message.
|
|
@@ -938,7 +933,7 @@ def entrypoint(debug: str = "") -> None:
|
|
|
938
933
|
# Model
|
|
939
934
|
model = overrides.pop("model", DEFAULT_CFG.model)
|
|
940
935
|
if model is None:
|
|
941
|
-
model = "
|
|
936
|
+
model = "yolo26n.pt"
|
|
942
937
|
LOGGER.warning(f"'model' argument is missing. Using default 'model={model}'.")
|
|
943
938
|
overrides["model"] = model
|
|
944
939
|
stem = Path(model).stem.lower()
|
|
@@ -999,12 +994,11 @@ def entrypoint(debug: str = "") -> None:
|
|
|
999
994
|
|
|
1000
995
|
# Special modes --------------------------------------------------------------------------------------------------------
|
|
1001
996
|
def copy_default_cfg() -> None:
|
|
1002
|
-
"""
|
|
1003
|
-
Copy the default configuration file and create a new one with '_copy' appended to its name.
|
|
997
|
+
"""Copy the default configuration file and create a new one with '_copy' appended to its name.
|
|
1004
998
|
|
|
1005
|
-
This function duplicates the existing default configuration file (DEFAULT_CFG_PATH) and saves it
|
|
1006
|
-
|
|
1007
|
-
|
|
999
|
+
This function duplicates the existing default configuration file (DEFAULT_CFG_PATH) and saves it with '_copy'
|
|
1000
|
+
appended to its name in the current working directory. It provides a convenient way to create a custom configuration
|
|
1001
|
+
file based on the default settings.
|
|
1008
1002
|
|
|
1009
1003
|
Examples:
|
|
1010
1004
|
>>> copy_default_cfg()
|
|
@@ -1028,5 +1022,5 @@ def copy_default_cfg() -> None:
|
|
|
1028
1022
|
|
|
1029
1023
|
|
|
1030
1024
|
if __name__ == "__main__":
|
|
1031
|
-
# Example: entrypoint(debug='yolo predict model=
|
|
1025
|
+
# Example: entrypoint(debug='yolo predict model=yolo26n.pt')
|
|
1032
1026
|
entrypoint(debug="")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
2
|
|
|
3
|
-
# Argoverse-HD dataset (ring-front-center camera) https://www.cs.cmu.edu/~mengtial/proj/streaming/
|
|
3
|
+
# Argoverse-HD dataset (ring-front-center camera) by Argo AI: https://www.cs.cmu.edu/~mengtial/proj/streaming/
|
|
4
4
|
# Documentation: https://docs.ultralytics.com/datasets/detect/argoverse/
|
|
5
5
|
# Example usage: yolo train data=Argoverse.yaml
|
|
6
6
|
# parent
|
|
@@ -33,14 +33,15 @@ download: |
|
|
|
33
33
|
from ultralytics.utils import TQDM
|
|
34
34
|
from ultralytics.utils.downloads import download
|
|
35
35
|
|
|
36
|
-
def argoverse2yolo(
|
|
36
|
+
def argoverse2yolo(annotation_file):
|
|
37
37
|
"""Convert Argoverse dataset annotations to YOLO format for object detection tasks."""
|
|
38
38
|
labels = {}
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
with open(annotation_file, encoding="utf-8") as f:
|
|
40
|
+
a = json.load(f)
|
|
41
|
+
for annot in TQDM(a["annotations"], desc=f"Converting {annotation_file} to YOLO format..."):
|
|
41
42
|
img_id = annot["image_id"]
|
|
42
43
|
img_name = a["images"][img_id]["name"]
|
|
43
|
-
img_label_name = f"{img_name
|
|
44
|
+
img_label_name = f"{Path(img_name).stem}.txt"
|
|
44
45
|
|
|
45
46
|
cls = annot["category_id"] # instance class id
|
|
46
47
|
x_center, y_center, width, height = annot["bbox"]
|
|
@@ -49,7 +50,7 @@ download: |
|
|
|
49
50
|
width /= 1920.0 # scale
|
|
50
51
|
height /= 1200.0 # scale
|
|
51
52
|
|
|
52
|
-
img_dir =
|
|
53
|
+
img_dir = annotation_file.parents[2] / "Argoverse-1.1" / "labels" / a["seq_dirs"][a["images"][annot["image_id"]]["sid"]]
|
|
53
54
|
if not img_dir.exists():
|
|
54
55
|
img_dir.mkdir(parents=True, exist_ok=True)
|
|
55
56
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── dota1.5 ← downloads here (
|
|
9
|
+
# └── dota1.5 ← downloads here (2 GB)
|
|
10
10
|
|
|
11
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
12
|
path: DOTAv1.5 # dataset root dir
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── dota1 ← downloads here (
|
|
9
|
+
# └── dota1 ← downloads here (2 GB)
|
|
10
10
|
|
|
11
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
12
|
path: DOTAv1 # dataset root dir
|