Initial commit

This commit is contained in:
Oleksandr Chychkan
2020-07-06 19:04:19 -07:00
commit ec4d3fb23f
26 changed files with 902 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
mkdir -p .dfl
mkdir -p workspace
if [ ! -d .dfl/DeepFaceLab ]; then
echo "Cloning DeepFaceLab"
cd .dfl
git clone "https://github.com/iperov/DeepFaceLab.git"
fi
if [ ! -d .dfl/env ]; then
virtualenv -p python3 .dfl/env
fi
source .dfl/env/bin/activate
pip install -r requirements.txt
echo "Done."
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
rm -fr "$WORKSPACE/data_src/*"
rm -fr "$WORKSPACE/data_dst/*"
rm -fr "$WORKSPACE/model/*"
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" videoed extract-video \
--input-file "$WORKSPACE/data_src.*" \
--output-dir "$WORKSPACE/data_src"
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" videoed extract-video \
--input-file "$WORKSPACE/data_dst.*" \
--output-dir "$WORKSPACE/data_dst"
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" extract \
--input-dir "$WORKSPACE/data_src" \
--output-dir "$WORKSPACE/data_src/aligned" \
--detector manual
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" extract \
--input-dir "$WORKSPACE/data_src" \
--output-dir "$WORKSPACE/data_src/aligned" \
--detector s3fd
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" extract \
--input-dir "$WORKSPACE/data_src" \
--output-dir "$WORKSPACE/data_src/aligned" \
--detector s3fd \
--manual-fix
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" sort \
--input-dir "$WORKSPACE/data_src/aligned"
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" facesettool enhance \
--input-dir "$WORKSPACE/data_src/aligned"
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" extract \
--input-dir "$WORKSPACE/data_dst" \
--output-dir "$WORKSPACE/data_dst/aligned" \
--detector manual
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" extract \
--input-dir "$WORKSPACE/data_dst" \
--output-dir "$WORKSPACE/data_dst/aligned" \
--detector s3fd
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" extract \
--input-dir "$WORKSPACE/data_dst" \
--output-dir "$WORKSPACE/data_dst/aligned" \
--detector s3fd \
--manual-fix
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" sort \
--input-dir "$WORKSPACE/data_dst/aligned"
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" facesettool enhance \
--input-dir "$WORKSPACE/data_dst/aligned"
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" train \
--training-data-src-dir "$WORKSPACE/data_src/aligned" \
--training-data-dst-dir "$WORKSPACE/data_dst/aligned" \
--model-dir "$WORKSPACE/model" \
--model Quick96
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" train \
--training-data-src-dir "$WORKSPACE/data_src/aligned" \
--training-data-dst-dir "$WORKSPACE/data_dst/aligned" \
--model-dir "$WORKSPACE/model" \
--model SAEHD
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" merge \
--input-dir "$WORKSPACE/data_dst" \
--output-dir "$WORKSPACE/data_dst/merged" \
--output-mask-dir "$WORKSPACE/data_dst/merged_mask" \
--aligned-dir "$WORKSPACE/data_dst/aligned" \
--model-dir "$WORKSPACE/model" \
--model Quick96
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" merge \
--input-dir "$WORKSPACE/data_dst" \
--output-dir "$WORKSPACE/data_dst/merged" \
--output-mask-dir "$WORKSPACE/data_dst/merged_mask" \
--aligned-dir "$WORKSPACE/data_dst/aligned" \
--model-dir "$WORKSPACE/model" \
--model SAEHD
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" videoed video-from-sequence \
--input-dir "$WORKSPACE/data_dst/merged" \
--output-file "$WORKSPACE/result.mov" \
--reference-file "$WORKSPACE/data_dst.*" \
--include-audio \
--lossless
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" videoed video-from-sequence \
--input-dir "$WORKSPACE/data_dst/merged" \
--output-file "$WORKSPACE/result.mp4" \
--reference-file "$WORKSPACE/data_dst.*" \
--include-audio
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh
python "$DFL_MAIN" videoed video-from-sequence \
--input-dir "$WORKSPACE/data_dst/merged" \
--output-file "$WORKSPACE/result.mp4" \
--reference-file "$WORKSPACE/data_dst.*" \
--include-audio \
--lossless
+4
View File
@@ -0,0 +1,4 @@
DFL_MAIN=.dfl/DeepFaceLab/main.py
WORKSPACE=workspace
source .dfl/env/bin/activate