forked from CVHub520/X-AnyLabeling
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
173 lines (156 loc) · 5.5 KB
/
pyproject.toml
File metadata and controls
173 lines (156 loc) · 5.5 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
# X-AnyLabeling GPLv3 License - https://github.com/CVHub520/X-AnyLabeling/blob/main/LICENSE
# Overview:
# This pyproject.toml file manages the build, packaging, and distribution of the X-AnyLabeling 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 X-AnyLabeling library can be installed using the command: 'pip install x-anylabeling-cvhub[xxx]'
# For development purposes, you MUST specify a runtime environment (includes dev tools):
# - CPU: pip install -e .[cpu]
# - CUDA 12.x: pip install -e .[gpu]
# - CUDA 11.x: pip install -e .[gpu-cu11]
# Note: Ensure onnxruntime and onnxruntime-gpu are not installed simultaneously.
# This approach allows for real-time code modifications without the need for re-installation.
# Docs: https://github.com/CVHub520/X-AnyLabeling/tree/main/docs
# Examples: https://github.com/CVHub520/X-AnyLabeling/tree/main/examples/
# GitHub: https://github.com/CVHub520/X-AnyLabeling
[build-system]
requires = ["setuptools>=70.0.0", "wheel"]
build-backend = "setuptools.build_meta"
# Project settings -----------------------------------------------------------------------------------------------------
[project]
name = "x-anylabeling-cvhub"
dynamic = ["version"]
description = "Advanced Auto Labeling Solution with Added Features"
readme = "README.md"
requires-python = ">=3.10"
license = { "text" = "GPLv3" }
keywords = ["machine-learning", "deep-learning", "computer-vision", "multi-modal", "auto-labeling", "image-annotation", "AI", "LLM", "VLM", "YOLO", "SAM", "CLIP", "Grounding-DINO", "X-AnyLabeling"]
authors = [
{ name = "Wei Wang", email = "cv_hub@163.com" },
]
maintainers = [
{ name = "CVHub", email = "cvhub.cn@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
# Core dependencies
# Note: onnx and onnxruntime are in optional-dependencies for version compatibility
dependencies = [
"natsort>=8.1.0",
"numpy<=1.26.4",
"pillow>=7.1.2",
"opencv-contrib-python-headless>=4.7.0.72",
"PyQt5>=5.15.7",
"PyQtWebEngine>=5.15.7",
"qimage2ndarray>=1.10.0",
"lapx>=0.5.5",
"tqdm>=4.64.0",
"scipy>=1.4.1",
"PyYAML",
"importlib_metadata",
"json_repair",
"jsonlines",
"markdown",
"openai",
"psutil",
"pyclipper",
"six",
"shapely",
"termcolor",
"tokenizers",
"requests",
"darkdetect>=0.8.0",
]
# Optional dependencies ------------------------------------------------------------------------------------------------
[project.optional-dependencies]
dev = [
"build",
"black",
"flake8",
"pyinstaller",
"pytest",
"twine",
]
# CPU version: Latest ONNX + ONNXRuntime
cpu = [
"onnx>=1.15.0",
"onnxruntime>=1.15.0",
]
# CUDA 12.x: Latest ONNX + ONNXRuntime GPU (>= 1.18.1 for CUDA 12.x support)
gpu = [
"onnx>=1.15.0",
"onnxruntime-gpu>=1.18.1; platform_system != 'Darwin'",
]
# CUDA 11.x: ONNX < 1.16.1 + ONNXRuntime GPU < 1.19
gpu-cu11 = [
"onnx>=1.15.0,<1.16.1",
"onnxruntime-gpu>=1.15.0,<1.19.0; platform_system != 'Darwin'",
]
[project.urls]
"Source" = "https://github.com/CVHub520/X-AnyLabeling"
"Documentation" = "https://github.com/CVHub520/X-AnyLabeling/tree/main/docs"
"Bug Reports" = "https://github.com/CVHub520/X-AnyLabeling/issues"
"Changelog" = "https://github.com/CVHub520/X-AnyLabeling/releases"
[project.scripts]
xanylabeling = "anylabeling.app:main"
# Tools settings -------------------------------------------------------------------------------------------------------
[tool.setuptools] # configuration specific to the `setuptools` build backend.
packages = { find = { where = ["."], include = ["anylabeling*"], exclude = ["resources*"] } }
[tool.setuptools.dynamic]
version = {attr = "anylabeling.app_info.__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.black]
line-length = 79
exclude = '''
/( \\
\\.git
| \\.hg
| \\.mypy_cache
| \\.tox
| \\.venv
| _build
| buck-out
| build
| dist
| tests/
| anylabeling/resources/resources\\.py
)/
'''
[tool.flake8]
max-line-length = 79
max-complexity = 18
select = ["B", "C", "E", "F", "W", "T4", "B9"]
ignore = ["E203", "E266", "E501", "W503", "F403", "F401", "B905", "E402"]
exclude = [
".git",
"__pycache__",
"build",
"dist",
".venv",
"anylabeling/resources/resources.py"
]