ultralytics 8.3.74__py3-none-any.whl → 8.3.75__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/utils.py +2 -2
- ultralytics/engine/exporter.py +8 -5
- ultralytics/utils/callbacks/comet.py +31 -20
- ultralytics/utils/metrics.py +1 -1
- ultralytics/utils/ops.py +1 -1
- ultralytics/utils/torch_utils.py +1 -1
- {ultralytics-8.3.74.dist-info → ultralytics-8.3.75.dist-info}/METADATA +1 -1
- {ultralytics-8.3.74.dist-info → ultralytics-8.3.75.dist-info}/RECORD +13 -13
- {ultralytics-8.3.74.dist-info → ultralytics-8.3.75.dist-info}/LICENSE +0 -0
- {ultralytics-8.3.74.dist-info → ultralytics-8.3.75.dist-info}/WHEEL +0 -0
- {ultralytics-8.3.74.dist-info → ultralytics-8.3.75.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.3.74.dist-info → ultralytics-8.3.75.dist-info}/top_level.txt +0 -0
ultralytics/__init__.py
CHANGED
ultralytics/data/utils.py
CHANGED
@@ -714,8 +714,8 @@ def save_dataset_cache_file(prefix, path, x, version):
|
|
714
714
|
if is_dir_writeable(path.parent):
|
715
715
|
if path.exists():
|
716
716
|
path.unlink() # remove *.cache file if exists
|
717
|
-
|
718
|
-
|
717
|
+
with open(str(path), "wb") as file: # context manager here fixes windows async np.save bug
|
718
|
+
np.save(file, x)
|
719
719
|
LOGGER.info(f"{prefix}New cache created: {path}")
|
720
720
|
else:
|
721
721
|
LOGGER.warning(f"{prefix}WARNING ⚠️ Cache directory {path.parent} is not writeable, cache not saved.")
|
ultralytics/engine/exporter.py
CHANGED
@@ -288,8 +288,10 @@ class Exporter:
|
|
288
288
|
self.args.nms = False
|
289
289
|
self.args.conf = self.args.conf or 0.25 # set conf default value for nms export
|
290
290
|
if edgetpu:
|
291
|
-
if not LINUX:
|
292
|
-
raise SystemError(
|
291
|
+
if ARM64 and not LINUX:
|
292
|
+
raise SystemError(
|
293
|
+
"Edge TPU export only supported on non-aarch64 Linux. See https://coral.ai/docs/edgetpu/compiler"
|
294
|
+
)
|
293
295
|
elif self.args.batch != 1: # see github.com/ultralytics/ultralytics/pull/13420
|
294
296
|
LOGGER.warning("WARNING ⚠️ Edge TPU export requires batch size 1, setting batch=1.")
|
295
297
|
self.args.batch = 1
|
@@ -307,6 +309,9 @@ class Exporter:
|
|
307
309
|
"WARNING ⚠️ INT8 export requires a missing 'data' arg for calibration. "
|
308
310
|
f"Using default 'data={self.args.data}'."
|
309
311
|
)
|
312
|
+
if tfjs:
|
313
|
+
if ARM64 and LINUX:
|
314
|
+
raise SystemError("TensorFlow.js export not supported on ARM64 Linux")
|
310
315
|
|
311
316
|
# Input
|
312
317
|
im = torch.zeros(self.args.batch, 3, *self.imgsz).to(self.device)
|
@@ -986,6 +991,7 @@ class Exporter:
|
|
986
991
|
"tflite_support<=0.4.3" if IS_JETSON else "tflite_support", # fix ImportError 'GLIBCXX_3.4.29'
|
987
992
|
"flatbuffers>=23.5.26,<100", # update old 'flatbuffers' included inside tensorflow package
|
988
993
|
"onnxruntime-gpu" if cuda else "onnxruntime",
|
994
|
+
"protobuf>=5", # tflite_support pins <=4 but >=5 works
|
989
995
|
),
|
990
996
|
cmds="--extra-index-url https://pypi.ngc.nvidia.com", # onnx_graphsurgeon only on NVIDIA
|
991
997
|
)
|
@@ -1127,9 +1133,6 @@ class Exporter:
|
|
1127
1133
|
def export_tfjs(self, prefix=colorstr("TensorFlow.js:")):
|
1128
1134
|
"""YOLO TensorFlow.js export."""
|
1129
1135
|
check_requirements("tensorflowjs")
|
1130
|
-
if ARM64:
|
1131
|
-
# Fix error: `np.object` was a deprecated alias for the builtin `object` when exporting to TF.js on ARM64
|
1132
|
-
check_requirements("numpy==1.23.5")
|
1133
1136
|
import tensorflow as tf
|
1134
1137
|
import tensorflowjs as tfjs # noqa
|
1135
1138
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2
2
|
|
3
|
+
from types import SimpleNamespace
|
4
|
+
|
3
5
|
from ultralytics.utils import LOGGER, RANK, SETTINGS, TESTS_RUNNING, ops
|
4
6
|
from ultralytics.utils.metrics import ClassifyMetrics, DetMetrics, OBBMetrics, PoseMetrics, SegmentMetrics
|
5
7
|
|
@@ -29,9 +31,19 @@ except (ImportError, AssertionError):
|
|
29
31
|
comet_ml = None
|
30
32
|
|
31
33
|
|
32
|
-
def _get_comet_mode():
|
34
|
+
def _get_comet_mode() -> str:
|
33
35
|
"""Returns the mode of comet set in the environment variables, defaults to 'online' if not set."""
|
34
|
-
|
36
|
+
comet_mode = os.getenv("COMET_MODE")
|
37
|
+
if comet_mode is not None:
|
38
|
+
LOGGER.warning(
|
39
|
+
"WARNING ⚠️ The COMET_MODE environment variable is deprecated. "
|
40
|
+
"Please use COMET_START_ONLINE to set the Comet experiment mode. "
|
41
|
+
"To start an offline Comet experiment, use 'export COMET_START_ONLINE=0'. "
|
42
|
+
"If COMET_START_ONLINE is not set or is set to '1', an online Comet experiment will be created."
|
43
|
+
)
|
44
|
+
return comet_mode
|
45
|
+
|
46
|
+
return "online"
|
35
47
|
|
36
48
|
|
37
49
|
def _get_comet_model_name():
|
@@ -65,22 +77,24 @@ def _should_log_image_predictions():
|
|
65
77
|
return os.getenv("COMET_EVAL_LOG_IMAGE_PREDICTIONS", "true").lower() == "true"
|
66
78
|
|
67
79
|
|
68
|
-
def
|
69
|
-
"""
|
70
|
-
|
71
|
-
return comet_ml.OfflineExperiment(project_name=project_name)
|
72
|
-
|
73
|
-
return comet_ml.Experiment(project_name=project_name)
|
74
|
-
|
80
|
+
def _resume_or_create_experiment(args: SimpleNamespace) -> None:
|
81
|
+
"""
|
82
|
+
Resumes CometML experiment or creates a new experiment based on args.
|
75
83
|
|
76
|
-
|
77
|
-
"""
|
84
|
+
Ensures that the experiment object is only created in a single process during distributed training.
|
85
|
+
"""
|
78
86
|
if RANK not in {-1, 0}:
|
79
87
|
return
|
80
|
-
|
88
|
+
|
89
|
+
# Set environment variable (if not set by the user) to configure the Comet experiment's online mode under the hood.
|
90
|
+
# IF COMET_START_ONLINE is set by the user it will override COMET_MODE value.
|
91
|
+
if os.getenv("COMET_START_ONLINE") is None:
|
81
92
|
comet_mode = _get_comet_mode()
|
93
|
+
os.environ["COMET_START_ONLINE"] = "1" if comet_mode != "offline" else "0"
|
94
|
+
|
95
|
+
try:
|
82
96
|
_project_name = os.getenv("COMET_PROJECT_NAME", args.project)
|
83
|
-
experiment =
|
97
|
+
experiment = comet_ml.start(project_name=_project_name)
|
84
98
|
experiment.log_parameters(vars(args))
|
85
99
|
experiment.log_others(
|
86
100
|
{
|
@@ -313,15 +327,12 @@ def _log_model(experiment, trainer):
|
|
313
327
|
|
314
328
|
def on_pretrain_routine_start(trainer):
|
315
329
|
"""Creates or resumes a CometML experiment at the start of a YOLO pre-training routine."""
|
316
|
-
|
317
|
-
is_alive = getattr(experiment, "alive", False)
|
318
|
-
if not experiment or not is_alive:
|
319
|
-
_create_experiment(trainer.args)
|
330
|
+
_resume_or_create_experiment(trainer.args)
|
320
331
|
|
321
332
|
|
322
333
|
def on_train_epoch_end(trainer):
|
323
334
|
"""Log metrics and save batch images at the end of training epochs."""
|
324
|
-
experiment = comet_ml.
|
335
|
+
experiment = comet_ml.get_running_experiment()
|
325
336
|
if not experiment:
|
326
337
|
return
|
327
338
|
|
@@ -334,7 +345,7 @@ def on_train_epoch_end(trainer):
|
|
334
345
|
|
335
346
|
def on_fit_epoch_end(trainer):
|
336
347
|
"""Logs model assets at the end of each epoch."""
|
337
|
-
experiment = comet_ml.
|
348
|
+
experiment = comet_ml.get_running_experiment()
|
338
349
|
if not experiment:
|
339
350
|
return
|
340
351
|
|
@@ -362,7 +373,7 @@ def on_fit_epoch_end(trainer):
|
|
362
373
|
|
363
374
|
def on_train_end(trainer):
|
364
375
|
"""Perform operations at the end of training."""
|
365
|
-
experiment = comet_ml.
|
376
|
+
experiment = comet_ml.get_running_experiment()
|
366
377
|
if not experiment:
|
367
378
|
return
|
368
379
|
|
ultralytics/utils/metrics.py
CHANGED
ultralytics/utils/ops.py
CHANGED
ultralytics/utils/torch_utils.py
CHANGED
@@ -746,7 +746,7 @@ class EarlyStopping:
|
|
746
746
|
if fitness is None: # check if fitness=None (happens when val=False)
|
747
747
|
return False
|
748
748
|
|
749
|
-
if fitness
|
749
|
+
if fitness > self.best_fitness or self.best_fitness == 0: # allow for early zero-fitness stage of training
|
750
750
|
self.best_epoch = epoch
|
751
751
|
self.best_fitness = fitness
|
752
752
|
delta = epoch - self.best_epoch # epochs without improvement
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.75
|
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=T_z_NUS9URQXv83k5XNLHTuksJ8srtzbZnWuiiQWM98,9260
|
|
7
7
|
tests/test_integrations.py,sha256=p3DMnnPMKsV0Qm82JVJUIY1UZ67xRgF9E8AaL76TEHE,6154
|
8
8
|
tests/test_python.py,sha256=tW-EFJC2rjl_DvAa8khXGWYdypseQjrLjGHhe2p9r9A,23238
|
9
9
|
tests/test_solutions.py,sha256=aY0G3vNzXGCENG9FD76MfUp7jgzeESPsUvbvQYBUvH0,4205
|
10
|
-
ultralytics/__init__.py,sha256=
|
10
|
+
ultralytics/__init__.py,sha256=V35DQdcyQzSsLZd4nWJc6HD71QYZmWTkqcv_BkpwpW4,709
|
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=qP44HnFP4QcC5FQz29A-EGTuwdtxXAzPvw_IvCVmiqA,39771
|
@@ -100,9 +100,9 @@ ultralytics/data/converter.py,sha256=89E44LBCpbn5hMF03Kdts6DaTP8Oei5iCra5enFCt5I
|
|
100
100
|
ultralytics/data/dataset.py,sha256=lxtH3JytNu6nsiPAIhe0uGuGGpkZ4ZRqvXM6eJw9rXU,23244
|
101
101
|
ultralytics/data/loaders.py,sha256=JOwXbz-dxgG2bx0_cQHp-olz5FleoCX8EzrUvZ77vvg,28534
|
102
102
|
ultralytics/data/split_dota.py,sha256=YI-i2MqdiBt06W67TJnBXQHJrqTnkJDJ3zzoL0UZVro,10733
|
103
|
-
ultralytics/data/utils.py,sha256=
|
103
|
+
ultralytics/data/utils.py,sha256=5YMU5396oAFPwTy2y0MCU2WipF6Rt-7xNtmHKRCA4fI,33838
|
104
104
|
ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
105
|
-
ultralytics/engine/exporter.py,sha256=
|
105
|
+
ultralytics/engine/exporter.py,sha256=P2kMamiLXaVUCEjYzvHx4xF7WdcnjHyripCCo1poKoA,76864
|
106
106
|
ultralytics/engine/model.py,sha256=8CnLnd_c8Ecey4q2JZFJBbUPOYflr5cgjJnw4sH3Vyo,53382
|
107
107
|
ultralytics/engine/predictor.py,sha256=jiYDAjupOlRUpPvw9tu7or9PjXtLm-YCRiawANtWxj0,17881
|
108
108
|
ultralytics/engine/results.py,sha256=8iHooY3IpBsARBo9LsQJYUfJHlcXk7T7urB3gP6rViU,78120
|
@@ -214,18 +214,18 @@ ultralytics/utils/errors.py,sha256=sXKDEd8ws3L-yIfG_-P_h86axbm37sJNha7kFBJbQMQ,8
|
|
214
214
|
ultralytics/utils/files.py,sha256=c85NRofjGPMcpkV-yUo1Cwk8ZVquBGCEKlzbSVtXkQA,8252
|
215
215
|
ultralytics/utils/instance.py,sha256=z1oyyvz7wnCSUW_bvi0TbgAL0VxJtAWWXV9KWCoyJ_k,16887
|
216
216
|
ultralytics/utils/loss.py,sha256=paRY8K7R4pcUGJfApVzZx-m_iFzzMbHm5GgiaixfDuU,34179
|
217
|
-
ultralytics/utils/metrics.py,sha256=
|
218
|
-
ultralytics/utils/ops.py,sha256=
|
217
|
+
ultralytics/utils/metrics.py,sha256=6RBMTBbTYa-5nRwTPlbPBX8w9xhpqryZ9tjXsvlRmmM,54184
|
218
|
+
ultralytics/utils/ops.py,sha256=izQr5GvgzmaD-GXaqxIjLE525JnvgLetOtuq_EOaxM8,34584
|
219
219
|
ultralytics/utils/patches.py,sha256=ARR89dP4YKq7Dd3g2eU-ukbnc2lo3BELukL_1c_d854,3298
|
220
220
|
ultralytics/utils/plotting.py,sha256=hKji4TyxAmCXdSL264VX6dsC2AZYiL9StShI02dcAOM,62990
|
221
221
|
ultralytics/utils/tal.py,sha256=DO-c006HEI62pcrNRpmt4lpqJPC5yu3veRDOvUuExno,18498
|
222
|
-
ultralytics/utils/torch_utils.py,sha256=
|
222
|
+
ultralytics/utils/torch_utils.py,sha256=AsdLP_MADVY9sq4mF3u4GMCDvx9Z32flQZKmiVy4LcA,33404
|
223
223
|
ultralytics/utils/triton.py,sha256=2L1_rZ8xCJEjexRVj75g9YU-u4tQln_DJ5N1Yr_0bSs,4071
|
224
224
|
ultralytics/utils/tuner.py,sha256=gySDBzTlq_klTOq6CGEyUN58HXzPCulObaMBHacXzHo,6294
|
225
225
|
ultralytics/utils/callbacks/__init__.py,sha256=hzL63Rce6VkZhP4Lcim9LKjadixaQG86nKqPhk7IkS0,242
|
226
226
|
ultralytics/utils/callbacks/base.py,sha256=nbeSPjPCOb0M6FsFQ5-uFxXVzUYwmFyE4wFoA66Jpug,5803
|
227
227
|
ultralytics/utils/callbacks/clearml.py,sha256=JH70T1OLPd9GSvC6HnaKkZHTr8fyE9RRcz3ukL62QPw,5961
|
228
|
-
ultralytics/utils/callbacks/comet.py,sha256=
|
228
|
+
ultralytics/utils/callbacks/comet.py,sha256=RfijX3oKLdI3zXyleATLmkGfaV--3sBU-V-zyX8-TWU,15607
|
229
229
|
ultralytics/utils/callbacks/dvc.py,sha256=4ln4wqU3ZZTK5JfvUmbKfQuIdO6QohDSnFVV4v5Pl8E,5073
|
230
230
|
ultralytics/utils/callbacks/hub.py,sha256=bqU83kBnNZ0U9qjm0I9xvM4DWA0VMxSLxQDgjuTZbKM,3977
|
231
231
|
ultralytics/utils/callbacks/mlflow.py,sha256=3y4xOPLZe1bES0ETWGJYywulTEUGv8I849e2TNms8yI,5420
|
@@ -233,9 +233,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=waZ_bRu0-qBKujTLuqonC2gx2DkgBuVnfq
|
|
233
233
|
ultralytics/utils/callbacks/raytune.py,sha256=A_NVWjyPNf2m6iB-mbW7SMpyqM9QBvpbPa-MCMFMtdk,727
|
234
234
|
ultralytics/utils/callbacks/tensorboard.py,sha256=JHOEVlNQ5dYJPd4Z-EvqbXowuK5uA0p8wPgyyaIUQs0,4194
|
235
235
|
ultralytics/utils/callbacks/wb.py,sha256=ayhT2y62AcSOacnawshATU0rWrlSFQ77mrGgBdRl3W4,7086
|
236
|
-
ultralytics-8.3.
|
237
|
-
ultralytics-8.3.
|
238
|
-
ultralytics-8.3.
|
239
|
-
ultralytics-8.3.
|
240
|
-
ultralytics-8.3.
|
241
|
-
ultralytics-8.3.
|
236
|
+
ultralytics-8.3.75.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
237
|
+
ultralytics-8.3.75.dist-info/METADATA,sha256=7kTsfctoPrVnBtozBr7k4N8h1W8aFqHg-7_CmpIVo4w,35158
|
238
|
+
ultralytics-8.3.75.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
239
|
+
ultralytics-8.3.75.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
240
|
+
ultralytics-8.3.75.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
241
|
+
ultralytics-8.3.75.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|