face_morpher: init at unstable-2019-06-30
This commit is contained in:
parent
6609282c70
commit
daa5967b81
48
face_morpher/default.nix
Normal file
48
face_morpher/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{ lib, fetchurl, runCommandNoCC, buildPythonPackage, fetchFromGitHub, dlib, docopt, matplotlib, numpy, opencv4, scipy, model ? null }:
|
||||||
|
let
|
||||||
|
model' = if !isNull model then model else
|
||||||
|
fetchurl {
|
||||||
|
url = "http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2";
|
||||||
|
sha256 = "0bxr25mp6zpzk6icgrmnx7ph0qxs6bdgvjvjhrspmamr1sw2rp7v";
|
||||||
|
downloadToTemp = true;
|
||||||
|
postFetch = ''
|
||||||
|
bzcat $downloadedFile > $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
modelDir = runCommandNoCC "face_morpher-models" { } ''
|
||||||
|
install -Dm 444 ${lib.escapeShellArg model'} "$out/shape_predictor_68_face_landmarks.dat"
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "face_morpher";
|
||||||
|
version = "unstable-2019-06-30";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "alyssaq";
|
||||||
|
repo = pname;
|
||||||
|
rev = "7a30611cd9d33469e843cec9cfa23ccf819386a8";
|
||||||
|
sha256 = "09ahar661r5046gr3qsv2z22x50jz1bv116ci55fsvcjzv64rygw";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
dlib
|
||||||
|
docopt
|
||||||
|
matplotlib
|
||||||
|
numpy
|
||||||
|
opencv4
|
||||||
|
scipy
|
||||||
|
];
|
||||||
|
|
||||||
|
makeWrapperArgs = [ "--set DLIB_DATA_DIR ${lib.escapeShellArg modelDir}" ];
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A warper, morpher and averager for human faces";
|
||||||
|
homepage = "https://github.com/alyssaq/face_morpher";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ sbruder ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
deemix = callPythonPackage ./deemix { };
|
deemix = callPythonPackage ./deemix { };
|
||||||
|
|
||||||
|
face_morpher = callPythonPackage ./face_morpher { };
|
||||||
|
|
||||||
mpvScripts = prev.mpvScripts // {
|
mpvScripts = prev.mpvScripts // {
|
||||||
pitchcontrol = callPackage ./mpv-scripts/pitchcontrol { };
|
pitchcontrol = callPackage ./mpv-scripts/pitchcontrol { };
|
||||||
};
|
};
|
||||||
|
@ -72,6 +74,7 @@
|
||||||
VisiCut
|
VisiCut
|
||||||
cyanrip
|
cyanrip
|
||||||
deemix
|
deemix
|
||||||
|
face_morpher
|
||||||
oha
|
oha
|
||||||
snownews
|
snownews
|
||||||
textidote
|
textidote
|
||||||
|
|
Loading…
Reference in a new issue