Unverified Commit ac065495 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python3Packages.lpips: init at 0.1.4 (#482810)

parents 930cb3db d05b7366
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -12076,6 +12076,11 @@
    githubId = 1198065;
    name = "Jeffrey David Johnson";
  };
  jeffcshelton = {
    github = "jeffcshelton";
    githubId = 77426854;
    name = "Jeff Shelton";
  };
  jefferyoo = {
    email = "oojefferywm@proton.me";
    github = "jefferyoo";
+49 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  numpy,
  scipy,
  setuptools,
  torch,
  torchvision,
  tqdm,
}:

buildPythonPackage (finalAttrs: {
  pname = "lpips";
  version = "0.1.4";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "richzhang";
    repo = "PerceptualSimilarity";
    tag = "v${finalAttrs.version}";
    hash = "sha256-dIQ9B/HV/2kUnXLXNxAZKHmv/Xv37kl2n6+8IfwIALE=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    numpy
    scipy
    torch
    torchvision
    tqdm
  ];

  # Tests require network access to download pretrained models.
  doCheck = false;

  pythonImportsCheck = [ "lpips" ];

  meta = {
    description = "Learned Perceptual Image Patch Similarity metric";
    homepage = "https://github.com/richzhang/PerceptualSimilarity";
    changelog = "https://github.com/richzhang/PerceptualSimilarity/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ jeffcshelton ];
  };
})
+2 −0
Original line number Diff line number Diff line
@@ -9180,6 +9180,8 @@ self: super: with self; {
  lpc-checksum = callPackage ../development/python-modules/lpc-checksum { };
  lpips = callPackage ../development/python-modules/lpips { };
  lrcalc-python = callPackage ../development/python-modules/lrcalc-python { };
  lrclibapi = callPackage ../development/python-modules/lrclibapi { };