pyproject.toml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. # Ultralytics YOLO 🚀, AGPL-3.0 license
  2. # Overview:
  3. # This pyproject.toml file manages the build, packaging, and distribution of the Ultralytics library.
  4. # It defines essential project metadata, dependencies, and settings used to develop and deploy the library.
  5. # Key Sections:
  6. # - [build-system]: Specifies the build requirements and backend (e.g., setuptools, wheel).
  7. # - [project]: Includes details like name, version, description, authors, dependencies and more.
  8. # - [project.optional-dependencies]: Provides additional, optional packages for extended features.
  9. # - [tool.*]: Configures settings for various tools (pytest, yapf, etc.) used in the project.
  10. # Installation:
  11. # The Ultralytics library can be installed using the command: 'pip install ultralytics'
  12. # For development purposes, you can install the package in editable mode with: 'pip install -e .'
  13. # This approach allows for real-time code modifications without the need for re-installation.
  14. # Documentation:
  15. # For comprehensive documentation and usage instructions, visit: https://docs.ultralytics.com
  16. [build-system]
  17. requires = ["setuptools>=57.0.0", "wheel"]
  18. build-backend = "setuptools.build_meta"
  19. # Project settings -----------------------------------------------------------------------------------------------------
  20. [project]
  21. name = "ultralytics"
  22. dynamic = ["version"]
  23. description = "Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification."
  24. readme = "README.md"
  25. requires-python = ">=3.8"
  26. license = { "text" = "AGPL-3.0" }
  27. keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL", "AI", "YOLO", "YOLOv3", "YOLOv5", "YOLOv8", "HUB", "Ultralytics"]
  28. authors = [
  29. { name = "Glenn Jocher" },
  30. { name = "Ayush Chaurasia" },
  31. { name = "Jing Qiu" }
  32. ]
  33. maintainers = [
  34. { name = "Glenn Jocher" },
  35. { name = "Ayush Chaurasia" },
  36. { name = "Jing Qiu" }
  37. ]
  38. classifiers = [
  39. "Development Status :: 4 - Beta",
  40. "Intended Audience :: Developers",
  41. "Intended Audience :: Education",
  42. "Intended Audience :: Science/Research",
  43. "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
  44. "Programming Language :: Python :: 3",
  45. "Programming Language :: Python :: 3.8",
  46. "Programming Language :: Python :: 3.9",
  47. "Programming Language :: Python :: 3.10",
  48. "Programming Language :: Python :: 3.11",
  49. "Programming Language :: Python :: 3.12",
  50. "Topic :: Software Development",
  51. "Topic :: Scientific/Engineering",
  52. "Topic :: Scientific/Engineering :: Artificial Intelligence",
  53. "Topic :: Scientific/Engineering :: Image Recognition",
  54. "Operating System :: POSIX :: Linux",
  55. "Operating System :: MacOS",
  56. "Operating System :: Microsoft :: Windows",
  57. ]
  58. # Required dependencies ------------------------------------------------------------------------------------------------
  59. dependencies = [
  60. "numpy>=1.23.0,<2.0.0", # temporary patch for compat errors https://github.com/ultralytics/yolov5/actions/runs/9538130424/job/26286956354
  61. "matplotlib>=3.3.0",
  62. "opencv-python>=4.6.0",
  63. "pillow>=7.1.2",
  64. "pyyaml>=5.3.1",
  65. "requests>=2.23.0",
  66. "scipy>=1.4.1",
  67. "torch>=1.8.0",
  68. "torchvision>=0.9.0",
  69. "tqdm>=4.64.0", # progress bars
  70. "psutil", # system utilization
  71. "py-cpuinfo", # display CPU info
  72. "pandas>=1.1.4",
  73. "seaborn>=0.11.0", # plotting
  74. "ultralytics-thop>=2.0.0", # FLOPs computation https://github.com/ultralytics/thop
  75. ]
  76. # Optional dependencies ------------------------------------------------------------------------------------------------
  77. [project.optional-dependencies]
  78. dev = [
  79. "ipython",
  80. "pytest",
  81. "pytest-cov",
  82. "coverage[toml]",
  83. "mkdocs>=1.6.0",
  84. "mkdocs-material>=9.5.9",
  85. "mkdocstrings[python]",
  86. "mkdocs-jupyter", # for notebooks
  87. "mkdocs-redirects", # for 301 redirects
  88. "mkdocs-ultralytics-plugin>=0.0.49", # for meta descriptions and images, dates and authors
  89. ]
  90. export = [
  91. "onnx>=1.12.0", # ONNX export
  92. "coremltools>=7.0; platform_system != 'Windows' and python_version <= '3.11'", # CoreML supported on macOS and Linux
  93. "openvino>=2024.0.0", # OpenVINO export
  94. "tensorflow>=2.0.0", # TF bug https://github.com/ultralytics/ultralytics/issues/5161
  95. "tensorflowjs>=3.9.0", # TF.js export, automatically installs tensorflow
  96. "keras", # not installed automatically by tensorflow>=2.16
  97. "flatbuffers>=23.5.26,<100; platform_machine == 'aarch64'", # update old 'flatbuffers' included inside tensorflow package
  98. "numpy==1.23.5; platform_machine == 'aarch64'", # fix error: `np.bool` was a deprecated alias for the builtin `bool` when using TensorRT models on NVIDIA Jetson
  99. "h5py!=3.11.0; platform_machine == 'aarch64'", # fix h5py build issues due to missing aarch64 wheels in 3.11 release
  100. ]
  101. explorer = [
  102. "lancedb", # vector search
  103. "duckdb<=0.9.2", # SQL queries, duckdb==0.10.0 bug https://github.com/ultralytics/ultralytics/pull/8181
  104. "streamlit", # visualizing with GUI
  105. ]
  106. logging = [
  107. "comet", # https://docs.ultralytics.com/integrations/comet/
  108. "tensorboard>=2.13.0",
  109. "dvclive>=2.12.0",
  110. ]
  111. extra = [
  112. "hub-sdk>=0.0.8", # Ultralytics HUB
  113. "ipython", # interactive notebook
  114. "albumentations>=1.4.6", # training augmentations
  115. "pycocotools>=2.0.7", # COCO mAP
  116. ]
  117. [project.urls]
  118. "Bug Reports" = "https://github.com/ultralytics/ultralytics/issues"
  119. "Funding" = "https://ultralytics.com"
  120. "Source" = "https://github.com/ultralytics/ultralytics/"
  121. [project.scripts]
  122. yolo = "ultralytics.cfg:entrypoint"
  123. ultralytics = "ultralytics.cfg:entrypoint"
  124. # Tools settings -------------------------------------------------------------------------------------------------------
  125. [tool.setuptools] # configuration specific to the `setuptools` build backend.
  126. packages = { find = { where = ["."], include = ["ultralytics", "ultralytics.*"] } }
  127. package-data = { "ultralytics" = ["**/*.yaml", "../tests/*.py"], "ultralytics.assets" = ["*.jpg"] }
  128. [tool.setuptools.dynamic]
  129. version = { attr = "ultralytics.__version__" }
  130. [tool.pytest.ini_options]
  131. addopts = "--doctest-modules --durations=30 --color=yes"
  132. markers = [
  133. "slow: skip slow tests unless --slow is set",
  134. ]
  135. norecursedirs = [".git", "dist", "build"]
  136. [tool.coverage.run]
  137. source = ["ultralytics/"]
  138. data_file = "tests/.coverage"
  139. omit = ["ultralytics/utils/callbacks/*"]
  140. [tool.isort]
  141. line_length = 120
  142. multi_line_output = 0
  143. [tool.yapf]
  144. based_on_style = "pep8"
  145. spaces_before_comment = 2
  146. column_limit = 120
  147. coalesce_brackets = true
  148. spaces_around_power_operator = true
  149. space_between_ending_comma_and_closing_bracket = true
  150. split_before_closing_bracket = false
  151. split_before_first_argument = false
  152. [tool.ruff]
  153. line-length = 120
  154. [tool.docformatter]
  155. wrap-summaries = 120
  156. wrap-descriptions = 120
  157. in-place = true
  158. pre-summary-newline = true
  159. close-quotes-on-newline = true
  160. [tool.codespell]
  161. ignore-words-list = "crate,nd,ned,strack,dota,ane,segway,fo,gool,winn,commend,bloc,nam,afterall"
  162. skip = '*.pt,*.pth,*.torchscript,*.onnx,*.tflite,*.pb,*.bin,*.param,*.mlmodel,*.engine,*.npy,*.data*,*.csv,*pnnx*,*venv*,*translat*,__pycache__*,*.ico,*.jpg,*.png,*.mp4,*.mov,/runs,/.git,./docs/??/*.md,./docs/mkdocs_??.yml'