ultralytics 8.3.139__py3-none-any.whl → 8.3.140__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.
- tests/test_cuda.py +3 -2
- tests/test_python.py +3 -1
- tests/test_solutions.py +2 -5
- ultralytics/__init__.py +1 -1
- ultralytics/utils/__init__.py +23 -28
- ultralytics/utils/benchmarks.py +1 -0
- ultralytics/utils/checks.py +10 -3
- {ultralytics-8.3.139.dist-info → ultralytics-8.3.140.dist-info}/METADATA +1 -1
- {ultralytics-8.3.139.dist-info → ultralytics-8.3.140.dist-info}/RECORD +13 -13
- {ultralytics-8.3.139.dist-info → ultralytics-8.3.140.dist-info}/WHEEL +0 -0
- {ultralytics-8.3.139.dist-info → ultralytics-8.3.140.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.3.139.dist-info → ultralytics-8.3.140.dist-info}/licenses/LICENSE +0 -0
- {ultralytics-8.3.139.dist-info → ultralytics-8.3.140.dist-info}/top_level.txt +0 -0
tests/test_cuda.py
CHANGED
@@ -41,7 +41,6 @@ def test_amp():
|
|
41
41
|
|
42
42
|
|
43
43
|
@pytest.mark.slow
|
44
|
-
@pytest.mark.skipif(IS_JETSON, reason="Temporary disable ONNX for Jetson")
|
45
44
|
@pytest.mark.skipif(not DEVICES, reason="No CUDA devices available")
|
46
45
|
@pytest.mark.parametrize(
|
47
46
|
"task, dynamic, int8, half, batch, simplify, nms",
|
@@ -50,7 +49,9 @@ def test_amp():
|
|
50
49
|
for task, dynamic, int8, half, batch, simplify, nms in product(
|
51
50
|
TASKS, [True, False], [False], [False], [1, 2], [True, False], [True, False]
|
52
51
|
)
|
53
|
-
if not (
|
52
|
+
if not (
|
53
|
+
(int8 and half) or (task == "classify" and nms) or (task == "obb" and nms and (not TORCH_1_13 or IS_JETSON))
|
54
|
+
)
|
54
55
|
],
|
55
56
|
)
|
56
57
|
def test_export_onnx_matrix(task, dynamic, int8, half, batch, simplify, nms):
|
tests/test_python.py
CHANGED
@@ -204,6 +204,7 @@ def test_val():
|
|
204
204
|
metrics.to_xml()
|
205
205
|
metrics.to_html()
|
206
206
|
metrics.to_json()
|
207
|
+
metrics.to_sql()
|
207
208
|
|
208
209
|
|
209
210
|
def test_train_scratch():
|
@@ -269,7 +270,8 @@ def test_predict_callback_and_setup():
|
|
269
270
|
@pytest.mark.parametrize("model", MODELS)
|
270
271
|
def test_results(model):
|
271
272
|
"""Test YOLO model results processing and output in various formats."""
|
272
|
-
|
273
|
+
temp_s = "https://ultralytics.com/images/boats.jpg" if model == "yolo11n-obb.pt" else SOURCE
|
274
|
+
results = YOLO(WEIGHTS_DIR / model)([temp_s, temp_s], imgsz=160)
|
273
275
|
for r in results:
|
274
276
|
r = r.cpu().numpy()
|
275
277
|
print(r, len(r), r.path) # print numpy attributes
|
tests/test_solutions.py
CHANGED
@@ -12,7 +12,7 @@ import pytest
|
|
12
12
|
|
13
13
|
from tests import MODEL, TMP
|
14
14
|
from ultralytics import solutions
|
15
|
-
from ultralytics.utils import ASSETS_URL, IS_RASPBERRYPI,
|
15
|
+
from ultralytics.utils import ASSETS_URL, IS_RASPBERRYPI, checks
|
16
16
|
from ultralytics.utils.downloads import safe_download
|
17
17
|
|
18
18
|
# Pre-defined arguments values
|
@@ -180,10 +180,7 @@ def process_video(solution, video_path, needs_frame_count=False):
|
|
180
180
|
cap.release()
|
181
181
|
|
182
182
|
|
183
|
-
@pytest.mark.skipif(
|
184
|
-
(LINUX and checks.IS_PYTHON_3_11) or IS_RASPBERRYPI,
|
185
|
-
reason="Disabled for testing due to --slow test errors after YOLOE PR.",
|
186
|
-
)
|
183
|
+
@pytest.mark.skipif(IS_RASPBERRYPI, reason="Disabled for testing due to --slow test errors after YOLOE PR.")
|
187
184
|
@pytest.mark.parametrize("name, solution_class, needs_frame_count, video, kwargs", SOLUTIONS)
|
188
185
|
def test_solution(name, solution_class, needs_frame_count, video, kwargs):
|
189
186
|
"""Test individual Ultralytics solution."""
|
ultralytics/__init__.py
CHANGED
ultralytics/utils/__init__.py
CHANGED
@@ -226,7 +226,7 @@ class DataExportMixin:
|
|
226
226
|
"""
|
227
227
|
import pandas as pd # scope for faster 'import ultralytics'
|
228
228
|
|
229
|
-
return pd.DataFrame(self.summary())
|
229
|
+
return pd.DataFrame(self.summary(normalize=normalize, decimals=decimals))
|
230
230
|
|
231
231
|
def to_csv(self, normalize=False, decimals=5):
|
232
232
|
"""
|
@@ -304,41 +304,36 @@ class DataExportMixin:
|
|
304
304
|
table_name (str, optional): Name of the SQL table. Defaults to "results".
|
305
305
|
db_path (str, optional): SQLite database file path. Defaults to "results.db".
|
306
306
|
"""
|
307
|
-
|
308
|
-
|
307
|
+
df = self.to_df(normalize, decimals)
|
308
|
+
if df.empty or df.columns.empty: # Exit if df is None or has no columns (i.e., no schema)
|
309
309
|
return
|
310
310
|
|
311
311
|
import sqlite3
|
312
312
|
|
313
|
-
df = self.to_df(normalize, decimals)
|
314
|
-
if df.empty:
|
315
|
-
LOGGER.warning("No results to save to SQL. DataFrame is empty.")
|
316
|
-
return
|
317
|
-
|
318
313
|
conn = sqlite3.connect(db_path)
|
319
314
|
cursor = conn.cursor()
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
315
|
+
|
316
|
+
# Dynamically create table schema based on summary to support prediction and validation results export
|
317
|
+
columns = []
|
318
|
+
for col in df.columns:
|
319
|
+
sample_val = df[col].dropna().iloc[0] if not df[col].dropna().empty else ""
|
320
|
+
if isinstance(sample_val, dict):
|
321
|
+
col_type = "TEXT"
|
322
|
+
elif isinstance(sample_val, (float, int)):
|
323
|
+
col_type = "REAL"
|
324
|
+
else:
|
325
|
+
col_type = "TEXT"
|
326
|
+
columns.append(f'"{col}" {col_type}') # Quote column names to handle special characters like hyphens
|
327
|
+
|
328
|
+
# Create table (Drop table from db if it's already exist)
|
329
|
+
cursor.execute(f'DROP TABLE IF EXISTS "{table_name}"')
|
330
|
+
cursor.execute(f'CREATE TABLE "{table_name}" (id INTEGER PRIMARY KEY AUTOINCREMENT, {", ".join(columns)})')
|
330
331
|
|
331
332
|
for _, row in df.iterrows():
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
row.get("confidence"),
|
337
|
-
json.dumps(row.get("box", {})),
|
338
|
-
json.dumps(row.get("segments", {})),
|
339
|
-
json.dumps(row.get("keypoints", {})),
|
340
|
-
),
|
341
|
-
)
|
333
|
+
values = [json.dumps(v) if isinstance(v, dict) else v for v in row]
|
334
|
+
column_names = ", ".join(f'"{col}"' for col in df.columns)
|
335
|
+
placeholders = ", ".join("?" for _ in df.columns)
|
336
|
+
cursor.execute(f'INSERT INTO "{table_name}" ({column_names}) VALUES ({placeholders})', values)
|
342
337
|
|
343
338
|
conn.commit()
|
344
339
|
conn.close()
|
ultralytics/utils/benchmarks.py
CHANGED
ultralytics/utils/checks.py
CHANGED
@@ -165,6 +165,15 @@ def check_imgsz(imgsz, stride=32, min_dim=1, max_dim=2, floor=0):
|
|
165
165
|
return sz
|
166
166
|
|
167
167
|
|
168
|
+
@functools.lru_cache
|
169
|
+
def check_uv():
|
170
|
+
"""Check if uv is installed and can run successfully."""
|
171
|
+
try:
|
172
|
+
return subprocess.run(["uv", "-V"], capture_output=True).returncode == 0
|
173
|
+
except FileNotFoundError:
|
174
|
+
return False
|
175
|
+
|
176
|
+
|
168
177
|
@functools.lru_cache
|
169
178
|
def check_version(
|
170
179
|
current: str = "0.0.0",
|
@@ -401,13 +410,12 @@ def check_requirements(requirements=ROOT.parent / "requirements.txt", exclude=()
|
|
401
410
|
if s:
|
402
411
|
if install and AUTOINSTALL: # check environment variable
|
403
412
|
# Note uv fails on arm64 macOS and Raspberry Pi runners
|
404
|
-
uv = not ARM64 and subprocess.run(["command", "-v", "uv"], capture_output=True, shell=True).returncode == 0
|
405
413
|
n = len(pkgs) # number of packages updates
|
406
414
|
LOGGER.info(f"{prefix} Ultralytics requirement{'s' * (n > 1)} {pkgs} not found, attempting AutoUpdate...")
|
407
415
|
try:
|
408
416
|
t = time.time()
|
409
417
|
assert ONLINE, "AutoUpdate skipped (offline)"
|
410
|
-
LOGGER.info(attempt_install(s, cmds, use_uv=
|
418
|
+
LOGGER.info(attempt_install(s, cmds, use_uv=not ARM64 and check_uv()))
|
411
419
|
dt = time.time() - t
|
412
420
|
LOGGER.info(f"{prefix} AutoUpdate success ✅ {dt:.1f}s")
|
413
421
|
LOGGER.warning(
|
@@ -901,7 +909,6 @@ check_torchvision() # check torch-torchvision compatibility
|
|
901
909
|
|
902
910
|
# Define constants
|
903
911
|
IS_PYTHON_3_8 = PYTHON_VERSION.startswith("3.8")
|
904
|
-
IS_PYTHON_3_11 = PYTHON_VERSION.startswith("3.11")
|
905
912
|
IS_PYTHON_3_12 = PYTHON_VERSION.startswith("3.12")
|
906
913
|
IS_PYTHON_3_13 = PYTHON_VERSION.startswith("3.13")
|
907
914
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.140
|
4
4
|
Summary: Ultralytics YOLO 🚀 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
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,13 +1,13 @@
|
|
1
1
|
tests/__init__.py,sha256=xnMhv3O_DF1YrW4zk__ZywQzAaoTDjPKPoiI1Ktss1w,670
|
2
2
|
tests/conftest.py,sha256=rsIAipRKfrVNoTaJ1LdpYue8AbcJ_fr3d3WIlM_6uXY,2982
|
3
3
|
tests/test_cli.py,sha256=vXUC_EK0fa87JRhHsCOZf7AJQ5_Jm1sL8u-yhmsaQh0,5851
|
4
|
-
tests/test_cuda.py,sha256=
|
4
|
+
tests/test_cuda.py,sha256=k4i-6lrp_hczJjbLk_uJOTfMeZZN5o3Dj9jbPA0TzB4,7912
|
5
5
|
tests/test_engine.py,sha256=aGqZ8P7QO5C_nOa1b4FOyk92Ysdk5WiP-ST310Vyxys,4962
|
6
6
|
tests/test_exports.py,sha256=dhZn86LdbapW15RthQF870LGxDjC1MUZhlGdBgPmgIQ,9716
|
7
7
|
tests/test_integrations.py,sha256=dQteeRsRVuT_p5-T88-7jqT65Zm9iAXkyKg-KQ1_TQ8,6341
|
8
|
-
tests/test_python.py,sha256=
|
9
|
-
tests/test_solutions.py,sha256=
|
10
|
-
ultralytics/__init__.py,sha256=
|
8
|
+
tests/test_python.py,sha256=Zx9OlPN11_D1WSLpi9nPFqORNHNz0lEn6mxVNL2ZHjE,25852
|
9
|
+
tests/test_solutions.py,sha256=7n4CqKj2guj09UFKe4jufrrC16xRBUIjiRAfGDoAMI8,12808
|
10
|
+
ultralytics/__init__.py,sha256=27HzhLPFDZjawOY0VuVN8Sn9RoiF9R4NJj3_CBuiuIs,730
|
11
11
|
ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
|
12
12
|
ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
|
13
13
|
ultralytics/cfg/__init__.py,sha256=mpvLR68Iff4J59zYGhysSl8VwIVVzV_VMOYeVdqnYj4,39544
|
@@ -233,11 +233,11 @@ ultralytics/trackers/utils/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6D
|
|
233
233
|
ultralytics/trackers/utils/gmc.py,sha256=843LlmqWuXdUULBNpxVCZlil-_2QG-UwvscUCFbpGjA,14541
|
234
234
|
ultralytics/trackers/utils/kalman_filter.py,sha256=A0CqOnnaKH6kr0XwuHzyHmIU6aJAjJYxF9jVlNBKZHo,21326
|
235
235
|
ultralytics/trackers/utils/matching.py,sha256=7eIufSdeN7cXuFMjvcfvz0Ldq84m4YKZl5IGxBR8IIo,7169
|
236
|
-
ultralytics/utils/__init__.py,sha256=
|
236
|
+
ultralytics/utils/__init__.py,sha256=7VT2VSCIgDPInuNKO0sy2_3-qUwuCafLG0wF4wAyjBg,59059
|
237
237
|
ultralytics/utils/autobatch.py,sha256=kg05q2qKg74y_Uq2vvr01i3KhLfpVR7sT0IXBt3_kyI,4921
|
238
238
|
ultralytics/utils/autodevice.py,sha256=OKZfTbswg6SlsYGCGMqROkA-451CXGG47oeyC5Q1kFM,7232
|
239
|
-
ultralytics/utils/benchmarks.py,sha256=
|
240
|
-
ultralytics/utils/checks.py,sha256=
|
239
|
+
ultralytics/utils/benchmarks.py,sha256=iqjxD29srcCpimtAhbSidpsjnUlMhNR5S6QGPZyz16I,30287
|
240
|
+
ultralytics/utils/checks.py,sha256=SinI5gY-znVbQ-JXk1JaHIlSp2kuBv92Rv99NWFzOFg,33763
|
241
241
|
ultralytics/utils/dist.py,sha256=aytW0JEkcA5ZTZucV92ot7Bn-apiej8aLk3QNWicjAc,4103
|
242
242
|
ultralytics/utils/downloads.py,sha256=G1nd7c7Gwjf58nZzDVpXDtoFtzhZYbjKBnwbZVMWRG0,22333
|
243
243
|
ultralytics/utils/errors.py,sha256=vY9h2evFSrHnZdHJVVrmm8Zzw4qVDLyo9DeYW5g0dFk,1573
|
@@ -264,9 +264,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=yYUgEgSv6L39sSev6vjwhAWU3DlPDsbSDV
|
|
264
264
|
ultralytics/utils/callbacks/raytune.py,sha256=A8amUGpux7dYES-L1iSeMoMXBySGWCD1aUqT7vcG-pU,1284
|
265
265
|
ultralytics/utils/callbacks/tensorboard.py,sha256=jgYnym3cUQFAgN1GzTyO7l3jINtfAh8zhrllDvnLuVQ,5339
|
266
266
|
ultralytics/utils/callbacks/wb.py,sha256=iDRFXI4IIDm8R5OI89DMTmjs8aHLo1HRCLkOFKdaMG4,7507
|
267
|
-
ultralytics-8.3.
|
268
|
-
ultralytics-8.3.
|
269
|
-
ultralytics-8.3.
|
270
|
-
ultralytics-8.3.
|
271
|
-
ultralytics-8.3.
|
272
|
-
ultralytics-8.3.
|
267
|
+
ultralytics-8.3.140.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
268
|
+
ultralytics-8.3.140.dist-info/METADATA,sha256=ubcLXOXQF7RbhxNBCUSmLJxf6IhihoPeoaBx5LU1r0M,37200
|
269
|
+
ultralytics-8.3.140.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
270
|
+
ultralytics-8.3.140.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
271
|
+
ultralytics-8.3.140.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
272
|
+
ultralytics-8.3.140.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|