-
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathpyproject.toml
More file actions
513 lines (467 loc) · 11.7 KB
/
Copy pathpyproject.toml
File metadata and controls
513 lines (467 loc) · 11.7 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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "albumentationsx"
version = "2.4.9"
description = "Fast, flexible, and advanced augmentation library for deep learning, computer vision, and medical imaging. Albumentations offers a wide range of transformations for both 2D (images, masks, bboxes, keypoints) and 3D (volume data, volumetric masks, keypoints) data, with optimized performance and seamless integration into ML workflows. Available under AGPL-3.0-only or a commercial license with agreed coverage for your team, products, and deployments."
readme = "README.md"
keywords = [
"2D augmentation",
"3D augmentation",
"aerial photography",
"anomaly detection",
"artificial intelligence",
"autonomous driving",
"bounding boxes",
"classification",
"computer vision",
"computer vision library",
"data augmentation",
"data preprocessing",
"data science",
"deep learning",
"deep learning library",
"depth estimation",
"face recognition",
"fast augmentation",
"image augmentation",
"image processing",
"image transformation",
"images",
"instance segmentation",
"keras",
"keypoint detection",
"keypoints",
"machine learning",
"machine learning tools",
"masks",
"medical imaging",
"microscopy",
"object counting",
"object detection",
"optimized performance",
"panoptic segmentation",
"pose estimation",
"python library",
"pytorch",
"quality inspection",
"real-time processing",
"robotics vision",
"satellite imagery",
"semantic segmentation",
"tensorflow",
"volumetric data",
"volumetric masks",
]
license = "AGPL-3.0-only"
license-files = [
"LICENSE",
"LICENSING.md",
"THIRD_PARTY_NOTICES.md",
"THIRD_PARTY_LICENSES/MIT-Albumentations-2.0.8.txt",
]
maintainers = [ { name = "Vladimir Iglovikov" } ]
authors = [ { name = "Vladimir Iglovikov" } ]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"albucore==0.2.18",
"numkong>=7.8.0",
"numpy>=2.2.6",
"pydantic>=2.12.4",
"pyyaml>=6.0.3",
"scipy>=1.15.3",
"typing-extensions>=4.9.0",
]
[project.optional-dependencies]
contrib = ["opencv-contrib-python>=5.0.0.93"]
contrib-headless = ["opencv-contrib-python-headless>=5.0.0.93"]
gui = ["opencv-python>=5.0.0.93"]
headless = ["opencv-python-headless>=5.0.0.93"]
hub = ["huggingface-hub"]
pillow = ["pillow"]
pyvips = ["pyvips[binary]"]
text = ["pillow"]
[tool.uv.sources]
torch = { index = "pytorch-cpu" }
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[dependency-groups]
ci-test = [
"albu-spec>=0.0.6",
"deepdiff>=9.1.0",
"defusedxml>=0.7.1",
"eval-type-backport>=0.4.0",
"huggingface-hub>=1.27.0",
"hypothesis>=6.165.5",
"opencv-python-headless>=5.0.0.93",
"pillow>=12.3.0",
"pyvips[binary]>=3.1.1",
"pytest>=9.1.1",
"pytest-mock>=3.15.1",
"pytest-randomly>=4.1.0",
"pytest-xdist>=3.8.0",
"pytz>=2026.3.post1",
"requests>=2.34.2",
"scikit-image>=0.25.2",
"scikit-learn>=1.7.2",
"tomli>=2.4.1",
]
ci-quality = [
"defusedxml>=0.7.1",
"google-docstring-parser>=0.0.11",
"hypothesis>=6.165.5",
"opencv-python-headless>=5.0.0.93",
"packaging>=26.3",
"pillow>=12.3.0",
"pre-commit>=4.6.2",
"pytest>=9.1.1",
"ruff>=0.16.2",
"tomli>=2.4.1",
]
ci-types = [
"mypy>=2.3.0",
"opencv-python-headless>=5.0.0.93",
"pre-commit>=4.6.2",
"pyrefly>=1.2.0",
"types-PyYAML>=6.0.12.20260724",
"types-setuptools>=84.0.0.20260812",
]
ci-security = [
"pip-audit>=2.10.1",
"zizmor>=1.29.0",
]
ci-package = [
"pytest>=9.1.1",
"twine>=7.0.0",
]
ci-benchmark = [
"asv",
"opencv-python-headless>=5.0.0.93",
]
ci-release = [
{ include-group = "ci-benchmark" },
{ include-group = "ci-test" },
{ include-group = "ci-package" },
{ include-group = "ci-security" },
"cyclonedx-bom>=7.3.1",
]
ci-torch-cpu = [
"torch>=2.13.0",
]
dev = [
{ include-group = "ci-test" },
{ include-group = "ci-quality" },
{ include-group = "ci-types" },
{ include-group = "ci-security" },
{ include-group = "ci-package" },
{ include-group = "ci-benchmark" },
{ include-group = "ci-release" },
]
[project.urls]
Homepage = "https://albumentations.ai"
Documentation = "https://albumentations.ai/docs/"
"Commercial Licensing" = "https://albumentations.ai/pricing"
Repository = "https://github.com/albumentations-team/AlbumentationsX"
Changelog = "https://github.com/albumentations-team/AlbumentationsX/releases"
Discord = "https://discord.gg/AKPrrDYNAt"
"Bug Tracker" = "https://github.com/albumentations-team/AlbumentationsX/issues"
[tool.hatch.build.targets.wheel]
packages = ["albumentations"]
[tool.hatch.build]
exclude = [
"CLA.md",
"tests",
"tools",
"benchmark",
"docs",
"legal",
"THIRD_PARTY_LICENSES/OFL-1.1.txt",
".github",
".codex",
"conda.recipe",
]
[tool.ruff]
target-version = "py310"
line-length = 120
indent-width = 4
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"setup.py",
"site",
"site-packages",
"venv",
]
format.indent-style = "space"
format.quote-style = "double"
format.line-ending = "auto"
format.skip-magic-trailing-comma = false
lint.select = [ "ALL" ]
lint.ignore = [
"ANN001",
"ANN204",
"ANN401",
"ARG001",
"ARG002",
"B006",
"B008",
"B027",
"COM812",
"CPY001", # The repository carries one canonical AGPL notice instead of per-module copyright headers.
"D102", # We handle method docstrings with custom hook
"D104",
"D105",
"D106",
"D107",
"D203",
"D205",
"D213",
"D400",
"D401",
"D404",
"D415",
"EM101",
"EM102",
"F403",
"FBT001",
"FBT002",
"FBT003",
"G004",
"PLC0415",
"PLR0913",
"PLR0917", # Preserve the positional compatibility of existing public transforms and functional APIs.
"PLR2004",
"S310",
"S311",
"S608",
"TC001",
"TC002",
"TC003",
"TRY003",
]
lint.per-file-ignores."albumentations/augmentations/mixing/functional.py" = ["E501"]
lint.per-file-ignores."tools/*" = [
"ANN201",
"D100",
"D101",
"D103",
"INP001",
"SLF001",
"T201",
]
lint.per-file-ignores."tests/*" = [
"A001",
"A002",
"ANN",
"ARG005",
"B017",
"B904",
"BLE001",
"C401",
"C408",
"C901",
"D100",
"D101",
"D103",
"D417",
"E501",
"ERA001",
"F811",
"INP001",
"N802",
"N803",
"N806",
"N812",
"NPY002",
"PERF401",
"PGH003",
"PLR0912",
"PT006",
"PT007",
"PT011",
"PT018",
"PT030",
"PT031",
"RUF003",
"RUF005",
"RUF059",
"S101",
"S105",
"S324",
"SIM102",
"SIM108",
"SIM117",
"SLF001",
"T201",
]
[tool.mypy]
plugins = [ "pydantic.mypy" ]
python_version = "3.10"
ignore_missing_imports = true
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disable_error_code = [ "valid-type" ]
disallow_untyped_defs = true
# Strict checking for the instance-binding boundary modules so the StackedMasks4D NewType brand
# (and other structural contracts in Compose's transform loop / mixing transforms) keep being
# enforced at typecheck time. Any apply_to_masks override that returns a raw np.ndarray instead
# of StackedMasks4D will break CI here via the default [return-value] / [assignment] errors.
# warn_return_any is intentionally NOT enabled because numpy's typing returns Any from most ops,
# which would drown the StackedMasks4D signal in unrelated noise.
[[tool.mypy.overrides]]
module = [
"albumentations.core.composition",
"albumentations.augmentations.mixing.transforms",
"albumentations.augmentations.mixing.functional",
"albumentations.augmentations.geometric.transforms",
"albumentations.augmentations.geometric.flip",
"albumentations.augmentations.crops.transforms",
"albumentations.pytorch.transforms",
]
strict_equality = true
warn_unused_ignores = true
[tool.pyrefly]
python-version = "3.10"
project-includes = ["albumentations"]
ignore-missing-imports = [
"PIL",
"PIL.Image",
"huggingface_hub",
"huggingface_hub.utils",
"pyvips",
"torch",
"torch.utils.data",
]
project-excludes = [
"**/__pycache__",
".venv",
"build",
"dist",
]
[tool.pydocstyle]
lint.explicit-preview-rules = true
lint.fixable = [ "ALL" ]
lint.unfixable = [ ]
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
lint.pydocstyle.convention = "google"
lint.pydocstyle.ignore-magic-methods = true
[tool.albumentations.maintainers]
emeritus = [
"Alexander Buslaev",
"Alex Parinov",
"Eugene Khvedchenya",
"Mikhail Druzhinin",
]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.codeflash]
# All paths are relative to this pyproject.toml's directory.
module-root = "albumentations"
tests-root = "tests"
test-framework = "pytest"
ignore-paths = [ ]
formatter-cmds = [ "ruff check --exit-zero --fix $file", "ruff format $file" ]
[tool.pytest.ini_options]
minversion = "9.0"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--tb=short",
"--strict-config",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"pytorch: tests that require the PyTorch dependency profile",
"obb: tests for oriented bounding boxes",
"property: property-based invariant tests",
"regression: transform regression harness tests",
]
filterwarnings = [
"ignore::UserWarning",
"ignore::DeprecationWarning:torch.*",
"ignore::pytest_benchmark.logger.PytestBenchmarkWarning",
]
# Legacy/alternate config key for google-docstring-parser (same package).
[tool.google_docstring_parser]
paths = [ "albumentations" ]
require_param_types = true
exclude_files = [ "__init__.py" ]
verbose = false
check_references = true
# Pre-commit hook check-google-docstrings reads this section (see package README).
# Public transform preview metadata is checked separately in tests/test_docstrings.py.
# Each physical line must be <= 120 chars (ruff E501); do not disable E501 or use # noqa: E501.
# See .codex/skills/docstring-deep-dive and docs/contributing/coding_guidelines.md.
[tool.docstring_checker]
paths = [ "albumentations" ]
require_param_types = true
check_references = true
check_type_consistency = true
exclude_files = [ "__init__.py" ]
verbose = false
[tool.ax-rules.rules]
coding-guidance = true
docstring-format = true
naming-conflicts = true
public-transform-docstrings = true
readme-transform-docs = true