ultralytics 8.3.84__tar.gz → 8.3.86__tar.gz

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 (251) hide show
  1. {ultralytics-8.3.84/ultralytics.egg-info → ultralytics-8.3.86}/PKG-INFO +1 -1
  2. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/__init__.py +1 -1
  3. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/__init__.py +4 -8
  4. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/Argoverse.yaml +15 -13
  5. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/GlobalWheat2020.yaml +24 -10
  6. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/ImageNet.yaml +1 -1
  7. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/Objects365.yaml +21 -21
  8. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/SKU-110K.yaml +11 -11
  9. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/VOC.yaml +34 -28
  10. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/VisDrone.yaml +19 -15
  11. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/coco-pose.yaml +11 -8
  12. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/coco.yaml +11 -8
  13. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/lvis.yaml +12 -8
  14. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/open-images-v7.yaml +25 -20
  15. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/xView.yaml +28 -26
  16. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/annotator.py +1 -1
  17. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/base.py +1 -1
  18. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/converter.py +6 -6
  19. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/split_dota.py +2 -2
  20. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/utils.py +4 -4
  21. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/engine/exporter.py +4 -4
  22. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/engine/results.py +1 -1
  23. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/engine/trainer.py +1 -1
  24. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/engine/tuner.py +1 -1
  25. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/engine/validator.py +1 -1
  26. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/obb/val.py +2 -2
  27. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/autobackend.py +2 -1
  28. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/__init__.py +1 -1
  29. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/benchmarks.py +5 -5
  30. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/loss.py +1 -1
  31. {ultralytics-8.3.84 → ultralytics-8.3.86/ultralytics.egg-info}/PKG-INFO +1 -1
  32. {ultralytics-8.3.84 → ultralytics-8.3.86}/LICENSE +0 -0
  33. {ultralytics-8.3.84 → ultralytics-8.3.86}/README.md +0 -0
  34. {ultralytics-8.3.84 → ultralytics-8.3.86}/pyproject.toml +0 -0
  35. {ultralytics-8.3.84 → ultralytics-8.3.86}/setup.cfg +0 -0
  36. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/__init__.py +0 -0
  37. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/conftest.py +0 -0
  38. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/test_cli.py +0 -0
  39. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/test_cuda.py +0 -0
  40. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/test_engine.py +0 -0
  41. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/test_exports.py +0 -0
  42. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/test_integrations.py +0 -0
  43. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/test_python.py +0 -0
  44. {ultralytics-8.3.84 → ultralytics-8.3.86}/tests/test_solutions.py +0 -0
  45. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/assets/bus.jpg +0 -0
  46. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/assets/zidane.jpg +0 -0
  47. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/DOTAv1.5.yaml +0 -0
  48. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/DOTAv1.yaml +0 -0
  49. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/african-wildlife.yaml +0 -0
  50. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/brain-tumor.yaml +0 -0
  51. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/carparts-seg.yaml +0 -0
  52. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/coco128-seg.yaml +0 -0
  53. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/coco128.yaml +0 -0
  54. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/coco8-pose.yaml +0 -0
  55. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/coco8-seg.yaml +0 -0
  56. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/coco8.yaml +0 -0
  57. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/crack-seg.yaml +0 -0
  58. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/dog-pose.yaml +0 -0
  59. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/dota8.yaml +0 -0
  60. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/hand-keypoints.yaml +0 -0
  61. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/medical-pills.yaml +0 -0
  62. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/package-seg.yaml +0 -0
  63. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/signature.yaml +0 -0
  64. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/datasets/tiger-pose.yaml +0 -0
  65. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/default.yaml +0 -0
  66. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/11/yolo11-cls-resnet18.yaml +0 -0
  67. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/11/yolo11-cls.yaml +0 -0
  68. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/11/yolo11-obb.yaml +0 -0
  69. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/11/yolo11-pose.yaml +0 -0
  70. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/11/yolo11-seg.yaml +0 -0
  71. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/11/yolo11.yaml +0 -0
  72. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/12/yolo12-cls.yaml +0 -0
  73. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/12/yolo12-obb.yaml +0 -0
  74. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/12/yolo12-pose.yaml +0 -0
  75. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/12/yolo12-seg.yaml +0 -0
  76. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/12/yolo12.yaml +0 -0
  77. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/rt-detr/rtdetr-l.yaml +0 -0
  78. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/rt-detr/rtdetr-resnet101.yaml +0 -0
  79. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/rt-detr/rtdetr-resnet50.yaml +0 -0
  80. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/rt-detr/rtdetr-x.yaml +0 -0
  81. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v10/yolov10b.yaml +0 -0
  82. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v10/yolov10l.yaml +0 -0
  83. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v10/yolov10m.yaml +0 -0
  84. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v10/yolov10n.yaml +0 -0
  85. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v10/yolov10s.yaml +0 -0
  86. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v10/yolov10x.yaml +0 -0
  87. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v3/yolov3-spp.yaml +0 -0
  88. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v3/yolov3-tiny.yaml +0 -0
  89. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v3/yolov3.yaml +0 -0
  90. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v5/yolov5-p6.yaml +0 -0
  91. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v5/yolov5.yaml +0 -0
  92. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v6/yolov6.yaml +0 -0
  93. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-cls-resnet101.yaml +0 -0
  94. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-cls-resnet50.yaml +0 -0
  95. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-cls.yaml +0 -0
  96. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-ghost-p2.yaml +0 -0
  97. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-ghost-p6.yaml +0 -0
  98. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-ghost.yaml +0 -0
  99. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-obb.yaml +0 -0
  100. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-p2.yaml +0 -0
  101. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-p6.yaml +0 -0
  102. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-pose-p6.yaml +0 -0
  103. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-pose.yaml +0 -0
  104. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-rtdetr.yaml +0 -0
  105. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-seg-p6.yaml +0 -0
  106. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-seg.yaml +0 -0
  107. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-world.yaml +0 -0
  108. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8-worldv2.yaml +0 -0
  109. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v8/yolov8.yaml +0 -0
  110. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v9/yolov9c-seg.yaml +0 -0
  111. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v9/yolov9c.yaml +0 -0
  112. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v9/yolov9e-seg.yaml +0 -0
  113. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v9/yolov9e.yaml +0 -0
  114. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v9/yolov9m.yaml +0 -0
  115. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v9/yolov9s.yaml +0 -0
  116. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/models/v9/yolov9t.yaml +0 -0
  117. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/solutions/default.yaml +0 -0
  118. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/trackers/botsort.yaml +0 -0
  119. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/cfg/trackers/bytetrack.yaml +0 -0
  120. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/__init__.py +0 -0
  121. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/augment.py +0 -0
  122. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/build.py +0 -0
  123. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/dataset.py +0 -0
  124. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/data/loaders.py +0 -0
  125. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/engine/__init__.py +0 -0
  126. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/engine/model.py +0 -0
  127. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/engine/predictor.py +0 -0
  128. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/hub/__init__.py +0 -0
  129. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/hub/auth.py +0 -0
  130. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/hub/google/__init__.py +0 -0
  131. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/hub/session.py +0 -0
  132. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/hub/utils.py +0 -0
  133. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/__init__.py +0 -0
  134. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/fastsam/__init__.py +0 -0
  135. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/fastsam/model.py +0 -0
  136. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/fastsam/predict.py +0 -0
  137. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/fastsam/utils.py +0 -0
  138. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/fastsam/val.py +0 -0
  139. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/nas/__init__.py +0 -0
  140. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/nas/model.py +0 -0
  141. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/nas/predict.py +0 -0
  142. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/nas/val.py +0 -0
  143. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/rtdetr/__init__.py +0 -0
  144. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/rtdetr/model.py +0 -0
  145. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/rtdetr/predict.py +0 -0
  146. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/rtdetr/train.py +0 -0
  147. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/rtdetr/val.py +0 -0
  148. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/__init__.py +0 -0
  149. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/amg.py +0 -0
  150. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/build.py +0 -0
  151. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/model.py +0 -0
  152. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/__init__.py +0 -0
  153. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/blocks.py +0 -0
  154. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/decoders.py +0 -0
  155. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/encoders.py +0 -0
  156. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/memory_attention.py +0 -0
  157. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/sam.py +0 -0
  158. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/tiny_encoder.py +0 -0
  159. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/transformer.py +0 -0
  160. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/modules/utils.py +0 -0
  161. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/sam/predict.py +0 -0
  162. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/utils/__init__.py +0 -0
  163. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/utils/loss.py +0 -0
  164. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/utils/ops.py +0 -0
  165. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/__init__.py +0 -0
  166. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/classify/__init__.py +0 -0
  167. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/classify/predict.py +0 -0
  168. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/classify/train.py +0 -0
  169. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/classify/val.py +0 -0
  170. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/detect/__init__.py +0 -0
  171. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/detect/predict.py +0 -0
  172. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/detect/train.py +0 -0
  173. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/detect/val.py +0 -0
  174. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/model.py +0 -0
  175. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/obb/__init__.py +0 -0
  176. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/obb/predict.py +0 -0
  177. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/obb/train.py +0 -0
  178. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/pose/__init__.py +0 -0
  179. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/pose/predict.py +0 -0
  180. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/pose/train.py +0 -0
  181. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/pose/val.py +0 -0
  182. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/segment/__init__.py +0 -0
  183. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/segment/predict.py +0 -0
  184. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/segment/train.py +0 -0
  185. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/segment/val.py +0 -0
  186. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/world/__init__.py +0 -0
  187. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/world/train.py +0 -0
  188. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/models/yolo/world/train_world.py +0 -0
  189. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/__init__.py +0 -0
  190. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/modules/__init__.py +0 -0
  191. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/modules/activation.py +0 -0
  192. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/modules/block.py +0 -0
  193. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/modules/conv.py +0 -0
  194. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/modules/head.py +0 -0
  195. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/modules/transformer.py +0 -0
  196. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/modules/utils.py +0 -0
  197. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/nn/tasks.py +0 -0
  198. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/__init__.py +0 -0
  199. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/ai_gym.py +0 -0
  200. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/analytics.py +0 -0
  201. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/distance_calculation.py +0 -0
  202. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/heatmap.py +0 -0
  203. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/object_counter.py +0 -0
  204. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/parking_management.py +0 -0
  205. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/queue_management.py +0 -0
  206. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/region_counter.py +0 -0
  207. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/security_alarm.py +0 -0
  208. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/solutions.py +0 -0
  209. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/speed_estimation.py +0 -0
  210. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/streamlit_inference.py +0 -0
  211. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/solutions/trackzone.py +0 -0
  212. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/__init__.py +0 -0
  213. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/basetrack.py +0 -0
  214. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/bot_sort.py +0 -0
  215. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/byte_tracker.py +0 -0
  216. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/track.py +0 -0
  217. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/utils/__init__.py +0 -0
  218. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/utils/gmc.py +0 -0
  219. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/utils/kalman_filter.py +0 -0
  220. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/trackers/utils/matching.py +0 -0
  221. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/autobatch.py +0 -0
  222. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/__init__.py +0 -0
  223. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/base.py +0 -0
  224. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/clearml.py +0 -0
  225. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/comet.py +0 -0
  226. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/dvc.py +0 -0
  227. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/hub.py +0 -0
  228. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/mlflow.py +0 -0
  229. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/neptune.py +0 -0
  230. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/raytune.py +0 -0
  231. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/tensorboard.py +0 -0
  232. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/callbacks/wb.py +0 -0
  233. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/checks.py +0 -0
  234. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/dist.py +0 -0
  235. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/downloads.py +0 -0
  236. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/errors.py +0 -0
  237. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/files.py +0 -0
  238. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/instance.py +0 -0
  239. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/metrics.py +0 -0
  240. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/ops.py +0 -0
  241. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/patches.py +0 -0
  242. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/plotting.py +0 -0
  243. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/tal.py +0 -0
  244. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/torch_utils.py +0 -0
  245. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/triton.py +0 -0
  246. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics/utils/tuner.py +0 -0
  247. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics.egg-info/SOURCES.txt +0 -0
  248. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics.egg-info/dependency_links.txt +0 -0
  249. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics.egg-info/entry_points.txt +0 -0
  250. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics.egg-info/requires.txt +0 -0
  251. {ultralytics-8.3.84 → ultralytics-8.3.86}/ultralytics.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ultralytics
3
- Version: 8.3.84
3
+ Version: 8.3.86
4
4
  Summary: Ultralytics YOLO 🚀 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
5
5
  Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
6
6
  Maintainer-email: Ultralytics <hello@ultralytics.com>
@@ -1,6 +1,6 @@
1
1
  # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
- __version__ = "8.3.84"
3
+ __version__ = "8.3.86"
4
4
 
5
5
  import os
6
6
 
@@ -660,6 +660,9 @@ def handle_yolo_solutions(args: List[str]) -> None:
660
660
  - The inference solution will be launched using the 'streamlit run' command.
661
661
  - The Streamlit app file is located in the Ultralytics package directory.
662
662
  """
663
+ from ultralytics import solutions
664
+ from ultralytics.utils.files import increment_path
665
+
663
666
  full_args_dict = {**DEFAULT_SOL_DICT, **DEFAULT_CFG_DICT} # arguments dictionary
664
667
  overrides = {}
665
668
 
@@ -706,9 +709,6 @@ def handle_yolo_solutions(args: List[str]) -> None:
706
709
  )
707
710
  else:
708
711
  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
712
  solution = getattr(solutions, cls)(IS_CLI=True, **overrides) # get solution class i.e ObjectCounter
713
713
  process = getattr(
714
714
  solution, method
@@ -717,17 +717,13 @@ def handle_yolo_solutions(args: List[str]) -> None:
717
717
  cap = cv2.VideoCapture(solution.CFG["source"]) # read the video file
718
718
 
719
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
720
 
725
721
  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
722
  if s_n == "analytics": # analytical graphs follow fixed shape for output i.e w=1920, h=1080
727
723
  w, h = 1920, 1080
728
724
  save_dir = increment_path(Path("runs") / "solutions" / "exp", exist_ok=False)
729
725
  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))
726
+ vw = cv2.VideoWriter(str(save_dir / "solution.avi"), cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
731
727
 
732
728
  try: # Process video frames
733
729
  f_n = 0 # frame number, required for analytical graphs
@@ -28,26 +28,28 @@ names:
28
28
  # Download script/URL (optional) ---------------------------------------------------------------------------------------
29
29
  download: |
30
30
  import json
31
+ from pathlib import Path
32
+
31
33
  from tqdm import tqdm
32
34
  from ultralytics.utils.downloads import download
33
- from pathlib import Path
34
35
 
35
36
  def argoverse2yolo(set):
37
+ """Convert Argoverse dataset annotations to YOLO format for object detection tasks."""
36
38
  labels = {}
37
39
  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'
40
+ for annot in tqdm(a["annotations"], desc=f"Converting {set} to YOLOv5 format..."):
41
+ img_id = annot["image_id"]
42
+ img_name = a["images"][img_id]["name"]
43
+ img_label_name = f"{img_name[:-3]}txt"
42
44
 
43
- cls = annot['category_id'] # instance class id
44
- x_center, y_center, width, height = annot['bbox']
45
+ cls = annot["category_id"] # instance class id
46
+ x_center, y_center, width, height = annot["bbox"]
45
47
  x_center = (x_center + width / 2) / 1920.0 # offset and scale
46
48
  y_center = (y_center + height / 2) / 1200.0 # offset and scale
47
49
  width /= 1920.0 # scale
48
50
  height /= 1200.0 # scale
49
51
 
50
- img_dir = set.parents[2] / 'Argoverse-1.1' / 'labels' / a['seq_dirs'][a['images'][annot['image_id']]['sid']]
52
+ img_dir = set.parents[2] / "Argoverse-1.1" / "labels" / a["seq_dirs"][a["images"][annot["image_id"]]["sid"]]
51
53
  if not img_dir.exists():
52
54
  img_dir.mkdir(parents=True, exist_ok=True)
53
55
 
@@ -57,19 +59,19 @@ download: |
57
59
  labels[k].append(f"{cls} {x_center} {y_center} {width} {height}\n")
58
60
 
59
61
  for k in labels:
60
- with open(k, "w") as f:
62
+ with open(k, "w", encoding="utf-8") as f:
61
63
  f.writelines(labels[k])
62
64
 
63
65
 
64
66
  # 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
+ dir = Path(yaml["path"]) # dataset root dir
68
+ urls = ["https://drive.google.com/file/d/1st9qW3BeIwQsnR0t8mRpvbsSWIo16ACi/view?usp=drive_link"]
67
69
  print("\n\nWARNING: Argoverse dataset MUST be downloaded manually, autodownload will NOT work.")
68
70
  print(f"WARNING: Manually download Argoverse dataset '{urls[0]}' to '{dir}' and re-run your command.\n\n")
69
71
  # download(urls, dir=dir)
70
72
 
71
73
  # Convert
72
- annotations_dir = 'Argoverse-HD/annotations/'
73
- (dir / 'Argoverse-1.1' / 'tracking').rename(dir / 'Argoverse-1.1' / 'images') # rename 'tracking' to 'images'
74
+ annotations_dir = "Argoverse-HD/annotations/"
75
+ (dir / "Argoverse-1.1" / "tracking").rename(dir / "Argoverse-1.1" / "images") # rename 'tracking' to 'images'
74
76
  for d in "train.json", "val.json":
75
77
  argoverse2yolo(dir / annotations_dir / d) # convert Argoverse annotations to YOLO labels
@@ -32,23 +32,37 @@ names:
32
32
 
33
33
  # Download script/URL (optional) ---------------------------------------------------------------------------------------
34
34
  download: |
35
- from ultralytics.utils.downloads import download
36
35
  from pathlib import Path
37
36
 
37
+ from ultralytics.utils.downloads import download
38
+
38
39
  # 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']
40
+ dir = Path(yaml["path"]) # dataset root dir
41
+ urls = [
42
+ "https://zenodo.org/record/4298502/files/global-wheat-codalab-official.zip",
43
+ "https://github.com/ultralytics/assets/releases/download/v0.0.0/GlobalWheat2020_labels.zip",
44
+ ]
42
45
  download(urls, dir=dir)
43
46
 
44
47
  # Make Directories
45
- for p in 'annotations', 'images', 'labels':
48
+ for p in "annotations", "images", "labels":
46
49
  (dir / p).mkdir(parents=True, exist_ok=True)
47
50
 
48
51
  # 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
52
+ for p in (
53
+ "arvalis_1",
54
+ "arvalis_2",
55
+ "arvalis_3",
56
+ "ethz_1",
57
+ "rres_1",
58
+ "inrae_1",
59
+ "usask_1",
60
+ "utokyo_1",
61
+ "utokyo_2",
62
+ "nau_1",
63
+ "uq_1",
64
+ ):
65
+ (dir / "global-wheat-codalab-official" / p).rename(dir / "images" / p) # move to /images
66
+ f = (dir / "global-wheat-codalab-official" / p).with_suffix(".json") # json file
53
67
  if f.exists():
54
- f.rename((dir / 'annotations' / p).with_suffix('.json')) # move to /annotations
68
+ f.rename((dir / "annotations" / p).with_suffix(".json")) # move to /annotations
@@ -2022,4 +2022,4 @@ map:
2022
2022
  n15075141: toilet_tissue
2023
2023
 
2024
2024
  # Download script/URL (optional)
2025
- download: yolo/data/scripts/get_imagenet.sh
2025
+ download: ultralytics/data/scripts/get_imagenet.sh
@@ -384,58 +384,58 @@ names:
384
384
 
385
385
  # Download script/URL (optional) ---------------------------------------------------------------------------------------
386
386
  download: |
387
+ from pathlib import Path
388
+
389
+ import numpy as np
387
390
  from tqdm import tqdm
388
391
 
389
392
  from ultralytics.utils.checks import check_requirements
390
393
  from ultralytics.utils.downloads import download
391
394
  from ultralytics.utils.ops import xyxy2xywhn
392
395
 
393
- import numpy as np
394
- from pathlib import Path
395
-
396
- check_requirements(('pycocotools>=2.0',))
396
+ check_requirements(("pycocotools>=2.0",))
397
397
  from pycocotools.coco import COCO
398
398
 
399
399
  # Make Directories
400
- dir = Path(yaml['path']) # dataset root dir
401
- for p in 'images', 'labels':
400
+ dir = Path(yaml["path"]) # dataset root dir
401
+ for p in "images", "labels":
402
402
  (dir / p).mkdir(parents=True, exist_ok=True)
403
- for q in 'train', 'val':
403
+ for q in "train", "val":
404
404
  (dir / p / q).mkdir(parents=True, exist_ok=True)
405
405
 
406
406
  # Train, Val Splits
407
- for split, patches in [('train', 50 + 1), ('val', 43 + 1)]:
407
+ for split, patches in [("train", 50 + 1), ("val", 43 + 1)]:
408
408
  print(f"Processing {split} in {patches} patches ...")
409
- images, labels = dir / 'images' / split, dir / 'labels' / split
409
+ images, labels = dir / "images" / split, dir / "labels" / split
410
410
 
411
411
  # Download
412
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)
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
420
 
421
421
  # Move
422
- for f in tqdm(images.rglob('*.jpg'), desc=f'Moving {split} images'):
422
+ for f in tqdm(images.rglob("*.jpg"), desc=f"Moving {split} images"):
423
423
  f.rename(images / f.name) # move to /images/{split}
424
424
 
425
425
  # Labels
426
- coco = COCO(dir / f'zhiyuan_objv2_{split}.json')
426
+ coco = COCO(dir / f"zhiyuan_objv2_{split}.json")
427
427
  names = [x["name"] for x in coco.loadCats(coco.getCatIds())]
428
428
  for cid, cat in enumerate(names):
429
429
  catIds = coco.getCatIds(catNms=[cat])
430
430
  imgIds = coco.getImgIds(catIds=catIds)
431
- for im in tqdm(coco.loadImgs(imgIds), desc=f'Class {cid + 1}/{len(names)} {cat}'):
431
+ for im in tqdm(coco.loadImgs(imgIds), desc=f"Class {cid + 1}/{len(names)} {cat}"):
432
432
  width, height = im["width"], im["height"]
433
433
  path = Path(im["file_name"]) # image filename
434
434
  try:
435
- with open(labels / path.with_suffix('.txt').name, 'a') as file:
435
+ with open(labels / path.with_suffix(".txt").name, "a", encoding="utf-8") as file:
436
436
  annIds = coco.getAnnIds(imgIds=im["id"], catIds=catIds, iscrowd=None)
437
437
  for a in coco.loadAnns(annIds):
438
- x, y, w, h = a['bbox'] # bounding box in xywh (xy top-left corner)
438
+ x, y, w, h = a["bbox"] # bounding box in xywh (xy top-left corner)
439
439
  xyxy = np.array([x, y, x + w, y + h])[None] # pixels(1,4)
440
440
  x, y, w, h = xyxy2xywhn(xyxy, w=width, h=height, clip=True)[0] # normalized and clipped
441
441
  file.write(f"{cid} {x:.5f} {y:.5f} {w:.5f} {h:.5f}\n")
@@ -31,27 +31,27 @@ download: |
31
31
  from ultralytics.utils.ops import xyxy2xywh
32
32
 
33
33
  # Download
34
- dir = Path(yaml['path']) # dataset root dir
34
+ dir = Path(yaml["path"]) # dataset root dir
35
35
  parent = Path(dir.parent) # download dir
36
- urls = ['http://trax-geometry.s3.amazonaws.com/cvpr_challenge/SKU110K_fixed.tar.gz']
36
+ urls = ["http://trax-geometry.s3.amazonaws.com/cvpr_challenge/SKU110K_fixed.tar.gz"]
37
37
  download(urls, dir=parent)
38
38
 
39
39
  # Rename directories
40
40
  if dir.exists():
41
41
  shutil.rmtree(dir)
42
- (parent / 'SKU110K_fixed').rename(dir) # rename dir
43
- (dir / 'labels').mkdir(parents=True, exist_ok=True) # create labels dir
42
+ (parent / "SKU110K_fixed").rename(dir) # rename dir
43
+ (dir / "labels").mkdir(parents=True, exist_ok=True) # create labels dir
44
44
 
45
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
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
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}'):
50
+ with open((dir / d).with_suffix(".txt").__str__().replace("annotations_", ""), "w", encoding="utf-8") 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
53
  cls = 0 # single-class dataset
54
- with open((dir / 'labels' / im).with_suffix('.txt'), 'a') as f:
54
+ with open((dir / "labels" / im).with_suffix(".txt"), "a", encoding="utf-8") as f:
55
55
  for r in x[images == im]:
56
56
  w, h = r[6], r[7] # image width, height
57
57
  xywh = xyxy2xywh(np.array([[r[1] / w, r[2] / h, r[3] / w, r[4] / h]]))[0] # instance
@@ -46,55 +46,61 @@ names:
46
46
  # Download script/URL (optional) ---------------------------------------------------------------------------------------
47
47
  download: |
48
48
  import xml.etree.ElementTree as ET
49
+ from pathlib import Path
49
50
 
50
51
  from tqdm import tqdm
52
+
51
53
  from ultralytics.utils.downloads import download
52
- from pathlib import Path
54
+
53
55
 
54
56
  def convert_label(path, lb_path, year, image_id):
57
+ """Converts XML annotations from VOC format to YOLO format by extracting bounding boxes and class IDs."""
58
+
55
59
  def convert_box(size, box):
56
- dw, dh = 1. / size[0], 1. / size[1]
60
+ dw, dh = 1.0 / size[0], 1.0 / size[1]
57
61
  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
62
  return x * dw, y * dh, w * dw, h * dh
59
63
 
60
- in_file = open(path / f'VOC{year}/Annotations/{image_id}.xml')
61
- out_file = open(lb_path, 'w')
64
+ in_file = open(path / f"VOC{year}/Annotations/{image_id}.xml")
65
+ out_file = open(lb_path, "w")
62
66
  tree = ET.parse(in_file)
63
67
  root = tree.getroot()
64
- size = root.find('size')
65
- w = int(size.find('width').text)
66
- h = int(size.find('height').text)
68
+ size = root.find("size")
69
+ w = int(size.find("width").text)
70
+ h = int(size.find("height").text)
67
71
 
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')])
72
+ names = list(yaml["names"].values()) # names list
73
+ for obj in root.iter("object"):
74
+ cls = obj.find("name").text
75
+ if cls in names and int(obj.find("difficult").text) != 1:
76
+ xmlbox = obj.find("bndbox")
77
+ bb = convert_box((w, h), [float(xmlbox.find(x).text) for x in ("xmin", "xmax", "ymin", "ymax")])
74
78
  cls_id = names.index(cls) # class id
75
- out_file.write(" ".join(str(a) for a in (cls_id, *bb)) + '\n')
79
+ out_file.write(" ".join(str(a) for a in (cls_id, *bb)) + "\n")
76
80
 
77
81
 
78
82
  # 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)
83
+ dir = Path(yaml["path"]) # dataset root dir
84
+ url = "https://github.com/ultralytics/assets/releases/download/v0.0.0/"
85
+ urls = [
86
+ f"{url}VOCtrainval_06-Nov-2007.zip", # 446MB, 5012 images
87
+ f"{url}VOCtest_06-Nov-2007.zip", # 438MB, 4953 images
88
+ f"{url}VOCtrainval_11-May-2012.zip", # 1.95GB, 17126 images
89
+ ]
90
+ download(urls, dir=dir / "images", curl=True, threads=3, exist_ok=True) # download and unzip over existing (required)
85
91
 
86
92
  # 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}'
93
+ path = dir / "images/VOCdevkit"
94
+ for year, image_set in ("2012", "train"), ("2012", "val"), ("2007", "train"), ("2007", "val"), ("2007", "test"):
95
+ imgs_path = dir / "images" / f"{image_set}{year}"
96
+ lbs_path = dir / "labels" / f"{image_set}{year}"
91
97
  imgs_path.mkdir(exist_ok=True, parents=True)
92
98
  lbs_path.mkdir(exist_ok=True, parents=True)
93
99
 
94
- with open(path / f'VOC{year}/ImageSets/Main/{image_set}.txt') as f:
100
+ with open(path / f"VOC{year}/ImageSets/Main/{image_set}.txt") as f:
95
101
  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
102
+ for id in tqdm(image_ids, desc=f"{image_set}{year}"):
103
+ f = path / f"VOC{year}/JPEGImages/{id}.jpg" # old img path
104
+ lb_path = (lbs_path / f.name).with_suffix(".txt") # new label path
99
105
  f.rename(imgs_path / f.name) # move image
100
106
  convert_label(path, lb_path, year, id) # convert labels to YOLO format
@@ -34,40 +34,44 @@ download: |
34
34
 
35
35
  from ultralytics.utils.downloads import download
36
36
 
37
+
37
38
  def visdrone2yolo(dir):
39
+ """Convert VisDrone annotations to YOLO format, creating label files with normalized bounding box coordinates."""
38
40
  from PIL import Image
39
41
  from tqdm import tqdm
40
42
 
41
43
  def convert_box(size, box):
42
44
  # Convert VisDrone box to YOLO xywh box
43
- dw = 1. / size[0]
44
- dh = 1. / size[1]
45
+ dw = 1.0 / size[0]
46
+ dh = 1.0 / size[1]
45
47
  return (box[0] + box[2] / 2) * dw, (box[1] + box[3] / 2) * dh, box[2] * dw, box[3] * dh
46
48
 
47
- (dir / 'labels').mkdir(parents=True, exist_ok=True) # make labels directory
48
- pbar = tqdm((dir / 'annotations').glob('*.txt'), desc=f'Converting {dir}')
49
+ (dir / "labels").mkdir(parents=True, exist_ok=True) # make labels directory
50
+ pbar = tqdm((dir / "annotations").glob("*.txt"), desc=f"Converting {dir}")
49
51
  for f in pbar:
50
- img_size = Image.open((dir / 'images' / f.name).with_suffix('.jpg')).size
52
+ img_size = Image.open((dir / "images" / f.name).with_suffix(".jpg")).size
51
53
  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
54
+ with open(f, encoding="utf-8") as file: # read annotation.txt
55
+ for row in [x.split(",") for x in file.read().strip().splitlines()]:
56
+ if row[4] == "0": # VisDrone 'ignored regions' class 0
55
57
  continue
56
58
  cls = int(row[5]) - 1
57
59
  box = convert_box(img_size, tuple(map(int, row[:4])))
58
60
  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:
61
+ with open(str(f).replace(f"{os.sep}annotations{os.sep}", f"{os.sep}labels{os.sep}"), "w", encoding="utf-8") as fl:
60
62
  fl.writelines(lines) # write label.txt
61
63
 
62
64
 
63
65
  # 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']
66
+ dir = Path(yaml["path"]) # dataset root dir
67
+ urls = [
68
+ "https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-train.zip",
69
+ "https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-val.zip",
70
+ "https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-dev.zip",
71
+ "https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-challenge.zip",
72
+ ]
69
73
  download(urls, dir=dir, curl=True, threads=4)
70
74
 
71
75
  # Convert
72
- for d in 'VisDrone2019-DET-train', 'VisDrone2019-DET-val', 'VisDrone2019-DET-test-dev':
76
+ for d in "VisDrone2019-DET-train", "VisDrone2019-DET-val", "VisDrone2019-DET-test-dev":
73
77
  visdrone2yolo(dir / d) # convert VisDrone annotations to YOLO labels
@@ -24,16 +24,19 @@ names:
24
24
 
25
25
  # Download script/URL (optional)
26
26
  download: |
27
- from ultralytics.utils.downloads import download
28
27
  from pathlib import Path
29
28
 
29
+ from ultralytics.utils.downloads import download
30
+
30
31
  # 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
32
+ dir = Path(yaml["path"]) # dataset root dir
33
+ url = "https://github.com/ultralytics/assets/releases/download/v0.0.0/"
34
+ urls = [f"{url}coco2017labels-pose.zip"]
34
35
  download(urls, dir=dir.parent)
35
36
  # 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)
37
+ urls = [
38
+ "http://images.cocodataset.org/zips/train2017.zip", # 19G, 118k images
39
+ "http://images.cocodataset.org/zips/val2017.zip", # 1G, 5k images
40
+ "http://images.cocodataset.org/zips/test2017.zip", # 7G, 41k images (optional)
41
+ ]
42
+ download(urls, dir=dir / "images", threads=3)
@@ -99,17 +99,20 @@ names:
99
99
 
100
100
  # Download script/URL (optional)
101
101
  download: |
102
- from ultralytics.utils.downloads import download
103
102
  from pathlib import Path
104
103
 
104
+ from ultralytics.utils.downloads import download
105
+
105
106
  # Download labels
106
107
  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
108
+ dir = Path(yaml["path"]) # dataset root dir
109
+ url = "https://github.com/ultralytics/assets/releases/download/v0.0.0/"
110
+ urls = [url + ("coco2017labels-segments.zip" if segments else "coco2017labels.zip")] # labels
110
111
  download(urls, dir=dir.parent)
111
112
  # 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)
113
+ urls = [
114
+ "http://images.cocodataset.org/zips/train2017.zip", # 19G, 118k images
115
+ "http://images.cocodataset.org/zips/val2017.zip", # 1G, 5k images
116
+ "http://images.cocodataset.org/zips/test2017.zip", # 7G, 41k images (optional)
117
+ ]
118
+ download(urls, dir=dir / "images", threads=3)
@@ -1221,16 +1221,20 @@ names:
1221
1221
 
1222
1222
  # Download script/URL (optional)
1223
1223
  download: |
1224
- from ultralytics.utils.downloads import download
1225
1224
  from pathlib import Path
1226
1225
 
1226
+ from ultralytics.utils.downloads import download
1227
+
1227
1228
  # 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
1229
+ 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
1232
  download(urls, dir=dir.parent)
1233
+
1232
1234
  # 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)
1235
+ urls = [
1236
+ "http://images.cocodataset.org/zips/train2017.zip", # 19G, 118k images
1237
+ "http://images.cocodataset.org/zips/val2017.zip", # 1G, 5k images
1238
+ "http://images.cocodataset.org/zips/test2017.zip", # 7G, 41k images (optional)
1239
+ ]
1240
+ download(urls, dir=dir / "images", threads=3)
@@ -620,30 +620,33 @@ names:
620
620
 
621
621
  # Download script/URL (optional) ---------------------------------------------------------------------------------------
622
622
  download: |
623
- from ultralytics.utils import LOGGER, SETTINGS, Path, is_ubuntu, get_ubuntu_version
623
+ import warnings
624
+
625
+ from ultralytics.utils import LOGGER, SETTINGS, Path, get_ubuntu_version, is_ubuntu
624
626
  from ultralytics.utils.checks import check_requirements, check_version
625
627
 
626
- check_requirements('fiftyone')
627
- if is_ubuntu() and check_version(get_ubuntu_version(), '>=22.04'):
628
+ check_requirements("fiftyone")
629
+ if is_ubuntu() and check_version(get_ubuntu_version(), ">=22.04"):
628
630
  # Ubuntu>=22.04 patch https://github.com/voxel51/fiftyone/issues/2961#issuecomment-1666519347
629
- check_requirements('fiftyone-db-ubuntu2204')
630
-
631
+ check_requirements("fiftyone-db-ubuntu2204")
632
+
631
633
  import fiftyone as fo
632
634
  import fiftyone.zoo as foz
633
- import warnings
634
635
 
635
- name = 'open-images-v7'
636
+ name = "open-images-v7"
636
637
  fo.config.dataset_zoo_dir = Path(SETTINGS["datasets_dir"]) / "fiftyone" / name
637
638
  fraction = 1.0 # fraction of full dataset to use
638
- LOGGER.warning('WARNING ⚠️ Open Images V7 dataset requires at least **561 GB of free space. Starting download...')
639
- for split in 'train', 'validation': # 1743042 train, 41620 val images
640
- train = split == 'train'
639
+ LOGGER.warning("WARNING ⚠️ Open Images V7 dataset requires at least **561 GB of free space. Starting download...")
640
+ for split in "train", "validation": # 1743042 train, 41620 val images
641
+ train = split == "train"
641
642
 
642
643
  # Load Open Images dataset
643
- dataset = foz.load_zoo_dataset(name,
644
- split=split,
645
- label_types=['detections'],
646
- max_samples=round((1743042 if train else 41620) * fraction))
644
+ dataset = foz.load_zoo_dataset(
645
+ name,
646
+ split=split,
647
+ label_types=["detections"],
648
+ max_samples=round((1743042 if train else 41620) * fraction),
649
+ )
647
650
 
648
651
  # Define classes
649
652
  if train:
@@ -653,9 +656,11 @@ download: |
653
656
  # Export to YOLO format
654
657
  with warnings.catch_warnings():
655
658
  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)
659
+ dataset.export(
660
+ export_dir=str(Path(SETTINGS["datasets_dir"]) / name),
661
+ dataset_type=fo.types.YOLOv5Dataset,
662
+ label_field="ground_truth",
663
+ split="val" if split == "validation" else split,
664
+ classes=classes,
665
+ overwrite=train,
666
+ )