2023-07-01 01:59:31 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-07-06 11:18:27 +00:00
|
|
|
pythonOlder,
|
2024-05-12 00:09:22 +00:00
|
|
|
fetchFromGitHub,
|
2024-07-06 11:18:27 +00:00
|
|
|
|
|
|
|
# build-system
|
2024-03-03 06:23:18 +00:00
|
|
|
setuptools,
|
2024-07-06 11:18:27 +00:00
|
|
|
|
|
|
|
# dependencies
|
|
|
|
albucore,
|
|
|
|
eval-type-backport,
|
2023-07-01 01:59:31 +00:00
|
|
|
numpy,
|
2024-11-03 00:30:38 +00:00
|
|
|
opencv-python,
|
2024-07-06 11:18:27 +00:00
|
|
|
pydantic,
|
2023-07-01 01:59:31 +00:00
|
|
|
pyyaml,
|
|
|
|
scikit-image,
|
2024-10-20 17:10:21 +00:00
|
|
|
scipy,
|
2024-07-06 11:18:27 +00:00
|
|
|
|
2024-09-27 20:24:39 +00:00
|
|
|
# optional dependencies
|
|
|
|
huggingface-hub,
|
|
|
|
pillow,
|
|
|
|
|
|
|
|
# tests
|
2024-07-06 11:18:27 +00:00
|
|
|
deepdiff,
|
2023-07-01 01:59:31 +00:00
|
|
|
pytestCheckHook,
|
2024-07-06 11:18:27 +00:00
|
|
|
pytest-mock,
|
2024-03-17 21:11:18 +00:00
|
|
|
torch,
|
|
|
|
torchvision,
|
2023-07-01 01:59:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "albumentations";
|
2024-10-27 05:38:05 +00:00
|
|
|
version = "1.4.20";
|
2024-03-03 06:23:18 +00:00
|
|
|
pyproject = true;
|
2023-07-01 01:59:31 +00:00
|
|
|
|
2024-03-03 06:23:18 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-07-01 01:59:31 +00:00
|
|
|
|
2024-05-12 00:09:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "albumentations-team";
|
|
|
|
repo = "albumentations";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-10-27 05:38:05 +00:00
|
|
|
hash = "sha256-lyYbkO2J3kpZGk8Q3FYfRiQh+BdolCfeEcjlI3W/rIw=";
|
2023-07-01 01:59:31 +00:00
|
|
|
};
|
|
|
|
|
2024-10-20 16:49:30 +00:00
|
|
|
patches = [
|
|
|
|
./dont-check-for-updates.patch
|
|
|
|
];
|
|
|
|
|
2024-11-03 00:30:38 +00:00
|
|
|
pythonRelaxDeps = [ "opencv-python" ];
|
2023-07-01 01:59:31 +00:00
|
|
|
|
2024-03-03 06:23:18 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2024-07-06 11:18:27 +00:00
|
|
|
albucore
|
|
|
|
eval-type-backport
|
2023-07-01 01:59:31 +00:00
|
|
|
numpy
|
2024-11-03 00:30:38 +00:00
|
|
|
opencv-python
|
2024-05-12 00:09:22 +00:00
|
|
|
pydantic
|
2023-07-01 01:59:31 +00:00
|
|
|
pyyaml
|
|
|
|
scikit-image
|
2024-10-20 17:10:21 +00:00
|
|
|
scipy
|
2023-07-01 01:59:31 +00:00
|
|
|
];
|
|
|
|
|
2024-09-27 20:24:39 +00:00
|
|
|
optional-dependencies = {
|
|
|
|
hub = [ huggingface-hub ];
|
|
|
|
text = [ pillow ];
|
|
|
|
};
|
|
|
|
|
2023-07-01 01:59:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-03-03 06:23:18 +00:00
|
|
|
deepdiff
|
2023-07-01 01:59:31 +00:00
|
|
|
pytestCheckHook
|
2024-07-06 11:18:27 +00:00
|
|
|
pytest-mock
|
2024-03-17 21:11:18 +00:00
|
|
|
torch
|
|
|
|
torchvision
|
2023-07-01 01:59:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2024-09-27 20:24:39 +00:00
|
|
|
"test_pca_inverse_transform"
|
2023-07-01 01:59:31 +00:00
|
|
|
# this test hangs up
|
|
|
|
"test_transforms"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "albumentations" ];
|
|
|
|
|
2024-07-06 11:18:27 +00:00
|
|
|
meta = {
|
2023-07-01 01:59:31 +00:00
|
|
|
description = "Fast image augmentation library and easy to use wrapper around other libraries";
|
|
|
|
homepage = "https://github.com/albumentations-team/albumentations";
|
|
|
|
changelog = "https://github.com/albumentations-team/albumentations/releases/tag/${version}";
|
2024-07-06 11:18:27 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ natsukium ];
|
2023-07-01 01:59:31 +00:00
|
|
|
};
|
|
|
|
}
|