Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Includes schedule copied from v2. Persitant progress and automatically restarts from last checkpoint. Uses prefetch_generator to increase GPU utilization. Previews are saved as png files. Losses are plotted using matplotlib. After 40000 iterations videos are automatically converted. This script requires a specific folder structure:
from-person/extracted-faces (folder with extracted faces of "face-donor")
to-person/extracted-faces (folder with extracted faces of "body-donor")
to-person/to-swap/ (video files to be converted)
These folders will automatically be created:
to-person/models (weights files, progress file, loss plot)
to-person/models/preview/ (images of conversions)
to-person/swapped/ (converted videos with new face)
Invoke like this:
python3 make-fake.py --source-dir ../data/cage --target-dir ../data/trump
There is a lot of cleanup to be done in this script, but it should be functional as-is.