dgenerate-ultralytics-headless 8.3.189__py3-none-any.whl → 8.3.190__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {dgenerate_ultralytics_headless-8.3.189.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/METADATA +1 -1
  2. {dgenerate_ultralytics_headless-8.3.189.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/RECORD +33 -32
  3. ultralytics/__init__.py +1 -1
  4. ultralytics/data/utils.py +2 -2
  5. ultralytics/engine/exporter.py +5 -2
  6. ultralytics/engine/predictor.py +1 -1
  7. ultralytics/engine/results.py +5 -5
  8. ultralytics/engine/trainer.py +2 -0
  9. ultralytics/engine/validator.py +3 -1
  10. ultralytics/hub/__init__.py +6 -2
  11. ultralytics/hub/auth.py +2 -2
  12. ultralytics/hub/google/__init__.py +2 -2
  13. ultralytics/hub/session.py +3 -5
  14. ultralytics/hub/utils.py +5 -5
  15. ultralytics/models/yolo/detect/predict.py +2 -2
  16. ultralytics/models/yolo/detect/val.py +2 -2
  17. ultralytics/models/yolo/obb/val.py +2 -1
  18. ultralytics/nn/autobackend.py +28 -38
  19. ultralytics/nn/modules/__init__.py +3 -3
  20. ultralytics/nn/modules/head.py +5 -1
  21. ultralytics/utils/__init__.py +34 -12
  22. ultralytics/utils/callbacks/platform.py +2 -1
  23. ultralytics/utils/checks.py +3 -3
  24. ultralytics/utils/downloads.py +2 -2
  25. ultralytics/utils/logger.py +7 -6
  26. ultralytics/utils/nms.py +346 -0
  27. ultralytics/utils/ops.py +80 -249
  28. ultralytics/utils/tal.py +1 -1
  29. ultralytics/utils/tqdm.py +34 -23
  30. {dgenerate_ultralytics_headless-8.3.189.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/WHEEL +0 -0
  31. {dgenerate_ultralytics_headless-8.3.189.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/entry_points.txt +0 -0
  32. {dgenerate_ultralytics_headless-8.3.189.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/licenses/LICENSE +0 -0
  33. {dgenerate_ultralytics_headless-8.3.189.dist-info → dgenerate_ultralytics_headless-8.3.190.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.189
3
+ Version: 8.3.190
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>
@@ -1,4 +1,4 @@
1
- dgenerate_ultralytics_headless-8.3.189.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
1
+ dgenerate_ultralytics_headless-8.3.190.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
2
2
  tests/__init__.py,sha256=b4KP5_q-2IO8Br8YHOSLYnn7IwZS81l_vfEF2YPa2lM,894
3
3
  tests/conftest.py,sha256=LXtQJcFNWPGuzauTGkiXgsvVC3llJKfg22WcmhRzuQc,2593
4
4
  tests/test_cli.py,sha256=EMf5gTAopOnIz8VvzaM-Qb044o7D0flnUHYQ-2ffOM4,5670
@@ -8,7 +8,7 @@ tests/test_exports.py,sha256=CY-4xVZlVM16vdyIC0mSR3Ix59aiZm1qjFGIhSNmB20,11007
8
8
  tests/test_integrations.py,sha256=kl_AKmE_Qs1GB0_91iVwbzNxofm_hFTt0zzU6JF-pg4,6323
9
9
  tests/test_python.py,sha256=ENUbLIobqCZAxEy9W7gvhmkmW5OJ2oG-3gI8QLiJjzs,28020
10
10
  tests/test_solutions.py,sha256=tuf6n_fsI8KvSdJrnc-cqP2qYdiYqCWuVrx0z9dOz3Q,13213
11
- ultralytics/__init__.py,sha256=do7OwLDZuVDuQVLM4bkHUsrGS_kMw-_Eoq4GGUl3zHI,730
11
+ ultralytics/__init__.py,sha256=1w9etrjNxSxfLxZJ2IRdczDcnGKeIh1YRZaAOxFuCb0,730
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
@@ -115,24 +115,24 @@ ultralytics/data/dataset.py,sha256=0GyB6PPsUXMxpf88RyvhGcsREDCenS7Xvc8CrMWivco,3
115
115
  ultralytics/data/loaders.py,sha256=u9sExTGPy1iiqVd_p29zVoEkQ3C36g2rE0FEbYPET0A,31767
116
116
  ultralytics/data/split.py,sha256=F6O73bAbESj70FQZzqkydXQeXgPXGHGiC06b5MkLHjQ,5109
117
117
  ultralytics/data/split_dota.py,sha256=rr-lLpTUVaFZMggV_fUYZdFVIJk_zbbSOpgB_Qp50_M,12893
118
- ultralytics/data/utils.py,sha256=Zt01BBVwpdHBLwkJC_qTUpaokhF_74hmBYQC3d9Ic8w,36675
118
+ ultralytics/data/utils.py,sha256=BM1kvsrySqkxauXFqj9pXZsmzdAgLlH_dk528po4d4M,36689
119
119
  ultralytics/data/scripts/download_weights.sh,sha256=0y8XtZxOru7dVThXDFUXLHBuICgOIqZNUwpyL4Rh6lg,595
120
120
  ultralytics/data/scripts/get_coco.sh,sha256=UuJpJeo3qQpTHVINeOpmP0NYmg8PhEFE3A8J3jKrnPw,1768
121
121
  ultralytics/data/scripts/get_coco128.sh,sha256=qmRQl_hOKrsdHrTrnyQuFIH01oDz3lfaz138OgGfLt8,650
122
122
  ultralytics/data/scripts/get_imagenet.sh,sha256=hr42H16bM47iT27rgS7MpEo-GeOZAYUQXgr0B2cwn48,1705
123
123
  ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
124
- ultralytics/engine/exporter.py,sha256=qHGD5wFmka_o8BNZTiPH8Qfp7-_y7Cz-OREOsfw9vmM,75261
124
+ ultralytics/engine/exporter.py,sha256=HmZ2M9XqT9HfJfJxTS3XschAIUH9YXERrM69AIhpRA8,75393
125
125
  ultralytics/engine/model.py,sha256=877u2n0ISz2COOYtEMUqQe0E-HHB4Atb2DuH1XCE98k,53530
126
- ultralytics/engine/predictor.py,sha256=iXnUB-tvBHtVpKbB-5EKs1wSREBIerdUxWx39MaFYuk,22485
127
- ultralytics/engine/results.py,sha256=6xagidv6FDJlstAX6tHob_mgfNs3459JVWeyOZgNpko,71686
128
- ultralytics/engine/trainer.py,sha256=_chaZeS_kkoljG3LWUStksKrDwNpfq5LzANgM3CgjRg,40257
126
+ ultralytics/engine/predictor.py,sha256=PyPYnqqvr67enkUNQ_6P_9AbyTePyg392Dre36tznIU,22483
127
+ ultralytics/engine/results.py,sha256=3CXgsrlXMxzAMkHJ9nnn_wJPy5bIR48_CjwXoUVIrRg,71730
128
+ ultralytics/engine/trainer.py,sha256=6cgSmgEqR8rUy2Y4QQK6jxlLzzeLKG2XuC8ChMB23XU,40325
129
129
  ultralytics/engine/tuner.py,sha256=sfQ8_yzgLNcGlKyz9b2vAzyggGZXiQzdZ5tKstyqjHM,12825
130
- ultralytics/engine/validator.py,sha256=g0StH6WOn95zBN-hULDAR5Uug1pU2YkaeNH3zzq3SVg,16573
131
- ultralytics/hub/__init__.py,sha256=ulPtceI3hqud03mvqoXccBaa1e4nveYwC9cddyuBUlo,6599
132
- ultralytics/hub/auth.py,sha256=5uMPzZt8aO-YsnEWADzc1qBUt9c30RTIfrGo5SWTrv4,6271
133
- ultralytics/hub/session.py,sha256=UeUSRbdclSBPJQfpSNGeY13gb1O2Bhzh0Aj7cXum6P4,18518
134
- ultralytics/hub/utils.py,sha256=5-y3WBT5U_L0ZscTJrUWvGB02QYwVAF82OiFqvvd0sE,10262
135
- ultralytics/hub/google/__init__.py,sha256=ZJnS6s6wVl792p9h5aUmm9K2Di1DrHmTk1aEUJdTXhs,8443
130
+ ultralytics/engine/validator.py,sha256=8ky0lcMCYDY7RGYRUowDAKxEMfsPBLpT7LlgfHA-IsY,16681
131
+ ultralytics/hub/__init__.py,sha256=RmrZw24uyFF109SLVba1s-ItjllfzRKlCgQ_U0RVRUo,6720
132
+ ultralytics/hub/auth.py,sha256=RIwZDWfW6vS2yGpZKR0xVl0-38itJYEFtmqY_M70bl8,6304
133
+ ultralytics/hub/session.py,sha256=yXr0lGnRANAs2o0qCjy7vRIMjof5H51q8jbZ6RV6FiU,18444
134
+ ultralytics/hub/utils.py,sha256=K4-FE1mbj4meNzRVcK32fqTX0PZvzY-iYc6BoIRXiig,10229
135
+ ultralytics/hub/google/__init__.py,sha256=6jaSS3DB8Ooa8yBSbbd2Ldh-iYsi591y0QfqgyuQl0s,8476
136
136
  ultralytics/models/__init__.py,sha256=DqQFFYJ4IQlqIDb61H1HzcnZU7SuHN-43bw94-l-YAQ,309
137
137
  ultralytics/models/fastsam/__init__.py,sha256=HGJ8EKlBAsdF-e2aIwQLjSDAFI_r0yHR0A1gzrp4vqE,231
138
138
  ultralytics/models/fastsam/model.py,sha256=IW0QCgQgGNWjVToEInZ8jVwemfc3XnPA78A_zROw3xk,3436
@@ -172,13 +172,13 @@ ultralytics/models/yolo/classify/predict.py,sha256=FqAC2YXe25bRwedMZhF3Lw0waoY-a
172
172
  ultralytics/models/yolo/classify/train.py,sha256=V-hevc6X7xemnpyru84OfTRA77eNnkVSMEz16_OUvo4,10244
173
173
  ultralytics/models/yolo/classify/val.py,sha256=iQZRS6D3-YQjygBhFpC8VCJMI05L3uUPe4ukwbVtSdI,10021
174
174
  ultralytics/models/yolo/detect/__init__.py,sha256=GIRsLYR-kT4JJx7lh4ZZAFGBZj0aebokuU0A7JbjDVA,257
175
- ultralytics/models/yolo/detect/predict.py,sha256=ySUsdIf8dw00bzWhcxN1jZwLWKPRT2M7-N7TNL3o4zo,5387
175
+ ultralytics/models/yolo/detect/predict.py,sha256=ZDsH9ILnlSmMw1nbmfDjwIv0X_FHfIDKpXkqRg5Ofoo,5392
176
176
  ultralytics/models/yolo/detect/train.py,sha256=HlaCoHJ6Y2TpCXXWabMRZApAYqBvjuM_YQJUV5JYCvw,9907
177
- ultralytics/models/yolo/detect/val.py,sha256=rHg0lPC0ccGbVF6113-18grCViVgGdXkg-aT-0sWT4U,21318
177
+ ultralytics/models/yolo/detect/val.py,sha256=pxN6ytieiZoBh2TKUhKxpYxcXMQImhxa1zT87WdvdyI,21323
178
178
  ultralytics/models/yolo/obb/__init__.py,sha256=tQmpG8wVHsajWkZdmD6cjGohJ4ki64iSXQT8JY_dydo,221
179
179
  ultralytics/models/yolo/obb/predict.py,sha256=4r1eSld6TNJlk9JG56e-DX6oPL8uBBqiuztyBpxWlHE,2888
180
180
  ultralytics/models/yolo/obb/train.py,sha256=bnYFAMur7Uvbw5Dc09-S2ge7B05iGX-t37Ksgc0ef6g,3921
181
- ultralytics/models/yolo/obb/val.py,sha256=I05mwGK620JFBz9yuGPlV9NN1fsWZE0lDqMxL5iG9YA,14085
181
+ ultralytics/models/yolo/obb/val.py,sha256=gZeNGhPZgpsugAaNfaYTuLJiqmGeWtnqdEzXGpNpjoU,14154
182
182
  ultralytics/models/yolo/pose/__init__.py,sha256=63xmuHZLNzV8I76HhVXAq4f2W0KTk8Oi9eL-Y204LyQ,227
183
183
  ultralytics/models/yolo/pose/predict.py,sha256=M0C7ZfVXx4QXgv-szjnaXYEPas76ZLGAgDNNh1GG0vI,3743
184
184
  ultralytics/models/yolo/pose/train.py,sha256=GyvNnDPJ3UFq_90HN8_FJ0dbwRkw3JJTVpkMFH0vC0o,5457
@@ -196,14 +196,14 @@ ultralytics/models/yolo/yoloe/train.py,sha256=XYpQYSnSD8vi_9VSj_S5oIsNUEqm3e66vP
196
196
  ultralytics/models/yolo/yoloe/train_seg.py,sha256=aCV7M8oQOvODFnU4piZdJh3tIrBJYAzZfRVRx1vRgxo,4956
197
197
  ultralytics/models/yolo/yoloe/val.py,sha256=2NuERI3B3WeED658Cat1xL2SVpORUHlCHCWI3L8pJJc,9784
198
198
  ultralytics/nn/__init__.py,sha256=rjociYD9lo_K-d-1s6TbdWklPLjTcEHk7OIlRDJstIE,615
199
- ultralytics/nn/autobackend.py,sha256=K98yjm1jF6aVFwfyPkS9pG1AWPFuYdQzCD4PNi6MzMY,42029
199
+ ultralytics/nn/autobackend.py,sha256=Lm14ORPwTTpdsNKECfnp9amjtI4LxE5neelGsiB3f0M,41540
200
200
  ultralytics/nn/tasks.py,sha256=wI15MlEX5FOgAIM1O2ygMxeljthvaUinYcz_jy7CJh0,72485
201
201
  ultralytics/nn/text_model.py,sha256=cYwD-0el4VeToDBP4iPFOQGqyEQatJOBHrVyONL3K_s,15282
202
- ultralytics/nn/modules/__init__.py,sha256=2nY0X69Z5DD5SWt6v3CUTZa5gXSzC9TQr3VTVqhyGho,3158
202
+ ultralytics/nn/modules/__init__.py,sha256=BPMbEm1daI7Tuds3zph2_afAX7Gq1uAqK8BfiCfKTZs,3198
203
203
  ultralytics/nn/modules/activation.py,sha256=75JcIMH2Cu9GTC2Uf55r_5YLpxcrXQDaVoeGQ0hlUAU,2233
204
204
  ultralytics/nn/modules/block.py,sha256=lxaEaQ3E-ZuqjXYNC9scUjrZCIF9fDXIALn4F5GKX7Q,70627
205
205
  ultralytics/nn/modules/conv.py,sha256=eM_t0hQwvEH4rllJucqRMNq7IoipEjbTa_ELROu4ubs,21445
206
- ultralytics/nn/modules/head.py,sha256=WiYJ-odEWisWZKKbOuvj1dJkUky2Z6D3yCTFqiRO-B0,53450
206
+ ultralytics/nn/modules/head.py,sha256=PupNNDhN-kALpq12OP2A0kNIJh9OPN7uARTpWEbE40k,53618
207
207
  ultralytics/nn/modules/transformer.py,sha256=PW5-6gzOP3_rZ_uAkmxvI42nU5bkrgbgLKCy5PC5px4,31415
208
208
  ultralytics/nn/modules/utils.py,sha256=rn8yTObZGkQoqVzjbZWLaHiytppG4ffjMME4Lw60glM,6092
209
209
  ultralytics/solutions/__init__.py,sha256=ZoeAQavTLp8aClnhZ9tbl6lxy86GxofyGvZWTx2aWkI,1209
@@ -236,26 +236,27 @@ ultralytics/trackers/utils/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6D
236
236
  ultralytics/trackers/utils/gmc.py,sha256=9IvCf5MhBYY9ppVHykN02_oBWHmE98R8EaYFKaykdV0,14032
237
237
  ultralytics/trackers/utils/kalman_filter.py,sha256=PPmM0lwBMdT_hGojvfLoUsBUFMBBMNRAxKbMcQa3wJ0,21619
238
238
  ultralytics/trackers/utils/matching.py,sha256=uSYtywqi1lE_uNN1FwuBFPyISfDQXHMu8K5KH69nrRI,7160
239
- ultralytics/utils/__init__.py,sha256=J4i95DBEP2t6HeNLRqCjbNqz9SwxbOBIk6IFgj11UpI,54472
239
+ ultralytics/utils/__init__.py,sha256=eHqtDhZevIg9Xs2f10JYn2VQcjDUNY1qB8qhFn-xYt4,55064
240
240
  ultralytics/utils/autobatch.py,sha256=33m8YgggLIhltDqMXZ5OE-FGs2QiHrl2-LfgY1mI4cw,5119
241
241
  ultralytics/utils/autodevice.py,sha256=1wwjkO2tmyR5IAYa6t8G9QJgGrm00niPY4bTbTRH0Uk,8861
242
242
  ultralytics/utils/benchmarks.py,sha256=wqIdUpYLp3Ac-oWX9bgngqOvmGyUiKuI61KBOcCqR6A,31479
243
- ultralytics/utils/checks.py,sha256=q64U5wKyejD-2W2fCPqJ0Oiaa4_4vq2pVxV9wp6lMz4,34707
243
+ ultralytics/utils/checks.py,sha256=hYzs2bK9GC10UMczpiG2YKw2cc3ajH5Y_nOQJVjQVow,34767
244
244
  ultralytics/utils/dist.py,sha256=A9lDGtGefTjSVvVS38w86GOdbtLzNBDZuDGK0MT4PRI,4170
245
- ultralytics/utils/downloads.py,sha256=jtaStUmZiWhJ9-ovubsSJHqnWS891qIZggQHGUC0fJo,23009
245
+ ultralytics/utils/downloads.py,sha256=mLOLonKQsePC15sLVZJzGyLmD_TZPkL1T_qd0gUb4lA,23029
246
246
  ultralytics/utils/errors.py,sha256=XT9Ru7ivoBgofK6PlnyigGoa7Fmf5nEhyHtnD-8TRXI,1584
247
247
  ultralytics/utils/export.py,sha256=LK-wlTlyb_zIKtSvOmfmvR70RcUU9Ct9UBDt5wn9_rY,9880
248
248
  ultralytics/utils/files.py,sha256=ZCbLGleiF0f-PqYfaxMFAWop88w7U1hpreHXl8b2ko0,8238
249
249
  ultralytics/utils/instance.py,sha256=dC83rHvQXciAED3rOiScFs3BOX9OI06Ey1mj9sjUKvs,19070
250
- ultralytics/utils/logger.py,sha256=KDHLdpBe3su3OkMpLSUgDk3-cXMkRgH3oK0hhxsxxvM,15137
250
+ ultralytics/utils/logger.py,sha256=o_vH4CCgQat6_Sbmwm1sUAJ4muAgVcsUed-WqpGNQZw,15129
251
251
  ultralytics/utils/loss.py,sha256=fbOWc3Iu0QOJiWbi-mXWA9-1otTYlehtmUsI7os7ydM,39799
252
252
  ultralytics/utils/metrics.py,sha256=Q0cD4J1_7WRElv_En6YUM94l4SjE7XTF9LdZUMvrGys,68853
253
- ultralytics/utils/ops.py,sha256=8d60fbpntrexK3gPoLUS6mWAYGrtrQaQCOYyRJsCjuI,34521
253
+ ultralytics/utils/nms.py,sha256=wCRQ7O7shv5ccEWHgtF9Ky_vUeyumxFLWBFEj1h0U54,14199
254
+ ultralytics/utils/ops.py,sha256=N3jA7HoN-lYLi0JxDDbyZ5WrYqHp_R4EX5H12vxGeE4,26625
254
255
  ultralytics/utils/patches.py,sha256=PPWiKzwGbCvuawLzDKVR8tWOQAlZbJBi8g_-A6eTCYA,6536
255
256
  ultralytics/utils/plotting.py,sha256=npFWWIGEdQM3IsSSqoZ29kAFyCN3myeZOFj-gALFT6M,47465
256
- ultralytics/utils/tal.py,sha256=aXawOnhn8ni65tJWIW-PYqWr_TRvltbHBjrTo7o6lDQ,20924
257
+ ultralytics/utils/tal.py,sha256=K3lPxC3bbduP8ho-toJ9VHnklo5IaGkqogEaQorbrvs,20924
257
258
  ultralytics/utils/torch_utils.py,sha256=PoqnrVRRgnNw2aTxcSrjZ1PvzEg2iR8XKZYIOKVqy0o,39476
258
- ultralytics/utils/tqdm.py,sha256=G7V-0Ku_XEKKjA8D2duWD9OToekX2LGLbbOTzd1UrWo,16414
259
+ ultralytics/utils/tqdm.py,sha256=erIhzLw3r8QovEAeZZkf5I1bN4MPn7zoMXvAp2qPGUI,16754
259
260
  ultralytics/utils/triton.py,sha256=M7qe4RztiADBJQEWQKaIQsp94ERFJ_8_DUHDR6TXEOM,5410
260
261
  ultralytics/utils/tuner.py,sha256=bHr09Fz-0-t0ei55gX5wJh-obyiAQoicP7HUVM2I8qA,6826
261
262
  ultralytics/utils/callbacks/__init__.py,sha256=hzL63Rce6VkZhP4Lcim9LKjadixaQG86nKqPhk7IkS0,242
@@ -266,12 +267,12 @@ ultralytics/utils/callbacks/dvc.py,sha256=NV0DXMQ1B5Sk5fmh60QFUGkifrAz-vwit5qhdf
266
267
  ultralytics/utils/callbacks/hub.py,sha256=IZ8lldLfxI0SvMnG9aWGWj59JFSks_x11L2is26ajd0,4123
267
268
  ultralytics/utils/callbacks/mlflow.py,sha256=6K8I5zij1yq3TUW9c5BBQNqdzz3IXugQjwKoBOvV6ag,5344
268
269
  ultralytics/utils/callbacks/neptune.py,sha256=j8pecmlcsM8FGzLKWoBw5xUsi5t8E5HuxY7TR5Um_O8,4612
269
- ultralytics/utils/callbacks/platform.py,sha256=gdbEuedXEs1VjdU0IiedjPFwttZJUiI0dJoImU3G_Gc,1999
270
+ ultralytics/utils/callbacks/platform.py,sha256=a7T_8htoBB0uX1WIc392UJnhDjxkRyQMvhPYKR6wUTU,2008
270
271
  ultralytics/utils/callbacks/raytune.py,sha256=S6Bq16oQDQ8BQgnZzA0zJHGN_BBr8iAM_WtGoLiEcwg,1283
271
272
  ultralytics/utils/callbacks/tensorboard.py,sha256=MDPBW7aDes-66OE6YqKXXvqA_EocjzEMHWGM-8z9vUQ,5281
272
273
  ultralytics/utils/callbacks/wb.py,sha256=ngQO8EJ1kxJDF1YajScVtzBbm26jGuejA0uWeOyvf5A,7685
273
- dgenerate_ultralytics_headless-8.3.189.dist-info/METADATA,sha256=WtEdG5rsQrWBMYF3Hi2ha6V9RAeNCIkumcmrba3a5xw,38789
274
- dgenerate_ultralytics_headless-8.3.189.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
275
- dgenerate_ultralytics_headless-8.3.189.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
276
- dgenerate_ultralytics_headless-8.3.189.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
277
- dgenerate_ultralytics_headless-8.3.189.dist-info/RECORD,,
274
+ dgenerate_ultralytics_headless-8.3.190.dist-info/METADATA,sha256=AbMIrPP8KD2qsqIiq8AYRZvfrx3EVdEtRRGXDqGayc0,38789
275
+ dgenerate_ultralytics_headless-8.3.190.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
276
+ dgenerate_ultralytics_headless-8.3.190.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
277
+ dgenerate_ultralytics_headless-8.3.190.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
278
+ dgenerate_ultralytics_headless-8.3.190.dist-info/RECORD,,
ultralytics/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
- __version__ = "8.3.189"
3
+ __version__ = "8.3.190"
4
4
 
5
5
  import os
6
6
 
ultralytics/data/utils.py CHANGED
@@ -464,7 +464,7 @@ def check_det_dataset(dataset: str, autodownload: bool = True) -> Dict[str, Any]
464
464
  safe_download(url=s, dir=DATASETS_DIR, delete=True)
465
465
  elif s.startswith("bash "): # bash script
466
466
  LOGGER.info(f"Running {s} ...")
467
- r = os.system(s)
467
+ subprocess.run(s.split(), check=True)
468
468
  else: # python script
469
469
  exec(s, {"yaml": data})
470
470
  dt = f"({round(time.time() - t, 1)}s)"
@@ -509,7 +509,7 @@ def check_cls_dataset(dataset: Union[str, Path], split: str = "") -> Dict[str, A
509
509
  LOGGER.warning(f"Dataset not found, missing path {data_dir}, attempting download...")
510
510
  t = time.time()
511
511
  if str(dataset) == "imagenet":
512
- subprocess.run(f"bash {ROOT / 'data/scripts/get_imagenet.sh'}", shell=True, check=True)
512
+ subprocess.run(["bash", str(ROOT / "data/scripts/get_imagenet.sh")], check=True)
513
513
  else:
514
514
  url = f"https://github.com/ultralytics/assets/releases/download/v0.0.0/{dataset}.zip"
515
515
  download(url, dir=data_dir.parent)
@@ -107,7 +107,9 @@ from ultralytics.utils.checks import (
107
107
  from ultralytics.utils.downloads import attempt_download_asset, get_github_assets, safe_download
108
108
  from ultralytics.utils.export import export_engine, export_onnx
109
109
  from ultralytics.utils.files import file_size, spaces_in_path
110
- from ultralytics.utils.ops import Profile, nms_rotated
110
+ from ultralytics.utils.metrics import batch_probiou
111
+ from ultralytics.utils.nms import TorchNMS
112
+ from ultralytics.utils.ops import Profile
111
113
  from ultralytics.utils.patches import arange_patch
112
114
  from ultralytics.utils.torch_utils import TORCH_1_13, get_latest_opset, select_device
113
115
 
@@ -1562,12 +1564,13 @@ class NMSModel(torch.nn.Module):
1562
1564
  nmsbox = torch.cat((offbox, nmsbox[:, end:]), dim=-1)
1563
1565
  nms_fn = (
1564
1566
  partial(
1565
- nms_rotated,
1567
+ TorchNMS.fast_nms,
1566
1568
  use_triu=not (
1567
1569
  self.is_tf
1568
1570
  or (self.args.opset or 14) < 14
1569
1571
  or (self.args.format == "openvino" and self.args.int8) # OpenVINO int8 error with triu
1570
1572
  ),
1573
+ iou_func=batch_probiou,
1571
1574
  )
1572
1575
  if self.obb
1573
1576
  else nms
@@ -389,7 +389,7 @@ class BasePredictor:
389
389
  verbose (bool): Whether to print verbose output.
390
390
  """
391
391
  self.model = AutoBackend(
392
- weights=model or self.args.model,
392
+ model=model or self.args.model,
393
393
  device=select_device(self.args.device, verbose=verbose),
394
394
  dnn=self.args.dnn,
395
395
  data=self.args.data,
@@ -681,12 +681,12 @@ class Results(SimpleClass, DataExportMixin):
681
681
  - For classification tasks, it returns the top 5 class probabilities and their corresponding class names.
682
682
  - The returned string is comma-separated and ends with a comma and a space.
683
683
  """
684
- probs = self.probs
684
+ boxes = self.obb if self.obb is not None else self.boxes
685
685
  if len(self) == 0:
686
- return "" if probs is not None else "(no detections), "
687
- if probs is not None:
688
- return f"{', '.join(f'{self.names[j]} {probs.data[j]:.2f}' for j in probs.top5)}, "
689
- if boxes := self.boxes:
686
+ return "" if self.probs is not None else "(no detections), "
687
+ if self.probs is not None:
688
+ return f"{', '.join(f'{self.names[j]} {self.probs.data[j]:.2f}' for j in self.probs.top5)}, "
689
+ if boxes:
690
690
  counts = boxes.cls.int().bincount()
691
691
  return "".join(f"{n} {self.names[i]}{'s' * (n > 1)}, " for i, n in enumerate(counts) if n > 0)
692
692
 
@@ -36,6 +36,7 @@ from ultralytics.utils import (
36
36
  clean_url,
37
37
  colorstr,
38
38
  emojis,
39
+ get_git_commit,
39
40
  )
40
41
  from ultralytics.utils.autobatch import check_train_batch_size
41
42
  from ultralytics.utils.checks import check_amp, check_file, check_imgsz, check_model_file_from_stem, print_args
@@ -572,6 +573,7 @@ class BaseTrainer:
572
573
  "train_results": self.read_results_csv(),
573
574
  "date": datetime.now().isoformat(),
574
575
  "version": __version__,
576
+ "git_commit": get_git_commit(),
575
577
  "license": "AGPL-3.0 (https://ultralytics.com/license)",
576
578
  "docs": "https://docs.ultralytics.com",
577
579
  },
@@ -101,6 +101,8 @@ class BaseValidator:
101
101
  args (SimpleNamespace, optional): Configuration for the validator.
102
102
  _callbacks (dict, optional): Dictionary to store various callback functions.
103
103
  """
104
+ import torchvision # noqa (import here so torchvision import time not recorded in postprocess time)
105
+
104
106
  self.args = get_cfg(overrides=args)
105
107
  self.dataloader = dataloader
106
108
  self.stride = None
@@ -155,7 +157,7 @@ class BaseValidator:
155
157
  LOGGER.warning("validating an untrained model YAML will result in 0 mAP.")
156
158
  callbacks.add_integration_callbacks(self)
157
159
  model = AutoBackend(
158
- weights=model or self.args.model,
160
+ model=model or self.args.model,
159
161
  device=select_device(self.args.device, self.args.batch),
160
162
  dnn=self.args.dnn,
161
163
  data=self.args.data,
@@ -1,7 +1,5 @@
1
1
  # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
- import requests
4
-
5
3
  from ultralytics.data.utils import HUBDatasetStats
6
4
  from ultralytics.hub.auth import Auth
7
5
  from ultralytics.hub.session import HUBTrainingSession
@@ -75,6 +73,8 @@ def logout():
75
73
 
76
74
  def reset_model(model_id: str = ""):
77
75
  """Reset a trained model to an untrained state."""
76
+ import requests # scoped as slow import
77
+
78
78
  r = requests.post(f"{HUB_API_ROOT}/model-reset", json={"modelId": model_id}, headers={"x-api-key": Auth().api_key})
79
79
  if r.status_code == 200:
80
80
  LOGGER.info(f"{PREFIX}Model reset successfully")
@@ -105,6 +105,8 @@ def export_model(model_id: str = "", format: str = "torchscript"):
105
105
  >>> from ultralytics import hub
106
106
  >>> hub.export_model(model_id="your_model_id", format="torchscript")
107
107
  """
108
+ import requests # scoped as slow import
109
+
108
110
  assert format in export_fmts_hub(), f"Unsupported export format '{format}', valid formats are {export_fmts_hub()}"
109
111
  r = requests.post(
110
112
  f"{HUB_API_ROOT}/v1/models/{model_id}/export", json={"format": format}, headers={"x-api-key": Auth().api_key}
@@ -132,6 +134,8 @@ def get_export(model_id: str = "", format: str = "torchscript"):
132
134
  >>> from ultralytics import hub
133
135
  >>> result = hub.get_export(model_id="your_model_id", format="torchscript")
134
136
  """
137
+ import requests # scoped as slow import
138
+
135
139
  assert format in export_fmts_hub(), f"Unsupported export format '{format}', valid formats are {export_fmts_hub()}"
136
140
  r = requests.post(
137
141
  f"{HUB_API_ROOT}/get-export",
ultralytics/hub/auth.py CHANGED
@@ -1,7 +1,5 @@
1
1
  # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
- import requests
4
-
5
3
  from ultralytics.hub.utils import HUB_API_ROOT, HUB_WEB_ROOT, PREFIX, request_with_credentials
6
4
  from ultralytics.utils import IS_COLAB, LOGGER, SETTINGS, emojis
7
5
 
@@ -110,6 +108,8 @@ class Auth:
110
108
  Returns:
111
109
  (bool): True if authentication is successful, False otherwise.
112
110
  """
111
+ import requests # scoped as slow import
112
+
113
113
  try:
114
114
  if header := self.get_auth_header():
115
115
  r = requests.post(f"{HUB_API_ROOT}/v1/auth", headers=header)
@@ -5,8 +5,6 @@ import statistics
5
5
  import time
6
6
  from typing import List, Optional, Tuple
7
7
 
8
- import requests
9
-
10
8
 
11
9
  class GCPRegions:
12
10
  """
@@ -101,6 +99,8 @@ class GCPRegions:
101
99
  >>> region, mean, std, min_lat, max_lat = GCPRegions._ping_region("us-central1", attempts=3)
102
100
  >>> print(f"Region {region} has mean latency: {mean:.2f}ms")
103
101
  """
102
+ import requests # scoped as slow import
103
+
104
104
  url = f"https://{region}-docker.pkg.dev"
105
105
  latencies = []
106
106
  for _ in range(attempts):
@@ -8,8 +8,6 @@ from pathlib import Path
8
8
  from typing import Any, Dict, Optional
9
9
  from urllib.parse import parse_qs, urlparse
10
10
 
11
- import requests
12
-
13
11
  from ultralytics import __version__
14
12
  from ultralytics.hub.utils import HELP_MSG, HUB_WEB_ROOT, PREFIX
15
13
  from ultralytics.utils import IS_COLAB, LOGGER, SETTINGS, TQDM, checks, emojis
@@ -341,7 +339,7 @@ class HUBTrainingSession:
341
339
  }
342
340
  return status_code in retry_codes
343
341
 
344
- def _get_failure_message(self, response: requests.Response, retry: int, timeout: int) -> str:
342
+ def _get_failure_message(self, response, retry: int, timeout: int) -> str:
345
343
  """
346
344
  Generate a retry message based on the response status code.
347
345
 
@@ -419,14 +417,14 @@ class HUBTrainingSession:
419
417
  )
420
418
 
421
419
  @staticmethod
422
- def _show_upload_progress(content_length: int, response: requests.Response) -> None:
420
+ def _show_upload_progress(content_length: int, response) -> None:
423
421
  """Display a progress bar to track the upload progress of a file download."""
424
422
  with TQDM(total=content_length, unit="B", unit_scale=True, unit_divisor=1024) as pbar:
425
423
  for data in response.iter_content(chunk_size=1024):
426
424
  pbar.update(len(data))
427
425
 
428
426
  @staticmethod
429
- def _iterate_content(response: requests.Response) -> None:
427
+ def _iterate_content(response) -> None:
430
428
  """Process the streamed HTTP response data."""
431
429
  for _ in response.iter_content(chunk_size=1024):
432
430
  pass # Do nothing with data chunks
ultralytics/hub/utils.py CHANGED
@@ -5,9 +5,7 @@ import random
5
5
  import threading
6
6
  import time
7
7
  from pathlib import Path
8
- from typing import Any, Optional
9
-
10
- import requests
8
+ from typing import Any
11
9
 
12
10
  from ultralytics import __version__
13
11
  from ultralytics.utils import (
@@ -78,7 +76,7 @@ def request_with_credentials(url: str) -> Any:
78
76
  return output.eval_js("_hub_tmp")
79
77
 
80
78
 
81
- def requests_with_progress(method: str, url: str, **kwargs) -> requests.Response:
79
+ def requests_with_progress(method: str, url: str, **kwargs):
82
80
  """
83
81
  Make an HTTP request using the specified method and URL, with an optional progress bar.
84
82
 
@@ -95,6 +93,8 @@ def requests_with_progress(method: str, url: str, **kwargs) -> requests.Response
95
93
  content length.
96
94
  - If 'progress' is a number then progress bar will display assuming content length = progress.
97
95
  """
96
+ import requests # scoped as slow import
97
+
98
98
  progress = kwargs.pop("progress", False)
99
99
  if not progress:
100
100
  return requests.request(method, url, **kwargs)
@@ -120,7 +120,7 @@ def smart_request(
120
120
  verbose: bool = True,
121
121
  progress: bool = False,
122
122
  **kwargs,
123
- ) -> Optional[requests.Response]:
123
+ ):
124
124
  """
125
125
  Make an HTTP request using the 'requests' library, with exponential backoff retries up to a specified timeout.
126
126
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  from ultralytics.engine.predictor import BasePredictor
4
4
  from ultralytics.engine.results import Results
5
- from ultralytics.utils import ops
5
+ from ultralytics.utils import nms, ops
6
6
 
7
7
 
8
8
  class DetectionPredictor(BasePredictor):
@@ -53,7 +53,7 @@ class DetectionPredictor(BasePredictor):
53
53
  >>> processed_results = predictor.postprocess(preds, img, orig_imgs)
54
54
  """
55
55
  save_feats = getattr(self, "_feats", None) is not None
56
- preds = ops.non_max_suppression(
56
+ preds = nms.non_max_suppression(
57
57
  preds,
58
58
  self.args.conf,
59
59
  self.args.iou,
@@ -9,7 +9,7 @@ import torch
9
9
 
10
10
  from ultralytics.data import build_dataloader, build_yolo_dataset, converter
11
11
  from ultralytics.engine.validator import BaseValidator
12
- from ultralytics.utils import LOGGER, ops
12
+ from ultralytics.utils import LOGGER, nms, ops
13
13
  from ultralytics.utils.checks import check_requirements
14
14
  from ultralytics.utils.metrics import ConfusionMatrix, DetMetrics, box_iou
15
15
  from ultralytics.utils.plotting import plot_images
@@ -115,7 +115,7 @@ class DetectionValidator(BaseValidator):
115
115
  (List[Dict[str, torch.Tensor]]): Processed predictions after NMS, where each dict contains
116
116
  'bboxes', 'conf', 'cls', and 'extra' tensors.
117
117
  """
118
- outputs = ops.non_max_suppression(
118
+ outputs = nms.non_max_suppression(
119
119
  preds,
120
120
  self.args.conf,
121
121
  self.args.iou,
@@ -9,6 +9,7 @@ import torch
9
9
  from ultralytics.models.yolo.detect import DetectionValidator
10
10
  from ultralytics.utils import LOGGER, ops
11
11
  from ultralytics.utils.metrics import OBBMetrics, batch_probiou
12
+ from ultralytics.utils.nms import TorchNMS
12
13
 
13
14
 
14
15
  class OBBValidator(DetectionValidator):
@@ -281,7 +282,7 @@ class OBBValidator(DetectionValidator):
281
282
  b = bbox[:, :5].clone()
282
283
  b[:, :2] += c
283
284
  # 0.3 could get results close to the ones from official merging script, even slightly better.
284
- i = ops.nms_rotated(b, scores, 0.3)
285
+ i = TorchNMS.fast_nms(b, scores, 0.3, iou_func=batch_probiou)
285
286
  bbox = bbox[i]
286
287
 
287
288
  b = ops.xywhr2xyxyxyxy(bbox[:, :5]).view(-1, 8)
@@ -127,14 +127,14 @@ class AutoBackend(nn.Module):
127
127
  _model_type: Determine the model type from file path.
128
128
 
129
129
  Examples:
130
- >>> model = AutoBackend(weights="yolo11n.pt", device="cuda")
130
+ >>> model = AutoBackend(model="yolo11n.pt", device="cuda")
131
131
  >>> results = model(img)
132
132
  """
133
133
 
134
134
  @torch.no_grad()
135
135
  def __init__(
136
136
  self,
137
- weights: Union[str, List[str], torch.nn.Module] = "yolo11n.pt",
137
+ model: Union[str, List[str], torch.nn.Module] = "yolo11n.pt",
138
138
  device: torch.device = torch.device("cpu"),
139
139
  dnn: bool = False,
140
140
  data: Optional[Union[str, Path]] = None,
@@ -146,7 +146,7 @@ class AutoBackend(nn.Module):
146
146
  Initialize the AutoBackend for inference.
147
147
 
148
148
  Args:
149
- weights (str | List[str] | torch.nn.Module): Path to the model weights file or a module instance.
149
+ model (str | List[str] | torch.nn.Module): Path to the model weights file or a module instance.
150
150
  device (torch.device): Device to run the model on.
151
151
  dnn (bool): Use OpenCV DNN module for ONNX inference.
152
152
  data (str | Path, optional): Path to the additional data.yaml file containing class names.
@@ -155,8 +155,8 @@ class AutoBackend(nn.Module):
155
155
  verbose (bool): Enable verbose logging.
156
156
  """
157
157
  super().__init__()
158
- w = str(weights[0] if isinstance(weights, list) else weights)
159
- nn_module = isinstance(weights, torch.nn.Module)
158
+ w = str(model[0] if isinstance(model, list) else model)
159
+ nn_module = isinstance(model, torch.nn.Module)
160
160
  (
161
161
  pt,
162
162
  jit,
@@ -180,7 +180,7 @@ class AutoBackend(nn.Module):
180
180
  nhwc = coreml or saved_model or pb or tflite or edgetpu or rknn # BHWC formats (vs torch BCWH)
181
181
  stride, ch = 32, 3 # default stride and channels
182
182
  end2end, dynamic = False, False
183
- model, metadata, task = None, None, None
183
+ metadata, task = None, None
184
184
 
185
185
  # Set device
186
186
  cuda = isinstance(device, torch.device) and torch.cuda.is_available() and device.type != "cpu" # use CUDA
@@ -192,36 +192,32 @@ class AutoBackend(nn.Module):
192
192
  if not (pt or triton or nn_module):
193
193
  w = attempt_download_asset(w)
194
194
 
195
- # In-memory PyTorch model
196
- if nn_module:
197
- if fuse:
198
- if IS_JETSON and is_jetson(jetpack=5):
199
- # Jetson Jetpack5 requires device before fuse https://github.com/ultralytics/ultralytics/pull/21028
200
- weights = weights.to(device)
201
- weights = weights.fuse(verbose=verbose)
202
- model = weights.to(device)
203
- if hasattr(model, "kpt_shape"):
204
- kpt_shape = model.kpt_shape # pose-only
205
- stride = max(int(model.stride.max()), 32) # model stride
206
- names = model.module.names if hasattr(model, "module") else model.names # get class names
207
- model.half() if fp16 else model.float()
208
- ch = model.yaml.get("channels", 3)
209
- self.model = model # explicitly assign for to(), cpu(), cuda(), half()
210
- pt = True
211
-
212
- # PyTorch
213
- elif pt:
214
- from ultralytics.nn.tasks import attempt_load_weights
195
+ # PyTorch (in-memory or file)
196
+ if nn_module or pt:
197
+ if nn_module:
198
+ pt = True
199
+ if fuse:
200
+ if IS_JETSON and is_jetson(jetpack=5):
201
+ # Jetson Jetpack5 requires device before fuse https://github.com/ultralytics/ultralytics/pull/21028
202
+ model = model.to(device)
203
+ model = model.fuse(verbose=verbose)
204
+ model = model.to(device)
205
+ else: # pt file
206
+ from ultralytics.nn.tasks import attempt_load_weights
207
+
208
+ model = attempt_load_weights(
209
+ model if isinstance(model, list) else w, device=device, inplace=True, fuse=fuse
210
+ )
215
211
 
216
- model = attempt_load_weights(
217
- weights if isinstance(weights, list) else w, device=device, inplace=True, fuse=fuse
218
- )
212
+ # Common PyTorch model processing
219
213
  if hasattr(model, "kpt_shape"):
220
214
  kpt_shape = model.kpt_shape # pose-only
221
215
  stride = max(int(model.stride.max()), 32) # model stride
222
216
  names = model.module.names if hasattr(model, "module") else model.names # get class names
223
217
  model.half() if fp16 else model.float()
224
218
  ch = model.yaml.get("channels", 3)
219
+ for p in model.parameters():
220
+ p.requires_grad = False
225
221
  self.model = model # explicitly assign for to(), cpu(), cuda(), half()
226
222
 
227
223
  # TorchScript
@@ -407,6 +403,7 @@ class AutoBackend(nn.Module):
407
403
 
408
404
  # CoreML
409
405
  elif coreml:
406
+ check_requirements("coremltools>=8.0")
410
407
  LOGGER.info(f"Loading {w} for CoreML inference...")
411
408
  import coremltools as ct
412
409
 
@@ -601,18 +598,13 @@ class AutoBackend(nn.Module):
601
598
  dynamic = metadata.get("args", {}).get("dynamic", dynamic)
602
599
  ch = metadata.get("channels", 3)
603
600
  elif not (pt or triton or nn_module):
604
- LOGGER.warning(f"Metadata not found for 'model={weights}'")
601
+ LOGGER.warning(f"Metadata not found for 'model={w}'")
605
602
 
606
603
  # Check names
607
604
  if "names" not in locals(): # names missing
608
605
  names = default_class_names(data)
609
606
  names = check_class_names(names)
610
607
 
611
- # Disable gradients
612
- if pt:
613
- for p in model.parameters():
614
- p.requires_grad = False
615
-
616
608
  self.__dict__.update(locals()) # assign all variables to self
617
609
 
618
610
  def forward(
@@ -858,8 +850,6 @@ class AutoBackend(nn.Module):
858
850
  Args:
859
851
  imgsz (tuple): The shape of the dummy input tensor in the format (batch_size, channels, height, width)
860
852
  """
861
- import torchvision # noqa (import here so torchvision import time not recorded in postprocess time)
862
-
863
853
  warmup_types = self.pt, self.jit, self.onnx, self.engine, self.saved_model, self.pb, self.triton, self.nn_module
864
854
  if any(warmup_types) and (self.device.type != "cpu" or self.triton):
865
855
  im = torch.empty(*imgsz, dtype=torch.half if self.fp16 else torch.float, device=self.device) # input
@@ -878,7 +868,7 @@ class AutoBackend(nn.Module):
878
868
  (List[bool]): List of booleans indicating the model type.
879
869
 
880
870
  Examples:
881
- >>> model = AutoBackend(weights="path/to/model.onnx")
871
+ >>> model = AutoBackend(model="path/to/model.onnx")
882
872
  >>> model_type = model._model_type() # returns "onnx"
883
873
  """
884
874
  from ultralytics.engine.exporter import export_formats
@@ -7,14 +7,14 @@ blocks, attention mechanisms, transformer components, and detection/segmentation
7
7
 
8
8
  Examples:
9
9
  Visualize a module with Netron
10
- >>> from ultralytics.nn.modules import *
10
+ >>> from ultralytics.nn.modules import Conv
11
11
  >>> import torch
12
- >>> import os
12
+ >>> import subprocess
13
13
  >>> x = torch.ones(1, 128, 40, 40)
14
14
  >>> m = Conv(128, 128)
15
15
  >>> f = f"{m._get_name()}.onnx"
16
16
  >>> torch.onnx.export(m, x, f)
17
- >>> os.system(f"onnxslim {f} {f} && open {f}") # pip install onnxslim
17
+ >>> subprocess.run(f"onnxslim {f} {f} && open {f}", shell=True, check=True) # pip install onnxslim
18
18
  """
19
19
 
20
20
  from .block import (