dgenerate-ultralytics-headless 8.3.245__py3-none-any.whl → 8.3.247__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dgenerate_ultralytics_headless-8.3.245.dist-info → dgenerate_ultralytics_headless-8.3.247.dist-info}/METADATA +2 -2
- {dgenerate_ultralytics_headless-8.3.245.dist-info → dgenerate_ultralytics_headless-8.3.247.dist-info}/RECORD +24 -24
- tests/test_exports.py +2 -2
- ultralytics/__init__.py +1 -1
- ultralytics/data/converter.py +1 -1
- ultralytics/engine/exporter.py +2 -0
- ultralytics/engine/results.py +2 -2
- ultralytics/engine/validator.py +4 -1
- ultralytics/models/sam/modules/utils.py +1 -1
- ultralytics/models/yolo/detect/val.py +3 -3
- ultralytics/models/yolo/segment/predict.py +2 -2
- ultralytics/nn/modules/transformer.py +4 -4
- ultralytics/nn/tasks.py +2 -2
- ultralytics/utils/callbacks/platform.py +56 -9
- ultralytics/utils/checks.py +4 -1
- ultralytics/utils/logger.py +9 -3
- ultralytics/utils/metrics.py +6 -3
- ultralytics/utils/ops.py +6 -6
- ultralytics/utils/plotting.py +1 -1
- ultralytics/utils/tuner.py +11 -0
- {dgenerate_ultralytics_headless-8.3.245.dist-info → dgenerate_ultralytics_headless-8.3.247.dist-info}/WHEEL +0 -0
- {dgenerate_ultralytics_headless-8.3.245.dist-info → dgenerate_ultralytics_headless-8.3.247.dist-info}/entry_points.txt +0 -0
- {dgenerate_ultralytics_headless-8.3.245.dist-info → dgenerate_ultralytics_headless-8.3.247.dist-info}/licenses/LICENSE +0 -0
- {dgenerate_ultralytics_headless-8.3.245.dist-info → dgenerate_ultralytics_headless-8.3.247.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dgenerate-ultralytics-headless
|
|
3
|
-
Version: 8.3.
|
|
3
|
+
Version: 8.3.247
|
|
4
4
|
Summary: Automatically built Ultralytics package with python-opencv-headless dependency instead of python-opencv
|
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
|
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
|
@@ -57,7 +57,7 @@ Provides-Extra: export
|
|
|
57
57
|
Requires-Dist: numpy<2.0.0; extra == "export"
|
|
58
58
|
Requires-Dist: onnx>=1.12.0; platform_system != "Darwin" and extra == "export"
|
|
59
59
|
Requires-Dist: onnx<1.18.0,>=1.12.0; platform_system == "Darwin" and extra == "export"
|
|
60
|
-
Requires-Dist: onnxslim>=0.1.
|
|
60
|
+
Requires-Dist: onnxslim>=0.1.82; extra == "export"
|
|
61
61
|
Requires-Dist: coremltools>=9.0; (platform_system != "Windows" and python_version <= "3.13") and extra == "export"
|
|
62
62
|
Requires-Dist: scikit-learn>=1.3.2; (platform_system != "Windows" and python_version <= "3.13") and extra == "export"
|
|
63
63
|
Requires-Dist: openvino>=2024.0.0; extra == "export"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
dgenerate_ultralytics_headless-8.3.
|
|
1
|
+
dgenerate_ultralytics_headless-8.3.247.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
2
2
|
tests/__init__.py,sha256=bCox_hLdGRFYGLb2kd722VdNP2zEXNYNuLLYtqZSrbw,804
|
|
3
3
|
tests/conftest.py,sha256=mOy9lGpNp7lk1hHl6_pVE0f9cU-72gnkoSm4TO-CNZU,2318
|
|
4
4
|
tests/test_cli.py,sha256=GhIFHi-_WIJpDgoGNRi0DnjbfwP1wHbklBMnkCM-P_4,5464
|
|
5
5
|
tests/test_cuda.py,sha256=eQew1rNwU3VViQCG6HZj5SWcYmWYop9gJ0jv9U1bGDE,8203
|
|
6
6
|
tests/test_engine.py,sha256=0SWVHTs-feV07spjRMJ078Ipdg6m3uymNHwgTIZjZtc,5732
|
|
7
|
-
tests/test_exports.py,sha256=
|
|
7
|
+
tests/test_exports.py,sha256=5G5EgDmars6d-N7TVnJdDFWId0IJs-yw03DvdQIjrNU,14246
|
|
8
8
|
tests/test_integrations.py,sha256=6QgSh9n0J04RdUYz08VeVOnKmf4S5MDEQ0chzS7jo_c,6220
|
|
9
9
|
tests/test_python.py,sha256=viMvRajIbDZdm64hRRg9i8qZ1sU9frwB69e56mxwEXk,29266
|
|
10
10
|
tests/test_solutions.py,sha256=CIaphpmOXgz9AE9xcm1RWODKrwGfZLCc84IggGXArNM,14122
|
|
11
|
-
ultralytics/__init__.py,sha256=
|
|
11
|
+
ultralytics/__init__.py,sha256=pSBu41NHtqNCzmsdvqPp9FVTFBF4JPwbfXF07bjIYYE,1302
|
|
12
12
|
ultralytics/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
|
|
13
13
|
ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
|
|
14
14
|
ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
|
|
@@ -112,7 +112,7 @@ ultralytics/data/annotator.py,sha256=kbfSPBesKEVK6ys3dilTdMh7rCKyp0xV7tGQeEDbpWI
|
|
|
112
112
|
ultralytics/data/augment.py,sha256=ahqEe2ZBLeMZbK44Z-QihfCVCArOqtHjSSD-41_NlA8,127503
|
|
113
113
|
ultralytics/data/base.py,sha256=pMs8yJOmAFPXdgfLCDtUemSvkPNDzxReP-fWzkNtonc,19723
|
|
114
114
|
ultralytics/data/build.py,sha256=s-tkSZPf3OfQyfXPXB9XxdW_gIcU6Xy_u21ekSgTnRo,17205
|
|
115
|
-
ultralytics/data/converter.py,sha256=
|
|
115
|
+
ultralytics/data/converter.py,sha256=1m345J7YUn7gtaChO7To4BWZm72pC8D8L2O0k99q0DE,31898
|
|
116
116
|
ultralytics/data/dataset.py,sha256=L5QYgic_B1e1zffgRA5lqKDd5PQuMDg6PZVd-RTUA7E,36523
|
|
117
117
|
ultralytics/data/loaders.py,sha256=BQbhgjiLCGcRBPkGVG9Hr1jeNfG1nuZD3jstiWb7zS8,31889
|
|
118
118
|
ultralytics/data/split.py,sha256=HpR0ltf5oN1DpZstavFbBFC1YdpGPaATXxDOcAMwOqc,5101
|
|
@@ -123,13 +123,13 @@ ultralytics/data/scripts/get_coco.sh,sha256=UuJpJeo3qQpTHVINeOpmP0NYmg8PhEFE3A8J
|
|
|
123
123
|
ultralytics/data/scripts/get_coco128.sh,sha256=qmRQl_hOKrsdHrTrnyQuFIH01oDz3lfaz138OgGfLt8,650
|
|
124
124
|
ultralytics/data/scripts/get_imagenet.sh,sha256=hr42H16bM47iT27rgS7MpEo-GeOZAYUQXgr0B2cwn48,1705
|
|
125
125
|
ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
|
126
|
-
ultralytics/engine/exporter.py,sha256=
|
|
126
|
+
ultralytics/engine/exporter.py,sha256=Ncf5GK5xAqSu0DH-6z5V53qZB7LstDJFTMF5a-7VQfs,72639
|
|
127
127
|
ultralytics/engine/model.py,sha256=61ea1rB0wmL0CCaEr8p5gzneH0eL55OOMaTcFt8fR80,53079
|
|
128
128
|
ultralytics/engine/predictor.py,sha256=neYmNDX27Vv3ggk9xqaKlH6XzB2vlFIghU5o7ZC0zFo,22838
|
|
129
|
-
ultralytics/engine/results.py,sha256=
|
|
129
|
+
ultralytics/engine/results.py,sha256=DomI01voqR_i7v8LhDGb6jWCprWB4H6I436GSO2NMBY,68030
|
|
130
130
|
ultralytics/engine/trainer.py,sha256=mqVrhL8xnJwwKJVjxDEiiwu0WH48Ne5dB4SXxlxyHh4,45479
|
|
131
131
|
ultralytics/engine/tuner.py,sha256=qiozSxYC-Hk1TQgyftrYTKkqLrrwFzjjkT6mOYR3Vjc,21460
|
|
132
|
-
ultralytics/engine/validator.py,sha256=
|
|
132
|
+
ultralytics/engine/validator.py,sha256=2rqdVt4hB9ruMJq-L7PbaCNFwuERS7ZHdVSg91RM3wk,17761
|
|
133
133
|
ultralytics/hub/__init__.py,sha256=Z0K_E00jzQh90b18q3IDChwVmTvyIYp6C00sCV-n2F8,6709
|
|
134
134
|
ultralytics/hub/auth.py,sha256=ANzCeZA7lUzTWc_sFHbDuuyBh1jLl2sTpHkoUbIkFYE,6254
|
|
135
135
|
ultralytics/hub/session.py,sha256=OzBXAL9R135gRDdfNYUqyiSrxOyaiMFCVYSZua99sF0,18364
|
|
@@ -164,7 +164,7 @@ ultralytics/models/sam/modules/memory_attention.py,sha256=jFVWVbgDS7VXPqOL1e3gAz
|
|
|
164
164
|
ultralytics/models/sam/modules/sam.py,sha256=-KV-1PZK39DTdSpR5DI3E8I6gGVLja3tMv1MH7Au_eA,61654
|
|
165
165
|
ultralytics/models/sam/modules/tiny_encoder.py,sha256=RJQTHjfUe2N3cm1EZHXObJlKqVn10EnYJFla1mnWU_8,42065
|
|
166
166
|
ultralytics/models/sam/modules/transformer.py,sha256=NmTuyxS9PNsg66tKY9_Q2af4I09VW5s8IbfswyTT3ao,14892
|
|
167
|
-
ultralytics/models/sam/modules/utils.py,sha256=
|
|
167
|
+
ultralytics/models/sam/modules/utils.py,sha256=hE06t6cZf10AmPLPwGZbFrGheoOgGAGZ0GXRWlJH9pE,21125
|
|
168
168
|
ultralytics/models/sam/sam3/__init__.py,sha256=aM4-KimnYgIFe-e5ctLT8e6k9PagvuvKFaHaagDZM7E,144
|
|
169
169
|
ultralytics/models/sam/sam3/decoder.py,sha256=kXgPOjOh63ttJPFwMF90arK9AKZwPmhxOiexnPijiTE,22872
|
|
170
170
|
ultralytics/models/sam/sam3/encoder.py,sha256=IFUIJkWrVW1MmkeA142Sxhgnx5Tssq2Bgi9T3iIppU4,21543
|
|
@@ -188,7 +188,7 @@ ultralytics/models/yolo/classify/val.py,sha256=gtoUJN5_-56EbiYp5Ur-shfdBNMJOqToW
|
|
|
188
188
|
ultralytics/models/yolo/detect/__init__.py,sha256=GIRsLYR-kT4JJx7lh4ZZAFGBZj0aebokuU0A7JbjDVA,257
|
|
189
189
|
ultralytics/models/yolo/detect/predict.py,sha256=Sct-UwkDe54ZmVtTYl0-fKgx_0BOlPBUsr4NodFd-eU,5385
|
|
190
190
|
ultralytics/models/yolo/detect/train.py,sha256=-PHH6i767_XKCPsBeAOi7AxfHpoq451GfjY4TRMuo7c,10469
|
|
191
|
-
ultralytics/models/yolo/detect/val.py,sha256
|
|
191
|
+
ultralytics/models/yolo/detect/val.py,sha256=-UTrVG3HturHHAY76BUegO2s5d9Xq_dEumebLiNkSVc,22351
|
|
192
192
|
ultralytics/models/yolo/obb/__init__.py,sha256=tQmpG8wVHsajWkZdmD6cjGohJ4ki64iSXQT8JY_dydo,221
|
|
193
193
|
ultralytics/models/yolo/obb/predict.py,sha256=vA_BueSJJJuyaAZPWE0xKk7KI_YPQCUOCqeZZLMTeXM,2600
|
|
194
194
|
ultralytics/models/yolo/obb/train.py,sha256=qtBjwOHOq0oQ9mK0mOtnUrXAQ5UCUrntKq_Z0-oCBHo,3438
|
|
@@ -198,7 +198,7 @@ ultralytics/models/yolo/pose/predict.py,sha256=rsorTRpyL-x40R2QVDDG2isc1e2F2lGfD
|
|
|
198
198
|
ultralytics/models/yolo/pose/train.py,sha256=lKxZ1dnkN3WlEPGlIlLF7ZuR_W2eoPrxhVrKGbJIQto,4628
|
|
199
199
|
ultralytics/models/yolo/pose/val.py,sha256=s5WmXcZI5cAi3LPdIVHnkFUbEoFZsw5PBnnLnZ3Ep_c,12004
|
|
200
200
|
ultralytics/models/yolo/segment/__init__.py,sha256=3IThhZ1wlkY9FvmWm9cE-5-ZyE6F1FgzAtQ6jOOFzzw,275
|
|
201
|
-
ultralytics/models/yolo/segment/predict.py,sha256=
|
|
201
|
+
ultralytics/models/yolo/segment/predict.py,sha256=XK-SOrxfcIT8c52JC2ruEf3y9xcWSHsi6Yj1jZ0JqdU,5429
|
|
202
202
|
ultralytics/models/yolo/segment/train.py,sha256=i1nDO0B7ScFo3G64ZSTmRZ2WLUVaMsvAoedSYa_MoIU,3009
|
|
203
203
|
ultralytics/models/yolo/segment/val.py,sha256=LkyV5_I5YPdJNyI6OGy2i7J_r0Ll-jYdru_HXS1mN6s,13252
|
|
204
204
|
ultralytics/models/yolo/world/__init__.py,sha256=nlh8I6t8hMGz_vZg8QSlsUW1R-2eKvn9CGUoPPQEGhA,131
|
|
@@ -211,14 +211,14 @@ ultralytics/models/yolo/yoloe/train_seg.py,sha256=0hRByMXsEJA-J2B1wXDMVhiW9f9MOT
|
|
|
211
211
|
ultralytics/models/yolo/yoloe/val.py,sha256=utUFWeFKRFWZrPr1y3A8ztbTwdoWMYqzlwBN7CQ0tCA,9418
|
|
212
212
|
ultralytics/nn/__init__.py,sha256=538LZPUKKvc3JCMgiQ4VLGqRN2ZAaVLFcQbeNNHFkEA,545
|
|
213
213
|
ultralytics/nn/autobackend.py,sha256=RkHTt8nBZaeupfshPpze8Wy7vw08FiJWctvzU3SEaro,44578
|
|
214
|
-
ultralytics/nn/tasks.py,sha256=
|
|
214
|
+
ultralytics/nn/tasks.py,sha256=nHhP3R8r17K_pHSfGXwDAPEwUyV0sbqzkSHjeZ2PRkg,70418
|
|
215
215
|
ultralytics/nn/text_model.py,sha256=novnuosqXnW1NmlOzWOk7dEKuN6Vq40CTksr6hI3Knc,15109
|
|
216
216
|
ultralytics/nn/modules/__init__.py,sha256=5Sg_28MDfKwdu14Ty_WCaiIXZyjBSQ-xCNCwnoz_w-w,3198
|
|
217
217
|
ultralytics/nn/modules/activation.py,sha256=J6n-CJKFK0YbhwcRDqm9zEJM9pSAEycj5quQss_3x6E,2219
|
|
218
218
|
ultralytics/nn/modules/block.py,sha256=YRALZHImSMdLpmF0qIf8uF3yENz0EK63SFp7gzylo5g,69885
|
|
219
219
|
ultralytics/nn/modules/conv.py,sha256=9WUlBzHD-wLgz0riLyttzASLIqBtXPK6Jk5EdyIiGCM,21100
|
|
220
220
|
ultralytics/nn/modules/head.py,sha256=V1zSWN-AOHPkciqvfruDA0LgBgSGyKc_CULNCNEAe8o,51875
|
|
221
|
-
ultralytics/nn/modules/transformer.py,sha256=
|
|
221
|
+
ultralytics/nn/modules/transformer.py,sha256=lAjTH-U8IkBp_1cXSOOFSus9tJf-s8WISKKcXPB84CM,31972
|
|
222
222
|
ultralytics/nn/modules/utils.py,sha256=EyhENse_RESlXjLHAJWvV07_tq1MVMmfzXgPR1fiT9w,6066
|
|
223
223
|
ultralytics/solutions/__init__.py,sha256=Jj7OcRiYjHH-e104H4xTgjjR5W6aPB4mBRndbaSPmgU,1209
|
|
224
224
|
ultralytics/solutions/ai_gym.py,sha256=ItLE6HYMx6AEgiHEDG1HKDkippnrnycb-79S2g72AYA,5181
|
|
@@ -254,7 +254,7 @@ ultralytics/utils/__init__.py,sha256=JfvODTB4mG_JOhTeCiPtq0iCEgiCh14hJf195rnOhLQ
|
|
|
254
254
|
ultralytics/utils/autobatch.py,sha256=jiE4m_--H9UkXFDm_FqzcZk_hSTCGpS72XdVEKgZwAo,5114
|
|
255
255
|
ultralytics/utils/autodevice.py,sha256=rXlPuo-iX-vZ4BabmMGEGh9Uxpau4R7Zlt1KCo9Xfyc,8892
|
|
256
256
|
ultralytics/utils/benchmarks.py,sha256=S_W4S4pe2ktSRdSuWb6m09UEFQmZhmjl943bbo67hOI,32277
|
|
257
|
-
ultralytics/utils/checks.py,sha256=
|
|
257
|
+
ultralytics/utils/checks.py,sha256=LjcAbcpjo-WmLGbDYZk0vo8UQnzzLUewz7x8jkwjNN8,38534
|
|
258
258
|
ultralytics/utils/cpu.py,sha256=OksKOlX93AsbSsFuoYvLXRXgpkOibrZSwQyW6lipt4Q,3493
|
|
259
259
|
ultralytics/utils/dist.py,sha256=hOuY1-unhQAY-uWiZw3LWw36d1mqJuYK75NdlwB4oKE,4131
|
|
260
260
|
ultralytics/utils/downloads.py,sha256=IyiGjjXqOyf1B0qLMk7vE6sSQ8s232OhKS8aj9XbTgs,22883
|
|
@@ -263,18 +263,18 @@ ultralytics/utils/events.py,sha256=6vqs_iSxoXIhQ804sOjApNZmXwNW9FUFtjaHPY8ta10,4
|
|
|
263
263
|
ultralytics/utils/files.py,sha256=BdaRwEKqzle4glSj8n_jq6bDjTCAs_H1SN06ZOQ9qFU,8190
|
|
264
264
|
ultralytics/utils/git.py,sha256=UdqeIiiEzg1qkerAZrg5YtTYPuJYwrpxW9N_6Pq6s8U,5501
|
|
265
265
|
ultralytics/utils/instance.py,sha256=11mhefvTI9ftMqSirXuiViAi0Fxlo6v84qvNxfRNUoE,18862
|
|
266
|
-
ultralytics/utils/logger.py,sha256=
|
|
266
|
+
ultralytics/utils/logger.py,sha256=T5iaNnaqbCvx_FZf1dhVkr5FVxyxb4vO17t4SJfCIhg,19132
|
|
267
267
|
ultralytics/utils/loss.py,sha256=t-z7qkvqF8OtuRHrj2wmvClZV2CCumIRi9jnqkc9i_A,39573
|
|
268
|
-
ultralytics/utils/metrics.py,sha256=
|
|
268
|
+
ultralytics/utils/metrics.py,sha256=dpS9jSPf3dqozcrkiraKhYBI03U2t-_lt8pWNCijGww,69152
|
|
269
269
|
ultralytics/utils/nms.py,sha256=zv1rOzMF6WU8Kdk41VzNf1H1EMt_vZHcbDFbg3mnN2o,14248
|
|
270
|
-
ultralytics/utils/ops.py,sha256=
|
|
270
|
+
ultralytics/utils/ops.py,sha256=nWvTLJSBeW_XrxCy5Ytxl7sZJHp2sRqyCv4mm8QwYnw,25797
|
|
271
271
|
ultralytics/utils/patches.py,sha256=mD3slAMAhcezzP42_fOWmacNMU6zXB68Br4_EBCyIjs,7117
|
|
272
|
-
ultralytics/utils/plotting.py,sha256=
|
|
272
|
+
ultralytics/utils/plotting.py,sha256=NseUsSUKkeFDMEC_iJsnRXFs_G4Oem5RAyUqVIBw6Sg,48366
|
|
273
273
|
ultralytics/utils/tal.py,sha256=w7oi6fp0NmL6hHh-yvCCX1cBuuB4JuX7w1wiR4_SMZs,20678
|
|
274
274
|
ultralytics/utils/torch_utils.py,sha256=zOPUQlorTiEPSkqlSEPyaQhpmzmgOIKF7f3xJb0UjdQ,40268
|
|
275
275
|
ultralytics/utils/tqdm.py,sha256=4kL_nczykHu6VxRzRSbvUSJknrCZydoS_ZegZkFXpsg,16197
|
|
276
276
|
ultralytics/utils/triton.py,sha256=BQu3CD3OlT76d1OtmnX5slQU37VC1kzRvEtfI2saIQA,5211
|
|
277
|
-
ultralytics/utils/tuner.py,sha256=
|
|
277
|
+
ultralytics/utils/tuner.py,sha256=NOh0CDAqD1IvTLB5UglIgSS5RXP7lmiyrWKU4uJ0I74,7355
|
|
278
278
|
ultralytics/utils/callbacks/__init__.py,sha256=hzL63Rce6VkZhP4Lcim9LKjadixaQG86nKqPhk7IkS0,242
|
|
279
279
|
ultralytics/utils/callbacks/base.py,sha256=floD31JHqHpiVabQiE76_hzC_j7KjtL4w_czkD1bLKc,6883
|
|
280
280
|
ultralytics/utils/callbacks/clearml.py,sha256=LjfNe4mswceCOpEGVLxqGXjkl_XGbef4awdcp4502RU,5831
|
|
@@ -283,7 +283,7 @@ ultralytics/utils/callbacks/dvc.py,sha256=YT0Sa5P8Huj8Fn9jM2P6MYzUY3PIVxsa5BInVi
|
|
|
283
283
|
ultralytics/utils/callbacks/hub.py,sha256=fVLqqr3ZM6hoYFlVMEeejfq1MWDrkWCskPFOG3HGILQ,4159
|
|
284
284
|
ultralytics/utils/callbacks/mlflow.py,sha256=wCXjQgdufp9LYujqMzLZOmIOur6kvrApHNeo9dA7t_g,5323
|
|
285
285
|
ultralytics/utils/callbacks/neptune.py,sha256=_vt3cMwDHCR-LyT3KtRikGpj6AG11oQ-skUUUUdZ74o,4391
|
|
286
|
-
ultralytics/utils/callbacks/platform.py,sha256=
|
|
286
|
+
ultralytics/utils/callbacks/platform.py,sha256=L7P5ttko-QVkig2y3r-D8YxfOWb7lNAan4iuMXxQ_u4,11682
|
|
287
287
|
ultralytics/utils/callbacks/raytune.py,sha256=Y0dFyNZVRuFovSh7nkgUIHTQL3xIXOACElgHuYbg_5I,1278
|
|
288
288
|
ultralytics/utils/callbacks/tensorboard.py,sha256=PTJYvD2gqRUN8xw5VoTjvKnu2adukLfvhMlDgTnTiFU,4952
|
|
289
289
|
ultralytics/utils/callbacks/wb.py,sha256=ghmL3gigOa-z_F54-TzMraKw9MAaYX-Wk4H8dLoRvX8,7705
|
|
@@ -291,8 +291,8 @@ ultralytics/utils/export/__init__.py,sha256=Cfh-PwVfTF_lwPp-Ss4wiX4z8Sm1XRPklsqd
|
|
|
291
291
|
ultralytics/utils/export/engine.py,sha256=23-lC6dNsmz5vprSJzaN7UGNXrFlVedNcqhlOH_IXes,9956
|
|
292
292
|
ultralytics/utils/export/imx.py,sha256=F3b334IZdwjF8PdP1s6QI3Ndd82_2e77clj8aGLzIDo,12856
|
|
293
293
|
ultralytics/utils/export/tensorflow.py,sha256=igYzwbdblb9YgfV4Jgl5lMvynuVRcF51dAzI7j-BBI0,9966
|
|
294
|
-
dgenerate_ultralytics_headless-8.3.
|
|
295
|
-
dgenerate_ultralytics_headless-8.3.
|
|
296
|
-
dgenerate_ultralytics_headless-8.3.
|
|
297
|
-
dgenerate_ultralytics_headless-8.3.
|
|
298
|
-
dgenerate_ultralytics_headless-8.3.
|
|
294
|
+
dgenerate_ultralytics_headless-8.3.247.dist-info/METADATA,sha256=WiMRFlV9VZMKUYVg5f9qeHS0Hd3BPi775nB0eJOtEQc,38799
|
|
295
|
+
dgenerate_ultralytics_headless-8.3.247.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
296
|
+
dgenerate_ultralytics_headless-8.3.247.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
|
297
|
+
dgenerate_ultralytics_headless-8.3.247.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
|
298
|
+
dgenerate_ultralytics_headless-8.3.247.dist-info/RECORD,,
|
tests/test_exports.py
CHANGED
|
@@ -267,13 +267,13 @@ def test_export_imx():
|
|
|
267
267
|
@pytest.mark.skipif(not checks.IS_PYTHON_3_10, reason="Axelera export requires Python 3.10")
|
|
268
268
|
def test_export_axelera():
|
|
269
269
|
"""Test YOLO export to Axelera format."""
|
|
270
|
-
# For faster testing, use a smaller calibration dataset
|
|
271
|
-
# 32 image size crashes axelera export, so use 64
|
|
270
|
+
# For faster testing, use a smaller calibration dataset (32 image size crashes axelera export, so 64 is used)
|
|
272
271
|
file = YOLO(MODEL).export(format="axelera", imgsz=64, data="coco8.yaml")
|
|
273
272
|
assert Path(file).exists(), f"Axelera export failed, directory not found: {file}"
|
|
274
273
|
shutil.rmtree(file, ignore_errors=True) # cleanup
|
|
275
274
|
|
|
276
275
|
|
|
276
|
+
# @pytest.mark.skipif(True, reason="Disabled for debugging ruamel.yaml installation required by executorch")
|
|
277
277
|
@pytest.mark.skipif(not checks.IS_PYTHON_MINIMUM_3_10 or not TORCH_2_9, reason="Requires Python>=3.10 and Torch>=2.9.0")
|
|
278
278
|
@pytest.mark.skipif(WINDOWS, reason="Skipping test on Windows")
|
|
279
279
|
def test_export_executorch():
|
ultralytics/__init__.py
CHANGED
ultralytics/data/converter.py
CHANGED
|
@@ -353,7 +353,7 @@ def convert_segment_masks_to_yolo_seg(masks_dir: str, output_dir: str, classes:
|
|
|
353
353
|
Args:
|
|
354
354
|
masks_dir (str): The path to the directory where all mask images (png, jpg) are stored.
|
|
355
355
|
output_dir (str): The path to the directory where the converted YOLO segmentation masks will be stored.
|
|
356
|
-
classes (int): Total classes in the dataset
|
|
356
|
+
classes (int): Total number of classes in the dataset, e.g., 80 for COCO.
|
|
357
357
|
|
|
358
358
|
Examples:
|
|
359
359
|
>>> from ultralytics.data.converter import convert_segment_masks_to_yolo_seg
|
ultralytics/engine/exporter.py
CHANGED
|
@@ -1192,6 +1192,8 @@ class Exporter:
|
|
|
1192
1192
|
# BUG executorch build on arm64 Docker requires packaging>=22.0 https://github.com/pypa/setuptools/issues/4483
|
|
1193
1193
|
if LINUX and ARM64 and IS_DOCKER:
|
|
1194
1194
|
check_requirements("packaging>=22.0")
|
|
1195
|
+
|
|
1196
|
+
check_requirements("ruamel.yaml<0.19.0")
|
|
1195
1197
|
check_requirements("executorch==1.0.1", "flatbuffers")
|
|
1196
1198
|
# Pin numpy to avoid coremltools errors with numpy>=2.4.0, must be separate
|
|
1197
1199
|
check_requirements("numpy<=2.3.5")
|
ultralytics/engine/results.py
CHANGED
|
@@ -954,8 +954,8 @@ class Boxes(BaseTensor):
|
|
|
954
954
|
>>> boxes = Boxes(torch.tensor([[100, 50, 150, 100], [200, 150, 300, 250]]), orig_shape=(480, 640))
|
|
955
955
|
>>> xywh = boxes.xywh
|
|
956
956
|
>>> print(xywh)
|
|
957
|
-
tensor([[
|
|
958
|
-
[
|
|
957
|
+
tensor([[125.0000, 75.0000, 50.0000, 50.0000],
|
|
958
|
+
[250.0000, 200.0000, 100.0000, 100.0000]])
|
|
959
959
|
"""
|
|
960
960
|
return ops.xyxy2xywh(self.xyxy)
|
|
961
961
|
|
ultralytics/engine/validator.py
CHANGED
|
@@ -364,7 +364,10 @@ class BaseValidator:
|
|
|
364
364
|
return []
|
|
365
365
|
|
|
366
366
|
def on_plot(self, name, data=None):
|
|
367
|
-
"""Register plots for visualization."""
|
|
367
|
+
"""Register plots for visualization, deduplicating by type."""
|
|
368
|
+
plot_type = data.get("type") if data else None
|
|
369
|
+
if plot_type and any((v.get("data") or {}).get("type") == plot_type for v in self.plots.values()):
|
|
370
|
+
return # Skip duplicate plot types
|
|
368
371
|
self.plots[Path(name)] = {"data": data, "timestamp": time.time()}
|
|
369
372
|
|
|
370
373
|
def plot_val_samples(self, batch, ni):
|
|
@@ -166,7 +166,7 @@ def reshape_for_broadcast(freqs_cis: torch.Tensor, x: torch.Tensor):
|
|
|
166
166
|
AssertionError: If the shape of freqs_cis doesn't match the last two dimensions of x.
|
|
167
167
|
"""
|
|
168
168
|
ndim = x.ndim
|
|
169
|
-
assert
|
|
169
|
+
assert ndim >= 2
|
|
170
170
|
assert freqs_cis.shape == (x.shape[-2], x.shape[-1])
|
|
171
171
|
shape = [d if i >= ndim - 2 else 1 for i, d in enumerate(x.shape)]
|
|
172
172
|
return freqs_cis.view(*shape)
|
|
@@ -347,14 +347,14 @@ class DetectionValidator(BaseValidator):
|
|
|
347
347
|
ni (int): Batch index.
|
|
348
348
|
max_det (Optional[int]): Maximum number of detections to plot.
|
|
349
349
|
"""
|
|
350
|
-
|
|
350
|
+
if not preds:
|
|
351
|
+
return
|
|
351
352
|
for i, pred in enumerate(preds):
|
|
352
353
|
pred["batch_idx"] = torch.ones_like(pred["conf"]) * i # add batch index to predictions
|
|
353
354
|
keys = preds[0].keys()
|
|
354
355
|
max_det = max_det or self.args.max_det
|
|
355
356
|
batched_preds = {k: torch.cat([x[k][:max_det] for x in preds], dim=0) for k in keys}
|
|
356
|
-
#
|
|
357
|
-
batched_preds["bboxes"][:, :4] = ops.xyxy2xywh(batched_preds["bboxes"][:, :4]) # convert to xywh format
|
|
357
|
+
batched_preds["bboxes"] = ops.xyxy2xywh(batched_preds["bboxes"]) # convert to xywh format
|
|
358
358
|
plot_images(
|
|
359
359
|
images=batch["img"],
|
|
360
360
|
labels=batched_preds,
|
|
@@ -98,9 +98,9 @@ class SegmentationPredictor(DetectionPredictor):
|
|
|
98
98
|
masks = None
|
|
99
99
|
elif self.args.retina_masks:
|
|
100
100
|
pred[:, :4] = ops.scale_boxes(img.shape[2:], pred[:, :4], orig_img.shape)
|
|
101
|
-
masks = ops.process_mask_native(proto, pred[:, 6:], pred[:, :4], orig_img.shape[:2]) #
|
|
101
|
+
masks = ops.process_mask_native(proto, pred[:, 6:], pred[:, :4], orig_img.shape[:2]) # NHW
|
|
102
102
|
else:
|
|
103
|
-
masks = ops.process_mask(proto, pred[:, 6:], pred[:, :4], img.shape[2:], upsample=True) #
|
|
103
|
+
masks = ops.process_mask(proto, pred[:, 6:], pred[:, :4], img.shape[2:], upsample=True) # NHW
|
|
104
104
|
pred[:, :4] = ops.scale_boxes(img.shape[2:], pred[:, :4], orig_img.shape)
|
|
105
105
|
if masks is not None:
|
|
106
106
|
keep = masks.amax((-2, -1)) > 0 # only keep predictions with masks
|
|
@@ -305,16 +305,16 @@ class TransformerBlock(nn.Module):
|
|
|
305
305
|
"""Forward propagate the input through the transformer block.
|
|
306
306
|
|
|
307
307
|
Args:
|
|
308
|
-
x (torch.Tensor): Input tensor with shape [b, c1,
|
|
308
|
+
x (torch.Tensor): Input tensor with shape [b, c1, h, w].
|
|
309
309
|
|
|
310
310
|
Returns:
|
|
311
|
-
(torch.Tensor): Output tensor with shape [b, c2,
|
|
311
|
+
(torch.Tensor): Output tensor with shape [b, c2, h, w].
|
|
312
312
|
"""
|
|
313
313
|
if self.conv is not None:
|
|
314
314
|
x = self.conv(x)
|
|
315
|
-
b, _,
|
|
315
|
+
b, _, h, w = x.shape
|
|
316
316
|
p = x.flatten(2).permute(2, 0, 1)
|
|
317
|
-
return self.tr(p + self.linear(p)).permute(1, 2, 0).reshape(b, self.c2,
|
|
317
|
+
return self.tr(p + self.linear(p)).permute(1, 2, 0).reshape(b, self.c2, h, w)
|
|
318
318
|
|
|
319
319
|
|
|
320
320
|
class MLPBlock(nn.Module):
|
ultralytics/nn/tasks.py
CHANGED
|
@@ -407,7 +407,7 @@ class DetectionModel(BaseModel):
|
|
|
407
407
|
self.model.train() # Set model back to training(default) mode
|
|
408
408
|
m.bias_init() # only run once
|
|
409
409
|
else:
|
|
410
|
-
self.stride = torch.Tensor([32]) # default stride
|
|
410
|
+
self.stride = torch.Tensor([32]) # default stride, e.g., RTDETR
|
|
411
411
|
|
|
412
412
|
# Init weights, biases
|
|
413
413
|
initialize_weights(self)
|
|
@@ -1589,7 +1589,7 @@ def parse_model(d, ch, verbose=True):
|
|
|
1589
1589
|
n = n_ = max(round(n * depth), 1) if n > 1 else n # depth gain
|
|
1590
1590
|
if m in base_modules:
|
|
1591
1591
|
c1, c2 = ch[f], args[0]
|
|
1592
|
-
if c2 != nc: # if c2
|
|
1592
|
+
if c2 != nc: # if c2 != nc (e.g., Classify() output)
|
|
1593
1593
|
c2 = make_divisible(min(c2, max_channels) * width, 8)
|
|
1594
1594
|
if m is C2fAttn: # set 1) embed channels and 2) num heads
|
|
1595
1595
|
args[1] = make_divisible(min(args[1], max_channels // 2) * width, 8)
|
|
@@ -8,8 +8,9 @@ from concurrent.futures import ThreadPoolExecutor
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from time import time
|
|
10
10
|
|
|
11
|
-
from ultralytics.utils import ENVIRONMENT, GIT, LOGGER, PYTHON_VERSION, RANK, SETTINGS, TESTS_RUNNING
|
|
11
|
+
from ultralytics.utils import ENVIRONMENT, GIT, LOGGER, PYTHON_VERSION, RANK, SETTINGS, TESTS_RUNNING, colorstr
|
|
12
12
|
|
|
13
|
+
PREFIX = colorstr("Platform: ")
|
|
13
14
|
_last_upload = 0 # Rate limit model uploads
|
|
14
15
|
_console_logger = None # Global console logger instance
|
|
15
16
|
_system_logger = None # Cached system logger instance
|
|
@@ -31,6 +32,34 @@ except (AssertionError, ImportError):
|
|
|
31
32
|
_api_key = None
|
|
32
33
|
|
|
33
34
|
|
|
35
|
+
def _interp_plot(plot, n=101):
|
|
36
|
+
"""Interpolate plot curve data from 1000 to n points to reduce storage size."""
|
|
37
|
+
import numpy as np
|
|
38
|
+
|
|
39
|
+
if not plot.get("x") or not plot.get("y"):
|
|
40
|
+
return plot # No interpolation needed (e.g., confusion_matrix)
|
|
41
|
+
|
|
42
|
+
x, y = np.array(plot["x"]), np.array(plot["y"])
|
|
43
|
+
if len(x) <= n:
|
|
44
|
+
return plot # Already small enough
|
|
45
|
+
|
|
46
|
+
# New x values (101 points gives clean 0.01 increments: 0, 0.01, 0.02, ..., 1.0)
|
|
47
|
+
x_new = np.linspace(x[0], x[-1], n)
|
|
48
|
+
|
|
49
|
+
# Interpolate y values (handle both 1D and 2D arrays)
|
|
50
|
+
if y.ndim == 1:
|
|
51
|
+
y_new = np.interp(x_new, x, y)
|
|
52
|
+
else:
|
|
53
|
+
y_new = np.array([np.interp(x_new, x, yi) for yi in y])
|
|
54
|
+
|
|
55
|
+
# Also interpolate ap if present (for PR curves)
|
|
56
|
+
result = {**plot, "x": x_new.tolist(), "y": y_new.tolist()}
|
|
57
|
+
if "ap" in plot:
|
|
58
|
+
result["ap"] = plot["ap"] # Keep AP values as-is (per-class scalars)
|
|
59
|
+
|
|
60
|
+
return result
|
|
61
|
+
|
|
62
|
+
|
|
34
63
|
def _send(event, data, project, name):
|
|
35
64
|
"""Send event to Platform endpoint."""
|
|
36
65
|
try:
|
|
@@ -75,7 +104,8 @@ def _upload_model(model_path, project, name):
|
|
|
75
104
|
timeout=600, # 10 min timeout for large models
|
|
76
105
|
).raise_for_status()
|
|
77
106
|
|
|
78
|
-
|
|
107
|
+
# url = f"https://alpha.ultralytics.com/{project}/{name}"
|
|
108
|
+
# LOGGER.info(f"{PREFIX}Model uploaded to {url}")
|
|
79
109
|
return data.get("gcsPath")
|
|
80
110
|
|
|
81
111
|
except Exception as e:
|
|
@@ -150,7 +180,8 @@ def on_pretrain_routine_start(trainer):
|
|
|
150
180
|
_last_upload = time()
|
|
151
181
|
|
|
152
182
|
project, name = str(trainer.args.project), str(trainer.args.name or "train")
|
|
153
|
-
|
|
183
|
+
url = f"https://alpha.ultralytics.com/{project}/{name}"
|
|
184
|
+
LOGGER.info(f"{PREFIX}Streaming to {url}")
|
|
154
185
|
|
|
155
186
|
# Create callback to send console output to Platform
|
|
156
187
|
def send_console_output(content, line_count, chunk_id):
|
|
@@ -252,7 +283,7 @@ def on_model_save(trainer):
|
|
|
252
283
|
|
|
253
284
|
|
|
254
285
|
def on_train_end(trainer):
|
|
255
|
-
"""Log final results
|
|
286
|
+
"""Log final results, upload best model, and send validation plot data."""
|
|
256
287
|
global _console_logger
|
|
257
288
|
|
|
258
289
|
if RANK not in {-1, 0} or not trainer.args.project:
|
|
@@ -260,7 +291,7 @@ def on_train_end(trainer):
|
|
|
260
291
|
|
|
261
292
|
project, name = str(trainer.args.project), str(trainer.args.name or "train")
|
|
262
293
|
|
|
263
|
-
# Stop console capture
|
|
294
|
+
# Stop console capture
|
|
264
295
|
if _console_logger:
|
|
265
296
|
_console_logger.stop_capture()
|
|
266
297
|
_console_logger = None
|
|
@@ -272,7 +303,20 @@ def on_train_end(trainer):
|
|
|
272
303
|
model_size = Path(trainer.best).stat().st_size
|
|
273
304
|
model_path = _upload_model(trainer.best, project, name)
|
|
274
305
|
|
|
275
|
-
#
|
|
306
|
+
# Collect plots from trainer and validator, deduplicating by type
|
|
307
|
+
plots_by_type = {}
|
|
308
|
+
for info in getattr(trainer, "plots", {}).values():
|
|
309
|
+
if info.get("data") and info["data"].get("type"):
|
|
310
|
+
plots_by_type[info["data"]["type"]] = info["data"]
|
|
311
|
+
for info in getattr(getattr(trainer, "validator", None), "plots", {}).values():
|
|
312
|
+
if info.get("data") and info["data"].get("type"):
|
|
313
|
+
plots_by_type.setdefault(info["data"]["type"], info["data"]) # Don't overwrite trainer plots
|
|
314
|
+
plots = [_interp_plot(p) for p in plots_by_type.values()] # Interpolate curves to reduce size
|
|
315
|
+
|
|
316
|
+
# Get class names
|
|
317
|
+
names = getattr(getattr(trainer, "validator", None), "names", None) or (trainer.data or {}).get("names")
|
|
318
|
+
class_names = list(names.values()) if isinstance(names, dict) else list(names) if names else None
|
|
319
|
+
|
|
276
320
|
_send(
|
|
277
321
|
"training_complete",
|
|
278
322
|
{
|
|
@@ -280,14 +324,17 @@ def on_train_end(trainer):
|
|
|
280
324
|
"metrics": {**trainer.metrics, "fitness": trainer.fitness},
|
|
281
325
|
"bestEpoch": getattr(trainer, "best_epoch", trainer.epoch),
|
|
282
326
|
"bestFitness": trainer.best_fitness,
|
|
283
|
-
"modelPath": model_path or str(trainer.best) if trainer.best else None,
|
|
327
|
+
"modelPath": model_path or (str(trainer.best) if trainer.best else None),
|
|
284
328
|
"modelSize": model_size,
|
|
285
|
-
}
|
|
329
|
+
},
|
|
330
|
+
"classNames": class_names,
|
|
331
|
+
"plots": plots,
|
|
286
332
|
},
|
|
287
333
|
project,
|
|
288
334
|
name,
|
|
289
335
|
)
|
|
290
|
-
|
|
336
|
+
url = f"https://alpha.ultralytics.com/{project}/{name}"
|
|
337
|
+
LOGGER.info(f"{PREFIX}View results at {url}")
|
|
291
338
|
|
|
292
339
|
|
|
293
340
|
callbacks = (
|
ultralytics/utils/checks.py
CHANGED
|
@@ -489,7 +489,10 @@ def check_requirements(requirements=ROOT.parent / "requirements.txt", exclude=()
|
|
|
489
489
|
f"{prefix} {colorstr('bold', 'Restart runtime or rerun command for updates to take effect')}\n"
|
|
490
490
|
)
|
|
491
491
|
except Exception as e:
|
|
492
|
-
|
|
492
|
+
msg = f"{prefix} ❌ {e}"
|
|
493
|
+
if hasattr(e, "output") and e.output:
|
|
494
|
+
msg += f"\n{e.output}"
|
|
495
|
+
LOGGER.warning(msg)
|
|
493
496
|
return False
|
|
494
497
|
else:
|
|
495
498
|
return False
|
ultralytics/utils/logger.py
CHANGED
|
@@ -8,7 +8,7 @@ import time
|
|
|
8
8
|
from datetime import datetime
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
|
|
11
|
-
from ultralytics.utils import MACOS, RANK
|
|
11
|
+
from ultralytics.utils import LOGGER, MACOS, RANK
|
|
12
12
|
from ultralytics.utils.checks import check_requirements
|
|
13
13
|
|
|
14
14
|
|
|
@@ -330,13 +330,19 @@ class SystemLogger:
|
|
|
330
330
|
|
|
331
331
|
def _init_nvidia(self):
|
|
332
332
|
"""Initialize NVIDIA GPU monitoring with pynvml."""
|
|
333
|
+
if MACOS:
|
|
334
|
+
return False
|
|
335
|
+
|
|
333
336
|
try:
|
|
334
|
-
assert not MACOS
|
|
335
337
|
check_requirements("nvidia-ml-py>=12.0.0")
|
|
336
338
|
self.pynvml = __import__("pynvml")
|
|
337
339
|
self.pynvml.nvmlInit()
|
|
338
340
|
return True
|
|
339
|
-
except Exception:
|
|
341
|
+
except Exception as e:
|
|
342
|
+
import torch
|
|
343
|
+
|
|
344
|
+
if torch.cuda.is_available():
|
|
345
|
+
LOGGER.warning(f"SystemLogger NVML init failed: {e}")
|
|
340
346
|
return False
|
|
341
347
|
|
|
342
348
|
def get_metrics(self, rates=False):
|
ultralytics/utils/metrics.py
CHANGED
|
@@ -568,7 +568,7 @@ class ConfusionMatrix(DataExportMixin):
|
|
|
568
568
|
fig.savefig(plot_fname, dpi=250)
|
|
569
569
|
plt.close(fig)
|
|
570
570
|
if on_plot:
|
|
571
|
-
on_plot(plot_fname)
|
|
571
|
+
on_plot(plot_fname, {"type": "confusion_matrix", "matrix": self.matrix.tolist()})
|
|
572
572
|
|
|
573
573
|
def print(self):
|
|
574
574
|
"""Print the confusion matrix to the console."""
|
|
@@ -661,7 +661,9 @@ def plot_pr_curve(
|
|
|
661
661
|
fig.savefig(save_dir, dpi=250)
|
|
662
662
|
plt.close(fig)
|
|
663
663
|
if on_plot:
|
|
664
|
-
|
|
664
|
+
# Pass PR curve data for interactive plotting (class names stored at model level)
|
|
665
|
+
# Transpose py to match other curves: y[class][point] format
|
|
666
|
+
on_plot(save_dir, {"type": "pr_curve", "x": px.tolist(), "y": py.T.tolist(), "ap": ap.tolist()})
|
|
665
667
|
|
|
666
668
|
|
|
667
669
|
@plt_settings()
|
|
@@ -706,7 +708,8 @@ def plot_mc_curve(
|
|
|
706
708
|
fig.savefig(save_dir, dpi=250)
|
|
707
709
|
plt.close(fig)
|
|
708
710
|
if on_plot:
|
|
709
|
-
|
|
711
|
+
# Pass metric-confidence curve data for interactive plotting (class names stored at model level)
|
|
712
|
+
on_plot(save_dir, {"type": f"{ylabel.lower()}_curve", "x": px.tolist(), "y": py.tolist()})
|
|
710
713
|
|
|
711
714
|
|
|
712
715
|
def compute_ap(recall: list[float], precision: list[float]) -> tuple[float, np.ndarray, np.ndarray]:
|
ultralytics/utils/ops.py
CHANGED
|
@@ -484,15 +484,15 @@ def process_mask(protos, masks_in, bboxes, shape, upsample: bool = False):
|
|
|
484
484
|
are the height and width of the input image. The mask is applied to the bounding boxes.
|
|
485
485
|
"""
|
|
486
486
|
c, mh, mw = protos.shape # CHW
|
|
487
|
-
masks = (masks_in @ protos.float().view(c, -1)).view(-1, mh, mw) #
|
|
487
|
+
masks = (masks_in @ protos.float().view(c, -1)).view(-1, mh, mw) # NHW
|
|
488
488
|
|
|
489
489
|
width_ratio = mw / shape[1]
|
|
490
490
|
height_ratio = mh / shape[0]
|
|
491
491
|
ratios = torch.tensor([[width_ratio, height_ratio, width_ratio, height_ratio]], device=bboxes.device)
|
|
492
492
|
|
|
493
|
-
masks = crop_mask(masks, boxes=bboxes * ratios) #
|
|
493
|
+
masks = crop_mask(masks, boxes=bboxes * ratios) # NHW
|
|
494
494
|
if upsample:
|
|
495
|
-
masks = F.interpolate(masks[None], shape, mode="bilinear")[0] #
|
|
495
|
+
masks = F.interpolate(masks[None], shape, mode="bilinear")[0] # NHW
|
|
496
496
|
return masks.gt_(0.0).byte()
|
|
497
497
|
|
|
498
498
|
|
|
@@ -506,12 +506,12 @@ def process_mask_native(protos, masks_in, bboxes, shape):
|
|
|
506
506
|
shape (tuple): Input image size as (height, width).
|
|
507
507
|
|
|
508
508
|
Returns:
|
|
509
|
-
(torch.Tensor): Binary mask tensor with shape (H, W
|
|
509
|
+
(torch.Tensor): Binary mask tensor with shape (N, H, W).
|
|
510
510
|
"""
|
|
511
511
|
c, mh, mw = protos.shape # CHW
|
|
512
512
|
masks = (masks_in @ protos.float().view(c, -1)).view(-1, mh, mw)
|
|
513
|
-
masks = scale_masks(masks[None], shape)[0] #
|
|
514
|
-
masks = crop_mask(masks, bboxes) #
|
|
513
|
+
masks = scale_masks(masks[None], shape)[0] # NHW
|
|
514
|
+
masks = crop_mask(masks, bboxes) # NHW
|
|
515
515
|
return masks.gt_(0.0).byte()
|
|
516
516
|
|
|
517
517
|
|
ultralytics/utils/plotting.py
CHANGED
|
@@ -401,7 +401,7 @@ class Annotator:
|
|
|
401
401
|
masks = masks.unsqueeze(3) # shape(n,h,w,1)
|
|
402
402
|
masks_color = masks * (colors * alpha) # shape(n,h,w,3)
|
|
403
403
|
inv_alpha_masks = (1 - masks * alpha).cumprod(0) # shape(n,h,w,1)
|
|
404
|
-
mcs = masks_color.max(dim=0).values # shape(
|
|
404
|
+
mcs = masks_color.max(dim=0).values # shape(h,w,3)
|
|
405
405
|
|
|
406
406
|
im_gpu = im_gpu.flip(dims=[0]).permute(1, 2, 0).contiguous() # shape(h,w,3)
|
|
407
407
|
im_gpu = im_gpu * inv_alpha_masks[-1] + mcs
|
ultralytics/utils/tuner.py
CHANGED
|
@@ -87,12 +87,23 @@ def run_ray_tune(
|
|
|
87
87
|
# Put the model in ray store
|
|
88
88
|
task = model.task
|
|
89
89
|
model_in_store = ray.put(model)
|
|
90
|
+
base_name = train_args.get("name", "tune")
|
|
90
91
|
|
|
91
92
|
def _tune(config):
|
|
92
93
|
"""Train the YOLO model with the specified hyperparameters and return results."""
|
|
93
94
|
model_to_train = ray.get(model_in_store) # get the model from ray store for tuning
|
|
94
95
|
model_to_train.reset_callbacks()
|
|
95
96
|
config.update(train_args)
|
|
97
|
+
|
|
98
|
+
# Set trial-specific name for W&B logging
|
|
99
|
+
try:
|
|
100
|
+
trial_id = tune.get_trial_id() # Get current trial ID (e.g., "2c2fc_00000")
|
|
101
|
+
trial_suffix = trial_id.split("_")[-1] if "_" in trial_id else trial_id
|
|
102
|
+
config["name"] = f"{base_name}_{trial_suffix}"
|
|
103
|
+
except Exception:
|
|
104
|
+
# Not in Ray Tune context or error getting trial ID, use base name
|
|
105
|
+
config["name"] = base_name
|
|
106
|
+
|
|
96
107
|
results = model_to_train.train(**config)
|
|
97
108
|
return results.results_dict
|
|
98
109
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|