Skip to content

Commit

Permalink
Add masker to Travis Tests
Browse files Browse the repository at this point in the history
Bugfix: Parallel VRAM calculation for non-gpu extractors
  • Loading branch information
torzdf committed Oct 28, 2019
1 parent 3b2eaa5 commit ef49d12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions _travis/simple_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def download_file(url, filename): # TODO: retry
return None


def extract_args(detector, aligner, in_path, out_path, args=None):
def extract_args(detector, aligner, masker, in_path, out_path, args=None):
""" Extraction command """
py_exe = sys.executable
_extract_args = "%s faceswap.py extract -i %s -o %s -D %s -A %s" % (
py_exe, in_path, out_path, detector, aligner
_extract_args = "%s faceswap.py extract -i %s -o %s -D %s -A %s -M %s" % (
py_exe, in_path, out_path, detector, aligner, masker
)
if args:
_extract_args += " %s" % args
Expand Down Expand Up @@ -141,7 +141,7 @@ def main():
exit(1)
vid_extract = run_test(
"Extraction video with cv2-dnn detector and cv2-dnn aligner.",
extract_args("Cv2-Dnn", "Cv2-Dnn", vid_path, pathjoin(vid_base, "faces"))
extract_args("Cv2-Dnn", "Cv2-Dnn", "extended", vid_path, pathjoin(vid_base, "faces"))
)

img_path = download_file(img_src, pathjoin(img_base, "test_img.jpg"))
Expand All @@ -150,7 +150,7 @@ def main():
exit(1)
run_test(
"Extraction images with cv2-dnn detector and cv2-dnn aligner.",
extract_args("Cv2-Dnn", "Cv2-Dnn", img_base, pathjoin(img_base, "faces"))
extract_args("Cv2-Dnn", "Cv2-Dnn", "extended", img_base, pathjoin(img_base, "faces"))
)

if vid_extract:
Expand Down
4 changes: 3 additions & 1 deletion plugins/extract/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ def _parallel_scaling(self):
If OOM errors are being reported, then these ratios should be relaxed some more
"""
retval = {2: 0.7,
retval = {0: 1.0,
1: 1.0,
2: 0.7,
3: 0.55,
4: 0.5,
5: 0.4}
Expand Down

0 comments on commit ef49d12

Please sign in to comment.