dgenerate-ultralytics-headless 8.4.3__py3-none-any.whl → 8.4.4__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.4.3.dist-info → dgenerate_ultralytics_headless-8.4.4.dist-info}/METADATA +9 -9
- {dgenerate_ultralytics_headless-8.4.3.dist-info → dgenerate_ultralytics_headless-8.4.4.dist-info}/RECORD +16 -16
- ultralytics/__init__.py +1 -1
- ultralytics/cfg/__init__.py +1 -1
- ultralytics/engine/exporter.py +1 -2
- ultralytics/engine/trainer.py +1 -1
- ultralytics/models/yolo/segment/predict.py +1 -1
- ultralytics/models/yolo/segment/val.py +1 -3
- ultralytics/nn/autobackend.py +1 -1
- ultralytics/utils/benchmarks.py +2 -2
- ultralytics/utils/callbacks/tensorboard.py +2 -0
- ultralytics/utils/export/imx.py +21 -9
- {dgenerate_ultralytics_headless-8.4.3.dist-info → dgenerate_ultralytics_headless-8.4.4.dist-info}/WHEEL +0 -0
- {dgenerate_ultralytics_headless-8.4.3.dist-info → dgenerate_ultralytics_headless-8.4.4.dist-info}/entry_points.txt +0 -0
- {dgenerate_ultralytics_headless-8.4.3.dist-info → dgenerate_ultralytics_headless-8.4.4.dist-info}/licenses/LICENSE +0 -0
- {dgenerate_ultralytics_headless-8.4.3.dist-info → dgenerate_ultralytics_headless-8.4.4.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.4.
|
|
3
|
+
Version: 8.4.4
|
|
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>
|
|
@@ -120,7 +120,7 @@ The workflow runs automatically every day at midnight UTC to check for new Ultra
|
|
|
120
120
|
|
|
121
121
|
<div align="center">
|
|
122
122
|
<p>
|
|
123
|
-
<a href="https://
|
|
123
|
+
<a href="https://platform.ultralytics.com/ultralytics/yolo26" target="_blank">
|
|
124
124
|
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/banner-yolov8.png" alt="Ultralytics YOLO banner"></a>
|
|
125
125
|
</p>
|
|
126
126
|
|
|
@@ -147,8 +147,8 @@ Find detailed documentation in the [Ultralytics Docs](https://docs.ultralytics.c
|
|
|
147
147
|
|
|
148
148
|
Request an Enterprise License for commercial use at [Ultralytics Licensing](https://www.ultralytics.com/license).
|
|
149
149
|
|
|
150
|
-
<a href="https://
|
|
151
|
-
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/refs/heads/main/yolo/performance-comparison.png" alt="
|
|
150
|
+
<a href="https://platform.ultralytics.com/ultralytics/yolo26" target="_blank">
|
|
151
|
+
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/refs/heads/main/yolo/performance-comparison.png" alt="YOLO26 performance plots">
|
|
152
152
|
</a>
|
|
153
153
|
|
|
154
154
|
<div align="center">
|
|
@@ -341,8 +341,8 @@ Our key integrations with leading AI platforms extend the functionality of Ultra
|
|
|
341
341
|
<br>
|
|
342
342
|
|
|
343
343
|
<div align="center">
|
|
344
|
-
<a href="https://
|
|
345
|
-
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-ultralytics-hub.png" width="10%" alt="Ultralytics
|
|
344
|
+
<a href="https://platform.ultralytics.com/ultralytics/yolo26">
|
|
345
|
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-ultralytics-hub.png" width="10%" alt="Ultralytics Platform logo"></a>
|
|
346
346
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="space">
|
|
347
347
|
<a href="https://docs.ultralytics.com/integrations/weights-biases/">
|
|
348
348
|
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-wb.png" width="10%" alt="Weights & Biases logo"></a>
|
|
@@ -354,9 +354,9 @@ Our key integrations with leading AI platforms extend the functionality of Ultra
|
|
|
354
354
|
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-neuralmagic.png" width="10%" alt="Neural Magic logo"></a>
|
|
355
355
|
</div>
|
|
356
356
|
|
|
357
|
-
|
|
|
358
|
-
|
|
|
359
|
-
| Streamline YOLO workflows: Label, train, and deploy effortlessly with [Ultralytics
|
|
357
|
+
| Ultralytics Platform 🌟 | Weights & Biases | Comet | Neural Magic |
|
|
358
|
+
| :---------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------: |
|
|
359
|
+
| Streamline YOLO workflows: Label, train, and deploy effortlessly with [Ultralytics Platform](https://platform.ultralytics.com/ultralytics/yolo26). Try now! | Track experiments, hyperparameters, and results with [Weights & Biases](https://docs.ultralytics.com/integrations/weights-biases/). | Free forever, [Comet ML](https://docs.ultralytics.com/integrations/comet/) lets you save YOLO models, resume training, and interactively visualize predictions. | Run YOLO inference up to 6x faster with [Neural Magic DeepSparse](https://docs.ultralytics.com/integrations/neural-magic/). |
|
|
360
360
|
|
|
361
361
|
## 🤝 Contribute
|
|
362
362
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dgenerate_ultralytics_headless-8.4.
|
|
1
|
+
dgenerate_ultralytics_headless-8.4.4.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
2
2
|
tests/__init__.py,sha256=hfUXxYLJB3846OCzWV94ZKEZsi8vq9Pqrdd2mMgjjck,804
|
|
3
3
|
tests/conftest.py,sha256=rlKyDuOC_3ptXrWS8Q19bNEGOupUmYXHj3nB6o1GBGY,2318
|
|
4
4
|
tests/test_cli.py,sha256=GhIFHi-_WIJpDgoGNRi0DnjbfwP1wHbklBMnkCM-P_4,5464
|
|
@@ -8,11 +8,11 @@ tests/test_exports.py,sha256=Toy4u-4bsoyAbzNhc9kbMuKqvMKywZxNj5jlFNTzFWs,14670
|
|
|
8
8
|
tests/test_integrations.py,sha256=FjvTGjXm3bvYHK3_obgObhC5SzHCTzw4aOJV9Hh08jQ,6220
|
|
9
9
|
tests/test_python.py,sha256=np6on3Sa0NNi5pquvilekjKxxedAJMpLOQEthGaIalQ,29284
|
|
10
10
|
tests/test_solutions.py,sha256=1tRlM72YciE42Nk9v83gsXOD5RSx9GSWVsKGhH7-HxE,14122
|
|
11
|
-
ultralytics/__init__.py,sha256=
|
|
11
|
+
ultralytics/__init__.py,sha256=sJYUdz1Qx-pwzIz34CD4B1PgspkWiGojpY2uQ6D5lE0,1300
|
|
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
|
|
15
|
-
ultralytics/cfg/__init__.py,sha256=
|
|
15
|
+
ultralytics/cfg/__init__.py,sha256=_LkOX0ZG8AlWr_NG2KW7E8SQ7DqVeD_vSiYUd2EKXA4,40288
|
|
16
16
|
ultralytics/cfg/default.yaml,sha256=E__q2msvK9XCQngf0YFLpueCer_1tRcMJM0p3ahBdbA,9015
|
|
17
17
|
ultralytics/cfg/datasets/Argoverse.yaml,sha256=QGpdh3Hj5dFrvbsaE_8rAVj9BO4XpKTB7uhXaTTnE-o,3364
|
|
18
18
|
ultralytics/cfg/datasets/DOTAv1.5.yaml,sha256=KE7VC-ZMDSei1pLPm-pdk_ZAMRU_gLwGgtIQNbwp6dA,1212
|
|
@@ -133,11 +133,11 @@ ultralytics/data/scripts/get_coco.sh,sha256=UuJpJeo3qQpTHVINeOpmP0NYmg8PhEFE3A8J
|
|
|
133
133
|
ultralytics/data/scripts/get_coco128.sh,sha256=qmRQl_hOKrsdHrTrnyQuFIH01oDz3lfaz138OgGfLt8,650
|
|
134
134
|
ultralytics/data/scripts/get_imagenet.sh,sha256=hr42H16bM47iT27rgS7MpEo-GeOZAYUQXgr0B2cwn48,1705
|
|
135
135
|
ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
|
136
|
-
ultralytics/engine/exporter.py,sha256=
|
|
136
|
+
ultralytics/engine/exporter.py,sha256=n_DtRhD0jT9sTFb8oQ_TYdQYTQJbsQzwqdISwR-mQY4,73330
|
|
137
137
|
ultralytics/engine/model.py,sha256=euDHUy7J5vVBvS_d-KbGZd_0BP5bF6Y3cTQ7VXtwZ4k,53210
|
|
138
138
|
ultralytics/engine/predictor.py,sha256=tXrHSTHJ-rDQ3lrPW9P5_ei_ewTwbY2sji6MExybJ28,22838
|
|
139
139
|
ultralytics/engine/results.py,sha256=uvD7WqaePkuYbcf-iFqh3DIy5_ZSyHeDiKIzY5VjePM,68181
|
|
140
|
-
ultralytics/engine/trainer.py,sha256=
|
|
140
|
+
ultralytics/engine/trainer.py,sha256=lvYPaEkaGXuGnH8j19aMIB2BML3b0LhEqt-HyZ_I6nU,47219
|
|
141
141
|
ultralytics/engine/tuner.py,sha256=F4fyQaC5_GT74TULRO0VhzTv2S_a54cZDc3FjFoqaHE,21840
|
|
142
142
|
ultralytics/engine/validator.py,sha256=DiKsygbNJdRdwXoKoYOJA6bP_T7vMW3Syj_Qc_l7xTM,17761
|
|
143
143
|
ultralytics/hub/__init__.py,sha256=Z0K_E00jzQh90b18q3IDChwVmTvyIYp6C00sCV-n2F8,6709
|
|
@@ -208,9 +208,9 @@ ultralytics/models/yolo/pose/predict.py,sha256=6EW9palcAoWX-gu5ROQvO6AxBSm719934
|
|
|
208
208
|
ultralytics/models/yolo/pose/train.py,sha256=IlmsFlb0TsWZVy6PL3Trr_aXfwwGMBKAHyxnP7VPp_g,4747
|
|
209
209
|
ultralytics/models/yolo/pose/val.py,sha256=0luDccEPb_lUMjzaBb5VMsh9RdXVAbxb3Br57VKWNdc,12004
|
|
210
210
|
ultralytics/models/yolo/segment/__init__.py,sha256=3IThhZ1wlkY9FvmWm9cE-5-ZyE6F1FgzAtQ6jOOFzzw,275
|
|
211
|
-
ultralytics/models/yolo/segment/predict.py,sha256=
|
|
211
|
+
ultralytics/models/yolo/segment/predict.py,sha256=zLhmSTVEnaUumIX9SbjZH09kr2VrNdYWEss7FvseVuY,5428
|
|
212
212
|
ultralytics/models/yolo/segment/train.py,sha256=nS3qrT7Y3swCwjGZzeDQ2EunC9ilMsOiWs6LaTUCAE4,3021
|
|
213
|
-
ultralytics/models/yolo/segment/val.py,sha256=
|
|
213
|
+
ultralytics/models/yolo/segment/val.py,sha256=AvPS4rhV2PFpi0yixUfJhdczXctmZQSKgTjh7qVH0To,13204
|
|
214
214
|
ultralytics/models/yolo/world/__init__.py,sha256=nlh8I6t8hMGz_vZg8QSlsUW1R-2eKvn9CGUoPPQEGhA,131
|
|
215
215
|
ultralytics/models/yolo/world/train.py,sha256=80kswko6Zu7peXPBhXcfrTo5HO3Rg8C_cu4vPBQlk7M,7906
|
|
216
216
|
ultralytics/models/yolo/world/train_world.py,sha256=5Jj4gzEwDJtz37bEahL6Lf4xp-c1xiYjGKeg_w7Esns,8723
|
|
@@ -220,7 +220,7 @@ ultralytics/models/yolo/yoloe/train.py,sha256=99iSHQs--5VU_s82Q4w-fAJmyT5-y0TykT
|
|
|
220
220
|
ultralytics/models/yolo/yoloe/train_seg.py,sha256=rV2Jnbuh6vvBMaupaZK_aRXBMevO0XhN2VUR43ZwlIY,5285
|
|
221
221
|
ultralytics/models/yolo/yoloe/val.py,sha256=utUFWeFKRFWZrPr1y3A8ztbTwdoWMYqzlwBN7CQ0tCA,9418
|
|
222
222
|
ultralytics/nn/__init__.py,sha256=538LZPUKKvc3JCMgiQ4VLGqRN2ZAaVLFcQbeNNHFkEA,545
|
|
223
|
-
ultralytics/nn/autobackend.py,sha256=
|
|
223
|
+
ultralytics/nn/autobackend.py,sha256=MLS68iMNv6U0HyBK8nGjcyLOyImYIGEjP4398KqOkV0,45068
|
|
224
224
|
ultralytics/nn/tasks.py,sha256=PmlYScI7qTRCmYRR90Mw1QnqeRzvY0ojAMrgStBr11g,72010
|
|
225
225
|
ultralytics/nn/text_model.py,sha256=c--WzxjFEDb7p95u3YGcSsJLjj91zFNqXshij8Evrwg,15291
|
|
226
226
|
ultralytics/nn/modules/__init__.py,sha256=9KyQBxpomp5uJJ1PvMGuOFs2pR3NpqZcFHJlM6Q56c0,3322
|
|
@@ -265,7 +265,7 @@ ultralytics/trackers/utils/matching.py,sha256=x6uZOIx0O9oVmAcfY6tYMTJQE2cDTUlRR6
|
|
|
265
265
|
ultralytics/utils/__init__.py,sha256=XLEK_pvptzNWhJaO8x0MWghREIyEDei0LOGnUnmU1Kg,55145
|
|
266
266
|
ultralytics/utils/autobatch.py,sha256=jiE4m_--H9UkXFDm_FqzcZk_hSTCGpS72XdVEKgZwAo,5114
|
|
267
267
|
ultralytics/utils/autodevice.py,sha256=rXlPuo-iX-vZ4BabmMGEGh9Uxpau4R7Zlt1KCo9Xfyc,8892
|
|
268
|
-
ultralytics/utils/benchmarks.py,sha256=
|
|
268
|
+
ultralytics/utils/benchmarks.py,sha256=f4RykrjO1oEBxrTbH6qM_9vMxYKXO9F0ruFcM4xKF7A,32293
|
|
269
269
|
ultralytics/utils/checks.py,sha256=NWc0J-Nk4qHSVEXFDWfJkI7IjTNHFXajKjsSodDroBk,39411
|
|
270
270
|
ultralytics/utils/cpu.py,sha256=OksKOlX93AsbSsFuoYvLXRXgpkOibrZSwQyW6lipt4Q,3493
|
|
271
271
|
ultralytics/utils/dist.py,sha256=hOuY1-unhQAY-uWiZw3LWw36d1mqJuYK75NdlwB4oKE,4131
|
|
@@ -297,14 +297,14 @@ ultralytics/utils/callbacks/mlflow.py,sha256=wCXjQgdufp9LYujqMzLZOmIOur6kvrApHNe
|
|
|
297
297
|
ultralytics/utils/callbacks/neptune.py,sha256=_vt3cMwDHCR-LyT3KtRikGpj6AG11oQ-skUUUUdZ74o,4391
|
|
298
298
|
ultralytics/utils/callbacks/platform.py,sha256=Ufws7Kp_MHh3jrz-Sx5q1KKQ-l1hoDnLi1_thZJsHPQ,16091
|
|
299
299
|
ultralytics/utils/callbacks/raytune.py,sha256=Y0dFyNZVRuFovSh7nkgUIHTQL3xIXOACElgHuYbg_5I,1278
|
|
300
|
-
ultralytics/utils/callbacks/tensorboard.py,sha256=
|
|
300
|
+
ultralytics/utils/callbacks/tensorboard.py,sha256=K7b6KtC7rimfzqFu-NDZ_55Tbd7eC6TckqQdTNPuQ6U,5039
|
|
301
301
|
ultralytics/utils/callbacks/wb.py,sha256=ghmL3gigOa-z_F54-TzMraKw9MAaYX-Wk4H8dLoRvX8,7705
|
|
302
302
|
ultralytics/utils/export/__init__.py,sha256=Cfh-PwVfTF_lwPp-Ss4wiX4z8Sm1XRPklsqdFfmTZ30,333
|
|
303
303
|
ultralytics/utils/export/engine.py,sha256=QoXPqnmQn6W5TOUAygOtCG63R9ExDG4-Df6X6W-_Mzo,10470
|
|
304
|
-
ultralytics/utils/export/imx.py,sha256=
|
|
304
|
+
ultralytics/utils/export/imx.py,sha256=VnMDO7c8ezBs91UDoLg9rR0oY8Uc7FujKpbdGxrzV18,13744
|
|
305
305
|
ultralytics/utils/export/tensorflow.py,sha256=xHEcEM3_VeYctyqkJCpgkqcNie1M8xLqcFKr6uANEEQ,9951
|
|
306
|
-
dgenerate_ultralytics_headless-8.4.
|
|
307
|
-
dgenerate_ultralytics_headless-8.4.
|
|
308
|
-
dgenerate_ultralytics_headless-8.4.
|
|
309
|
-
dgenerate_ultralytics_headless-8.4.
|
|
310
|
-
dgenerate_ultralytics_headless-8.4.
|
|
306
|
+
dgenerate_ultralytics_headless-8.4.4.dist-info/METADATA,sha256=wK7cNiOfQHx28uF-HEPMHSoxLT0azRn5P4dNsYFWyq4,40118
|
|
307
|
+
dgenerate_ultralytics_headless-8.4.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
308
|
+
dgenerate_ultralytics_headless-8.4.4.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
|
309
|
+
dgenerate_ultralytics_headless-8.4.4.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
|
310
|
+
dgenerate_ultralytics_headless-8.4.4.dist-info/RECORD,,
|
ultralytics/__init__.py
CHANGED
ultralytics/cfg/__init__.py
CHANGED
|
@@ -412,7 +412,7 @@ def get_save_dir(args: SimpleNamespace, name: str | None = None) -> Path:
|
|
|
412
412
|
nested = args.project and len(Path(args.project).parts) > 1 # e.g. "user/project" or "org\repo"
|
|
413
413
|
project = runs / args.project if nested else args.project or runs
|
|
414
414
|
name = name or args.name or f"{args.mode}"
|
|
415
|
-
save_dir = increment_path(Path(project) / name, exist_ok=args.exist_ok if RANK in {-1, 0} else True
|
|
415
|
+
save_dir = increment_path(Path(project) / name, exist_ok=args.exist_ok if RANK in {-1, 0} else True)
|
|
416
416
|
|
|
417
417
|
return Path(save_dir).resolve() # resolve to display full path in console
|
|
418
418
|
|
ultralytics/engine/exporter.py
CHANGED
|
@@ -614,12 +614,11 @@ class Exporter:
|
|
|
614
614
|
f"work. Use export 'imgsz={max(self.imgsz)}' if val is required."
|
|
615
615
|
)
|
|
616
616
|
imgsz = self.imgsz[0] if square else str(self.imgsz)[1:-1].replace(" ", "")
|
|
617
|
-
predict_data = f"data={data}" if model.task == "segment" and pb else ""
|
|
618
617
|
q = "int8" if self.args.int8 else "half" if self.args.half else "" # quantization
|
|
619
618
|
LOGGER.info(
|
|
620
619
|
f"\nExport complete ({time.time() - t:.1f}s)"
|
|
621
620
|
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
|
|
622
|
-
f"\nPredict: yolo predict task={model.task} model={f} imgsz={imgsz} {q}
|
|
621
|
+
f"\nPredict: yolo predict task={model.task} model={f} imgsz={imgsz} {q}"
|
|
623
622
|
f"\nValidate: yolo val task={model.task} model={f} imgsz={imgsz} data={data} {q} {s}"
|
|
624
623
|
f"\nVisualize: https://netron.app"
|
|
625
624
|
)
|
ultralytics/engine/trainer.py
CHANGED
|
@@ -984,7 +984,7 @@ class BaseTrainer:
|
|
|
984
984
|
g[2] = {"params": g[2], **optim_args, "param_group": "bias"}
|
|
985
985
|
g[0] = {"params": g[0], **optim_args, "weight_decay": decay, "param_group": "weight"}
|
|
986
986
|
g[1] = {"params": g[1], **optim_args, "weight_decay": 0.0, "param_group": "bn"}
|
|
987
|
-
muon, sgd = (0.
|
|
987
|
+
muon, sgd = (0.1, 1.0) if iterations > 10000 else (0.5, 0.5) # scale factor for MuSGD
|
|
988
988
|
if use_muon:
|
|
989
989
|
g[3] = {"params": g[3], **optim_args, "weight_decay": decay, "use_muon": True, "param_group": "muon"}
|
|
990
990
|
import re
|
|
@@ -60,7 +60,7 @@ class SegmentationPredictor(DetectionPredictor):
|
|
|
60
60
|
>>> results = predictor.postprocess(preds, img, orig_img)
|
|
61
61
|
"""
|
|
62
62
|
# Extract protos - tuple if PyTorch model or array if exported
|
|
63
|
-
protos = preds[0][
|
|
63
|
+
protos = preds[0][1] if isinstance(preds[0], tuple) else preds[1]
|
|
64
64
|
return super().postprocess(preds[0], img, orig_imgs, protos=protos)
|
|
65
65
|
|
|
66
66
|
def construct_results(self, preds, img, orig_imgs, protos):
|
|
@@ -99,9 +99,7 @@ class SegmentationValidator(DetectionValidator):
|
|
|
99
99
|
Returns:
|
|
100
100
|
list[dict[str, torch.Tensor]]: Processed detection predictions with masks.
|
|
101
101
|
"""
|
|
102
|
-
proto = (
|
|
103
|
-
preds[0][-1] if isinstance(preds[0], tuple) else preds[-1]
|
|
104
|
-
) # second output is len 3 if pt, but only 1 if exported
|
|
102
|
+
proto = preds[0][1] if isinstance(preds[0], tuple) else preds[1]
|
|
105
103
|
preds = super().postprocess(preds[0])
|
|
106
104
|
imgsz = [4 * x for x in proto.shape[2:]] # get image size from proto
|
|
107
105
|
for i, pred in enumerate(preds):
|
ultralytics/nn/autobackend.py
CHANGED
|
@@ -887,7 +887,7 @@ class AutoBackend(nn.Module):
|
|
|
887
887
|
x[:, 6::3] *= h
|
|
888
888
|
y.append(x)
|
|
889
889
|
# TF segment fixes: export is reversed vs ONNX export and protos are transposed
|
|
890
|
-
if
|
|
890
|
+
if self.task == "segment": # segment with (det, proto) output order reversed
|
|
891
891
|
if len(y[1].shape) != 4:
|
|
892
892
|
y = list(reversed(y)) # should be y = (1, 116, 8400), (1, 160, 160, 32)
|
|
893
893
|
if y[1].shape[-1] == 6: # end-to-end model
|
ultralytics/utils/benchmarks.py
CHANGED
|
@@ -160,6 +160,8 @@ def benchmark(
|
|
|
160
160
|
assert cpu, "inference not supported on CPU"
|
|
161
161
|
if "cuda" in device.type:
|
|
162
162
|
assert gpu, "inference not supported on GPU"
|
|
163
|
+
if format == "ncnn":
|
|
164
|
+
assert not is_end2end, "End-to-end torch.topk operation is not supported for NCNN prediction yet"
|
|
163
165
|
|
|
164
166
|
# Export
|
|
165
167
|
if format == "-":
|
|
@@ -178,8 +180,6 @@ def benchmark(
|
|
|
178
180
|
assert model.task != "pose" or format != "executorch", "ExecuTorch Pose inference is not supported"
|
|
179
181
|
assert format not in {"edgetpu", "tfjs"}, "inference not supported"
|
|
180
182
|
assert format != "coreml" or platform.system() == "Darwin", "inference only supported on macOS>=10.13"
|
|
181
|
-
if format == "ncnn":
|
|
182
|
-
assert not is_end2end, "End-to-end torch.topk operation is not supported for NCNN prediction yet"
|
|
183
183
|
exported_model.predict(ASSETS / "bus.jpg", imgsz=imgsz, device=device, half=half, verbose=False)
|
|
184
184
|
|
|
185
185
|
# Validate
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
2
|
|
|
3
3
|
from ultralytics.utils import LOGGER, SETTINGS, TESTS_RUNNING, colorstr, torch_utils
|
|
4
|
+
from ultralytics.utils.torch_utils import smart_inference_mode
|
|
4
5
|
|
|
5
6
|
try:
|
|
6
7
|
assert not TESTS_RUNNING # do not log pytest
|
|
@@ -38,6 +39,7 @@ def _log_scalars(scalars: dict, step: int = 0) -> None:
|
|
|
38
39
|
WRITER.add_scalar(k, v, step)
|
|
39
40
|
|
|
40
41
|
|
|
42
|
+
@smart_inference_mode()
|
|
41
43
|
def _log_tensorboard_graph(trainer) -> None:
|
|
42
44
|
"""Log model graph to TensorBoard.
|
|
43
45
|
|
ultralytics/utils/export/imx.py
CHANGED
|
@@ -23,25 +23,37 @@ MCT_CONFIG = {
|
|
|
23
23
|
"detect": {
|
|
24
24
|
"layer_names": ["sub", "mul_2", "add_14", "cat_19"],
|
|
25
25
|
"weights_memory": 2585350.2439,
|
|
26
|
-
"n_layers": 238,
|
|
26
|
+
"n_layers": {238, 239},
|
|
27
27
|
},
|
|
28
28
|
"pose": {
|
|
29
29
|
"layer_names": ["sub", "mul_2", "add_14", "cat_21", "cat_22", "mul_4", "add_15"],
|
|
30
30
|
"weights_memory": 2437771.67,
|
|
31
|
-
"n_layers": 257,
|
|
31
|
+
"n_layers": {257, 258},
|
|
32
|
+
},
|
|
33
|
+
"classify": {"layer_names": [], "weights_memory": np.inf, "n_layers": {112}},
|
|
34
|
+
"segment": {
|
|
35
|
+
"layer_names": ["sub", "mul_2", "add_14", "cat_21"],
|
|
36
|
+
"weights_memory": 2466604.8,
|
|
37
|
+
"n_layers": {265, 266},
|
|
32
38
|
},
|
|
33
|
-
"classify": {"layer_names": [], "weights_memory": np.inf, "n_layers": 112},
|
|
34
|
-
"segment": {"layer_names": ["sub", "mul_2", "add_14", "cat_21"], "weights_memory": 2466604.8, "n_layers": 265},
|
|
35
39
|
},
|
|
36
40
|
"YOLOv8": {
|
|
37
|
-
"detect": {
|
|
41
|
+
"detect": {
|
|
42
|
+
"layer_names": ["sub", "mul", "add_6", "cat_15"],
|
|
43
|
+
"weights_memory": 2550540.8,
|
|
44
|
+
"n_layers": {168, 169},
|
|
45
|
+
},
|
|
38
46
|
"pose": {
|
|
39
47
|
"layer_names": ["add_7", "mul_2", "cat_17", "mul", "sub", "add_6", "cat_18"],
|
|
40
48
|
"weights_memory": 2482451.85,
|
|
41
|
-
"n_layers": 187,
|
|
49
|
+
"n_layers": {187, 188},
|
|
50
|
+
},
|
|
51
|
+
"classify": {"layer_names": [], "weights_memory": np.inf, "n_layers": {73}},
|
|
52
|
+
"segment": {
|
|
53
|
+
"layer_names": ["sub", "mul", "add_6", "cat_17"],
|
|
54
|
+
"weights_memory": 2580060.0,
|
|
55
|
+
"n_layers": {195, 196},
|
|
42
56
|
},
|
|
43
|
-
"classify": {"layer_names": [], "weights_memory": np.inf, "n_layers": 73},
|
|
44
|
-
"segment": {"layer_names": ["sub", "mul", "add_6", "cat_17"], "weights_memory": 2580060.0, "n_layers": 195},
|
|
45
57
|
},
|
|
46
58
|
}
|
|
47
59
|
|
|
@@ -251,7 +263,7 @@ def torch2imx(
|
|
|
251
263
|
mct_config = MCT_CONFIG["YOLO11" if "C2PSA" in model.__str__() else "YOLOv8"][model.task]
|
|
252
264
|
|
|
253
265
|
# Check if the model has the expected number of layers
|
|
254
|
-
if len(list(model.modules()))
|
|
266
|
+
if len(list(model.modules())) not in mct_config["n_layers"]:
|
|
255
267
|
raise ValueError("IMX export only supported for YOLOv8n and YOLO11n models.")
|
|
256
268
|
|
|
257
269
|
for layer_name in mct_config["layer_names"]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|