forked from ultralytics/ultralytics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
231 lines (210 loc) Β· 10.2 KB
/
Copy pathpyproject.toml
File metadata and controls
231 lines (210 loc) Β· 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# Ultralytics π AGPL-3.0 License - https://ultralytics.com/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>=70.0.0,<=82.0.1", "wheel"]
build-backend = "setuptools.build_meta"
# Project settings -----------------------------------------------------------------------------------------------------
[project]
name = "ultralytics"
dynamic = ["version"]
description = "Ultralytics YOLO π for SOTA object detection, multi-object tracking, instance segmentation, pose estimation, classification, and oriented object detection."
readme = "README.md"
requires-python = ">=3.8"
license = { "text" = "AGPL-3.0" }
keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL", "AI", "RT-DETR", "SAM3", "YOLO", "YOLOv3", "YOLOv5", "YOLOv8", "YOLO11", "YOLO26", "Platform", "Ultralytics"]
authors = [
{ name = "Glenn Jocher", email = "glenn.jocher@ultralytics.com" },
{ name = "Jing Qiu", email = "jing.qiu@ultralytics.com" },
]
maintainers = [
{ name = "Ultralytics", email = "hello@ultralytics.com" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"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",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"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 = [
"numpy>=1.23.0",
"matplotlib>=3.3.0",
"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",
"torch>=1.8.0,!=2.4.0; sys_platform == 'win32'", # Windows CPU errors w/ 2.4.0 https://github.com/ultralytics/ultralytics/issues/15049
"torchvision>=0.9.0",
"psutil>=5.8.0", # system utilization
"polars>=0.20.0",
"nvidia-ml-py>=12.0.0", # NVIDIA GPU monitoring https://pypi.org/project/nvidia-ml-py
"ultralytics-thop>=2.0.18", # FLOPs computation https://github.com/ultralytics/thop
]
# Optional dependencies ------------------------------------------------------------------------------------------------
[project.optional-dependencies]
dev = [
"ipython",
"pytest",
"pytest-cov",
"pytest-xdist>=3.0.0",
"coverage[toml]",
"zensical>=0.0.15; python_version >= '3.10'",
"mkdocs-ultralytics-plugin>=0.2.4", # for meta descriptions and images, dates and authors
"minijinja>=2.0.0", # render docs macros without mkdocs-macros-plugin
]
export-base = [
"onnx>=1.12.0; platform_system != 'Darwin'", # ONNX export
"onnx>=1.12.0,<1.18.0; platform_system == 'Darwin' and python_version < '3.13'", # TF inference hanging on MacOS (tested up to onnx==1.20.0)
"onnx>=1.20.0; platform_system == 'Darwin' and python_version >= '3.13'",
"onnxslim>=0.1.82",
# ONNX export validation and inference. Jetson jobs provide custom aarch64 onnxruntime-gpu wheels.
"onnxruntime<1.20.0; python_version < '3.11' and (platform_machine != 'aarch64' or platform_system != 'Linux')",
"onnxruntime>=1.20.0; python_version >= '3.11'",
"nncf>=2.14.0,<3.0.0; python_version >= '3.9'", # OpenVINO INT8 export
"openvino>=2024.0.0", # OpenVINO export
"packaging>=26.0; platform_machine == 'aarch64' and platform_system == 'Linux' and python_version >= '3.9'", # IMX export bug
]
export-legacy-torch = [
"numpy<2",
]
export-tensorflow = [
"numpy<2.0.0; python_version < '3.13'", # TF 2.20 compatibility
"tensorflow>=2.0.0,<=2.19.0; python_version < '3.13'", # TF bug https://github.com/ultralytics/ultralytics/issues/5161
"tensorflow>2.19.0; python_version >= '3.13'",
"tensorflowjs>=2.0.0", # TF.js export, automatically installs tensorflow
"ydf<0.13.0; platform_machine != 'aarch64' and python_version <= '3.12'", # ydf>=0.13 has protobuf gencode 6.x but tensorflow<=2.19 requires protobuf<6
"googleapis-common-protos<1.74.0; python_version <= '3.12'", # >=1.74.0 uses protobuf gencode 7.34.1, incompatible with tensorflow<=2.19 (protobuf<6) and breaks ray[tune] import
"tensorstore>=0.1.63; platform_machine == 'aarch64' and python_version >= '3.9'", # for TF Raspberry Pi exports
"h5py!=3.11.0; platform_machine == 'aarch64'", # fix h5py build issues due to missing aarch64 wheels in 3.11 release
"setuptools<=81.0.0", # pin due to >=82.0.0 breaking tensorflow.js package
]
export-coreml = [
"numpy<=2.3.5; python_version >= '3.13'", # pin until CoreML>9.0 new release
"coremltools>=9.0; platform_system != 'Windows' and python_version <= '3.13'", # CoreML supported on macOS and Linux
"scikit-learn>=1.3.2; platform_system != 'Windows' and python_version <= '3.13'", # CoreML k-means quantization
]
export-executorch = [
"executorch",
"numpy<=2.3.5",
]
export-deepx = [
"dx_com",
"numpy<2",
]
export = [
"ultralytics[export-base]",
"ultralytics[export-tensorflow]",
"ultralytics[export-coreml]",
]
solutions = [
"shapely>=2.0.0", # shapely for point and polygon data matching
"lap>=0.5.12", # for solution tracking linear assignment
"faiss-cpu", # for similarity search
"openai-clip>=1.0.1", # for similarity search text/image embeddings
"setuptools>=80.0.0,<81.0.0; python_version >= '3.9'", # openai-clip imports pkg_resources.packaging, removed in setuptools>=81
"setuptools<76.0.0; python_version < '3.9'", # provide pkg_resources for openai-clip on Python 3.8 (setuptools>=76 drops 3.8, >=81 drops pkg_resources)
"streamlit>=1.51.0; python_version >= '3.10'", # for live inference on web browser, i.e `yolo streamlit-predict`
"streamlit>=1.29.0,<1.51.0; python_version < '3.10' and (platform_machine != 'aarch64' or platform_system != 'Linux')",
"flask>=3.0.1", # for similarity search solution
]
logging = [
"wandb", # https://docs.ultralytics.com/integrations/weights-biases/
"tensorboard", # https://docs.ultralytics.com/integrations/tensorboard/
"mlflow", # https://docs.ultralytics.com/integrations/mlflow/
]
extra = [
"ipython", # interactive notebook
"albumentations>=1.4.6", # training augmentations
"faster-coco-eval>=1.6.7", # COCO mAP
]
typing = [
"scipy-stubs>=1.14.1.4; python_version >= '3.10'",
"types-pillow",
"types-psutil",
"types-pyyaml",
"types-requests",
"types-shapely",
]
[project.urls]
"Homepage" = "https://ultralytics.com"
"Source" = "https://github.com/ultralytics/ultralytics"
"Documentation" = "https://docs.ultralytics.com"
"Bug Reports" = "https://github.com/ultralytics/ultralytics/issues"
"Changelog" = "https://github.com/ultralytics/ultralytics/releases"
[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.*"] } }
# Tests included below for checking Conda builds in https://github.com/conda-forge/ultralytics-feedstock
package-data = { "ultralytics" = ["**/*.yaml", "**/*.sh", "../tests/*.py"], "ultralytics.assets" = ["*.jpg"], "ultralytics.solutions.templates" = ["*.html"]}
[tool.setuptools.dynamic]
version = { attr = "ultralytics.__version__" }
[tool.pytest.ini_options]
addopts = "--doctest-modules --durations=30 --color=yes"
markers = [
"slow: skip slow tests unless --slow is set",
]
norecursedirs = [".git", "dist", "build"]
[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.ruff]
line-length = 120
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.docformatter]
wrap-summaries = 120
wrap-descriptions = 120
pre-summary-newline = true
close-quotes-on-newline = true
in-place = true
[tool.codespell]
ignore-words-list = "grey,writeable,finalY,RepResNet,Idenfy,WIT,Smoot,EHR,ROUGE,ALS,iTerm,Carmel,FPR,Hach,Calle,ore,COO,MOT,crate,nd,ned,strack,dota,ane,segway,fo,gool,winn,commend,bloc,nam,afterall,skelton,goin,alls"
skip = "*.pt,*.pth,*.torchscript,*.onnx,*.tflite,*.pb,*.bin,*.param,*.mlmodel,*.engine,*.npy,*.data*,*.csv,*pnnx*,*venv*,*translat*,*lock*,__pycache__*,*.ico,*.jpg,*.png,*.webp,*.avif,*.mp4,*.mov,/runs,/.git,./docs/??/*.md,./docs/mkdocs_??.yml"