1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 gdown,
11 keras,
12 numpy,
13 opencv-python,
14 pillow,
15 tensorflow,
16 tf-keras,
17
18 # tests
19 pytestCheckHook,
20}:
21
22buildPythonPackage rec {
23 pname = "retinaface";
24 version = "0.0.17";
25 pyproject = true;
26
27 src = fetchFromGitHub {
28 owner = "serengil";
29 repo = "retinaface";
30 tag = "v${version}";
31 hash = "sha256-0s1CSGlK2bF1F2V/IuG2ZqD7CkNfHGvp1M5C3zDnuKs=";
32 };
33
34 # requires internet connection
35 disabledTestPaths = [
36 "tests/test_actions.py"
37 "tests/test_align_first.py"
38 "tests/test_expand_face_area.py"
39 ];
40
41 build-system = [ setuptools ];
42
43 dependencies = [
44 gdown
45 keras
46 numpy
47 opencv-python
48 pillow
49 tensorflow
50 tf-keras
51 ];
52
53 nativeCheckInputs = [ pytestCheckHook ];
54
55 pythonImportsCheck = [ "retinaface" ];
56
57 meta = {
58 description = "Deep Face Detection Library for Python";
59 homepage = "https://github.com/serengil/retinaface";
60 changelog = "https://github.com/serengil/retinaface/releases/tag/v${version}";
61 license = lib.licenses.mit;
62 maintainers = with lib.maintainers; [ derdennisop ];
63 };
64}