ultralytics 8.0.231 use new pyproject.toml (#7185)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-12-28 10:04:16 -05:00 committed by GitHub
parent cdb10563d2
commit d02e0aa86b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 187 additions and 257 deletions

View File

@ -107,7 +107,7 @@ jobs:
shell: bash # for Windows compatibility shell: bash # for Windows compatibility
run: | run: |
python -m pip install --upgrade pip wheel python -m pip install --upgrade pip wheel
pip install -e ".[export]" coverage --extra-index-url https://download.pytorch.org/whl/cpu pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
# Fix SavedModel issue "partially initialized module 'jax' has no attribute 'version' (most likely due to a circular import)" in https://github.com/google/jax/discussions/14036 # Fix SavedModel issue "partially initialized module 'jax' has no attribute 'version' (most likely due to a circular import)" in https://github.com/google/jax/discussions/14036
# pip install -U 'jax!=0.4.15' 'jaxlib!=0.4.15' # pip install -U 'jax!=0.4.15' 'jaxlib!=0.4.15'
yolo export format=tflite imgsz=32 || true yolo export format=tflite imgsz=32 || true

View File

@ -36,7 +36,7 @@ jobs:
## Install ## Install
Pip install the `ultralytics` package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). Pip install the `ultralytics` package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/).
```bash ```bash
pip install ultralytics pip install ultralytics

View File

@ -57,12 +57,6 @@ repos:
exclude: 'docs/.*\.md' exclude: 'docs/.*\.md'
# exclude: "README.md|README.zh-CN.md|CONTRIBUTING.md" # exclude: "README.md|README.zh-CN.md|CONTRIBUTING.md"
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
name: PEP8
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
rev: v2.2.6 rev: v2.2.6
hooks: hooks:

View File

@ -1,8 +0,0 @@
include *.md
include requirements.txt
include LICENSE
include setup.py
include ultralytics/assets/bus.jpg
include ultralytics/assets/zidane.jpg
include tests/*.py
recursive-include ultralytics *.yaml

View File

@ -51,7 +51,7 @@ See below for a quickstart installation and usage example, and see the [YOLOv8 D
<details open> <details open>
<summary>Install</summary> <summary>Install</summary>
Pip install the ultralytics package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). Pip install the ultralytics package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/).
[![PyPI version](https://badge.fury.io/py/ultralytics.svg)](https://badge.fury.io/py/ultralytics) [![Downloads](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics) [![PyPI version](https://badge.fury.io/py/ultralytics.svg)](https://badge.fury.io/py/ultralytics) [![Downloads](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics)

View File

@ -51,7 +51,7 @@
<details open> <details open>
<summary>安装</summary> <summary>安装</summary>
使用Pip在一个[**Python>=3.8**](https://www.python.org/)环境中安装`ultralytics`包,此环境还需包含[**PyTorch>=1.8**](https://pytorch.org/get-started/locally/)。这也会安装所有必要的[依赖项](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt)。 使用Pip在一个[**Python>=3.8**](https://www.python.org/)环境中安装`ultralytics`包,此环境还需包含[**PyTorch>=1.8**](https://pytorch.org/get-started/locally/)。这也会安装所有必要的[依赖项](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml)。
[![PyPI version](https://badge.fury.io/py/ultralytics.svg)](https://badge.fury.io/py/ultralytics) [![Downloads](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics) [![PyPI version](https://badge.fury.io/py/ultralytics.svg)](https://badge.fury.io/py/ultralytics) [![Downloads](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics)

View File

@ -120,7 +120,7 @@ keywords: تثبيت Ultralytics, pip install Ultralytics, Docker install Ultral
للاستفادة القصوى من استخدام Docker المتقدم، لا تتردد في استكشاف [دليل Ultralytics Docker](https://docs.ultralytics.com/guides/docker-quickstart/). للاستفادة القصوى من استخدام Docker المتقدم، لا تتردد في استكشاف [دليل Ultralytics Docker](https://docs.ultralytics.com/guides/docker-quickstart/).
راجع ملف `requirements.txt` الخاص بـ `ultralytics` [هنا](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) للحصول على قائمة المتطلبات. يُرجى ملاحظة أن جميع الأمثلة أعلاه يتم تثبيت جميع المتطلبات المطلوبة. راجع ملف `requirements.txt` الخاص بـ `ultralytics` [هنا](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) للحصول على قائمة المتطلبات. يُرجى ملاحظة أن جميع الأمثلة أعلاه يتم تثبيت جميع المتطلبات المطلوبة.
<p align="center"> <p align="center">
<br> <br>

View File

@ -76,7 +76,7 @@ Ultralytics bietet verschiedene Installationsmethoden, darunter Pip, Conda und D
pip install -e . pip install -e .
``` ```
Siehe die `ultralytics` [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) Datei für eine Liste der Abhängigkeiten. Beachten Sie, dass alle oben genannten Beispiele alle erforderlichen Abhängigkeiten installieren. Siehe die `ultralytics` [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) Datei für eine Liste der Abhängigkeiten. Beachten Sie, dass alle oben genannten Beispiele alle erforderlichen Abhängigkeiten installieren.
<p align="center"> <p align="center">
<br> <br>

View File

@ -127,7 +127,7 @@ Ultralytics provides various installation methods including pip, conda, and Dock
For advanced Docker usage, feel free to explore the [Ultralytics Docker Guide](https://docs.ultralytics.com/guides/docker-quickstart/). For advanced Docker usage, feel free to explore the [Ultralytics Docker Guide](https://docs.ultralytics.com/guides/docker-quickstart/).
See the `ultralytics` [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) file for a list of dependencies. Note that all examples above install all required dependencies. See the `ultralytics` [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) file for a list of dependencies. Note that all examples above install all required dependencies.
!!! Tip "Tip" !!! Tip "Tip"

View File

@ -76,7 +76,7 @@ Ultralytics ofrece varios métodos de instalación incluyendo pip, conda y Docke
pip install -e . pip install -e .
``` ```
Consulta el archivo [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) de `ultralytics` para ver una lista de dependencias. Ten en cuenta que todos los ejemplos anteriores instalan todas las dependencias requeridas. Consulta el archivo [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) de `ultralytics` para ver una lista de dependencias. Ten en cuenta que todos los ejemplos anteriores instalan todas las dependencias requeridas.
<p align="center"> <p align="center">
<br> <br>

View File

@ -76,7 +76,7 @@ Ultralytics propose diverses méthodes d'installation, y compris pip, conda et D
pip install -e . pip install -e .
``` ```
Voir le fichier [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) d'`ultralytics` pour une liste des dépendances. Notez que tous les exemples ci-dessus installent toutes les dépendances requises. Voir le fichier [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) d'`ultralytics` pour une liste des dépendances. Notez que tous les exemples ci-dessus installent toutes les dépendances requises.
<p align="center"> <p align="center">
<br> <br>

View File

@ -120,7 +120,7 @@ Ultralytics ने pip, conda और Docker सहित कई स्थाप
पूर्ण Docker उपयोग के लिए, आप [Ultralytics Docker मार्गदर्शिका](https://docs.ultralytics.com/guides/docker-quickstart/) के अन्वेषण कर सकते हैं। पूर्ण Docker उपयोग के लिए, आप [Ultralytics Docker मार्गदर्शिका](https://docs.ultralytics.com/guides/docker-quickstart/) के अन्वेषण कर सकते हैं।
`ultralytics` के लिए सभी आवश्यकताओं की सूची के लिए `ultralytics` [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) फ़ाइल देखें। ध्यान दें कि उपरोक्त सभी उदाहरणों में सभी आवश्यकताएं स्थापित होती हैं। `ultralytics` के लिए सभी आवश्यकताओं की सूची के लिए `ultralytics` [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) फ़ाइल देखें। ध्यान दें कि उपरोक्त सभी उदाहरणों में सभी आवश्यकताएं स्थापित होती हैं।
<p align="center"> <p align="center">
<br> <br>

View File

@ -76,7 +76,7 @@ Ultralyticsはpip、conda、Dockerを含むさまざまなインストール方
pip install -e . pip install -e .
``` ```
必要な依存関係のリストについては、`ultralytics`の[requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt)ファイルを参照してください。上記の全ての例では、必要な依存関係を全てインストールします。 必要な依存関係のリストについては、`ultralytics`の[requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml)ファイルを参照してください。上記の全ての例では、必要な依存関係を全てインストールします。
<p align="center"> <p align="center">
<br> <br>

View File

@ -117,7 +117,7 @@ Ultralytics는 pip, conda, Docker를 포함한 다양한 설치 방법을 제공
Docker 사용에 대한 고급 기능은 [Ultralytics Docker 가이드](https://docs.ultralytics.com/guides/docker-quickstart/)에서 더 탐구해보세요. Docker 사용에 대한 고급 기능은 [Ultralytics Docker 가이드](https://docs.ultralytics.com/guides/docker-quickstart/)에서 더 탐구해보세요.
`ultralytics`의 종속성 목록은 [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) 파일에서 확인할 수 있습니다. 위 예제에서는 모든 필요한 종속성을 설치합니다. `ultralytics`의 종속성 목록은 [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) 파일에서 확인할 수 있습니다. 위 예제에서는 모든 필요한 종속성을 설치합니다.
<p align="center"> <p align="center">
<br> <br>

View File

@ -76,7 +76,7 @@ O Ultralytics oferece diversos métodos de instalação, incluindo pip, conda e
pip install -e . pip install -e .
``` ```
Veja o arquivo [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) do `ultralytics` para uma lista de dependências. Note que todos os exemplos acima instalam todas as dependências necessárias. Veja o arquivo [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) do `ultralytics` para uma lista de dependências. Note que todos os exemplos acima instalam todas as dependências necessárias.
<p align="center"> <p align="center">
<br> <br>

View File

@ -76,7 +76,7 @@ Ultralytics предлагает различные методы установ
pip install -e . pip install -e .
``` ```
Смотрите файл [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) `ultralytics` для списка зависимостей. Обратите внимание, что все приведенные выше примеры устанавливают все необходимые зависимости. Смотрите файл [requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) `ultralytics` для списка зависимостей. Обратите внимание, что все приведенные выше примеры устанавливают все необходимые зависимости.
<p align="center"> <p align="center">
<br> <br>

View File

@ -116,7 +116,7 @@ Ultralytics提供了多种安装方法包括pip、conda和Docker。通过`ult
欲了解进阶Docker使用方法请探索[Ultralytics Docker指南](https://docs.ultralytics.com/guides/docker-quickstart/)。 欲了解进阶Docker使用方法请探索[Ultralytics Docker指南](https://docs.ultralytics.com/guides/docker-quickstart/)。
有关依赖项列表,请参见`ultralytics`的[requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt)文件。请注意,上述所有示例均安装了所有必需的依赖项。 有关依赖项列表,请参见`ultralytics`的[requirements.txt](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml)文件。请注意,上述所有示例均安装了所有必需的依赖项。
<p align="center"> <p align="center">
<br> <br>

View File

@ -48,7 +48,7 @@
"source": [ "source": [
"# Setup\n", "# Setup\n",
"\n", "\n",
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) and check software and hardware." "Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware."
] ]
}, },
{ {

View File

@ -48,7 +48,7 @@
"source": [ "source": [
"# Setup\n", "# Setup\n",
"\n", "\n",
"Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/requirements.txt) and check software and hardware." "Pip install `ultralytics` and [dependencies](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) and check software and hardware."
] ]
}, },
{ {

169
pyproject.toml Normal file
View File

@ -0,0 +1,169 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
#
# Overview:
# This pyproject.toml file manages the build, packaging, and distribution of the Ultralytics library.
# It defines essential project metadata, dependencies, and settings used to develop and deploy the library.
# Key Sections:
# - [build-system]: Specifies the build requirements and backend (e.g., setuptools, wheel).
# - [project]: Includes details like name, version, description, authors, dependencies and more.
# - [project.optional-dependencies]: Provides additional, optional packages for extended features.
# - [tool.*]: Configures settings for various tools (pytest, yapf, etc.) used in the project.
# Installation:
# The Ultralytics library can be installed using the command: 'pip install ultralytics'
# For development purposes, you can install the package in editable mode with: 'pip install -e .'
# This approach allows for real-time code modifications without the need for re-installation.
# Documentation:
# For comprehensive documentation and usage instructions, visit: https://docs.ultralytics.com
[build-system]
requires = ["setuptools>=43.0.0", "wheel"]
build-backend = "setuptools.build_meta"
# Project settings -----------------------------------------------------------------------------------------------------
[project]
name = "ultralytics"
dynamic = ["version"]
description = "Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification."
readme = "README.md"
requires-python = ">=3.8"
license = { "text" = "AGPL-3.0" }
keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL", "AI", "YOLO", "YOLOv3", "YOLOv5", "YOLOv8", "HUB", "Ultralytics"]
authors = [
{ name = "Glenn Jocher" },
{ name = "Ayush Chaurasia" },
{ name = "Jing Qiu" }
]
maintainers = [
{ name = "Glenn Jocher" },
{ name = "Ayush Chaurasia" },
{ name = "Jing Qiu" }
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Recognition",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
# Required dependencies ------------------------------------------------------------------------------------------------
dependencies = [
"matplotlib>=3.3.0",
"numpy>=1.22.2",
"opencv-python>=4.6.0",
"pillow>=7.1.2",
"pyyaml>=5.3.1",
"requests>=2.23.0",
"scipy>=1.4.1",
"torch>=1.8.0",
"torchvision>=0.9.0",
"tqdm>=4.64.0", # progress bars
"psutil", # system utilization
"py-cpuinfo", # display CPU info
"thop>=0.1.1", # FLOPs computation
"pandas>=1.1.4",
"seaborn>=0.11.0", # plotting
]
# Optional dependencies ------------------------------------------------------------------------------------------------
[project.optional-dependencies]
dev = [
"ipython",
"check-manifest",
"pre-commit",
"pytest",
"pytest-cov",
"coverage[toml]",
"mkdocs-material",
"mkdocstrings[python]",
"mkdocs-redirects", # for 301 redirects
"mkdocs-ultralytics-plugin>=0.0.34", # for meta descriptions and images, dates and authors
]
export = [
"onnx>=1.12.0", # ONNX export
"coremltools>=7.0", # CoreML export
"openvino-dev>=2023.0", # OpenVINO export
"tensorflow<=2.13.1", # TF bug https://github.com/ultralytics/ultralytics/issues/5161
"jax<=0.4.21", # tensorflowjs bug https://github.com/google/jax/issues/18978
"jaxlib<=0.4.21", # tensorflowjs bug https://github.com/google/jax/issues/18978
"tensorflowjs>=3.9.0", # TF.js export, automatically installs tensorflow
]
# tensorflow>=2.4.1,<=2.13.1 # TF exports (-cpu, -aarch64, -macos)
# tflite-support # for TFLite model metadata
# scikit-learn==0.19.2 # CoreML quantization
# nvidia-pyindex # TensorRT export
# nvidia-tensorrt # TensorRT export
logging = [
"comet", # https://docs.ultralytics.com/integrations/comet/
"tensorboard>=2.13.0",
"dvclive>=2.12.0",
]
extra = [
"ipython", # interactive notebook
"albumentations>=1.0.3", # training augmentations
"pycocotools>=2.0.6", # COCO mAP
]
[project.urls]
"Bug Reports" = "https://github.com/ultralytics/ultralytics/issues"
"Funding" = "https://ultralytics.com"
"Source" = "https://github.com/ultralytics/ultralytics/"
[project.scripts]
yolo = "ultralytics.cfg:entrypoint"
ultralytics = "ultralytics.cfg:entrypoint"
# Tools settings -------------------------------------------------------------------------------------------------------
[tool.setuptools] # configuration specific to the `setuptools` build backend.
packages = { find = { where = ["."], include = ["ultralytics", "ultralytics.*"] } }
package-data = { "ultralytics" = ["**/*.yaml"], "ultralytics.assets" = ["*.jpg"] }
[tool.setuptools.dynamic]
version = { attr = "ultralytics.__version__" }
[tool.pytest]
norecursedirs = [".git", "dist", "build"]
addopts = "--doctest-modules --durations=30 --color=yes"
[tool.coverage.run]
source = ["ultralytics/"]
data_file = "tests/.coverage"
omit = ["ultralytics/utils/callbacks/*"]
[tool.isort]
line_length = 120
multi_line_output = 0
[tool.yapf]
based_on_style = "pep8"
spaces_before_comment = 2
column_limit = 120
coalesce_brackets = true
spaces_around_power_operator = true
space_between_ending_comma_and_closing_bracket = true
split_before_closing_bracket = false
split_before_first_argument = false
[tool.docformatter]
wrap-summaries = 120
wrap-descriptions = 120
in-place = true
make-summary-multi-line = false
pre-summary-newline = true
force-wrap = false
close-quotes-on-newline = true

View File

@ -1,47 +0,0 @@
# Ultralytics requirements
# Example: pip install -r requirements.txt
# Base ----------------------------------------
matplotlib>=3.3.0
numpy>=1.22.2 # pinned by Snyk to avoid a vulnerability
opencv-python>=4.6.0
pillow>=7.1.2
pyyaml>=5.3.1
requests>=2.23.0
scipy>=1.4.1
torch>=1.8.0
torchvision>=0.9.0
tqdm>=4.64.0
# Logging -------------------------------------
# tensorboard>=2.13.0
# dvclive>=2.12.0
# clearml
# comet
# Plotting ------------------------------------
pandas>=1.1.4
seaborn>=0.11.0
# Export --------------------------------------
# coremltools>=7.0 # CoreML export
# onnx>=1.12.0 # ONNX export
# onnxsim>=0.4.1 # ONNX simplifier
# nvidia-pyindex # TensorRT export
# nvidia-tensorrt # TensorRT export
# scikit-learn==0.19.2 # CoreML quantization
# tensorflow>=2.4.1,<=2.13.1 # TF exports (-cpu, -aarch64, -macos)
# tflite-support
# jax<=0.4.21 # tensorflowjs bug https://github.com/google/jax/issues/18978
# jaxlib<=0.4.21 # tensorflowjs bug https://github.com/google/jax/issues/18978
# tensorflowjs>=3.9.0 # TF.js export
# openvino-dev>=2023.0 # OpenVINO export
# Extras --------------------------------------
psutil # system utilization
py-cpuinfo # display CPU info
thop>=0.1.1 # FLOPs computation
# ipython # interactive notebook
# albumentations>=1.0.3 # training augmentations
# pycocotools>=2.0.6 # COCO mAP
# roboflow

View File

@ -1,71 +0,0 @@
# Project-wide configuration file, can be used for package metadata and other toll configurations
# Example usage: global configuration for PEP8 (via flake8) setting or default pytest arguments
# Local usage: pip install pre-commit, pre-commit run --all-files
[metadata]
license_files = LICENSE
description_file = README.md
[tool:pytest]
norecursedirs =
.git
dist
build
addopts =
--doctest-modules
--durations=30
--color=yes
[coverage:run]
source = ultralytics/
data_file = tests/.coverage
omit =
ultralytics/utils/callbacks/*
[flake8]
max-line-length = 120
exclude = .tox,*.egg,build,temp
select = E,W,F
doctests = True
verbose = 2
# https://pep8.readthedocs.io/en/latest/intro.html#error-codes
format = pylint
# see: https://www.flake8rules.com/
ignore = E731,F405,E402,W504,E501
# E731: Do not assign a lambda expression, use a def
# F405: name may be undefined, or defined from star imports: module
# E402: module level import not at top of file
# W504: line break after binary operator
# E501: line too long
# removed:
# F401: module imported but unused
# E231: missing whitespace after ,, ;, or :
# E127: continuation line over-indented for visual indent
# F403: from module import * used; unable to detect undefined names
[isort]
# https://pycqa.github.io/isort/docs/configuration/options.html
line_length = 120
# see: https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html
multi_line_output = 0
[yapf]
based_on_style = pep8
spaces_before_comment = 2
COLUMN_LIMIT = 120
COALESCE_BRACKETS = True
SPACES_AROUND_POWER_OPERATOR = True
SPACE_BETWEEN_ENDING_COMMA_AND_CLOSING_BRACKET = True
SPLIT_BEFORE_CLOSING_BRACKET = False
SPLIT_BEFORE_FIRST_ARGUMENT = False
# EACH_DICT_ENTRY_ON_SEPARATE_LINE = False
[docformatter]
wrap-summaries = 120
wrap-descriptions = 120
in-place = true
make-summary-multi-line = false
pre-summary-newline = true
force-wrap = false
close-quotes-on-newline = true

107
setup.py
View File

@ -1,107 +0,0 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
import re
from pathlib import Path
from setuptools import setup
# Settings
FILE = Path(__file__).resolve()
PARENT = FILE.parent # root directory
README = (PARENT / 'README.md').read_text(encoding='utf-8')
def get_version():
"""
Retrieve the version number from the 'ultralytics/__init__.py' file.
Returns:
(str): The version number extracted from the '__version__' attribute in the 'ultralytics/__init__.py' file.
"""
file = PARENT / 'ultralytics/__init__.py'
return re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', file.read_text(encoding='utf-8'), re.M)[1]
def parse_requirements(file_path: Path):
"""
Parse a requirements.txt file, ignoring lines that start with '#' and any text after '#'.
Args:
file_path (str | Path): Path to the requirements.txt file.
Returns:
(List[str]): List of parsed requirements.
"""
requirements = []
for line in Path(file_path).read_text().splitlines():
line = line.strip()
if line and not line.startswith('#'):
requirements.append(line.split('#')[0].strip()) # ignore inline comments
return requirements
setup(
name='ultralytics', # name of pypi package
version=get_version(), # version of pypi package
python_requires='>=3.8',
license='AGPL-3.0',
description=('Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, '
'pose estimation and image classification.'),
long_description=README,
long_description_content_type='text/markdown',
url='https://github.com/ultralytics/ultralytics',
project_urls={
'Bug Reports': 'https://github.com/ultralytics/ultralytics/issues',
'Funding': 'https://ultralytics.com',
'Source': 'https://github.com/ultralytics/ultralytics'},
author='Ultralytics',
author_email='hello@ultralytics.com',
packages=['ultralytics'] + [str(x) for x in Path('ultralytics').rglob('*/') if x.is_dir() and '__' not in str(x)],
package_data={
'': ['*.yaml'],
'ultralytics.assets': ['*.jpg']},
include_package_data=True,
install_requires=parse_requirements(PARENT / 'requirements.txt'),
extras_require={
'dev': [
'ipython',
'check-manifest',
'pre-commit',
'pytest',
'pytest-cov',
'coverage',
'mkdocs-material',
'mkdocstrings[python]',
'mkdocs-redirects', # for 301 redirects
'mkdocs-ultralytics-plugin>=0.0.35', # for meta descriptions and images, dates and authors
],
'export': [
'coremltools>=7.0',
'openvino-dev>=2023.0',
'tensorflow<=2.13.1', # TF bug https://github.com/ultralytics/ultralytics/issues/5161
'jax<=0.4.21', # tensorflowjs bug https://github.com/google/jax/issues/18978
'jaxlib<=0.4.21', # tensorflowjs bug https://github.com/google/jax/issues/18978
'tensorflowjs', # automatically installs tensorflow
], },
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Software Development',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Image Recognition',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows', ],
keywords='machine-learning, deep-learning, vision, ML, DL, AI, YOLO, YOLOv3, YOLOv5, YOLOv8, HUB, Ultralytics',
entry_points={'console_scripts': ['yolo = ultralytics.cfg:entrypoint', 'ultralytics = ultralytics.cfg:entrypoint']})

View File

@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license # Ultralytics YOLO 🚀, AGPL-3.0 license
__version__ = '8.0.230' __version__ = '8.0.231'
from ultralytics.models import RTDETR, SAM, YOLO from ultralytics.models import RTDETR, SAM, YOLO
from ultralytics.models.fastsam import FastSAM from ultralytics.models.fastsam import FastSAM