nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python3Packages.mask-rcnn: fix for recent keras

+17
+17
pkgs/development/python-modules/mask-rcnn/default.nix
··· 1 1 { buildPythonPackage 2 2 , cython 3 3 , fetchFromGitHub 4 + , fetchpatch 4 5 , h5py 5 6 , imgaug 6 7 , ipython ··· 26 25 rev = "3deaec5d902d16e1daf56b62d5971d428dc920bc"; 27 26 sha256 = "13s3q9yh2q9m9vyksd269mww3bni4q2w7q5l419q70ca075qp8zp"; 28 27 }; 28 + 29 + patches = [ 30 + # Fix for TF2: 31 + # https://github.com/matterport/Mask_RCNN/issues/2734 32 + (fetchpatch { 33 + url = "https://github.com/BupyeongHealer/Mask_RCNN_tf_2.x/commit/7957839fe2b248f2f22c7e991ead12068ddc6cfc.diff"; 34 + excludes = [ "mrcnn/model.py" ]; 35 + sha256 = "sha256-70BGrx6X1uJDA2025f0YTlreT2uB3n35yIzuhf+ypVc="; 36 + }) 37 + ]; 38 + 39 + # Fix for recent Keras 40 + postPatch = '' 41 + substituteInPlace mrcnn/model.py \ 42 + --replace "KE." "KL." 43 + ''; 29 44 30 45 nativeBuildInputs = [ cython ]; 31 46