19 MobileNetV3 = fetchurl {
20 url = "https://download.pytorch.org/models/mobilenet_v3_small-047dcff4.pth";
21 hash = "sha256-BH3P9K3e+G6lvC7/E8lhTcEfR6sRYNCnGiXn25lPTh8=";
24 url = "https://download.pytorch.org/models/vit_b_16_swag-9ac1b537.pth";
25 hash = "sha256-msG1N42ZJ71sg3TODNVX74Dhs/j7wYWd8zLE3J0P2CU=";
27 EfficientNet = fetchurl {
28 url = "https://download.pytorch.org/models/efficientnet_b4_rwightman-23ab8bcd.pth";
29 hash = "sha256-I6uLzVvb72GnpDuRrcrYH2Iv1/NvtJNaVpgo13iIxE4=";
32 buildPythonPackage rec {
37 disabled = pythonOlder "3.8";
39 src = fetchFromGitHub {
42 rev = "refs/tags/v${version}";
43 hash = "sha256-B2IuNMTZnzBi6IxrHBoMDsmIcqGQpznd/2f1XKo1Oa4=";
51 propagatedBuildInputs = [
67 export HOME=$(mktemp -d)
69 # Checks with CNN are preloaded to avoid downloads in the check phase
70 mkdir -p $HOME/.cache/torch/hub/checkpoints/
71 ln -s ${MobileNetV3} $HOME/.cache/torch/hub/checkpoints/${MobileNetV3.name}
72 ln -s ${ViT} $HOME/.cache/torch/hub/checkpoints/${ViT.name}
73 ln -s ${EfficientNet} $HOME/.cache/torch/hub/checkpoints/${EfficientNet.name}
76 pythonImportsCheck = [
81 homepage = "https://idealo.github.io/imagededup/";
82 changelog = "https://github.com/idealo/imagededup/releases/tag/${src.rev}";
83 description = "Finding duplicate images made easy";
84 license = licenses.asl20;
85 maintainers = with maintainers; [ stunkymonkey ];