lol

Merge pull request #215197 from bcdarwin/pytorch-grad-cam

python310Packages.grad-cam: init at 1.4.6

authored by

Martin Weinelt and committed by
GitHub
ecc96be9 71f22e3a

+67
+65
pkgs/development/python-modules/grad-cam/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchPypi 4 + , pythonOlder 5 + , matplotlib 6 + , numpy 7 + , opencv4 8 + , pillow 9 + , scikitlearn 10 + , torch 11 + , torchvision 12 + , ttach 13 + , tqdm 14 + }: 15 + 16 + buildPythonPackage rec { 17 + pname = "grad-cam"; 18 + version = "1.4.6"; 19 + disabled = pythonOlder "3.6"; 20 + format = "pyproject"; 21 + 22 + src = fetchPypi { 23 + inherit pname version; 24 + hash = "sha256-sL4+UUfC60JWAgJPvXeVGUHAskuoceVYwYDrYlibUOE="; 25 + }; 26 + 27 + postPatch = '' 28 + substituteInPlace requirements.txt --replace "opencv-python" "opencv" 29 + ''; 30 + 31 + propagatedBuildInputs = [ 32 + matplotlib 33 + numpy 34 + opencv4 35 + pillow 36 + scikitlearn 37 + torchvision 38 + ttach 39 + tqdm 40 + ]; 41 + 42 + # Let the user bring their own instance (as with torchmetrics) 43 + buildInputs = [ 44 + torch 45 + ]; 46 + 47 + doCheck = false; # every nontrivial test tries to download a pretrained model 48 + 49 + pythonImportsCheck = [ 50 + "pytorch_grad_cam" 51 + "pytorch_grad_cam.metrics" 52 + "pytorch_grad_cam.metrics.cam_mult_image" 53 + "pytorch_grad_cam.metrics.road" 54 + "pytorch_grad_cam.utils" 55 + "pytorch_grad_cam.utils.image" 56 + "pytorch_grad_cam.utils.model_targets" 57 + ]; 58 + 59 + meta = with lib; { 60 + description = "Advanced AI explainability for computer vision."; 61 + homepage = "https://jacobgil.github.io/pytorch-gradcam-book"; 62 + license = licenses.mit; 63 + maintainers = with maintainers; [ bcdarwin ]; 64 + }; 65 + }
+2
pkgs/top-level/python-packages.nix
··· 4065 4065 4066 4066 gql = callPackage ../development/python-modules/gql { }; 4067 4067 4068 + grad-cam = callPackage ../development/python-modules/grad-cam { }; 4069 + 4068 4070 gradient = callPackage ../development/python-modules/gradient { }; 4069 4071 4070 4072 gradient-utils = callPackage ../development/python-modules/gradient-utils { };