ahadhassan commited on
Commit
4258af6
·
verified ·
1 Parent(s): c421799

Upload 338 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. ultralytics/__init__.py +29 -0
  3. ultralytics/__pycache__/__init__.cpython-312.pyc +0 -0
  4. ultralytics/assets/bus.jpg +3 -0
  5. ultralytics/assets/zidane.jpg +0 -0
  6. ultralytics/cfg/__init__.py +1028 -0
  7. ultralytics/cfg/__pycache__/__init__.cpython-312.pyc +0 -0
  8. ultralytics/cfg/datasets/Argoverse.yaml +75 -0
  9. ultralytics/cfg/datasets/DOTAv1.5.yaml +37 -0
  10. ultralytics/cfg/datasets/DOTAv1.yaml +36 -0
  11. ultralytics/cfg/datasets/GlobalWheat2020.yaml +54 -0
  12. ultralytics/cfg/datasets/ImageNet.yaml +2025 -0
  13. ultralytics/cfg/datasets/Objects365.yaml +443 -0
  14. ultralytics/cfg/datasets/SKU-110K.yaml +58 -0
  15. ultralytics/cfg/datasets/VOC.yaml +100 -0
  16. ultralytics/cfg/datasets/VisDrone.yaml +73 -0
  17. ultralytics/cfg/datasets/african-wildlife.yaml +25 -0
  18. ultralytics/cfg/datasets/brain-tumor.yaml +23 -0
  19. ultralytics/cfg/datasets/carparts-seg.yaml +44 -0
  20. ultralytics/cfg/datasets/coco-pose.yaml +39 -0
  21. ultralytics/cfg/datasets/coco.yaml +115 -0
  22. ultralytics/cfg/datasets/coco128-seg.yaml +101 -0
  23. ultralytics/cfg/datasets/coco128.yaml +101 -0
  24. ultralytics/cfg/datasets/coco8-pose.yaml +26 -0
  25. ultralytics/cfg/datasets/coco8-seg.yaml +101 -0
  26. ultralytics/cfg/datasets/coco8.yaml +101 -0
  27. ultralytics/cfg/datasets/crack-seg.yaml +22 -0
  28. ultralytics/cfg/datasets/dog-pose.yaml +24 -0
  29. ultralytics/cfg/datasets/dota8.yaml +35 -0
  30. ultralytics/cfg/datasets/hand-keypoints.yaml +26 -0
  31. ultralytics/cfg/datasets/lvis.yaml +1236 -0
  32. ultralytics/cfg/datasets/medical-pills.yaml +22 -0
  33. ultralytics/cfg/datasets/open-images-v7.yaml +661 -0
  34. ultralytics/cfg/datasets/package-seg.yaml +22 -0
  35. ultralytics/cfg/datasets/signature.yaml +21 -0
  36. ultralytics/cfg/datasets/tiger-pose.yaml +25 -0
  37. ultralytics/cfg/datasets/xView.yaml +153 -0
  38. ultralytics/cfg/default.yaml +128 -0
  39. ultralytics/cfg/models/11/yolo11-cls-resnet18.yaml +17 -0
  40. ultralytics/cfg/models/11/yolo11-cls.yaml +33 -0
  41. ultralytics/cfg/models/11/yolo11-obb.yaml +50 -0
  42. ultralytics/cfg/models/11/yolo11-pose.yaml +51 -0
  43. ultralytics/cfg/models/11/yolo11-seg.yaml +50 -0
  44. ultralytics/cfg/models/11/yolo11.yaml +50 -0
  45. ultralytics/cfg/models/12/yolo12-cls.yaml +32 -0
  46. ultralytics/cfg/models/12/yolo12-obb.yaml +48 -0
  47. ultralytics/cfg/models/12/yolo12-pose.yaml +49 -0
  48. ultralytics/cfg/models/12/yolo12-seg.yaml +48 -0
  49. ultralytics/cfg/models/12/yolo12.yaml +48 -0
  50. ultralytics/cfg/models/README.md +48 -0
.gitattributes CHANGED
@@ -38,3 +38,4 @@ ndvi_best_model.keras filter=lfs diff=lfs merge=lfs -text
38
  modified_ultralytics/assets/bus.jpg filter=lfs diff=lfs merge=lfs -text
39
  ultralytics/assets/bus.jpg filter=lfs diff=lfs merge=lfs -text
40
  ultralytics/engine/__pycache__/exporter.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
 
 
38
  modified_ultralytics/assets/bus.jpg filter=lfs diff=lfs merge=lfs -text
39
  ultralytics/assets/bus.jpg filter=lfs diff=lfs merge=lfs -text
40
  ultralytics/engine/__pycache__/exporter.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
41
+ ultralytics/data/__pycache__/augment.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text
ultralytics/__init__.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ __version__ = "8.3.78"
4
+
5
+ import os
6
+
7
+ # Set ENV variables (place before imports)
8
+ if not os.environ.get("OMP_NUM_THREADS"):
9
+ os.environ["OMP_NUM_THREADS"] = "1" # default for reduced CPU utilization during training
10
+
11
+ from ultralytics.models import NAS, RTDETR, SAM, YOLO, FastSAM, YOLOWorld
12
+ from ultralytics.utils import ASSETS, SETTINGS
13
+ from ultralytics.utils.checks import check_yolo as checks
14
+ from ultralytics.utils.downloads import download
15
+
16
+ settings = SETTINGS
17
+ __all__ = (
18
+ "__version__",
19
+ "ASSETS",
20
+ "YOLO",
21
+ "YOLOWorld",
22
+ "NAS",
23
+ "SAM",
24
+ "FastSAM",
25
+ "RTDETR",
26
+ "checks",
27
+ "download",
28
+ "settings",
29
+ )
ultralytics/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (771 Bytes). View file
 
ultralytics/assets/bus.jpg ADDED

Git LFS Details

  • SHA256: c02019c4979c191eb739ddd944445ef408dad5679acab6fd520ef9d434bfbc63
  • Pointer size: 131 Bytes
  • Size of remote file: 137 kB
ultralytics/assets/zidane.jpg ADDED
ultralytics/cfg/__init__.py ADDED
@@ -0,0 +1,1028 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ import shutil
4
+ import subprocess
5
+ import sys
6
+ from pathlib import Path
7
+ from types import SimpleNamespace
8
+ from typing import Dict, List, Union
9
+
10
+ import cv2
11
+
12
+ from ultralytics.utils import (
13
+ ASSETS,
14
+ DEFAULT_CFG,
15
+ DEFAULT_CFG_DICT,
16
+ DEFAULT_CFG_PATH,
17
+ DEFAULT_SOL_DICT,
18
+ IS_VSCODE,
19
+ LOGGER,
20
+ RANK,
21
+ ROOT,
22
+ RUNS_DIR,
23
+ SETTINGS,
24
+ SETTINGS_FILE,
25
+ TESTS_RUNNING,
26
+ IterableSimpleNamespace,
27
+ __version__,
28
+ checks,
29
+ colorstr,
30
+ deprecation_warn,
31
+ vscode_msg,
32
+ yaml_load,
33
+ yaml_print,
34
+ )
35
+
36
+ # Define valid solutions
37
+ SOLUTION_MAP = {
38
+ "count": ("ObjectCounter", "count"),
39
+ "heatmap": ("Heatmap", "generate_heatmap"),
40
+ "queue": ("QueueManager", "process_queue"),
41
+ "speed": ("SpeedEstimator", "estimate_speed"),
42
+ "workout": ("AIGym", "monitor"),
43
+ "analytics": ("Analytics", "process_data"),
44
+ "trackzone": ("TrackZone", "trackzone"),
45
+ "inference": ("Inference", "inference"),
46
+ "help": None,
47
+ }
48
+
49
+ # Define valid tasks and modes
50
+ MODES = frozenset({"train", "val", "predict", "export", "track", "benchmark"})
51
+ TASKS = frozenset({"detect", "segment", "classify", "pose", "obb"})
52
+ TASK2DATA = {
53
+ "detect": "coco8.yaml",
54
+ "segment": "coco8-seg.yaml",
55
+ "classify": "imagenet10",
56
+ "pose": "coco8-pose.yaml",
57
+ "obb": "dota8.yaml",
58
+ }
59
+ TASK2MODEL = {
60
+ "detect": "yolo11n.pt",
61
+ "segment": "yolo11n-seg.pt",
62
+ "classify": "yolo11n-cls.pt",
63
+ "pose": "yolo11n-pose.pt",
64
+ "obb": "yolo11n-obb.pt",
65
+ }
66
+ TASK2METRIC = {
67
+ "detect": "metrics/mAP50-95(B)",
68
+ "segment": "metrics/mAP50-95(M)",
69
+ "classify": "metrics/accuracy_top1",
70
+ "pose": "metrics/mAP50-95(P)",
71
+ "obb": "metrics/mAP50-95(B)",
72
+ }
73
+ MODELS = frozenset({TASK2MODEL[task] for task in TASKS})
74
+
75
+ ARGV = sys.argv or ["", ""] # sometimes sys.argv = []
76
+ SOLUTIONS_HELP_MSG = f"""
77
+ Arguments received: {str(["yolo"] + ARGV[1:])}. Ultralytics 'yolo solutions' usage overview:
78
+
79
+ yolo solutions SOLUTION ARGS
80
+
81
+ Where SOLUTION (optional) is one of {list(SOLUTION_MAP.keys())[:-1]}
82
+ ARGS (optional) are any number of custom 'arg=value' pairs like 'show_in=True' that override defaults
83
+ at https://docs.ultralytics.com/usage/cfg
84
+
85
+ 1. Call object counting solution
86
+ yolo solutions count source="path/to/video/file.mp4" region=[(20, 400), (1080, 400), (1080, 360), (20, 360)]
87
+
88
+ 2. Call heatmaps solution
89
+ yolo solutions heatmap colormap=cv2.COLORMAP_PARULA model=yolo11n.pt
90
+
91
+ 3. Call queue management solution
92
+ yolo solutions queue region=[(20, 400), (1080, 400), (1080, 360), (20, 360)] model=yolo11n.pt
93
+
94
+ 4. Call workouts monitoring solution for push-ups
95
+ yolo solutions workout model=yolo11n-pose.pt kpts=[6, 8, 10]
96
+
97
+ 5. Generate analytical graphs
98
+ yolo solutions analytics analytics_type="pie"
99
+
100
+ 6. Track objects within specific zones
101
+ yolo solutions trackzone source="path/to/video/file.mp4" region=[(150, 150), (1130, 150), (1130, 570), (150, 570)]
102
+
103
+ 7. Streamlit real-time webcam inference GUI
104
+ yolo streamlit-predict
105
+ """
106
+ CLI_HELP_MSG = f"""
107
+ Arguments received: {str(["yolo"] + ARGV[1:])}. Ultralytics 'yolo' commands use the following syntax:
108
+
109
+ yolo TASK MODE ARGS
110
+
111
+ Where TASK (optional) is one of {TASKS}
112
+ MODE (required) is one of {MODES}
113
+ ARGS (optional) are any number of custom 'arg=value' pairs like 'imgsz=320' that override defaults.
114
+ See all ARGS at https://docs.ultralytics.com/usage/cfg or with 'yolo cfg'
115
+
116
+ 1. Train a detection model for 10 epochs with an initial learning_rate of 0.01
117
+ yolo train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01
118
+
119
+ 2. Predict a YouTube video using a pretrained segmentation model at image size 320:
120
+ yolo predict model=yolo11n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320
121
+
122
+ 3. Val a pretrained detection model at batch-size 1 and image size 640:
123
+ yolo val model=yolo11n.pt data=coco8.yaml batch=1 imgsz=640
124
+
125
+ 4. Export a YOLO11n classification model to ONNX format at image size 224 by 128 (no TASK required)
126
+ yolo export model=yolo11n-cls.pt format=onnx imgsz=224,128
127
+
128
+ 5. Ultralytics solutions usage
129
+ yolo solutions count or in {list(SOLUTION_MAP.keys())[1:-1]} source="path/to/video/file.mp4"
130
+
131
+ 6. Run special commands:
132
+ yolo help
133
+ yolo checks
134
+ yolo version
135
+ yolo settings
136
+ yolo copy-cfg
137
+ yolo cfg
138
+ yolo solutions help
139
+
140
+ Docs: https://docs.ultralytics.com
141
+ Solutions: https://docs.ultralytics.com/solutions/
142
+ Community: https://community.ultralytics.com
143
+ GitHub: https://github.com/ultralytics/ultralytics
144
+ """
145
+
146
+ # Define keys for arg type checks
147
+ CFG_FLOAT_KEYS = frozenset(
148
+ { # integer or float arguments, i.e. x=2 and x=2.0
149
+ "warmup_epochs",
150
+ "box",
151
+ "cls",
152
+ "dfl",
153
+ "degrees",
154
+ "shear",
155
+ "time",
156
+ "workspace",
157
+ "batch",
158
+ }
159
+ )
160
+ CFG_FRACTION_KEYS = frozenset(
161
+ { # fractional float arguments with 0.0<=values<=1.0
162
+ "dropout",
163
+ "lr0",
164
+ "lrf",
165
+ "momentum",
166
+ "weight_decay",
167
+ "warmup_momentum",
168
+ "warmup_bias_lr",
169
+ "hsv_h",
170
+ "hsv_s",
171
+ "hsv_v",
172
+ "translate",
173
+ "scale",
174
+ "perspective",
175
+ "flipud",
176
+ "fliplr",
177
+ "bgr",
178
+ "mosaic",
179
+ "mixup",
180
+ "copy_paste",
181
+ "conf",
182
+ "iou",
183
+ "fraction",
184
+ }
185
+ )
186
+ CFG_INT_KEYS = frozenset(
187
+ { # integer-only arguments
188
+ "epochs",
189
+ "patience",
190
+ "workers",
191
+ "seed",
192
+ "close_mosaic",
193
+ "mask_ratio",
194
+ "max_det",
195
+ "vid_stride",
196
+ "line_width",
197
+ "nbs",
198
+ "save_period",
199
+ }
200
+ )
201
+ CFG_BOOL_KEYS = frozenset(
202
+ { # boolean-only arguments
203
+ "save",
204
+ "exist_ok",
205
+ "verbose",
206
+ "deterministic",
207
+ "single_cls",
208
+ "rect",
209
+ "cos_lr",
210
+ "overlap_mask",
211
+ "val",
212
+ "save_json",
213
+ "save_hybrid",
214
+ "half",
215
+ "dnn",
216
+ "plots",
217
+ "show",
218
+ "save_txt",
219
+ "save_conf",
220
+ "save_crop",
221
+ "save_frames",
222
+ "show_labels",
223
+ "show_conf",
224
+ "visualize",
225
+ "augment",
226
+ "agnostic_nms",
227
+ "retina_masks",
228
+ "show_boxes",
229
+ "keras",
230
+ "optimize",
231
+ "int8",
232
+ "dynamic",
233
+ "simplify",
234
+ "nms",
235
+ "profile",
236
+ "multi_scale",
237
+ }
238
+ )
239
+
240
+
241
+ def cfg2dict(cfg):
242
+ """
243
+ Converts a configuration object to a dictionary.
244
+
245
+ Args:
246
+ cfg (str | Path | Dict | SimpleNamespace): Configuration object to be converted. Can be a file path,
247
+ a string, a dictionary, or a SimpleNamespace object.
248
+
249
+ Returns:
250
+ (Dict): Configuration object in dictionary format.
251
+
252
+ Examples:
253
+ Convert a YAML file path to a dictionary:
254
+ >>> config_dict = cfg2dict("config.yaml")
255
+
256
+ Convert a SimpleNamespace to a dictionary:
257
+ >>> from types import SimpleNamespace
258
+ >>> config_sn = SimpleNamespace(param1="value1", param2="value2")
259
+ >>> config_dict = cfg2dict(config_sn)
260
+
261
+ Pass through an already existing dictionary:
262
+ >>> config_dict = cfg2dict({"param1": "value1", "param2": "value2"})
263
+
264
+ Notes:
265
+ - If cfg is a path or string, it's loaded as YAML and converted to a dictionary.
266
+ - If cfg is a SimpleNamespace object, it's converted to a dictionary using vars().
267
+ - If cfg is already a dictionary, it's returned unchanged.
268
+ """
269
+ if isinstance(cfg, (str, Path)):
270
+ cfg = yaml_load(cfg) # load dict
271
+ elif isinstance(cfg, SimpleNamespace):
272
+ cfg = vars(cfg) # convert to dict
273
+ return cfg
274
+
275
+
276
+ def get_cfg(cfg: Union[str, Path, Dict, SimpleNamespace] = DEFAULT_CFG_DICT, overrides: Dict = None):
277
+ """
278
+ Load and merge configuration data from a file or dictionary, with optional overrides.
279
+
280
+ Args:
281
+ cfg (str | Path | Dict | SimpleNamespace): Configuration data source. Can be a file path, dictionary, or
282
+ SimpleNamespace object.
283
+ overrides (Dict | None): Dictionary containing key-value pairs to override the base configuration.
284
+
285
+ Returns:
286
+ (SimpleNamespace): Namespace containing the merged configuration arguments.
287
+
288
+ Examples:
289
+ >>> from ultralytics.cfg import get_cfg
290
+ >>> config = get_cfg() # Load default configuration
291
+ >>> config_with_overrides = get_cfg("path/to/config.yaml", overrides={"epochs": 50, "batch_size": 16})
292
+
293
+ Notes:
294
+ - If both `cfg` and `overrides` are provided, the values in `overrides` will take precedence.
295
+ - Special handling ensures alignment and correctness of the configuration, such as converting numeric
296
+ `project` and `name` to strings and validating configuration keys and values.
297
+ - The function performs type and value checks on the configuration data.
298
+ """
299
+ cfg = cfg2dict(cfg)
300
+
301
+ # Merge overrides
302
+ if overrides:
303
+ overrides = cfg2dict(overrides)
304
+ if "save_dir" not in cfg:
305
+ overrides.pop("save_dir", None) # special override keys to ignore
306
+ check_dict_alignment(cfg, overrides)
307
+ cfg = {**cfg, **overrides} # merge cfg and overrides dicts (prefer overrides)
308
+
309
+ # Special handling for numeric project/name
310
+ for k in "project", "name":
311
+ if k in cfg and isinstance(cfg[k], (int, float)):
312
+ cfg[k] = str(cfg[k])
313
+ if cfg.get("name") == "model": # assign model to 'name' arg
314
+ cfg["name"] = str(cfg.get("model", "")).split(".")[0]
315
+ LOGGER.warning(f"WARNING ⚠️ 'name=model' automatically updated to 'name={cfg['name']}'.")
316
+
317
+ # Type and Value checks
318
+ check_cfg(cfg)
319
+
320
+ # Return instance
321
+ return IterableSimpleNamespace(**cfg)
322
+
323
+
324
+ def check_cfg(cfg, hard=True):
325
+ """
326
+ Checks configuration argument types and values for the Ultralytics library.
327
+
328
+ This function validates the types and values of configuration arguments, ensuring correctness and converting
329
+ them if necessary. It checks for specific key types defined in global variables such as CFG_FLOAT_KEYS,
330
+ CFG_FRACTION_KEYS, CFG_INT_KEYS, and CFG_BOOL_KEYS.
331
+
332
+ Args:
333
+ cfg (Dict): Configuration dictionary to validate.
334
+ hard (bool): If True, raises exceptions for invalid types and values; if False, attempts to convert them.
335
+
336
+ Examples:
337
+ >>> config = {
338
+ ... "epochs": 50, # valid integer
339
+ ... "lr0": 0.01, # valid float
340
+ ... "momentum": 1.2, # invalid float (out of 0.0-1.0 range)
341
+ ... "save": "true", # invalid bool
342
+ ... }
343
+ >>> check_cfg(config, hard=False)
344
+ >>> print(config)
345
+ {'epochs': 50, 'lr0': 0.01, 'momentum': 1.2, 'save': False} # corrected 'save' key
346
+
347
+ Notes:
348
+ - The function modifies the input dictionary in-place.
349
+ - None values are ignored as they may be from optional arguments.
350
+ - Fraction keys are checked to be within the range [0.0, 1.0].
351
+ """
352
+ for k, v in cfg.items():
353
+ if v is not None: # None values may be from optional args
354
+ if k in CFG_FLOAT_KEYS and not isinstance(v, (int, float)):
355
+ if hard:
356
+ raise TypeError(
357
+ f"'{k}={v}' is of invalid type {type(v).__name__}. "
358
+ f"Valid '{k}' types are int (i.e. '{k}=0') or float (i.e. '{k}=0.5')"
359
+ )
360
+ cfg[k] = float(v)
361
+ elif k in CFG_FRACTION_KEYS:
362
+ if not isinstance(v, (int, float)):
363
+ if hard:
364
+ raise TypeError(
365
+ f"'{k}={v}' is of invalid type {type(v).__name__}. "
366
+ f"Valid '{k}' types are int (i.e. '{k}=0') or float (i.e. '{k}=0.5')"
367
+ )
368
+ cfg[k] = v = float(v)
369
+ if not (0.0 <= v <= 1.0):
370
+ raise ValueError(f"'{k}={v}' is an invalid value. Valid '{k}' values are between 0.0 and 1.0.")
371
+ elif k in CFG_INT_KEYS and not isinstance(v, int):
372
+ if hard:
373
+ raise TypeError(
374
+ f"'{k}={v}' is of invalid type {type(v).__name__}. '{k}' must be an int (i.e. '{k}=8')"
375
+ )
376
+ cfg[k] = int(v)
377
+ elif k in CFG_BOOL_KEYS and not isinstance(v, bool):
378
+ if hard:
379
+ raise TypeError(
380
+ f"'{k}={v}' is of invalid type {type(v).__name__}. "
381
+ f"'{k}' must be a bool (i.e. '{k}=True' or '{k}=False')"
382
+ )
383
+ cfg[k] = bool(v)
384
+
385
+
386
+ def get_save_dir(args, name=None):
387
+ """
388
+ Returns the directory path for saving outputs, derived from arguments or default settings.
389
+
390
+ Args:
391
+ args (SimpleNamespace): Namespace object containing configurations such as 'project', 'name', 'task',
392
+ 'mode', and 'save_dir'.
393
+ name (str | None): Optional name for the output directory. If not provided, it defaults to 'args.name'
394
+ or the 'args.mode'.
395
+
396
+ Returns:
397
+ (Path): Directory path where outputs should be saved.
398
+
399
+ Examples:
400
+ >>> from types import SimpleNamespace
401
+ >>> args = SimpleNamespace(project="my_project", task="detect", mode="train", exist_ok=True)
402
+ >>> save_dir = get_save_dir(args)
403
+ >>> print(save_dir)
404
+ my_project/detect/train
405
+ """
406
+ if getattr(args, "save_dir", None):
407
+ save_dir = args.save_dir
408
+ else:
409
+ from ultralytics.utils.files import increment_path
410
+
411
+ project = args.project or (ROOT.parent / "tests/tmp/runs" if TESTS_RUNNING else RUNS_DIR) / args.task
412
+ name = name or args.name or f"{args.mode}"
413
+ save_dir = increment_path(Path(project) / name, exist_ok=args.exist_ok if RANK in {-1, 0} else True)
414
+
415
+ return Path(save_dir)
416
+
417
+
418
+ def _handle_deprecation(custom):
419
+ """
420
+ Handles deprecated configuration keys by mapping them to current equivalents with deprecation warnings.
421
+
422
+ Args:
423
+ custom (Dict): Configuration dictionary potentially containing deprecated keys.
424
+
425
+ Examples:
426
+ >>> custom_config = {"boxes": True, "hide_labels": "False", "line_thickness": 2}
427
+ >>> _handle_deprecation(custom_config)
428
+ >>> print(custom_config)
429
+ {'show_boxes': True, 'show_labels': True, 'line_width': 2}
430
+
431
+ Notes:
432
+ This function modifies the input dictionary in-place, replacing deprecated keys with their current
433
+ equivalents. It also handles value conversions where necessary, such as inverting boolean values for
434
+ 'hide_labels' and 'hide_conf'.
435
+ """
436
+ for key in custom.copy().keys():
437
+ if key == "boxes":
438
+ deprecation_warn(key, "show_boxes")
439
+ custom["show_boxes"] = custom.pop("boxes")
440
+ if key == "hide_labels":
441
+ deprecation_warn(key, "show_labels")
442
+ custom["show_labels"] = custom.pop("hide_labels") == "False"
443
+ if key == "hide_conf":
444
+ deprecation_warn(key, "show_conf")
445
+ custom["show_conf"] = custom.pop("hide_conf") == "False"
446
+ if key == "line_thickness":
447
+ deprecation_warn(key, "line_width")
448
+ custom["line_width"] = custom.pop("line_thickness")
449
+ if key == "label_smoothing":
450
+ deprecation_warn(key)
451
+ custom.pop("label_smoothing")
452
+
453
+ return custom
454
+
455
+
456
+ def check_dict_alignment(base: Dict, custom: Dict, e=None):
457
+ """
458
+ Checks alignment between custom and base configuration dictionaries, handling deprecated keys and providing error
459
+ messages for mismatched keys.
460
+
461
+ Args:
462
+ base (Dict): The base configuration dictionary containing valid keys.
463
+ custom (Dict): The custom configuration dictionary to be checked for alignment.
464
+ e (Exception | None): Optional error instance passed by the calling function.
465
+
466
+ Raises:
467
+ SystemExit: If mismatched keys are found between the custom and base dictionaries.
468
+
469
+ Examples:
470
+ >>> base_cfg = {"epochs": 50, "lr0": 0.01, "batch_size": 16}
471
+ >>> custom_cfg = {"epoch": 100, "lr": 0.02, "batch_size": 32}
472
+ >>> try:
473
+ ... check_dict_alignment(base_cfg, custom_cfg)
474
+ ... except SystemExit:
475
+ ... print("Mismatched keys found")
476
+
477
+ Notes:
478
+ - Suggests corrections for mismatched keys based on similarity to valid keys.
479
+ - Automatically replaces deprecated keys in the custom configuration with updated equivalents.
480
+ - Prints detailed error messages for each mismatched key to help users correct their configurations.
481
+ """
482
+ custom = _handle_deprecation(custom)
483
+ base_keys, custom_keys = (frozenset(x.keys()) for x in (base, custom))
484
+ if mismatched := [k for k in custom_keys if k not in base_keys]:
485
+ from difflib import get_close_matches
486
+
487
+ string = ""
488
+ for x in mismatched:
489
+ matches = get_close_matches(x, base_keys) # key list
490
+ matches = [f"{k}={base[k]}" if base.get(k) is not None else k for k in matches]
491
+ match_str = f"Similar arguments are i.e. {matches}." if matches else ""
492
+ string += f"'{colorstr('red', 'bold', x)}' is not a valid YOLO argument. {match_str}\n"
493
+ raise SyntaxError(string + CLI_HELP_MSG) from e
494
+
495
+
496
+ def merge_equals_args(args: List[str]) -> List[str]:
497
+ """
498
+ Merges arguments around isolated '=' in a list of strings and joins fragments with brackets.
499
+
500
+ This function handles the following cases:
501
+ 1. ['arg', '=', 'val'] becomes ['arg=val']
502
+ 2. ['arg=', 'val'] becomes ['arg=val']
503
+ 3. ['arg', '=val'] becomes ['arg=val']
504
+ 4. Joins fragments with brackets, e.g., ['imgsz=[3,', '640,', '640]'] becomes ['imgsz=[3,640,640]']
505
+
506
+ Args:
507
+ args (List[str]): A list of strings where each element represents an argument or fragment.
508
+
509
+ Returns:
510
+ List[str]: A list of strings where the arguments around isolated '=' are merged and fragments with brackets are joined.
511
+
512
+ Examples:
513
+ >>> args = ["arg1", "=", "value", "arg2=", "value2", "arg3", "=value3", "imgsz=[3,", "640,", "640]"]
514
+ >>> merge_and_join_args(args)
515
+ ['arg1=value', 'arg2=value2', 'arg3=value3', 'imgsz=[3,640,640]']
516
+ """
517
+ new_args = []
518
+ current = ""
519
+ depth = 0
520
+
521
+ i = 0
522
+ while i < len(args):
523
+ arg = args[i]
524
+
525
+ # Handle equals sign merging
526
+ if arg == "=" and 0 < i < len(args) - 1: # merge ['arg', '=', 'val']
527
+ new_args[-1] += f"={args[i + 1]}"
528
+ i += 2
529
+ continue
530
+ elif arg.endswith("=") and i < len(args) - 1 and "=" not in args[i + 1]: # merge ['arg=', 'val']
531
+ new_args.append(f"{arg}{args[i + 1]}")
532
+ i += 2
533
+ continue
534
+ elif arg.startswith("=") and i > 0: # merge ['arg', '=val']
535
+ new_args[-1] += arg
536
+ i += 1
537
+ continue
538
+
539
+ # Handle bracket joining
540
+ depth += arg.count("[") - arg.count("]")
541
+ current += arg
542
+ if depth == 0:
543
+ new_args.append(current)
544
+ current = ""
545
+
546
+ i += 1
547
+
548
+ # Append any remaining current string
549
+ if current:
550
+ new_args.append(current)
551
+
552
+ return new_args
553
+
554
+
555
+ def handle_yolo_hub(args: List[str]) -> None:
556
+ """
557
+ Handles Ultralytics HUB command-line interface (CLI) commands for authentication.
558
+
559
+ This function processes Ultralytics HUB CLI commands such as login and logout. It should be called when executing a
560
+ script with arguments related to HUB authentication.
561
+
562
+ Args:
563
+ args (List[str]): A list of command line arguments. The first argument should be either 'login'
564
+ or 'logout'. For 'login', an optional second argument can be the API key.
565
+
566
+ Examples:
567
+ ```bash
568
+ yolo login YOUR_API_KEY
569
+ ```
570
+
571
+ Notes:
572
+ - The function imports the 'hub' module from ultralytics to perform login and logout operations.
573
+ - For the 'login' command, if no API key is provided, an empty string is passed to the login function.
574
+ - The 'logout' command does not require any additional arguments.
575
+ """
576
+ from ultralytics import hub
577
+
578
+ if args[0] == "login":
579
+ key = args[1] if len(args) > 1 else ""
580
+ # Log in to Ultralytics HUB using the provided API key
581
+ hub.login(key)
582
+ elif args[0] == "logout":
583
+ # Log out from Ultralytics HUB
584
+ hub.logout()
585
+
586
+
587
+ def handle_yolo_settings(args: List[str]) -> None:
588
+ """
589
+ Handles YOLO settings command-line interface (CLI) commands.
590
+
591
+ This function processes YOLO settings CLI commands such as reset and updating individual settings. It should be
592
+ called when executing a script with arguments related to YOLO settings management.
593
+
594
+ Args:
595
+ args (List[str]): A list of command line arguments for YOLO settings management.
596
+
597
+ Examples:
598
+ >>> handle_yolo_settings(["reset"]) # Reset YOLO settings
599
+ >>> handle_yolo_settings(["default_cfg_path=yolo11n.yaml"]) # Update a specific setting
600
+
601
+ Notes:
602
+ - If no arguments are provided, the function will display the current settings.
603
+ - The 'reset' command will delete the existing settings file and create new default settings.
604
+ - Other arguments are treated as key-value pairs to update specific settings.
605
+ - The function will check for alignment between the provided settings and the existing ones.
606
+ - After processing, the updated settings will be displayed.
607
+ - For more information on handling YOLO settings, visit:
608
+ https://docs.ultralytics.com/quickstart/#ultralytics-settings
609
+ """
610
+ url = "https://docs.ultralytics.com/quickstart/#ultralytics-settings" # help URL
611
+ try:
612
+ if any(args):
613
+ if args[0] == "reset":
614
+ SETTINGS_FILE.unlink() # delete the settings file
615
+ SETTINGS.reset() # create new settings
616
+ LOGGER.info("Settings reset successfully") # inform the user that settings have been reset
617
+ else: # save a new setting
618
+ new = dict(parse_key_value_pair(a) for a in args)
619
+ check_dict_alignment(SETTINGS, new)
620
+ SETTINGS.update(new)
621
+
622
+ print(SETTINGS) # print the current settings
623
+ LOGGER.info(f"💡 Learn more about Ultralytics Settings at {url}")
624
+ except Exception as e:
625
+ LOGGER.warning(f"WARNING ⚠️ settings error: '{e}'. Please see {url} for help.")
626
+
627
+
628
+ def handle_yolo_solutions(args: List[str]) -> None:
629
+ """
630
+ Processes YOLO solutions arguments and runs the specified computer vision solutions pipeline.
631
+
632
+ Args:
633
+ args (List[str]): Command-line arguments for configuring and running the Ultralytics YOLO
634
+ solutions: https://docs.ultralytics.com/solutions/, It can include solution name, source,
635
+ and other configuration parameters.
636
+
637
+ Returns:
638
+ None: The function processes video frames and saves the output but doesn't return any value.
639
+
640
+ Examples:
641
+ Run people counting solution with default settings:
642
+ >>> handle_yolo_solutions(["count"])
643
+
644
+ Run analytics with custom configuration:
645
+ >>> handle_yolo_solutions(["analytics", "conf=0.25", "source=path/to/video/file.mp4"])
646
+
647
+ Run inference with custom configuration, requires Streamlit version 1.29.0 or higher.
648
+ >>> handle_yolo_solutions(["inference", "model=yolo11n.pt"])
649
+
650
+ Notes:
651
+ - Default configurations are merged from DEFAULT_SOL_DICT and DEFAULT_CFG_DICT
652
+ - Arguments can be provided in the format 'key=value' or as boolean flags
653
+ - Available solutions are defined in SOLUTION_MAP with their respective classes and methods
654
+ - If an invalid solution is provided, defaults to 'count' solution
655
+ - Output videos are saved in 'runs/solution/{solution_name}' directory
656
+ - For 'analytics' solution, frame numbers are tracked for generating analytical graphs
657
+ - Video processing can be interrupted by pressing 'q'
658
+ - Processes video frames sequentially and saves output in .avi format
659
+ - If no source is specified, downloads and uses a default sample video\
660
+ - The inference solution will be launched using the 'streamlit run' command.
661
+ - The Streamlit app file is located in the Ultralytics package directory.
662
+ """
663
+ full_args_dict = {**DEFAULT_SOL_DICT, **DEFAULT_CFG_DICT} # arguments dictionary
664
+ overrides = {}
665
+
666
+ # check dictionary alignment
667
+ for arg in merge_equals_args(args):
668
+ arg = arg.lstrip("-").rstrip(",")
669
+ if "=" in arg:
670
+ try:
671
+ k, v = parse_key_value_pair(arg)
672
+ overrides[k] = v
673
+ except (NameError, SyntaxError, ValueError, AssertionError) as e:
674
+ check_dict_alignment(full_args_dict, {arg: ""}, e)
675
+ elif arg in full_args_dict and isinstance(full_args_dict.get(arg), bool):
676
+ overrides[arg] = True
677
+ check_dict_alignment(full_args_dict, overrides) # dict alignment
678
+
679
+ # Get solution name
680
+ if args and args[0] in SOLUTION_MAP:
681
+ if args[0] != "help":
682
+ s_n = args.pop(0) # Extract the solution name directly
683
+ else:
684
+ LOGGER.info(SOLUTIONS_HELP_MSG)
685
+ else:
686
+ LOGGER.warning(
687
+ f"⚠️ No valid solution provided. Using default 'count'. Available: {', '.join(SOLUTION_MAP.keys())}"
688
+ )
689
+ s_n = "count" # Default solution if none provided
690
+
691
+ if args and args[0] == "help": # Add check for return if user call `yolo solutions help`
692
+ return
693
+
694
+ if s_n == "inference":
695
+ checks.check_requirements("streamlit>=1.29.0")
696
+ LOGGER.info("💡 Loading Ultralytics live inference app...")
697
+ subprocess.run(
698
+ [ # Run subprocess with Streamlit custom argument
699
+ "streamlit",
700
+ "run",
701
+ str(ROOT / "solutions/streamlit_inference.py"),
702
+ "--server.headless",
703
+ "true",
704
+ overrides.pop("model", "yolo11n.pt"),
705
+ ]
706
+ )
707
+ else:
708
+ cls, method = SOLUTION_MAP[s_n] # solution class name, method name and default source
709
+
710
+ from ultralytics import solutions # import ultralytics solutions
711
+
712
+ solution = getattr(solutions, cls)(IS_CLI=True, **overrides) # get solution class i.e ObjectCounter
713
+ process = getattr(
714
+ solution, method
715
+ ) # get specific function of class for processing i.e, count from ObjectCounter
716
+
717
+ cap = cv2.VideoCapture(solution.CFG["source"]) # read the video file
718
+
719
+ # extract width, height and fps of the video file, create save directory and initialize video writer
720
+ import os # for directory creation
721
+ from pathlib import Path
722
+
723
+ from ultralytics.utils.files import increment_path # for output directory path update
724
+
725
+ w, h, fps = (int(cap.get(x)) for x in (cv2.CAP_PROP_FRAME_WIDTH, cv2.CAP_PROP_FRAME_HEIGHT, cv2.CAP_PROP_FPS))
726
+ if s_n == "analytics": # analytical graphs follow fixed shape for output i.e w=1920, h=1080
727
+ w, h = 1920, 1080
728
+ save_dir = increment_path(Path("runs") / "solutions" / "exp", exist_ok=False)
729
+ save_dir.mkdir(parents=True, exist_ok=True) # create the output directory
730
+ vw = cv2.VideoWriter(os.path.join(save_dir, "solution.avi"), cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
731
+
732
+ try: # Process video frames
733
+ f_n = 0 # frame number, required for analytical graphs
734
+ while cap.isOpened():
735
+ success, frame = cap.read()
736
+ if not success:
737
+ break
738
+ frame = process(frame, f_n := f_n + 1) if s_n == "analytics" else process(frame)
739
+ vw.write(frame)
740
+ if cv2.waitKey(1) & 0xFF == ord("q"):
741
+ break
742
+ finally:
743
+ cap.release()
744
+
745
+
746
+ def parse_key_value_pair(pair: str = "key=value"):
747
+ """
748
+ Parses a key-value pair string into separate key and value components.
749
+
750
+ Args:
751
+ pair (str): A string containing a key-value pair in the format "key=value".
752
+
753
+ Returns:
754
+ key (str): The parsed key.
755
+ value (str): The parsed value.
756
+
757
+ Raises:
758
+ AssertionError: If the value is missing or empty.
759
+
760
+ Examples:
761
+ >>> key, value = parse_key_value_pair("model=yolo11n.pt")
762
+ >>> print(f"Key: {key}, Value: {value}")
763
+ Key: model, Value: yolo11n.pt
764
+
765
+ >>> key, value = parse_key_value_pair("epochs=100")
766
+ >>> print(f"Key: {key}, Value: {value}")
767
+ Key: epochs, Value: 100
768
+
769
+ Notes:
770
+ - The function splits the input string on the first '=' character.
771
+ - Leading and trailing whitespace is removed from both key and value.
772
+ - An assertion error is raised if the value is empty after stripping.
773
+ """
774
+ k, v = pair.split("=", 1) # split on first '=' sign
775
+ k, v = k.strip(), v.strip() # remove spaces
776
+ assert v, f"missing '{k}' value"
777
+ return k, smart_value(v)
778
+
779
+
780
+ def smart_value(v):
781
+ """
782
+ Converts a string representation of a value to its appropriate Python type.
783
+
784
+ This function attempts to convert a given string into a Python object of the most appropriate type. It handles
785
+ conversions to None, bool, int, float, and other types that can be evaluated safely.
786
+
787
+ Args:
788
+ v (str): The string representation of the value to be converted.
789
+
790
+ Returns:
791
+ (Any): The converted value. The type can be None, bool, int, float, or the original string if no conversion
792
+ is applicable.
793
+
794
+ Examples:
795
+ >>> smart_value("42")
796
+ 42
797
+ >>> smart_value("3.14")
798
+ 3.14
799
+ >>> smart_value("True")
800
+ True
801
+ >>> smart_value("None")
802
+ None
803
+ >>> smart_value("some_string")
804
+ 'some_string'
805
+
806
+ Notes:
807
+ - The function uses a case-insensitive comparison for boolean and None values.
808
+ - For other types, it attempts to use Python's eval() function, which can be unsafe if used on untrusted input.
809
+ - If no conversion is possible, the original string is returned.
810
+ """
811
+ v_lower = v.lower()
812
+ if v_lower == "none":
813
+ return None
814
+ elif v_lower == "true":
815
+ return True
816
+ elif v_lower == "false":
817
+ return False
818
+ else:
819
+ try:
820
+ return eval(v)
821
+ except Exception:
822
+ return v
823
+
824
+
825
+ def entrypoint(debug=""):
826
+ """
827
+ Ultralytics entrypoint function for parsing and executing command-line arguments.
828
+
829
+ This function serves as the main entry point for the Ultralytics CLI, parsing command-line arguments and
830
+ executing the corresponding tasks such as training, validation, prediction, exporting models, and more.
831
+
832
+ Args:
833
+ debug (str): Space-separated string of command-line arguments for debugging purposes.
834
+
835
+ Examples:
836
+ Train a detection model for 10 epochs with an initial learning_rate of 0.01:
837
+ >>> entrypoint("train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01")
838
+
839
+ Predict a YouTube video using a pretrained segmentation model at image size 320:
840
+ >>> entrypoint("predict model=yolo11n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320")
841
+
842
+ Validate a pretrained detection model at batch-size 1 and image size 640:
843
+ >>> entrypoint("val model=yolo11n.pt data=coco8.yaml batch=1 imgsz=640")
844
+
845
+ Notes:
846
+ - If no arguments are passed, the function will display the usage help message.
847
+ - For a list of all available commands and their arguments, see the provided help messages and the
848
+ Ultralytics documentation at https://docs.ultralytics.com.
849
+ """
850
+ args = (debug.split(" ") if debug else ARGV)[1:]
851
+ if not args: # no arguments passed
852
+ LOGGER.info(CLI_HELP_MSG)
853
+ return
854
+
855
+ special = {
856
+ "help": lambda: LOGGER.info(CLI_HELP_MSG),
857
+ "checks": checks.collect_system_info,
858
+ "version": lambda: LOGGER.info(__version__),
859
+ "settings": lambda: handle_yolo_settings(args[1:]),
860
+ "cfg": lambda: yaml_print(DEFAULT_CFG_PATH),
861
+ "hub": lambda: handle_yolo_hub(args[1:]),
862
+ "login": lambda: handle_yolo_hub(args),
863
+ "logout": lambda: handle_yolo_hub(args),
864
+ "copy-cfg": copy_default_cfg,
865
+ "solutions": lambda: handle_yolo_solutions(args[1:]),
866
+ }
867
+ full_args_dict = {**DEFAULT_CFG_DICT, **{k: None for k in TASKS}, **{k: None for k in MODES}, **special}
868
+
869
+ # Define common misuses of special commands, i.e. -h, -help, --help
870
+ special.update({k[0]: v for k, v in special.items()}) # singular
871
+ special.update({k[:-1]: v for k, v in special.items() if len(k) > 1 and k.endswith("s")}) # singular
872
+ special = {**special, **{f"-{k}": v for k, v in special.items()}, **{f"--{k}": v for k, v in special.items()}}
873
+
874
+ overrides = {} # basic overrides, i.e. imgsz=320
875
+ for a in merge_equals_args(args): # merge spaces around '=' sign
876
+ if a.startswith("--"):
877
+ LOGGER.warning(f"WARNING ⚠️ argument '{a}' does not require leading dashes '--', updating to '{a[2:]}'.")
878
+ a = a[2:]
879
+ if a.endswith(","):
880
+ LOGGER.warning(f"WARNING ⚠️ argument '{a}' does not require trailing comma ',', updating to '{a[:-1]}'.")
881
+ a = a[:-1]
882
+ if "=" in a:
883
+ try:
884
+ k, v = parse_key_value_pair(a)
885
+ if k == "cfg" and v is not None: # custom.yaml passed
886
+ LOGGER.info(f"Overriding {DEFAULT_CFG_PATH} with {v}")
887
+ overrides = {k: val for k, val in yaml_load(checks.check_yaml(v)).items() if k != "cfg"}
888
+ else:
889
+ overrides[k] = v
890
+ except (NameError, SyntaxError, ValueError, AssertionError) as e:
891
+ check_dict_alignment(full_args_dict, {a: ""}, e)
892
+
893
+ elif a in TASKS:
894
+ overrides["task"] = a
895
+ elif a in MODES:
896
+ overrides["mode"] = a
897
+ elif a.lower() in special:
898
+ special[a.lower()]()
899
+ return
900
+ elif a in DEFAULT_CFG_DICT and isinstance(DEFAULT_CFG_DICT[a], bool):
901
+ overrides[a] = True # auto-True for default bool args, i.e. 'yolo show' sets show=True
902
+ elif a in DEFAULT_CFG_DICT:
903
+ raise SyntaxError(
904
+ f"'{colorstr('red', 'bold', a)}' is a valid YOLO argument but is missing an '=' sign "
905
+ f"to set its value, i.e. try '{a}={DEFAULT_CFG_DICT[a]}'\n{CLI_HELP_MSG}"
906
+ )
907
+ else:
908
+ check_dict_alignment(full_args_dict, {a: ""})
909
+
910
+ # Check keys
911
+ check_dict_alignment(full_args_dict, overrides)
912
+
913
+ # Mode
914
+ mode = overrides.get("mode")
915
+ if mode is None:
916
+ mode = DEFAULT_CFG.mode or "predict"
917
+ LOGGER.warning(f"WARNING ⚠️ 'mode' argument is missing. Valid modes are {MODES}. Using default 'mode={mode}'.")
918
+ elif mode not in MODES:
919
+ raise ValueError(f"Invalid 'mode={mode}'. Valid modes are {MODES}.\n{CLI_HELP_MSG}")
920
+
921
+ # Task
922
+ task = overrides.pop("task", None)
923
+ if task:
924
+ if task not in TASKS:
925
+ if task == "track":
926
+ LOGGER.warning(
927
+ "WARNING ⚠️ invalid 'task=track', setting 'task=detect' and 'mode=track'. Valid tasks are {TASKS}.\n{CLI_HELP_MSG}."
928
+ )
929
+ task, mode = "detect", "track"
930
+ else:
931
+ raise ValueError(f"Invalid 'task={task}'. Valid tasks are {TASKS}.\n{CLI_HELP_MSG}")
932
+ if "model" not in overrides:
933
+ overrides["model"] = TASK2MODEL[task]
934
+
935
+ # Model
936
+ model = overrides.pop("model", DEFAULT_CFG.model)
937
+ if model is None:
938
+ model = "yolo11n.pt"
939
+ LOGGER.warning(f"WARNING ⚠️ 'model' argument is missing. Using default 'model={model}'.")
940
+ overrides["model"] = model
941
+ stem = Path(model).stem.lower()
942
+ if "rtdetr" in stem: # guess architecture
943
+ from ultralytics import RTDETR
944
+
945
+ model = RTDETR(model) # no task argument
946
+ elif "fastsam" in stem:
947
+ from ultralytics import FastSAM
948
+
949
+ model = FastSAM(model)
950
+ elif "sam_" in stem or "sam2_" in stem or "sam2.1_" in stem:
951
+ from ultralytics import SAM
952
+
953
+ model = SAM(model)
954
+ else:
955
+ from ultralytics import YOLO
956
+
957
+ model = YOLO(model, task=task)
958
+ if isinstance(overrides.get("pretrained"), str):
959
+ model.load(overrides["pretrained"])
960
+
961
+ # Task Update
962
+ if task != model.task:
963
+ if task:
964
+ LOGGER.warning(
965
+ f"WARNING ⚠️ conflicting 'task={task}' passed with 'task={model.task}' model. "
966
+ f"Ignoring 'task={task}' and updating to 'task={model.task}' to match model."
967
+ )
968
+ task = model.task
969
+
970
+ # Mode
971
+ if mode in {"predict", "track"} and "source" not in overrides:
972
+ overrides["source"] = (
973
+ "https://ultralytics.com/images/boats.jpg" if task == "obb" else DEFAULT_CFG.source or ASSETS
974
+ )
975
+ LOGGER.warning(f"WARNING ⚠️ 'source' argument is missing. Using default 'source={overrides['source']}'.")
976
+ elif mode in {"train", "val"}:
977
+ if "data" not in overrides and "resume" not in overrides:
978
+ overrides["data"] = DEFAULT_CFG.data or TASK2DATA.get(task or DEFAULT_CFG.task, DEFAULT_CFG.data)
979
+ LOGGER.warning(f"WARNING ⚠️ 'data' argument is missing. Using default 'data={overrides['data']}'.")
980
+ elif mode == "export":
981
+ if "format" not in overrides:
982
+ overrides["format"] = DEFAULT_CFG.format or "torchscript"
983
+ LOGGER.warning(f"WARNING ⚠️ 'format' argument is missing. Using default 'format={overrides['format']}'.")
984
+
985
+ # Run command in python
986
+ getattr(model, mode)(**overrides) # default args from model
987
+
988
+ # Show help
989
+ LOGGER.info(f"💡 Learn more at https://docs.ultralytics.com/modes/{mode}")
990
+
991
+ # Recommend VS Code extension
992
+ if IS_VSCODE and SETTINGS.get("vscode_msg", True):
993
+ LOGGER.info(vscode_msg())
994
+
995
+
996
+ # Special modes --------------------------------------------------------------------------------------------------------
997
+ def copy_default_cfg():
998
+ """
999
+ Copies the default configuration file and creates a new one with '_copy' appended to its name.
1000
+
1001
+ This function duplicates the existing default configuration file (DEFAULT_CFG_PATH) and saves it
1002
+ with '_copy' appended to its name in the current working directory. It provides a convenient way
1003
+ to create a custom configuration file based on the default settings.
1004
+
1005
+ Examples:
1006
+ >>> copy_default_cfg()
1007
+ # Output: default.yaml copied to /path/to/current/directory/default_copy.yaml
1008
+ # Example YOLO command with this new custom cfg:
1009
+ # yolo cfg='/path/to/current/directory/default_copy.yaml' imgsz=320 batch=8
1010
+
1011
+ Notes:
1012
+ - The new configuration file is created in the current working directory.
1013
+ - After copying, the function prints a message with the new file's location and an example
1014
+ YOLO command demonstrating how to use the new configuration file.
1015
+ - This function is useful for users who want to modify the default configuration without
1016
+ altering the original file.
1017
+ """
1018
+ new_file = Path.cwd() / DEFAULT_CFG_PATH.name.replace(".yaml", "_copy.yaml")
1019
+ shutil.copy2(DEFAULT_CFG_PATH, new_file)
1020
+ LOGGER.info(
1021
+ f"{DEFAULT_CFG_PATH} copied to {new_file}\n"
1022
+ f"Example YOLO command with this new custom cfg:\n yolo cfg='{new_file}' imgsz=320 batch=8"
1023
+ )
1024
+
1025
+
1026
+ if __name__ == "__main__":
1027
+ # Example: entrypoint(debug='yolo predict model=yolo11n.pt')
1028
+ entrypoint(debug="")
ultralytics/cfg/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (44.7 kB). View file
 
ultralytics/cfg/datasets/Argoverse.yaml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Argoverse-HD dataset (ring-front-center camera) https://www.cs.cmu.edu/~mengtial/proj/streaming/ by Argo AI
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/argoverse/
5
+ # Example usage: yolo train data=Argoverse.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── Argoverse ← downloads here (31.5 GB)
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: ../datasets/Argoverse # dataset root dir
13
+ train: Argoverse-1.1/images/train/ # train images (relative to 'path') 39384 images
14
+ val: Argoverse-1.1/images/val/ # val images (relative to 'path') 15062 images
15
+ test: Argoverse-1.1/images/test/ # test images (optional) https://eval.ai/web/challenges/challenge-page/800/overview
16
+
17
+ # Classes
18
+ names:
19
+ 0: person
20
+ 1: bicycle
21
+ 2: car
22
+ 3: motorcycle
23
+ 4: bus
24
+ 5: truck
25
+ 6: traffic_light
26
+ 7: stop_sign
27
+
28
+ # Download script/URL (optional) ---------------------------------------------------------------------------------------
29
+ download: |
30
+ import json
31
+ from tqdm import tqdm
32
+ from ultralytics.utils.downloads import download
33
+ from pathlib import Path
34
+
35
+ def argoverse2yolo(set):
36
+ labels = {}
37
+ a = json.load(open(set, "rb"))
38
+ for annot in tqdm(a['annotations'], desc=f"Converting {set} to YOLOv5 format..."):
39
+ img_id = annot['image_id']
40
+ img_name = a['images'][img_id]['name']
41
+ img_label_name = f'{img_name[:-3]}txt'
42
+
43
+ cls = annot['category_id'] # instance class id
44
+ x_center, y_center, width, height = annot['bbox']
45
+ x_center = (x_center + width / 2) / 1920.0 # offset and scale
46
+ y_center = (y_center + height / 2) / 1200.0 # offset and scale
47
+ width /= 1920.0 # scale
48
+ height /= 1200.0 # scale
49
+
50
+ img_dir = set.parents[2] / 'Argoverse-1.1' / 'labels' / a['seq_dirs'][a['images'][annot['image_id']]['sid']]
51
+ if not img_dir.exists():
52
+ img_dir.mkdir(parents=True, exist_ok=True)
53
+
54
+ k = str(img_dir / img_label_name)
55
+ if k not in labels:
56
+ labels[k] = []
57
+ labels[k].append(f"{cls} {x_center} {y_center} {width} {height}\n")
58
+
59
+ for k in labels:
60
+ with open(k, "w") as f:
61
+ f.writelines(labels[k])
62
+
63
+
64
+ # Download 'https://argoverse-hd.s3.us-east-2.amazonaws.com/Argoverse-HD-Full.zip' (deprecated S3 link)
65
+ dir = Path(yaml['path']) # dataset root dir
66
+ urls = ['https://drive.google.com/file/d/1st9qW3BeIwQsnR0t8mRpvbsSWIo16ACi/view?usp=drive_link']
67
+ print("\n\nWARNING: Argoverse dataset MUST be downloaded manually, autodownload will NOT work.")
68
+ print(f"WARNING: Manually download Argoverse dataset '{urls[0]}' to '{dir}' and re-run your command.\n\n")
69
+ # download(urls, dir=dir)
70
+
71
+ # Convert
72
+ annotations_dir = 'Argoverse-HD/annotations/'
73
+ (dir / 'Argoverse-1.1' / 'tracking').rename(dir / 'Argoverse-1.1' / 'images') # rename 'tracking' to 'images'
74
+ for d in "train.json", "val.json":
75
+ argoverse2yolo(dir / annotations_dir / d) # convert Argoverse annotations to YOLO labels
ultralytics/cfg/datasets/DOTAv1.5.yaml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # DOTA 1.5 dataset https://captain-whu.github.io/DOTA/index.html for object detection in aerial images by Wuhan University
4
+ # Documentation: https://docs.ultralytics.com/datasets/obb/dota-v2/
5
+ # Example usage: yolo train model=yolov8n-obb.pt data=DOTAv1.5.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── dota1.5 ← downloads here (2GB)
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: ../datasets/DOTAv1.5 # dataset root dir
13
+ train: images/train # train images (relative to 'path') 1411 images
14
+ val: images/val # val images (relative to 'path') 458 images
15
+ test: images/test # test images (optional) 937 images
16
+
17
+ # Classes for DOTA 1.5
18
+ names:
19
+ 0: plane
20
+ 1: ship
21
+ 2: storage tank
22
+ 3: baseball diamond
23
+ 4: tennis court
24
+ 5: basketball court
25
+ 6: ground track field
26
+ 7: harbor
27
+ 8: bridge
28
+ 9: large vehicle
29
+ 10: small vehicle
30
+ 11: helicopter
31
+ 12: roundabout
32
+ 13: soccer ball field
33
+ 14: swimming pool
34
+ 15: container crane
35
+
36
+ # Download script/URL (optional)
37
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/DOTAv1.5.zip
ultralytics/cfg/datasets/DOTAv1.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # DOTA 1.0 dataset https://captain-whu.github.io/DOTA/index.html for object detection in aerial images by Wuhan University
4
+ # Documentation: https://docs.ultralytics.com/datasets/obb/dota-v2/
5
+ # Example usage: yolo train model=yolov8n-obb.pt data=DOTAv1.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── dota1 ← downloads here (2GB)
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: ../datasets/DOTAv1 # dataset root dir
13
+ train: images/train # train images (relative to 'path') 1411 images
14
+ val: images/val # val images (relative to 'path') 458 images
15
+ test: images/test # test images (optional) 937 images
16
+
17
+ # Classes for DOTA 1.0
18
+ names:
19
+ 0: plane
20
+ 1: ship
21
+ 2: storage tank
22
+ 3: baseball diamond
23
+ 4: tennis court
24
+ 5: basketball court
25
+ 6: ground track field
26
+ 7: harbor
27
+ 8: bridge
28
+ 9: large vehicle
29
+ 10: small vehicle
30
+ 11: helicopter
31
+ 12: roundabout
32
+ 13: soccer ball field
33
+ 14: swimming pool
34
+
35
+ # Download script/URL (optional)
36
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/DOTAv1.zip
ultralytics/cfg/datasets/GlobalWheat2020.yaml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Global Wheat 2020 dataset https://www.global-wheat.com/ by University of Saskatchewan
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/globalwheat2020/
5
+ # Example usage: yolo train data=GlobalWheat2020.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── GlobalWheat2020 ← downloads here (7.0 GB)
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: ../datasets/GlobalWheat2020 # dataset root dir
13
+ train: # train images (relative to 'path') 3422 images
14
+ - images/arvalis_1
15
+ - images/arvalis_2
16
+ - images/arvalis_3
17
+ - images/ethz_1
18
+ - images/rres_1
19
+ - images/inrae_1
20
+ - images/usask_1
21
+ val: # val images (relative to 'path') 748 images (WARNING: train set contains ethz_1)
22
+ - images/ethz_1
23
+ test: # test images (optional) 1276 images
24
+ - images/utokyo_1
25
+ - images/utokyo_2
26
+ - images/nau_1
27
+ - images/uq_1
28
+
29
+ # Classes
30
+ names:
31
+ 0: wheat_head
32
+
33
+ # Download script/URL (optional) ---------------------------------------------------------------------------------------
34
+ download: |
35
+ from ultralytics.utils.downloads import download
36
+ from pathlib import Path
37
+
38
+ # Download
39
+ dir = Path(yaml['path']) # dataset root dir
40
+ urls = ['https://zenodo.org/record/4298502/files/global-wheat-codalab-official.zip',
41
+ 'https://github.com/ultralytics/assets/releases/download/v0.0.0/GlobalWheat2020_labels.zip']
42
+ download(urls, dir=dir)
43
+
44
+ # Make Directories
45
+ for p in 'annotations', 'images', 'labels':
46
+ (dir / p).mkdir(parents=True, exist_ok=True)
47
+
48
+ # Move
49
+ for p in 'arvalis_1', 'arvalis_2', 'arvalis_3', 'ethz_1', 'rres_1', 'inrae_1', 'usask_1', \
50
+ 'utokyo_1', 'utokyo_2', 'nau_1', 'uq_1':
51
+ (dir / 'global-wheat-codalab-official' / p).rename(dir / 'images' / p) # move to /images
52
+ f = (dir / 'global-wheat-codalab-official' / p).with_suffix('.json') # json file
53
+ if f.exists():
54
+ f.rename((dir / 'annotations' / p).with_suffix('.json')) # move to /annotations
ultralytics/cfg/datasets/ImageNet.yaml ADDED
@@ -0,0 +1,2025 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # ImageNet-1k dataset https://www.image-net.org/index.php by Stanford University
4
+ # Simplified class names from https://github.com/anishathalye/imagenet-simple-labels
5
+ # Documentation: https://docs.ultralytics.com/datasets/classify/imagenet/
6
+ # Example usage: yolo train task=classify data=imagenet
7
+ # parent
8
+ # ├── ultralytics
9
+ # └── datasets
10
+ # └── imagenet ← downloads here (144 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: ../datasets/imagenet # dataset root dir
14
+ train: train # train images (relative to 'path') 1281167 images
15
+ val: val # val images (relative to 'path') 50000 images
16
+ test: # test images (optional)
17
+
18
+ # Classes
19
+ names:
20
+ 0: tench
21
+ 1: goldfish
22
+ 2: great white shark
23
+ 3: tiger shark
24
+ 4: hammerhead shark
25
+ 5: electric ray
26
+ 6: stingray
27
+ 7: cock
28
+ 8: hen
29
+ 9: ostrich
30
+ 10: brambling
31
+ 11: goldfinch
32
+ 12: house finch
33
+ 13: junco
34
+ 14: indigo bunting
35
+ 15: American robin
36
+ 16: bulbul
37
+ 17: jay
38
+ 18: magpie
39
+ 19: chickadee
40
+ 20: American dipper
41
+ 21: kite
42
+ 22: bald eagle
43
+ 23: vulture
44
+ 24: great grey owl
45
+ 25: fire salamander
46
+ 26: smooth newt
47
+ 27: newt
48
+ 28: spotted salamander
49
+ 29: axolotl
50
+ 30: American bullfrog
51
+ 31: tree frog
52
+ 32: tailed frog
53
+ 33: loggerhead sea turtle
54
+ 34: leatherback sea turtle
55
+ 35: mud turtle
56
+ 36: terrapin
57
+ 37: box turtle
58
+ 38: banded gecko
59
+ 39: green iguana
60
+ 40: Carolina anole
61
+ 41: desert grassland whiptail lizard
62
+ 42: agama
63
+ 43: frilled-necked lizard
64
+ 44: alligator lizard
65
+ 45: Gila monster
66
+ 46: European green lizard
67
+ 47: chameleon
68
+ 48: Komodo dragon
69
+ 49: Nile crocodile
70
+ 50: American alligator
71
+ 51: triceratops
72
+ 52: worm snake
73
+ 53: ring-necked snake
74
+ 54: eastern hog-nosed snake
75
+ 55: smooth green snake
76
+ 56: kingsnake
77
+ 57: garter snake
78
+ 58: water snake
79
+ 59: vine snake
80
+ 60: night snake
81
+ 61: boa constrictor
82
+ 62: African rock python
83
+ 63: Indian cobra
84
+ 64: green mamba
85
+ 65: sea snake
86
+ 66: Saharan horned viper
87
+ 67: eastern diamondback rattlesnake
88
+ 68: sidewinder
89
+ 69: trilobite
90
+ 70: harvestman
91
+ 71: scorpion
92
+ 72: yellow garden spider
93
+ 73: barn spider
94
+ 74: European garden spider
95
+ 75: southern black widow
96
+ 76: tarantula
97
+ 77: wolf spider
98
+ 78: tick
99
+ 79: centipede
100
+ 80: black grouse
101
+ 81: ptarmigan
102
+ 82: ruffed grouse
103
+ 83: prairie grouse
104
+ 84: peacock
105
+ 85: quail
106
+ 86: partridge
107
+ 87: grey parrot
108
+ 88: macaw
109
+ 89: sulphur-crested cockatoo
110
+ 90: lorikeet
111
+ 91: coucal
112
+ 92: bee eater
113
+ 93: hornbill
114
+ 94: hummingbird
115
+ 95: jacamar
116
+ 96: toucan
117
+ 97: duck
118
+ 98: red-breasted merganser
119
+ 99: goose
120
+ 100: black swan
121
+ 101: tusker
122
+ 102: echidna
123
+ 103: platypus
124
+ 104: wallaby
125
+ 105: koala
126
+ 106: wombat
127
+ 107: jellyfish
128
+ 108: sea anemone
129
+ 109: brain coral
130
+ 110: flatworm
131
+ 111: nematode
132
+ 112: conch
133
+ 113: snail
134
+ 114: slug
135
+ 115: sea slug
136
+ 116: chiton
137
+ 117: chambered nautilus
138
+ 118: Dungeness crab
139
+ 119: rock crab
140
+ 120: fiddler crab
141
+ 121: red king crab
142
+ 122: American lobster
143
+ 123: spiny lobster
144
+ 124: crayfish
145
+ 125: hermit crab
146
+ 126: isopod
147
+ 127: white stork
148
+ 128: black stork
149
+ 129: spoonbill
150
+ 130: flamingo
151
+ 131: little blue heron
152
+ 132: great egret
153
+ 133: bittern
154
+ 134: crane (bird)
155
+ 135: limpkin
156
+ 136: common gallinule
157
+ 137: American coot
158
+ 138: bustard
159
+ 139: ruddy turnstone
160
+ 140: dunlin
161
+ 141: common redshank
162
+ 142: dowitcher
163
+ 143: oystercatcher
164
+ 144: pelican
165
+ 145: king penguin
166
+ 146: albatross
167
+ 147: grey whale
168
+ 148: killer whale
169
+ 149: dugong
170
+ 150: sea lion
171
+ 151: Chihuahua
172
+ 152: Japanese Chin
173
+ 153: Maltese
174
+ 154: Pekingese
175
+ 155: Shih Tzu
176
+ 156: King Charles Spaniel
177
+ 157: Papillon
178
+ 158: toy terrier
179
+ 159: Rhodesian Ridgeback
180
+ 160: Afghan Hound
181
+ 161: Basset Hound
182
+ 162: Beagle
183
+ 163: Bloodhound
184
+ 164: Bluetick Coonhound
185
+ 165: Black and Tan Coonhound
186
+ 166: Treeing Walker Coonhound
187
+ 167: English foxhound
188
+ 168: Redbone Coonhound
189
+ 169: borzoi
190
+ 170: Irish Wolfhound
191
+ 171: Italian Greyhound
192
+ 172: Whippet
193
+ 173: Ibizan Hound
194
+ 174: Norwegian Elkhound
195
+ 175: Otterhound
196
+ 176: Saluki
197
+ 177: Scottish Deerhound
198
+ 178: Weimaraner
199
+ 179: Staffordshire Bull Terrier
200
+ 180: American Staffordshire Terrier
201
+ 181: Bedlington Terrier
202
+ 182: Border Terrier
203
+ 183: Kerry Blue Terrier
204
+ 184: Irish Terrier
205
+ 185: Norfolk Terrier
206
+ 186: Norwich Terrier
207
+ 187: Yorkshire Terrier
208
+ 188: Wire Fox Terrier
209
+ 189: Lakeland Terrier
210
+ 190: Sealyham Terrier
211
+ 191: Airedale Terrier
212
+ 192: Cairn Terrier
213
+ 193: Australian Terrier
214
+ 194: Dandie Dinmont Terrier
215
+ 195: Boston Terrier
216
+ 196: Miniature Schnauzer
217
+ 197: Giant Schnauzer
218
+ 198: Standard Schnauzer
219
+ 199: Scottish Terrier
220
+ 200: Tibetan Terrier
221
+ 201: Australian Silky Terrier
222
+ 202: Soft-coated Wheaten Terrier
223
+ 203: West Highland White Terrier
224
+ 204: Lhasa Apso
225
+ 205: Flat-Coated Retriever
226
+ 206: Curly-coated Retriever
227
+ 207: Golden Retriever
228
+ 208: Labrador Retriever
229
+ 209: Chesapeake Bay Retriever
230
+ 210: German Shorthaired Pointer
231
+ 211: Vizsla
232
+ 212: English Setter
233
+ 213: Irish Setter
234
+ 214: Gordon Setter
235
+ 215: Brittany
236
+ 216: Clumber Spaniel
237
+ 217: English Springer Spaniel
238
+ 218: Welsh Springer Spaniel
239
+ 219: Cocker Spaniels
240
+ 220: Sussex Spaniel
241
+ 221: Irish Water Spaniel
242
+ 222: Kuvasz
243
+ 223: Schipperke
244
+ 224: Groenendael
245
+ 225: Malinois
246
+ 226: Briard
247
+ 227: Australian Kelpie
248
+ 228: Komondor
249
+ 229: Old English Sheepdog
250
+ 230: Shetland Sheepdog
251
+ 231: collie
252
+ 232: Border Collie
253
+ 233: Bouvier des Flandres
254
+ 234: Rottweiler
255
+ 235: German Shepherd Dog
256
+ 236: Dobermann
257
+ 237: Miniature Pinscher
258
+ 238: Greater Swiss Mountain Dog
259
+ 239: Bernese Mountain Dog
260
+ 240: Appenzeller Sennenhund
261
+ 241: Entlebucher Sennenhund
262
+ 242: Boxer
263
+ 243: Bullmastiff
264
+ 244: Tibetan Mastiff
265
+ 245: French Bulldog
266
+ 246: Great Dane
267
+ 247: St. Bernard
268
+ 248: husky
269
+ 249: Alaskan Malamute
270
+ 250: Siberian Husky
271
+ 251: Dalmatian
272
+ 252: Affenpinscher
273
+ 253: Basenji
274
+ 254: pug
275
+ 255: Leonberger
276
+ 256: Newfoundland
277
+ 257: Pyrenean Mountain Dog
278
+ 258: Samoyed
279
+ 259: Pomeranian
280
+ 260: Chow Chow
281
+ 261: Keeshond
282
+ 262: Griffon Bruxellois
283
+ 263: Pembroke Welsh Corgi
284
+ 264: Cardigan Welsh Corgi
285
+ 265: Toy Poodle
286
+ 266: Miniature Poodle
287
+ 267: Standard Poodle
288
+ 268: Mexican hairless dog
289
+ 269: grey wolf
290
+ 270: Alaskan tundra wolf
291
+ 271: red wolf
292
+ 272: coyote
293
+ 273: dingo
294
+ 274: dhole
295
+ 275: African wild dog
296
+ 276: hyena
297
+ 277: red fox
298
+ 278: kit fox
299
+ 279: Arctic fox
300
+ 280: grey fox
301
+ 281: tabby cat
302
+ 282: tiger cat
303
+ 283: Persian cat
304
+ 284: Siamese cat
305
+ 285: Egyptian Mau
306
+ 286: cougar
307
+ 287: lynx
308
+ 288: leopard
309
+ 289: snow leopard
310
+ 290: jaguar
311
+ 291: lion
312
+ 292: tiger
313
+ 293: cheetah
314
+ 294: brown bear
315
+ 295: American black bear
316
+ 296: polar bear
317
+ 297: sloth bear
318
+ 298: mongoose
319
+ 299: meerkat
320
+ 300: tiger beetle
321
+ 301: ladybug
322
+ 302: ground beetle
323
+ 303: longhorn beetle
324
+ 304: leaf beetle
325
+ 305: dung beetle
326
+ 306: rhinoceros beetle
327
+ 307: weevil
328
+ 308: fly
329
+ 309: bee
330
+ 310: ant
331
+ 311: grasshopper
332
+ 312: cricket
333
+ 313: stick insect
334
+ 314: cockroach
335
+ 315: mantis
336
+ 316: cicada
337
+ 317: leafhopper
338
+ 318: lacewing
339
+ 319: dragonfly
340
+ 320: damselfly
341
+ 321: red admiral
342
+ 322: ringlet
343
+ 323: monarch butterfly
344
+ 324: small white
345
+ 325: sulphur butterfly
346
+ 326: gossamer-winged butterfly
347
+ 327: starfish
348
+ 328: sea urchin
349
+ 329: sea cucumber
350
+ 330: cottontail rabbit
351
+ 331: hare
352
+ 332: Angora rabbit
353
+ 333: hamster
354
+ 334: porcupine
355
+ 335: fox squirrel
356
+ 336: marmot
357
+ 337: beaver
358
+ 338: guinea pig
359
+ 339: common sorrel
360
+ 340: zebra
361
+ 341: pig
362
+ 342: wild boar
363
+ 343: warthog
364
+ 344: hippopotamus
365
+ 345: ox
366
+ 346: water buffalo
367
+ 347: bison
368
+ 348: ram
369
+ 349: bighorn sheep
370
+ 350: Alpine ibex
371
+ 351: hartebeest
372
+ 352: impala
373
+ 353: gazelle
374
+ 354: dromedary
375
+ 355: llama
376
+ 356: weasel
377
+ 357: mink
378
+ 358: European polecat
379
+ 359: black-footed ferret
380
+ 360: otter
381
+ 361: skunk
382
+ 362: badger
383
+ 363: armadillo
384
+ 364: three-toed sloth
385
+ 365: orangutan
386
+ 366: gorilla
387
+ 367: chimpanzee
388
+ 368: gibbon
389
+ 369: siamang
390
+ 370: guenon
391
+ 371: patas monkey
392
+ 372: baboon
393
+ 373: macaque
394
+ 374: langur
395
+ 375: black-and-white colobus
396
+ 376: proboscis monkey
397
+ 377: marmoset
398
+ 378: white-headed capuchin
399
+ 379: howler monkey
400
+ 380: titi
401
+ 381: Geoffroy's spider monkey
402
+ 382: common squirrel monkey
403
+ 383: ring-tailed lemur
404
+ 384: indri
405
+ 385: Asian elephant
406
+ 386: African bush elephant
407
+ 387: red panda
408
+ 388: giant panda
409
+ 389: snoek
410
+ 390: eel
411
+ 391: coho salmon
412
+ 392: rock beauty
413
+ 393: clownfish
414
+ 394: sturgeon
415
+ 395: garfish
416
+ 396: lionfish
417
+ 397: pufferfish
418
+ 398: abacus
419
+ 399: abaya
420
+ 400: academic gown
421
+ 401: accordion
422
+ 402: acoustic guitar
423
+ 403: aircraft carrier
424
+ 404: airliner
425
+ 405: airship
426
+ 406: altar
427
+ 407: ambulance
428
+ 408: amphibious vehicle
429
+ 409: analog clock
430
+ 410: apiary
431
+ 411: apron
432
+ 412: waste container
433
+ 413: assault rifle
434
+ 414: backpack
435
+ 415: bakery
436
+ 416: balance beam
437
+ 417: balloon
438
+ 418: ballpoint pen
439
+ 419: Band-Aid
440
+ 420: banjo
441
+ 421: baluster
442
+ 422: barbell
443
+ 423: barber chair
444
+ 424: barbershop
445
+ 425: barn
446
+ 426: barometer
447
+ 427: barrel
448
+ 428: wheelbarrow
449
+ 429: baseball
450
+ 430: basketball
451
+ 431: bassinet
452
+ 432: bassoon
453
+ 433: swimming cap
454
+ 434: bath towel
455
+ 435: bathtub
456
+ 436: station wagon
457
+ 437: lighthouse
458
+ 438: beaker
459
+ 439: military cap
460
+ 440: beer bottle
461
+ 441: beer glass
462
+ 442: bell-cot
463
+ 443: bib
464
+ 444: tandem bicycle
465
+ 445: bikini
466
+ 446: ring binder
467
+ 447: binoculars
468
+ 448: birdhouse
469
+ 449: boathouse
470
+ 450: bobsleigh
471
+ 451: bolo tie
472
+ 452: poke bonnet
473
+ 453: bookcase
474
+ 454: bookstore
475
+ 455: bottle cap
476
+ 456: bow
477
+ 457: bow tie
478
+ 458: brass
479
+ 459: bra
480
+ 460: breakwater
481
+ 461: breastplate
482
+ 462: broom
483
+ 463: bucket
484
+ 464: buckle
485
+ 465: bulletproof vest
486
+ 466: high-speed train
487
+ 467: butcher shop
488
+ 468: taxicab
489
+ 469: cauldron
490
+ 470: candle
491
+ 471: cannon
492
+ 472: canoe
493
+ 473: can opener
494
+ 474: cardigan
495
+ 475: car mirror
496
+ 476: carousel
497
+ 477: tool kit
498
+ 478: carton
499
+ 479: car wheel
500
+ 480: automated teller machine
501
+ 481: cassette
502
+ 482: cassette player
503
+ 483: castle
504
+ 484: catamaran
505
+ 485: CD player
506
+ 486: cello
507
+ 487: mobile phone
508
+ 488: chain
509
+ 489: chain-link fence
510
+ 490: chain mail
511
+ 491: chainsaw
512
+ 492: chest
513
+ 493: chiffonier
514
+ 494: chime
515
+ 495: china cabinet
516
+ 496: Christmas stocking
517
+ 497: church
518
+ 498: movie theater
519
+ 499: cleaver
520
+ 500: cliff dwelling
521
+ 501: cloak
522
+ 502: clogs
523
+ 503: cocktail shaker
524
+ 504: coffee mug
525
+ 505: coffeemaker
526
+ 506: coil
527
+ 507: combination lock
528
+ 508: computer keyboard
529
+ 509: confectionery store
530
+ 510: container ship
531
+ 511: convertible
532
+ 512: corkscrew
533
+ 513: cornet
534
+ 514: cowboy boot
535
+ 515: cowboy hat
536
+ 516: cradle
537
+ 517: crane (machine)
538
+ 518: crash helmet
539
+ 519: crate
540
+ 520: infant bed
541
+ 521: Crock Pot
542
+ 522: croquet ball
543
+ 523: crutch
544
+ 524: cuirass
545
+ 525: dam
546
+ 526: desk
547
+ 527: desktop computer
548
+ 528: rotary dial telephone
549
+ 529: diaper
550
+ 530: digital clock
551
+ 531: digital watch
552
+ 532: dining table
553
+ 533: dishcloth
554
+ 534: dishwasher
555
+ 535: disc brake
556
+ 536: dock
557
+ 537: dog sled
558
+ 538: dome
559
+ 539: doormat
560
+ 540: drilling rig
561
+ 541: drum
562
+ 542: drumstick
563
+ 543: dumbbell
564
+ 544: Dutch oven
565
+ 545: electric fan
566
+ 546: electric guitar
567
+ 547: electric locomotive
568
+ 548: entertainment center
569
+ 549: envelope
570
+ 550: espresso machine
571
+ 551: face powder
572
+ 552: feather boa
573
+ 553: filing cabinet
574
+ 554: fireboat
575
+ 555: fire engine
576
+ 556: fire screen sheet
577
+ 557: flagpole
578
+ 558: flute
579
+ 559: folding chair
580
+ 560: football helmet
581
+ 561: forklift
582
+ 562: fountain
583
+ 563: fountain pen
584
+ 564: four-poster bed
585
+ 565: freight car
586
+ 566: French horn
587
+ 567: frying pan
588
+ 568: fur coat
589
+ 569: garbage truck
590
+ 570: gas mask
591
+ 571: gas pump
592
+ 572: goblet
593
+ 573: go-kart
594
+ 574: golf ball
595
+ 575: golf cart
596
+ 576: gondola
597
+ 577: gong
598
+ 578: gown
599
+ 579: grand piano
600
+ 580: greenhouse
601
+ 581: grille
602
+ 582: grocery store
603
+ 583: guillotine
604
+ 584: barrette
605
+ 585: hair spray
606
+ 586: half-track
607
+ 587: hammer
608
+ 588: hamper
609
+ 589: hair dryer
610
+ 590: hand-held computer
611
+ 591: handkerchief
612
+ 592: hard disk drive
613
+ 593: harmonica
614
+ 594: harp
615
+ 595: harvester
616
+ 596: hatchet
617
+ 597: holster
618
+ 598: home theater
619
+ 599: honeycomb
620
+ 600: hook
621
+ 601: hoop skirt
622
+ 602: horizontal bar
623
+ 603: horse-drawn vehicle
624
+ 604: hourglass
625
+ 605: iPod
626
+ 606: clothes iron
627
+ 607: jack-o'-lantern
628
+ 608: jeans
629
+ 609: jeep
630
+ 610: T-shirt
631
+ 611: jigsaw puzzle
632
+ 612: pulled rickshaw
633
+ 613: joystick
634
+ 614: kimono
635
+ 615: knee pad
636
+ 616: knot
637
+ 617: lab coat
638
+ 618: ladle
639
+ 619: lampshade
640
+ 620: laptop computer
641
+ 621: lawn mower
642
+ 622: lens cap
643
+ 623: paper knife
644
+ 624: library
645
+ 625: lifeboat
646
+ 626: lighter
647
+ 627: limousine
648
+ 628: ocean liner
649
+ 629: lipstick
650
+ 630: slip-on shoe
651
+ 631: lotion
652
+ 632: speaker
653
+ 633: loupe
654
+ 634: sawmill
655
+ 635: magnetic compass
656
+ 636: mail bag
657
+ 637: mailbox
658
+ 638: tights
659
+ 639: tank suit
660
+ 640: manhole cover
661
+ 641: maraca
662
+ 642: marimba
663
+ 643: mask
664
+ 644: match
665
+ 645: maypole
666
+ 646: maze
667
+ 647: measuring cup
668
+ 648: medicine chest
669
+ 649: megalith
670
+ 650: microphone
671
+ 651: microwave oven
672
+ 652: military uniform
673
+ 653: milk can
674
+ 654: minibus
675
+ 655: miniskirt
676
+ 656: minivan
677
+ 657: missile
678
+ 658: mitten
679
+ 659: mixing bowl
680
+ 660: mobile home
681
+ 661: Model T
682
+ 662: modem
683
+ 663: monastery
684
+ 664: monitor
685
+ 665: moped
686
+ 666: mortar
687
+ 667: square academic cap
688
+ 668: mosque
689
+ 669: mosquito net
690
+ 670: scooter
691
+ 671: mountain bike
692
+ 672: tent
693
+ 673: computer mouse
694
+ 674: mousetrap
695
+ 675: moving van
696
+ 676: muzzle
697
+ 677: nail
698
+ 678: neck brace
699
+ 679: necklace
700
+ 680: nipple
701
+ 681: notebook computer
702
+ 682: obelisk
703
+ 683: oboe
704
+ 684: ocarina
705
+ 685: odometer
706
+ 686: oil filter
707
+ 687: organ
708
+ 688: oscilloscope
709
+ 689: overskirt
710
+ 690: bullock cart
711
+ 691: oxygen mask
712
+ 692: packet
713
+ 693: paddle
714
+ 694: paddle wheel
715
+ 695: padlock
716
+ 696: paintbrush
717
+ 697: pajamas
718
+ 698: palace
719
+ 699: pan flute
720
+ 700: paper towel
721
+ 701: parachute
722
+ 702: parallel bars
723
+ 703: park bench
724
+ 704: parking meter
725
+ 705: passenger car
726
+ 706: patio
727
+ 707: payphone
728
+ 708: pedestal
729
+ 709: pencil case
730
+ 710: pencil sharpener
731
+ 711: perfume
732
+ 712: Petri dish
733
+ 713: photocopier
734
+ 714: plectrum
735
+ 715: Pickelhaube
736
+ 716: picket fence
737
+ 717: pickup truck
738
+ 718: pier
739
+ 719: piggy bank
740
+ 720: pill bottle
741
+ 721: pillow
742
+ 722: ping-pong ball
743
+ 723: pinwheel
744
+ 724: pirate ship
745
+ 725: pitcher
746
+ 726: hand plane
747
+ 727: planetarium
748
+ 728: plastic bag
749
+ 729: plate rack
750
+ 730: plow
751
+ 731: plunger
752
+ 732: Polaroid camera
753
+ 733: pole
754
+ 734: police van
755
+ 735: poncho
756
+ 736: billiard table
757
+ 737: soda bottle
758
+ 738: pot
759
+ 739: potter's wheel
760
+ 740: power drill
761
+ 741: prayer rug
762
+ 742: printer
763
+ 743: prison
764
+ 744: projectile
765
+ 745: projector
766
+ 746: hockey puck
767
+ 747: punching bag
768
+ 748: purse
769
+ 749: quill
770
+ 750: quilt
771
+ 751: race car
772
+ 752: racket
773
+ 753: radiator
774
+ 754: radio
775
+ 755: radio telescope
776
+ 756: rain barrel
777
+ 757: recreational vehicle
778
+ 758: reel
779
+ 759: reflex camera
780
+ 760: refrigerator
781
+ 761: remote control
782
+ 762: restaurant
783
+ 763: revolver
784
+ 764: rifle
785
+ 765: rocking chair
786
+ 766: rotisserie
787
+ 767: eraser
788
+ 768: rugby ball
789
+ 769: ruler
790
+ 770: running shoe
791
+ 771: safe
792
+ 772: safety pin
793
+ 773: salt shaker
794
+ 774: sandal
795
+ 775: sarong
796
+ 776: saxophone
797
+ 777: scabbard
798
+ 778: weighing scale
799
+ 779: school bus
800
+ 780: schooner
801
+ 781: scoreboard
802
+ 782: CRT screen
803
+ 783: screw
804
+ 784: screwdriver
805
+ 785: seat belt
806
+ 786: sewing machine
807
+ 787: shield
808
+ 788: shoe store
809
+ 789: shoji
810
+ 790: shopping basket
811
+ 791: shopping cart
812
+ 792: shovel
813
+ 793: shower cap
814
+ 794: shower curtain
815
+ 795: ski
816
+ 796: ski mask
817
+ 797: sleeping bag
818
+ 798: slide rule
819
+ 799: sliding door
820
+ 800: slot machine
821
+ 801: snorkel
822
+ 802: snowmobile
823
+ 803: snowplow
824
+ 804: soap dispenser
825
+ 805: soccer ball
826
+ 806: sock
827
+ 807: solar thermal collector
828
+ 808: sombrero
829
+ 809: soup bowl
830
+ 810: space bar
831
+ 811: space heater
832
+ 812: space shuttle
833
+ 813: spatula
834
+ 814: motorboat
835
+ 815: spider web
836
+ 816: spindle
837
+ 817: sports car
838
+ 818: spotlight
839
+ 819: stage
840
+ 820: steam locomotive
841
+ 821: through arch bridge
842
+ 822: steel drum
843
+ 823: stethoscope
844
+ 824: scarf
845
+ 825: stone wall
846
+ 826: stopwatch
847
+ 827: stove
848
+ 828: strainer
849
+ 829: tram
850
+ 830: stretcher
851
+ 831: couch
852
+ 832: stupa
853
+ 833: submarine
854
+ 834: suit
855
+ 835: sundial
856
+ 836: sunglass
857
+ 837: sunglasses
858
+ 838: sunscreen
859
+ 839: suspension bridge
860
+ 840: mop
861
+ 841: sweatshirt
862
+ 842: swimsuit
863
+ 843: swing
864
+ 844: switch
865
+ 845: syringe
866
+ 846: table lamp
867
+ 847: tank
868
+ 848: tape player
869
+ 849: teapot
870
+ 850: teddy bear
871
+ 851: television
872
+ 852: tennis ball
873
+ 853: thatched roof
874
+ 854: front curtain
875
+ 855: thimble
876
+ 856: threshing machine
877
+ 857: throne
878
+ 858: tile roof
879
+ 859: toaster
880
+ 860: tobacco shop
881
+ 861: toilet seat
882
+ 862: torch
883
+ 863: totem pole
884
+ 864: tow truck
885
+ 865: toy store
886
+ 866: tractor
887
+ 867: semi-trailer truck
888
+ 868: tray
889
+ 869: trench coat
890
+ 870: tricycle
891
+ 871: trimaran
892
+ 872: tripod
893
+ 873: triumphal arch
894
+ 874: trolleybus
895
+ 875: trombone
896
+ 876: tub
897
+ 877: turnstile
898
+ 878: typewriter keyboard
899
+ 879: umbrella
900
+ 880: unicycle
901
+ 881: upright piano
902
+ 882: vacuum cleaner
903
+ 883: vase
904
+ 884: vault
905
+ 885: velvet
906
+ 886: vending machine
907
+ 887: vestment
908
+ 888: viaduct
909
+ 889: violin
910
+ 890: volleyball
911
+ 891: waffle iron
912
+ 892: wall clock
913
+ 893: wallet
914
+ 894: wardrobe
915
+ 895: military aircraft
916
+ 896: sink
917
+ 897: washing machine
918
+ 898: water bottle
919
+ 899: water jug
920
+ 900: water tower
921
+ 901: whiskey jug
922
+ 902: whistle
923
+ 903: wig
924
+ 904: window screen
925
+ 905: window shade
926
+ 906: Windsor tie
927
+ 907: wine bottle
928
+ 908: wing
929
+ 909: wok
930
+ 910: wooden spoon
931
+ 911: wool
932
+ 912: split-rail fence
933
+ 913: shipwreck
934
+ 914: yawl
935
+ 915: yurt
936
+ 916: website
937
+ 917: comic book
938
+ 918: crossword
939
+ 919: traffic sign
940
+ 920: traffic light
941
+ 921: dust jacket
942
+ 922: menu
943
+ 923: plate
944
+ 924: guacamole
945
+ 925: consomme
946
+ 926: hot pot
947
+ 927: trifle
948
+ 928: ice cream
949
+ 929: ice pop
950
+ 930: baguette
951
+ 931: bagel
952
+ 932: pretzel
953
+ 933: cheeseburger
954
+ 934: hot dog
955
+ 935: mashed potato
956
+ 936: cabbage
957
+ 937: broccoli
958
+ 938: cauliflower
959
+ 939: zucchini
960
+ 940: spaghetti squash
961
+ 941: acorn squash
962
+ 942: butternut squash
963
+ 943: cucumber
964
+ 944: artichoke
965
+ 945: bell pepper
966
+ 946: cardoon
967
+ 947: mushroom
968
+ 948: Granny Smith
969
+ 949: strawberry
970
+ 950: orange
971
+ 951: lemon
972
+ 952: fig
973
+ 953: pineapple
974
+ 954: banana
975
+ 955: jackfruit
976
+ 956: custard apple
977
+ 957: pomegranate
978
+ 958: hay
979
+ 959: carbonara
980
+ 960: chocolate syrup
981
+ 961: dough
982
+ 962: meatloaf
983
+ 963: pizza
984
+ 964: pot pie
985
+ 965: burrito
986
+ 966: red wine
987
+ 967: espresso
988
+ 968: cup
989
+ 969: eggnog
990
+ 970: alp
991
+ 971: bubble
992
+ 972: cliff
993
+ 973: coral reef
994
+ 974: geyser
995
+ 975: lakeshore
996
+ 976: promontory
997
+ 977: shoal
998
+ 978: seashore
999
+ 979: valley
1000
+ 980: volcano
1001
+ 981: baseball player
1002
+ 982: bridegroom
1003
+ 983: scuba diver
1004
+ 984: rapeseed
1005
+ 985: daisy
1006
+ 986: yellow lady's slipper
1007
+ 987: corn
1008
+ 988: acorn
1009
+ 989: rose hip
1010
+ 990: horse chestnut seed
1011
+ 991: coral fungus
1012
+ 992: agaric
1013
+ 993: gyromitra
1014
+ 994: stinkhorn mushroom
1015
+ 995: earth star
1016
+ 996: hen-of-the-woods
1017
+ 997: bolete
1018
+ 998: ear
1019
+ 999: toilet paper
1020
+
1021
+ # Imagenet class codes to human-readable names
1022
+ map:
1023
+ n01440764: tench
1024
+ n01443537: goldfish
1025
+ n01484850: great_white_shark
1026
+ n01491361: tiger_shark
1027
+ n01494475: hammerhead
1028
+ n01496331: electric_ray
1029
+ n01498041: stingray
1030
+ n01514668: cock
1031
+ n01514859: hen
1032
+ n01518878: ostrich
1033
+ n01530575: brambling
1034
+ n01531178: goldfinch
1035
+ n01532829: house_finch
1036
+ n01534433: junco
1037
+ n01537544: indigo_bunting
1038
+ n01558993: robin
1039
+ n01560419: bulbul
1040
+ n01580077: jay
1041
+ n01582220: magpie
1042
+ n01592084: chickadee
1043
+ n01601694: water_ouzel
1044
+ n01608432: kite
1045
+ n01614925: bald_eagle
1046
+ n01616318: vulture
1047
+ n01622779: great_grey_owl
1048
+ n01629819: European_fire_salamander
1049
+ n01630670: common_newt
1050
+ n01631663: eft
1051
+ n01632458: spotted_salamander
1052
+ n01632777: axolotl
1053
+ n01641577: bullfrog
1054
+ n01644373: tree_frog
1055
+ n01644900: tailed_frog
1056
+ n01664065: loggerhead
1057
+ n01665541: leatherback_turtle
1058
+ n01667114: mud_turtle
1059
+ n01667778: terrapin
1060
+ n01669191: box_turtle
1061
+ n01675722: banded_gecko
1062
+ n01677366: common_iguana
1063
+ n01682714: American_chameleon
1064
+ n01685808: whiptail
1065
+ n01687978: agama
1066
+ n01688243: frilled_lizard
1067
+ n01689811: alligator_lizard
1068
+ n01692333: Gila_monster
1069
+ n01693334: green_lizard
1070
+ n01694178: African_chameleon
1071
+ n01695060: Komodo_dragon
1072
+ n01697457: African_crocodile
1073
+ n01698640: American_alligator
1074
+ n01704323: triceratops
1075
+ n01728572: thunder_snake
1076
+ n01728920: ringneck_snake
1077
+ n01729322: hognose_snake
1078
+ n01729977: green_snake
1079
+ n01734418: king_snake
1080
+ n01735189: garter_snake
1081
+ n01737021: water_snake
1082
+ n01739381: vine_snake
1083
+ n01740131: night_snake
1084
+ n01742172: boa_constrictor
1085
+ n01744401: rock_python
1086
+ n01748264: Indian_cobra
1087
+ n01749939: green_mamba
1088
+ n01751748: sea_snake
1089
+ n01753488: horned_viper
1090
+ n01755581: diamondback
1091
+ n01756291: sidewinder
1092
+ n01768244: trilobite
1093
+ n01770081: harvestman
1094
+ n01770393: scorpion
1095
+ n01773157: black_and_gold_garden_spider
1096
+ n01773549: barn_spider
1097
+ n01773797: garden_spider
1098
+ n01774384: black_widow
1099
+ n01774750: tarantula
1100
+ n01775062: wolf_spider
1101
+ n01776313: tick
1102
+ n01784675: centipede
1103
+ n01795545: black_grouse
1104
+ n01796340: ptarmigan
1105
+ n01797886: ruffed_grouse
1106
+ n01798484: prairie_chicken
1107
+ n01806143: peacock
1108
+ n01806567: quail
1109
+ n01807496: partridge
1110
+ n01817953: African_grey
1111
+ n01818515: macaw
1112
+ n01819313: sulphur-crested_cockatoo
1113
+ n01820546: lorikeet
1114
+ n01824575: coucal
1115
+ n01828970: bee_eater
1116
+ n01829413: hornbill
1117
+ n01833805: hummingbird
1118
+ n01843065: jacamar
1119
+ n01843383: toucan
1120
+ n01847000: drake
1121
+ n01855032: red-breasted_merganser
1122
+ n01855672: goose
1123
+ n01860187: black_swan
1124
+ n01871265: tusker
1125
+ n01872401: echidna
1126
+ n01873310: platypus
1127
+ n01877812: wallaby
1128
+ n01882714: koala
1129
+ n01883070: wombat
1130
+ n01910747: jellyfish
1131
+ n01914609: sea_anemone
1132
+ n01917289: brain_coral
1133
+ n01924916: flatworm
1134
+ n01930112: nematode
1135
+ n01943899: conch
1136
+ n01944390: snail
1137
+ n01945685: slug
1138
+ n01950731: sea_slug
1139
+ n01955084: chiton
1140
+ n01968897: chambered_nautilus
1141
+ n01978287: Dungeness_crab
1142
+ n01978455: rock_crab
1143
+ n01980166: fiddler_crab
1144
+ n01981276: king_crab
1145
+ n01983481: American_lobster
1146
+ n01984695: spiny_lobster
1147
+ n01985128: crayfish
1148
+ n01986214: hermit_crab
1149
+ n01990800: isopod
1150
+ n02002556: white_stork
1151
+ n02002724: black_stork
1152
+ n02006656: spoonbill
1153
+ n02007558: flamingo
1154
+ n02009229: little_blue_heron
1155
+ n02009912: American_egret
1156
+ n02011460: bittern
1157
+ n02012849: crane_(bird)
1158
+ n02013706: limpkin
1159
+ n02017213: European_gallinule
1160
+ n02018207: American_coot
1161
+ n02018795: bustard
1162
+ n02025239: ruddy_turnstone
1163
+ n02027492: red-backed_sandpiper
1164
+ n02028035: redshank
1165
+ n02033041: dowitcher
1166
+ n02037110: oystercatcher
1167
+ n02051845: pelican
1168
+ n02056570: king_penguin
1169
+ n02058221: albatross
1170
+ n02066245: grey_whale
1171
+ n02071294: killer_whale
1172
+ n02074367: dugong
1173
+ n02077923: sea_lion
1174
+ n02085620: Chihuahua
1175
+ n02085782: Japanese_spaniel
1176
+ n02085936: Maltese_dog
1177
+ n02086079: Pekinese
1178
+ n02086240: Shih-Tzu
1179
+ n02086646: Blenheim_spaniel
1180
+ n02086910: papillon
1181
+ n02087046: toy_terrier
1182
+ n02087394: Rhodesian_ridgeback
1183
+ n02088094: Afghan_hound
1184
+ n02088238: basset
1185
+ n02088364: beagle
1186
+ n02088466: bloodhound
1187
+ n02088632: bluetick
1188
+ n02089078: black-and-tan_coonhound
1189
+ n02089867: Walker_hound
1190
+ n02089973: English_foxhound
1191
+ n02090379: redbone
1192
+ n02090622: borzoi
1193
+ n02090721: Irish_wolfhound
1194
+ n02091032: Italian_greyhound
1195
+ n02091134: whippet
1196
+ n02091244: Ibizan_hound
1197
+ n02091467: Norwegian_elkhound
1198
+ n02091635: otterhound
1199
+ n02091831: Saluki
1200
+ n02092002: Scottish_deerhound
1201
+ n02092339: Weimaraner
1202
+ n02093256: Staffordshire_bullterrier
1203
+ n02093428: American_Staffordshire_terrier
1204
+ n02093647: Bedlington_terrier
1205
+ n02093754: Border_terrier
1206
+ n02093859: Kerry_blue_terrier
1207
+ n02093991: Irish_terrier
1208
+ n02094114: Norfolk_terrier
1209
+ n02094258: Norwich_terrier
1210
+ n02094433: Yorkshire_terrier
1211
+ n02095314: wire-haired_fox_terrier
1212
+ n02095570: Lakeland_terrier
1213
+ n02095889: Sealyham_terrier
1214
+ n02096051: Airedale
1215
+ n02096177: cairn
1216
+ n02096294: Australian_terrier
1217
+ n02096437: Dandie_Dinmont
1218
+ n02096585: Boston_bull
1219
+ n02097047: miniature_schnauzer
1220
+ n02097130: giant_schnauzer
1221
+ n02097209: standard_schnauzer
1222
+ n02097298: Scotch_terrier
1223
+ n02097474: Tibetan_terrier
1224
+ n02097658: silky_terrier
1225
+ n02098105: soft-coated_wheaten_terrier
1226
+ n02098286: West_Highland_white_terrier
1227
+ n02098413: Lhasa
1228
+ n02099267: flat-coated_retriever
1229
+ n02099429: curly-coated_retriever
1230
+ n02099601: golden_retriever
1231
+ n02099712: Labrador_retriever
1232
+ n02099849: Chesapeake_Bay_retriever
1233
+ n02100236: German_short-haired_pointer
1234
+ n02100583: vizsla
1235
+ n02100735: English_setter
1236
+ n02100877: Irish_setter
1237
+ n02101006: Gordon_setter
1238
+ n02101388: Brittany_spaniel
1239
+ n02101556: clumber
1240
+ n02102040: English_springer
1241
+ n02102177: Welsh_springer_spaniel
1242
+ n02102318: cocker_spaniel
1243
+ n02102480: Sussex_spaniel
1244
+ n02102973: Irish_water_spaniel
1245
+ n02104029: kuvasz
1246
+ n02104365: schipperke
1247
+ n02105056: groenendael
1248
+ n02105162: malinois
1249
+ n02105251: briard
1250
+ n02105412: kelpie
1251
+ n02105505: komondor
1252
+ n02105641: Old_English_sheepdog
1253
+ n02105855: Shetland_sheepdog
1254
+ n02106030: collie
1255
+ n02106166: Border_collie
1256
+ n02106382: Bouvier_des_Flandres
1257
+ n02106550: Rottweiler
1258
+ n02106662: German_shepherd
1259
+ n02107142: Doberman
1260
+ n02107312: miniature_pinscher
1261
+ n02107574: Greater_Swiss_Mountain_dog
1262
+ n02107683: Bernese_mountain_dog
1263
+ n02107908: Appenzeller
1264
+ n02108000: EntleBucher
1265
+ n02108089: boxer
1266
+ n02108422: bull_mastiff
1267
+ n02108551: Tibetan_mastiff
1268
+ n02108915: French_bulldog
1269
+ n02109047: Great_Dane
1270
+ n02109525: Saint_Bernard
1271
+ n02109961: Eskimo_dog
1272
+ n02110063: malamute
1273
+ n02110185: Siberian_husky
1274
+ n02110341: dalmatian
1275
+ n02110627: affenpinscher
1276
+ n02110806: basenji
1277
+ n02110958: pug
1278
+ n02111129: Leonberg
1279
+ n02111277: Newfoundland
1280
+ n02111500: Great_Pyrenees
1281
+ n02111889: Samoyed
1282
+ n02112018: Pomeranian
1283
+ n02112137: chow
1284
+ n02112350: keeshond
1285
+ n02112706: Brabancon_griffon
1286
+ n02113023: Pembroke
1287
+ n02113186: Cardigan
1288
+ n02113624: toy_poodle
1289
+ n02113712: miniature_poodle
1290
+ n02113799: standard_poodle
1291
+ n02113978: Mexican_hairless
1292
+ n02114367: timber_wolf
1293
+ n02114548: white_wolf
1294
+ n02114712: red_wolf
1295
+ n02114855: coyote
1296
+ n02115641: dingo
1297
+ n02115913: dhole
1298
+ n02116738: African_hunting_dog
1299
+ n02117135: hyena
1300
+ n02119022: red_fox
1301
+ n02119789: kit_fox
1302
+ n02120079: Arctic_fox
1303
+ n02120505: grey_fox
1304
+ n02123045: tabby
1305
+ n02123159: tiger_cat
1306
+ n02123394: Persian_cat
1307
+ n02123597: Siamese_cat
1308
+ n02124075: Egyptian_cat
1309
+ n02125311: cougar
1310
+ n02127052: lynx
1311
+ n02128385: leopard
1312
+ n02128757: snow_leopard
1313
+ n02128925: jaguar
1314
+ n02129165: lion
1315
+ n02129604: tiger
1316
+ n02130308: cheetah
1317
+ n02132136: brown_bear
1318
+ n02133161: American_black_bear
1319
+ n02134084: ice_bear
1320
+ n02134418: sloth_bear
1321
+ n02137549: mongoose
1322
+ n02138441: meerkat
1323
+ n02165105: tiger_beetle
1324
+ n02165456: ladybug
1325
+ n02167151: ground_beetle
1326
+ n02168699: long-horned_beetle
1327
+ n02169497: leaf_beetle
1328
+ n02172182: dung_beetle
1329
+ n02174001: rhinoceros_beetle
1330
+ n02177972: weevil
1331
+ n02190166: fly
1332
+ n02206856: bee
1333
+ n02219486: ant
1334
+ n02226429: grasshopper
1335
+ n02229544: cricket
1336
+ n02231487: walking_stick
1337
+ n02233338: cockroach
1338
+ n02236044: mantis
1339
+ n02256656: cicada
1340
+ n02259212: leafhopper
1341
+ n02264363: lacewing
1342
+ n02268443: dragonfly
1343
+ n02268853: damselfly
1344
+ n02276258: admiral
1345
+ n02277742: ringlet
1346
+ n02279972: monarch
1347
+ n02280649: cabbage_butterfly
1348
+ n02281406: sulphur_butterfly
1349
+ n02281787: lycaenid
1350
+ n02317335: starfish
1351
+ n02319095: sea_urchin
1352
+ n02321529: sea_cucumber
1353
+ n02325366: wood_rabbit
1354
+ n02326432: hare
1355
+ n02328150: Angora
1356
+ n02342885: hamster
1357
+ n02346627: porcupine
1358
+ n02356798: fox_squirrel
1359
+ n02361337: marmot
1360
+ n02363005: beaver
1361
+ n02364673: guinea_pig
1362
+ n02389026: sorrel
1363
+ n02391049: zebra
1364
+ n02395406: hog
1365
+ n02396427: wild_boar
1366
+ n02397096: warthog
1367
+ n02398521: hippopotamus
1368
+ n02403003: ox
1369
+ n02408429: water_buffalo
1370
+ n02410509: bison
1371
+ n02412080: ram
1372
+ n02415577: bighorn
1373
+ n02417914: ibex
1374
+ n02422106: hartebeest
1375
+ n02422699: impala
1376
+ n02423022: gazelle
1377
+ n02437312: Arabian_camel
1378
+ n02437616: llama
1379
+ n02441942: weasel
1380
+ n02442845: mink
1381
+ n02443114: polecat
1382
+ n02443484: black-footed_ferret
1383
+ n02444819: otter
1384
+ n02445715: skunk
1385
+ n02447366: badger
1386
+ n02454379: armadillo
1387
+ n02457408: three-toed_sloth
1388
+ n02480495: orangutan
1389
+ n02480855: gorilla
1390
+ n02481823: chimpanzee
1391
+ n02483362: gibbon
1392
+ n02483708: siamang
1393
+ n02484975: guenon
1394
+ n02486261: patas
1395
+ n02486410: baboon
1396
+ n02487347: macaque
1397
+ n02488291: langur
1398
+ n02488702: colobus
1399
+ n02489166: proboscis_monkey
1400
+ n02490219: marmoset
1401
+ n02492035: capuchin
1402
+ n02492660: howler_monkey
1403
+ n02493509: titi
1404
+ n02493793: spider_monkey
1405
+ n02494079: squirrel_monkey
1406
+ n02497673: Madagascar_cat
1407
+ n02500267: indri
1408
+ n02504013: Indian_elephant
1409
+ n02504458: African_elephant
1410
+ n02509815: lesser_panda
1411
+ n02510455: giant_panda
1412
+ n02514041: barracouta
1413
+ n02526121: eel
1414
+ n02536864: coho
1415
+ n02606052: rock_beauty
1416
+ n02607072: anemone_fish
1417
+ n02640242: sturgeon
1418
+ n02641379: gar
1419
+ n02643566: lionfish
1420
+ n02655020: puffer
1421
+ n02666196: abacus
1422
+ n02667093: abaya
1423
+ n02669723: academic_gown
1424
+ n02672831: accordion
1425
+ n02676566: acoustic_guitar
1426
+ n02687172: aircraft_carrier
1427
+ n02690373: airliner
1428
+ n02692877: airship
1429
+ n02699494: altar
1430
+ n02701002: ambulance
1431
+ n02704792: amphibian
1432
+ n02708093: analog_clock
1433
+ n02727426: apiary
1434
+ n02730930: apron
1435
+ n02747177: ashcan
1436
+ n02749479: assault_rifle
1437
+ n02769748: backpack
1438
+ n02776631: bakery
1439
+ n02777292: balance_beam
1440
+ n02782093: balloon
1441
+ n02783161: ballpoint
1442
+ n02786058: Band_Aid
1443
+ n02787622: banjo
1444
+ n02788148: bannister
1445
+ n02790996: barbell
1446
+ n02791124: barber_chair
1447
+ n02791270: barbershop
1448
+ n02793495: barn
1449
+ n02794156: barometer
1450
+ n02795169: barrel
1451
+ n02797295: barrow
1452
+ n02799071: baseball
1453
+ n02802426: basketball
1454
+ n02804414: bassinet
1455
+ n02804610: bassoon
1456
+ n02807133: bathing_cap
1457
+ n02808304: bath_towel
1458
+ n02808440: bathtub
1459
+ n02814533: beach_wagon
1460
+ n02814860: beacon
1461
+ n02815834: beaker
1462
+ n02817516: bearskin
1463
+ n02823428: beer_bottle
1464
+ n02823750: beer_glass
1465
+ n02825657: bell_cote
1466
+ n02834397: bib
1467
+ n02835271: bicycle-built-for-two
1468
+ n02837789: bikini
1469
+ n02840245: binder
1470
+ n02841315: binoculars
1471
+ n02843684: birdhouse
1472
+ n02859443: boathouse
1473
+ n02860847: bobsled
1474
+ n02865351: bolo_tie
1475
+ n02869837: bonnet
1476
+ n02870880: bookcase
1477
+ n02871525: bookshop
1478
+ n02877765: bottlecap
1479
+ n02879718: bow
1480
+ n02883205: bow_tie
1481
+ n02892201: brass
1482
+ n02892767: brassiere
1483
+ n02894605: breakwater
1484
+ n02895154: breastplate
1485
+ n02906734: broom
1486
+ n02909870: bucket
1487
+ n02910353: buckle
1488
+ n02916936: bulletproof_vest
1489
+ n02917067: bullet_train
1490
+ n02927161: butcher_shop
1491
+ n02930766: cab
1492
+ n02939185: caldron
1493
+ n02948072: candle
1494
+ n02950826: cannon
1495
+ n02951358: canoe
1496
+ n02951585: can_opener
1497
+ n02963159: cardigan
1498
+ n02965783: car_mirror
1499
+ n02966193: carousel
1500
+ n02966687: carpenter's_kit
1501
+ n02971356: carton
1502
+ n02974003: car_wheel
1503
+ n02977058: cash_machine
1504
+ n02978881: cassette
1505
+ n02979186: cassette_player
1506
+ n02980441: castle
1507
+ n02981792: catamaran
1508
+ n02988304: CD_player
1509
+ n02992211: cello
1510
+ n02992529: cellular_telephone
1511
+ n02999410: chain
1512
+ n03000134: chainlink_fence
1513
+ n03000247: chain_mail
1514
+ n03000684: chain_saw
1515
+ n03014705: chest
1516
+ n03016953: chiffonier
1517
+ n03017168: chime
1518
+ n03018349: china_cabinet
1519
+ n03026506: Christmas_stocking
1520
+ n03028079: church
1521
+ n03032252: cinema
1522
+ n03041632: cleaver
1523
+ n03042490: cliff_dwelling
1524
+ n03045698: cloak
1525
+ n03047690: clog
1526
+ n03062245: cocktail_shaker
1527
+ n03063599: coffee_mug
1528
+ n03063689: coffeepot
1529
+ n03065424: coil
1530
+ n03075370: combination_lock
1531
+ n03085013: computer_keyboard
1532
+ n03089624: confectionery
1533
+ n03095699: container_ship
1534
+ n03100240: convertible
1535
+ n03109150: corkscrew
1536
+ n03110669: cornet
1537
+ n03124043: cowboy_boot
1538
+ n03124170: cowboy_hat
1539
+ n03125729: cradle
1540
+ n03126707: crane_(machine)
1541
+ n03127747: crash_helmet
1542
+ n03127925: crate
1543
+ n03131574: crib
1544
+ n03133878: Crock_Pot
1545
+ n03134739: croquet_ball
1546
+ n03141823: crutch
1547
+ n03146219: cuirass
1548
+ n03160309: dam
1549
+ n03179701: desk
1550
+ n03180011: desktop_computer
1551
+ n03187595: dial_telephone
1552
+ n03188531: diaper
1553
+ n03196217: digital_clock
1554
+ n03197337: digital_watch
1555
+ n03201208: dining_table
1556
+ n03207743: dishrag
1557
+ n03207941: dishwasher
1558
+ n03208938: disk_brake
1559
+ n03216828: dock
1560
+ n03218198: dogsled
1561
+ n03220513: dome
1562
+ n03223299: doormat
1563
+ n03240683: drilling_platform
1564
+ n03249569: drum
1565
+ n03250847: drumstick
1566
+ n03255030: dumbbell
1567
+ n03259280: Dutch_oven
1568
+ n03271574: electric_fan
1569
+ n03272010: electric_guitar
1570
+ n03272562: electric_locomotive
1571
+ n03290653: entertainment_center
1572
+ n03291819: envelope
1573
+ n03297495: espresso_maker
1574
+ n03314780: face_powder
1575
+ n03325584: feather_boa
1576
+ n03337140: file
1577
+ n03344393: fireboat
1578
+ n03345487: fire_engine
1579
+ n03347037: fire_screen
1580
+ n03355925: flagpole
1581
+ n03372029: flute
1582
+ n03376595: folding_chair
1583
+ n03379051: football_helmet
1584
+ n03384352: forklift
1585
+ n03388043: fountain
1586
+ n03388183: fountain_pen
1587
+ n03388549: four-poster
1588
+ n03393912: freight_car
1589
+ n03394916: French_horn
1590
+ n03400231: frying_pan
1591
+ n03404251: fur_coat
1592
+ n03417042: garbage_truck
1593
+ n03424325: gasmask
1594
+ n03425413: gas_pump
1595
+ n03443371: goblet
1596
+ n03444034: go-kart
1597
+ n03445777: golf_ball
1598
+ n03445924: golfcart
1599
+ n03447447: gondola
1600
+ n03447721: gong
1601
+ n03450230: gown
1602
+ n03452741: grand_piano
1603
+ n03457902: greenhouse
1604
+ n03459775: grille
1605
+ n03461385: grocery_store
1606
+ n03467068: guillotine
1607
+ n03476684: hair_slide
1608
+ n03476991: hair_spray
1609
+ n03478589: half_track
1610
+ n03481172: hammer
1611
+ n03482405: hamper
1612
+ n03483316: hand_blower
1613
+ n03485407: hand-held_computer
1614
+ n03485794: handkerchief
1615
+ n03492542: hard_disc
1616
+ n03494278: harmonica
1617
+ n03495258: harp
1618
+ n03496892: harvester
1619
+ n03498962: hatchet
1620
+ n03527444: holster
1621
+ n03529860: home_theater
1622
+ n03530642: honeycomb
1623
+ n03532672: hook
1624
+ n03534580: hoopskirt
1625
+ n03535780: horizontal_bar
1626
+ n03538406: horse_cart
1627
+ n03544143: hourglass
1628
+ n03584254: iPod
1629
+ n03584829: iron
1630
+ n03590841: jack-o'-lantern
1631
+ n03594734: jean
1632
+ n03594945: jeep
1633
+ n03595614: jersey
1634
+ n03598930: jigsaw_puzzle
1635
+ n03599486: jinrikisha
1636
+ n03602883: joystick
1637
+ n03617480: kimono
1638
+ n03623198: knee_pad
1639
+ n03627232: knot
1640
+ n03630383: lab_coat
1641
+ n03633091: ladle
1642
+ n03637318: lampshade
1643
+ n03642806: laptop
1644
+ n03649909: lawn_mower
1645
+ n03657121: lens_cap
1646
+ n03658185: letter_opener
1647
+ n03661043: library
1648
+ n03662601: lifeboat
1649
+ n03666591: lighter
1650
+ n03670208: limousine
1651
+ n03673027: liner
1652
+ n03676483: lipstick
1653
+ n03680355: Loafer
1654
+ n03690938: lotion
1655
+ n03691459: loudspeaker
1656
+ n03692522: loupe
1657
+ n03697007: lumbermill
1658
+ n03706229: magnetic_compass
1659
+ n03709823: mailbag
1660
+ n03710193: mailbox
1661
+ n03710637: maillot_(tights)
1662
+ n03710721: maillot_(tank_suit)
1663
+ n03717622: manhole_cover
1664
+ n03720891: maraca
1665
+ n03721384: marimba
1666
+ n03724870: mask
1667
+ n03729826: matchstick
1668
+ n03733131: maypole
1669
+ n03733281: maze
1670
+ n03733805: measuring_cup
1671
+ n03742115: medicine_chest
1672
+ n03743016: megalith
1673
+ n03759954: microphone
1674
+ n03761084: microwave
1675
+ n03763968: military_uniform
1676
+ n03764736: milk_can
1677
+ n03769881: minibus
1678
+ n03770439: miniskirt
1679
+ n03770679: minivan
1680
+ n03773504: missile
1681
+ n03775071: mitten
1682
+ n03775546: mixing_bowl
1683
+ n03776460: mobile_home
1684
+ n03777568: Model_T
1685
+ n03777754: modem
1686
+ n03781244: monastery
1687
+ n03782006: monitor
1688
+ n03785016: moped
1689
+ n03786901: mortar
1690
+ n03787032: mortarboard
1691
+ n03788195: mosque
1692
+ n03788365: mosquito_net
1693
+ n03791053: motor_scooter
1694
+ n03792782: mountain_bike
1695
+ n03792972: mountain_tent
1696
+ n03793489: mouse
1697
+ n03794056: mousetrap
1698
+ n03796401: moving_van
1699
+ n03803284: muzzle
1700
+ n03804744: nail
1701
+ n03814639: neck_brace
1702
+ n03814906: necklace
1703
+ n03825788: nipple
1704
+ n03832673: notebook
1705
+ n03837869: obelisk
1706
+ n03838899: oboe
1707
+ n03840681: ocarina
1708
+ n03841143: odometer
1709
+ n03843555: oil_filter
1710
+ n03854065: organ
1711
+ n03857828: oscilloscope
1712
+ n03866082: overskirt
1713
+ n03868242: oxcart
1714
+ n03868863: oxygen_mask
1715
+ n03871628: packet
1716
+ n03873416: paddle
1717
+ n03874293: paddlewheel
1718
+ n03874599: padlock
1719
+ n03876231: paintbrush
1720
+ n03877472: pajama
1721
+ n03877845: palace
1722
+ n03884397: panpipe
1723
+ n03887697: paper_towel
1724
+ n03888257: parachute
1725
+ n03888605: parallel_bars
1726
+ n03891251: park_bench
1727
+ n03891332: parking_meter
1728
+ n03895866: passenger_car
1729
+ n03899768: patio
1730
+ n03902125: pay-phone
1731
+ n03903868: pedestal
1732
+ n03908618: pencil_box
1733
+ n03908714: pencil_sharpener
1734
+ n03916031: perfume
1735
+ n03920288: Petri_dish
1736
+ n03924679: photocopier
1737
+ n03929660: pick
1738
+ n03929855: pickelhaube
1739
+ n03930313: picket_fence
1740
+ n03930630: pickup
1741
+ n03933933: pier
1742
+ n03935335: piggy_bank
1743
+ n03937543: pill_bottle
1744
+ n03938244: pillow
1745
+ n03942813: ping-pong_ball
1746
+ n03944341: pinwheel
1747
+ n03947888: pirate
1748
+ n03950228: pitcher
1749
+ n03954731: plane
1750
+ n03956157: planetarium
1751
+ n03958227: plastic_bag
1752
+ n03961711: plate_rack
1753
+ n03967562: plow
1754
+ n03970156: plunger
1755
+ n03976467: Polaroid_camera
1756
+ n03976657: pole
1757
+ n03977966: police_van
1758
+ n03980874: poncho
1759
+ n03982430: pool_table
1760
+ n03983396: pop_bottle
1761
+ n03991062: pot
1762
+ n03992509: potter's_wheel
1763
+ n03995372: power_drill
1764
+ n03998194: prayer_rug
1765
+ n04004767: printer
1766
+ n04005630: prison
1767
+ n04008634: projectile
1768
+ n04009552: projector
1769
+ n04019541: puck
1770
+ n04023962: punching_bag
1771
+ n04026417: purse
1772
+ n04033901: quill
1773
+ n04033995: quilt
1774
+ n04037443: racer
1775
+ n04039381: racket
1776
+ n04040759: radiator
1777
+ n04041544: radio
1778
+ n04044716: radio_telescope
1779
+ n04049303: rain_barrel
1780
+ n04065272: recreational_vehicle
1781
+ n04067472: reel
1782
+ n04069434: reflex_camera
1783
+ n04070727: refrigerator
1784
+ n04074963: remote_control
1785
+ n04081281: restaurant
1786
+ n04086273: revolver
1787
+ n04090263: rifle
1788
+ n04099969: rocking_chair
1789
+ n04111531: rotisserie
1790
+ n04116512: rubber_eraser
1791
+ n04118538: rugby_ball
1792
+ n04118776: rule
1793
+ n04120489: running_shoe
1794
+ n04125021: safe
1795
+ n04127249: safety_pin
1796
+ n04131690: saltshaker
1797
+ n04133789: sandal
1798
+ n04136333: sarong
1799
+ n04141076: sax
1800
+ n04141327: scabbard
1801
+ n04141975: scale
1802
+ n04146614: school_bus
1803
+ n04147183: schooner
1804
+ n04149813: scoreboard
1805
+ n04152593: screen
1806
+ n04153751: screw
1807
+ n04154565: screwdriver
1808
+ n04162706: seat_belt
1809
+ n04179913: sewing_machine
1810
+ n04192698: shield
1811
+ n04200800: shoe_shop
1812
+ n04201297: shoji
1813
+ n04204238: shopping_basket
1814
+ n04204347: shopping_cart
1815
+ n04208210: shovel
1816
+ n04209133: shower_cap
1817
+ n04209239: shower_curtain
1818
+ n04228054: ski
1819
+ n04229816: ski_mask
1820
+ n04235860: sleeping_bag
1821
+ n04238763: slide_rule
1822
+ n04239074: sliding_door
1823
+ n04243546: slot
1824
+ n04251144: snorkel
1825
+ n04252077: snowmobile
1826
+ n04252225: snowplow
1827
+ n04254120: soap_dispenser
1828
+ n04254680: soccer_ball
1829
+ n04254777: sock
1830
+ n04258138: solar_dish
1831
+ n04259630: sombrero
1832
+ n04263257: soup_bowl
1833
+ n04264628: space_bar
1834
+ n04265275: space_heater
1835
+ n04266014: space_shuttle
1836
+ n04270147: spatula
1837
+ n04273569: speedboat
1838
+ n04275548: spider_web
1839
+ n04277352: spindle
1840
+ n04285008: sports_car
1841
+ n04286575: spotlight
1842
+ n04296562: stage
1843
+ n04310018: steam_locomotive
1844
+ n04311004: steel_arch_bridge
1845
+ n04311174: steel_drum
1846
+ n04317175: stethoscope
1847
+ n04325704: stole
1848
+ n04326547: stone_wall
1849
+ n04328186: stopwatch
1850
+ n04330267: stove
1851
+ n04332243: strainer
1852
+ n04335435: streetcar
1853
+ n04336792: stretcher
1854
+ n04344873: studio_couch
1855
+ n04346328: stupa
1856
+ n04347754: submarine
1857
+ n04350905: suit
1858
+ n04355338: sundial
1859
+ n04355933: sunglass
1860
+ n04356056: sunglasses
1861
+ n04357314: sunscreen
1862
+ n04366367: suspension_bridge
1863
+ n04367480: swab
1864
+ n04370456: sweatshirt
1865
+ n04371430: swimming_trunks
1866
+ n04371774: swing
1867
+ n04372370: switch
1868
+ n04376876: syringe
1869
+ n04380533: table_lamp
1870
+ n04389033: tank
1871
+ n04392985: tape_player
1872
+ n04398044: teapot
1873
+ n04399382: teddy
1874
+ n04404412: television
1875
+ n04409515: tennis_ball
1876
+ n04417672: thatch
1877
+ n04418357: theater_curtain
1878
+ n04423845: thimble
1879
+ n04428191: thresher
1880
+ n04429376: throne
1881
+ n04435653: tile_roof
1882
+ n04442312: toaster
1883
+ n04443257: tobacco_shop
1884
+ n04447861: toilet_seat
1885
+ n04456115: torch
1886
+ n04458633: totem_pole
1887
+ n04461696: tow_truck
1888
+ n04462240: toyshop
1889
+ n04465501: tractor
1890
+ n04467665: trailer_truck
1891
+ n04476259: tray
1892
+ n04479046: trench_coat
1893
+ n04482393: tricycle
1894
+ n04483307: trimaran
1895
+ n04485082: tripod
1896
+ n04486054: triumphal_arch
1897
+ n04487081: trolleybus
1898
+ n04487394: trombone
1899
+ n04493381: tub
1900
+ n04501370: turnstile
1901
+ n04505470: typewriter_keyboard
1902
+ n04507155: umbrella
1903
+ n04509417: unicycle
1904
+ n04515003: upright
1905
+ n04517823: vacuum
1906
+ n04522168: vase
1907
+ n04523525: vault
1908
+ n04525038: velvet
1909
+ n04525305: vending_machine
1910
+ n04532106: vestment
1911
+ n04532670: viaduct
1912
+ n04536866: violin
1913
+ n04540053: volleyball
1914
+ n04542943: waffle_iron
1915
+ n04548280: wall_clock
1916
+ n04548362: wallet
1917
+ n04550184: wardrobe
1918
+ n04552348: warplane
1919
+ n04553703: washbasin
1920
+ n04554684: washer
1921
+ n04557648: water_bottle
1922
+ n04560804: water_jug
1923
+ n04562935: water_tower
1924
+ n04579145: whiskey_jug
1925
+ n04579432: whistle
1926
+ n04584207: wig
1927
+ n04589890: window_screen
1928
+ n04590129: window_shade
1929
+ n04591157: Windsor_tie
1930
+ n04591713: wine_bottle
1931
+ n04592741: wing
1932
+ n04596742: wok
1933
+ n04597913: wooden_spoon
1934
+ n04599235: wool
1935
+ n04604644: worm_fence
1936
+ n04606251: wreck
1937
+ n04612504: yawl
1938
+ n04613696: yurt
1939
+ n06359193: web_site
1940
+ n06596364: comic_book
1941
+ n06785654: crossword_puzzle
1942
+ n06794110: street_sign
1943
+ n06874185: traffic_light
1944
+ n07248320: book_jacket
1945
+ n07565083: menu
1946
+ n07579787: plate
1947
+ n07583066: guacamole
1948
+ n07584110: consomme
1949
+ n07590611: hot_pot
1950
+ n07613480: trifle
1951
+ n07614500: ice_cream
1952
+ n07615774: ice_lolly
1953
+ n07684084: French_loaf
1954
+ n07693725: bagel
1955
+ n07695742: pretzel
1956
+ n07697313: cheeseburger
1957
+ n07697537: hotdog
1958
+ n07711569: mashed_potato
1959
+ n07714571: head_cabbage
1960
+ n07714990: broccoli
1961
+ n07715103: cauliflower
1962
+ n07716358: zucchini
1963
+ n07716906: spaghetti_squash
1964
+ n07717410: acorn_squash
1965
+ n07717556: butternut_squash
1966
+ n07718472: cucumber
1967
+ n07718747: artichoke
1968
+ n07720875: bell_pepper
1969
+ n07730033: cardoon
1970
+ n07734744: mushroom
1971
+ n07742313: Granny_Smith
1972
+ n07745940: strawberry
1973
+ n07747607: orange
1974
+ n07749582: lemon
1975
+ n07753113: fig
1976
+ n07753275: pineapple
1977
+ n07753592: banana
1978
+ n07754684: jackfruit
1979
+ n07760859: custard_apple
1980
+ n07768694: pomegranate
1981
+ n07802026: hay
1982
+ n07831146: carbonara
1983
+ n07836838: chocolate_sauce
1984
+ n07860988: dough
1985
+ n07871810: meat_loaf
1986
+ n07873807: pizza
1987
+ n07875152: potpie
1988
+ n07880968: burrito
1989
+ n07892512: red_wine
1990
+ n07920052: espresso
1991
+ n07930864: cup
1992
+ n07932039: eggnog
1993
+ n09193705: alp
1994
+ n09229709: bubble
1995
+ n09246464: cliff
1996
+ n09256479: coral_reef
1997
+ n09288635: geyser
1998
+ n09332890: lakeside
1999
+ n09399592: promontory
2000
+ n09421951: sandbar
2001
+ n09428293: seashore
2002
+ n09468604: valley
2003
+ n09472597: volcano
2004
+ n09835506: ballplayer
2005
+ n10148035: groom
2006
+ n10565667: scuba_diver
2007
+ n11879895: rapeseed
2008
+ n11939491: daisy
2009
+ n12057211: yellow_lady's_slipper
2010
+ n12144580: corn
2011
+ n12267677: acorn
2012
+ n12620546: hip
2013
+ n12768682: buckeye
2014
+ n12985857: coral_fungus
2015
+ n12998815: agaric
2016
+ n13037406: gyromitra
2017
+ n13040303: stinkhorn
2018
+ n13044778: earthstar
2019
+ n13052670: hen-of-the-woods
2020
+ n13054560: bolete
2021
+ n13133613: ear
2022
+ n15075141: toilet_tissue
2023
+
2024
+ # Download script/URL (optional)
2025
+ download: yolo/data/scripts/get_imagenet.sh
ultralytics/cfg/datasets/Objects365.yaml ADDED
@@ -0,0 +1,443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Objects365 dataset https://www.objects365.org/ by Megvii
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/objects365/
5
+ # Example usage: yolo train data=Objects365.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── Objects365 ← downloads here (712 GB = 367G data + 345G zips)
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: ../datasets/Objects365 # dataset root dir
13
+ train: images/train # train images (relative to 'path') 1742289 images
14
+ val: images/val # val images (relative to 'path') 80000 images
15
+ test: # test images (optional)
16
+
17
+ # Classes
18
+ names:
19
+ 0: Person
20
+ 1: Sneakers
21
+ 2: Chair
22
+ 3: Other Shoes
23
+ 4: Hat
24
+ 5: Car
25
+ 6: Lamp
26
+ 7: Glasses
27
+ 8: Bottle
28
+ 9: Desk
29
+ 10: Cup
30
+ 11: Street Lights
31
+ 12: Cabinet/shelf
32
+ 13: Handbag/Satchel
33
+ 14: Bracelet
34
+ 15: Plate
35
+ 16: Picture/Frame
36
+ 17: Helmet
37
+ 18: Book
38
+ 19: Gloves
39
+ 20: Storage box
40
+ 21: Boat
41
+ 22: Leather Shoes
42
+ 23: Flower
43
+ 24: Bench
44
+ 25: Potted Plant
45
+ 26: Bowl/Basin
46
+ 27: Flag
47
+ 28: Pillow
48
+ 29: Boots
49
+ 30: Vase
50
+ 31: Microphone
51
+ 32: Necklace
52
+ 33: Ring
53
+ 34: SUV
54
+ 35: Wine Glass
55
+ 36: Belt
56
+ 37: Monitor/TV
57
+ 38: Backpack
58
+ 39: Umbrella
59
+ 40: Traffic Light
60
+ 41: Speaker
61
+ 42: Watch
62
+ 43: Tie
63
+ 44: Trash bin Can
64
+ 45: Slippers
65
+ 46: Bicycle
66
+ 47: Stool
67
+ 48: Barrel/bucket
68
+ 49: Van
69
+ 50: Couch
70
+ 51: Sandals
71
+ 52: Basket
72
+ 53: Drum
73
+ 54: Pen/Pencil
74
+ 55: Bus
75
+ 56: Wild Bird
76
+ 57: High Heels
77
+ 58: Motorcycle
78
+ 59: Guitar
79
+ 60: Carpet
80
+ 61: Cell Phone
81
+ 62: Bread
82
+ 63: Camera
83
+ 64: Canned
84
+ 65: Truck
85
+ 66: Traffic cone
86
+ 67: Cymbal
87
+ 68: Lifesaver
88
+ 69: Towel
89
+ 70: Stuffed Toy
90
+ 71: Candle
91
+ 72: Sailboat
92
+ 73: Laptop
93
+ 74: Awning
94
+ 75: Bed
95
+ 76: Faucet
96
+ 77: Tent
97
+ 78: Horse
98
+ 79: Mirror
99
+ 80: Power outlet
100
+ 81: Sink
101
+ 82: Apple
102
+ 83: Air Conditioner
103
+ 84: Knife
104
+ 85: Hockey Stick
105
+ 86: Paddle
106
+ 87: Pickup Truck
107
+ 88: Fork
108
+ 89: Traffic Sign
109
+ 90: Balloon
110
+ 91: Tripod
111
+ 92: Dog
112
+ 93: Spoon
113
+ 94: Clock
114
+ 95: Pot
115
+ 96: Cow
116
+ 97: Cake
117
+ 98: Dining Table
118
+ 99: Sheep
119
+ 100: Hanger
120
+ 101: Blackboard/Whiteboard
121
+ 102: Napkin
122
+ 103: Other Fish
123
+ 104: Orange/Tangerine
124
+ 105: Toiletry
125
+ 106: Keyboard
126
+ 107: Tomato
127
+ 108: Lantern
128
+ 109: Machinery Vehicle
129
+ 110: Fan
130
+ 111: Green Vegetables
131
+ 112: Banana
132
+ 113: Baseball Glove
133
+ 114: Airplane
134
+ 115: Mouse
135
+ 116: Train
136
+ 117: Pumpkin
137
+ 118: Soccer
138
+ 119: Skiboard
139
+ 120: Luggage
140
+ 121: Nightstand
141
+ 122: Tea pot
142
+ 123: Telephone
143
+ 124: Trolley
144
+ 125: Head Phone
145
+ 126: Sports Car
146
+ 127: Stop Sign
147
+ 128: Dessert
148
+ 129: Scooter
149
+ 130: Stroller
150
+ 131: Crane
151
+ 132: Remote
152
+ 133: Refrigerator
153
+ 134: Oven
154
+ 135: Lemon
155
+ 136: Duck
156
+ 137: Baseball Bat
157
+ 138: Surveillance Camera
158
+ 139: Cat
159
+ 140: Jug
160
+ 141: Broccoli
161
+ 142: Piano
162
+ 143: Pizza
163
+ 144: Elephant
164
+ 145: Skateboard
165
+ 146: Surfboard
166
+ 147: Gun
167
+ 148: Skating and Skiing shoes
168
+ 149: Gas stove
169
+ 150: Donut
170
+ 151: Bow Tie
171
+ 152: Carrot
172
+ 153: Toilet
173
+ 154: Kite
174
+ 155: Strawberry
175
+ 156: Other Balls
176
+ 157: Shovel
177
+ 158: Pepper
178
+ 159: Computer Box
179
+ 160: Toilet Paper
180
+ 161: Cleaning Products
181
+ 162: Chopsticks
182
+ 163: Microwave
183
+ 164: Pigeon
184
+ 165: Baseball
185
+ 166: Cutting/chopping Board
186
+ 167: Coffee Table
187
+ 168: Side Table
188
+ 169: Scissors
189
+ 170: Marker
190
+ 171: Pie
191
+ 172: Ladder
192
+ 173: Snowboard
193
+ 174: Cookies
194
+ 175: Radiator
195
+ 176: Fire Hydrant
196
+ 177: Basketball
197
+ 178: Zebra
198
+ 179: Grape
199
+ 180: Giraffe
200
+ 181: Potato
201
+ 182: Sausage
202
+ 183: Tricycle
203
+ 184: Violin
204
+ 185: Egg
205
+ 186: Fire Extinguisher
206
+ 187: Candy
207
+ 188: Fire Truck
208
+ 189: Billiards
209
+ 190: Converter
210
+ 191: Bathtub
211
+ 192: Wheelchair
212
+ 193: Golf Club
213
+ 194: Briefcase
214
+ 195: Cucumber
215
+ 196: Cigar/Cigarette
216
+ 197: Paint Brush
217
+ 198: Pear
218
+ 199: Heavy Truck
219
+ 200: Hamburger
220
+ 201: Extractor
221
+ 202: Extension Cord
222
+ 203: Tong
223
+ 204: Tennis Racket
224
+ 205: Folder
225
+ 206: American Football
226
+ 207: earphone
227
+ 208: Mask
228
+ 209: Kettle
229
+ 210: Tennis
230
+ 211: Ship
231
+ 212: Swing
232
+ 213: Coffee Machine
233
+ 214: Slide
234
+ 215: Carriage
235
+ 216: Onion
236
+ 217: Green beans
237
+ 218: Projector
238
+ 219: Frisbee
239
+ 220: Washing Machine/Drying Machine
240
+ 221: Chicken
241
+ 222: Printer
242
+ 223: Watermelon
243
+ 224: Saxophone
244
+ 225: Tissue
245
+ 226: Toothbrush
246
+ 227: Ice cream
247
+ 228: Hot-air balloon
248
+ 229: Cello
249
+ 230: French Fries
250
+ 231: Scale
251
+ 232: Trophy
252
+ 233: Cabbage
253
+ 234: Hot dog
254
+ 235: Blender
255
+ 236: Peach
256
+ 237: Rice
257
+ 238: Wallet/Purse
258
+ 239: Volleyball
259
+ 240: Deer
260
+ 241: Goose
261
+ 242: Tape
262
+ 243: Tablet
263
+ 244: Cosmetics
264
+ 245: Trumpet
265
+ 246: Pineapple
266
+ 247: Golf Ball
267
+ 248: Ambulance
268
+ 249: Parking meter
269
+ 250: Mango
270
+ 251: Key
271
+ 252: Hurdle
272
+ 253: Fishing Rod
273
+ 254: Medal
274
+ 255: Flute
275
+ 256: Brush
276
+ 257: Penguin
277
+ 258: Megaphone
278
+ 259: Corn
279
+ 260: Lettuce
280
+ 261: Garlic
281
+ 262: Swan
282
+ 263: Helicopter
283
+ 264: Green Onion
284
+ 265: Sandwich
285
+ 266: Nuts
286
+ 267: Speed Limit Sign
287
+ 268: Induction Cooker
288
+ 269: Broom
289
+ 270: Trombone
290
+ 271: Plum
291
+ 272: Rickshaw
292
+ 273: Goldfish
293
+ 274: Kiwi fruit
294
+ 275: Router/modem
295
+ 276: Poker Card
296
+ 277: Toaster
297
+ 278: Shrimp
298
+ 279: Sushi
299
+ 280: Cheese
300
+ 281: Notepaper
301
+ 282: Cherry
302
+ 283: Pliers
303
+ 284: CD
304
+ 285: Pasta
305
+ 286: Hammer
306
+ 287: Cue
307
+ 288: Avocado
308
+ 289: Hami melon
309
+ 290: Flask
310
+ 291: Mushroom
311
+ 292: Screwdriver
312
+ 293: Soap
313
+ 294: Recorder
314
+ 295: Bear
315
+ 296: Eggplant
316
+ 297: Board Eraser
317
+ 298: Coconut
318
+ 299: Tape Measure/Ruler
319
+ 300: Pig
320
+ 301: Showerhead
321
+ 302: Globe
322
+ 303: Chips
323
+ 304: Steak
324
+ 305: Crosswalk Sign
325
+ 306: Stapler
326
+ 307: Camel
327
+ 308: Formula 1
328
+ 309: Pomegranate
329
+ 310: Dishwasher
330
+ 311: Crab
331
+ 312: Hoverboard
332
+ 313: Meatball
333
+ 314: Rice Cooker
334
+ 315: Tuba
335
+ 316: Calculator
336
+ 317: Papaya
337
+ 318: Antelope
338
+ 319: Parrot
339
+ 320: Seal
340
+ 321: Butterfly
341
+ 322: Dumbbell
342
+ 323: Donkey
343
+ 324: Lion
344
+ 325: Urinal
345
+ 326: Dolphin
346
+ 327: Electric Drill
347
+ 328: Hair Dryer
348
+ 329: Egg tart
349
+ 330: Jellyfish
350
+ 331: Treadmill
351
+ 332: Lighter
352
+ 333: Grapefruit
353
+ 334: Game board
354
+ 335: Mop
355
+ 336: Radish
356
+ 337: Baozi
357
+ 338: Target
358
+ 339: French
359
+ 340: Spring Rolls
360
+ 341: Monkey
361
+ 342: Rabbit
362
+ 343: Pencil Case
363
+ 344: Yak
364
+ 345: Red Cabbage
365
+ 346: Binoculars
366
+ 347: Asparagus
367
+ 348: Barbell
368
+ 349: Scallop
369
+ 350: Noddles
370
+ 351: Comb
371
+ 352: Dumpling
372
+ 353: Oyster
373
+ 354: Table Tennis paddle
374
+ 355: Cosmetics Brush/Eyeliner Pencil
375
+ 356: Chainsaw
376
+ 357: Eraser
377
+ 358: Lobster
378
+ 359: Durian
379
+ 360: Okra
380
+ 361: Lipstick
381
+ 362: Cosmetics Mirror
382
+ 363: Curling
383
+ 364: Table Tennis
384
+
385
+ # Download script/URL (optional) ---------------------------------------------------------------------------------------
386
+ download: |
387
+ from tqdm import tqdm
388
+
389
+ from ultralytics.utils.checks import check_requirements
390
+ from ultralytics.utils.downloads import download
391
+ from ultralytics.utils.ops import xyxy2xywhn
392
+
393
+ import numpy as np
394
+ from pathlib import Path
395
+
396
+ check_requirements(('pycocotools>=2.0',))
397
+ from pycocotools.coco import COCO
398
+
399
+ # Make Directories
400
+ dir = Path(yaml['path']) # dataset root dir
401
+ for p in 'images', 'labels':
402
+ (dir / p).mkdir(parents=True, exist_ok=True)
403
+ for q in 'train', 'val':
404
+ (dir / p / q).mkdir(parents=True, exist_ok=True)
405
+
406
+ # Train, Val Splits
407
+ for split, patches in [('train', 50 + 1), ('val', 43 + 1)]:
408
+ print(f"Processing {split} in {patches} patches ...")
409
+ images, labels = dir / 'images' / split, dir / 'labels' / split
410
+
411
+ # Download
412
+ url = f"https://dorc.ks3-cn-beijing.ksyun.com/data-set/2020Objects365%E6%95%B0%E6%8D%AE%E9%9B%86/{split}/"
413
+ if split == 'train':
414
+ download([f'{url}zhiyuan_objv2_{split}.tar.gz'], dir=dir) # annotations json
415
+ download([f'{url}patch{i}.tar.gz' for i in range(patches)], dir=images, curl=True, threads=8)
416
+ elif split == 'val':
417
+ download([f'{url}zhiyuan_objv2_{split}.json'], dir=dir) # annotations json
418
+ download([f'{url}images/v1/patch{i}.tar.gz' for i in range(15 + 1)], dir=images, curl=True, threads=8)
419
+ download([f'{url}images/v2/patch{i}.tar.gz' for i in range(16, patches)], dir=images, curl=True, threads=8)
420
+
421
+ # Move
422
+ for f in tqdm(images.rglob('*.jpg'), desc=f'Moving {split} images'):
423
+ f.rename(images / f.name) # move to /images/{split}
424
+
425
+ # Labels
426
+ coco = COCO(dir / f'zhiyuan_objv2_{split}.json')
427
+ names = [x["name"] for x in coco.loadCats(coco.getCatIds())]
428
+ for cid, cat in enumerate(names):
429
+ catIds = coco.getCatIds(catNms=[cat])
430
+ imgIds = coco.getImgIds(catIds=catIds)
431
+ for im in tqdm(coco.loadImgs(imgIds), desc=f'Class {cid + 1}/{len(names)} {cat}'):
432
+ width, height = im["width"], im["height"]
433
+ path = Path(im["file_name"]) # image filename
434
+ try:
435
+ with open(labels / path.with_suffix('.txt').name, 'a') as file:
436
+ annIds = coco.getAnnIds(imgIds=im["id"], catIds=catIds, iscrowd=None)
437
+ for a in coco.loadAnns(annIds):
438
+ x, y, w, h = a['bbox'] # bounding box in xywh (xy top-left corner)
439
+ xyxy = np.array([x, y, x + w, y + h])[None] # pixels(1,4)
440
+ x, y, w, h = xyxy2xywhn(xyxy, w=width, h=height, clip=True)[0] # normalized and clipped
441
+ file.write(f"{cid} {x:.5f} {y:.5f} {w:.5f} {h:.5f}\n")
442
+ except Exception as e:
443
+ print(e)
ultralytics/cfg/datasets/SKU-110K.yaml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # SKU-110K retail items dataset https://github.com/eg4000/SKU110K_CVPR19 by Trax Retail
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/sku-110k/
5
+ # Example usage: yolo train data=SKU-110K.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── SKU-110K ← downloads here (13.6 GB)
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: ../datasets/SKU-110K # dataset root dir
13
+ train: train.txt # train images (relative to 'path') 8219 images
14
+ val: val.txt # val images (relative to 'path') 588 images
15
+ test: test.txt # test images (optional) 2936 images
16
+
17
+ # Classes
18
+ names:
19
+ 0: object
20
+
21
+ # Download script/URL (optional) ---------------------------------------------------------------------------------------
22
+ download: |
23
+ import shutil
24
+ from pathlib import Path
25
+
26
+ import numpy as np
27
+ import pandas as pd
28
+ from tqdm import tqdm
29
+
30
+ from ultralytics.utils.downloads import download
31
+ from ultralytics.utils.ops import xyxy2xywh
32
+
33
+ # Download
34
+ dir = Path(yaml['path']) # dataset root dir
35
+ parent = Path(dir.parent) # download dir
36
+ urls = ['http://trax-geometry.s3.amazonaws.com/cvpr_challenge/SKU110K_fixed.tar.gz']
37
+ download(urls, dir=parent)
38
+
39
+ # Rename directories
40
+ if dir.exists():
41
+ shutil.rmtree(dir)
42
+ (parent / 'SKU110K_fixed').rename(dir) # rename dir
43
+ (dir / 'labels').mkdir(parents=True, exist_ok=True) # create labels dir
44
+
45
+ # Convert labels
46
+ names = 'image', 'x1', 'y1', 'x2', 'y2', 'class', 'image_width', 'image_height' # column names
47
+ for d in 'annotations_train.csv', 'annotations_val.csv', 'annotations_test.csv':
48
+ x = pd.read_csv(dir / 'annotations' / d, names=names).values # annotations
49
+ images, unique_images = x[:, 0], np.unique(x[:, 0])
50
+ with open((dir / d).with_suffix('.txt').__str__().replace('annotations_', ''), 'w') as f:
51
+ f.writelines(f'./images/{s}\n' for s in unique_images)
52
+ for im in tqdm(unique_images, desc=f'Converting {dir / d}'):
53
+ cls = 0 # single-class dataset
54
+ with open((dir / 'labels' / im).with_suffix('.txt'), 'a') as f:
55
+ for r in x[images == im]:
56
+ w, h = r[6], r[7] # image width, height
57
+ xywh = xyxy2xywh(np.array([[r[1] / w, r[2] / h, r[3] / w, r[4] / h]]))[0] # instance
58
+ f.write(f"{cls} {xywh[0]:.5f} {xywh[1]:.5f} {xywh[2]:.5f} {xywh[3]:.5f}\n") # write label
ultralytics/cfg/datasets/VOC.yaml ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # PASCAL VOC dataset http://host.robots.ox.ac.uk/pascal/VOC by University of Oxford
4
+ # Documentation: # Documentation: https://docs.ultralytics.com/datasets/detect/voc/
5
+ # Example usage: yolo train data=VOC.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── VOC ← downloads here (2.8 GB)
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: ../datasets/VOC
13
+ train: # train images (relative to 'path') 16551 images
14
+ - images/train2012
15
+ - images/train2007
16
+ - images/val2012
17
+ - images/val2007
18
+ val: # val images (relative to 'path') 4952 images
19
+ - images/test2007
20
+ test: # test images (optional)
21
+ - images/test2007
22
+
23
+ # Classes
24
+ names:
25
+ 0: aeroplane
26
+ 1: bicycle
27
+ 2: bird
28
+ 3: boat
29
+ 4: bottle
30
+ 5: bus
31
+ 6: car
32
+ 7: cat
33
+ 8: chair
34
+ 9: cow
35
+ 10: diningtable
36
+ 11: dog
37
+ 12: horse
38
+ 13: motorbike
39
+ 14: person
40
+ 15: pottedplant
41
+ 16: sheep
42
+ 17: sofa
43
+ 18: train
44
+ 19: tvmonitor
45
+
46
+ # Download script/URL (optional) ---------------------------------------------------------------------------------------
47
+ download: |
48
+ import xml.etree.ElementTree as ET
49
+
50
+ from tqdm import tqdm
51
+ from ultralytics.utils.downloads import download
52
+ from pathlib import Path
53
+
54
+ def convert_label(path, lb_path, year, image_id):
55
+ def convert_box(size, box):
56
+ dw, dh = 1. / size[0], 1. / size[1]
57
+ x, y, w, h = (box[0] + box[1]) / 2.0 - 1, (box[2] + box[3]) / 2.0 - 1, box[1] - box[0], box[3] - box[2]
58
+ return x * dw, y * dh, w * dw, h * dh
59
+
60
+ in_file = open(path / f'VOC{year}/Annotations/{image_id}.xml')
61
+ out_file = open(lb_path, 'w')
62
+ tree = ET.parse(in_file)
63
+ root = tree.getroot()
64
+ size = root.find('size')
65
+ w = int(size.find('width').text)
66
+ h = int(size.find('height').text)
67
+
68
+ names = list(yaml['names'].values()) # names list
69
+ for obj in root.iter('object'):
70
+ cls = obj.find('name').text
71
+ if cls in names and int(obj.find('difficult').text) != 1:
72
+ xmlbox = obj.find('bndbox')
73
+ bb = convert_box((w, h), [float(xmlbox.find(x).text) for x in ('xmin', 'xmax', 'ymin', 'ymax')])
74
+ cls_id = names.index(cls) # class id
75
+ out_file.write(" ".join(str(a) for a in (cls_id, *bb)) + '\n')
76
+
77
+
78
+ # Download
79
+ dir = Path(yaml['path']) # dataset root dir
80
+ url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
81
+ urls = [f'{url}VOCtrainval_06-Nov-2007.zip', # 446MB, 5012 images
82
+ f'{url}VOCtest_06-Nov-2007.zip', # 438MB, 4953 images
83
+ f'{url}VOCtrainval_11-May-2012.zip'] # 1.95GB, 17126 images
84
+ download(urls, dir=dir / 'images', curl=True, threads=3, exist_ok=True) # download and unzip over existing paths (required)
85
+
86
+ # Convert
87
+ path = dir / 'images/VOCdevkit'
88
+ for year, image_set in ('2012', 'train'), ('2012', 'val'), ('2007', 'train'), ('2007', 'val'), ('2007', 'test'):
89
+ imgs_path = dir / 'images' / f'{image_set}{year}'
90
+ lbs_path = dir / 'labels' / f'{image_set}{year}'
91
+ imgs_path.mkdir(exist_ok=True, parents=True)
92
+ lbs_path.mkdir(exist_ok=True, parents=True)
93
+
94
+ with open(path / f'VOC{year}/ImageSets/Main/{image_set}.txt') as f:
95
+ image_ids = f.read().strip().split()
96
+ for id in tqdm(image_ids, desc=f'{image_set}{year}'):
97
+ f = path / f'VOC{year}/JPEGImages/{id}.jpg' # old img path
98
+ lb_path = (lbs_path / f.name).with_suffix('.txt') # new label path
99
+ f.rename(imgs_path / f.name) # move image
100
+ convert_label(path, lb_path, year, id) # convert labels to YOLO format
ultralytics/cfg/datasets/VisDrone.yaml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # VisDrone2019-DET dataset https://github.com/VisDrone/VisDrone-Dataset by Tianjin University
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/visdrone/
5
+ # Example usage: yolo train data=VisDrone.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── VisDrone ← downloads here (2.3 GB)
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: ../datasets/VisDrone # dataset root dir
13
+ train: VisDrone2019-DET-train/images # train images (relative to 'path') 6471 images
14
+ val: VisDrone2019-DET-val/images # val images (relative to 'path') 548 images
15
+ test: VisDrone2019-DET-test-dev/images # test images (optional) 1610 images
16
+
17
+ # Classes
18
+ names:
19
+ 0: pedestrian
20
+ 1: people
21
+ 2: bicycle
22
+ 3: car
23
+ 4: van
24
+ 5: truck
25
+ 6: tricycle
26
+ 7: awning-tricycle
27
+ 8: bus
28
+ 9: motor
29
+
30
+ # Download script/URL (optional) ---------------------------------------------------------------------------------------
31
+ download: |
32
+ import os
33
+ from pathlib import Path
34
+
35
+ from ultralytics.utils.downloads import download
36
+
37
+ def visdrone2yolo(dir):
38
+ from PIL import Image
39
+ from tqdm import tqdm
40
+
41
+ def convert_box(size, box):
42
+ # Convert VisDrone box to YOLO xywh box
43
+ dw = 1. / size[0]
44
+ dh = 1. / size[1]
45
+ return (box[0] + box[2] / 2) * dw, (box[1] + box[3] / 2) * dh, box[2] * dw, box[3] * dh
46
+
47
+ (dir / 'labels').mkdir(parents=True, exist_ok=True) # make labels directory
48
+ pbar = tqdm((dir / 'annotations').glob('*.txt'), desc=f'Converting {dir}')
49
+ for f in pbar:
50
+ img_size = Image.open((dir / 'images' / f.name).with_suffix('.jpg')).size
51
+ lines = []
52
+ with open(f, 'r') as file: # read annotation.txt
53
+ for row in [x.split(',') for x in file.read().strip().splitlines()]:
54
+ if row[4] == '0': # VisDrone 'ignored regions' class 0
55
+ continue
56
+ cls = int(row[5]) - 1
57
+ box = convert_box(img_size, tuple(map(int, row[:4])))
58
+ lines.append(f"{cls} {' '.join(f'{x:.6f}' for x in box)}\n")
59
+ with open(str(f).replace(f'{os.sep}annotations{os.sep}', f'{os.sep}labels{os.sep}'), 'w') as fl:
60
+ fl.writelines(lines) # write label.txt
61
+
62
+
63
+ # Download
64
+ dir = Path(yaml['path']) # dataset root dir
65
+ urls = ['https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-train.zip',
66
+ 'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-val.zip',
67
+ 'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-dev.zip',
68
+ 'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-challenge.zip']
69
+ download(urls, dir=dir, curl=True, threads=4)
70
+
71
+ # Convert
72
+ for d in 'VisDrone2019-DET-train', 'VisDrone2019-DET-val', 'VisDrone2019-DET-test-dev':
73
+ visdrone2yolo(dir / d) # convert VisDrone annotations to YOLO labels
ultralytics/cfg/datasets/african-wildlife.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # African-wildlife dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/african-wildlife/
5
+ # Example usage: yolo train data=african-wildlife.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── african-wildlife ← downloads here (100 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: ../datasets/african-wildlife # dataset root dir
13
+ train: train/images # train images (relative to 'path') 1052 images
14
+ val: valid/images # val images (relative to 'path') 225 images
15
+ test: test/images # test images (relative to 'path') 227 images
16
+
17
+ # Classes
18
+ names:
19
+ 0: buffalo
20
+ 1: elephant
21
+ 2: rhino
22
+ 3: zebra
23
+
24
+ # Download script/URL (optional)
25
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/african-wildlife.zip
ultralytics/cfg/datasets/brain-tumor.yaml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Brain-tumor dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/brain-tumor/
5
+ # Example usage: yolo train data=brain-tumor.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── brain-tumor ← downloads here (4.05 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: ../datasets/brain-tumor # dataset root dir
13
+ train: train/images # train images (relative to 'path') 893 images
14
+ val: valid/images # val images (relative to 'path') 223 images
15
+ test: # test images (relative to 'path')
16
+
17
+ # Classes
18
+ names:
19
+ 0: negative
20
+ 1: positive
21
+
22
+ # Download script/URL (optional)
23
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/brain-tumor.zip
ultralytics/cfg/datasets/carparts-seg.yaml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Carparts-seg dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/segment/carparts-seg/
5
+ # Example usage: yolo train data=carparts-seg.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── carparts-seg ← downloads here (132 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: ../datasets/carparts-seg # dataset root dir
13
+ train: train/images # train images (relative to 'path') 3516 images
14
+ val: valid/images # val images (relative to 'path') 276 images
15
+ test: test/images # test images (relative to 'path') 401 images
16
+
17
+ # Classes
18
+ names:
19
+ 0: back_bumper
20
+ 1: back_door
21
+ 2: back_glass
22
+ 3: back_left_door
23
+ 4: back_left_light
24
+ 5: back_light
25
+ 6: back_right_door
26
+ 7: back_right_light
27
+ 8: front_bumper
28
+ 9: front_door
29
+ 10: front_glass
30
+ 11: front_left_door
31
+ 12: front_left_light
32
+ 13: front_light
33
+ 14: front_right_door
34
+ 15: front_right_light
35
+ 16: hood
36
+ 17: left_mirror
37
+ 18: object
38
+ 19: right_mirror
39
+ 20: tailgate
40
+ 21: trunk
41
+ 22: wheel
42
+
43
+ # Download script/URL (optional)
44
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/carparts-seg.zip
ultralytics/cfg/datasets/coco-pose.yaml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # COCO 2017 Keypoints dataset https://cocodataset.org by Microsoft
4
+ # Documentation: https://docs.ultralytics.com/datasets/pose/coco/
5
+ # Example usage: yolo train data=coco-pose.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── coco-pose ← downloads here (20.1 GB)
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: ../datasets/coco-pose # dataset root dir
13
+ train: train2017.txt # train images (relative to 'path') 56599 images
14
+ val: val2017.txt # val images (relative to 'path') 2346 images
15
+ test: test-dev2017.txt # 20288 of 40670 images, submit to https://codalab.lisn.upsaclay.fr/competitions/7403
16
+
17
+ # Keypoints
18
+ kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
19
+ flip_idx: [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]
20
+
21
+ # Classes
22
+ names:
23
+ 0: person
24
+
25
+ # Download script/URL (optional)
26
+ download: |
27
+ from ultralytics.utils.downloads import download
28
+ from pathlib import Path
29
+
30
+ # Download labels
31
+ dir = Path(yaml['path']) # dataset root dir
32
+ url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
33
+ urls = [url + 'coco2017labels-pose.zip'] # labels
34
+ download(urls, dir=dir.parent)
35
+ # Download data
36
+ urls = ['http://images.cocodataset.org/zips/train2017.zip', # 19G, 118k images
37
+ 'http://images.cocodataset.org/zips/val2017.zip', # 1G, 5k images
38
+ 'http://images.cocodataset.org/zips/test2017.zip'] # 7G, 41k images (optional)
39
+ download(urls, dir=dir / 'images', threads=3)
ultralytics/cfg/datasets/coco.yaml ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # COCO 2017 dataset https://cocodataset.org by Microsoft
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/coco/
5
+ # Example usage: yolo train data=coco.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── coco ← downloads here (20.1 GB)
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: ../datasets/coco # dataset root dir
13
+ train: train2017.txt # train images (relative to 'path') 118287 images
14
+ val: val2017.txt # val images (relative to 'path') 5000 images
15
+ test: test-dev2017.txt # 20288 of 40670 images, submit to https://competitions.codalab.org/competitions/20794
16
+
17
+ # Classes
18
+ names:
19
+ 0: person
20
+ 1: bicycle
21
+ 2: car
22
+ 3: motorcycle
23
+ 4: airplane
24
+ 5: bus
25
+ 6: train
26
+ 7: truck
27
+ 8: boat
28
+ 9: traffic light
29
+ 10: fire hydrant
30
+ 11: stop sign
31
+ 12: parking meter
32
+ 13: bench
33
+ 14: bird
34
+ 15: cat
35
+ 16: dog
36
+ 17: horse
37
+ 18: sheep
38
+ 19: cow
39
+ 20: elephant
40
+ 21: bear
41
+ 22: zebra
42
+ 23: giraffe
43
+ 24: backpack
44
+ 25: umbrella
45
+ 26: handbag
46
+ 27: tie
47
+ 28: suitcase
48
+ 29: frisbee
49
+ 30: skis
50
+ 31: snowboard
51
+ 32: sports ball
52
+ 33: kite
53
+ 34: baseball bat
54
+ 35: baseball glove
55
+ 36: skateboard
56
+ 37: surfboard
57
+ 38: tennis racket
58
+ 39: bottle
59
+ 40: wine glass
60
+ 41: cup
61
+ 42: fork
62
+ 43: knife
63
+ 44: spoon
64
+ 45: bowl
65
+ 46: banana
66
+ 47: apple
67
+ 48: sandwich
68
+ 49: orange
69
+ 50: broccoli
70
+ 51: carrot
71
+ 52: hot dog
72
+ 53: pizza
73
+ 54: donut
74
+ 55: cake
75
+ 56: chair
76
+ 57: couch
77
+ 58: potted plant
78
+ 59: bed
79
+ 60: dining table
80
+ 61: toilet
81
+ 62: tv
82
+ 63: laptop
83
+ 64: mouse
84
+ 65: remote
85
+ 66: keyboard
86
+ 67: cell phone
87
+ 68: microwave
88
+ 69: oven
89
+ 70: toaster
90
+ 71: sink
91
+ 72: refrigerator
92
+ 73: book
93
+ 74: clock
94
+ 75: vase
95
+ 76: scissors
96
+ 77: teddy bear
97
+ 78: hair drier
98
+ 79: toothbrush
99
+
100
+ # Download script/URL (optional)
101
+ download: |
102
+ from ultralytics.utils.downloads import download
103
+ from pathlib import Path
104
+
105
+ # Download labels
106
+ segments = True # segment or box labels
107
+ dir = Path(yaml['path']) # dataset root dir
108
+ url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
109
+ urls = [url + ('coco2017labels-segments.zip' if segments else 'coco2017labels.zip')] # labels
110
+ download(urls, dir=dir.parent)
111
+ # Download data
112
+ urls = ['http://images.cocodataset.org/zips/train2017.zip', # 19G, 118k images
113
+ 'http://images.cocodataset.org/zips/val2017.zip', # 1G, 5k images
114
+ 'http://images.cocodataset.org/zips/test2017.zip'] # 7G, 41k images (optional)
115
+ download(urls, dir=dir / 'images', threads=3)
ultralytics/cfg/datasets/coco128-seg.yaml ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # COCO128-seg dataset https://www.kaggle.com/datasets/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/segment/coco/
5
+ # Example usage: yolo train data=coco128.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── coco128-seg ← downloads here (7 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: ../datasets/coco128-seg # dataset root dir
13
+ train: images/train2017 # train images (relative to 'path') 128 images
14
+ val: images/train2017 # val images (relative to 'path') 128 images
15
+ test: # test images (optional)
16
+
17
+ # Classes
18
+ names:
19
+ 0: person
20
+ 1: bicycle
21
+ 2: car
22
+ 3: motorcycle
23
+ 4: airplane
24
+ 5: bus
25
+ 6: train
26
+ 7: truck
27
+ 8: boat
28
+ 9: traffic light
29
+ 10: fire hydrant
30
+ 11: stop sign
31
+ 12: parking meter
32
+ 13: bench
33
+ 14: bird
34
+ 15: cat
35
+ 16: dog
36
+ 17: horse
37
+ 18: sheep
38
+ 19: cow
39
+ 20: elephant
40
+ 21: bear
41
+ 22: zebra
42
+ 23: giraffe
43
+ 24: backpack
44
+ 25: umbrella
45
+ 26: handbag
46
+ 27: tie
47
+ 28: suitcase
48
+ 29: frisbee
49
+ 30: skis
50
+ 31: snowboard
51
+ 32: sports ball
52
+ 33: kite
53
+ 34: baseball bat
54
+ 35: baseball glove
55
+ 36: skateboard
56
+ 37: surfboard
57
+ 38: tennis racket
58
+ 39: bottle
59
+ 40: wine glass
60
+ 41: cup
61
+ 42: fork
62
+ 43: knife
63
+ 44: spoon
64
+ 45: bowl
65
+ 46: banana
66
+ 47: apple
67
+ 48: sandwich
68
+ 49: orange
69
+ 50: broccoli
70
+ 51: carrot
71
+ 52: hot dog
72
+ 53: pizza
73
+ 54: donut
74
+ 55: cake
75
+ 56: chair
76
+ 57: couch
77
+ 58: potted plant
78
+ 59: bed
79
+ 60: dining table
80
+ 61: toilet
81
+ 62: tv
82
+ 63: laptop
83
+ 64: mouse
84
+ 65: remote
85
+ 66: keyboard
86
+ 67: cell phone
87
+ 68: microwave
88
+ 69: oven
89
+ 70: toaster
90
+ 71: sink
91
+ 72: refrigerator
92
+ 73: book
93
+ 74: clock
94
+ 75: vase
95
+ 76: scissors
96
+ 77: teddy bear
97
+ 78: hair drier
98
+ 79: toothbrush
99
+
100
+ # Download script/URL (optional)
101
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco128-seg.zip
ultralytics/cfg/datasets/coco128.yaml ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # COCO128 dataset https://www.kaggle.com/datasets/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/coco/
5
+ # Example usage: yolo train data=coco128.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── coco128 ← downloads here (7 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: ../datasets/coco128 # dataset root dir
13
+ train: images/train2017 # train images (relative to 'path') 128 images
14
+ val: images/train2017 # val images (relative to 'path') 128 images
15
+ test: # test images (optional)
16
+
17
+ # Classes
18
+ names:
19
+ 0: person
20
+ 1: bicycle
21
+ 2: car
22
+ 3: motorcycle
23
+ 4: airplane
24
+ 5: bus
25
+ 6: train
26
+ 7: truck
27
+ 8: boat
28
+ 9: traffic light
29
+ 10: fire hydrant
30
+ 11: stop sign
31
+ 12: parking meter
32
+ 13: bench
33
+ 14: bird
34
+ 15: cat
35
+ 16: dog
36
+ 17: horse
37
+ 18: sheep
38
+ 19: cow
39
+ 20: elephant
40
+ 21: bear
41
+ 22: zebra
42
+ 23: giraffe
43
+ 24: backpack
44
+ 25: umbrella
45
+ 26: handbag
46
+ 27: tie
47
+ 28: suitcase
48
+ 29: frisbee
49
+ 30: skis
50
+ 31: snowboard
51
+ 32: sports ball
52
+ 33: kite
53
+ 34: baseball bat
54
+ 35: baseball glove
55
+ 36: skateboard
56
+ 37: surfboard
57
+ 38: tennis racket
58
+ 39: bottle
59
+ 40: wine glass
60
+ 41: cup
61
+ 42: fork
62
+ 43: knife
63
+ 44: spoon
64
+ 45: bowl
65
+ 46: banana
66
+ 47: apple
67
+ 48: sandwich
68
+ 49: orange
69
+ 50: broccoli
70
+ 51: carrot
71
+ 52: hot dog
72
+ 53: pizza
73
+ 54: donut
74
+ 55: cake
75
+ 56: chair
76
+ 57: couch
77
+ 58: potted plant
78
+ 59: bed
79
+ 60: dining table
80
+ 61: toilet
81
+ 62: tv
82
+ 63: laptop
83
+ 64: mouse
84
+ 65: remote
85
+ 66: keyboard
86
+ 67: cell phone
87
+ 68: microwave
88
+ 69: oven
89
+ 70: toaster
90
+ 71: sink
91
+ 72: refrigerator
92
+ 73: book
93
+ 74: clock
94
+ 75: vase
95
+ 76: scissors
96
+ 77: teddy bear
97
+ 78: hair drier
98
+ 79: toothbrush
99
+
100
+ # Download script/URL (optional)
101
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco128.zip
ultralytics/cfg/datasets/coco8-pose.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # COCO8-pose dataset (first 8 images from COCO train2017) by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/pose/coco8-pose/
5
+ # Example usage: yolo train data=coco8-pose.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── coco8-pose ← downloads here (1 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: ../datasets/coco8-pose # dataset root dir
13
+ train: images/train # train images (relative to 'path') 4 images
14
+ val: images/val # val images (relative to 'path') 4 images
15
+ test: # test images (optional)
16
+
17
+ # Keypoints
18
+ kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
19
+ flip_idx: [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]
20
+
21
+ # Classes
22
+ names:
23
+ 0: person
24
+
25
+ # Download script/URL (optional)
26
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco8-pose.zip
ultralytics/cfg/datasets/coco8-seg.yaml ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # COCO8-seg dataset (first 8 images from COCO train2017) by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/segment/coco8-seg/
5
+ # Example usage: yolo train data=coco8-seg.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── coco8-seg ← downloads here (1 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: ../datasets/coco8-seg # dataset root dir
13
+ train: images/train # train images (relative to 'path') 4 images
14
+ val: images/val # val images (relative to 'path') 4 images
15
+ test: # test images (optional)
16
+
17
+ # Classes
18
+ names:
19
+ 0: person
20
+ 1: bicycle
21
+ 2: car
22
+ 3: motorcycle
23
+ 4: airplane
24
+ 5: bus
25
+ 6: train
26
+ 7: truck
27
+ 8: boat
28
+ 9: traffic light
29
+ 10: fire hydrant
30
+ 11: stop sign
31
+ 12: parking meter
32
+ 13: bench
33
+ 14: bird
34
+ 15: cat
35
+ 16: dog
36
+ 17: horse
37
+ 18: sheep
38
+ 19: cow
39
+ 20: elephant
40
+ 21: bear
41
+ 22: zebra
42
+ 23: giraffe
43
+ 24: backpack
44
+ 25: umbrella
45
+ 26: handbag
46
+ 27: tie
47
+ 28: suitcase
48
+ 29: frisbee
49
+ 30: skis
50
+ 31: snowboard
51
+ 32: sports ball
52
+ 33: kite
53
+ 34: baseball bat
54
+ 35: baseball glove
55
+ 36: skateboard
56
+ 37: surfboard
57
+ 38: tennis racket
58
+ 39: bottle
59
+ 40: wine glass
60
+ 41: cup
61
+ 42: fork
62
+ 43: knife
63
+ 44: spoon
64
+ 45: bowl
65
+ 46: banana
66
+ 47: apple
67
+ 48: sandwich
68
+ 49: orange
69
+ 50: broccoli
70
+ 51: carrot
71
+ 52: hot dog
72
+ 53: pizza
73
+ 54: donut
74
+ 55: cake
75
+ 56: chair
76
+ 57: couch
77
+ 58: potted plant
78
+ 59: bed
79
+ 60: dining table
80
+ 61: toilet
81
+ 62: tv
82
+ 63: laptop
83
+ 64: mouse
84
+ 65: remote
85
+ 66: keyboard
86
+ 67: cell phone
87
+ 68: microwave
88
+ 69: oven
89
+ 70: toaster
90
+ 71: sink
91
+ 72: refrigerator
92
+ 73: book
93
+ 74: clock
94
+ 75: vase
95
+ 76: scissors
96
+ 77: teddy bear
97
+ 78: hair drier
98
+ 79: toothbrush
99
+
100
+ # Download script/URL (optional)
101
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco8-seg.zip
ultralytics/cfg/datasets/coco8.yaml ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # COCO8 dataset (first 8 images from COCO train2017) by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/coco8/
5
+ # Example usage: yolo train data=coco8.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── coco8 ← downloads here (1 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: ../datasets/coco8 # dataset root dir
13
+ train: images/train # train images (relative to 'path') 4 images
14
+ val: images/val # val images (relative to 'path') 4 images
15
+ test: # test images (optional)
16
+
17
+ # Classes
18
+ names:
19
+ 0: person
20
+ 1: bicycle
21
+ 2: car
22
+ 3: motorcycle
23
+ 4: airplane
24
+ 5: bus
25
+ 6: train
26
+ 7: truck
27
+ 8: boat
28
+ 9: traffic light
29
+ 10: fire hydrant
30
+ 11: stop sign
31
+ 12: parking meter
32
+ 13: bench
33
+ 14: bird
34
+ 15: cat
35
+ 16: dog
36
+ 17: horse
37
+ 18: sheep
38
+ 19: cow
39
+ 20: elephant
40
+ 21: bear
41
+ 22: zebra
42
+ 23: giraffe
43
+ 24: backpack
44
+ 25: umbrella
45
+ 26: handbag
46
+ 27: tie
47
+ 28: suitcase
48
+ 29: frisbee
49
+ 30: skis
50
+ 31: snowboard
51
+ 32: sports ball
52
+ 33: kite
53
+ 34: baseball bat
54
+ 35: baseball glove
55
+ 36: skateboard
56
+ 37: surfboard
57
+ 38: tennis racket
58
+ 39: bottle
59
+ 40: wine glass
60
+ 41: cup
61
+ 42: fork
62
+ 43: knife
63
+ 44: spoon
64
+ 45: bowl
65
+ 46: banana
66
+ 47: apple
67
+ 48: sandwich
68
+ 49: orange
69
+ 50: broccoli
70
+ 51: carrot
71
+ 52: hot dog
72
+ 53: pizza
73
+ 54: donut
74
+ 55: cake
75
+ 56: chair
76
+ 57: couch
77
+ 58: potted plant
78
+ 59: bed
79
+ 60: dining table
80
+ 61: toilet
81
+ 62: tv
82
+ 63: laptop
83
+ 64: mouse
84
+ 65: remote
85
+ 66: keyboard
86
+ 67: cell phone
87
+ 68: microwave
88
+ 69: oven
89
+ 70: toaster
90
+ 71: sink
91
+ 72: refrigerator
92
+ 73: book
93
+ 74: clock
94
+ 75: vase
95
+ 76: scissors
96
+ 77: teddy bear
97
+ 78: hair drier
98
+ 79: toothbrush
99
+
100
+ # Download script/URL (optional)
101
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco8.zip
ultralytics/cfg/datasets/crack-seg.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Crack-seg dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/segment/crack-seg/
5
+ # Example usage: yolo train data=crack-seg.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── crack-seg ← downloads here (91.2 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: ../datasets/crack-seg # dataset root dir
13
+ train: train/images # train images (relative to 'path') 3717 images
14
+ val: valid/images # val images (relative to 'path') 112 images
15
+ test: test/images # test images (relative to 'path') 200 images
16
+
17
+ # Classes
18
+ names:
19
+ 0: crack
20
+
21
+ # Download script/URL (optional)
22
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/crack-seg.zip
ultralytics/cfg/datasets/dog-pose.yaml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Dogs dataset http://vision.stanford.edu/aditya86/ImageNetDogs/ by Stanford
4
+ # Documentation: https://docs.ultralytics.com/datasets/pose/dog-pose/
5
+ # Example usage: yolo train data=dog-pose.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── dog-pose ← downloads here (337 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: ../datasets/dog-pose # dataset root dir
13
+ train: train # train images (relative to 'path') 6773 images
14
+ val: val # val images (relative to 'path') 1703 images
15
+
16
+ # Keypoints
17
+ kpt_shape: [24, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
18
+
19
+ # Classes
20
+ names:
21
+ 0: dog
22
+
23
+ # Download script/URL (optional)
24
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/dog-pose.zip
ultralytics/cfg/datasets/dota8.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # DOTA8 dataset 8 images from split DOTAv1 dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/obb/dota8/
5
+ # Example usage: yolo train model=yolov8n-obb.pt data=dota8.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── dota8 ← downloads here (1MB)
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: ../datasets/dota8 # dataset root dir
13
+ train: images/train # train images (relative to 'path') 4 images
14
+ val: images/val # val images (relative to 'path') 4 images
15
+
16
+ # Classes for DOTA 1.0
17
+ names:
18
+ 0: plane
19
+ 1: ship
20
+ 2: storage tank
21
+ 3: baseball diamond
22
+ 4: tennis court
23
+ 5: basketball court
24
+ 6: ground track field
25
+ 7: harbor
26
+ 8: bridge
27
+ 9: large vehicle
28
+ 10: small vehicle
29
+ 11: helicopter
30
+ 12: roundabout
31
+ 13: soccer ball field
32
+ 14: swimming pool
33
+
34
+ # Download script/URL (optional)
35
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/dota8.zip
ultralytics/cfg/datasets/hand-keypoints.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Hand Keypoints dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/pose/hand-keypoints/
5
+ # Example usage: yolo train data=hand-keypoints.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── hand-keypoints ← downloads here (369 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: ../datasets/hand-keypoints # dataset root dir
13
+ train: train # train images (relative to 'path') 18776 images
14
+ val: val # val images (relative to 'path') 7992 images
15
+
16
+ # Keypoints
17
+ kpt_shape: [21, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
18
+ flip_idx:
19
+ [0, 1, 2, 4, 3, 10, 11, 12, 13, 14, 5, 6, 7, 8, 9, 15, 16, 17, 18, 19, 20]
20
+
21
+ # Classes
22
+ names:
23
+ 0: hand
24
+
25
+ # Download script/URL (optional)
26
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/hand-keypoints.zip
ultralytics/cfg/datasets/lvis.yaml ADDED
@@ -0,0 +1,1236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # LVIS dataset http://www.lvisdataset.org by Facebook AI Research.
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/lvis/
5
+ # Example usage: yolo train data=lvis.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── lvis ← downloads here (20.1 GB)
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: ../datasets/lvis # dataset root dir
13
+ train: train.txt # train images (relative to 'path') 100170 images
14
+ val: val.txt # val images (relative to 'path') 19809 images
15
+ minival: minival.txt # minival images (relative to 'path') 5000 images
16
+
17
+ names:
18
+ 0: aerosol can/spray can
19
+ 1: air conditioner
20
+ 2: airplane/aeroplane
21
+ 3: alarm clock
22
+ 4: alcohol/alcoholic beverage
23
+ 5: alligator/gator
24
+ 6: almond
25
+ 7: ambulance
26
+ 8: amplifier
27
+ 9: anklet/ankle bracelet
28
+ 10: antenna/aerial/transmitting aerial
29
+ 11: apple
30
+ 12: applesauce
31
+ 13: apricot
32
+ 14: apron
33
+ 15: aquarium/fish tank
34
+ 16: arctic/arctic type of shoe/galosh/golosh/rubber/rubber type of shoe/gumshoe
35
+ 17: armband
36
+ 18: armchair
37
+ 19: armoire
38
+ 20: armor/armour
39
+ 21: artichoke
40
+ 22: trash can/garbage can/wastebin/dustbin/trash barrel/trash bin
41
+ 23: ashtray
42
+ 24: asparagus
43
+ 25: atomizer/atomiser/spray/sprayer/nebulizer/nebuliser
44
+ 26: avocado
45
+ 27: award/accolade
46
+ 28: awning
47
+ 29: ax/axe
48
+ 30: baboon
49
+ 31: baby buggy/baby carriage/perambulator/pram/stroller
50
+ 32: basketball backboard
51
+ 33: backpack/knapsack/packsack/rucksack/haversack
52
+ 34: handbag/purse/pocketbook
53
+ 35: suitcase/baggage/luggage
54
+ 36: bagel/beigel
55
+ 37: bagpipe
56
+ 38: baguet/baguette
57
+ 39: bait/lure
58
+ 40: ball
59
+ 41: ballet skirt/tutu
60
+ 42: balloon
61
+ 43: bamboo
62
+ 44: banana
63
+ 45: Band Aid
64
+ 46: bandage
65
+ 47: bandanna/bandana
66
+ 48: banjo
67
+ 49: banner/streamer
68
+ 50: barbell
69
+ 51: barge
70
+ 52: barrel/cask
71
+ 53: barrette
72
+ 54: barrow/garden cart/lawn cart/wheelbarrow
73
+ 55: baseball base
74
+ 56: baseball
75
+ 57: baseball bat
76
+ 58: baseball cap/jockey cap/golf cap
77
+ 59: baseball glove/baseball mitt
78
+ 60: basket/handbasket
79
+ 61: basketball
80
+ 62: bass horn/sousaphone/tuba
81
+ 63: bat/bat animal
82
+ 64: bath mat
83
+ 65: bath towel
84
+ 66: bathrobe
85
+ 67: bathtub/bathing tub
86
+ 68: batter/batter food
87
+ 69: battery
88
+ 70: beachball
89
+ 71: bead
90
+ 72: bean curd/tofu
91
+ 73: beanbag
92
+ 74: beanie/beany
93
+ 75: bear
94
+ 76: bed
95
+ 77: bedpan
96
+ 78: bedspread/bedcover/bed covering/counterpane/spread
97
+ 79: cow
98
+ 80: beef/beef food/boeuf/boeuf food
99
+ 81: beeper/pager
100
+ 82: beer bottle
101
+ 83: beer can
102
+ 84: beetle
103
+ 85: bell
104
+ 86: bell pepper/capsicum
105
+ 87: belt
106
+ 88: belt buckle
107
+ 89: bench
108
+ 90: beret
109
+ 91: bib
110
+ 92: Bible
111
+ 93: bicycle/bike/bike bicycle
112
+ 94: visor/vizor
113
+ 95: billboard
114
+ 96: binder/ring-binder
115
+ 97: binoculars/field glasses/opera glasses
116
+ 98: bird
117
+ 99: birdfeeder
118
+ 100: birdbath
119
+ 101: birdcage
120
+ 102: birdhouse
121
+ 103: birthday cake
122
+ 104: birthday card
123
+ 105: pirate flag
124
+ 106: black sheep
125
+ 107: blackberry
126
+ 108: blackboard/chalkboard
127
+ 109: blanket
128
+ 110: blazer/sport jacket/sport coat/sports jacket/sports coat
129
+ 111: blender/liquidizer/liquidiser
130
+ 112: blimp
131
+ 113: blinker/flasher
132
+ 114: blouse
133
+ 115: blueberry
134
+ 116: gameboard
135
+ 117: boat/ship/ship boat
136
+ 118: bob/bobber/bobfloat
137
+ 119: bobbin/spool/reel
138
+ 120: bobby pin/hairgrip
139
+ 121: boiled egg/coddled egg
140
+ 122: bolo tie/bolo/bola tie/bola
141
+ 123: deadbolt
142
+ 124: bolt
143
+ 125: bonnet
144
+ 126: book
145
+ 127: bookcase
146
+ 128: booklet/brochure/leaflet/pamphlet
147
+ 129: bookmark/bookmarker
148
+ 130: boom microphone/microphone boom
149
+ 131: boot
150
+ 132: bottle
151
+ 133: bottle opener
152
+ 134: bouquet
153
+ 135: bow/bow weapon
154
+ 136: bow/bow decorative ribbons
155
+ 137: bow-tie/bowtie
156
+ 138: bowl
157
+ 139: pipe bowl
158
+ 140: bowler hat/bowler/derby hat/derby/plug hat
159
+ 141: bowling ball
160
+ 142: box
161
+ 143: boxing glove
162
+ 144: suspenders
163
+ 145: bracelet/bangle
164
+ 146: brass plaque
165
+ 147: brassiere/bra/bandeau
166
+ 148: bread-bin/breadbox
167
+ 149: bread
168
+ 150: breechcloth/breechclout/loincloth
169
+ 151: bridal gown/wedding gown/wedding dress
170
+ 152: briefcase
171
+ 153: broccoli
172
+ 154: broach
173
+ 155: broom
174
+ 156: brownie
175
+ 157: brussels sprouts
176
+ 158: bubble gum
177
+ 159: bucket/pail
178
+ 160: horse buggy
179
+ 161: horned cow
180
+ 162: bulldog
181
+ 163: bulldozer/dozer
182
+ 164: bullet train
183
+ 165: bulletin board/notice board
184
+ 166: bulletproof vest
185
+ 167: bullhorn/megaphone
186
+ 168: bun/roll
187
+ 169: bunk bed
188
+ 170: buoy
189
+ 171: burrito
190
+ 172: bus/bus vehicle/autobus/charabanc/double-decker/motorbus/motorcoach
191
+ 173: business card
192
+ 174: butter
193
+ 175: butterfly
194
+ 176: button
195
+ 177: cab/cab taxi/taxi/taxicab
196
+ 178: cabana
197
+ 179: cabin car/caboose
198
+ 180: cabinet
199
+ 181: locker/storage locker
200
+ 182: cake
201
+ 183: calculator
202
+ 184: calendar
203
+ 185: calf
204
+ 186: camcorder
205
+ 187: camel
206
+ 188: camera
207
+ 189: camera lens
208
+ 190: camper/camper vehicle/camping bus/motor home
209
+ 191: can/tin can
210
+ 192: can opener/tin opener
211
+ 193: candle/candlestick
212
+ 194: candle holder
213
+ 195: candy bar
214
+ 196: candy cane
215
+ 197: walking cane
216
+ 198: canister/canister
217
+ 199: canoe
218
+ 200: cantaloup/cantaloupe
219
+ 201: canteen
220
+ 202: cap/cap headwear
221
+ 203: bottle cap/cap/cap container lid
222
+ 204: cape
223
+ 205: cappuccino/coffee cappuccino
224
+ 206: car/car automobile/auto/auto automobile/automobile
225
+ 207: railcar/railcar part of a train/railway car/railway car part of a train/railroad car/railroad car part of a train
226
+ 208: elevator car
227
+ 209: car battery/automobile battery
228
+ 210: identity card
229
+ 211: card
230
+ 212: cardigan
231
+ 213: cargo ship/cargo vessel
232
+ 214: carnation
233
+ 215: horse carriage
234
+ 216: carrot
235
+ 217: tote bag
236
+ 218: cart
237
+ 219: carton
238
+ 220: cash register/register/register for cash transactions
239
+ 221: casserole
240
+ 222: cassette
241
+ 223: cast/plaster cast/plaster bandage
242
+ 224: cat
243
+ 225: cauliflower
244
+ 226: cayenne/cayenne spice/cayenne pepper/cayenne pepper spice/red pepper/red pepper spice
245
+ 227: CD player
246
+ 228: celery
247
+ 229: cellular telephone/cellular phone/cellphone/mobile phone/smart phone
248
+ 230: chain mail/ring mail/chain armor/chain armour/ring armor/ring armour
249
+ 231: chair
250
+ 232: chaise longue/chaise/daybed
251
+ 233: chalice
252
+ 234: chandelier
253
+ 235: chap
254
+ 236: checkbook/chequebook
255
+ 237: checkerboard
256
+ 238: cherry
257
+ 239: chessboard
258
+ 240: chicken/chicken animal
259
+ 241: chickpea/garbanzo
260
+ 242: chili/chili vegetable/chili pepper/chili pepper vegetable/chilli/chilli vegetable/chilly/chilly vegetable/chile/chile vegetable
261
+ 243: chime/gong
262
+ 244: chinaware
263
+ 245: crisp/crisp potato chip/potato chip
264
+ 246: poker chip
265
+ 247: chocolate bar
266
+ 248: chocolate cake
267
+ 249: chocolate milk
268
+ 250: chocolate mousse
269
+ 251: choker/collar/neckband
270
+ 252: chopping board/cutting board/chopping block
271
+ 253: chopstick
272
+ 254: Christmas tree
273
+ 255: slide
274
+ 256: cider/cyder
275
+ 257: cigar box
276
+ 258: cigarette
277
+ 259: cigarette case/cigarette pack
278
+ 260: cistern/water tank
279
+ 261: clarinet
280
+ 262: clasp
281
+ 263: cleansing agent/cleanser/cleaner
282
+ 264: cleat/cleat for securing rope
283
+ 265: clementine
284
+ 266: clip
285
+ 267: clipboard
286
+ 268: clippers/clippers for plants
287
+ 269: cloak
288
+ 270: clock/timepiece/timekeeper
289
+ 271: clock tower
290
+ 272: clothes hamper/laundry basket/clothes basket
291
+ 273: clothespin/clothes peg
292
+ 274: clutch bag
293
+ 275: coaster
294
+ 276: coat
295
+ 277: coat hanger/clothes hanger/dress hanger
296
+ 278: coatrack/hatrack
297
+ 279: cock/rooster
298
+ 280: cockroach
299
+ 281: cocoa/cocoa beverage/hot chocolate/hot chocolate beverage/drinking chocolate
300
+ 282: coconut/cocoanut
301
+ 283: coffee maker/coffee machine
302
+ 284: coffee table/cocktail table
303
+ 285: coffeepot
304
+ 286: coil
305
+ 287: coin
306
+ 288: colander/cullender
307
+ 289: coleslaw/slaw
308
+ 290: coloring material/colouring material
309
+ 291: combination lock
310
+ 292: pacifier/teething ring
311
+ 293: comic book
312
+ 294: compass
313
+ 295: computer keyboard/keyboard/keyboard computer
314
+ 296: condiment
315
+ 297: cone/traffic cone
316
+ 298: control/controller
317
+ 299: convertible/convertible automobile
318
+ 300: sofa bed
319
+ 301: cooker
320
+ 302: cookie/cooky/biscuit/biscuit cookie
321
+ 303: cooking utensil
322
+ 304: cooler/cooler for food/ice chest
323
+ 305: cork/cork bottle plug/bottle cork
324
+ 306: corkboard
325
+ 307: corkscrew/bottle screw
326
+ 308: edible corn/corn/maize
327
+ 309: cornbread
328
+ 310: cornet/horn/trumpet
329
+ 311: cornice/valance/valance board/pelmet
330
+ 312: cornmeal
331
+ 313: corset/girdle
332
+ 314: costume
333
+ 315: cougar/puma/catamount/mountain lion/panther
334
+ 316: coverall
335
+ 317: cowbell
336
+ 318: cowboy hat/ten-gallon hat
337
+ 319: crab/crab animal
338
+ 320: crabmeat
339
+ 321: cracker
340
+ 322: crape/crepe/French pancake
341
+ 323: crate
342
+ 324: crayon/wax crayon
343
+ 325: cream pitcher
344
+ 326: crescent roll/croissant
345
+ 327: crib/cot
346
+ 328: crock pot/earthenware jar
347
+ 329: crossbar
348
+ 330: crouton
349
+ 331: crow
350
+ 332: crowbar/wrecking bar/pry bar
351
+ 333: crown
352
+ 334: crucifix
353
+ 335: cruise ship/cruise liner
354
+ 336: police cruiser/patrol car/police car/squad car
355
+ 337: crumb
356
+ 338: crutch
357
+ 339: cub/cub animal
358
+ 340: cube/square block
359
+ 341: cucumber/cuke
360
+ 342: cufflink
361
+ 343: cup
362
+ 344: trophy cup
363
+ 345: cupboard/closet
364
+ 346: cupcake
365
+ 347: hair curler/hair roller/hair crimper
366
+ 348: curling iron
367
+ 349: curtain/drapery
368
+ 350: cushion
369
+ 351: cylinder
370
+ 352: cymbal
371
+ 353: dagger
372
+ 354: dalmatian
373
+ 355: dartboard
374
+ 356: date/date fruit
375
+ 357: deck chair/beach chair
376
+ 358: deer/cervid
377
+ 359: dental floss/floss
378
+ 360: desk
379
+ 361: detergent
380
+ 362: diaper
381
+ 363: diary/journal
382
+ 364: die/dice
383
+ 365: dinghy/dory/rowboat
384
+ 366: dining table
385
+ 367: tux/tuxedo
386
+ 368: dish
387
+ 369: dish antenna
388
+ 370: dishrag/dishcloth
389
+ 371: dishtowel/tea towel
390
+ 372: dishwasher/dishwashing machine
391
+ 373: dishwasher detergent/dishwashing detergent/dishwashing liquid/dishsoap
392
+ 374: dispenser
393
+ 375: diving board
394
+ 376: Dixie cup/paper cup
395
+ 377: dog
396
+ 378: dog collar
397
+ 379: doll
398
+ 380: dollar/dollar bill/one dollar bill
399
+ 381: dollhouse/doll's house
400
+ 382: dolphin
401
+ 383: domestic ass/donkey
402
+ 384: doorknob/doorhandle
403
+ 385: doormat/welcome mat
404
+ 386: doughnut/donut
405
+ 387: dove
406
+ 388: dragonfly
407
+ 389: drawer
408
+ 390: underdrawers/boxers/boxershorts
409
+ 391: dress/frock
410
+ 392: dress hat/high hat/opera hat/silk hat/top hat
411
+ 393: dress suit
412
+ 394: dresser
413
+ 395: drill
414
+ 396: drone
415
+ 397: dropper/eye dropper
416
+ 398: drum/drum musical instrument
417
+ 399: drumstick
418
+ 400: duck
419
+ 401: duckling
420
+ 402: duct tape
421
+ 403: duffel bag/duffle bag/duffel/duffle
422
+ 404: dumbbell
423
+ 405: dumpster
424
+ 406: dustpan
425
+ 407: eagle
426
+ 408: earphone/earpiece/headphone
427
+ 409: earplug
428
+ 410: earring
429
+ 411: easel
430
+ 412: eclair
431
+ 413: eel
432
+ 414: egg/eggs
433
+ 415: egg roll/spring roll
434
+ 416: egg yolk/yolk/yolk egg
435
+ 417: eggbeater/eggwhisk
436
+ 418: eggplant/aubergine
437
+ 419: electric chair
438
+ 420: refrigerator
439
+ 421: elephant
440
+ 422: elk/moose
441
+ 423: envelope
442
+ 424: eraser
443
+ 425: escargot
444
+ 426: eyepatch
445
+ 427: falcon
446
+ 428: fan
447
+ 429: faucet/spigot/tap
448
+ 430: fedora
449
+ 431: ferret
450
+ 432: Ferris wheel
451
+ 433: ferry/ferryboat
452
+ 434: fig/fig fruit
453
+ 435: fighter jet/fighter aircraft/attack aircraft
454
+ 436: figurine
455
+ 437: file cabinet/filing cabinet
456
+ 438: file/file tool
457
+ 439: fire alarm/smoke alarm
458
+ 440: fire engine/fire truck
459
+ 441: fire extinguisher/extinguisher
460
+ 442: fire hose
461
+ 443: fireplace
462
+ 444: fireplug/fire hydrant/hydrant
463
+ 445: first-aid kit
464
+ 446: fish
465
+ 447: fish/fish food
466
+ 448: fishbowl/goldfish bowl
467
+ 449: fishing rod/fishing pole
468
+ 450: flag
469
+ 451: flagpole/flagstaff
470
+ 452: flamingo
471
+ 453: flannel
472
+ 454: flap
473
+ 455: flash/flashbulb
474
+ 456: flashlight/torch
475
+ 457: fleece
476
+ 458: flip-flop/flip-flop sandal
477
+ 459: flipper/flipper footwear/fin/fin footwear
478
+ 460: flower arrangement/floral arrangement
479
+ 461: flute glass/champagne flute
480
+ 462: foal
481
+ 463: folding chair
482
+ 464: food processor
483
+ 465: football/football American
484
+ 466: football helmet
485
+ 467: footstool/footrest
486
+ 468: fork
487
+ 469: forklift
488
+ 470: freight car
489
+ 471: French toast
490
+ 472: freshener/air freshener
491
+ 473: frisbee
492
+ 474: frog/toad/toad frog
493
+ 475: fruit juice
494
+ 476: frying pan/frypan/skillet
495
+ 477: fudge
496
+ 478: funnel
497
+ 479: futon
498
+ 480: gag/muzzle
499
+ 481: garbage
500
+ 482: garbage truck
501
+ 483: garden hose
502
+ 484: gargle/mouthwash
503
+ 485: gargoyle
504
+ 486: garlic/ail
505
+ 487: gasmask/respirator/gas helmet
506
+ 488: gazelle
507
+ 489: gelatin/jelly
508
+ 490: gemstone
509
+ 491: generator
510
+ 492: giant panda/panda/panda bear
511
+ 493: gift wrap
512
+ 494: ginger/gingerroot
513
+ 495: giraffe
514
+ 496: cincture/sash/waistband/waistcloth
515
+ 497: glass/glass drink container/drinking glass
516
+ 498: globe
517
+ 499: glove
518
+ 500: goat
519
+ 501: goggles
520
+ 502: goldfish
521
+ 503: golf club/golf-club
522
+ 504: golfcart
523
+ 505: gondola/gondola boat
524
+ 506: goose
525
+ 507: gorilla
526
+ 508: gourd
527
+ 509: grape
528
+ 510: grater
529
+ 511: gravestone/headstone/tombstone
530
+ 512: gravy boat/gravy holder
531
+ 513: green bean
532
+ 514: green onion/spring onion/scallion
533
+ 515: griddle
534
+ 516: grill/grille/grillwork/radiator grille
535
+ 517: grits/hominy grits
536
+ 518: grizzly/grizzly bear
537
+ 519: grocery bag
538
+ 520: guitar
539
+ 521: gull/seagull
540
+ 522: gun
541
+ 523: hairbrush
542
+ 524: hairnet
543
+ 525: hairpin
544
+ 526: halter top
545
+ 527: ham/jambon/gammon
546
+ 528: hamburger/beefburger/burger
547
+ 529: hammer
548
+ 530: hammock
549
+ 531: hamper
550
+ 532: hamster
551
+ 533: hair dryer
552
+ 534: hand glass/hand mirror
553
+ 535: hand towel/face towel
554
+ 536: handcart/pushcart/hand truck
555
+ 537: handcuff
556
+ 538: handkerchief
557
+ 539: handle/grip/handgrip
558
+ 540: handsaw/carpenter's saw
559
+ 541: hardback book/hardcover book
560
+ 542: harmonium/organ/organ musical instrument/reed organ/reed organ musical instrument
561
+ 543: hat
562
+ 544: hatbox
563
+ 545: veil
564
+ 546: headband
565
+ 547: headboard
566
+ 548: headlight/headlamp
567
+ 549: headscarf
568
+ 550: headset
569
+ 551: headstall/headstall for horses/headpiece/headpiece for horses
570
+ 552: heart
571
+ 553: heater/warmer
572
+ 554: helicopter
573
+ 555: helmet
574
+ 556: heron
575
+ 557: highchair/feeding chair
576
+ 558: hinge
577
+ 559: hippopotamus
578
+ 560: hockey stick
579
+ 561: hog/pig
580
+ 562: home plate/home plate baseball/home base/home base baseball
581
+ 563: honey
582
+ 564: fume hood/exhaust hood
583
+ 565: hook
584
+ 566: hookah/narghile/nargileh/sheesha/shisha/water pipe
585
+ 567: hornet
586
+ 568: horse
587
+ 569: hose/hosepipe
588
+ 570: hot-air balloon
589
+ 571: hotplate
590
+ 572: hot sauce
591
+ 573: hourglass
592
+ 574: houseboat
593
+ 575: hummingbird
594
+ 576: hummus/humus/hommos/hoummos/humous
595
+ 577: polar bear
596
+ 578: icecream
597
+ 579: popsicle
598
+ 580: ice maker
599
+ 581: ice pack/ice bag
600
+ 582: ice skate
601
+ 583: igniter/ignitor/lighter
602
+ 584: inhaler/inhalator
603
+ 585: iPod
604
+ 586: iron/iron for clothing/smoothing iron/smoothing iron for clothing
605
+ 587: ironing board
606
+ 588: jacket
607
+ 589: jam
608
+ 590: jar
609
+ 591: jean/blue jean/denim
610
+ 592: jeep/landrover
611
+ 593: jelly bean/jelly egg
612
+ 594: jersey/T-shirt/tee shirt
613
+ 595: jet plane/jet-propelled plane
614
+ 596: jewel/gem/precious stone
615
+ 597: jewelry/jewellery
616
+ 598: joystick
617
+ 599: jumpsuit
618
+ 600: kayak
619
+ 601: keg
620
+ 602: kennel/doghouse
621
+ 603: kettle/boiler
622
+ 604: key
623
+ 605: keycard
624
+ 606: kilt
625
+ 607: kimono
626
+ 608: kitchen sink
627
+ 609: kitchen table
628
+ 610: kite
629
+ 611: kitten/kitty
630
+ 612: kiwi fruit
631
+ 613: knee pad
632
+ 614: knife
633
+ 615: knitting needle
634
+ 616: knob
635
+ 617: knocker/knocker on a door/doorknocker
636
+ 618: koala/koala bear
637
+ 619: lab coat/laboratory coat
638
+ 620: ladder
639
+ 621: ladle
640
+ 622: ladybug/ladybeetle/ladybird beetle
641
+ 623: lamb/lamb animal
642
+ 624: lamb-chop/lambchop
643
+ 625: lamp
644
+ 626: lamppost
645
+ 627: lampshade
646
+ 628: lantern
647
+ 629: lanyard/laniard
648
+ 630: laptop computer/notebook computer
649
+ 631: lasagna/lasagne
650
+ 632: latch
651
+ 633: lawn mower
652
+ 634: leather
653
+ 635: legging/legging clothing/leging/leging clothing/leg covering
654
+ 636: Lego/Lego set
655
+ 637: legume
656
+ 638: lemon
657
+ 639: lemonade
658
+ 640: lettuce
659
+ 641: license plate/numberplate
660
+ 642: life buoy/lifesaver/life belt/life ring
661
+ 643: life jacket/life vest
662
+ 644: lightbulb
663
+ 645: lightning rod/lightning conductor
664
+ 646: lime
665
+ 647: limousine
666
+ 648: lion
667
+ 649: lip balm
668
+ 650: liquor/spirits/hard liquor/liqueur/cordial
669
+ 651: lizard
670
+ 652: log
671
+ 653: lollipop
672
+ 654: speaker/speaker stereo equipment
673
+ 655: loveseat
674
+ 656: machine gun
675
+ 657: magazine
676
+ 658: magnet
677
+ 659: mail slot
678
+ 660: mailbox/mailbox at home/letter box/letter box at home
679
+ 661: mallard
680
+ 662: mallet
681
+ 663: mammoth
682
+ 664: manatee
683
+ 665: mandarin orange
684
+ 666: manager/through
685
+ 667: manhole
686
+ 668: map
687
+ 669: marker
688
+ 670: martini
689
+ 671: mascot
690
+ 672: mashed potato
691
+ 673: masher
692
+ 674: mask/facemask
693
+ 675: mast
694
+ 676: mat/mat gym equipment/gym mat
695
+ 677: matchbox
696
+ 678: mattress
697
+ 679: measuring cup
698
+ 680: measuring stick/ruler/ruler measuring stick/measuring rod
699
+ 681: meatball
700
+ 682: medicine
701
+ 683: melon
702
+ 684: microphone
703
+ 685: microscope
704
+ 686: microwave oven
705
+ 687: milestone/milepost
706
+ 688: milk
707
+ 689: milk can
708
+ 690: milkshake
709
+ 691: minivan
710
+ 692: mint candy
711
+ 693: mirror
712
+ 694: mitten
713
+ 695: mixer/mixer kitchen tool/stand mixer
714
+ 696: money
715
+ 697: monitor/monitor computer equipment
716
+ 698: monkey
717
+ 699: motor
718
+ 700: motor scooter/scooter
719
+ 701: motor vehicle/automotive vehicle
720
+ 702: motorcycle
721
+ 703: mound/mound baseball/pitcher's mound
722
+ 704: mouse/mouse computer equipment/computer mouse
723
+ 705: mousepad
724
+ 706: muffin
725
+ 707: mug
726
+ 708: mushroom
727
+ 709: music stool/piano stool
728
+ 710: musical instrument/instrument/instrument musical
729
+ 711: nailfile
730
+ 712: napkin/table napkin/serviette
731
+ 713: neckerchief
732
+ 714: necklace
733
+ 715: necktie/tie/tie necktie
734
+ 716: needle
735
+ 717: nest
736
+ 718: newspaper/paper/paper newspaper
737
+ 719: newsstand
738
+ 720: nightshirt/nightwear/sleepwear/nightclothes
739
+ 721: nosebag/nosebag for animals/feedbag
740
+ 722: noseband/noseband for animals/nosepiece/nosepiece for animals
741
+ 723: notebook
742
+ 724: notepad
743
+ 725: nut
744
+ 726: nutcracker
745
+ 727: oar
746
+ 728: octopus/octopus food
747
+ 729: octopus/octopus animal
748
+ 730: oil lamp/kerosene lamp/kerosine lamp
749
+ 731: olive oil
750
+ 732: omelet/omelette
751
+ 733: onion
752
+ 734: orange/orange fruit
753
+ 735: orange juice
754
+ 736: ostrich
755
+ 737: ottoman/pouf/pouffe/hassock
756
+ 738: oven
757
+ 739: overalls/overalls clothing
758
+ 740: owl
759
+ 741: packet
760
+ 742: inkpad/inking pad/stamp pad
761
+ 743: pad
762
+ 744: paddle/boat paddle
763
+ 745: padlock
764
+ 746: paintbrush
765
+ 747: painting
766
+ 748: pajamas/pyjamas
767
+ 749: palette/pallet
768
+ 750: pan/pan for cooking/cooking pan
769
+ 751: pan/pan metal container
770
+ 752: pancake
771
+ 753: pantyhose
772
+ 754: papaya
773
+ 755: paper plate
774
+ 756: paper towel
775
+ 757: paperback book/paper-back book/softback book/soft-cover book
776
+ 758: paperweight
777
+ 759: parachute
778
+ 760: parakeet/parrakeet/parroket/paraquet/paroquet/parroquet
779
+ 761: parasail/parasail sports
780
+ 762: parasol/sunshade
781
+ 763: parchment
782
+ 764: parka/anorak
783
+ 765: parking meter
784
+ 766: parrot
785
+ 767: passenger car/passenger car part of a train/coach/coach part of a train
786
+ 768: passenger ship
787
+ 769: passport
788
+ 770: pastry
789
+ 771: patty/patty food
790
+ 772: pea/pea food
791
+ 773: peach
792
+ 774: peanut butter
793
+ 775: pear
794
+ 776: peeler/peeler tool for fruit and vegetables
795
+ 777: wooden leg/pegleg
796
+ 778: pegboard
797
+ 779: pelican
798
+ 780: pen
799
+ 781: pencil
800
+ 782: pencil box/pencil case
801
+ 783: pencil sharpener
802
+ 784: pendulum
803
+ 785: penguin
804
+ 786: pennant
805
+ 787: penny/penny coin
806
+ 788: pepper/peppercorn
807
+ 789: pepper mill/pepper grinder
808
+ 790: perfume
809
+ 791: persimmon
810
+ 792: person/baby/child/boy/girl/man/woman/human
811
+ 793: pet
812
+ 794: pew/pew church bench/church bench
813
+ 795: phonebook/telephone book/telephone directory
814
+ 796: phonograph record/phonograph recording/record/record phonograph recording
815
+ 797: piano
816
+ 798: pickle
817
+ 799: pickup truck
818
+ 800: pie
819
+ 801: pigeon
820
+ 802: piggy bank/penny bank
821
+ 803: pillow
822
+ 804: pin/pin non jewelry
823
+ 805: pineapple
824
+ 806: pinecone
825
+ 807: ping-pong ball
826
+ 808: pinwheel
827
+ 809: tobacco pipe
828
+ 810: pipe/piping
829
+ 811: pistol/handgun
830
+ 812: pita/pita bread/pocket bread
831
+ 813: pitcher/pitcher vessel for liquid/ewer
832
+ 814: pitchfork
833
+ 815: pizza
834
+ 816: place mat
835
+ 817: plate
836
+ 818: platter
837
+ 819: playpen
838
+ 820: pliers/plyers
839
+ 821: plow/plow farm equipment/plough/plough farm equipment
840
+ 822: plume
841
+ 823: pocket watch
842
+ 824: pocketknife
843
+ 825: poker/poker fire stirring tool/stove poker/fire hook
844
+ 826: pole/post
845
+ 827: polo shirt/sport shirt
846
+ 828: poncho
847
+ 829: pony
848
+ 830: pool table/billiard table/snooker table
849
+ 831: pop/pop soda/soda/soda pop/tonic/soft drink
850
+ 832: postbox/postbox public/mailbox/mailbox public
851
+ 833: postcard/postal card/mailing-card
852
+ 834: poster/placard
853
+ 835: pot
854
+ 836: flowerpot
855
+ 837: potato
856
+ 838: potholder
857
+ 839: pottery/clayware
858
+ 840: pouch
859
+ 841: power shovel/excavator/digger
860
+ 842: prawn/shrimp
861
+ 843: pretzel
862
+ 844: printer/printing machine
863
+ 845: projectile/projectile weapon/missile
864
+ 846: projector
865
+ 847: propeller/propellor
866
+ 848: prune
867
+ 849: pudding
868
+ 850: puffer/puffer fish/pufferfish/blowfish/globefish
869
+ 851: puffin
870
+ 852: pug-dog
871
+ 853: pumpkin
872
+ 854: puncher
873
+ 855: puppet/marionette
874
+ 856: puppy
875
+ 857: quesadilla
876
+ 858: quiche
877
+ 859: quilt/comforter
878
+ 860: rabbit
879
+ 861: race car/racing car
880
+ 862: racket/racquet
881
+ 863: radar
882
+ 864: radiator
883
+ 865: radio receiver/radio set/radio/tuner/tuner radio
884
+ 866: radish/daikon
885
+ 867: raft
886
+ 868: rag doll
887
+ 869: raincoat/waterproof jacket
888
+ 870: ram/ram animal
889
+ 871: raspberry
890
+ 872: rat
891
+ 873: razorblade
892
+ 874: reamer/reamer juicer/juicer/juice reamer
893
+ 875: rearview mirror
894
+ 876: receipt
895
+ 877: recliner/reclining chair/lounger/lounger chair
896
+ 878: record player/phonograph/phonograph record player/turntable
897
+ 879: reflector
898
+ 880: remote control
899
+ 881: rhinoceros
900
+ 882: rib/rib food
901
+ 883: rifle
902
+ 884: ring
903
+ 885: river boat
904
+ 886: road map
905
+ 887: robe
906
+ 888: rocking chair
907
+ 889: rodent
908
+ 890: roller skate
909
+ 891: Rollerblade
910
+ 892: rolling pin
911
+ 893: root beer
912
+ 894: router/router computer equipment
913
+ 895: rubber band/elastic band
914
+ 896: runner/runner carpet
915
+ 897: plastic bag/paper bag
916
+ 898: saddle/saddle on an animal
917
+ 899: saddle blanket/saddlecloth/horse blanket
918
+ 900: saddlebag
919
+ 901: safety pin
920
+ 902: sail
921
+ 903: salad
922
+ 904: salad plate/salad bowl
923
+ 905: salami
924
+ 906: salmon/salmon fish
925
+ 907: salmon/salmon food
926
+ 908: salsa
927
+ 909: saltshaker
928
+ 910: sandal/sandal type of shoe
929
+ 911: sandwich
930
+ 912: satchel
931
+ 913: saucepan
932
+ 914: saucer
933
+ 915: sausage
934
+ 916: sawhorse/sawbuck
935
+ 917: saxophone
936
+ 918: scale/scale measuring instrument
937
+ 919: scarecrow/strawman
938
+ 920: scarf
939
+ 921: school bus
940
+ 922: scissors
941
+ 923: scoreboard
942
+ 924: scraper
943
+ 925: screwdriver
944
+ 926: scrubbing brush
945
+ 927: sculpture
946
+ 928: seabird/seafowl
947
+ 929: seahorse
948
+ 930: seaplane/hydroplane
949
+ 931: seashell
950
+ 932: sewing machine
951
+ 933: shaker
952
+ 934: shampoo
953
+ 935: shark
954
+ 936: sharpener
955
+ 937: Sharpie
956
+ 938: shaver/shaver electric/electric shaver/electric razor
957
+ 939: shaving cream/shaving soap
958
+ 940: shawl
959
+ 941: shears
960
+ 942: sheep
961
+ 943: shepherd dog/sheepdog
962
+ 944: sherbert/sherbet
963
+ 945: shield
964
+ 946: shirt
965
+ 947: shoe/sneaker/sneaker type of shoe/tennis shoe
966
+ 948: shopping bag
967
+ 949: shopping cart
968
+ 950: short pants/shorts/shorts clothing/trunks/trunks clothing
969
+ 951: shot glass
970
+ 952: shoulder bag
971
+ 953: shovel
972
+ 954: shower head
973
+ 955: shower cap
974
+ 956: shower curtain
975
+ 957: shredder/shredder for paper
976
+ 958: signboard
977
+ 959: silo
978
+ 960: sink
979
+ 961: skateboard
980
+ 962: skewer
981
+ 963: ski
982
+ 964: ski boot
983
+ 965: ski parka/ski jacket
984
+ 966: ski pole
985
+ 967: skirt
986
+ 968: skullcap
987
+ 969: sled/sledge/sleigh
988
+ 970: sleeping bag
989
+ 971: sling/sling bandage/triangular bandage
990
+ 972: slipper/slipper footwear/carpet slipper/carpet slipper footwear
991
+ 973: smoothie
992
+ 974: snake/serpent
993
+ 975: snowboard
994
+ 976: snowman
995
+ 977: snowmobile
996
+ 978: soap
997
+ 979: soccer ball
998
+ 980: sock
999
+ 981: sofa/couch/lounge
1000
+ 982: softball
1001
+ 983: solar array/solar battery/solar panel
1002
+ 984: sombrero
1003
+ 985: soup
1004
+ 986: soup bowl
1005
+ 987: soupspoon
1006
+ 988: sour cream/soured cream
1007
+ 989: soya milk/soybean milk/soymilk
1008
+ 990: space shuttle
1009
+ 991: sparkler/sparkler fireworks
1010
+ 992: spatula
1011
+ 993: spear/lance
1012
+ 994: spectacles/specs/eyeglasses/glasses
1013
+ 995: spice rack
1014
+ 996: spider
1015
+ 997: crawfish/crayfish
1016
+ 998: sponge
1017
+ 999: spoon
1018
+ 1000: sportswear/athletic wear/activewear
1019
+ 1001: spotlight
1020
+ 1002: squid/squid food/calamari/calamary
1021
+ 1003: squirrel
1022
+ 1004: stagecoach
1023
+ 1005: stapler/stapler stapling machine
1024
+ 1006: starfish/sea star
1025
+ 1007: statue/statue sculpture
1026
+ 1008: steak/steak food
1027
+ 1009: steak knife
1028
+ 1010: steering wheel
1029
+ 1011: stepladder
1030
+ 1012: step stool
1031
+ 1013: stereo/stereo sound system
1032
+ 1014: stew
1033
+ 1015: stirrer
1034
+ 1016: stirrup
1035
+ 1017: stool
1036
+ 1018: stop sign
1037
+ 1019: brake light
1038
+ 1020: stove/kitchen stove/range/range kitchen appliance/kitchen range/cooking stove
1039
+ 1021: strainer
1040
+ 1022: strap
1041
+ 1023: straw/straw for drinking/drinking straw
1042
+ 1024: strawberry
1043
+ 1025: street sign
1044
+ 1026: streetlight/street lamp
1045
+ 1027: string cheese
1046
+ 1028: stylus
1047
+ 1029: subwoofer
1048
+ 1030: sugar bowl
1049
+ 1031: sugarcane/sugarcane plant
1050
+ 1032: suit/suit clothing
1051
+ 1033: sunflower
1052
+ 1034: sunglasses
1053
+ 1035: sunhat
1054
+ 1036: surfboard
1055
+ 1037: sushi
1056
+ 1038: mop
1057
+ 1039: sweat pants
1058
+ 1040: sweatband
1059
+ 1041: sweater
1060
+ 1042: sweatshirt
1061
+ 1043: sweet potato
1062
+ 1044: swimsuit/swimwear/bathing suit/swimming costume/bathing costume/swimming trunks/bathing trunks
1063
+ 1045: sword
1064
+ 1046: syringe
1065
+ 1047: Tabasco sauce
1066
+ 1048: table-tennis table/ping-pong table
1067
+ 1049: table
1068
+ 1050: table lamp
1069
+ 1051: tablecloth
1070
+ 1052: tachometer
1071
+ 1053: taco
1072
+ 1054: tag
1073
+ 1055: taillight/rear light
1074
+ 1056: tambourine
1075
+ 1057: army tank/armored combat vehicle/armoured combat vehicle
1076
+ 1058: tank/tank storage vessel/storage tank
1077
+ 1059: tank top/tank top clothing
1078
+ 1060: tape/tape sticky cloth or paper
1079
+ 1061: tape measure/measuring tape
1080
+ 1062: tapestry
1081
+ 1063: tarp
1082
+ 1064: tartan/plaid
1083
+ 1065: tassel
1084
+ 1066: tea bag
1085
+ 1067: teacup
1086
+ 1068: teakettle
1087
+ 1069: teapot
1088
+ 1070: teddy bear
1089
+ 1071: telephone/phone/telephone set
1090
+ 1072: telephone booth/phone booth/call box/telephone box/telephone kiosk
1091
+ 1073: telephone pole/telegraph pole/telegraph post
1092
+ 1074: telephoto lens/zoom lens
1093
+ 1075: television camera/tv camera
1094
+ 1076: television set/tv/tv set
1095
+ 1077: tennis ball
1096
+ 1078: tennis racket
1097
+ 1079: tequila
1098
+ 1080: thermometer
1099
+ 1081: thermos bottle
1100
+ 1082: thermostat
1101
+ 1083: thimble
1102
+ 1084: thread/yarn
1103
+ 1085: thumbtack/drawing pin/pushpin
1104
+ 1086: tiara
1105
+ 1087: tiger
1106
+ 1088: tights/tights clothing/leotards
1107
+ 1089: timer/stopwatch
1108
+ 1090: tinfoil
1109
+ 1091: tinsel
1110
+ 1092: tissue paper
1111
+ 1093: toast/toast food
1112
+ 1094: toaster
1113
+ 1095: toaster oven
1114
+ 1096: toilet
1115
+ 1097: toilet tissue/toilet paper/bathroom tissue
1116
+ 1098: tomato
1117
+ 1099: tongs
1118
+ 1100: toolbox
1119
+ 1101: toothbrush
1120
+ 1102: toothpaste
1121
+ 1103: toothpick
1122
+ 1104: cover
1123
+ 1105: tortilla
1124
+ 1106: tow truck
1125
+ 1107: towel
1126
+ 1108: towel rack/towel rail/towel bar
1127
+ 1109: toy
1128
+ 1110: tractor/tractor farm equipment
1129
+ 1111: traffic light
1130
+ 1112: dirt bike
1131
+ 1113: trailer truck/tractor trailer/trucking rig/articulated lorry/semi truck
1132
+ 1114: train/train railroad vehicle/railroad train
1133
+ 1115: trampoline
1134
+ 1116: tray
1135
+ 1117: trench coat
1136
+ 1118: triangle/triangle musical instrument
1137
+ 1119: tricycle
1138
+ 1120: tripod
1139
+ 1121: trousers/pants/pants clothing
1140
+ 1122: truck
1141
+ 1123: truffle/truffle chocolate/chocolate truffle
1142
+ 1124: trunk
1143
+ 1125: vat
1144
+ 1126: turban
1145
+ 1127: turkey/turkey food
1146
+ 1128: turnip
1147
+ 1129: turtle
1148
+ 1130: turtleneck/turtleneck clothing/polo-neck
1149
+ 1131: typewriter
1150
+ 1132: umbrella
1151
+ 1133: underwear/underclothes/underclothing/underpants
1152
+ 1134: unicycle
1153
+ 1135: urinal
1154
+ 1136: urn
1155
+ 1137: vacuum cleaner
1156
+ 1138: vase
1157
+ 1139: vending machine
1158
+ 1140: vent/blowhole/air vent
1159
+ 1141: vest/waistcoat
1160
+ 1142: videotape
1161
+ 1143: vinegar
1162
+ 1144: violin/fiddle
1163
+ 1145: vodka
1164
+ 1146: volleyball
1165
+ 1147: vulture
1166
+ 1148: waffle
1167
+ 1149: waffle iron
1168
+ 1150: wagon
1169
+ 1151: wagon wheel
1170
+ 1152: walking stick
1171
+ 1153: wall clock
1172
+ 1154: wall socket/wall plug/electric outlet/electrical outlet/outlet/electric receptacle
1173
+ 1155: wallet/billfold
1174
+ 1156: walrus
1175
+ 1157: wardrobe
1176
+ 1158: washbasin/basin/basin for washing/washbowl/washstand/handbasin
1177
+ 1159: automatic washer/washing machine
1178
+ 1160: watch/wristwatch
1179
+ 1161: water bottle
1180
+ 1162: water cooler
1181
+ 1163: water faucet/water tap/tap/tap water faucet
1182
+ 1164: water heater/hot-water heater
1183
+ 1165: water jug
1184
+ 1166: water gun/squirt gun
1185
+ 1167: water scooter/sea scooter/jet ski
1186
+ 1168: water ski
1187
+ 1169: water tower
1188
+ 1170: watering can
1189
+ 1171: watermelon
1190
+ 1172: weathervane/vane/vane weathervane/wind vane
1191
+ 1173: webcam
1192
+ 1174: wedding cake/bridecake
1193
+ 1175: wedding ring/wedding band
1194
+ 1176: wet suit
1195
+ 1177: wheel
1196
+ 1178: wheelchair
1197
+ 1179: whipped cream
1198
+ 1180: whistle
1199
+ 1181: wig
1200
+ 1182: wind chime
1201
+ 1183: windmill
1202
+ 1184: window box/window box for plants
1203
+ 1185: windshield wiper/windscreen wiper/wiper/wiper for windshield or screen
1204
+ 1186: windsock/air sock/air-sleeve/wind sleeve/wind cone
1205
+ 1187: wine bottle
1206
+ 1188: wine bucket/wine cooler
1207
+ 1189: wineglass
1208
+ 1190: blinder/blinder for horses
1209
+ 1191: wok
1210
+ 1192: wolf
1211
+ 1193: wooden spoon
1212
+ 1194: wreath
1213
+ 1195: wrench/spanner
1214
+ 1196: wristband
1215
+ 1197: wristlet/wrist band
1216
+ 1198: yacht
1217
+ 1199: yogurt/yoghurt/yoghourt
1218
+ 1200: yoke/yoke animal equipment
1219
+ 1201: zebra
1220
+ 1202: zucchini/courgette
1221
+
1222
+ # Download script/URL (optional)
1223
+ download: |
1224
+ from ultralytics.utils.downloads import download
1225
+ from pathlib import Path
1226
+
1227
+ # Download labels
1228
+ dir = Path(yaml['path']) # dataset root dir
1229
+ url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
1230
+ urls = [url + 'lvis-labels-segments.zip'] # labels
1231
+ download(urls, dir=dir.parent)
1232
+ # Download data
1233
+ urls = ['http://images.cocodataset.org/zips/train2017.zip', # 19G, 118k images
1234
+ 'http://images.cocodataset.org/zips/val2017.zip', # 1G, 5k images
1235
+ 'http://images.cocodataset.org/zips/test2017.zip'] # 7G, 41k images (optional)
1236
+ download(urls, dir=dir / 'images', threads=3)
ultralytics/cfg/datasets/medical-pills.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Medical-pills dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/medical-pills/
5
+ # Example usage: yolo train data=medical-pills.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── medical-pills ← downloads here (8.19 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: ../datasets/medical-pills # dataset root dir
13
+ train: train/images # train images (relative to 'path') 92 images
14
+ val: valid/images # val images (relative to 'path') 23 images
15
+ test: # test images (relative to 'path')
16
+
17
+ # Classes
18
+ names:
19
+ 0: pill
20
+
21
+ # Download script/URL (optional)
22
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/medical-pills.zip
ultralytics/cfg/datasets/open-images-v7.yaml ADDED
@@ -0,0 +1,661 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Open Images v7 dataset https://storage.googleapis.com/openimages/web/index.html by Google
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/open-images-v7/
5
+ # Example usage: yolo train data=open-images-v7.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── open-images-v7 ← downloads here (561 GB)
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: ../datasets/open-images-v7 # dataset root dir
13
+ train: images/train # train images (relative to 'path') 1743042 images
14
+ val: images/val # val images (relative to 'path') 41620 images
15
+ test: # test images (optional)
16
+
17
+ # Classes
18
+ names:
19
+ 0: Accordion
20
+ 1: Adhesive tape
21
+ 2: Aircraft
22
+ 3: Airplane
23
+ 4: Alarm clock
24
+ 5: Alpaca
25
+ 6: Ambulance
26
+ 7: Animal
27
+ 8: Ant
28
+ 9: Antelope
29
+ 10: Apple
30
+ 11: Armadillo
31
+ 12: Artichoke
32
+ 13: Auto part
33
+ 14: Axe
34
+ 15: Backpack
35
+ 16: Bagel
36
+ 17: Baked goods
37
+ 18: Balance beam
38
+ 19: Ball
39
+ 20: Balloon
40
+ 21: Banana
41
+ 22: Band-aid
42
+ 23: Banjo
43
+ 24: Barge
44
+ 25: Barrel
45
+ 26: Baseball bat
46
+ 27: Baseball glove
47
+ 28: Bat (Animal)
48
+ 29: Bathroom accessory
49
+ 30: Bathroom cabinet
50
+ 31: Bathtub
51
+ 32: Beaker
52
+ 33: Bear
53
+ 34: Bed
54
+ 35: Bee
55
+ 36: Beehive
56
+ 37: Beer
57
+ 38: Beetle
58
+ 39: Bell pepper
59
+ 40: Belt
60
+ 41: Bench
61
+ 42: Bicycle
62
+ 43: Bicycle helmet
63
+ 44: Bicycle wheel
64
+ 45: Bidet
65
+ 46: Billboard
66
+ 47: Billiard table
67
+ 48: Binoculars
68
+ 49: Bird
69
+ 50: Blender
70
+ 51: Blue jay
71
+ 52: Boat
72
+ 53: Bomb
73
+ 54: Book
74
+ 55: Bookcase
75
+ 56: Boot
76
+ 57: Bottle
77
+ 58: Bottle opener
78
+ 59: Bow and arrow
79
+ 60: Bowl
80
+ 61: Bowling equipment
81
+ 62: Box
82
+ 63: Boy
83
+ 64: Brassiere
84
+ 65: Bread
85
+ 66: Briefcase
86
+ 67: Broccoli
87
+ 68: Bronze sculpture
88
+ 69: Brown bear
89
+ 70: Building
90
+ 71: Bull
91
+ 72: Burrito
92
+ 73: Bus
93
+ 74: Bust
94
+ 75: Butterfly
95
+ 76: Cabbage
96
+ 77: Cabinetry
97
+ 78: Cake
98
+ 79: Cake stand
99
+ 80: Calculator
100
+ 81: Camel
101
+ 82: Camera
102
+ 83: Can opener
103
+ 84: Canary
104
+ 85: Candle
105
+ 86: Candy
106
+ 87: Cannon
107
+ 88: Canoe
108
+ 89: Cantaloupe
109
+ 90: Car
110
+ 91: Carnivore
111
+ 92: Carrot
112
+ 93: Cart
113
+ 94: Cassette deck
114
+ 95: Castle
115
+ 96: Cat
116
+ 97: Cat furniture
117
+ 98: Caterpillar
118
+ 99: Cattle
119
+ 100: Ceiling fan
120
+ 101: Cello
121
+ 102: Centipede
122
+ 103: Chainsaw
123
+ 104: Chair
124
+ 105: Cheese
125
+ 106: Cheetah
126
+ 107: Chest of drawers
127
+ 108: Chicken
128
+ 109: Chime
129
+ 110: Chisel
130
+ 111: Chopsticks
131
+ 112: Christmas tree
132
+ 113: Clock
133
+ 114: Closet
134
+ 115: Clothing
135
+ 116: Coat
136
+ 117: Cocktail
137
+ 118: Cocktail shaker
138
+ 119: Coconut
139
+ 120: Coffee
140
+ 121: Coffee cup
141
+ 122: Coffee table
142
+ 123: Coffeemaker
143
+ 124: Coin
144
+ 125: Common fig
145
+ 126: Common sunflower
146
+ 127: Computer keyboard
147
+ 128: Computer monitor
148
+ 129: Computer mouse
149
+ 130: Container
150
+ 131: Convenience store
151
+ 132: Cookie
152
+ 133: Cooking spray
153
+ 134: Corded phone
154
+ 135: Cosmetics
155
+ 136: Couch
156
+ 137: Countertop
157
+ 138: Cowboy hat
158
+ 139: Crab
159
+ 140: Cream
160
+ 141: Cricket ball
161
+ 142: Crocodile
162
+ 143: Croissant
163
+ 144: Crown
164
+ 145: Crutch
165
+ 146: Cucumber
166
+ 147: Cupboard
167
+ 148: Curtain
168
+ 149: Cutting board
169
+ 150: Dagger
170
+ 151: Dairy Product
171
+ 152: Deer
172
+ 153: Desk
173
+ 154: Dessert
174
+ 155: Diaper
175
+ 156: Dice
176
+ 157: Digital clock
177
+ 158: Dinosaur
178
+ 159: Dishwasher
179
+ 160: Dog
180
+ 161: Dog bed
181
+ 162: Doll
182
+ 163: Dolphin
183
+ 164: Door
184
+ 165: Door handle
185
+ 166: Doughnut
186
+ 167: Dragonfly
187
+ 168: Drawer
188
+ 169: Dress
189
+ 170: Drill (Tool)
190
+ 171: Drink
191
+ 172: Drinking straw
192
+ 173: Drum
193
+ 174: Duck
194
+ 175: Dumbbell
195
+ 176: Eagle
196
+ 177: Earrings
197
+ 178: Egg (Food)
198
+ 179: Elephant
199
+ 180: Envelope
200
+ 181: Eraser
201
+ 182: Face powder
202
+ 183: Facial tissue holder
203
+ 184: Falcon
204
+ 185: Fashion accessory
205
+ 186: Fast food
206
+ 187: Fax
207
+ 188: Fedora
208
+ 189: Filing cabinet
209
+ 190: Fire hydrant
210
+ 191: Fireplace
211
+ 192: Fish
212
+ 193: Flag
213
+ 194: Flashlight
214
+ 195: Flower
215
+ 196: Flowerpot
216
+ 197: Flute
217
+ 198: Flying disc
218
+ 199: Food
219
+ 200: Food processor
220
+ 201: Football
221
+ 202: Football helmet
222
+ 203: Footwear
223
+ 204: Fork
224
+ 205: Fountain
225
+ 206: Fox
226
+ 207: French fries
227
+ 208: French horn
228
+ 209: Frog
229
+ 210: Fruit
230
+ 211: Frying pan
231
+ 212: Furniture
232
+ 213: Garden Asparagus
233
+ 214: Gas stove
234
+ 215: Giraffe
235
+ 216: Girl
236
+ 217: Glasses
237
+ 218: Glove
238
+ 219: Goat
239
+ 220: Goggles
240
+ 221: Goldfish
241
+ 222: Golf ball
242
+ 223: Golf cart
243
+ 224: Gondola
244
+ 225: Goose
245
+ 226: Grape
246
+ 227: Grapefruit
247
+ 228: Grinder
248
+ 229: Guacamole
249
+ 230: Guitar
250
+ 231: Hair dryer
251
+ 232: Hair spray
252
+ 233: Hamburger
253
+ 234: Hammer
254
+ 235: Hamster
255
+ 236: Hand dryer
256
+ 237: Handbag
257
+ 238: Handgun
258
+ 239: Harbor seal
259
+ 240: Harmonica
260
+ 241: Harp
261
+ 242: Harpsichord
262
+ 243: Hat
263
+ 244: Headphones
264
+ 245: Heater
265
+ 246: Hedgehog
266
+ 247: Helicopter
267
+ 248: Helmet
268
+ 249: High heels
269
+ 250: Hiking equipment
270
+ 251: Hippopotamus
271
+ 252: Home appliance
272
+ 253: Honeycomb
273
+ 254: Horizontal bar
274
+ 255: Horse
275
+ 256: Hot dog
276
+ 257: House
277
+ 258: Houseplant
278
+ 259: Human arm
279
+ 260: Human beard
280
+ 261: Human body
281
+ 262: Human ear
282
+ 263: Human eye
283
+ 264: Human face
284
+ 265: Human foot
285
+ 266: Human hair
286
+ 267: Human hand
287
+ 268: Human head
288
+ 269: Human leg
289
+ 270: Human mouth
290
+ 271: Human nose
291
+ 272: Humidifier
292
+ 273: Ice cream
293
+ 274: Indoor rower
294
+ 275: Infant bed
295
+ 276: Insect
296
+ 277: Invertebrate
297
+ 278: Ipod
298
+ 279: Isopod
299
+ 280: Jacket
300
+ 281: Jacuzzi
301
+ 282: Jaguar (Animal)
302
+ 283: Jeans
303
+ 284: Jellyfish
304
+ 285: Jet ski
305
+ 286: Jug
306
+ 287: Juice
307
+ 288: Kangaroo
308
+ 289: Kettle
309
+ 290: Kitchen & dining room table
310
+ 291: Kitchen appliance
311
+ 292: Kitchen knife
312
+ 293: Kitchen utensil
313
+ 294: Kitchenware
314
+ 295: Kite
315
+ 296: Knife
316
+ 297: Koala
317
+ 298: Ladder
318
+ 299: Ladle
319
+ 300: Ladybug
320
+ 301: Lamp
321
+ 302: Land vehicle
322
+ 303: Lantern
323
+ 304: Laptop
324
+ 305: Lavender (Plant)
325
+ 306: Lemon
326
+ 307: Leopard
327
+ 308: Light bulb
328
+ 309: Light switch
329
+ 310: Lighthouse
330
+ 311: Lily
331
+ 312: Limousine
332
+ 313: Lion
333
+ 314: Lipstick
334
+ 315: Lizard
335
+ 316: Lobster
336
+ 317: Loveseat
337
+ 318: Luggage and bags
338
+ 319: Lynx
339
+ 320: Magpie
340
+ 321: Mammal
341
+ 322: Man
342
+ 323: Mango
343
+ 324: Maple
344
+ 325: Maracas
345
+ 326: Marine invertebrates
346
+ 327: Marine mammal
347
+ 328: Measuring cup
348
+ 329: Mechanical fan
349
+ 330: Medical equipment
350
+ 331: Microphone
351
+ 332: Microwave oven
352
+ 333: Milk
353
+ 334: Miniskirt
354
+ 335: Mirror
355
+ 336: Missile
356
+ 337: Mixer
357
+ 338: Mixing bowl
358
+ 339: Mobile phone
359
+ 340: Monkey
360
+ 341: Moths and butterflies
361
+ 342: Motorcycle
362
+ 343: Mouse
363
+ 344: Muffin
364
+ 345: Mug
365
+ 346: Mule
366
+ 347: Mushroom
367
+ 348: Musical instrument
368
+ 349: Musical keyboard
369
+ 350: Nail (Construction)
370
+ 351: Necklace
371
+ 352: Nightstand
372
+ 353: Oboe
373
+ 354: Office building
374
+ 355: Office supplies
375
+ 356: Orange
376
+ 357: Organ (Musical Instrument)
377
+ 358: Ostrich
378
+ 359: Otter
379
+ 360: Oven
380
+ 361: Owl
381
+ 362: Oyster
382
+ 363: Paddle
383
+ 364: Palm tree
384
+ 365: Pancake
385
+ 366: Panda
386
+ 367: Paper cutter
387
+ 368: Paper towel
388
+ 369: Parachute
389
+ 370: Parking meter
390
+ 371: Parrot
391
+ 372: Pasta
392
+ 373: Pastry
393
+ 374: Peach
394
+ 375: Pear
395
+ 376: Pen
396
+ 377: Pencil case
397
+ 378: Pencil sharpener
398
+ 379: Penguin
399
+ 380: Perfume
400
+ 381: Person
401
+ 382: Personal care
402
+ 383: Personal flotation device
403
+ 384: Piano
404
+ 385: Picnic basket
405
+ 386: Picture frame
406
+ 387: Pig
407
+ 388: Pillow
408
+ 389: Pineapple
409
+ 390: Pitcher (Container)
410
+ 391: Pizza
411
+ 392: Pizza cutter
412
+ 393: Plant
413
+ 394: Plastic bag
414
+ 395: Plate
415
+ 396: Platter
416
+ 397: Plumbing fixture
417
+ 398: Polar bear
418
+ 399: Pomegranate
419
+ 400: Popcorn
420
+ 401: Porch
421
+ 402: Porcupine
422
+ 403: Poster
423
+ 404: Potato
424
+ 405: Power plugs and sockets
425
+ 406: Pressure cooker
426
+ 407: Pretzel
427
+ 408: Printer
428
+ 409: Pumpkin
429
+ 410: Punching bag
430
+ 411: Rabbit
431
+ 412: Raccoon
432
+ 413: Racket
433
+ 414: Radish
434
+ 415: Ratchet (Device)
435
+ 416: Raven
436
+ 417: Rays and skates
437
+ 418: Red panda
438
+ 419: Refrigerator
439
+ 420: Remote control
440
+ 421: Reptile
441
+ 422: Rhinoceros
442
+ 423: Rifle
443
+ 424: Ring binder
444
+ 425: Rocket
445
+ 426: Roller skates
446
+ 427: Rose
447
+ 428: Rugby ball
448
+ 429: Ruler
449
+ 430: Salad
450
+ 431: Salt and pepper shakers
451
+ 432: Sandal
452
+ 433: Sandwich
453
+ 434: Saucer
454
+ 435: Saxophone
455
+ 436: Scale
456
+ 437: Scarf
457
+ 438: Scissors
458
+ 439: Scoreboard
459
+ 440: Scorpion
460
+ 441: Screwdriver
461
+ 442: Sculpture
462
+ 443: Sea lion
463
+ 444: Sea turtle
464
+ 445: Seafood
465
+ 446: Seahorse
466
+ 447: Seat belt
467
+ 448: Segway
468
+ 449: Serving tray
469
+ 450: Sewing machine
470
+ 451: Shark
471
+ 452: Sheep
472
+ 453: Shelf
473
+ 454: Shellfish
474
+ 455: Shirt
475
+ 456: Shorts
476
+ 457: Shotgun
477
+ 458: Shower
478
+ 459: Shrimp
479
+ 460: Sink
480
+ 461: Skateboard
481
+ 462: Ski
482
+ 463: Skirt
483
+ 464: Skull
484
+ 465: Skunk
485
+ 466: Skyscraper
486
+ 467: Slow cooker
487
+ 468: Snack
488
+ 469: Snail
489
+ 470: Snake
490
+ 471: Snowboard
491
+ 472: Snowman
492
+ 473: Snowmobile
493
+ 474: Snowplow
494
+ 475: Soap dispenser
495
+ 476: Sock
496
+ 477: Sofa bed
497
+ 478: Sombrero
498
+ 479: Sparrow
499
+ 480: Spatula
500
+ 481: Spice rack
501
+ 482: Spider
502
+ 483: Spoon
503
+ 484: Sports equipment
504
+ 485: Sports uniform
505
+ 486: Squash (Plant)
506
+ 487: Squid
507
+ 488: Squirrel
508
+ 489: Stairs
509
+ 490: Stapler
510
+ 491: Starfish
511
+ 492: Stationary bicycle
512
+ 493: Stethoscope
513
+ 494: Stool
514
+ 495: Stop sign
515
+ 496: Strawberry
516
+ 497: Street light
517
+ 498: Stretcher
518
+ 499: Studio couch
519
+ 500: Submarine
520
+ 501: Submarine sandwich
521
+ 502: Suit
522
+ 503: Suitcase
523
+ 504: Sun hat
524
+ 505: Sunglasses
525
+ 506: Surfboard
526
+ 507: Sushi
527
+ 508: Swan
528
+ 509: Swim cap
529
+ 510: Swimming pool
530
+ 511: Swimwear
531
+ 512: Sword
532
+ 513: Syringe
533
+ 514: Table
534
+ 515: Table tennis racket
535
+ 516: Tablet computer
536
+ 517: Tableware
537
+ 518: Taco
538
+ 519: Tank
539
+ 520: Tap
540
+ 521: Tart
541
+ 522: Taxi
542
+ 523: Tea
543
+ 524: Teapot
544
+ 525: Teddy bear
545
+ 526: Telephone
546
+ 527: Television
547
+ 528: Tennis ball
548
+ 529: Tennis racket
549
+ 530: Tent
550
+ 531: Tiara
551
+ 532: Tick
552
+ 533: Tie
553
+ 534: Tiger
554
+ 535: Tin can
555
+ 536: Tire
556
+ 537: Toaster
557
+ 538: Toilet
558
+ 539: Toilet paper
559
+ 540: Tomato
560
+ 541: Tool
561
+ 542: Toothbrush
562
+ 543: Torch
563
+ 544: Tortoise
564
+ 545: Towel
565
+ 546: Tower
566
+ 547: Toy
567
+ 548: Traffic light
568
+ 549: Traffic sign
569
+ 550: Train
570
+ 551: Training bench
571
+ 552: Treadmill
572
+ 553: Tree
573
+ 554: Tree house
574
+ 555: Tripod
575
+ 556: Trombone
576
+ 557: Trousers
577
+ 558: Truck
578
+ 559: Trumpet
579
+ 560: Turkey
580
+ 561: Turtle
581
+ 562: Umbrella
582
+ 563: Unicycle
583
+ 564: Van
584
+ 565: Vase
585
+ 566: Vegetable
586
+ 567: Vehicle
587
+ 568: Vehicle registration plate
588
+ 569: Violin
589
+ 570: Volleyball (Ball)
590
+ 571: Waffle
591
+ 572: Waffle iron
592
+ 573: Wall clock
593
+ 574: Wardrobe
594
+ 575: Washing machine
595
+ 576: Waste container
596
+ 577: Watch
597
+ 578: Watercraft
598
+ 579: Watermelon
599
+ 580: Weapon
600
+ 581: Whale
601
+ 582: Wheel
602
+ 583: Wheelchair
603
+ 584: Whisk
604
+ 585: Whiteboard
605
+ 586: Willow
606
+ 587: Window
607
+ 588: Window blind
608
+ 589: Wine
609
+ 590: Wine glass
610
+ 591: Wine rack
611
+ 592: Winter melon
612
+ 593: Wok
613
+ 594: Woman
614
+ 595: Wood-burning stove
615
+ 596: Woodpecker
616
+ 597: Worm
617
+ 598: Wrench
618
+ 599: Zebra
619
+ 600: Zucchini
620
+
621
+ # Download script/URL (optional) ---------------------------------------------------------------------------------------
622
+ download: |
623
+ from ultralytics.utils import LOGGER, SETTINGS, Path, is_ubuntu, get_ubuntu_version
624
+ from ultralytics.utils.checks import check_requirements, check_version
625
+
626
+ check_requirements('fiftyone')
627
+ if is_ubuntu() and check_version(get_ubuntu_version(), '>=22.04'):
628
+ # Ubuntu>=22.04 patch https://github.com/voxel51/fiftyone/issues/2961#issuecomment-1666519347
629
+ check_requirements('fiftyone-db-ubuntu2204')
630
+
631
+ import fiftyone as fo
632
+ import fiftyone.zoo as foz
633
+ import warnings
634
+
635
+ name = 'open-images-v7'
636
+ fraction = 1.0 # fraction of full dataset to use
637
+ LOGGER.warning('WARNING ⚠️ Open Images V7 dataset requires at least **561 GB of free space. Starting download...')
638
+ for split in 'train', 'validation': # 1743042 train, 41620 val images
639
+ train = split == 'train'
640
+
641
+ # Load Open Images dataset
642
+ dataset = foz.load_zoo_dataset(name,
643
+ split=split,
644
+ label_types=['detections'],
645
+ dataset_dir=Path(SETTINGS['datasets_dir']) / 'fiftyone' / name,
646
+ max_samples=round((1743042 if train else 41620) * fraction))
647
+
648
+ # Define classes
649
+ if train:
650
+ classes = dataset.default_classes # all classes
651
+ # classes = dataset.distinct('ground_truth.detections.label') # only observed classes
652
+
653
+ # Export to YOLO format
654
+ with warnings.catch_warnings():
655
+ warnings.filterwarnings("ignore", category=UserWarning, module="fiftyone.utils.yolo")
656
+ dataset.export(export_dir=str(Path(SETTINGS['datasets_dir']) / name),
657
+ dataset_type=fo.types.YOLOv5Dataset,
658
+ label_field='ground_truth',
659
+ split='val' if split == 'validation' else split,
660
+ classes=classes,
661
+ overwrite=train)
ultralytics/cfg/datasets/package-seg.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Package-seg dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/segment/package-seg/
5
+ # Example usage: yolo train data=package-seg.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── package-seg ← downloads here (102 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: ../datasets/package-seg # dataset root dir
13
+ train: train/images # train images (relative to 'path') 1920 images
14
+ val: valid/images # val images (relative to 'path') 89 images
15
+ test: test/images # test images (relative to 'path') 188 images
16
+
17
+ # Classes
18
+ names:
19
+ 0: package
20
+
21
+ # Download script/URL (optional)
22
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/package-seg.zip
ultralytics/cfg/datasets/signature.yaml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # Signature dataset by Ultralytics
4
+ # Documentation: https://docs.ultralytics.com/datasets/detect/signature/
5
+ # Example usage: yolo train data=signature.yaml
6
+ # parent
7
+ # ├── ultralytics
8
+ # └── datasets
9
+ # └── signature ← downloads here (11.2 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: ../datasets/signature # dataset root dir
13
+ train: train/images # train images (relative to 'path') 143 images
14
+ val: valid/images # val images (relative to 'path') 35 images
15
+
16
+ # Classes
17
+ names:
18
+ 0: signature
19
+
20
+ # Download script/URL (optional)
21
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/signature.zip
ultralytics/cfg/datasets/tiger-pose.yaml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 (75.3 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: ../datasets/tiger-pose # dataset root dir
13
+ train: train # train images (relative to 'path') 210 images
14
+ val: 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
+ # Download script/URL (optional)
25
+ download: https://github.com/ultralytics/assets/releases/download/v0.0.0/tiger-pose.zip
ultralytics/cfg/datasets/xView.yaml ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # DIUx xView 2018 Challenge https://challenge.xviewdataset.org by U.S. National Geospatial-Intelligence Agency (NGA)
4
+ # -------- DOWNLOAD DATA MANUALLY and jar xf val_images.zip to 'datasets/xView' before running 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: ../datasets/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 # train 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
+ import os
84
+ from pathlib import Path
85
+
86
+ import numpy as np
87
+ from PIL import Image
88
+ from tqdm import tqdm
89
+
90
+ from ultralytics.data.utils 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
96
+ path = fname.parent
97
+ with open(fname) as f:
98
+ print(f'Loading {fname}...')
99
+ data = json.load(f)
100
+
101
+ # Make dirs
102
+ labels = Path(path / 'labels' / 'train')
103
+ os.system(f'rm -rf {labels}')
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
+ id = p['image_id']
117
+ file = path / 'train_images' / id
118
+ if 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-60
124
+ assert 59 >= cls >= 0, f'incorrect class index {cls}'
125
+
126
+ # Write YOLO label
127
+ if id not in shapes:
128
+ shapes[id] = Image.open(file).size
129
+ box = xyxy2xywhn(box[None].astype(np.float), w=shapes[id][0], h=shapes[id][1], clip=True)
130
+ with open((labels / id).with_suffix('.txt'), 'a') 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 {file}: {e}')
134
+
135
+
136
+ # Download manually from https://challenge.xviewdataset.org
137
+ dir = Path(yaml['path']) # dataset root dir
138
+ # urls = ['https://d307kc0mrhucc3.cloudfront.net/train_labels.zip', # train labels
139
+ # 'https://d307kc0mrhucc3.cloudfront.net/train_images.zip', # 15G, 847 train images
140
+ # 'https://d307kc0mrhucc3.cloudfront.net/val_images.zip'] # 5G, 282 val images (no labels)
141
+ # download(urls, dir=dir)
142
+
143
+ # Convert labels
144
+ convert_labels(dir / 'xView_train.geojson')
145
+
146
+ # Move images
147
+ images = Path(dir / 'images')
148
+ images.mkdir(parents=True, exist_ok=True)
149
+ Path(dir / 'train_images').rename(dir / 'images' / 'train')
150
+ Path(dir / 'val_images').rename(dir / 'images' / 'val')
151
+
152
+ # Split
153
+ autosplit(dir / 'images' / 'train')
ultralytics/cfg/default.yaml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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, 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) number of hours to train for, overrides epochs if supplied
14
+ patience: 100 # (int) epochs to wait for no observable improvement for early stopping of training
15
+ batch: 16 # (int) number of images per batch (-1 for AutoBatch)
16
+ imgsz: 640 # (int | list) input images size as int for train and val modes, or list[h,w] for predict and export modes
17
+ save: True # (bool) save train checkpoints and predict results
18
+ save_period: -1 # (int) Save checkpoint every x epochs (disabled if < 1)
19
+ cache: False # (bool) True/ram, disk or False. Use cache for data loading
20
+ device: # (int | str | list, optional) device to run on, i.e. cuda device=0 or device=0,1,2,3 or device=cpu
21
+ workers: 8 # (int) number of worker threads for data loading (per RANK if DDP)
22
+ project: # (str, optional) project name
23
+ name: # (str, optional) experiment name, results saved to 'project/name' directory
24
+ exist_ok: False # (bool) whether to overwrite existing experiment
25
+ pretrained: True # (bool | str) whether to use a pretrained model (bool) or a model to load weights from (str)
26
+ optimizer: auto # (str) optimizer to use, choices=[SGD, Adam, Adamax, AdamW, NAdam, RAdam, RMSProp, auto]
27
+ verbose: True # (bool) whether to print verbose output
28
+ seed: 0 # (int) random seed for reproducibility
29
+ deterministic: True # (bool) whether to enable deterministic mode
30
+ single_cls: False # (bool) train multi-class data as single-class
31
+ rect: False # (bool) rectangular training if mode='train' or rectangular validation if mode='val'
32
+ cos_lr: False # (bool) use cosine learning rate scheduler
33
+ close_mosaic: 10 # (int) disable mosaic augmentation for final epochs (0 to disable)
34
+ resume: False # (bool) resume training from last checkpoint
35
+ amp: True # (bool) Automatic Mixed Precision (AMP) training, choices=[True, False], True runs AMP check
36
+ fraction: 1.0 # (float) dataset fraction to train on (default is 1.0, all images in train set)
37
+ profile: False # (bool) profile ONNX and TensorRT speeds during training for loggers
38
+ freeze: None # (int | list, optional) freeze first n layers, or freeze list of layer indices during training
39
+ multi_scale: False # (bool) Whether to use multiscale during training
40
+ # Segmentation
41
+ overlap_mask: True # (bool) merge object masks into a single image mask during training (segment train only)
42
+ mask_ratio: 4 # (int) mask downsample ratio (segment train only)
43
+ # Classification
44
+ dropout: 0.0 # (float) use dropout regularization (classify train only)
45
+
46
+ # Val/Test settings ----------------------------------------------------------------------------------------------------
47
+ val: True # (bool) validate/test during training
48
+ split: val # (str) dataset split to use for validation, i.e. 'val', 'test' or 'train'
49
+ save_json: False # (bool) save results to JSON file
50
+ save_hybrid: False # (bool) save hybrid version of labels (labels + additional predictions)
51
+ conf: # (float, optional) object confidence threshold for detection (default 0.25 predict, 0.001 val)
52
+ iou: 0.7 # (float) intersection over union (IoU) threshold for NMS
53
+ max_det: 300 # (int) maximum number of detections per image
54
+ half: False # (bool) use half precision (FP16)
55
+ dnn: False # (bool) use OpenCV DNN for ONNX inference
56
+ plots: True # (bool) save plots and images during train/val
57
+
58
+ # Predict settings -----------------------------------------------------------------------------------------------------
59
+ source: # (str, optional) source directory for images or videos
60
+ vid_stride: 1 # (int) video frame-rate stride
61
+ stream_buffer: False # (bool) buffer all streaming frames (True) or return the most recent frame (False)
62
+ visualize: False # (bool) visualize model features
63
+ augment: False # (bool) apply image augmentation to prediction sources
64
+ agnostic_nms: False # (bool) class-agnostic NMS
65
+ classes: # (int | list[int], optional) filter results by class, i.e. classes=0, or classes=[0,2,3]
66
+ retina_masks: False # (bool) use high-resolution segmentation masks
67
+ embed: # (list[int], optional) return feature vectors/embeddings from given layers
68
+
69
+ # Visualize settings ---------------------------------------------------------------------------------------------------
70
+ show: False # (bool) show predicted images and videos if environment allows
71
+ save_frames: False # (bool) save predicted individual video frames
72
+ save_txt: False # (bool) save results as .txt file
73
+ save_conf: False # (bool) save results with confidence scores
74
+ save_crop: False # (bool) save cropped images with results
75
+ show_labels: True # (bool) show prediction labels, i.e. 'person'
76
+ show_conf: True # (bool) show prediction confidence, i.e. '0.99'
77
+ show_boxes: True # (bool) show prediction boxes
78
+ line_width: # (int, optional) line width of the bounding boxes. Scaled to image size if None.
79
+
80
+ # Export settings ------------------------------------------------------------------------------------------------------
81
+ format: torchscript # (str) format to export to, choices at https://docs.ultralytics.com/modes/export/#export-formats
82
+ keras: False # (bool) use Kera=s
83
+ optimize: False # (bool) TorchScript: optimize for mobile
84
+ int8: False # (bool) CoreML/TF INT8 quantization
85
+ dynamic: False # (bool) ONNX/TF/TensorRT: dynamic axes
86
+ simplify: True # (bool) ONNX: simplify model using `onnxslim`
87
+ opset: # (int, optional) ONNX: opset version
88
+ workspace: None # (float, optional) TensorRT: workspace size (GiB), `None` will let TensorRT auto-allocate memory
89
+ nms: False # (bool) CoreML: add NMS
90
+
91
+ # Hyperparameters ------------------------------------------------------------------------------------------------------
92
+ lr0: 0.01 # (float) initial learning rate (i.e. SGD=1E-2, Adam=1E-3)
93
+ lrf: 0.01 # (float) final learning rate (lr0 * lrf)
94
+ momentum: 0.937 # (float) SGD momentum/Adam beta1
95
+ weight_decay: 0.0005 # (float) optimizer weight decay 5e-4
96
+ warmup_epochs: 3.0 # (float) warmup epochs (fractions ok)
97
+ warmup_momentum: 0.8 # (float) warmup initial momentum
98
+ warmup_bias_lr: 0.1 # (float) warmup initial bias lr
99
+ box: 7.5 # (float) box loss gain
100
+ cls: 0.5 # (float) cls loss gain (scale with pixels)
101
+ dfl: 1.5 # (float) dfl loss gain
102
+ pose: 12.0 # (float) pose loss gain
103
+ kobj: 1.0 # (float) keypoint obj loss gain
104
+ nbs: 64 # (int) nominal batch size
105
+ hsv_h: 0.015 # (float) image HSV-Hue augmentation (fraction)
106
+ hsv_s: 0.7 # (float) image HSV-Saturation augmentation (fraction)
107
+ hsv_v: 0.4 # (float) image HSV-Value augmentation (fraction)
108
+ degrees: 0.0 # (float) image rotation (+/- deg)
109
+ translate: 0.1 # (float) image translation (+/- fraction)
110
+ scale: 0.5 # (float) image scale (+/- gain)
111
+ shear: 0.0 # (float) image shear (+/- deg)
112
+ perspective: 0.0 # (float) image perspective (+/- fraction), range 0-0.001
113
+ flipud: 0.0 # (float) image flip up-down (probability)
114
+ fliplr: 0.5 # (float) image flip left-right (probability)
115
+ bgr: 0.0 # (float) image channel BGR (probability)
116
+ mosaic: 1.0 # (float) image mosaic (probability)
117
+ mixup: 0.0 # (float) image mixup (probability)
118
+ copy_paste: 0.0 # (float) segment copy-paste (probability)
119
+ copy_paste_mode: "flip" # (str) the method to do copy_paste augmentation (flip, mixup)
120
+ auto_augment: randaugment # (str) auto augmentation policy for classification (randaugment, autoaugment, augmix)
121
+ erasing: 0.4 # (float) probability of random erasing during classification training (0-0.9), 0 means no erasing, must be less than 1.0.
122
+ crop_fraction: 1.0 # (float) image crop fraction for classification (0.1-1), 1.0 means no crop, must be greater than 0.
123
+
124
+ # Custom config.yaml ---------------------------------------------------------------------------------------------------
125
+ cfg: # (str, optional) for overriding defaults.yaml
126
+
127
+ # Tracker settings ------------------------------------------------------------------------------------------------------
128
+ tracker: botsort.yaml # (str) tracker type, choices=[botsort.yaml, bytetrack.yaml]
ultralytics/cfg/models/11/yolo11-cls-resnet18.yaml ADDED
@@ -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: 10 # 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
ultralytics/cfg/models/11/yolo11-cls.yaml ADDED
@@ -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: 80 # 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: 151 layers, 1633584 parameters, 1633584 gradients, 3.3 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 151 layers, 5545488 parameters, 5545488 gradients, 12.2 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 187 layers, 10455696 parameters, 10455696 gradients, 39.7 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 309 layers, 12937104 parameters, 12937104 gradients, 49.9 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 309 layers, 28458544 parameters, 28458544 gradients, 111.1 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
ultralytics/cfg/models/11/yolo11-obb.yaml ADDED
@@ -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: 344 layers, 2695747 parameters, 2695731 gradients, 6.9 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 344 layers, 9744931 parameters, 9744915 gradients, 22.7 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 434 layers, 20963523 parameters, 20963507 gradients, 72.2 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 656 layers, 26220995 parameters, 26220979 gradients, 91.3 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 656 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)
ultralytics/cfg/models/11/yolo11-pose.yaml ADDED
@@ -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.yaml with scale 'n'
11
+ # [depth, width, max_channels]
12
+ n: [0.50, 0.25, 1024] # summary: 344 layers, 2908507 parameters, 2908491 gradients, 7.7 GFLOPs
13
+ s: [0.50, 0.50, 1024] # summary: 344 layers, 9948811 parameters, 9948795 gradients, 23.5 GFLOPs
14
+ m: [0.50, 1.00, 512] # summary: 434 layers, 20973273 parameters, 20973257 gradients, 72.3 GFLOPs
15
+ l: [1.00, 1.00, 512] # summary: 656 layers, 26230745 parameters, 26230729 gradients, 91.4 GFLOPs
16
+ x: [1.00, 1.50, 512] # summary: 656 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)
ultralytics/cfg/models/11/yolo11-seg.yaml ADDED
@@ -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: 355 layers, 2876848 parameters, 2876832 gradients, 10.5 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 355 layers, 10113248 parameters, 10113232 gradients, 35.8 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 445 layers, 22420896 parameters, 22420880 gradients, 123.9 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 667 layers, 27678368 parameters, 27678352 gradients, 143.0 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 667 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)
ultralytics/cfg/models/11/yolo11.yaml ADDED
@@ -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: 319 layers, 2624080 parameters, 2624064 gradients, 6.6 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 319 layers, 9458752 parameters, 9458736 gradients, 21.7 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 409 layers, 20114688 parameters, 20114672 gradients, 68.5 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 631 layers, 25372160 parameters, 25372144 gradients, 87.6 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 631 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)
ultralytics/cfg/models/12/yolo12-cls.yaml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # YOLO12-cls image classification model
4
+ # Model docs: https://docs.ultralytics.com/models/yolo12
5
+ # Task docs: https://docs.ultralytics.com/tasks/classify
6
+
7
+ # Parameters
8
+ nc: 80 # number of classes
9
+ scales: # model compound scaling constants, i.e. 'model=yolo12n-cls.yaml' will call yolo12-cls.yaml with scale 'n'
10
+ # [depth, width, max_channels]
11
+ n: [0.50, 0.25, 1024] # summary: 152 layers, 1,820,976 parameters, 1,820,976 gradients, 3.7 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 152 layers, 6,206,992 parameters, 6,206,992 gradients, 13.6 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 172 layers, 12,083,088 parameters, 12,083,088 gradients, 44.2 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 312 layers, 15,558,640 parameters, 15,558,640 gradients, 56.9 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 312 layers, 34,172,592 parameters, 34,172,592 gradients, 126.5 GFLOPs
16
+
17
+ # YOLO12n 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, 4, A2C2f, [512, True, 4]]
27
+ - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
28
+ - [-1, 4, A2C2f, [1024, True, 1]] # 8
29
+
30
+ # YOLO12n head
31
+ head:
32
+ - [-1, 1, Classify, [nc]] # Classify
ultralytics/cfg/models/12/yolo12-obb.yaml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # YOLO12-obb Oriented Bounding Boxes (OBB) model with P3/8 - P5/32 outputs
4
+ # Model docs: https://docs.ultralytics.com/models/yolo12
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=yolo12n-obb.yaml' will call yolo12-obb.yaml with scale 'n'
10
+ # [depth, width, max_channels]
11
+ n: [0.50, 0.25, 1024] # summary: 287 layers, 2,673,955 parameters, 2,673,939 gradients, 6.9 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 287 layers, 9,570,275 parameters, 9,570,259 gradients, 22.7 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 307 layers, 21,048,003 parameters, 21,047,987 gradients, 71.8 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 503 layers, 27,299,619 parameters, 27,299,603 gradients, 93.4 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 503 layers, 61,119,939 parameters, 61,119,923 gradients, 208.6 GFLOPs
16
+
17
+ # YOLO12n 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, 4, A2C2f, [512, True, 4]]
27
+ - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
28
+ - [-1, 4, A2C2f, [1024, True, 1]] # 8
29
+
30
+ # YOLO12n head
31
+ head:
32
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
33
+ - [[-1, 6], 1, Concat, [1]] # cat backbone P4
34
+ - [-1, 2, A2C2f, [512, False, -1]] # 11
35
+
36
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
37
+ - [[-1, 4], 1, Concat, [1]] # cat backbone P3
38
+ - [-1, 2, A2C2f, [256, False, -1]] # 14
39
+
40
+ - [-1, 1, Conv, [256, 3, 2]]
41
+ - [[-1, 11], 1, Concat, [1]] # cat head P4
42
+ - [-1, 2, A2C2f, [512, False, -1]] # 17
43
+
44
+ - [-1, 1, Conv, [512, 3, 2]]
45
+ - [[-1, 8], 1, Concat, [1]] # cat head P5
46
+ - [-1, 2, C3k2, [1024, True]] # 20 (P5/32-large)
47
+
48
+ - [[14, 17, 20], 1, OBB, [nc, 1]] # Detect(P3, P4, P5)
ultralytics/cfg/models/12/yolo12-pose.yaml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # YOLO12-pose keypoints/pose estimation model with P3/8 - P5/32 outputs
4
+ # Model docs: https://docs.ultralytics.com/models/yolo12
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=yolo12n-pose.yaml' will call yolo12-pose.yaml with scale 'n'
11
+ # [depth, width, max_channels]
12
+ n: [0.50, 0.25, 1024] # summary: 287 layers, 2,886,715 parameters, 2,886,699 gradients, 7.8 GFLOPs
13
+ s: [0.50, 0.50, 1024] # summary: 287 layers, 9,774,155 parameters, 9,774,139 gradients, 23.5 GFLOPs
14
+ m: [0.50, 1.00, 512] # summary: 307 layers, 21,057,753 parameters, 21,057,737 gradients, 71.8 GFLOPs
15
+ l: [1.00, 1.00, 512] # summary: 503 layers, 27,309,369 parameters, 27,309,353 gradients, 93.5 GFLOPs
16
+ x: [1.00, 1.50, 512] # summary: 503 layers, 61,134,489 parameters, 61,134,473 gradients, 208.7 GFLOPs
17
+
18
+ # YOLO12n 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, 4, A2C2f, [512, True, 4]]
28
+ - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
29
+ - [-1, 4, A2C2f, [1024, True, 1]] # 8
30
+
31
+ # YOLO12n head
32
+ head:
33
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
34
+ - [[-1, 6], 1, Concat, [1]] # cat backbone P4
35
+ - [-1, 2, A2C2f, [512, False, -1]] # 11
36
+
37
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
38
+ - [[-1, 4], 1, Concat, [1]] # cat backbone P3
39
+ - [-1, 2, A2C2f, [256, False, -1]] # 14
40
+
41
+ - [-1, 1, Conv, [256, 3, 2]]
42
+ - [[-1, 11], 1, Concat, [1]] # cat head P4
43
+ - [-1, 2, A2C2f, [512, False, -1]] # 17
44
+
45
+ - [-1, 1, Conv, [512, 3, 2]]
46
+ - [[-1, 8], 1, Concat, [1]] # cat head P5
47
+ - [-1, 2, C3k2, [1024, True]] # 20 (P5/32-large)
48
+
49
+ - [[14, 17, 20], 1, Pose, [nc, kpt_shape]] # Detect(P3, P4, P5)
ultralytics/cfg/models/12/yolo12-seg.yaml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # YOLO12-seg instance segmentation model with P3/8 - P5/32 outputs
4
+ # Model docs: https://docs.ultralytics.com/models/yolo12
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=yolo12n-seg.yaml' will call yolo12-seg.yaml with scale 'n'
10
+ # [depth, width, max_channels]
11
+ n: [0.50, 0.25, 1024] # summary: 294 layers, 2,855,056 parameters, 2,855,040 gradients, 10.6 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 294 layers, 9,938,592 parameters, 9,938,576 gradients, 35.7 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 314 layers, 22,505,376 parameters, 22,505,360 gradients, 123.5 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 510 layers, 28,756,992 parameters, 28,756,976 gradients, 145.1 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 510 layers, 64,387,264 parameters, 64,387,248 gradients, 324.6 GFLOPs
16
+
17
+ # YOLO12n 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, 4, A2C2f, [512, True, 4]]
27
+ - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
28
+ - [-1, 4, A2C2f, [1024, True, 1]] # 8
29
+
30
+ # YOLO12n head
31
+ head:
32
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
33
+ - [[-1, 6], 1, Concat, [1]] # cat backbone P4
34
+ - [-1, 2, A2C2f, [512, False, -1]] # 11
35
+
36
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
37
+ - [[-1, 4], 1, Concat, [1]] # cat backbone P3
38
+ - [-1, 2, A2C2f, [256, False, -1]] # 14
39
+
40
+ - [-1, 1, Conv, [256, 3, 2]]
41
+ - [[-1, 11], 1, Concat, [1]] # cat head P4
42
+ - [-1, 2, A2C2f, [512, False, -1]] # 17
43
+
44
+ - [-1, 1, Conv, [512, 3, 2]]
45
+ - [[-1, 8], 1, Concat, [1]] # cat head P5
46
+ - [-1, 2, C3k2, [1024, True]] # 20 (P5/32-large)
47
+
48
+ - [[14, 17, 20], 1, Segment, [nc, 32, 256]] # Detect(P3, P4, P5)
ultralytics/cfg/models/12/yolo12.yaml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
3
+ # YOLO12 object detection model with P3/8 - P5/32 outputs
4
+ # Model docs: https://docs.ultralytics.com/models/yolo12
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=yolo12n.yaml' will call yolo12.yaml with scale 'n'
10
+ # [depth, width, max_channels]
11
+ n: [0.50, 0.25, 1024] # summary: 272 layers, 2,602,288 parameters, 2,602,272 gradients, 6.7 GFLOPs
12
+ s: [0.50, 0.50, 1024] # summary: 272 layers, 9,284,096 parameters, 9,284,080 gradients, 21.7 GFLOPs
13
+ m: [0.50, 1.00, 512] # summary: 292 layers, 20,199,168 parameters, 20,199,152 gradients, 68.1 GFLOPs
14
+ l: [1.00, 1.00, 512] # summary: 488 layers, 26,450,784 parameters, 26,450,768 gradients, 89.7 GFLOPs
15
+ x: [1.00, 1.50, 512] # summary: 488 layers, 59,210,784 parameters, 59,210,768 gradients, 200.3 GFLOPs
16
+
17
+ # YOLO12n 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, 4, A2C2f, [512, True, 4]]
27
+ - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
28
+ - [-1, 4, A2C2f, [1024, True, 1]] # 8
29
+
30
+ # YOLO12n head
31
+ head:
32
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
33
+ - [[-1, 6], 1, Concat, [1]] # cat backbone P4
34
+ - [-1, 2, A2C2f, [512, False, -1]] # 11
35
+
36
+ - [-1, 1, nn.Upsample, [None, 2, "nearest"]]
37
+ - [[-1, 4], 1, Concat, [1]] # cat backbone P3
38
+ - [-1, 2, A2C2f, [256, False, -1]] # 14
39
+
40
+ - [-1, 1, Conv, [256, 3, 2]]
41
+ - [[-1, 11], 1, Concat, [1]] # cat head P4
42
+ - [-1, 2, A2C2f, [512, False, -1]] # 17
43
+
44
+ - [-1, 1, Conv, [512, 3, 2]]
45
+ - [[-1, 8], 1, Concat, [1]] # cat head P5
46
+ - [-1, 2, C3k2, [1024, True]] # 20 (P5/32-large)
47
+
48
+ - [[14, 17, 20], 1, Detect, [nc]] # Detect(P3, P4, P5)
ultralytics/cfg/models/README.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Models
2
+
3
+ Welcome to the [Ultralytics](https://www.ultralytics.com/) Models directory! Here you will find a wide variety of pre-configured model configuration files (`*.yaml`s) that can be used to create custom YOLO models. The models in this directory have been expertly crafted and fine-tuned by the Ultralytics team to provide the best performance for a wide range of object detection and image segmentation tasks.
4
+
5
+ These model configurations cover a wide range of scenarios, from simple object detection to more complex tasks like instance segmentation and object tracking. They are also designed to run efficiently on a variety of hardware platforms, from CPUs to GPUs. Whether you are a seasoned machine learning practitioner or just getting started with YOLO, this directory provides a great starting point for your custom model development needs.
6
+
7
+ To get started, simply browse through the models in this directory and find one that best suits your needs. Once you've selected a model, you can use the provided `*.yaml` file to train and deploy your custom YOLO model with ease. See full details at the Ultralytics [Docs](https://docs.ultralytics.com/models/), and if you need help or have any questions, feel free to reach out to the Ultralytics team for support. So, don't wait, start creating your custom YOLO model now!
8
+
9
+ ### Usage
10
+
11
+ Model `*.yaml` files may be used directly in the [Command Line Interface (CLI)](https://docs.ultralytics.com/usage/cli/) with a `yolo` command:
12
+
13
+ ```bash
14
+ # Train a YOLO11n model using the coco8 dataset for 100 epochs
15
+ yolo task=detect mode=train model=yolo11n.yaml data=coco8.yaml epochs=100
16
+ ```
17
+
18
+ They may also be used directly in a Python environment, and accept the same [arguments](https://docs.ultralytics.com/usage/cfg/) as in the CLI example above:
19
+
20
+ ```python
21
+ from ultralytics import YOLO
22
+
23
+ # Initialize a YOLO11n model from a YAML configuration file
24
+ model = YOLO("model.yaml")
25
+
26
+ # If a pre-trained model is available, use it instead
27
+ # model = YOLO("model.pt")
28
+
29
+ # Display model information
30
+ model.info()
31
+
32
+ # Train the model using the COCO8 dataset for 100 epochs
33
+ model.train(data="coco8.yaml", epochs=100)
34
+ ```
35
+
36
+ ## Pre-trained Model Architectures
37
+
38
+ Ultralytics supports many model architectures. Visit [Ultralytics Models](https://docs.ultralytics.com/models/) to view detailed information and usage. Any of these models can be used by loading their configurations or pretrained checkpoints if available.
39
+
40
+ ## Contribute New Models
41
+
42
+ Have you trained a new YOLO variant or achieved state-of-the-art performance with specific tuning? We'd love to showcase your work in our Models section! Contributions from the community in the form of new models, architectures, or optimizations are highly valued and can significantly enrich our repository.
43
+
44
+ By contributing to this section, you're helping us offer a wider array of model choices and configurations to the community. It's a fantastic way to share your knowledge and expertise while making the Ultralytics YOLO ecosystem even more versatile.
45
+
46
+ To get started, please consult our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for step-by-step instructions on how to submit a Pull Request (PR) 🛠️. Your contributions are eagerly awaited!
47
+
48
+ Let's join hands to extend the range and capabilities of the Ultralytics YOLO models 🙏!