1{ lib
2, albumentations
3, buildPythonPackage
4, cython
5, easydict
6, fetchPypi
7, insightface
8, matplotlib
9, mxnet
10, numpy
11, onnx
12, onnxruntime
13, opencv4
14, prettytable
15, pythonOlder
16, scikit-image
17, scikit-learn
18, tensorboard
19, testers
20, tqdm
21}:
22
23buildPythonPackage rec {
24 pname = "insightface";
25 version = "0.7.3";
26 format = "setuptools";
27
28 disabled = pythonOlder "3.8";
29
30 src = fetchPypi {
31 inherit pname version;
32 hash = "sha256-8ZH3GWEuuzcBj0GTaBRQBUTND4bm/NZ2wCPzVMZo3fc=";
33 };
34
35 nativeBuildInputs = [
36 cython
37 ];
38
39 propagatedBuildInputs = [
40 easydict
41 matplotlib
42 mxnet
43 numpy
44 onnx
45 onnxruntime
46 opencv4
47 scikit-learn
48 scikit-image
49 tensorboard
50 tqdm
51 albumentations
52 prettytable
53 ];
54
55 pythonImportsCheck = [
56 "insightface"
57 "insightface.app"
58 "insightface.data"
59 ];
60
61 passthru.tests.version = testers.testVersion {
62 package = insightface;
63 command = "insightface-cli --help";
64 # Doesn't support --version but we still want to make sure the cli is executable
65 # and returns the help output
66 version = "help";
67 };
68
69 doCheck = false; # Upstream has no tests
70
71 meta = with lib; {
72 description = "State-of-the-art 2D and 3D Face Analysis Project";
73 homepage = "https://github.com/deepinsight/insightface";
74 license = licenses.mit;
75 maintainers = with maintainers; [ oddlama ];
76 };
77}