Skip to content

Commit

Permalink
Extraction: Added an option to skip outputting face images (deepfakes…
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlyon authored May 13, 2020
1 parent 815c843 commit 92bc9af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/cli/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,13 @@ def get_optional_arguments():
default=False,
group="settings",
help="Skip frames that already have detected faces in the alignments file"))
argument_list.append(dict(
opts=("-ssf", "--skip-saving-faces"),
action="store_true",
dest="skip_saving_faces",
default=False,
group="settings",
help="Skip saving out the face images"))
return argument_list


Expand Down
3 changes: 2 additions & 1 deletion scripts/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ def _run_extraction(self):
self._check_thread_error()
if is_final:
self._output_processing(extract_media, size)
self._output_faces(saver, extract_media)
if not self._args.skip_saving_faces:
self._output_faces(saver, extract_media)
if self._save_interval and (idx + 1) % self._save_interval == 0:
self._alignments.save()
else:
Expand Down

0 comments on commit 92bc9af

Please sign in to comment.