1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 numpy,
6 opencv4,
7 lxml,
8 xmljson,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "imantics";
14 version = "0.1.12";
15 format = "setuptools";
16
17 src = fetchFromGitHub {
18 owner = "jsbroks";
19 repo = "imantics";
20 rev = "76d81036d8f92854d63ad9938dd76c718f8b482e";
21 sha256 = "1zv2gj8cbakhh2fyr2611cbqhfk37a56x973ny9n43y70n26pzm8";
22 };
23
24 propagatedBuildInputs = [
25 numpy
26 opencv4
27 lxml
28 xmljson
29 ];
30
31 postPatch = ''
32 substituteInPlace setup.py \
33 --replace "'opencv-python>=3'," ""
34 '';
35
36 nativeCheckInputs = [ pytestCheckHook ];
37
38 pythonImportsCheck = [ "imantics" ];
39
40 meta = with lib; {
41 description = "Convert and visualize many annotation formats for object dectection and localization";
42 homepage = "https://github.com/jsbroks/imantics";
43 license = with licenses; [ mit ];
44 maintainers = [ maintainers.rakesh4g ];
45 };
46}