dgenerate-ultralytics-headless 8.3.187__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.
- {dgenerate_ultralytics_headless-8.3.187.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/METADATA +3 -2
- {dgenerate_ultralytics_headless-8.3.187.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/RECORD +38 -37
- ultralytics/__init__.py +1 -1
- ultralytics/data/utils.py +2 -2
- ultralytics/engine/exporter.py +9 -6
- ultralytics/engine/predictor.py +1 -1
- ultralytics/engine/results.py +5 -5
- ultralytics/engine/trainer.py +2 -0
- ultralytics/engine/validator.py +3 -1
- ultralytics/hub/__init__.py +6 -2
- ultralytics/hub/auth.py +2 -2
- ultralytics/hub/google/__init__.py +2 -2
- ultralytics/hub/session.py +3 -5
- ultralytics/hub/utils.py +5 -5
- ultralytics/models/rtdetr/val.py +3 -1
- ultralytics/models/yolo/detect/predict.py +2 -2
- ultralytics/models/yolo/detect/val.py +15 -4
- ultralytics/models/yolo/obb/val.py +5 -2
- ultralytics/models/yolo/segment/val.py +0 -3
- ultralytics/nn/autobackend.py +29 -36
- ultralytics/nn/modules/__init__.py +3 -3
- ultralytics/nn/modules/head.py +5 -1
- ultralytics/nn/tasks.py +2 -2
- ultralytics/utils/__init__.py +49 -14
- ultralytics/utils/benchmarks.py +12 -6
- ultralytics/utils/callbacks/platform.py +2 -1
- ultralytics/utils/checks.py +3 -3
- ultralytics/utils/downloads.py +46 -40
- ultralytics/utils/logger.py +7 -6
- ultralytics/utils/nms.py +346 -0
- ultralytics/utils/ops.py +80 -249
- ultralytics/utils/tal.py +1 -1
- ultralytics/utils/torch_utils.py +50 -47
- ultralytics/utils/tqdm.py +58 -59
- {dgenerate_ultralytics_headless-8.3.187.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/WHEEL +0 -0
- {dgenerate_ultralytics_headless-8.3.187.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/entry_points.txt +0 -0
- {dgenerate_ultralytics_headless-8.3.187.dist-info → dgenerate_ultralytics_headless-8.3.190.dist-info}/licenses/LICENSE +0 -0
- {dgenerate_ultralytics_headless-8.3.187.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.
|
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>
|
@@ -58,7 +58,8 @@ Requires-Dist: mkdocs-ultralytics-plugin>=0.1.29; extra == "dev"
|
|
58
58
|
Requires-Dist: mkdocs-macros-plugin>=1.0.5; extra == "dev"
|
59
59
|
Provides-Extra: export
|
60
60
|
Requires-Dist: numpy<2.0.0; extra == "export"
|
61
|
-
Requires-Dist: onnx
|
61
|
+
Requires-Dist: onnx>=1.12.0; platform_system != "Darwin" and extra == "export"
|
62
|
+
Requires-Dist: onnx<1.18.0,>=1.12.0; platform_system == "Darwin" and extra == "export"
|
62
63
|
Requires-Dist: coremltools>=8.0; (platform_system != "Windows" and python_version <= "3.13") and extra == "export"
|
63
64
|
Requires-Dist: scikit-learn>=1.3.2; (platform_system != "Windows" and python_version <= "3.13") and extra == "export"
|
64
65
|
Requires-Dist: openvino>=2024.0.0; extra == "export"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
dgenerate_ultralytics_headless-8.3.
|
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=
|
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=
|
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
|
124
|
+
ultralytics/engine/exporter.py,sha256=HmZ2M9XqT9HfJfJxTS3XschAIUH9YXERrM69AIhpRA8,75393
|
125
125
|
ultralytics/engine/model.py,sha256=877u2n0ISz2COOYtEMUqQe0E-HHB4Atb2DuH1XCE98k,53530
|
126
|
-
ultralytics/engine/predictor.py,sha256=
|
127
|
-
ultralytics/engine/results.py,sha256=
|
128
|
-
ultralytics/engine/trainer.py,sha256=
|
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=
|
131
|
-
ultralytics/hub/__init__.py,sha256=
|
132
|
-
ultralytics/hub/auth.py,sha256=
|
133
|
-
ultralytics/hub/session.py,sha256=
|
134
|
-
ultralytics/hub/utils.py,sha256=
|
135
|
-
ultralytics/hub/google/__init__.py,sha256=
|
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
|
@@ -147,7 +147,7 @@ ultralytics/models/rtdetr/__init__.py,sha256=_jEHmOjI_QP_nT3XJXLgYHQ6bXG4EL8Gnvn
|
|
147
147
|
ultralytics/models/rtdetr/model.py,sha256=e2u6kQEYawRXGGO6HbFDE1uyHfsIqvKk4IpVjjYN41k,2182
|
148
148
|
ultralytics/models/rtdetr/predict.py,sha256=Jqorq8OkGgXCCRS8DmeuGQj3XJxEhz97m22p7VxzXTw,4279
|
149
149
|
ultralytics/models/rtdetr/train.py,sha256=6FA3nDEcH1diFQ8Ky0xENp9cOOYATHxU6f42z9npMvs,3766
|
150
|
-
ultralytics/models/rtdetr/val.py,sha256=
|
150
|
+
ultralytics/models/rtdetr/val.py,sha256=8WVwlfSa6V8PQdFJIFp2bmKTZ_kBoLEvnXMLf08BbWI,8913
|
151
151
|
ultralytics/models/sam/__init__.py,sha256=4VtjxrbrSsqBvteaD_CwA4Nj3DdSUG1MknymtWwRMbc,359
|
152
152
|
ultralytics/models/sam/amg.py,sha256=IpcuIfC5KBRiF4sdrsPl1ecWEJy75axo1yG23r5BFsw,11783
|
153
153
|
ultralytics/models/sam/build.py,sha256=J6n-_QOYLa63jldEZmhRe9D3Is_AJE8xyZLUjzfRyTY,12629
|
@@ -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=
|
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=
|
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=
|
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
|
@@ -186,7 +186,7 @@ ultralytics/models/yolo/pose/val.py,sha256=4aOTgor8EcWvLEN5wCbk9I7ILFvb1q8_F1LlH
|
|
186
186
|
ultralytics/models/yolo/segment/__init__.py,sha256=3IThhZ1wlkY9FvmWm9cE-5-ZyE6F1FgzAtQ6jOOFzzw,275
|
187
187
|
ultralytics/models/yolo/segment/predict.py,sha256=qlprQCZn4_bpjpI08U0MU9Q9_1gpHrw_7MXwtXE1l1Y,5377
|
188
188
|
ultralytics/models/yolo/segment/train.py,sha256=XrPkXUiNu1Jvhn8iDew_RaLLjZA3un65rK-QH9mtNIw,3802
|
189
|
-
ultralytics/models/yolo/segment/val.py,sha256=
|
189
|
+
ultralytics/models/yolo/segment/val.py,sha256=GRlHSN75j7M3B5rP5owop5LzG7THIzzCxhNgec3Qi1c,11309
|
190
190
|
ultralytics/models/yolo/world/__init__.py,sha256=nlh8I6t8hMGz_vZg8QSlsUW1R-2eKvn9CGUoPPQEGhA,131
|
191
191
|
ultralytics/models/yolo/world/train.py,sha256=wBKnSC-TvrKWM1Taxqwo13XcwGHwwAXzNYV1tmqcOpc,7845
|
192
192
|
ultralytics/models/yolo/world/train_world.py,sha256=lk9z_INGPSTP_W7Rjh3qrWSmjHaxOJtGngonh1cj2SM,9551
|
@@ -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=
|
200
|
-
ultralytics/nn/tasks.py,sha256=
|
199
|
+
ultralytics/nn/autobackend.py,sha256=Lm14ORPwTTpdsNKECfnp9amjtI4LxE5neelGsiB3f0M,41540
|
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=
|
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=
|
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=
|
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
|
-
ultralytics/utils/benchmarks.py,sha256=
|
243
|
-
ultralytics/utils/checks.py,sha256=
|
242
|
+
ultralytics/utils/benchmarks.py,sha256=wqIdUpYLp3Ac-oWX9bgngqOvmGyUiKuI61KBOcCqR6A,31479
|
243
|
+
ultralytics/utils/checks.py,sha256=hYzs2bK9GC10UMczpiG2YKw2cc3ajH5Y_nOQJVjQVow,34767
|
244
244
|
ultralytics/utils/dist.py,sha256=A9lDGtGefTjSVvVS38w86GOdbtLzNBDZuDGK0MT4PRI,4170
|
245
|
-
ultralytics/utils/downloads.py,sha256=
|
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=
|
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/
|
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=
|
257
|
-
ultralytics/utils/torch_utils.py,sha256=
|
258
|
-
ultralytics/utils/tqdm.py,sha256=
|
257
|
+
ultralytics/utils/tal.py,sha256=K3lPxC3bbduP8ho-toJ9VHnklo5IaGkqogEaQorbrvs,20924
|
258
|
+
ultralytics/utils/torch_utils.py,sha256=PoqnrVRRgnNw2aTxcSrjZ1PvzEg2iR8XKZYIOKVqy0o,39476
|
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=
|
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.
|
274
|
-
dgenerate_ultralytics_headless-8.3.
|
275
|
-
dgenerate_ultralytics_headless-8.3.
|
276
|
-
dgenerate_ultralytics_headless-8.3.
|
277
|
-
dgenerate_ultralytics_headless-8.3.
|
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
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
|
-
|
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(
|
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)
|
ultralytics/engine/exporter.py
CHANGED
@@ -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.
|
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
|
|
@@ -582,9 +584,9 @@ class Exporter:
|
|
582
584
|
@try_export
|
583
585
|
def export_onnx(self, prefix=colorstr("ONNX:")):
|
584
586
|
"""Export YOLO model to ONNX format."""
|
585
|
-
requirements = ["onnx>=1.12.0
|
587
|
+
requirements = ["onnx>=1.12.0"]
|
586
588
|
if self.args.simplify:
|
587
|
-
requirements += ["onnxslim>=0.1.
|
589
|
+
requirements += ["onnxslim>=0.1.65", "onnxruntime" + ("-gpu" if torch.cuda.is_available() else "")]
|
588
590
|
check_requirements(requirements)
|
589
591
|
import onnx # noqa
|
590
592
|
|
@@ -960,9 +962,9 @@ class Exporter:
|
|
960
962
|
"sng4onnx>=1.0.1", # required by 'onnx2tf' package
|
961
963
|
"onnx_graphsurgeon>=0.3.26", # required by 'onnx2tf' package
|
962
964
|
"ai-edge-litert>=1.2.0,<1.4.0", # required by 'onnx2tf' package
|
963
|
-
"onnx>=1.12.0
|
965
|
+
"onnx>=1.12.0",
|
964
966
|
"onnx2tf>=1.26.3",
|
965
|
-
"onnxslim>=0.1.
|
967
|
+
"onnxslim>=0.1.65",
|
966
968
|
"onnxruntime-gpu" if cuda else "onnxruntime",
|
967
969
|
"protobuf>=5",
|
968
970
|
),
|
@@ -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
|
-
|
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
|
ultralytics/engine/predictor.py
CHANGED
@@ -389,7 +389,7 @@ class BasePredictor:
|
|
389
389
|
verbose (bool): Whether to print verbose output.
|
390
390
|
"""
|
391
391
|
self.model = AutoBackend(
|
392
|
-
|
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,
|
ultralytics/engine/results.py
CHANGED
@@ -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
|
-
|
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
|
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
|
|
ultralytics/engine/trainer.py
CHANGED
@@ -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
|
},
|
ultralytics/engine/validator.py
CHANGED
@@ -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
|
-
|
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,
|
ultralytics/hub/__init__.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.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):
|
ultralytics/hub/session.py
CHANGED
@@ -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
|
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
|
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
|
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
|
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)
|
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
|
-
)
|
123
|
+
):
|
124
124
|
"""
|
125
125
|
Make an HTTP request using the 'requests' library, with exponential backoff retries up to a specified timeout.
|
126
126
|
|
ultralytics/models/rtdetr/val.py
CHANGED
@@ -196,7 +196,8 @@ class RTDETRValidator(DetectionValidator):
|
|
196
196
|
with bounding box coordinates, confidence scores, and class predictions.
|
197
197
|
pbatch (Dict[str, Any]): Batch dictionary containing 'imgsz', 'ori_shape', 'ratio_pad', and 'im_file'.
|
198
198
|
"""
|
199
|
-
|
199
|
+
path = Path(pbatch["im_file"])
|
200
|
+
stem = path.stem
|
200
201
|
image_id = int(stem) if stem.isnumeric() else stem
|
201
202
|
box = predn["bboxes"].clone()
|
202
203
|
box[..., [0, 2]] *= pbatch["ori_shape"][1] / self.args.imgsz # native-space pred
|
@@ -207,6 +208,7 @@ class RTDETRValidator(DetectionValidator):
|
|
207
208
|
self.jdict.append(
|
208
209
|
{
|
209
210
|
"image_id": image_id,
|
211
|
+
"file_name": path.name,
|
210
212
|
"category_id": self.class_map[int(c)],
|
211
213
|
"bbox": [round(x, 3) for x in b],
|
212
214
|
"score": round(s, 5),
|
@@ -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 =
|
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 =
|
118
|
+
outputs = nms.non_max_suppression(
|
119
119
|
preds,
|
120
120
|
self.args.conf,
|
121
121
|
self.args.iou,
|
@@ -372,8 +372,18 @@ class DetectionValidator(BaseValidator):
|
|
372
372
|
predn (Dict[str, torch.Tensor]): Predictions dictionary containing 'bboxes', 'conf', and 'cls' keys
|
373
373
|
with bounding box coordinates, confidence scores, and class predictions.
|
374
374
|
pbatch (Dict[str, Any]): Batch dictionary containing 'imgsz', 'ori_shape', 'ratio_pad', and 'im_file'.
|
375
|
-
|
376
|
-
|
375
|
+
|
376
|
+
Examples:
|
377
|
+
>>> result = {
|
378
|
+
... "image_id": 42,
|
379
|
+
... "file_name": "42.jpg",
|
380
|
+
... "category_id": 18,
|
381
|
+
... "bbox": [258.15, 41.29, 348.26, 243.78],
|
382
|
+
... "score": 0.236,
|
383
|
+
... }
|
384
|
+
"""
|
385
|
+
path = Path(pbatch["im_file"])
|
386
|
+
stem = path.stem
|
377
387
|
image_id = int(stem) if stem.isnumeric() else stem
|
378
388
|
box = ops.xyxy2xywh(predn["bboxes"]) # xywh
|
379
389
|
box[:, :2] -= box[:, 2:] / 2 # xy center to top-left corner
|
@@ -381,6 +391,7 @@ class DetectionValidator(BaseValidator):
|
|
381
391
|
self.jdict.append(
|
382
392
|
{
|
383
393
|
"image_id": image_id,
|
394
|
+
"file_name": path.name,
|
384
395
|
"category_id": self.class_map[int(c)],
|
385
396
|
"bbox": [round(x, 3) for x in b],
|
386
397
|
"score": round(s, 5),
|
@@ -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):
|
@@ -176,7 +177,8 @@ class OBBValidator(DetectionValidator):
|
|
176
177
|
(x, y, w, h, angle) and polygon format (x1, y1, x2, y2, x3, y3, x4, y4) before adding them
|
177
178
|
to the JSON dictionary.
|
178
179
|
"""
|
179
|
-
|
180
|
+
path = Path(pbatch["im_file"])
|
181
|
+
stem = path.stem
|
180
182
|
image_id = int(stem) if stem.isnumeric() else stem
|
181
183
|
rbox = predn["bboxes"]
|
182
184
|
poly = ops.xywhr2xyxyxyxy(rbox).view(-1, 8)
|
@@ -184,6 +186,7 @@ class OBBValidator(DetectionValidator):
|
|
184
186
|
self.jdict.append(
|
185
187
|
{
|
186
188
|
"image_id": image_id,
|
189
|
+
"file_name": path.name,
|
187
190
|
"category_id": self.class_map[int(c)],
|
188
191
|
"score": round(s, 5),
|
189
192
|
"rbox": [round(x, 3) for x in r],
|
@@ -279,7 +282,7 @@ class OBBValidator(DetectionValidator):
|
|
279
282
|
b = bbox[:, :5].clone()
|
280
283
|
b[:, :2] += c
|
281
284
|
# 0.3 could get results close to the ones from official merging script, even slightly better.
|
282
|
-
i =
|
285
|
+
i = TorchNMS.fast_nms(b, scores, 0.3, iou_func=batch_probiou)
|
283
286
|
bbox = bbox[i]
|
284
287
|
|
285
288
|
b = ops.xywhr2xyxyxyxy(bbox[:, :5]).view(-1, 8)
|
@@ -217,9 +217,6 @@ class SegmentationValidator(DetectionValidator):
|
|
217
217
|
Args:
|
218
218
|
predn (Dict[str, torch.Tensor]): Predictions containing bboxes, masks, confidence scores, and classes.
|
219
219
|
pbatch (Dict[str, Any]): Batch dictionary containing 'imgsz', 'ori_shape', 'ratio_pad', and 'im_file'.
|
220
|
-
|
221
|
-
Examples:
|
222
|
-
>>> result = {"image_id": 42, "category_id": 18, "bbox": [258.15, 41.29, 348.26, 243.78], "score": 0.236}
|
223
220
|
"""
|
224
221
|
from faster_coco_eval.core.mask import encode # noqa
|
225
222
|
|