ultralytics 8.2.23__py3-none-any.whl → 8.2.24__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.
Potentially problematic release.
This version of ultralytics might be problematic. Click here for more details.
- tests/test_exports.py +1 -3
- tests/test_python.py +6 -1
- ultralytics/__init__.py +7 -4
- ultralytics/data/explorer/explorer.py +2 -5
- ultralytics/data/explorer/gui/dash.py +4 -5
- ultralytics/models/__init__.py +3 -1
- ultralytics/utils/__init__.py +2 -21
- ultralytics/utils/checks.py +1 -3
- {ultralytics-8.2.23.dist-info → ultralytics-8.2.24.dist-info}/METADATA +1 -1
- {ultralytics-8.2.23.dist-info → ultralytics-8.2.24.dist-info}/RECORD +14 -14
- {ultralytics-8.2.23.dist-info → ultralytics-8.2.24.dist-info}/LICENSE +0 -0
- {ultralytics-8.2.23.dist-info → ultralytics-8.2.24.dist-info}/WHEEL +0 -0
- {ultralytics-8.2.23.dist-info → ultralytics-8.2.24.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.2.23.dist-info → ultralytics-8.2.24.dist-info}/top_level.txt +0 -0
tests/test_exports.py
CHANGED
|
@@ -15,7 +15,6 @@ from ultralytics.utils import (
|
|
|
15
15
|
LINUX,
|
|
16
16
|
MACOS,
|
|
17
17
|
WINDOWS,
|
|
18
|
-
Retry,
|
|
19
18
|
checks,
|
|
20
19
|
)
|
|
21
20
|
from ultralytics.utils.torch_utils import TORCH_1_9, TORCH_1_13
|
|
@@ -69,8 +68,7 @@ def test_export_openvino_matrix(task, dynamic, int8, half, batch):
|
|
|
69
68
|
file = Path(file)
|
|
70
69
|
file = file.rename(file.with_stem(f"{file.stem}-{uuid.uuid4()}"))
|
|
71
70
|
YOLO(file)([SOURCE] * batch, imgsz=64 if dynamic else 32) # exported model inference
|
|
72
|
-
|
|
73
|
-
shutil.rmtree(file)
|
|
71
|
+
shutil.rmtree(file, ignore_errors=True) # retry in case of potential lingering multi-threaded file usage errors
|
|
74
72
|
|
|
75
73
|
|
|
76
74
|
@pytest.mark.slow
|
tests/test_python.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
|
2
2
|
|
|
3
3
|
import contextlib
|
|
4
|
+
import urllib
|
|
4
5
|
from copy import copy
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
|
|
@@ -19,6 +20,7 @@ from ultralytics.utils import (
|
|
|
19
20
|
ASSETS,
|
|
20
21
|
DEFAULT_CFG,
|
|
21
22
|
DEFAULT_CFG_PATH,
|
|
23
|
+
LOGGER,
|
|
22
24
|
ONLINE,
|
|
23
25
|
ROOT,
|
|
24
26
|
WEIGHTS_DIR,
|
|
@@ -136,7 +138,10 @@ def test_youtube():
|
|
|
136
138
|
Note: ConnectionError may occur during this test due to network instability or YouTube server availability.
|
|
137
139
|
"""
|
|
138
140
|
model = YOLO(MODEL)
|
|
139
|
-
|
|
141
|
+
try:
|
|
142
|
+
model.predict("https://youtu.be/G17sBkb38XQ", imgsz=96, save=True)
|
|
143
|
+
except urllib.error.HTTPError as e: # handle 'urllib.error.HTTPError: HTTP Error 429: Too Many Requests'
|
|
144
|
+
LOGGER.warning(f"WARNING: YouTube Test Error: {e}")
|
|
140
145
|
|
|
141
146
|
|
|
142
147
|
@pytest.mark.skipif(not ONLINE, reason="environment is offline")
|
ultralytics/__init__.py
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
|
2
2
|
|
|
3
|
-
__version__ = "8.2.
|
|
3
|
+
__version__ = "8.2.24"
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
|
|
7
|
+
# Set ENV Variables (place before imports)
|
|
8
|
+
os.environ["OMP_NUM_THREADS"] = "1" # reduce CPU utilization during training
|
|
4
9
|
|
|
5
10
|
from ultralytics.data.explorer.explorer import Explorer
|
|
6
|
-
from ultralytics.models import RTDETR, SAM, YOLO, YOLOWorld
|
|
7
|
-
from ultralytics.models.fastsam import FastSAM
|
|
8
|
-
from ultralytics.models.nas import NAS
|
|
11
|
+
from ultralytics.models import NAS, RTDETR, SAM, YOLO, FastSAM, YOLOWorld
|
|
9
12
|
from ultralytics.utils import ASSETS, SETTINGS
|
|
10
13
|
from ultralytics.utils.checks import check_yolo as checks
|
|
11
14
|
from ultralytics.utils.downloads import download
|
|
@@ -64,7 +64,7 @@ class Explorer:
|
|
|
64
64
|
import lancedb
|
|
65
65
|
|
|
66
66
|
self.connection = lancedb.connect(uri)
|
|
67
|
-
self.table_name = Path(data).name.lower()
|
|
67
|
+
self.table_name = f"{Path(data).name.lower()}_{model.lower()}"
|
|
68
68
|
self.sim_idx_base_name = (
|
|
69
69
|
f"{self.table_name}_sim_idx".lower()
|
|
70
70
|
) # Use this name and append thres and top_k to reuse the table
|
|
@@ -268,10 +268,7 @@ class Explorer:
|
|
|
268
268
|
similar = exp.get_similar(img='https://ultralytics.com/images/zidane.jpg')
|
|
269
269
|
```
|
|
270
270
|
"""
|
|
271
|
-
assert return_type in {
|
|
272
|
-
"pandas",
|
|
273
|
-
"arrow",
|
|
274
|
-
}, f"Return type should be either `pandas` or `arrow`, but got {return_type}"
|
|
271
|
+
assert return_type in {"pandas", "arrow"}, f"Return type should be `pandas` or `arrow`, but got {return_type}"
|
|
275
272
|
img = self._check_imgs_or_idxs(img, idx)
|
|
276
273
|
similar = self.query(img, limit=limit)
|
|
277
274
|
|
|
@@ -197,12 +197,11 @@ def layout():
|
|
|
197
197
|
imgs = []
|
|
198
198
|
if st.session_state.get("error"):
|
|
199
199
|
st.error(st.session_state["error"])
|
|
200
|
+
elif st.session_state.get("imgs"):
|
|
201
|
+
imgs = st.session_state.get("imgs")
|
|
200
202
|
else:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
else:
|
|
204
|
-
imgs = exp.table.to_lance().to_table(columns=["im_file"]).to_pydict()["im_file"]
|
|
205
|
-
st.session_state["res"] = exp.table.to_arrow()
|
|
203
|
+
imgs = exp.table.to_lance().to_table(columns=["im_file"]).to_pydict()["im_file"]
|
|
204
|
+
st.session_state["res"] = exp.table.to_arrow()
|
|
206
205
|
total_imgs, selected_imgs = len(imgs), []
|
|
207
206
|
with col1:
|
|
208
207
|
subcol1, subcol2, subcol3, subcol4, subcol5 = st.columns(5)
|
ultralytics/models/__init__.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
|
2
2
|
|
|
3
|
+
from .fastsam import FastSAM
|
|
4
|
+
from .nas import NAS
|
|
3
5
|
from .rtdetr import RTDETR
|
|
4
6
|
from .sam import SAM
|
|
5
7
|
from .yolo import YOLO, YOLOWorld
|
|
6
8
|
|
|
7
|
-
__all__ = "YOLO", "RTDETR", "SAM", "YOLOWorld" # allow simpler import
|
|
9
|
+
__all__ = "YOLO", "RTDETR", "SAM", "FastSAM", "NAS", "YOLOWorld" # allow simpler import
|
ultralytics/utils/__init__.py
CHANGED
|
@@ -806,8 +806,8 @@ class Retry(contextlib.ContextDecorator):
|
|
|
806
806
|
"""
|
|
807
807
|
Retry class for function execution with exponential backoff.
|
|
808
808
|
|
|
809
|
-
Can be used as a decorator
|
|
810
|
-
|
|
809
|
+
Can be used as a decorator to retry a function on exceptions, up to a specified number of times with an
|
|
810
|
+
exponentially increasing delay between retries.
|
|
811
811
|
|
|
812
812
|
Examples:
|
|
813
813
|
Example usage as a decorator:
|
|
@@ -815,11 +815,6 @@ class Retry(contextlib.ContextDecorator):
|
|
|
815
815
|
>>> def test_func():
|
|
816
816
|
>>> # Replace with function logic that may raise exceptions
|
|
817
817
|
>>> return True
|
|
818
|
-
|
|
819
|
-
Example usage as a context manager:
|
|
820
|
-
>>> with Retry(times=3, delay=2):
|
|
821
|
-
>>> # Replace with code block that may raise exceptions
|
|
822
|
-
>>> pass
|
|
823
818
|
"""
|
|
824
819
|
|
|
825
820
|
def __init__(self, times=3, delay=2):
|
|
@@ -846,20 +841,6 @@ class Retry(contextlib.ContextDecorator):
|
|
|
846
841
|
|
|
847
842
|
return wrapped_func
|
|
848
843
|
|
|
849
|
-
def __enter__(self):
|
|
850
|
-
"""Enter the runtime context related to this object."""
|
|
851
|
-
self._attempts = 0
|
|
852
|
-
|
|
853
|
-
def __exit__(self, exc_type, exc_value, traceback):
|
|
854
|
-
"""Exit the runtime context related to this object with exponential backoff."""
|
|
855
|
-
if exc_type is not None:
|
|
856
|
-
self._attempts += 1
|
|
857
|
-
if self._attempts < self.times:
|
|
858
|
-
print(f"Retry {self._attempts}/{self.times} failed: {exc_value}")
|
|
859
|
-
time.sleep(self.delay * (2**self._attempts)) # exponential backoff delay
|
|
860
|
-
return True # Suppresses the exception and retries
|
|
861
|
-
return False # Re-raises the exception if retries are exhausted
|
|
862
|
-
|
|
863
844
|
|
|
864
845
|
def threaded(func):
|
|
865
846
|
"""
|
ultralytics/utils/checks.py
CHANGED
|
@@ -33,7 +33,6 @@ from ultralytics.utils import (
|
|
|
33
33
|
ROOT,
|
|
34
34
|
TORCHVISION_VERSION,
|
|
35
35
|
USER_CONFIG_DIR,
|
|
36
|
-
Retry,
|
|
37
36
|
SimpleNamespace,
|
|
38
37
|
ThreadingLocked,
|
|
39
38
|
TryExcept,
|
|
@@ -390,8 +389,7 @@ def check_requirements(requirements=ROOT.parent / "requirements.txt", exclude=()
|
|
|
390
389
|
try:
|
|
391
390
|
t = time.time()
|
|
392
391
|
assert ONLINE, "AutoUpdate skipped (offline)"
|
|
393
|
-
|
|
394
|
-
LOGGER.info(subprocess.check_output(f"pip install --no-cache-dir {s} {cmds}", shell=True).decode())
|
|
392
|
+
LOGGER.info(subprocess.check_output(f"pip install --no-cache-dir {s} {cmds}", shell=True).decode())
|
|
395
393
|
dt = time.time() - t
|
|
396
394
|
LOGGER.info(
|
|
397
395
|
f"{prefix} AutoUpdate success ✅ {dt:.1f}s, installed {n} package{'s' * (n > 1)}: {pkgs}\n"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ultralytics
|
|
3
|
-
Version: 8.2.
|
|
3
|
+
Version: 8.2.24
|
|
4
4
|
Summary: Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
|
5
5
|
Author: Glenn Jocher, Ayush Chaurasia, Jing Qiu
|
|
6
6
|
Maintainer: Glenn Jocher, Ayush Chaurasia, Jing Qiu
|
|
@@ -4,10 +4,10 @@ tests/test_cli.py,sha256=VPvaVO8POqA9RiG3doO_WpK3VwloSp7qvhCXbeiC10k,4865
|
|
|
4
4
|
tests/test_cuda.py,sha256=m2OS06a9aiYs60vK58gpOPiIpCnggNhhgeiJwbAKFQY,4798
|
|
5
5
|
tests/test_engine.py,sha256=fFzcbqZuMkzZHjA5FMddWcqVE703iq8HB_a0Q2lcBKM,4705
|
|
6
6
|
tests/test_explorer.py,sha256=r1pWer2y290Y0DqsM-La7egfEY0497YCdC4rwq3URV4,2178
|
|
7
|
-
tests/test_exports.py,sha256=
|
|
7
|
+
tests/test_exports.py,sha256=eIxlaXGlGAuxPUBO5ELqnub9iS8SCz_ZK9R1OyVl9GI,6834
|
|
8
8
|
tests/test_integrations.py,sha256=8Ru7GyKV8j44EEc8X9_E7q7aR4CTOIMPuSagXjSGUxw,5847
|
|
9
|
-
tests/test_python.py,sha256=
|
|
10
|
-
ultralytics/__init__.py,sha256=
|
|
9
|
+
tests/test_python.py,sha256=3qV963KPGGnYwSiEG5YcDf6g_ozo3NtQEjDDtH32rV4,20212
|
|
10
|
+
ultralytics/__init__.py,sha256=crXlBfjFF_lc3pjOIf0iPCpyp4ze6rNQZn9cdq-mynU,694
|
|
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=lR6jykSO_0cigsjrqSyFj_8JG_LvYi796viasyWhcfs,21358
|
|
@@ -83,10 +83,10 @@ ultralytics/data/loaders.py,sha256=b6XZVOHO_f5mCz3MFYTmXmL0Op6FQ-D5qJTReEgfCN0,2
|
|
|
83
83
|
ultralytics/data/split_dota.py,sha256=PQdkwwlFtLKhWIrbToshSekXGdgbrbYMN6hM4ujfa7o,10010
|
|
84
84
|
ultralytics/data/utils.py,sha256=zqFg4xaWU--fastZmwvZ3DxGyJQ3i4tVNLuYnqS1xxs,31044
|
|
85
85
|
ultralytics/data/explorer/__init__.py,sha256=-Y3m1ZedepOQUv_KW82zaGxvU_PSHcuwUTFqG9BhAr4,113
|
|
86
|
-
ultralytics/data/explorer/explorer.py,sha256=
|
|
86
|
+
ultralytics/data/explorer/explorer.py,sha256=GqQcHkETxlS0w-lYUnTE_RJ9wPReK7c9XG41-k9FoxE,18668
|
|
87
87
|
ultralytics/data/explorer/utils.py,sha256=EvvukQiQUTBrsZznmMnyEX2EqTuwZo_Geyc8yfi8NIA,7085
|
|
88
88
|
ultralytics/data/explorer/gui/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
|
|
89
|
-
ultralytics/data/explorer/gui/dash.py,sha256=
|
|
89
|
+
ultralytics/data/explorer/gui/dash.py,sha256=3mLrH0h-k_AthlgqVNXOHdlKoqjwNwFlnMYiMPAdL6Q,10059
|
|
90
90
|
ultralytics/engine/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
|
|
91
91
|
ultralytics/engine/exporter.py,sha256=c5Ky8_cElAjPm8y3-2-pJgn0bMGyqivvC2XhFH5gDsY,58222
|
|
92
92
|
ultralytics/engine/model.py,sha256=IE6HE9VIzqO3DscxSLexub0LUR673eiPFrCPCt6ozEE,40103
|
|
@@ -99,7 +99,7 @@ ultralytics/hub/__init__.py,sha256=zXam81eSJ2IkH0CwPy_VhG1XHZem9vs9jR4uG7s-uAY,5
|
|
|
99
99
|
ultralytics/hub/auth.py,sha256=FID58NE6fh7Op_B45QOpWBw1qoBN0ponL16uvyb2dZ8,5399
|
|
100
100
|
ultralytics/hub/session.py,sha256=Oly3bKjLkW08iOm3QoSr6Yy57aLZ4AmAmF6Pp9Y_q5g,15197
|
|
101
101
|
ultralytics/hub/utils.py,sha256=RpFDFp9biUK70Mswzz2o3uEu4xwQxRaStPS19U2gu0g,9721
|
|
102
|
-
ultralytics/models/__init__.py,sha256=
|
|
102
|
+
ultralytics/models/__init__.py,sha256=TT9iLCL_n9Y80dcUq0Fo-p-GRZCSU2vrWXM3CoMwqqE,265
|
|
103
103
|
ultralytics/models/fastsam/__init__.py,sha256=0dt65jZ_5b7Q-mdXN8MSEkgnFRA0FIwlel_LS2RaOlU,254
|
|
104
104
|
ultralytics/models/fastsam/model.py,sha256=c7GGwaa9AXssJFwrcuytFHpPOlgSrS3n0utyf4JSL2o,1055
|
|
105
105
|
ultralytics/models/fastsam/predict.py,sha256=0WHUFrqHUNy1cTNpLKsN0FKqLKCvr7fHU6pp91_QVg0,4121
|
|
@@ -181,10 +181,10 @@ ultralytics/trackers/utils/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7J
|
|
|
181
181
|
ultralytics/trackers/utils/gmc.py,sha256=vwcPA1n5zjPaBGhCDt8ItN7rq_6Sczsjn4gsXJfRylU,13688
|
|
182
182
|
ultralytics/trackers/utils/kalman_filter.py,sha256=0oqhk59NKEiwcJ2FXnw6_sT4bIFC6Wu5IY2B-TGxJKU,15168
|
|
183
183
|
ultralytics/trackers/utils/matching.py,sha256=UxhSGa5pN6WoYwYSBAkkt-O7xMxUR47VuUB6PfVNkb4,5404
|
|
184
|
-
ultralytics/utils/__init__.py,sha256=
|
|
184
|
+
ultralytics/utils/__init__.py,sha256=dlKr7P0h2Ez3Q-WLQ49p0jsjjWkKq3CRkhlCJLGKlMk,38620
|
|
185
185
|
ultralytics/utils/autobatch.py,sha256=ygZ3f2ByIkcujB89ENcTnGWWnAQw5Pbg6nBuShg-5t4,3863
|
|
186
186
|
ultralytics/utils/benchmarks.py,sha256=PlnUqhl2Om7jp7bKICDj9a2ABpJSl31VFI3ESnGdme8,23552
|
|
187
|
-
ultralytics/utils/checks.py,sha256=
|
|
187
|
+
ultralytics/utils/checks.py,sha256=XtUrZvw7_pUcSGAUCOtjqJ5KilZy6IXGHdBxG64WMV0,28172
|
|
188
188
|
ultralytics/utils/dist.py,sha256=3HeNbY2gp7vYhcvVhsrvTrQXpQmgT8tpmnzApf3eQRA,2267
|
|
189
189
|
ultralytics/utils/downloads.py,sha256=cmO2Ev1DV1m_lYgQ2yGDG5xVRIBVS_z9nS_Frec_NeU,21496
|
|
190
190
|
ultralytics/utils/errors.py,sha256=GqP_Jgj_n0paxn8OMhn3DTCgoNkB2WjUcUaqs-M6SQk,816
|
|
@@ -210,9 +210,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=5Z3ua5YBTUS56FH8VQKQG1aaIo9fH8GEyz
|
|
|
210
210
|
ultralytics/utils/callbacks/raytune.py,sha256=ODVYzy-CoM4Uge0zjkh3Hnh9nF2M0vhDrSenXnvcizw,705
|
|
211
211
|
ultralytics/utils/callbacks/tensorboard.py,sha256=Z1veCVcn9THPhdplWuIzwlsW2yF7y-On9IZIk3khM0Y,4135
|
|
212
212
|
ultralytics/utils/callbacks/wb.py,sha256=DViD0KeXH_i3eVT_CLR4bZFs1TMMUZBVBBYIS3aUfp0,6745
|
|
213
|
-
ultralytics-8.2.
|
|
214
|
-
ultralytics-8.2.
|
|
215
|
-
ultralytics-8.2.
|
|
216
|
-
ultralytics-8.2.
|
|
217
|
-
ultralytics-8.2.
|
|
218
|
-
ultralytics-8.2.
|
|
213
|
+
ultralytics-8.2.24.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
214
|
+
ultralytics-8.2.24.dist-info/METADATA,sha256=5e8gmUV6sS7OUtUTA_NxpXV_PEo_FHnO5-GloC_gpO0,41165
|
|
215
|
+
ultralytics-8.2.24.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
216
|
+
ultralytics-8.2.24.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
|
217
|
+
ultralytics-8.2.24.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
|
218
|
+
ultralytics-8.2.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|