New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pythonPackages.face_recognition: init at 1.2.1 #37566
Conversation
|
||
propagatedBuildInputs = [ pillow click dlib numpy face_recognition_models scipy ]; | ||
|
||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, they're not available with pypi
, moving to fetchFromGitHub
+ active tests, just did some fast bootstrapping in an isolated environment, but you're right, active tests are way better %)
sha256 = "1kwnv3qpy5bhspk780bkyg8jd9n5f6p91ja6sjlwk1wcm00d56xp"; | ||
}; | ||
|
||
# no module named `tests` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are simply no tests: https://github.com/ageitgey/face_recognition_models
|
||
meta = with stdenv.lib; { | ||
license = licenses.mit; | ||
homepage = https://pypi.python.org/pypi/face_recognition; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license = licenses.mit; | ||
homepage = https://pypi.python.org/pypi/face_recognition; | ||
maintainers = with maintainers; [ ma27 ]; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description
is missing
doCheck = false; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = https://pypi.python.org/pypi/face_recognition_models; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
homepage = https://pypi.python.org/pypi/face_recognition_models; | ||
license = licenses.cc0; | ||
maintainers = with maintainers; [ ma27 ]; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description
missing
cc00fce
to
9612646
Compare
@dotlambda thanks a lot for the feedback, added tests for |
@GrahamcOfBorg build python2.pkgs.face_recognition python3.pkgs.face_recognition |
pname = "face_recognition"; | ||
version = "1.2.1"; | ||
|
||
src = fetchFromGitHub { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add a comment why you're fetching from GitHub, and maybe open an upstream issue about missing tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ma27 Did you open an issue?
Failure on x86_64-linux (full log) Attempted: python2.pkgs.face_recognition, python3.pkgs.face_recognition Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: python2.pkgs.face_recognition, python3.pkgs.face_recognition Partial log (click to expand)
|
Adds the python package `face_recognition` and its dependency `face_recognition_models`. This package is a wrapper for `dlib` which is able to detect faces in a given image. I checked the package with the following expression: ``` with import ./. { }; stdenv.mkDerivation { name = "facetest"; src = null; buildInputs = with pythonPackages; [ face_recognition ]; } ``` The package works perfectly fine in a `nix-shell`: ``` $ nix-shell [nix-shell:~]$ python Python 2.7.14 (default, Sep 16 2017, 17:49:51) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import face_recognition >>> img = face_recognition.load_image_file("/home/ma27/me.jpg") >>> print(face_recognition.face_locations(img)) ```
9612646
to
c268641
Compare
@dotlambda on python3 it was needed to set |
@GrahamcOfBorg build python2.pkgs.face_recognition python3.pkgs.face_recognition |
Success on x86_64-linux (full log) Attempted: python2.pkgs.face_recognition, python3.pkgs.face_recognition Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python2.pkgs.face_recognition, python3.pkgs.face_recognition Partial log (click to expand)
|
I tested this shortly and encountered
when using Python 2. There was no problem with Python 3. Did you test both versions? |
Yes I did (see the results of the REPL session I copied into the commit message). I actually use this library on a simple test project with Python 2.7 and the current derivation lives in my local Nix store (built with sandbox enabled).
|
just to document it here: upstream will create git tags for their releases from now on, so with the next bump we can get rid of using revs that point to PyPI releases (ageitgey/face_recognition#417 (comment)) |
The following fixes have been applied according to the changelog (https://github.com/ageitgey/face_recognition/releases) - Added the face_detection CLI command - Removed dependencies on scipy to make installation easier - Cleaned up KNN example and fixed a bug with drawing fonts to label detected faces in the demo Furthermore the maintainer switched to actual GIT tags for PyPI releases as discussed in ageitgey/face_recognition#417 and NixOS#37566
Motivation for this change
Adds the python package
face_recognition
and its dependencyface_recognition_models
.This package is a wrapper for
dlib
which is able to detect faces in agiven image. I checked the package with the following expression:
The package works perfectly fine in a
nix-shell
:Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)