From d02e0aa86bac6074aee1d43efb0f8336e9fc14e0 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 28 Dec 2023 10:04:16 -0500 Subject: [PATCH] `ultralytics 8.0.231` use new `pyproject.toml` (#7185) Signed-off-by: Glenn Jocher Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/ci.yaml | 2 +- .github/workflows/greetings.yml | 2 +- .pre-commit-config.yaml | 6 -- MANIFEST.in | 8 -- README.md | 2 +- README.zh-CN.md | 2 +- docs/ar/quickstart.md | 2 +- docs/de/quickstart.md | 2 +- docs/en/quickstart.md | 2 +- docs/es/quickstart.md | 2 +- docs/fr/quickstart.md | 2 +- docs/hi/quickstart.md | 2 +- docs/ja/quickstart.md | 2 +- docs/ko/quickstart.md | 2 +- docs/pt/quickstart.md | 2 +- docs/ru/quickstart.md | 2 +- docs/zh/quickstart.md | 2 +- examples/hub.ipynb | 2 +- examples/tutorial.ipynb | 2 +- pyproject.toml | 169 ++++++++++++++++++++++++++++++++ requirements.txt | 47 --------- setup.cfg | 71 -------------- setup.py | 107 -------------------- ultralytics/__init__.py | 2 +- 24 files changed, 187 insertions(+), 257 deletions(-) delete mode 100644 MANIFEST.in create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 81e5f1c4..654496f1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -107,7 +107,7 @@ jobs: shell: bash # for Windows compatibility run: | 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 # pip install -U 'jax!=0.4.15' 'jaxlib!=0.4.15' yolo export format=tflite imgsz=32 || true diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 224fe57b..00e0f9da 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -36,7 +36,7 @@ jobs: ## 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 pip install ultralytics diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9abb5d42..68514863 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,12 +57,6 @@ repos: exclude: 'docs/.*\.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 rev: v2.2.6 hooks: diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index cd7df3ee..00000000 --- a/MANIFEST.in +++ /dev/null @@ -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 diff --git a/README.md b/README.md index 9e718120..fcc51b4f 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ See below for a quickstart installation and usage example, and see the [YOLOv8 D
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/). [![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) diff --git a/README.zh-CN.md b/README.zh-CN.md index 7a3bf9cb..49f7f2ba 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -51,7 +51,7 @@
安装 -使用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) diff --git a/docs/ar/quickstart.md b/docs/ar/quickstart.md index 2364115a..0b182193 100644 --- a/docs/ar/quickstart.md +++ b/docs/ar/quickstart.md @@ -120,7 +120,7 @@ keywords: تثبيت Ultralytics, pip install Ultralytics, Docker install Ultral للاستفادة القصوى من استخدام 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) للحصول على قائمة المتطلبات. يُرجى ملاحظة أن جميع الأمثلة أعلاه يتم تثبيت جميع المتطلبات المطلوبة.


diff --git a/docs/de/quickstart.md b/docs/de/quickstart.md index 1bfbaf7d..1c9e629e 100644 --- a/docs/de/quickstart.md +++ b/docs/de/quickstart.md @@ -76,7 +76,7 @@ Ultralytics bietet verschiedene Installationsmethoden, darunter Pip, Conda und D 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.


diff --git a/docs/en/quickstart.md b/docs/en/quickstart.md index 4dd0eae7..865520b2 100644 --- a/docs/en/quickstart.md +++ b/docs/en/quickstart.md @@ -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/). -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" diff --git a/docs/es/quickstart.md b/docs/es/quickstart.md index bc7b5e3b..ab6dfaf8 100644 --- a/docs/es/quickstart.md +++ b/docs/es/quickstart.md @@ -76,7 +76,7 @@ Ultralytics ofrece varios métodos de instalación incluyendo pip, conda y Docke 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.


diff --git a/docs/fr/quickstart.md b/docs/fr/quickstart.md index 025ae5d8..06286a30 100644 --- a/docs/fr/quickstart.md +++ b/docs/fr/quickstart.md @@ -76,7 +76,7 @@ Ultralytics propose diverses méthodes d'installation, y compris pip, conda et D 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.


diff --git a/docs/hi/quickstart.md b/docs/hi/quickstart.md index 1db79ebe..97e8f16d 100644 --- a/docs/hi/quickstart.md +++ b/docs/hi/quickstart.md @@ -120,7 +120,7 @@ Ultralytics ने pip, conda और Docker सहित कई स्थाप पूर्ण 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) फ़ाइल देखें। ध्यान दें कि उपरोक्त सभी उदाहरणों में सभी आवश्यकताएं स्थापित होती हैं।


diff --git a/docs/ja/quickstart.md b/docs/ja/quickstart.md index 35c737af..14be3519 100644 --- a/docs/ja/quickstart.md +++ b/docs/ja/quickstart.md @@ -76,7 +76,7 @@ Ultralyticsはpip、conda、Dockerを含むさまざまなインストール方 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)ファイルを参照してください。上記の全ての例では、必要な依存関係を全てインストールします。


diff --git a/docs/ko/quickstart.md b/docs/ko/quickstart.md index ca523924..4490b8c2 100644 --- a/docs/ko/quickstart.md +++ b/docs/ko/quickstart.md @@ -117,7 +117,7 @@ Ultralytics는 pip, conda, Docker를 포함한 다양한 설치 방법을 제공 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) 파일에서 확인할 수 있습니다. 위 예제에서는 모든 필요한 종속성을 설치합니다.


diff --git a/docs/pt/quickstart.md b/docs/pt/quickstart.md index 242193a9..62e04d79 100644 --- a/docs/pt/quickstart.md +++ b/docs/pt/quickstart.md @@ -76,7 +76,7 @@ O Ultralytics oferece diversos métodos de instalação, incluindo pip, conda 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.


diff --git a/docs/ru/quickstart.md b/docs/ru/quickstart.md index e47dd6df..409c2eaf 100644 --- a/docs/ru/quickstart.md +++ b/docs/ru/quickstart.md @@ -76,7 +76,7 @@ Ultralytics предлагает различные методы установ 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` для списка зависимостей. Обратите внимание, что все приведенные выше примеры устанавливают все необходимые зависимости.


diff --git a/docs/zh/quickstart.md b/docs/zh/quickstart.md index b3438a83..0a0b773b 100644 --- a/docs/zh/quickstart.md +++ b/docs/zh/quickstart.md @@ -116,7 +116,7 @@ Ultralytics提供了多种安装方法,包括pip、conda和Docker。通过`ult 欲了解进阶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)文件。请注意,上述所有示例均安装了所有必需的依赖项。


diff --git a/examples/hub.ipynb b/examples/hub.ipynb index 5d8be2af..29d8ff14 100644 --- a/examples/hub.ipynb +++ b/examples/hub.ipynb @@ -48,7 +48,7 @@ "source": [ "# Setup\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." ] }, { diff --git a/examples/tutorial.ipynb b/examples/tutorial.ipynb index d3bbafef..7cc944fb 100644 --- a/examples/tutorial.ipynb +++ b/examples/tutorial.ipynb @@ -48,7 +48,7 @@ "source": [ "# Setup\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." ] }, { diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..941ee450 --- /dev/null +++ b/pyproject.toml @@ -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 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 7d5829ef..00000000 --- a/requirements.txt +++ /dev/null @@ -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 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index ff364449..00000000 --- a/setup.cfg +++ /dev/null @@ -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 diff --git a/setup.py b/setup.py deleted file mode 100644 index 48dc9918..00000000 --- a/setup.py +++ /dev/null @@ -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']}) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 4c19884b..4ddb38b4 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = '8.0.230' +__version__ = '8.0.231' from ultralytics.models import RTDETR, SAM, YOLO from ultralytics.models.fastsam import FastSAM