Skip to content
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

python3Packages.detectron2: init at 0.2.1 #120517

Closed
wants to merge 11 commits into from
71 changes: 71 additions & 0 deletions pkgs/development/python-modules/detectron2/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{ lib
, buildPythonPackage
, black
, cloudpickle
, cython
, fetchFromGitHub
, fetchPypi
, fvcore
, hydra-core
, matplotlib
, omegaconf
, pybind11
, pycocotools
, pydot
, pytest
, torch
, pyyaml
, tensorboard
, tqdm
, which
}:

buildPythonPackage rec {
name = "detectron2";
version = "0.6";

src = fetchFromGitHub {
owner = "facebookresearch";
repo = name;
rev = "v${version}";
sha256 = "1w6cgvc8r2lwr72yxicls650jr46nriv1csivp2va9k1km8jx2sf";
};

patchPhase = ''
piegamesde marked this conversation as resolved.
Show resolved Hide resolved
substituteInPlace setup.py --replace "black==21.4b2" "black>=21.4b2"
'';

nativeBuildInputs = [
which
];

propagatedBuildInputs = [
black
cython
piegamesde marked this conversation as resolved.
Show resolved Hide resolved
omegaconf
pybind11
pyyaml
torch
pydot
tqdm
cloudpickle
fvcore
matplotlib
pycocotools
tensorboard
hydra-core
];

doCheck = false;
piegamesde marked this conversation as resolved.
Show resolved Hide resolved

checkInputs = [
pytest
piegamesde marked this conversation as resolved.
Show resolved Hide resolved
];

meta = with lib; {
description = "Facebooks's next-generation platform for object detection, segmentation and other visual recognition tasks";
homepage = "https://github.com/facebookresearch/detectron2";
license = licenses.asl20;
maintainers = with maintainers; [ ];
piegamesde marked this conversation as resolved.
Show resolved Hide resolved
};
}
44 changes: 44 additions & 0 deletions pkgs/development/python-modules/fvcore/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchPypi
, iopath
, numpy
, pillow
, pyyaml
, tabulate
, termcolor
, tqdm
, yacs
}:

buildPythonPackage rec {
pname = "fvcore";
version = "0.1.5.post20221221";

src = fetchPypi {
inherit pname version;
hash = "sha256-8vsLuQVyrmUcEceOIEk+0ZsiQFUKfku7LW3oe90DeGA=";
};

# There's an actual, proper test failure in here. Might blow up later
doCheck = false;
piegamesde marked this conversation as resolved.
Show resolved Hide resolved

propagatedBuildInputs = [
numpy
yacs
pyyaml
tqdm
termcolor
pillow
tabulate
iopath
];

meta = with lib; {
description = "Collection of common code that's shared among different research projects in FAIR computer vision team";
homepage = "https://github.com/facebookresearch/fvcore";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}
36 changes: 36 additions & 0 deletions pkgs/development/python-modules/iopath/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, portalocker
, torch
, tqdm
}:

buildPythonPackage rec {
pname = "iopath";
version = "0.1.9";

src = fetchFromGitHub {
owner = "facebookresearch";
repo = "iopath";
rev = "v${version}";
hash = "sha256-Qubf/mWKMgYz9IVoptMZrwy4lQKsNGgdqpJB1j/u5s8=";
};

# A few tests do HTTP. One could disable them individually
piegamesde marked this conversation as resolved.
Show resolved Hide resolved
doCheck = false;

propagatedBuildInputs = [
tqdm
portalocker
torch
];

meta = with lib; {
description = "A python library that provides common I/O interface across different storage backends";
homepage = "https://github.com/facebookresearch/iopath";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}
10 changes: 8 additions & 2 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2464,6 +2464,8 @@ self: super: with self; {

detect-secrets = callPackage ../development/python-modules/detect-secrets { };

detectron2 = callPackage ../development/python-modules/detectron2 { };

devito = callPackage ../development/python-modules/devito { };

devolo-home-control-api = callPackage ../development/python-modules/devolo-home-control-api { };
Expand Down Expand Up @@ -3860,6 +3862,8 @@ self: super: with self; {

fuzzywuzzy = callPackage ../development/python-modules/fuzzywuzzy { };

fvcore = callPackage ../development/python-modules/fvcore { };

fvs = callPackage ../development/python-modules/fvs { };

fx2 = callPackage ../development/python-modules/fx2 { };
Expand Down Expand Up @@ -4681,10 +4685,10 @@ self: super: with self; {

hy = callPackage ../development/python-modules/hy { };

hydra-core = callPackage ../development/python-modules/hydra-core { };

hydra-check = callPackage ../development/python-modules/hydra-check { };

hydra-core = callPackage ../development/python-modules/hydra-core { };

hydrawiser = callPackage ../development/python-modules/hydrawiser { };

hydrus-api = callPackage ../development/python-modules/hydrus-api { };
Expand Down Expand Up @@ -4919,6 +4923,8 @@ self: super: with self; {

ionhash = callPackage ../development/python-modules/ionhash { };

iopath = callPackage ../development/python-modules/iopath { };

iotawattpy = callPackage ../development/python-modules/iotawattpy { };

iowait = callPackage ../development/python-modules/iowait { };
Expand Down