about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorlucasew <lucas59356@gmail.com>2023-12-27 14:07:03 -0300
committerlucasew <lucas59356@gmail.com>2023-12-27 14:07:03 -0300
commit06d11b26394d7de3e92b274d2bf8d2701ebb67e6 (patch)
tree8517a9d9d1e62f2cf04d9e72cc2cb9726be0a665 /pkgs
parent260a9311a61bfbb89b408559d9f4272aa9846dad (diff)
python3Packages.facenet-pytorch: init at 2.5.3
Signed-off-by: lucasew <lucas59356@gmail.com>
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/facenet-pytorch/default.nix29
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/facenet-pytorch/default.nix b/pkgs/development/python-modules/facenet-pytorch/default.nix
new file mode 100644
index 0000000000000..153408761c0af
--- /dev/null
+++ b/pkgs/development/python-modules/facenet-pytorch/default.nix
@@ -0,0 +1,29 @@
+{ buildPythonPackage
+, fetchPypi
+, pillow
+, torchvision
+, lib
+}:
+
+buildPythonPackage rec {
+  pname = "facenet-pytorch";
+  version = "2.5.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-mMxbQqSPg3wCPrkvKlcc1KxqRmh8XnG56ZtJEIcnPis=";
+  };
+
+  doCheck = false; # pypi version doesn't ship with tests
+
+  pythonImportsCheck = ["facenet_pytorch"];
+
+  propagatedBuildInputs = [ pillow torchvision ];
+
+  meta = {
+    description = "Pretrained Pytorch face detection (MTCNN) and facial recognition (InceptionResnet) models";
+    homepage = "https://github.com/timesler/facenet-pytorch";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.lucasew ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 34a8f1c78313d..7107025092b61 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3833,6 +3833,8 @@ self: super: with self; {
 
   face-recognition = callPackage ../development/python-modules/face-recognition { };
 
+  facenet-pytorch = callPackage ../development/python-modules/facenet-pytorch { };
+
   face-recognition-models = callPackage ../development/python-modules/face-recognition/models.nix { };
 
   factory-boy = callPackage ../development/python-modules/factory-boy { };