ultralytics 8.3.128__py3-none-any.whl → 8.3.129__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.
- ultralytics/__init__.py +1 -1
- ultralytics/data/augment.py +3 -6
- ultralytics/nn/autobackend.py +3 -3
- ultralytics/utils/checks.py +5 -5
- ultralytics/utils/export.py +1 -1
- {ultralytics-8.3.128.dist-info → ultralytics-8.3.129.dist-info}/METADATA +1 -1
- {ultralytics-8.3.128.dist-info → ultralytics-8.3.129.dist-info}/RECORD +11 -11
- {ultralytics-8.3.128.dist-info → ultralytics-8.3.129.dist-info}/WHEEL +0 -0
- {ultralytics-8.3.128.dist-info → ultralytics-8.3.129.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.3.128.dist-info → ultralytics-8.3.129.dist-info}/licenses/LICENSE +0 -0
- {ultralytics-8.3.128.dist-info → ultralytics-8.3.129.dist-info}/top_level.txt +0 -0
ultralytics/__init__.py
CHANGED
ultralytics/data/augment.py
CHANGED
@@ -541,18 +541,15 @@ class Mosaic(BaseMixTransform):
|
|
541
541
|
self.imgsz = imgsz
|
542
542
|
self.border = (-imgsz // 2, -imgsz // 2) # width, height
|
543
543
|
self.n = n
|
544
|
+
self.buffer_enabled = self.dataset.cache != "ram"
|
544
545
|
|
545
|
-
def get_indexes(self
|
546
|
+
def get_indexes(self):
|
546
547
|
"""
|
547
548
|
Returns a list of random indexes from the dataset for mosaic augmentation.
|
548
549
|
|
549
550
|
This method selects random image indexes either from a buffer or from the entire dataset, depending on
|
550
551
|
the 'buffer' parameter. It is used to choose images for creating mosaic augmentations.
|
551
552
|
|
552
|
-
Args:
|
553
|
-
buffer (bool): If True, selects images from the dataset buffer. If False, selects from the entire
|
554
|
-
dataset.
|
555
|
-
|
556
553
|
Returns:
|
557
554
|
(List[int]): A list of random image indexes. The length of the list is n-1, where n is the number
|
558
555
|
of images used in the mosaic (either 3 or 8, depending on whether n is 4 or 9).
|
@@ -562,7 +559,7 @@ class Mosaic(BaseMixTransform):
|
|
562
559
|
>>> indexes = mosaic.get_indexes()
|
563
560
|
>>> print(len(indexes)) # Output: 3
|
564
561
|
"""
|
565
|
-
if
|
562
|
+
if self.buffer_enabled: # select images from buffer
|
566
563
|
return random.choices(list(self.dataset.buffer), k=self.n - 1)
|
567
564
|
else: # select any images
|
568
565
|
return [random.randint(0, len(self.dataset) - 1) for _ in range(self.n - 1)]
|
ultralytics/nn/autobackend.py
CHANGED
@@ -311,11 +311,11 @@ class AutoBackend(nn.Module):
|
|
311
311
|
try:
|
312
312
|
meta_len = int.from_bytes(f.read(4), byteorder="little") # read metadata length
|
313
313
|
metadata = json.loads(f.read(meta_len).decode("utf-8")) # read metadata
|
314
|
+
dla = metadata.get("dla", None)
|
315
|
+
if dla is not None:
|
316
|
+
runtime.DLA_core = int(dla)
|
314
317
|
except UnicodeDecodeError:
|
315
318
|
f.seek(0) # engine file may lack embedded Ultralytics metadata
|
316
|
-
dla = metadata.get("dla", None)
|
317
|
-
if dla is not None:
|
318
|
-
runtime.DLA_core = int(dla)
|
319
319
|
model = runtime.deserialize_cuda_engine(f.read()) # read engine
|
320
320
|
|
321
321
|
# Model context
|
ultralytics/utils/checks.py
CHANGED
@@ -507,11 +507,11 @@ def check_model_file_from_stem(model="yolo11n"):
|
|
507
507
|
|
508
508
|
def check_file(file, suffix="", download=True, download_dir=".", hard=True):
|
509
509
|
"""
|
510
|
-
Search/download file (if necessary) and return path.
|
510
|
+
Search/download file (if necessary), check suffix (if provided), and return path.
|
511
511
|
|
512
512
|
Args:
|
513
513
|
file (str): File name or path.
|
514
|
-
suffix (str):
|
514
|
+
suffix (str | Tuple[str]): Acceptable suffix or tuple of suffixes to validate against the file.
|
515
515
|
download (bool): Whether to download the file if it doesn't exist locally.
|
516
516
|
download_dir (str): Directory to download the file to.
|
517
517
|
hard (bool): Whether to raise an error if the file is not found.
|
@@ -550,9 +550,9 @@ def check_yaml(file, suffix=(".yaml", ".yml"), hard=True):
|
|
550
550
|
Search/download YAML file (if necessary) and return path, checking suffix.
|
551
551
|
|
552
552
|
Args:
|
553
|
-
file (str): File name or path.
|
554
|
-
suffix (
|
555
|
-
hard (bool): Whether to raise an error if the file is not found.
|
553
|
+
file (str | Path): File name or path.
|
554
|
+
suffix (Tuple[str]): Tuple of acceptable YAML file suffixes.
|
555
|
+
hard (bool): Whether to raise an error if the file is not found or multiple files are found.
|
556
556
|
|
557
557
|
Returns:
|
558
558
|
(str): Path to the YAML file.
|
ultralytics/utils/export.py
CHANGED
@@ -138,7 +138,7 @@ def export_engine(
|
|
138
138
|
LOGGER.warning(f"{prefix} 'dynamic=True' model requires max batch size, i.e. 'batch=16'")
|
139
139
|
profile = builder.create_optimization_profile()
|
140
140
|
min_shape = (1, shape[1], 32, 32) # minimum input shape
|
141
|
-
max_shape = (*shape[:2], *(int(max(
|
141
|
+
max_shape = (*shape[:2], *(int(max(2, workspace or 2) * d) for d in shape[2:])) # max input shape
|
142
142
|
for inp in inputs:
|
143
143
|
profile.set_shape(inp.name, min=min_shape, opt=shape, max=max_shape)
|
144
144
|
config.add_optimization_profile(profile)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.129
|
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>
|
@@ -7,7 +7,7 @@ tests/test_exports.py,sha256=dhZn86LdbapW15RthQF870LGxDjC1MUZhlGdBgPmgIQ,9716
|
|
7
7
|
tests/test_integrations.py,sha256=dQteeRsRVuT_p5-T88-7jqT65Zm9iAXkyKg-KQ1_TQ8,6341
|
8
8
|
tests/test_python.py,sha256=m3tV3atrc3DvXZ5S-_C1ief_pDo4KlLgudjc7rq26l0,25492
|
9
9
|
tests/test_solutions.py,sha256=IFlqyOUCvGbLe_YZqWmNCe_afg4as0p-SfAv3j7VURI,6205
|
10
|
-
ultralytics/__init__.py,sha256=
|
10
|
+
ultralytics/__init__.py,sha256=_4qVIlYpTWD26kHO3m7mogbYWHEbBryrprY88PxyREg,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=We3ti0mvUQrGRmUPcufDGboW0YAO3nSRYuoWxGagk3M,39462
|
@@ -103,7 +103,7 @@ ultralytics/cfg/trackers/botsort.yaml,sha256=TpRaK5kH_-QbjCQ7ekM4s_7j8I8ti3q8Hs7
|
|
103
103
|
ultralytics/cfg/trackers/bytetrack.yaml,sha256=6u-tiZlk16EqEwkNXaMrza6PAQmWj_ypgv26LGCtPDg,886
|
104
104
|
ultralytics/data/__init__.py,sha256=nAXaL1puCc7z_NjzQNlJnhbVhT9Fla2u7Dsqo7q1dAc,644
|
105
105
|
ultralytics/data/annotator.py,sha256=VEwb11FsEZm75qlEp8XDHFGKW0_rGsEaFDaBVd771Kw,2902
|
106
|
-
ultralytics/data/augment.py,sha256=
|
106
|
+
ultralytics/data/augment.py,sha256=7Md80H36S0X5RiSqCcwynSgGcRwMqnI4YbSw-rkYnlk,129139
|
107
107
|
ultralytics/data/base.py,sha256=bsASjxdkvojkFjas-JfFNSpBjo0GRAbYKDh64Y2hCH4,19015
|
108
108
|
ultralytics/data/build.py,sha256=FVIkgLGv5n1C7SRDrQiKOMDcI7V59WmEihKslzvEISg,9651
|
109
109
|
ultralytics/data/converter.py,sha256=znXH2XTdo0Q4NDHMny1ydVBvrxKn2kbbwI-X5bn1MlQ,26890
|
@@ -192,7 +192,7 @@ ultralytics/models/yolo/yoloe/train.py,sha256=St3zw_XWRol9pODWU4lvKlJnWYr1lmWQNu
|
|
192
192
|
ultralytics/models/yolo/yoloe/train_seg.py,sha256=l0SOMQQd0Y_EBBHhTNekgrQsftqhYyK4oWTdCg1dLrE,4633
|
193
193
|
ultralytics/models/yolo/yoloe/val.py,sha256=oA8cVT3pBXF6aPZy7ITq0mDcktRuIgks8tTtqMRISyY,8431
|
194
194
|
ultralytics/nn/__init__.py,sha256=rjociYD9lo_K-d-1s6TbdWklPLjTcEHk7OIlRDJstIE,615
|
195
|
-
ultralytics/nn/autobackend.py,sha256=
|
195
|
+
ultralytics/nn/autobackend.py,sha256=S5GVyEcDbZgoZXg_neeVU8ZNaJJbwTjgqzbLeMd1ols,39337
|
196
196
|
ultralytics/nn/tasks.py,sha256=0rnM6Z01BUnRtUwCkTwVsPxZ_D3A5tNbBjd7aEoxxns,62943
|
197
197
|
ultralytics/nn/text_model.py,sha256=8_7SRejKZA4Pi-ha0gjcWrQDDCDMBhtwlg8pPMWgjDE,13145
|
198
198
|
ultralytics/nn/modules/__init__.py,sha256=dXLtIk9rt944WfsTdpgEdWOg3HQEHdwQztuZ6WNJygs,3144
|
@@ -236,11 +236,11 @@ ultralytics/utils/__init__.py,sha256=YSBOQcgak2v6l03EHPjkpzH-ZtjVXrg2_4o0BF1cqDQ
|
|
236
236
|
ultralytics/utils/autobatch.py,sha256=kg05q2qKg74y_Uq2vvr01i3KhLfpVR7sT0IXBt3_kyI,4921
|
237
237
|
ultralytics/utils/autodevice.py,sha256=OrLSk34UpW0I5ndxnkQEIWBxL--CvAON_W9Qw51zOGA,7233
|
238
238
|
ultralytics/utils/benchmarks.py,sha256=lDNNnLeLUzmqKrqrqlCOiau-q7A-gcLooZP2dbxCu-U,30214
|
239
|
-
ultralytics/utils/checks.py,sha256=
|
239
|
+
ultralytics/utils/checks.py,sha256=QOVLJJ6FLYojefMEnWl8GD0u9-01idYF4NyXR3BX9sc,32854
|
240
240
|
ultralytics/utils/dist.py,sha256=aytW0JEkcA5ZTZucV92ot7Bn-apiej8aLk3QNWicjAc,4103
|
241
241
|
ultralytics/utils/downloads.py,sha256=Rn8xDwn2bzgBqiYz3Xn0rm3MWjk4T-QUd2Ajlu1EpQ4,22312
|
242
242
|
ultralytics/utils/errors.py,sha256=vY9h2evFSrHnZdHJVVrmm8Zzw4qVDLyo9DeYW5g0dFk,1573
|
243
|
-
ultralytics/utils/export.py,sha256=
|
243
|
+
ultralytics/utils/export.py,sha256=XInnl9AQeik7EuR1492nzDvgDqaV43FlnM5CLamrgd4,8814
|
244
244
|
ultralytics/utils/files.py,sha256=0K4O1cgqRiXaDw7EQK13TqA5SME_RrvfDVQSPetNr5w,8042
|
245
245
|
ultralytics/utils/instance.py,sha256=UOEsXR9V-bXNRk6BTonASBEgeMqvzzAk4S7VdXZJUAM,18090
|
246
246
|
ultralytics/utils/loss.py,sha256=zIDWS_0AOH-yEYLcsfmFRUkApPIZhu2ENsB0UwJYIuw,37607
|
@@ -263,9 +263,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=JaI95Cj2kIjUhlEEOiDN0-Drc-fDelLhNI
|
|
263
263
|
ultralytics/utils/callbacks/raytune.py,sha256=A8amUGpux7dYES-L1iSeMoMXBySGWCD1aUqT7vcG-pU,1284
|
264
264
|
ultralytics/utils/callbacks/tensorboard.py,sha256=jgYnym3cUQFAgN1GzTyO7l3jINtfAh8zhrllDvnLuVQ,5339
|
265
265
|
ultralytics/utils/callbacks/wb.py,sha256=iDRFXI4IIDm8R5OI89DMTmjs8aHLo1HRCLkOFKdaMG4,7507
|
266
|
-
ultralytics-8.3.
|
267
|
-
ultralytics-8.3.
|
268
|
-
ultralytics-8.3.
|
269
|
-
ultralytics-8.3.
|
270
|
-
ultralytics-8.3.
|
271
|
-
ultralytics-8.3.
|
266
|
+
ultralytics-8.3.129.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
267
|
+
ultralytics-8.3.129.dist-info/METADATA,sha256=xdQN3VRwLipjzvY9QN9pfRfM14ipYkSxfP9qYaSbEEQ,37223
|
268
|
+
ultralytics-8.3.129.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
269
|
+
ultralytics-8.3.129.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
270
|
+
ultralytics-8.3.129.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
271
|
+
ultralytics-8.3.129.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|