1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # dependencies 7 numpy, 8 pillow, 9 requests, 10 scipy, 11 torch, 12 torchvision, 13 tqdm, 14}: 15 16buildPythonPackage { 17 pname = "clean-fid"; 18 version = "0.1.35"; 19 format = "setuptools"; 20 21 src = fetchFromGitHub { 22 owner = "GaParmar"; 23 repo = "clean-fid"; 24 rev = "c8ffa420a3923e8fd87c1e75170de2cf59d2644b"; 25 hash = "sha256-fqBU/TmCXDTPU3KTP0+VYQoP+HsT2UMcZeLzQHKD9hw="; 26 }; 27 28 propagatedBuildInputs = [ 29 numpy 30 pillow 31 requests 32 scipy 33 torch 34 torchvision 35 tqdm 36 ]; 37 38 pythonImportsCheck = [ "cleanfid" ]; 39 40 # no tests1 41 doCheck = false; 42 43 meta = with lib; { 44 description = "PyTorch - FID calculation with proper image resizing and quantization steps [CVPR 2022]"; 45 homepage = "https://github.com/GaParmar/clean-fid"; 46 license = licenses.mit; 47 teams = [ teams.tts ]; 48 }; 49}