2019-12-20 06:17:01 +01:00
|
|
|
{ buildPythonPackage
|
2020-02-13 06:39:40 +01:00
|
|
|
, fetchFromGitHub
|
2019-12-20 06:17:01 +01:00
|
|
|
, imageio
|
2020-02-15 06:52:22 +01:00
|
|
|
, imagecorruptions
|
2019-12-20 06:17:01 +01:00
|
|
|
, numpy
|
|
|
|
, opencv3
|
|
|
|
, pytest
|
|
|
|
, scikitimage
|
|
|
|
, scipy
|
|
|
|
, shapely
|
|
|
|
, six
|
|
|
|
, stdenv
|
|
|
|
}:
|
2018-08-03 14:39:55 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "imgaug";
|
2020-02-13 06:39:40 +01:00
|
|
|
version = "0.4.0";
|
2018-08-03 14:39:55 +02:00
|
|
|
|
2020-02-13 06:39:40 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aleju";
|
|
|
|
repo = "imgaug";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "17hbxndxphk3bfnq35y805adrfa6gnm5x7grjxbwdw4kqmbbqzah";
|
2018-08-03 14:39:55 +02:00
|
|
|
};
|
|
|
|
|
2019-12-20 06:17:01 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "opencv-python-headless" ""
|
|
|
|
substituteInPlace setup.py \
|
2020-02-13 06:39:40 +01:00
|
|
|
--replace "opencv-python-headless" ""
|
2019-12-20 06:17:01 +01:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--xdoctest --xdoctest-global-exec=\"import imgaug as ia\nfrom imgaug import augmenters as iaa\"" ""
|
|
|
|
'';
|
|
|
|
|
2018-08-03 14:39:55 +02:00
|
|
|
propagatedBuildInputs = [
|
2019-12-20 06:17:01 +01:00
|
|
|
imageio
|
2020-02-15 06:52:22 +01:00
|
|
|
imagecorruptions
|
2018-08-03 14:39:55 +02:00
|
|
|
numpy
|
|
|
|
opencv3
|
2019-12-20 06:17:01 +01:00
|
|
|
scikitimage
|
|
|
|
scipy
|
|
|
|
shapely
|
2018-08-03 14:39:55 +02:00
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2019-12-20 06:17:01 +01:00
|
|
|
checkPhase = ''
|
2020-02-15 06:52:22 +01:00
|
|
|
pytest ./test
|
2019-12-20 06:17:01 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ opencv3 pytest ];
|
2018-08-03 14:39:55 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/aleju/imgaug";
|
2018-08-03 14:39:55 +02:00
|
|
|
description = "Image augmentation for machine learning experiments";
|
|
|
|
license = licenses.mit;
|
2019-12-20 06:17:01 +01:00
|
|
|
maintainers = with maintainers; [ cmcdragonkai rakesh4g ];
|
|
|
|
platforms = platforms.linux;
|
2018-08-03 14:39:55 +02:00
|
|
|
};
|
|
|
|
}
|