ultralytics 8.0.211__py3-none-any.whl → 8.0.213__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.

ultralytics/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ultralytics YOLO 🚀, AGPL-3.0 license
2
2
 
3
- __version__ = '8.0.211'
3
+ __version__ = '8.0.213'
4
4
 
5
5
  from ultralytics.models import RTDETR, SAM, YOLO
6
6
  from ultralytics.models.fastsam import FastSAM
@@ -102,7 +102,7 @@ class Model(nn.Module):
102
102
  """Is model a Triton Server URL string, i.e. <scheme>://<netloc>/<endpoint>/<task_name>"""
103
103
  from urllib.parse import urlsplit
104
104
  url = urlsplit(model)
105
- return url.netloc and url.path and url.scheme in {'http', 'grfc'}
105
+ return url.netloc and url.path and url.scheme in {'http', 'grpc'}
106
106
 
107
107
  @staticmethod
108
108
  def is_hub_model(model):
@@ -509,6 +509,6 @@ class AutoBackend(nn.Module):
509
509
  else:
510
510
  from urllib.parse import urlsplit
511
511
  url = urlsplit(p)
512
- triton = url.netloc and url.path and url.scheme in {'http', 'grfc'}
512
+ triton = url.netloc and url.path and url.scheme in {'http', 'grpc'}
513
513
 
514
514
  return types + [triton]
@@ -225,55 +225,36 @@ def plt_settings(rcparams=None, backend='Agg'):
225
225
 
226
226
 
227
227
  def set_logging(name=LOGGING_NAME, verbose=True):
228
- """Sets up logging for the given name."""
229
- rank = int(os.getenv('RANK', -1)) # rank in world for Multi-GPU trainings
230
- level = logging.INFO if verbose and rank in {-1, 0} else logging.ERROR
231
- logging.config.dictConfig({
232
- 'version': 1,
233
- 'disable_existing_loggers': False,
234
- 'formatters': {
235
- name: {
236
- 'format': '%(message)s'}},
237
- 'handlers': {
238
- name: {
239
- 'class': 'logging.StreamHandler',
240
- 'formatter': name,
241
- 'level': level}},
242
- 'loggers': {
243
- name: {
244
- 'level': level,
245
- 'handlers': [name],
246
- 'propagate': False}}})
228
+ """Sets up logging for the given name with UTF-8 encoding support."""
229
+ level = logging.INFO if verbose and RANK in {-1, 0} else logging.ERROR # rank in world for Multi-GPU trainings
247
230
 
231
+ # Configure the console (stdout) encoding to UTF-8
232
+ if WINDOWS: # for Windows
233
+ sys.stdout.reconfigure(encoding='utf-8')
248
234
 
249
- def emojis(string=''):
250
- """Return platform-dependent emoji-safe version of string."""
251
- return string.encode().decode('ascii', 'ignore') if WINDOWS else string
252
-
235
+ # Create and configure the StreamHandler
236
+ stream_handler = logging.StreamHandler(sys.stdout)
237
+ stream_handler.setFormatter(logging.Formatter('%(message)s'))
238
+ stream_handler.setLevel(level)
253
239
 
254
- class EmojiFilter(logging.Filter):
255
- """
256
- A custom logging filter class for removing emojis in log messages.
257
-
258
- This filter is particularly useful for ensuring compatibility with Windows terminals that may not support the
259
- display of emojis in log messages.
260
- """
261
-
262
- def filter(self, record):
263
- """Filter logs by emoji unicode characters on windows."""
264
- record.msg = emojis(record.msg)
265
- return super().filter(record)
240
+ logger = logging.getLogger(name)
241
+ logger.setLevel(level)
242
+ logger.addHandler(stream_handler)
243
+ logger.propagate = False
244
+ return logger
266
245
 
267
246
 
268
247
  # Set logger
269
- set_logging(LOGGING_NAME, verbose=VERBOSE) # run before defining LOGGER
270
- LOGGER = logging.getLogger(LOGGING_NAME) # define globally (used in train.py, val.py, detect.py, etc.)
271
- if WINDOWS: # emoji-safe logging
272
- LOGGER.addFilter(EmojiFilter())
248
+ LOGGER = set_logging(LOGGING_NAME, verbose=VERBOSE) # define globally (used in train.py, val.py, predict.py, etc.)
273
249
  for logger in 'sentry_sdk', 'urllib3.connectionpool':
274
250
  logging.getLogger(logger).setLevel(logging.CRITICAL)
275
251
 
276
252
 
253
+ def emojis(string=''):
254
+ """Return platform-dependent emoji-safe version of string."""
255
+ return string.encode().decode('ascii', 'ignore') if WINDOWS else string
256
+
257
+
277
258
  class ThreadingLocked:
278
259
  """
279
260
  A decorator class for ensuring thread-safe execution of a function or method. This class can be used as a decorator
@@ -439,7 +439,8 @@ def check_file(file, suffix='', download=True, hard=True):
439
439
  check_suffix(file, suffix) # optional
440
440
  file = str(file).strip() # convert to string and strip spaces
441
441
  file = check_yolov5u_filename(file) # yolov5n -> yolov5nu
442
- if not file or ('://' not in file and Path(file).exists()): # exists ('://' check required in Windows Python<3.10)
442
+ if (not file or ('://' not in file and Path(file).exists()) or # '://' check required in Windows Python<3.10
443
+ file.lower().startswith('grpc://')): # file exists or gRPC Triton images
443
444
  return file
444
445
  elif download and file.lower().startswith(('https://', 'http://', 'rtsp://', 'rtmp://', 'tcp://')): # download
445
446
  url = file # warning: Pathlib turns :// -> :/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ultralytics
3
- Version: 8.0.211
3
+ Version: 8.0.213
4
4
  Summary: Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
5
5
  Home-page: https://github.com/ultralytics/ultralytics
6
6
  Author: Ultralytics
@@ -55,7 +55,7 @@ Requires-Dist: coverage ; extra == 'dev'
55
55
  Requires-Dist: mkdocs-material ; extra == 'dev'
56
56
  Requires-Dist: mkdocstrings[python] ; extra == 'dev'
57
57
  Requires-Dist: mkdocs-redirects ; extra == 'dev'
58
- Requires-Dist: mkdocs-ultralytics-plugin >=0.0.32 ; extra == 'dev'
58
+ Requires-Dist: mkdocs-ultralytics-plugin >=0.0.34 ; extra == 'dev'
59
59
  Provides-Extra: export
60
60
  Requires-Dist: coremltools >=7.0 ; extra == 'export'
61
61
  Requires-Dist: openvino-dev >=2023.0 ; extra == 'export'
@@ -68,7 +68,7 @@ Requires-Dist: tensorflowjs ; extra == 'export'
68
68
  <img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/im/banner-yolo-vision-2023.png"></a>
69
69
  </p>
70
70
 
71
- [中文](https://docs.ultralytics.com/zh/) | [한국어](https://docs.ultralytics.com/ko/) | [日本語](https://docs.ultralytics.com/ja/) | [Русский](https://docs.ultralytics.com/ru/) | [Deutsch](https://docs.ultralytics.com/de/) | [Français](https://docs.ultralytics.com/fr/) | [Español](https://docs.ultralytics.com/es/) | [Português](https://docs.ultralytics.com/pt/)
71
+ [中文](https://docs.ultralytics.com/zh/) | [한국어](https://docs.ultralytics.com/ko/) | [日本語](https://docs.ultralytics.com/ja/) | [Русский](https://docs.ultralytics.com/ru/) | [Deutsch](https://docs.ultralytics.com/de/) | [Français](https://docs.ultralytics.com/fr/) | [Español](https://docs.ultralytics.com/es/) | [Português](https://docs.ultralytics.com/pt/) | [हिन्दी](https://docs.ultralytics.com/hi/) | [العربية](https://docs.ultralytics.com/ar/)
72
72
  <br>
73
73
 
74
74
  <div>
@@ -108,7 +108,7 @@ To request an Enterprise License please complete the form at [Ultralytics Licens
108
108
  </div>
109
109
  </div>
110
110
 
111
- ## Documentation
111
+ ## <div align="center">Documentation</div>
112
112
 
113
113
  See below for a quickstart installation and usage example, and see the [YOLOv8 Docs](https://docs.ultralytics.com) for full documentation on training, validation, prediction and deployment.
114
114
 
@@ -162,7 +162,7 @@ See YOLOv8 [Python Docs](https://docs.ultralytics.com/usage/python) for more exa
162
162
 
163
163
  </details>
164
164
 
165
- ## Models
165
+ ## <div align="center">Models</div>
166
166
 
167
167
  YOLOv8 [Detect](https://docs.ultralytics.com/tasks/detect), [Segment](https://docs.ultralytics.com/tasks/segment) and [Pose](https://docs.ultralytics.com/tasks/pose) models pretrained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco) dataset are available here, as well as YOLOv8 [Classify](https://docs.ultralytics.com/tasks/classify) models pretrained on the [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet) dataset. [Track](https://docs.ultralytics.com/modes/track) mode is available for all Detect, Segment and Pose models.
168
168
 
@@ -267,7 +267,7 @@ See [Classification Docs](https://docs.ultralytics.com/tasks/classify/) for usag
267
267
 
268
268
  </details>
269
269
 
270
- ## Integrations
270
+ ## <div align="center">Integrations</div>
271
271
 
272
272
  Our key integrations with leading AI platforms extend the functionality of Ultralytics' offerings, enhancing tasks like dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration with [Roboflow](https://roboflow.com/?ref=ultralytics), ClearML, [Comet](https://bit.ly/yolov8-readme-comet), Neural Magic and [OpenVINO](https://docs.ultralytics.com/integrations/openvino), can optimize your AI workflow.
273
273
 
@@ -295,14 +295,14 @@ Our key integrations with leading AI platforms extend the functionality of Ultra
295
295
  | :--------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------: |
296
296
  | Label and export your custom datasets directly to YOLOv8 for training with [Roboflow](https://roboflow.com/?ref=ultralytics) | Automatically track, visualize and even remotely train YOLOv8 using [ClearML](https://cutt.ly/yolov5-readme-clearml) (open-source!) | Free forever, [Comet](https://bit.ly/yolov8-readme-comet) lets you save YOLOv8 models, resume training, and interactively visualize and debug predictions | Run YOLOv8 inference up to 6x faster with [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic) |
297
297
 
298
- ## Ultralytics HUB
298
+ ## <div align="center">Ultralytics HUB</div>
299
299
 
300
300
  Experience seamless AI with [Ultralytics HUB](https://bit.ly/ultralytics_hub) ⭐, the all-in-one solution for data visualization, YOLOv5 and YOLOv8 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly [Ultralytics App](https://ultralytics.com/app_install). Start your journey for **Free** now!
301
301
 
302
302
  <a href="https://bit.ly/ultralytics_hub" target="_blank">
303
303
  <img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/ultralytics-hub.png" alt="Ultralytics HUB preview image"></a>
304
304
 
305
- ## Contribute
305
+ ## <div align="center">Contribute</div>
306
306
 
307
307
  We love your input! YOLOv5 and YOLOv8 would not be possible without help from our community. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started, and fill out our [Survey](https://ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) to send us feedback on your experience. Thank you 🙏 to all our contributors!
308
308
 
@@ -311,14 +311,14 @@ We love your input! YOLOv5 and YOLOv8 would not be possible without help from ou
311
311
  <a href="https://github.com/ultralytics/yolov5/graphs/contributors">
312
312
  <img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/image-contributors.png"></a>
313
313
 
314
- ## License
314
+ ## <div align="center">License</div>
315
315
 
316
316
  Ultralytics offers two licensing options to accommodate diverse use cases:
317
317
 
318
318
  - **AGPL-3.0 License**: This [OSI-approved](https://opensource.org/licenses/) open-source license is ideal for students and enthusiasts, promoting open collaboration and knowledge sharing. See the [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) file for more details.
319
319
  - **Enterprise License**: Designed for commercial use, this license permits seamless integration of Ultralytics software and AI models into commercial goods and services, bypassing the open-source requirements of AGPL-3.0. If your scenario involves embedding our solutions into a commercial offering, reach out through [Ultralytics Licensing](https://ultralytics.com/license).
320
320
 
321
- ## Contact
321
+ ## <div align="center">Contact</div>
322
322
 
323
323
  For Ultralytics bug reports and feature requests please visit [GitHub Issues](https://github.com/ultralytics/ultralytics/issues), and join our [Discord](https://ultralytics.com/discord) community for questions and discussions!
324
324
 
@@ -1,4 +1,4 @@
1
- ultralytics/__init__.py,sha256=PVNDNtcH0HX7h54T8Mt9462yRI3aVsAWiVt3F3pdbaM,463
1
+ ultralytics/__init__.py,sha256=lIO_wIgsZkAjQaEEN8Ok7Smsd2jqVWruE8eSypU4uvM,463
2
2
  ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
3
3
  ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
4
4
  ultralytics/cfg/__init__.py,sha256=JtWn7Fy8asVXqNGyHDmbJvPUv6tFzzaby_47TFLq3Dg,19681
@@ -51,7 +51,7 @@ ultralytics/data/loaders.py,sha256=N2xprMzNiG1N99D9hcO-P85XaxRZPh-ZLdIjFRTLsY8,2
51
51
  ultralytics/data/utils.py,sha256=2y5m0qrVGKjE1MQe-d3lzufrcoN1qY1dPe_-Oh4Xseo,29602
52
52
  ultralytics/engine/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
53
53
  ultralytics/engine/exporter.py,sha256=uts1Y_IwgL7VkGB034dGVqaA2ceTs4XUlJXK7O23wVc,50142
54
- ultralytics/engine/model.py,sha256=z-K-T1gp4hZbb1Z7MiOiOXYIFZxWeGhiwZMJjNvBbsc,19208
54
+ ultralytics/engine/model.py,sha256=5ZeKRqH49Rl4nfg2AdNxfrw9WtTYiIC3gXfNXrBekSI,19208
55
55
  ultralytics/engine/predictor.py,sha256=0EuFTH7oCrdhz7IfHVi5hKSBr7v26nvCQOPB5f-diok,17013
56
56
  ultralytics/engine/results.py,sha256=b98uVX6QHpQjgMxbWiGOwqDBgbfY0AtY1v5DU3-hVBM,23454
57
57
  ultralytics/engine/trainer.py,sha256=9IxGS3K3QE3pGhEd0JWBijIpHj1MSvRI38KtvyfS2Ck,32553
@@ -110,7 +110,7 @@ ultralytics/models/yolo/segment/predict.py,sha256=yUs60HFBn7PZ3mErtUAnT69ijPBzFd
110
110
  ultralytics/models/yolo/segment/train.py,sha256=o1q4ZTmZlSwUbFIFaT_T7LvYaKOLq_QXxB-z61YwHx8,2276
111
111
  ultralytics/models/yolo/segment/val.py,sha256=DT-z-XnxP77nTIu2VfmGlpUyeBnDmIszT4vpP7mkGNA,11956
112
112
  ultralytics/nn/__init__.py,sha256=7T_GW3YsPg1kA-74UklF2UcabcRyttRZYrCOXiNnJqU,555
113
- ultralytics/nn/autobackend.py,sha256=0nmPIbUrzHtZNUhtDQPX5bNto0_kDR3MhxmMM4nHth0,26981
113
+ ultralytics/nn/autobackend.py,sha256=ozZToMtVilLeOe89UJKsYo9XWlyIrP1XipLss9CZp7I,26981
114
114
  ultralytics/nn/tasks.py,sha256=QOQM_DeLPlrSlzeRS4InJm55g6J9v4adhb1x_ZJEZGM,36513
115
115
  ultralytics/nn/modules/__init__.py,sha256=1jAER_clxQSPQpWGAsUACspOjOzqcLHj8fTvupaATQE,1670
116
116
  ultralytics/nn/modules/block.py,sha256=7xzOCEcNk9xyRQ_bkYCqS1zBRK6v0ed1c-c6E6CUbbI,13030
@@ -127,10 +127,10 @@ ultralytics/trackers/utils/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7J
127
127
  ultralytics/trackers/utils/gmc.py,sha256=H9Td7oLj-RKRsVNUETsMqcedJENV-jG03cCmwK-Tpo4,12366
128
128
  ultralytics/trackers/utils/kalman_filter.py,sha256=PM3I6DkBlS-cDm3kc7L5XD3XSbcGajgRxiqrvUJAIBY,14850
129
129
  ultralytics/trackers/utils/matching.py,sha256=U8tfb8tfOYs_QtHQ-rGT4ZhthUcSAYh6X_LE31olOag,4841
130
- ultralytics/utils/__init__.py,sha256=tIeKKWxmSBl6PRpAH2fnCSluXXa7AvEtbbl_WEOjSA0,33649
130
+ ultralytics/utils/__init__.py,sha256=50bxsW6MuEK8efateM5dKxzYanhp1HpWQgyRdFYHbWU,33050
131
131
  ultralytics/utils/autobatch.py,sha256=mZjJerTi6WTzGq1_0JiU8XNHi70b1psCOAE-feZROgs,3862
132
132
  ultralytics/utils/benchmarks.py,sha256=ct6g9UyfHPi6a7_EuppbTrVeu_ePiCLF7Kib8RZKRgw,18217
133
- ultralytics/utils/checks.py,sha256=tt-gsMIC0Vpo3TaB8-O83tqe6Q5CWPBXPFjEVwxB0RM,26816
133
+ ultralytics/utils/checks.py,sha256=4EWjN9iiEQEbysqv02jEKDC8puvkUtxEKLVe9S6Vrtw,26896
134
134
  ultralytics/utils/dist.py,sha256=egR2Z6Xlg75v72hddTut0q0-BIYvF-YCn_HE7PByuK8,2396
135
135
  ultralytics/utils/downloads.py,sha256=mrU3KI7oKheRMsWqjQbv-X79Ov4vr7k_H5P3L-mw_IE,18198
136
136
  ultralytics/utils/errors.py,sha256=wcNM8Yc0ln4X868kUM6pIsjKT_W67Kez4Vm72Xe-tYo,816
@@ -156,9 +156,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=qIN0gJipB1f3Di7bw0Rb28jLYoCzJSWSqF
156
156
  ultralytics/utils/callbacks/raytune.py,sha256=PGZvW_haVq8Cqha3GgvL7iBMAaxfn8_3u_IIdYCNMPo,608
157
157
  ultralytics/utils/callbacks/tensorboard.py,sha256=AL8geYjG2NBBn4U1iHbmwF1rHDsNhVBeAmXo1tSLVgM,2830
158
158
  ultralytics/utils/callbacks/wb.py,sha256=x_j4ZH4Klp0_Ld13f0UezFluUTS5Ovfgk9hcjwqeruU,6762
159
- ultralytics-8.0.211.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
160
- ultralytics-8.0.211.dist-info/METADATA,sha256=JHOP0rAnse3jdNSlu_KChBrvUfvz09xdMPcC87PDITs,31326
161
- ultralytics-8.0.211.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
162
- ultralytics-8.0.211.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
163
- ultralytics-8.0.211.dist-info/top_level.txt,sha256=iXnUQZuWnkCwh3InMTwthfgww_zJjOjq1Cg9CoWen_0,762
164
- ultralytics-8.0.211.dist-info/RECORD,,
159
+ ultralytics-8.0.213.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
160
+ ultralytics-8.0.213.dist-info/METADATA,sha256=BFB59FmtTijYK6A0HAAcyfdbYp2WGgbS2kj4Ll8qreQ,31618
161
+ ultralytics-8.0.213.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
162
+ ultralytics-8.0.213.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
163
+ ultralytics-8.0.213.dist-info/top_level.txt,sha256=iXnUQZuWnkCwh3InMTwthfgww_zJjOjq1Cg9CoWen_0,762
164
+ ultralytics-8.0.213.dist-info/RECORD,,