dgenerate-ultralytics-headless 8.3.230__py3-none-any.whl → 8.3.232__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.230.dist-info → dgenerate_ultralytics_headless-8.3.232.dist-info}/METADATA +4 -6
- {dgenerate_ultralytics_headless-8.3.230.dist-info → dgenerate_ultralytics_headless-8.3.232.dist-info}/RECORD +36 -36
- ultralytics/__init__.py +1 -1
- ultralytics/data/augment.py +3 -131
- ultralytics/engine/exporter.py +1 -1
- ultralytics/engine/model.py +0 -5
- ultralytics/engine/results.py +0 -67
- ultralytics/models/sam/model.py +0 -4
- ultralytics/models/sam/modules/blocks.py +0 -51
- ultralytics/models/sam/modules/decoders.py +0 -10
- ultralytics/models/sam/modules/encoders.py +0 -44
- ultralytics/models/sam/modules/memory_attention.py +0 -12
- ultralytics/models/sam/modules/sam.py +0 -16
- ultralytics/models/sam/predict.py +0 -17
- ultralytics/models/yolo/classify/val.py +0 -6
- ultralytics/models/yolo/model.py +0 -5
- ultralytics/models/yolo/obb/predict.py +0 -6
- ultralytics/models/yolo/pose/predict.py +1 -13
- ultralytics/models/yolo/pose/train.py +1 -7
- ultralytics/models/yolo/pose/val.py +6 -17
- ultralytics/models/yolo/world/train_world.py +0 -18
- ultralytics/nn/text_model.py +0 -16
- ultralytics/trackers/bot_sort.py +0 -13
- ultralytics/trackers/byte_tracker.py +0 -11
- ultralytics/trackers/utils/gmc.py +0 -4
- ultralytics/trackers/utils/kalman_filter.py +0 -4
- ultralytics/utils/__init__.py +2 -1
- ultralytics/utils/benchmarks.py +0 -6
- ultralytics/utils/errors.py +0 -6
- ultralytics/utils/metrics.py +4 -1
- ultralytics/utils/tqdm.py +0 -5
- ultralytics/utils/triton.py +0 -4
- {dgenerate_ultralytics_headless-8.3.230.dist-info → dgenerate_ultralytics_headless-8.3.232.dist-info}/WHEEL +0 -0
- {dgenerate_ultralytics_headless-8.3.230.dist-info → dgenerate_ultralytics_headless-8.3.232.dist-info}/entry_points.txt +0 -0
- {dgenerate_ultralytics_headless-8.3.230.dist-info → dgenerate_ultralytics_headless-8.3.232.dist-info}/licenses/LICENSE +0 -0
- {dgenerate_ultralytics_headless-8.3.230.dist-info → dgenerate_ultralytics_headless-8.3.232.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.232
|
|
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>
|
|
@@ -50,11 +50,9 @@ Requires-Dist: ipython; extra == "dev"
|
|
|
50
50
|
Requires-Dist: pytest; extra == "dev"
|
|
51
51
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
52
52
|
Requires-Dist: coverage[toml]; extra == "dev"
|
|
53
|
-
Requires-Dist:
|
|
54
|
-
Requires-Dist: mkdocs-
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist: mkdocs-ultralytics-plugin>=0.1.29; extra == "dev"
|
|
57
|
-
Requires-Dist: mkdocs-macros-plugin>=1.0.5; extra == "dev"
|
|
53
|
+
Requires-Dist: zensical>=0.0.9; extra == "dev"
|
|
54
|
+
Requires-Dist: mkdocs-ultralytics-plugin>=0.2.3; extra == "dev"
|
|
55
|
+
Requires-Dist: minijinja>=2.0.0; extra == "dev"
|
|
58
56
|
Provides-Extra: export
|
|
59
57
|
Requires-Dist: numpy<2.0.0; extra == "export"
|
|
60
58
|
Requires-Dist: onnx>=1.12.0; platform_system != "Darwin" and extra == "export"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dgenerate_ultralytics_headless-8.3.
|
|
1
|
+
dgenerate_ultralytics_headless-8.3.232.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
|
|
@@ -8,7 +8,7 @@ tests/test_exports.py,sha256=OMLio2uUhyqo8D8qB5xUwmk7Po2rMeAACRc8WYoxbj4,13147
|
|
|
8
8
|
tests/test_integrations.py,sha256=6QgSh9n0J04RdUYz08VeVOnKmf4S5MDEQ0chzS7jo_c,6220
|
|
9
9
|
tests/test_python.py,sha256=jhnN-Oie3euE3kfHzUqvnadkWOsQyvFmdmEcse9Rsto,29253
|
|
10
10
|
tests/test_solutions.py,sha256=j_PZZ5tMR1Y5ararY-OTXZr1hYJ7vEVr8H3w4O1tbQs,14153
|
|
11
|
-
ultralytics/__init__.py,sha256=
|
|
11
|
+
ultralytics/__init__.py,sha256=QwDEEKwVKp70y7aoaAwIzU9WYxVtvQzuNuQpLZnTKP0,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
|
|
@@ -109,7 +109,7 @@ ultralytics/cfg/trackers/botsort.yaml,sha256=tRxC-qT4Wz0mLn5x7ZEwrqgGKrmTDVY7gMg
|
|
|
109
109
|
ultralytics/cfg/trackers/bytetrack.yaml,sha256=7LS1ObP5u7BUFcmeY6L2m3bRuPUktnpJspFKd_ElVWc,908
|
|
110
110
|
ultralytics/data/__init__.py,sha256=ToR8zl0JhBHy42ZvV7zIwO_F3lbi5oNlGQNPK3dlddU,644
|
|
111
111
|
ultralytics/data/annotator.py,sha256=kbfSPBesKEVK6ys3dilTdMh7rCKyp0xV7tGQeEDbpWI,2985
|
|
112
|
-
ultralytics/data/augment.py,sha256=
|
|
112
|
+
ultralytics/data/augment.py,sha256=OgOAxaisyrSIPrvY7h9QXpq0m8EKsnlHBEIrmZk8GOw,127481
|
|
113
113
|
ultralytics/data/base.py,sha256=2sJmh1VUCvxjfdvEAQldK9PLVsw-pDVjcyo8gCLlbuo,19575
|
|
114
114
|
ultralytics/data/build.py,sha256=86pnRpiFDHrm_ZvwN9DTSjTwLT9is2sO_tyXiqya7Wk,17205
|
|
115
115
|
ultralytics/data/converter.py,sha256=_54Xw78TLRswJ9nUVCd2lfEP5riQ82rM0_g_Gad4PAI,31893
|
|
@@ -123,10 +123,10 @@ 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=
|
|
127
|
-
ultralytics/engine/model.py,sha256=
|
|
126
|
+
ultralytics/engine/exporter.py,sha256=m1I0IENaXW-z4pdA2Dvnh_UqesFWrWSfQN1kheIJKJA,68208
|
|
127
|
+
ultralytics/engine/model.py,sha256=RkjMWXkyGmYjmMYIG8mPX8Cf1cJvn0ccOsXt03g7tIk,52999
|
|
128
128
|
ultralytics/engine/predictor.py,sha256=eu0sVo3PTt4zKH6SntzdO1E8cgFj9PFOJrfQO6VNqCE,22698
|
|
129
|
-
ultralytics/engine/results.py,sha256=
|
|
129
|
+
ultralytics/engine/results.py,sha256=zHPX3j36SnbHHRzAtF5wv_IhugEHf-zEPUqpQwdgZxA,68029
|
|
130
130
|
ultralytics/engine/trainer.py,sha256=xzsouV6UX259WT3n_in8GoXblmmlrzyYpD6fQt_zBm0,45214
|
|
131
131
|
ultralytics/engine/tuner.py,sha256=xooBE-urCbqK-FQIUtUTG5SC26GevKshDWn-HgIR3Ng,21548
|
|
132
132
|
ultralytics/engine/validator.py,sha256=mG9u7atDw7mkCmoB_JjA4pM9m41vF5U7hPLRpBg8QFA,17528
|
|
@@ -153,14 +153,14 @@ ultralytics/models/rtdetr/val.py,sha256=O3lWCAhF2N0MI9RbcczUmat6uDpcFX8DSuxscsYt
|
|
|
153
153
|
ultralytics/models/sam/__init__.py,sha256=p1BKLawQFvVxmdk7LomFVWX-67Kc-AP4PJBNPfU_Nuc,359
|
|
154
154
|
ultralytics/models/sam/amg.py,sha256=aYvJ7jQMkTR3X9KV7SHi3qP3yNchQggWNUurTRZwxQg,11786
|
|
155
155
|
ultralytics/models/sam/build.py,sha256=GdZ4tEgbfIo232SGucKL2qQtZH2yUZafYThBJNPH8yA,12663
|
|
156
|
-
ultralytics/models/sam/model.py,sha256=
|
|
157
|
-
ultralytics/models/sam/predict.py,sha256=
|
|
156
|
+
ultralytics/models/sam/model.py,sha256=GpJ2CogjTwsPELq7BpM10zk45_teAsInA1faAGQ1lJ8,7086
|
|
157
|
+
ultralytics/models/sam/predict.py,sha256=g6gJK_OApq_NblM3j0nq675OPUqRJCFFZJFs-LPDWW8,103928
|
|
158
158
|
ultralytics/models/sam/modules/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
|
159
|
-
ultralytics/models/sam/modules/blocks.py,sha256=
|
|
160
|
-
ultralytics/models/sam/modules/decoders.py,sha256=
|
|
161
|
-
ultralytics/models/sam/modules/encoders.py,sha256=
|
|
162
|
-
ultralytics/models/sam/modules/memory_attention.py,sha256=
|
|
163
|
-
ultralytics/models/sam/modules/sam.py,sha256=
|
|
159
|
+
ultralytics/models/sam/modules/blocks.py,sha256=X8Z37dSOgQmHxT4SW2Ktm_PhzD3fU7Y8dbt_RGWTyS0,43913
|
|
160
|
+
ultralytics/models/sam/modules/decoders.py,sha256=mdqiaGMpCI0Gu3jLilbuNCwQWrujG_WKs7AQ4FaF2qM,25064
|
|
161
|
+
ultralytics/models/sam/modules/encoders.py,sha256=Ukkulz_ArGJ7wWeGoIm7_hSPqp-0f5EWJ38ixDxL0RE,35233
|
|
162
|
+
ultralytics/models/sam/modules/memory_attention.py,sha256=HEWzyMHOudnHzV0m6bcPQ2pKUL_obyslgw7p_yrBol4,12953
|
|
163
|
+
ultralytics/models/sam/modules/sam.py,sha256=5EQyzrNawLM6FjhpVb0cmq_-ZrTFZl10kEiA-iNTiZM,54780
|
|
164
164
|
ultralytics/models/sam/modules/tiny_encoder.py,sha256=RJQTHjfUe2N3cm1EZHXObJlKqVn10EnYJFla1mnWU_8,42065
|
|
165
165
|
ultralytics/models/sam/modules/transformer.py,sha256=NmTuyxS9PNsg66tKY9_Q2af4I09VW5s8IbfswyTT3ao,14892
|
|
166
166
|
ultralytics/models/sam/modules/utils.py,sha256=Os8CDCPRYnD9P5xbKT7vmIFLcQGyyQ4hhEArCfNLgBo,15983
|
|
@@ -168,30 +168,30 @@ ultralytics/models/utils/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXp
|
|
|
168
168
|
ultralytics/models/utils/loss.py,sha256=9CcqRXDj5-I-7eZuenInvyoLcPf22Ynf3rUFA5V22bI,21131
|
|
169
169
|
ultralytics/models/utils/ops.py,sha256=z-Ebjv_k14bWOoP6nszDzDBiy3yELcVtbj6M8PsRpvE,15207
|
|
170
170
|
ultralytics/models/yolo/__init__.py,sha256=YD407NDDiyjo0x_MR6usJaTpePKPgsfBUYehlCw7lRs,307
|
|
171
|
-
ultralytics/models/yolo/model.py,sha256
|
|
171
|
+
ultralytics/models/yolo/model.py,sha256=-U7TQ2HlW5JdePBBzNpxK172uCXpM2RKMlhuZsMbxSw,18495
|
|
172
172
|
ultralytics/models/yolo/classify/__init__.py,sha256=9--HVaNOfI1K7rn_rRqclL8FUAnpfeBrRqEQIaQw2xM,383
|
|
173
173
|
ultralytics/models/yolo/classify/predict.py,sha256=wKICjwofH7-7QLJhX2vYSNJXWu2-5kWzjoXXmUPI0pU,4137
|
|
174
174
|
ultralytics/models/yolo/classify/train.py,sha256=oODDfPwjgKzsbpO7NCYnOp_uwkWD7HNLhvsHxAJTA4g,8958
|
|
175
|
-
ultralytics/models/yolo/classify/val.py,sha256=
|
|
175
|
+
ultralytics/models/yolo/classify/val.py,sha256=VbDP8-ZTNHU5CuJ1bFLPjUKTaPBwSHOQhnKHozN9G20,10503
|
|
176
176
|
ultralytics/models/yolo/detect/__init__.py,sha256=GIRsLYR-kT4JJx7lh4ZZAFGBZj0aebokuU0A7JbjDVA,257
|
|
177
177
|
ultralytics/models/yolo/detect/predict.py,sha256=DhxIpvTcLAxSKuGxm7QWuTo-EKwmRhfL6yzUSaZHNRM,5373
|
|
178
178
|
ultralytics/models/yolo/detect/train.py,sha256=5xDl8M_DrK7S8txW4IoRcdtiVaz-LvoMMr6VTWYFtyU,10477
|
|
179
179
|
ultralytics/models/yolo/detect/val.py,sha256=b4swS4fEGEFkNzXAUD8OKwS9o0tBg9kU0UGPlTlYndU,22384
|
|
180
180
|
ultralytics/models/yolo/obb/__init__.py,sha256=tQmpG8wVHsajWkZdmD6cjGohJ4ki64iSXQT8JY_dydo,221
|
|
181
|
-
ultralytics/models/yolo/obb/predict.py,sha256=
|
|
181
|
+
ultralytics/models/yolo/obb/predict.py,sha256=vA_BueSJJJuyaAZPWE0xKk7KI_YPQCUOCqeZZLMTeXM,2600
|
|
182
182
|
ultralytics/models/yolo/obb/train.py,sha256=qtBjwOHOq0oQ9mK0mOtnUrXAQ5UCUrntKq_Z0-oCBHo,3438
|
|
183
183
|
ultralytics/models/yolo/obb/val.py,sha256=4X_VmY2L5i0c-GXACgnSXcCPyhPuRydQabL1OA1f1mE,14139
|
|
184
184
|
ultralytics/models/yolo/pose/__init__.py,sha256=_9OFLj19XwvJHBRxQtVW5CV7rvJ_3hDPE97miit0sPc,227
|
|
185
|
-
ultralytics/models/yolo/pose/predict.py,sha256=
|
|
186
|
-
ultralytics/models/yolo/pose/train.py,sha256=
|
|
187
|
-
ultralytics/models/yolo/pose/val.py,sha256=
|
|
185
|
+
ultralytics/models/yolo/pose/predict.py,sha256=rsorTRpyL-x40R2QVDDG2isc1e2F2lGfD13oKaD5ANs,3118
|
|
186
|
+
ultralytics/models/yolo/pose/train.py,sha256=lKxZ1dnkN3WlEPGlIlLF7ZuR_W2eoPrxhVrKGbJIQto,4628
|
|
187
|
+
ultralytics/models/yolo/pose/val.py,sha256=kUMOckjkPYkD9aDywprlrgSXm1gJ3ofs5-2couAvHqI,12004
|
|
188
188
|
ultralytics/models/yolo/segment/__init__.py,sha256=3IThhZ1wlkY9FvmWm9cE-5-ZyE6F1FgzAtQ6jOOFzzw,275
|
|
189
189
|
ultralytics/models/yolo/segment/predict.py,sha256=fSGJVli-N84-jmqCCV4FDuQHyo7j1i0gPO7RsxTS9BM,5429
|
|
190
190
|
ultralytics/models/yolo/segment/train.py,sha256=i1nDO0B7ScFo3G64ZSTmRZ2WLUVaMsvAoedSYa_MoIU,3009
|
|
191
191
|
ultralytics/models/yolo/segment/val.py,sha256=eSiWCPt98fowkiZnZyxWedF5Kj7xh-jUCwsevs7MhNM,13252
|
|
192
192
|
ultralytics/models/yolo/world/__init__.py,sha256=nlh8I6t8hMGz_vZg8QSlsUW1R-2eKvn9CGUoPPQEGhA,131
|
|
193
193
|
ultralytics/models/yolo/world/train.py,sha256=80kswko6Zu7peXPBhXcfrTo5HO3Rg8C_cu4vPBQlk7M,7906
|
|
194
|
-
ultralytics/models/yolo/world/train_world.py,sha256=
|
|
194
|
+
ultralytics/models/yolo/world/train_world.py,sha256=5Jj4gzEwDJtz37bEahL6Lf4xp-c1xiYjGKeg_w7Esns,8723
|
|
195
195
|
ultralytics/models/yolo/yoloe/__init__.py,sha256=zaZo1_ommaxNv7mD7xpdSomNF4s8mpOcCVTXspg0ncY,760
|
|
196
196
|
ultralytics/models/yolo/yoloe/predict.py,sha256=zeu_whH4e2SIWXV8MmJ1NNzoM_cNsiI2kOTjlAhV4qg,7065
|
|
197
197
|
ultralytics/models/yolo/yoloe/train.py,sha256=giX6zDu5Z3z48PCaBHzu7v9NH3BrpUaGAYNIQvqO3Og,12937
|
|
@@ -200,7 +200,7 @@ ultralytics/models/yolo/yoloe/val.py,sha256=utUFWeFKRFWZrPr1y3A8ztbTwdoWMYqzlwBN
|
|
|
200
200
|
ultralytics/nn/__init__.py,sha256=538LZPUKKvc3JCMgiQ4VLGqRN2ZAaVLFcQbeNNHFkEA,545
|
|
201
201
|
ultralytics/nn/autobackend.py,sha256=XdEWANgSpRhLm2t2aPvp4zaPDluS14-gF6_BPamg95I,42673
|
|
202
202
|
ultralytics/nn/tasks.py,sha256=dkfIujXeSaR8FmLYyrhl5Pj2U1h22JMEOkv9T3pIIwc,70367
|
|
203
|
-
ultralytics/nn/text_model.py,sha256=
|
|
203
|
+
ultralytics/nn/text_model.py,sha256=doU80pYuhc7GYtALVN8ZjetMmdTJTheuIP65riKnT48,15358
|
|
204
204
|
ultralytics/nn/modules/__init__.py,sha256=5Sg_28MDfKwdu14Ty_WCaiIXZyjBSQ-xCNCwnoz_w-w,3198
|
|
205
205
|
ultralytics/nn/modules/activation.py,sha256=J6n-CJKFK0YbhwcRDqm9zEJM9pSAEycj5quQss_3x6E,2219
|
|
206
206
|
ultralytics/nn/modules/block.py,sha256=-Suv96Oo0LM1sqHHKudt5lL5YIcWLkxwrYVBgIAkmTs,69876
|
|
@@ -231,37 +231,37 @@ ultralytics/solutions/vision_eye.py,sha256=bSXmJ93DyLu4_CWgbF3GkHzh_VpiEmkK5vVJD
|
|
|
231
231
|
ultralytics/solutions/templates/similarity-search.html,sha256=jDlqKEbppC9udbL69DZ-w0IzUDp3qBH0tfOgkqYMxCE,4146
|
|
232
232
|
ultralytics/trackers/__init__.py,sha256=n3BOO0TR-Sz5ANDYOkKDipM9nSHOePMEwqafbk-YEPs,255
|
|
233
233
|
ultralytics/trackers/basetrack.py,sha256=57kL3R9s50GrXTAR0QfBLk0ea2VAXTBWJ6TSk3iCMrY,4374
|
|
234
|
-
ultralytics/trackers/bot_sort.py,sha256=
|
|
235
|
-
ultralytics/trackers/byte_tracker.py,sha256=
|
|
234
|
+
ultralytics/trackers/bot_sort.py,sha256=nViAG2jjl4T9X4WZjHBW-xzfR9TpJJXvgsjjzE8HeW0,11701
|
|
235
|
+
ultralytics/trackers/byte_tracker.py,sha256=HJ37uB0zrZCmFKLjheGxy2JrVdv39iGXZq-r6MG7Yhg,21063
|
|
236
236
|
ultralytics/trackers/track.py,sha256=RHgPvx9FNVBL5pUalX2l-jcWrei1UiAXszjeL3V5d-M,4742
|
|
237
237
|
ultralytics/trackers/utils/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
|
238
|
-
ultralytics/trackers/utils/gmc.py,sha256=
|
|
239
|
-
ultralytics/trackers/utils/kalman_filter.py,sha256=
|
|
238
|
+
ultralytics/trackers/utils/gmc.py,sha256=B07unzpprc_vSpAcBGPR1i2fcgFlBMC5pzTAoP9osTc,13800
|
|
239
|
+
ultralytics/trackers/utils/kalman_filter.py,sha256=iO3WEGu9AWWpVwe0AfgMqXZCzO0sgQC8lGt8KpLnPN4,21485
|
|
240
240
|
ultralytics/trackers/utils/matching.py,sha256=7lyDXEw6w5iEKeb9CARlAoPbvT35VnCc9hkjD6ZcIqs,7144
|
|
241
|
-
ultralytics/utils/__init__.py,sha256=
|
|
241
|
+
ultralytics/utils/__init__.py,sha256=xJODO40KcdX2gpZIl0f62I-ko1-SSka_lZa3kdKTHB4,53316
|
|
242
242
|
ultralytics/utils/autobatch.py,sha256=jiE4m_--H9UkXFDm_FqzcZk_hSTCGpS72XdVEKgZwAo,5114
|
|
243
243
|
ultralytics/utils/autodevice.py,sha256=rXlPuo-iX-vZ4BabmMGEGh9Uxpau4R7Zlt1KCo9Xfyc,8892
|
|
244
|
-
ultralytics/utils/benchmarks.py,sha256=
|
|
244
|
+
ultralytics/utils/benchmarks.py,sha256=B6Q55qtZri2EWOKldXnEhGrFe2BjHsAQEt7juPN4m1s,32279
|
|
245
245
|
ultralytics/utils/checks.py,sha256=L-Swpu7CDEaf8ozipCIzw3zwRiN2js6TZPmm6NZFEBA,36212
|
|
246
246
|
ultralytics/utils/cpu.py,sha256=OksKOlX93AsbSsFuoYvLXRXgpkOibrZSwQyW6lipt4Q,3493
|
|
247
247
|
ultralytics/utils/dist.py,sha256=hOuY1-unhQAY-uWiZw3LWw36d1mqJuYK75NdlwB4oKE,4131
|
|
248
248
|
ultralytics/utils/downloads.py,sha256=pUzi3N6-L--aLUbyIv2lU3zYtL84eSD-Z-PycwPLwuA,22883
|
|
249
|
-
ultralytics/utils/errors.py,sha256=
|
|
249
|
+
ultralytics/utils/errors.py,sha256=dUZcTWpbJJHqEuWHM6IbeoJJ4TzA_yHBP8E7tEEpBVs,1388
|
|
250
250
|
ultralytics/utils/events.py,sha256=6vqs_iSxoXIhQ804sOjApNZmXwNW9FUFtjaHPY8ta10,4665
|
|
251
251
|
ultralytics/utils/files.py,sha256=Zw3pQEe1vz7oGBIb1c_umaVGJDvWn0z5zcPTFYcAF94,8125
|
|
252
252
|
ultralytics/utils/git.py,sha256=O12SgwSh1JHizR0H_pOAyMY_qRpSe5I4cc5nAoEQ-zE,5489
|
|
253
253
|
ultralytics/utils/instance.py,sha256=11mhefvTI9ftMqSirXuiViAi0Fxlo6v84qvNxfRNUoE,18862
|
|
254
254
|
ultralytics/utils/logger.py,sha256=gq38VIMcdOZHI-rKDO0F7Z-RiFebpkcVhoNr-5W2U4o,15633
|
|
255
255
|
ultralytics/utils/loss.py,sha256=R1uC00IlXVHFWc8I8ngjtfRfuUj_sT_Zw59OlYKwmFY,39781
|
|
256
|
-
ultralytics/utils/metrics.py,sha256=
|
|
256
|
+
ultralytics/utils/metrics.py,sha256=CYAAfe-wUF37MAMD1Y8rsVkxZ1DOL1lzv_Ynwd-VZSk,68588
|
|
257
257
|
ultralytics/utils/nms.py,sha256=zv1rOzMF6WU8Kdk41VzNf1H1EMt_vZHcbDFbg3mnN2o,14248
|
|
258
258
|
ultralytics/utils/ops.py,sha256=RAyISErSCXYWpXiAvR41Xnf2sIqXyCwyFDQf3K5bmFc,25661
|
|
259
259
|
ultralytics/utils/patches.py,sha256=6WDGUokiND76iDbLeul_6Ny-bvvFcy6Bms5f9MkxhfQ,6506
|
|
260
260
|
ultralytics/utils/plotting.py,sha256=GGaUYgF8OoxcmyMwNTr82ER7cJZ3CUOjYeq-7vpHDGQ,48432
|
|
261
261
|
ultralytics/utils/tal.py,sha256=w7oi6fp0NmL6hHh-yvCCX1cBuuB4JuX7w1wiR4_SMZs,20678
|
|
262
262
|
ultralytics/utils/torch_utils.py,sha256=uSy-ZRWsHo_43c-pdaar-GXQu9wwjkp2qZmEiJjChfI,40218
|
|
263
|
-
ultralytics/utils/tqdm.py,sha256=
|
|
264
|
-
ultralytics/utils/triton.py,sha256=
|
|
263
|
+
ultralytics/utils/tqdm.py,sha256=5PtGvRE9Xq8qugWqBSvZefAoFOnv3S0snETo5Z_ohNE,16185
|
|
264
|
+
ultralytics/utils/triton.py,sha256=BQu3CD3OlT76d1OtmnX5slQU37VC1kzRvEtfI2saIQA,5211
|
|
265
265
|
ultralytics/utils/tuner.py,sha256=rN8gFWnQOJFtrGlFcvOo0Eah9dEVFx0nFkpTGrlewZA,6861
|
|
266
266
|
ultralytics/utils/callbacks/__init__.py,sha256=hzL63Rce6VkZhP4Lcim9LKjadixaQG86nKqPhk7IkS0,242
|
|
267
267
|
ultralytics/utils/callbacks/base.py,sha256=floD31JHqHpiVabQiE76_hzC_j7KjtL4w_czkD1bLKc,6883
|
|
@@ -279,8 +279,8 @@ ultralytics/utils/export/__init__.py,sha256=Cfh-PwVfTF_lwPp-Ss4wiX4z8Sm1XRPklsqd
|
|
|
279
279
|
ultralytics/utils/export/engine.py,sha256=23-lC6dNsmz5vprSJzaN7UGNXrFlVedNcqhlOH_IXes,9956
|
|
280
280
|
ultralytics/utils/export/imx.py,sha256=9UPA4CwTPADzvJx9dOsh_8fQ-LMeqG7eI9EYIn5ojkc,11621
|
|
281
281
|
ultralytics/utils/export/tensorflow.py,sha256=PyAp0_rXSUcXiqV2RY0H9b_-oFaZ7hZBiSM42X53t0Q,9374
|
|
282
|
-
dgenerate_ultralytics_headless-8.3.
|
|
283
|
-
dgenerate_ultralytics_headless-8.3.
|
|
284
|
-
dgenerate_ultralytics_headless-8.3.
|
|
285
|
-
dgenerate_ultralytics_headless-8.3.
|
|
286
|
-
dgenerate_ultralytics_headless-8.3.
|
|
282
|
+
dgenerate_ultralytics_headless-8.3.232.dist-info/METADATA,sha256=vuau2oTebD3Pd14ncJPN9PgrKfEMPrQplLBbf6fooaA,38718
|
|
283
|
+
dgenerate_ultralytics_headless-8.3.232.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
284
|
+
dgenerate_ultralytics_headless-8.3.232.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
|
285
|
+
dgenerate_ultralytics_headless-8.3.232.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
|
286
|
+
dgenerate_ultralytics_headless-8.3.232.dist-info/RECORD,,
|
ultralytics/__init__.py
CHANGED
ultralytics/data/augment.py
CHANGED
|
@@ -48,9 +48,6 @@ class BaseTransform:
|
|
|
48
48
|
|
|
49
49
|
This constructor sets up the base transformation object, which can be extended for specific image processing
|
|
50
50
|
tasks. It is designed to be compatible with both classification and semantic segmentation.
|
|
51
|
-
|
|
52
|
-
Examples:
|
|
53
|
-
>>> transform = BaseTransform()
|
|
54
51
|
"""
|
|
55
52
|
pass
|
|
56
53
|
|
|
@@ -166,11 +163,6 @@ class Compose:
|
|
|
166
163
|
|
|
167
164
|
Args:
|
|
168
165
|
transforms (list[Callable]): A list of callable transform objects to be applied sequentially.
|
|
169
|
-
|
|
170
|
-
Examples:
|
|
171
|
-
>>> from ultralytics.data.augment import Compose, RandomHSV, RandomFlip
|
|
172
|
-
>>> transforms = [RandomHSV(), RandomFlip()]
|
|
173
|
-
>>> compose = Compose(transforms)
|
|
174
166
|
"""
|
|
175
167
|
self.transforms = transforms if isinstance(transforms, list) else [transforms]
|
|
176
168
|
|
|
@@ -341,11 +333,6 @@ class BaseMixTransform:
|
|
|
341
333
|
dataset (Any): The dataset object containing images and labels for mixing.
|
|
342
334
|
pre_transform (Callable | None): Optional transform to apply before mixing.
|
|
343
335
|
p (float): Probability of applying the mix transformation. Should be in the range [0.0, 1.0].
|
|
344
|
-
|
|
345
|
-
Examples:
|
|
346
|
-
>>> dataset = YOLODataset("path/to/data")
|
|
347
|
-
>>> pre_transform = Compose([RandomFlip(), RandomPerspective()])
|
|
348
|
-
>>> mix_transform = BaseMixTransform(dataset, pre_transform, p=0.5)
|
|
349
336
|
"""
|
|
350
337
|
self.dataset = dataset
|
|
351
338
|
self.pre_transform = pre_transform
|
|
@@ -508,11 +495,6 @@ class Mosaic(BaseMixTransform):
|
|
|
508
495
|
imgsz (int): Image size (height and width) after mosaic pipeline of a single image.
|
|
509
496
|
p (float): Probability of applying the mosaic augmentation. Must be in the range 0-1.
|
|
510
497
|
n (int): The grid size, either 4 (for 2x2) or 9 (for 3x3).
|
|
511
|
-
|
|
512
|
-
Examples:
|
|
513
|
-
>>> from ultralytics.data.augment import Mosaic
|
|
514
|
-
>>> dataset = YourDataset(...)
|
|
515
|
-
>>> mosaic_aug = Mosaic(dataset, imgsz=640, p=0.5, n=4)
|
|
516
498
|
"""
|
|
517
499
|
assert 0 <= p <= 1.0, f"The probability should be in range [0, 1], but got {p}."
|
|
518
500
|
assert n in {4, 9}, "grid must be equal to 4 or 9."
|
|
@@ -866,11 +848,6 @@ class MixUp(BaseMixTransform):
|
|
|
866
848
|
dataset (Any): The dataset to which MixUp augmentation will be applied.
|
|
867
849
|
pre_transform (Callable | None): Optional transform to apply to images before MixUp.
|
|
868
850
|
p (float): Probability of applying MixUp augmentation to an image. Must be in the range [0, 1].
|
|
869
|
-
|
|
870
|
-
Examples:
|
|
871
|
-
>>> from ultralytics.data.dataset import YOLODataset
|
|
872
|
-
>>> dataset = YOLODataset("path/to/data.yaml")
|
|
873
|
-
>>> mixup = MixUp(dataset, pre_transform=None, p=0.5)
|
|
874
851
|
"""
|
|
875
852
|
super().__init__(dataset=dataset, pre_transform=pre_transform, p=p)
|
|
876
853
|
|
|
@@ -1069,10 +1046,6 @@ class RandomPerspective:
|
|
|
1069
1046
|
border (tuple[int, int]): Tuple specifying mosaic border (top/bottom, left/right).
|
|
1070
1047
|
pre_transform (Callable | None): Function/transform to apply to the image before starting the random
|
|
1071
1048
|
transformation.
|
|
1072
|
-
|
|
1073
|
-
Examples:
|
|
1074
|
-
>>> transform = RandomPerspective(degrees=10.0, translate=0.1, scale=0.5, shear=5.0)
|
|
1075
|
-
>>> result = transform(labels) # Apply random perspective to labels
|
|
1076
1049
|
"""
|
|
1077
1050
|
self.degrees = degrees
|
|
1078
1051
|
self.translate = translate
|
|
@@ -1402,10 +1375,6 @@ class RandomHSV:
|
|
|
1402
1375
|
hgain (float): Maximum variation for hue. Should be in the range [0, 1].
|
|
1403
1376
|
sgain (float): Maximum variation for saturation. Should be in the range [0, 1].
|
|
1404
1377
|
vgain (float): Maximum variation for value. Should be in the range [0, 1].
|
|
1405
|
-
|
|
1406
|
-
Examples:
|
|
1407
|
-
>>> hsv_aug = RandomHSV(hgain=0.5, sgain=0.5, vgain=0.5)
|
|
1408
|
-
>>> hsv_aug(image)
|
|
1409
1378
|
"""
|
|
1410
1379
|
self.hgain = hgain
|
|
1411
1380
|
self.sgain = sgain
|
|
@@ -1484,10 +1453,6 @@ class RandomFlip:
|
|
|
1484
1453
|
|
|
1485
1454
|
Raises:
|
|
1486
1455
|
AssertionError: If direction is not 'horizontal' or 'vertical', or if p is not between 0 and 1.
|
|
1487
|
-
|
|
1488
|
-
Examples:
|
|
1489
|
-
>>> flip = RandomFlip(p=0.5, direction="horizontal")
|
|
1490
|
-
>>> flip_with_idx = RandomFlip(p=0.7, direction="vertical", flip_idx=[1, 0, 3, 2, 5, 4])
|
|
1491
1456
|
"""
|
|
1492
1457
|
assert direction in {"horizontal", "vertical"}, f"Support direction `horizontal` or `vertical`, got {direction}"
|
|
1493
1458
|
assert 0 <= p <= 1.0, f"The probability should be in range [0, 1], but got {p}."
|
|
@@ -1590,19 +1555,6 @@ class LetterBox:
|
|
|
1590
1555
|
stride (int): Stride of the model (e.g., 32 for YOLOv5).
|
|
1591
1556
|
padding_value (int): Value for padding the image. Default is 114.
|
|
1592
1557
|
interpolation (int): Interpolation method for resizing. Default is cv2.INTER_LINEAR.
|
|
1593
|
-
|
|
1594
|
-
Attributes:
|
|
1595
|
-
new_shape (tuple[int, int]): Target size for the resized image.
|
|
1596
|
-
auto (bool): Flag for using minimum rectangle resizing.
|
|
1597
|
-
scale_fill (bool): Flag for stretching image without padding.
|
|
1598
|
-
scaleup (bool): Flag for allowing upscaling.
|
|
1599
|
-
stride (int): Stride value for ensuring image size is divisible by stride.
|
|
1600
|
-
padding_value (int): Value used for padding the image.
|
|
1601
|
-
interpolation (int): Interpolation method used for resizing.
|
|
1602
|
-
|
|
1603
|
-
Examples:
|
|
1604
|
-
>>> letterbox = LetterBox(new_shape=(640, 640), auto=False, scale_fill=False, scaleup=True, stride=32)
|
|
1605
|
-
>>> resized_img = letterbox(original_img)
|
|
1606
1558
|
"""
|
|
1607
1559
|
self.new_shape = new_shape
|
|
1608
1560
|
self.auto = auto
|
|
@@ -1840,9 +1792,9 @@ class Albumentations:
|
|
|
1840
1792
|
>>> augmented_labels = transform(labels)
|
|
1841
1793
|
|
|
1842
1794
|
Notes:
|
|
1843
|
-
-
|
|
1844
|
-
-
|
|
1845
|
-
-
|
|
1795
|
+
- Requires Albumentations version 1.0.3 or higher.
|
|
1796
|
+
- Spatial transforms are handled differently to ensure bbox compatibility.
|
|
1797
|
+
- Some transforms are applied with very low probability (0.01) by default.
|
|
1846
1798
|
"""
|
|
1847
1799
|
|
|
1848
1800
|
def __init__(self, p: float = 1.0, transforms: list | None = None) -> None:
|
|
@@ -1856,30 +1808,9 @@ class Albumentations:
|
|
|
1856
1808
|
p (float): Probability of applying the augmentations. Must be between 0 and 1.
|
|
1857
1809
|
transforms (list, optional): List of custom Albumentations transforms. If None, uses default transforms.
|
|
1858
1810
|
|
|
1859
|
-
Attributes:
|
|
1860
|
-
p (float): Probability of applying the augmentations.
|
|
1861
|
-
transform (albumentations.Compose): Composed Albumentations transforms.
|
|
1862
|
-
contains_spatial (bool): Indicates if the transforms include spatial transformations.
|
|
1863
|
-
|
|
1864
1811
|
Raises:
|
|
1865
1812
|
ImportError: If the Albumentations package is not installed.
|
|
1866
1813
|
Exception: For any other errors during initialization.
|
|
1867
|
-
|
|
1868
|
-
Examples:
|
|
1869
|
-
>>> transform = Albumentations(p=0.5)
|
|
1870
|
-
>>> augmented = transform(image=image, bboxes=bboxes, class_labels=classes)
|
|
1871
|
-
>>> augmented_image = augmented["image"]
|
|
1872
|
-
>>> augmented_bboxes = augmented["bboxes"]
|
|
1873
|
-
|
|
1874
|
-
>>> # Custom transforms example
|
|
1875
|
-
>>> import albumentations as A
|
|
1876
|
-
>>> custom_transforms = [A.Blur(p=0.01), A.CLAHE(p=0.01)]
|
|
1877
|
-
>>> transform = Albumentations(p=1.0, transforms=custom_transforms)
|
|
1878
|
-
|
|
1879
|
-
Notes:
|
|
1880
|
-
- Requires Albumentations version 1.0.3 or higher.
|
|
1881
|
-
- Spatial transforms are handled differently to ensure bbox compatibility.
|
|
1882
|
-
- Some transforms are applied with very low probability (0.01) by default.
|
|
1883
1814
|
"""
|
|
1884
1815
|
self.p = p
|
|
1885
1816
|
self.transform = None
|
|
@@ -2080,22 +2011,6 @@ class Format:
|
|
|
2080
2011
|
mask_overlap (bool): If True, allows mask overlap.
|
|
2081
2012
|
batch_idx (bool): If True, keeps batch indexes.
|
|
2082
2013
|
bgr (float): Probability of returning BGR images instead of RGB.
|
|
2083
|
-
|
|
2084
|
-
Attributes:
|
|
2085
|
-
bbox_format (str): Format for bounding boxes.
|
|
2086
|
-
normalize (bool): Whether bounding boxes are normalized.
|
|
2087
|
-
return_mask (bool): Whether to return instance masks.
|
|
2088
|
-
return_keypoint (bool): Whether to return keypoints.
|
|
2089
|
-
return_obb (bool): Whether to return oriented bounding boxes.
|
|
2090
|
-
mask_ratio (int): Downsample ratio for masks.
|
|
2091
|
-
mask_overlap (bool): Whether masks can overlap.
|
|
2092
|
-
batch_idx (bool): Whether to keep batch indexes.
|
|
2093
|
-
bgr (float): The probability to return BGR images.
|
|
2094
|
-
|
|
2095
|
-
Examples:
|
|
2096
|
-
>>> format = Format(bbox_format="xyxy", return_mask=True, return_keypoint=False)
|
|
2097
|
-
>>> print(format.bbox_format)
|
|
2098
|
-
xyxy
|
|
2099
2014
|
"""
|
|
2100
2015
|
self.bbox_format = bbox_format
|
|
2101
2016
|
self.normalize = normalize
|
|
@@ -2380,22 +2295,6 @@ class RandomLoadText:
|
|
|
2380
2295
|
padding (bool): Whether to pad texts to max_samples. If True, the number of texts will always be equal to
|
|
2381
2296
|
max_samples.
|
|
2382
2297
|
padding_value (str): The padding text to use when padding is True.
|
|
2383
|
-
|
|
2384
|
-
Attributes:
|
|
2385
|
-
prompt_format (str): The format string for the prompt.
|
|
2386
|
-
neg_samples (tuple[int, int]): The range for sampling negative texts.
|
|
2387
|
-
max_samples (int): The maximum number of text samples.
|
|
2388
|
-
padding (bool): Whether padding is enabled.
|
|
2389
|
-
padding_value (str): The value used for padding.
|
|
2390
|
-
|
|
2391
|
-
Examples:
|
|
2392
|
-
>>> random_load_text = RandomLoadText(prompt_format="Object: {}", neg_samples=(50, 100), max_samples=120)
|
|
2393
|
-
>>> random_load_text.prompt_format
|
|
2394
|
-
'Object: {}'
|
|
2395
|
-
>>> random_load_text.neg_samples
|
|
2396
|
-
(50, 100)
|
|
2397
|
-
>>> random_load_text.max_samples
|
|
2398
|
-
120
|
|
2399
2298
|
"""
|
|
2400
2299
|
self.prompt_format = prompt_format
|
|
2401
2300
|
self.neg_samples = neg_samples
|
|
@@ -2731,19 +2630,6 @@ class ClassifyLetterBox:
|
|
|
2731
2630
|
size) is created. If a tuple, it should be (height, width).
|
|
2732
2631
|
auto (bool): If True, automatically calculates the short side based on stride.
|
|
2733
2632
|
stride (int): The stride value, used when 'auto' is True.
|
|
2734
|
-
|
|
2735
|
-
Attributes:
|
|
2736
|
-
h (int): Target height of the letterboxed image.
|
|
2737
|
-
w (int): Target width of the letterboxed image.
|
|
2738
|
-
auto (bool): Flag indicating whether to automatically calculate short side.
|
|
2739
|
-
stride (int): Stride value for automatic short side calculation.
|
|
2740
|
-
|
|
2741
|
-
Examples:
|
|
2742
|
-
>>> transform = ClassifyLetterBox(size=224)
|
|
2743
|
-
>>> img = np.random.randint(0, 255, (480, 640, 3), dtype=np.uint8)
|
|
2744
|
-
>>> result = transform(img)
|
|
2745
|
-
>>> print(result.shape)
|
|
2746
|
-
(224, 224, 3)
|
|
2747
2633
|
"""
|
|
2748
2634
|
super().__init__()
|
|
2749
2635
|
self.h, self.w = (size, size) if isinstance(size, int) else size
|
|
@@ -2818,13 +2704,6 @@ class CenterCrop:
|
|
|
2818
2704
|
|
|
2819
2705
|
Returns:
|
|
2820
2706
|
(None): This method initializes the object and does not return anything.
|
|
2821
|
-
|
|
2822
|
-
Examples:
|
|
2823
|
-
>>> transform = CenterCrop(224)
|
|
2824
|
-
>>> img = np.random.rand(300, 300, 3)
|
|
2825
|
-
>>> cropped_img = transform(img)
|
|
2826
|
-
>>> print(cropped_img.shape)
|
|
2827
|
-
(224, 224, 3)
|
|
2828
2707
|
"""
|
|
2829
2708
|
super().__init__()
|
|
2830
2709
|
self.h, self.w = (size, size) if isinstance(size, int) else size
|
|
@@ -2889,13 +2768,6 @@ class ToTensor:
|
|
|
2889
2768
|
|
|
2890
2769
|
Args:
|
|
2891
2770
|
half (bool): If True, converts the tensor to half precision (float16).
|
|
2892
|
-
|
|
2893
|
-
Examples:
|
|
2894
|
-
>>> transform = ToTensor(half=True)
|
|
2895
|
-
>>> img = np.random.rand(640, 640, 3)
|
|
2896
|
-
>>> tensor_img = transform(img)
|
|
2897
|
-
>>> print(tensor_img.dtype)
|
|
2898
|
-
torch.float16
|
|
2899
2771
|
"""
|
|
2900
2772
|
super().__init__()
|
|
2901
2773
|
self.half = half
|
ultralytics/engine/exporter.py
CHANGED
|
@@ -1408,7 +1408,7 @@ class NMSModel(torch.nn.Module):
|
|
|
1408
1408
|
box, score, cls, extra = box[mask], score[mask], cls[mask], extra[mask]
|
|
1409
1409
|
nmsbox = box.clone()
|
|
1410
1410
|
# `8` is the minimum value experimented to get correct NMS results for obb
|
|
1411
|
-
multiplier =
|
|
1411
|
+
multiplier = 8 if self.obb else 1 / max(len(self.model.names), 1)
|
|
1412
1412
|
# Normalize boxes for NMS since large values for class offset causes issue with int8 quantization
|
|
1413
1413
|
if self.args.format == "tflite": # TFLite is already normalized
|
|
1414
1414
|
nmsbox *= multiplier
|
ultralytics/engine/model.py
CHANGED
|
@@ -100,11 +100,6 @@ class Model(torch.nn.Module):
|
|
|
100
100
|
FileNotFoundError: If the specified model file does not exist or is inaccessible.
|
|
101
101
|
ValueError: If the model file or configuration is invalid or unsupported.
|
|
102
102
|
ImportError: If required dependencies for specific model types (like HUB SDK) are not installed.
|
|
103
|
-
|
|
104
|
-
Examples:
|
|
105
|
-
>>> model = Model("yolo11n.pt")
|
|
106
|
-
>>> model = Model("path/to/model.yaml", task="detect")
|
|
107
|
-
>>> model = Model("hub_model", verbose=True)
|
|
108
103
|
"""
|
|
109
104
|
if isinstance(model, Model):
|
|
110
105
|
self.__dict__ = model.__dict__ # accepts an already initialized Model
|
ultralytics/engine/results.py
CHANGED
|
@@ -53,12 +53,6 @@ class BaseTensor(SimpleClass):
|
|
|
53
53
|
Args:
|
|
54
54
|
data (torch.Tensor | np.ndarray): Prediction data such as bounding boxes, masks, or keypoints.
|
|
55
55
|
orig_shape (tuple[int, int]): Original shape of the image in (height, width) format.
|
|
56
|
-
|
|
57
|
-
Examples:
|
|
58
|
-
>>> import torch
|
|
59
|
-
>>> data = torch.tensor([[1, 2, 3], [4, 5, 6]])
|
|
60
|
-
>>> orig_shape = (720, 1280)
|
|
61
|
-
>>> base_tensor = BaseTensor(data, orig_shape)
|
|
62
56
|
"""
|
|
63
57
|
assert isinstance(data, (torch.Tensor, np.ndarray)), "data must be torch.Tensor or np.ndarray"
|
|
64
58
|
self.data = data
|
|
@@ -252,12 +246,6 @@ class Results(SimpleClass, DataExportMixin):
|
|
|
252
246
|
obb (torch.Tensor | None): A 2D tensor of oriented bounding box coordinates for each detection.
|
|
253
247
|
speed (dict | None): A dictionary containing preprocess, inference, and postprocess speeds (ms/image).
|
|
254
248
|
|
|
255
|
-
Examples:
|
|
256
|
-
>>> results = model("path/to/image.jpg")
|
|
257
|
-
>>> result = results[0] # Get the first result
|
|
258
|
-
>>> boxes = result.boxes # Get the boxes for the first result
|
|
259
|
-
>>> masks = result.masks # Get the masks for the first result
|
|
260
|
-
|
|
261
249
|
Notes:
|
|
262
250
|
For the default pose model, keypoint indices for human body pose estimation are:
|
|
263
251
|
0: Nose, 1: Left Eye, 2: Right Eye, 3: Left Ear, 4: Right Ear
|
|
@@ -872,19 +860,6 @@ class Boxes(BaseTensor):
|
|
|
872
860
|
boxes (torch.Tensor | np.ndarray): A tensor or numpy array with detection boxes of shape (num_boxes, 6) or
|
|
873
861
|
(num_boxes, 7). Columns should contain [x1, y1, x2, y2, (optional) track_id, confidence, class].
|
|
874
862
|
orig_shape (tuple[int, int]): The original image shape as (height, width). Used for normalization.
|
|
875
|
-
|
|
876
|
-
Attributes:
|
|
877
|
-
data (torch.Tensor): The raw tensor containing detection boxes and their associated data.
|
|
878
|
-
orig_shape (tuple[int, int]): The original image size, used for normalization.
|
|
879
|
-
is_track (bool): Indicates whether tracking IDs are included in the box data.
|
|
880
|
-
|
|
881
|
-
Examples:
|
|
882
|
-
>>> import torch
|
|
883
|
-
>>> boxes = torch.tensor([[100, 50, 150, 100, 0.9, 0]])
|
|
884
|
-
>>> orig_shape = (480, 640)
|
|
885
|
-
>>> detection_boxes = Boxes(boxes, orig_shape)
|
|
886
|
-
>>> print(detection_boxes.xyxy)
|
|
887
|
-
tensor([[100., 50., 150., 100.]])
|
|
888
863
|
"""
|
|
889
864
|
if boxes.ndim == 1:
|
|
890
865
|
boxes = boxes[None, :]
|
|
@@ -1065,13 +1040,6 @@ class Masks(BaseTensor):
|
|
|
1065
1040
|
Args:
|
|
1066
1041
|
masks (torch.Tensor | np.ndarray): Detection masks with shape (num_masks, height, width).
|
|
1067
1042
|
orig_shape (tuple): The original image shape as (height, width). Used for normalization.
|
|
1068
|
-
|
|
1069
|
-
Examples:
|
|
1070
|
-
>>> import torch
|
|
1071
|
-
>>> from ultralytics.engine.results import Masks
|
|
1072
|
-
>>> masks = torch.rand(10, 160, 160) # 10 masks of 160x160 resolution
|
|
1073
|
-
>>> orig_shape = (720, 1280) # Original image shape
|
|
1074
|
-
>>> mask_obj = Masks(masks, orig_shape)
|
|
1075
1043
|
"""
|
|
1076
1044
|
if masks.ndim == 2:
|
|
1077
1045
|
masks = masks[None, :]
|
|
@@ -1168,11 +1136,6 @@ class Keypoints(BaseTensor):
|
|
|
1168
1136
|
- (num_objects, num_keypoints, 2) for x, y coordinates only
|
|
1169
1137
|
- (num_objects, num_keypoints, 3) for x, y coordinates and confidence scores
|
|
1170
1138
|
orig_shape (tuple[int, int]): The original image dimensions (height, width).
|
|
1171
|
-
|
|
1172
|
-
Examples:
|
|
1173
|
-
>>> kpts = torch.rand(1, 17, 3) # 1 object, 17 keypoints (COCO format), x,y,conf
|
|
1174
|
-
>>> orig_shape = (720, 1280) # Original image height, width
|
|
1175
|
-
>>> keypoints = Keypoints(kpts, orig_shape)
|
|
1176
1139
|
"""
|
|
1177
1140
|
if keypoints.ndim == 2:
|
|
1178
1141
|
keypoints = keypoints[None, :]
|
|
@@ -1283,24 +1246,6 @@ class Probs(BaseTensor):
|
|
|
1283
1246
|
probs (torch.Tensor | np.ndarray): A 1D tensor or array of classification probabilities.
|
|
1284
1247
|
orig_shape (tuple | None): The original image shape as (height, width). Not used in this class but kept for
|
|
1285
1248
|
consistency with other result classes.
|
|
1286
|
-
|
|
1287
|
-
Attributes:
|
|
1288
|
-
data (torch.Tensor | np.ndarray): The raw tensor or array containing classification probabilities.
|
|
1289
|
-
top1 (int): Index of the top 1 class.
|
|
1290
|
-
top5 (list[int]): Indices of the top 5 classes.
|
|
1291
|
-
top1conf (torch.Tensor | np.ndarray): Confidence of the top 1 class.
|
|
1292
|
-
top5conf (torch.Tensor | np.ndarray): Confidences of the top 5 classes.
|
|
1293
|
-
|
|
1294
|
-
Examples:
|
|
1295
|
-
>>> import torch
|
|
1296
|
-
>>> probs = torch.tensor([0.1, 0.3, 0.2, 0.4])
|
|
1297
|
-
>>> p = Probs(probs)
|
|
1298
|
-
>>> print(p.top1)
|
|
1299
|
-
3
|
|
1300
|
-
>>> print(p.top1conf)
|
|
1301
|
-
tensor(0.4000)
|
|
1302
|
-
>>> print(p.top5)
|
|
1303
|
-
[3, 1, 2, 0]
|
|
1304
1249
|
"""
|
|
1305
1250
|
super().__init__(probs, orig_shape)
|
|
1306
1251
|
|
|
@@ -1419,20 +1364,8 @@ class OBB(BaseTensor):
|
|
|
1419
1364
|
the third last column contains track IDs, and the fifth column contains rotation.
|
|
1420
1365
|
orig_shape (tuple[int, int]): Original image size, in the format (height, width).
|
|
1421
1366
|
|
|
1422
|
-
Attributes:
|
|
1423
|
-
data (torch.Tensor | np.ndarray): The raw OBB tensor.
|
|
1424
|
-
orig_shape (tuple[int, int]): The original image shape.
|
|
1425
|
-
is_track (bool): Whether the boxes include tracking IDs.
|
|
1426
|
-
|
|
1427
1367
|
Raises:
|
|
1428
1368
|
AssertionError: If the number of values per box is not 7 or 8.
|
|
1429
|
-
|
|
1430
|
-
Examples:
|
|
1431
|
-
>>> import torch
|
|
1432
|
-
>>> boxes = torch.rand(3, 7) # 3 boxes with 7 values each
|
|
1433
|
-
>>> orig_shape = (640, 480)
|
|
1434
|
-
>>> obb = OBB(boxes, orig_shape)
|
|
1435
|
-
>>> print(obb.xywhr) # Access the boxes in xywhr format
|
|
1436
1369
|
"""
|
|
1437
1370
|
if boxes.ndim == 1:
|
|
1438
1371
|
boxes = boxes[None, :]
|
ultralytics/models/sam/model.py
CHANGED
|
@@ -55,10 +55,6 @@ class SAM(Model):
|
|
|
55
55
|
|
|
56
56
|
Raises:
|
|
57
57
|
NotImplementedError: If the model file extension is not .pt or .pth.
|
|
58
|
-
|
|
59
|
-
Examples:
|
|
60
|
-
>>> sam = SAM("sam_b.pt")
|
|
61
|
-
>>> print(sam.is_sam2)
|
|
62
58
|
"""
|
|
63
59
|
if model and Path(model).suffix not in {".pt", ".pth"}:
|
|
64
60
|
raise NotImplementedError("SAM prediction requires pre-trained *.pt or *.pth model.")
|