dgenerate-ultralytics-headless 8.3.137__py3-none-any.whl → 8.3.224__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/METADATA +41 -34
  2. dgenerate_ultralytics_headless-8.3.224.dist-info/RECORD +285 -0
  3. {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/WHEEL +1 -1
  4. tests/__init__.py +7 -6
  5. tests/conftest.py +15 -39
  6. tests/test_cli.py +17 -17
  7. tests/test_cuda.py +17 -8
  8. tests/test_engine.py +36 -10
  9. tests/test_exports.py +98 -37
  10. tests/test_integrations.py +12 -15
  11. tests/test_python.py +126 -82
  12. tests/test_solutions.py +319 -135
  13. ultralytics/__init__.py +27 -9
  14. ultralytics/cfg/__init__.py +83 -87
  15. ultralytics/cfg/datasets/Argoverse.yaml +4 -4
  16. ultralytics/cfg/datasets/DOTAv1.5.yaml +2 -2
  17. ultralytics/cfg/datasets/DOTAv1.yaml +2 -2
  18. ultralytics/cfg/datasets/GlobalWheat2020.yaml +2 -2
  19. ultralytics/cfg/datasets/HomeObjects-3K.yaml +4 -5
  20. ultralytics/cfg/datasets/ImageNet.yaml +3 -3
  21. ultralytics/cfg/datasets/Objects365.yaml +24 -20
  22. ultralytics/cfg/datasets/SKU-110K.yaml +9 -9
  23. ultralytics/cfg/datasets/VOC.yaml +10 -13
  24. ultralytics/cfg/datasets/VisDrone.yaml +43 -33
  25. ultralytics/cfg/datasets/african-wildlife.yaml +5 -5
  26. ultralytics/cfg/datasets/brain-tumor.yaml +4 -5
  27. ultralytics/cfg/datasets/carparts-seg.yaml +5 -5
  28. ultralytics/cfg/datasets/coco-pose.yaml +26 -4
  29. ultralytics/cfg/datasets/coco.yaml +4 -4
  30. ultralytics/cfg/datasets/coco128-seg.yaml +2 -2
  31. ultralytics/cfg/datasets/coco128.yaml +2 -2
  32. ultralytics/cfg/datasets/coco8-grayscale.yaml +103 -0
  33. ultralytics/cfg/datasets/coco8-multispectral.yaml +2 -2
  34. ultralytics/cfg/datasets/coco8-pose.yaml +23 -2
  35. ultralytics/cfg/datasets/coco8-seg.yaml +2 -2
  36. ultralytics/cfg/datasets/coco8.yaml +2 -2
  37. ultralytics/cfg/datasets/construction-ppe.yaml +32 -0
  38. ultralytics/cfg/datasets/crack-seg.yaml +5 -5
  39. ultralytics/cfg/datasets/dog-pose.yaml +32 -4
  40. ultralytics/cfg/datasets/dota8-multispectral.yaml +2 -2
  41. ultralytics/cfg/datasets/dota8.yaml +2 -2
  42. ultralytics/cfg/datasets/hand-keypoints.yaml +29 -4
  43. ultralytics/cfg/datasets/lvis.yaml +9 -9
  44. ultralytics/cfg/datasets/medical-pills.yaml +4 -5
  45. ultralytics/cfg/datasets/open-images-v7.yaml +7 -10
  46. ultralytics/cfg/datasets/package-seg.yaml +5 -5
  47. ultralytics/cfg/datasets/signature.yaml +4 -4
  48. ultralytics/cfg/datasets/tiger-pose.yaml +20 -4
  49. ultralytics/cfg/datasets/xView.yaml +5 -5
  50. ultralytics/cfg/default.yaml +96 -93
  51. ultralytics/cfg/trackers/botsort.yaml +16 -17
  52. ultralytics/cfg/trackers/bytetrack.yaml +9 -11
  53. ultralytics/data/__init__.py +4 -4
  54. ultralytics/data/annotator.py +12 -12
  55. ultralytics/data/augment.py +531 -564
  56. ultralytics/data/base.py +76 -81
  57. ultralytics/data/build.py +206 -42
  58. ultralytics/data/converter.py +179 -78
  59. ultralytics/data/dataset.py +121 -121
  60. ultralytics/data/loaders.py +114 -91
  61. ultralytics/data/split.py +28 -15
  62. ultralytics/data/split_dota.py +67 -48
  63. ultralytics/data/utils.py +110 -89
  64. ultralytics/engine/exporter.py +422 -460
  65. ultralytics/engine/model.py +224 -252
  66. ultralytics/engine/predictor.py +94 -89
  67. ultralytics/engine/results.py +345 -595
  68. ultralytics/engine/trainer.py +231 -134
  69. ultralytics/engine/tuner.py +279 -73
  70. ultralytics/engine/validator.py +53 -46
  71. ultralytics/hub/__init__.py +26 -28
  72. ultralytics/hub/auth.py +30 -16
  73. ultralytics/hub/google/__init__.py +34 -36
  74. ultralytics/hub/session.py +53 -77
  75. ultralytics/hub/utils.py +23 -109
  76. ultralytics/models/__init__.py +1 -1
  77. ultralytics/models/fastsam/__init__.py +1 -1
  78. ultralytics/models/fastsam/model.py +36 -18
  79. ultralytics/models/fastsam/predict.py +33 -44
  80. ultralytics/models/fastsam/utils.py +4 -5
  81. ultralytics/models/fastsam/val.py +12 -14
  82. ultralytics/models/nas/__init__.py +1 -1
  83. ultralytics/models/nas/model.py +16 -20
  84. ultralytics/models/nas/predict.py +12 -14
  85. ultralytics/models/nas/val.py +4 -5
  86. ultralytics/models/rtdetr/__init__.py +1 -1
  87. ultralytics/models/rtdetr/model.py +9 -9
  88. ultralytics/models/rtdetr/predict.py +22 -17
  89. ultralytics/models/rtdetr/train.py +20 -16
  90. ultralytics/models/rtdetr/val.py +79 -59
  91. ultralytics/models/sam/__init__.py +8 -2
  92. ultralytics/models/sam/amg.py +53 -38
  93. ultralytics/models/sam/build.py +29 -31
  94. ultralytics/models/sam/model.py +33 -38
  95. ultralytics/models/sam/modules/blocks.py +159 -182
  96. ultralytics/models/sam/modules/decoders.py +38 -47
  97. ultralytics/models/sam/modules/encoders.py +114 -133
  98. ultralytics/models/sam/modules/memory_attention.py +38 -31
  99. ultralytics/models/sam/modules/sam.py +114 -93
  100. ultralytics/models/sam/modules/tiny_encoder.py +268 -291
  101. ultralytics/models/sam/modules/transformer.py +59 -66
  102. ultralytics/models/sam/modules/utils.py +55 -72
  103. ultralytics/models/sam/predict.py +745 -341
  104. ultralytics/models/utils/loss.py +118 -107
  105. ultralytics/models/utils/ops.py +118 -71
  106. ultralytics/models/yolo/__init__.py +1 -1
  107. ultralytics/models/yolo/classify/predict.py +28 -26
  108. ultralytics/models/yolo/classify/train.py +50 -81
  109. ultralytics/models/yolo/classify/val.py +68 -61
  110. ultralytics/models/yolo/detect/predict.py +12 -15
  111. ultralytics/models/yolo/detect/train.py +56 -46
  112. ultralytics/models/yolo/detect/val.py +279 -223
  113. ultralytics/models/yolo/model.py +167 -86
  114. ultralytics/models/yolo/obb/predict.py +7 -11
  115. ultralytics/models/yolo/obb/train.py +23 -25
  116. ultralytics/models/yolo/obb/val.py +107 -99
  117. ultralytics/models/yolo/pose/__init__.py +1 -1
  118. ultralytics/models/yolo/pose/predict.py +12 -14
  119. ultralytics/models/yolo/pose/train.py +31 -69
  120. ultralytics/models/yolo/pose/val.py +119 -254
  121. ultralytics/models/yolo/segment/predict.py +21 -25
  122. ultralytics/models/yolo/segment/train.py +12 -66
  123. ultralytics/models/yolo/segment/val.py +126 -305
  124. ultralytics/models/yolo/world/train.py +53 -45
  125. ultralytics/models/yolo/world/train_world.py +51 -32
  126. ultralytics/models/yolo/yoloe/__init__.py +7 -7
  127. ultralytics/models/yolo/yoloe/predict.py +30 -37
  128. ultralytics/models/yolo/yoloe/train.py +89 -71
  129. ultralytics/models/yolo/yoloe/train_seg.py +15 -17
  130. ultralytics/models/yolo/yoloe/val.py +56 -41
  131. ultralytics/nn/__init__.py +9 -11
  132. ultralytics/nn/autobackend.py +179 -107
  133. ultralytics/nn/modules/__init__.py +67 -67
  134. ultralytics/nn/modules/activation.py +8 -7
  135. ultralytics/nn/modules/block.py +302 -323
  136. ultralytics/nn/modules/conv.py +61 -104
  137. ultralytics/nn/modules/head.py +488 -186
  138. ultralytics/nn/modules/transformer.py +183 -123
  139. ultralytics/nn/modules/utils.py +15 -20
  140. ultralytics/nn/tasks.py +327 -203
  141. ultralytics/nn/text_model.py +81 -65
  142. ultralytics/py.typed +1 -0
  143. ultralytics/solutions/__init__.py +12 -12
  144. ultralytics/solutions/ai_gym.py +19 -27
  145. ultralytics/solutions/analytics.py +36 -26
  146. ultralytics/solutions/config.py +29 -28
  147. ultralytics/solutions/distance_calculation.py +23 -24
  148. ultralytics/solutions/heatmap.py +17 -19
  149. ultralytics/solutions/instance_segmentation.py +21 -19
  150. ultralytics/solutions/object_blurrer.py +16 -17
  151. ultralytics/solutions/object_counter.py +48 -53
  152. ultralytics/solutions/object_cropper.py +22 -16
  153. ultralytics/solutions/parking_management.py +61 -58
  154. ultralytics/solutions/queue_management.py +19 -19
  155. ultralytics/solutions/region_counter.py +63 -50
  156. ultralytics/solutions/security_alarm.py +22 -25
  157. ultralytics/solutions/similarity_search.py +107 -60
  158. ultralytics/solutions/solutions.py +343 -262
  159. ultralytics/solutions/speed_estimation.py +35 -31
  160. ultralytics/solutions/streamlit_inference.py +104 -40
  161. ultralytics/solutions/templates/similarity-search.html +31 -24
  162. ultralytics/solutions/trackzone.py +24 -24
  163. ultralytics/solutions/vision_eye.py +11 -12
  164. ultralytics/trackers/__init__.py +1 -1
  165. ultralytics/trackers/basetrack.py +18 -27
  166. ultralytics/trackers/bot_sort.py +48 -39
  167. ultralytics/trackers/byte_tracker.py +94 -94
  168. ultralytics/trackers/track.py +7 -16
  169. ultralytics/trackers/utils/gmc.py +37 -69
  170. ultralytics/trackers/utils/kalman_filter.py +68 -76
  171. ultralytics/trackers/utils/matching.py +13 -17
  172. ultralytics/utils/__init__.py +251 -275
  173. ultralytics/utils/autobatch.py +19 -7
  174. ultralytics/utils/autodevice.py +68 -38
  175. ultralytics/utils/benchmarks.py +169 -130
  176. ultralytics/utils/callbacks/base.py +12 -13
  177. ultralytics/utils/callbacks/clearml.py +14 -15
  178. ultralytics/utils/callbacks/comet.py +139 -66
  179. ultralytics/utils/callbacks/dvc.py +19 -27
  180. ultralytics/utils/callbacks/hub.py +8 -6
  181. ultralytics/utils/callbacks/mlflow.py +6 -10
  182. ultralytics/utils/callbacks/neptune.py +11 -19
  183. ultralytics/utils/callbacks/platform.py +73 -0
  184. ultralytics/utils/callbacks/raytune.py +3 -4
  185. ultralytics/utils/callbacks/tensorboard.py +9 -12
  186. ultralytics/utils/callbacks/wb.py +33 -30
  187. ultralytics/utils/checks.py +163 -114
  188. ultralytics/utils/cpu.py +89 -0
  189. ultralytics/utils/dist.py +24 -20
  190. ultralytics/utils/downloads.py +176 -146
  191. ultralytics/utils/errors.py +11 -13
  192. ultralytics/utils/events.py +113 -0
  193. ultralytics/utils/export/__init__.py +7 -0
  194. ultralytics/utils/{export.py → export/engine.py} +81 -63
  195. ultralytics/utils/export/imx.py +294 -0
  196. ultralytics/utils/export/tensorflow.py +217 -0
  197. ultralytics/utils/files.py +33 -36
  198. ultralytics/utils/git.py +137 -0
  199. ultralytics/utils/instance.py +105 -120
  200. ultralytics/utils/logger.py +404 -0
  201. ultralytics/utils/loss.py +99 -61
  202. ultralytics/utils/metrics.py +649 -478
  203. ultralytics/utils/nms.py +337 -0
  204. ultralytics/utils/ops.py +263 -451
  205. ultralytics/utils/patches.py +70 -31
  206. ultralytics/utils/plotting.py +253 -223
  207. ultralytics/utils/tal.py +48 -61
  208. ultralytics/utils/torch_utils.py +244 -251
  209. ultralytics/utils/tqdm.py +438 -0
  210. ultralytics/utils/triton.py +22 -23
  211. ultralytics/utils/tuner.py +11 -10
  212. dgenerate_ultralytics_headless-8.3.137.dist-info/RECORD +0 -272
  213. {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/entry_points.txt +0 -0
  214. {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/licenses/LICENSE +0 -0
  215. {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/top_level.txt +0 -0
@@ -6,12 +6,12 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── dog-pose ← downloads here (337 MB)
9
+ # └── dog-pose ← downloads here (337 MB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- 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
12
+ path: dog-pose # dataset root dir
13
+ train: images/train # train images (relative to 'path') 6773 images
14
+ val: images/val # val images (relative to 'path') 1703 images
15
15
 
16
16
  # Keypoints
17
17
  kpt_shape: [24, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
@@ -20,5 +20,33 @@ kpt_shape: [24, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y
20
20
  names:
21
21
  0: dog
22
22
 
23
+ # Keypoint names per class
24
+ kpt_names:
25
+ 0:
26
+ - front_left_paw
27
+ - front_left_knee
28
+ - front_left_elbow
29
+ - rear_left_paw
30
+ - rear_left_knee
31
+ - rear_left_elbow
32
+ - front_right_paw
33
+ - front_right_knee
34
+ - front_right_elbow
35
+ - rear_right_paw
36
+ - rear_right_knee
37
+ - rear_right_elbow
38
+ - tail_start
39
+ - tail_end
40
+ - left_ear_base
41
+ - right_ear_base
42
+ - nose
43
+ - chin
44
+ - left_ear_tip
45
+ - right_ear_tip
46
+ - left_eye
47
+ - right_eye
48
+ - withers
49
+ - throat
50
+
23
51
  # Download script/URL (optional)
24
52
  download: https://github.com/ultralytics/assets/releases/download/v0.0.0/dog-pose.zip
@@ -6,10 +6,10 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── dota8-multispectral ← downloads here (37.3MB)
9
+ # └── dota8-multispectral ← downloads here (37.3MB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- path: ../datasets/dota8-multispectral # dataset root dir
12
+ path: dota8-multispectral # dataset root dir
13
13
  train: images/train # train images (relative to 'path') 4 images
14
14
  val: images/val # val images (relative to 'path') 4 images
15
15
 
@@ -6,10 +6,10 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── dota8 ← downloads here (1MB)
9
+ # └── dota8 ← downloads here (1MB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- path: ../datasets/dota8 # dataset root dir
12
+ path: dota8 # dataset root dir
13
13
  train: images/train # train images (relative to 'path') 4 images
14
14
  val: images/val # val images (relative to 'path') 4 images
15
15
 
@@ -6,12 +6,12 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── hand-keypoints ← downloads here (369 MB)
9
+ # └── hand-keypoints ← downloads here (369 MB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- 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
12
+ path: hand-keypoints # dataset root dir
13
+ train: images/train # train images (relative to 'path') 18776 images
14
+ val: images/val # val images (relative to 'path') 7992 images
15
15
 
16
16
  # Keypoints
17
17
  kpt_shape: [21, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
@@ -22,5 +22,30 @@ flip_idx:
22
22
  names:
23
23
  0: hand
24
24
 
25
+ # Keypoint names per class
26
+ kpt_names:
27
+ 0:
28
+ - wrist
29
+ - thumb_cmc
30
+ - thumb_mcp
31
+ - thumb_ip
32
+ - thumb_tip
33
+ - index_mcp
34
+ - index_pip
35
+ - index_dip
36
+ - index_tip
37
+ - middle_mcp
38
+ - middle_pip
39
+ - middle_dip
40
+ - middle_tip
41
+ - ring_mcp
42
+ - ring_pip
43
+ - ring_dip
44
+ - ring_tip
45
+ - pinky_mcp
46
+ - pinky_pip
47
+ - pinky_dip
48
+ - pinky_tip
49
+
25
50
  # Download script/URL (optional)
26
51
  download: https://github.com/ultralytics/assets/releases/download/v0.0.0/hand-keypoints.zip
@@ -6,10 +6,10 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── lvis ← downloads here (20.1 GB)
9
+ # └── lvis ← downloads here (20.1 GB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- path: ../datasets/lvis # dataset root dir
12
+ path: lvis # dataset root dir
13
13
  train: train.txt # train images (relative to 'path') 100170 images
14
14
  val: val.txt # val images (relative to 'path') 19809 images
15
15
  minival: minival.txt # minival images (relative to 'path') 5000 images
@@ -35,7 +35,7 @@ names:
35
35
  17: armband
36
36
  18: armchair
37
37
  19: armoire
38
- 20: armor/armour
38
+ 20: armor
39
39
  21: artichoke
40
40
  22: trash can/garbage can/wastebin/dustbin/trash barrel/trash bin
41
41
  23: ashtray
@@ -245,7 +245,7 @@ names:
245
245
  227: CD player
246
246
  228: celery
247
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
248
+ 230: chain mail/ring mail/chain armor/ring armor
249
249
  231: chair
250
250
  232: chaise longue/chaise/daybed
251
251
  233: chalice
@@ -305,7 +305,7 @@ names:
305
305
  287: coin
306
306
  288: colander/cullender
307
307
  289: coleslaw/slaw
308
- 290: coloring material/colouring material
308
+ 290: coloring material
309
309
  291: combination lock
310
310
  292: pacifier/teething ring
311
311
  293: comic book
@@ -401,7 +401,7 @@ names:
401
401
  383: domestic ass/donkey
402
402
  384: doorknob/doorhandle
403
403
  385: doormat/welcome mat
404
- 386: doughnut/donut
404
+ 386: donut
405
405
  387: dove
406
406
  388: dragonfly
407
407
  389: drawer
@@ -1072,7 +1072,7 @@ names:
1072
1072
  1054: tag
1073
1073
  1055: taillight/rear light
1074
1074
  1056: tambourine
1075
- 1057: army tank/armored combat vehicle/armoured combat vehicle
1075
+ 1057: army tank/armored combat vehicle
1076
1076
  1058: tank/tank storage vessel/storage tank
1077
1077
  1059: tank top/tank top clothing
1078
1078
  1060: tape/tape sticky cloth or paper
@@ -1223,12 +1223,12 @@ names:
1223
1223
  download: |
1224
1224
  from pathlib import Path
1225
1225
 
1226
+ from ultralytics.utils import ASSETS_URL
1226
1227
  from ultralytics.utils.downloads import download
1227
1228
 
1228
1229
  # Download labels
1229
1230
  dir = Path(yaml["path"]) # dataset root dir
1230
- url = "https://github.com/ultralytics/assets/releases/download/v0.0.0/"
1231
- urls = [f"{url}lvis-labels-segments.zip"]
1231
+ urls = [f"{ASSETS_URL}/lvis-labels-segments.zip"]
1232
1232
  download(urls, dir=dir.parent)
1233
1233
 
1234
1234
  # Download data
@@ -6,13 +6,12 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── medical-pills ← downloads here (8.19 MB)
9
+ # └── medical-pills ← downloads here (8.19 MB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- 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')
12
+ path: medical-pills # dataset root dir
13
+ train: images/train # train images (relative to 'path') 92 images
14
+ val: images/val # val images (relative to 'path') 23 images
16
15
 
17
16
  # Classes
18
17
  names:
@@ -6,10 +6,10 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── open-images-v7 ← downloads here (561 GB)
9
+ # └── open-images-v7 ← downloads here (561 GB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- path: ../datasets/open-images-v7 # dataset root dir
12
+ path: open-images-v7 # dataset root dir
13
13
  train: images/train # train images (relative to 'path') 1743042 images
14
14
  val: images/val # val images (relative to 'path') 41620 images
15
15
  test: # test images (optional)
@@ -182,7 +182,7 @@ names:
182
182
  163: Dolphin
183
183
  164: Door
184
184
  165: Door handle
185
- 166: Doughnut
185
+ 166: Donut
186
186
  167: Dragonfly
187
187
  168: Drawer
188
188
  169: Dress
@@ -622,21 +622,18 @@ names:
622
622
  download: |
623
623
  import warnings
624
624
 
625
- from ultralytics.utils import LOGGER, SETTINGS, Path, get_ubuntu_version, is_ubuntu
626
- from ultralytics.utils.checks import check_requirements, check_version
625
+ from ultralytics.utils import LOGGER, SETTINGS, Path
626
+ from ultralytics.utils.checks import check_requirements
627
627
 
628
628
  check_requirements("fiftyone")
629
- if is_ubuntu() and check_version(get_ubuntu_version(), ">=22.04"):
630
- # Ubuntu>=22.04 patch https://github.com/voxel51/fiftyone/issues/2961#issuecomment-1666519347
631
- check_requirements("fiftyone-db-ubuntu2204")
632
-
629
+
633
630
  import fiftyone as fo
634
631
  import fiftyone.zoo as foz
635
632
 
636
633
  name = "open-images-v7"
637
634
  fo.config.dataset_zoo_dir = Path(SETTINGS["datasets_dir"]) / "fiftyone" / name
638
635
  fraction = 1.0 # fraction of full dataset to use
639
- LOGGER.warning("WARNING ⚠️ Open Images V7 dataset requires at least **561 GB of free space. Starting download...")
636
+ LOGGER.warning("Open Images V7 dataset requires at least **561 GB of free space. Starting download...")
640
637
  for split in "train", "validation": # 1743042 train, 41620 val images
641
638
  train = split == "train"
642
639
 
@@ -6,13 +6,13 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── package-seg ← downloads here (102 MB)
9
+ # └── package-seg ← downloads here (103 MB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- 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
12
+ path: package-seg # dataset root dir
13
+ train: images/train # train images (relative to 'path') 1920 images
14
+ val: images/val # val images (relative to 'path') 89 images
15
+ test: images/test # test images (relative to 'path') 188 images
16
16
 
17
17
  # Classes
18
18
  names:
@@ -6,12 +6,12 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── signature ← downloads here (11.2 MB)
9
+ # └── signature ← downloads here (11.3 MB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- 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
12
+ path: signature # dataset root dir
13
+ train: images/train # train images (relative to 'path') 143 images
14
+ val: images/val # val images (relative to 'path') 35 images
15
15
 
16
16
  # Classes
17
17
  names:
@@ -6,12 +6,12 @@
6
6
  # parent
7
7
  # ├── ultralytics
8
8
  # └── datasets
9
- # └── tiger-pose ← downloads here (75.3 MB)
9
+ # └── tiger-pose ← downloads here (49.8 MB)
10
10
 
11
11
  # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
12
- 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
12
+ path: tiger-pose # dataset root dir
13
+ train: images/train # train images (relative to 'path') 210 images
14
+ val: images/val # val images (relative to 'path') 53 images
15
15
 
16
16
  # Keypoints
17
17
  kpt_shape: [12, 2] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
@@ -21,5 +21,21 @@ flip_idx: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
21
21
  names:
22
22
  0: tiger
23
23
 
24
+ # Keypoint names per class
25
+ kpt_names:
26
+ 0:
27
+ - nose
28
+ - head
29
+ - withers
30
+ - tail_base
31
+ - right_hind_hock
32
+ - right_hind_paw
33
+ - left_hind_paw
34
+ - left_hind_hock
35
+ - right_front_wrist
36
+ - right_front_paw
37
+ - left_front_wrist
38
+ - left_front_paw
39
+
24
40
  # Download script/URL (optional)
25
41
  download: https://github.com/ultralytics/assets/releases/download/v0.0.0/tiger-pose.zip
@@ -7,10 +7,10 @@
7
7
  # parent
8
8
  # ├── ultralytics
9
9
  # └── datasets
10
- # └── xView ← downloads here (20.7 GB)
10
+ # └── xView ← downloads here (20.7 GB)
11
11
 
12
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
13
+ path: xView # dataset root dir
14
14
  train: images/autosplit_train.txt # train images (relative to 'path') 90% of 847 train images
15
15
  val: images/autosplit_val.txt # train images (relative to 'path') 10% of 847 train images
16
16
 
@@ -85,9 +85,9 @@ download: |
85
85
 
86
86
  import numpy as np
87
87
  from PIL import Image
88
- from tqdm import tqdm
89
88
 
90
- from ultralytics.data.utils import autosplit
89
+ from ultralytics.utils import TQDM
90
+ from ultralytics.data.split import autosplit
91
91
  from ultralytics.utils.ops import xyxy2xywhn
92
92
 
93
93
 
@@ -110,7 +110,7 @@ download: |
110
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
111
 
112
112
  shapes = {}
113
- for feature in tqdm(data["features"], desc=f"Converting {fname}"):
113
+ for feature in TQDM(data["features"], desc=f"Converting {fname}"):
114
114
  p = feature["properties"]
115
115
  if p["bounds_imcoords"]:
116
116
  id = p["image_id"]
@@ -7,121 +7,124 @@ task: detect # (str) YOLO task, i.e. detect, segment, classify, pose, obb
7
7
  mode: train # (str) YOLO mode, i.e. train, val, predict, export, track, benchmark
8
8
 
9
9
  # Train settings -------------------------------------------------------------------------------------------------------
10
- model: # (str, optional) path to model file, i.e. yolov8n.pt, yolov8n.yaml
10
+ model: # (str, optional) path to model file, i.e. yolov8n.pt or yolov8n.yaml
11
11
  data: # (str, optional) path to data file, i.e. coco8.yaml
12
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
13
+ time: # (float, optional) max hours to train; overrides epochs if set
14
+ patience: 100 # (int) early stop after N epochs without val improvement
15
+ batch: 16 # (int) batch size; use -1 for AutoBatch
16
+ imgsz: 640 # (int | list) train/val use int (square); predict/export may use [h,w]
17
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) device: CUDA device=0 or [0,1,2,3] or "cpu/mps" or -1 or [-1,-1] to auto-select idle GPUs
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
18
+ save_period: -1 # (int) save checkpoint every N epochs; disabled if < 1
19
+ cache: False # (bool | str) cache images in RAM (True/'ram') or on 'disk' to speed dataloading; False disables
20
+ device: # (int | str | list) device: 0 or [0,1,2,3] for CUDA, 'cpu'/'mps', or -1/[-1,-1] to auto-select idle GPUs
21
+ workers: 8 # (int) dataloader workers (per RANK if DDP)
22
+ project: # (str, optional) project name for results root
23
+ name: # (str, optional) experiment name; results in 'project/name'
24
+ exist_ok: False # (bool) overwrite existing 'project/name' if True
25
+ pretrained: True # (bool | str) use pretrained weights (bool) or load weights from path (str)
26
+ optimizer: auto # (str) optimizer: SGD, Adam, Adamax, AdamW, NAdam, RAdam, RMSProp, or auto
27
+ verbose: True # (bool) print verbose logs during training/val
28
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: # (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
29
+ deterministic: True # (bool) enable deterministic ops; reproducible but may be slower
30
+ single_cls: False # (bool) treat all classes as a single class
31
+ rect: False # (bool) rectangular batches for train; rectangular batching for val when mode='val'
32
+ cos_lr: False # (bool) cosine learning rate scheduler
33
+ close_mosaic: 10 # (int) disable mosaic augmentation for final N epochs (0 to keep enabled)
34
+ resume: False # (bool) resume training from last checkpoint in the run dir
35
+ amp: True # (bool) Automatic Mixed Precision (AMP) training; True runs AMP capability check
36
+ fraction: 1.0 # (float) fraction of training dataset to use (1.0 = all)
37
+ profile: False # (bool) profile ONNX/TensorRT speeds during training for loggers
38
+ freeze: # (int | list, optional) freeze first N layers (int) or specific layer indices (list)
39
+ multi_scale: False # (bool) multiscale training by varying image size
40
+ compile: False # (bool | str) enable torch.compile() backend='inductor'; True="default", False=off, or "default|reduce-overhead|max-autotune-no-cudagraphs"
41
+
40
42
  # 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
+ overlap_mask: True # (bool) merge instance masks into one mask during training (segment only)
44
+ mask_ratio: 4 # (int) mask downsample ratio (segment only)
45
+
43
46
  # Classification
44
- dropout: 0.0 # (float) use dropout regularization (classify train only)
47
+ dropout: 0.0 # (float) dropout for classification head (classify only)
45
48
 
46
49
  # 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
- conf: # (float, optional) object confidence threshold for detection (default 0.25 predict, 0.001 val)
51
- iou: 0.7 # (float) intersection over union (IoU) threshold for NMS
50
+ val: True # (bool) run validation/testing during training
51
+ split: val # (str) dataset split to evaluate: 'val', 'test' or 'train'
52
+ save_json: False # (bool) save results to COCO JSON for external evaluation
53
+ conf: # (float, optional) confidence threshold; defaults: predict=0.25, val=0.001
54
+ iou: 0.7 # (float) IoU threshold used for NMS
52
55
  max_det: 300 # (int) maximum number of detections per image
53
- half: False # (bool) use half precision (FP16)
56
+ half: False # (bool) use half precision (FP16) if supported
54
57
  dnn: False # (bool) use OpenCV DNN for ONNX inference
55
58
  plots: True # (bool) save plots and images during train/val
56
59
 
57
60
  # Predict settings -----------------------------------------------------------------------------------------------------
58
- source: # (str, optional) source directory for images or videos
59
- vid_stride: 1 # (int) video frame-rate stride
60
- stream_buffer: False # (bool) buffer all streaming frames (True) or return the most recent frame (False)
61
- visualize: False # (bool) visualize model features
62
- augment: False # (bool) apply image augmentation to prediction sources
61
+ source: # (str, optional) path/dir/URL/stream for images or videos; e.g. 'ultralytics/assets' or '0' for webcam
62
+ vid_stride: 1 # (int) read every Nth frame for video sources
63
+ stream_buffer: False # (bool) True buffers all frames; False keeps the most recent frame for low-latency streams
64
+ visualize: False # (bool) visualize model features (predict) or TP/FP/FN confusion (val)
65
+ augment: False # (bool) apply test-time augmentation during prediction
63
66
  agnostic_nms: False # (bool) class-agnostic NMS
64
- classes: # (int | list[int], optional) filter results by class, i.e. classes=0, or classes=[0,2,3]
65
- retina_masks: False # (bool) use high-resolution segmentation masks
66
- embed: # (list[int], optional) return feature vectors/embeddings from given layers
67
+ classes: # (int | list[int], optional) filter by class id(s), e.g. 0 or [0,2,3]
68
+ retina_masks: False # (bool) use high-resolution segmentation masks (segment)
69
+ embed: # (list[int], optional) return feature embeddings from given layer indices
67
70
 
68
71
  # Visualize settings ---------------------------------------------------------------------------------------------------
69
- show: False # (bool) show predicted images and videos if environment allows
70
- save_frames: False # (bool) save predicted individual video frames
71
- save_txt: False # (bool) save results as .txt file
72
- save_conf: False # (bool) save results with confidence scores
73
- save_crop: False # (bool) save cropped images with results
74
- show_labels: True # (bool) show prediction labels, i.e. 'person'
75
- show_conf: True # (bool) show prediction confidence, i.e. '0.99'
76
- show_boxes: True # (bool) show prediction boxes
77
- line_width: # (int, optional) line width of the bounding boxes. Scaled to image size if None.
72
+ show: False # (bool) show images/videos in a window if supported
73
+ save_frames: False # (bool) save individual frames from video predictions
74
+ save_txt: False # (bool) save results as .txt files (xywh format)
75
+ save_conf: False # (bool) save confidence scores with results
76
+ save_crop: False # (bool) save cropped prediction regions to files
77
+ show_labels: True # (bool) draw class labels on images, e.g. 'person'
78
+ show_conf: True # (bool) draw confidence values on images, e.g. '0.99'
79
+ show_boxes: True # (bool) draw bounding boxes on images
80
+ line_width: # (int, optional) line width of boxes; auto-scales with image size if not set
78
81
 
79
82
  # Export settings ------------------------------------------------------------------------------------------------------
80
- format: torchscript # (str) format to export to, choices at https://docs.ultralytics.com/modes/export/#export-formats
81
- keras: False # (bool) use Kera=s
82
- optimize: False # (bool) TorchScript: optimize for mobile
83
- int8: False # (bool) CoreML/TF INT8 quantization
84
- dynamic: False # (bool) ONNX/TF/TensorRT: dynamic axes
85
- simplify: True # (bool) ONNX: simplify model using `onnxslim`
86
- opset: # (int, optional) ONNX: opset version
87
- workspace: # (float, optional) TensorRT: workspace size (GiB), `None` will let TensorRT auto-allocate memory
88
- nms: False # (bool) CoreML: add NMS
83
+ format: torchscript # (str) target format, e.g. torchscript|onnx|openvino|engine|coreml|saved_model|pb|tflite|edgetpu|tfjs|paddle|mnn|ncnn|imx|rknn|executorch
84
+ keras: False # (bool) TF SavedModel only (format=saved_model); enable Keras layers during export
85
+ optimize: False # (bool) TorchScript only; apply mobile optimizations to the scripted model
86
+ int8: False # (bool) INT8/PTQ where supported (openvino, tflite, tfjs, engine, imx); needs calibration data/fraction
87
+ dynamic: False # (bool) dynamic shapes for torchscript, onnx, openvino, engine; enable variable image sizes
88
+ simplify: True # (bool) ONNX/engine only; run graph simplifier for cleaner ONNX before runtime conversion
89
+ opset: # (int, optional) ONNX/engine only; opset version for export; leave unset to use a tested default
90
+ workspace: # (float, optional) engine (TensorRT) only; workspace size in GiB, e.g. 4
91
+ nms: False # (bool) fuse NMS into exported model when backend supports; if True, conf/iou apply (agnostic_nms except coreml)
89
92
 
90
93
  # Hyperparameters ------------------------------------------------------------------------------------------------------
91
- lr0: 0.01 # (float) initial learning rate (i.e. SGD=1E-2, Adam=1E-3)
92
- lrf: 0.01 # (float) final learning rate (lr0 * lrf)
93
- momentum: 0.937 # (float) SGD momentum/Adam beta1
94
- weight_decay: 0.0005 # (float) optimizer weight decay 5e-4
95
- warmup_epochs: 3.0 # (float) warmup epochs (fractions ok)
96
- warmup_momentum: 0.8 # (float) warmup initial momentum
97
- warmup_bias_lr: 0.1 # (float) warmup initial bias lr
94
+ lr0: 0.01 # (float) initial learning rate (SGD=1e-2, Adam/AdamW=1e-3)
95
+ lrf: 0.01 # (float) final LR fraction; final LR = lr0 * lrf
96
+ momentum: 0.937 # (float) SGD momentum or Adam beta1
97
+ weight_decay: 0.0005 # (float) weight decay (L2 regularization)
98
+ warmup_epochs: 3.0 # (float) warmup epochs (fractions allowed)
99
+ warmup_momentum: 0.8 # (float) initial momentum during warmup
100
+ warmup_bias_lr: 0.1 # (float) bias learning rate during warmup
98
101
  box: 7.5 # (float) box loss gain
99
- cls: 0.5 # (float) cls loss gain (scale with pixels)
100
- dfl: 1.5 # (float) dfl loss gain
101
- pose: 12.0 # (float) pose loss gain
102
- kobj: 1.0 # (float) keypoint obj loss gain
103
- nbs: 64 # (int) nominal batch size
104
- hsv_h: 0.015 # (float) image HSV-Hue augmentation (fraction)
105
- hsv_s: 0.7 # (float) image HSV-Saturation augmentation (fraction)
106
- hsv_v: 0.4 # (float) image HSV-Value augmentation (fraction)
107
- degrees: 0.0 # (float) image rotation (+/- deg)
108
- translate: 0.1 # (float) image translation (+/- fraction)
109
- scale: 0.5 # (float) image scale (+/- gain)
110
- shear: 0.0 # (float) image shear (+/- deg)
111
- perspective: 0.0 # (float) image perspective (+/- fraction), range 0-0.001
112
- flipud: 0.0 # (float) image flip up-down (probability)
113
- fliplr: 0.5 # (float) image flip left-right (probability)
114
- bgr: 0.0 # (float) image channel BGR (probability)
115
- mosaic: 1.0 # (float) image mosaic (probability)
116
- mixup: 0.0 # (float) image mixup (probability)
117
- cutmix: 0.0 # (float) image cutmix (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.
102
+ cls: 0.5 # (float) classification loss gain
103
+ dfl: 1.5 # (float) distribution focal loss gain
104
+ pose: 12.0 # (float) pose loss gain (pose tasks)
105
+ kobj: 1.0 # (float) keypoint objectness loss gain (pose tasks)
106
+ nbs: 64 # (int) nominal batch size used for loss normalization
107
+ hsv_h: 0.015 # (float) HSV hue augmentation fraction
108
+ hsv_s: 0.7 # (float) HSV saturation augmentation fraction
109
+ hsv_v: 0.4 # (float) HSV value (brightness) augmentation fraction
110
+ degrees: 0.0 # (float) rotation degrees (+/-)
111
+ translate: 0.1 # (float) translation fraction (+/-)
112
+ scale: 0.5 # (float) scale gain (+/-)
113
+ shear: 0.0 # (float) shear degrees (+/-)
114
+ perspective: 0.0 # (float) perspective fraction (00.001 typical)
115
+ flipud: 0.0 # (float) vertical flip probability
116
+ fliplr: 0.5 # (float) horizontal flip probability
117
+ bgr: 0.0 # (float) RGB↔BGR channel swap probability
118
+ mosaic: 1.0 # (float) mosaic augmentation probability
119
+ mixup: 0.0 # (float) MixUp augmentation probability
120
+ cutmix: 0.0 # (float) CutMix augmentation probability
121
+ copy_paste: 0.0 # (float) segmentation copy-paste probability
122
+ copy_paste_mode: flip # (str) copy-paste strategy for segmentation: flip or mixup
123
+ auto_augment: randaugment # (str) classification auto augmentation policy: randaugment, autoaugment, augmix
124
+ erasing: 0.4 # (float) random erasing probability for classification (00.9), <1.0
122
125
 
123
126
  # Custom config.yaml ---------------------------------------------------------------------------------------------------
124
- cfg: # (str, optional) for overriding defaults.yaml
127
+ cfg: # (str, optional) path to a config.yaml that overrides defaults
125
128
 
126
129
  # Tracker settings ------------------------------------------------------------------------------------------------------
127
- tracker: botsort.yaml # (str) tracker type, choices=[botsort.yaml, bytetrack.yaml]
130
+ tracker: botsort.yaml # (str) tracker config file: botsort.yaml or bytetrack.yaml