Skip to content

Commit

Permalink
Merge pull request #3 from kex0/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
kex0 committed Jun 5, 2023
2 parents bdb501b + d5d3209 commit 7033df8
Show file tree
Hide file tree
Showing 8 changed files with 627 additions and 289 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install -r requirements.txt
- run: pip install gdown
- run: gdown 14JzEMo8ScLinvBkl7QEvYvFEi7EBXNAt
- run: ./run.py -f=.github/examples/face.jpg -t=.github/examples/target.mp4 -o=.github/examples/output.mp4
- run: ffmpeg -i .github/examples/snapshot.mp4 -i .github/examples/output.mp4 -filter_complex "psnr" -f null -

- run: pip install -r requirements.txt gdown
- run: gdown 13QpWFWJ37EB-nHrEOY64CEtQWY-tz7DZ
- run: python run.py -f=.github/examples/face.jpg -t=.github/examples/target.mp4 -o=.github/examples/output.mp4
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@ options:
replace this face
-o OUTPUT_FILE, --output OUTPUT_FILE
save output to this file
--gpu use gpu
--keep-fps maintain original fps
--keep-frames keep frames directory
--all-faces swap all faces in frame
--max-memory MAX_MEMORY
maximum amount of RAM in GB to be used
--max-cores CORES_COUNT
number of cores to be use for CPU mode
--all-faces swap all faces in frame
--cpu-cores CPU_CORES
number of CPU cores to use
--gpu-threads GPU_THREADS
number of threads to be use for the GPU
--gpu-vendor {apple,amd,intel,nvidia}
choice your GPU vendor
```

Looking for a CLI mode? Using the -f/--face argument will make the program in cli mode.
Expand All @@ -58,6 +61,7 @@ Looking for a CLI mode? Using the -f/--face argument will make the program in cl
- [ ] Support for replacing multiple faces

## Credits
- [henryruhs](https://github.com/henryruhs): for being an irreplacable contributor to the project
- [ffmpeg](https://ffmpeg.org/): for making video related operations easy
- [deepinsight](https://github.com/deepinsight): for their [insightface](https://github.com/deepinsight/insightface) project which provided a well-made library and models.
- and all developers behind libraries used in this project.
9 changes: 6 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
--extra-index-url https://download.pytorch.org/whl/cu118

numpy==1.23.5
opencv-python==4.7.0.72
onnx==1.14.0
insightface==0.7.3
psutil==5.9.5
tk==0.1.0
pillow==9.5.0
torch==2.0.1
onnxruntime==1.15.0; sys_platform == 'darwin'
torch==2.0.1+cu118
onnxruntime==1.15.0; sys_platform == 'darwin' and platform_machine != 'arm64'
onnxruntime-silicon==1.13.1; sys_platform == 'darwin' and platform_machine == 'arm64'
onnxruntime-gpu==1.15.0; sys_platform != 'darwin'
tensorflow==2.13.0rc1; sys_platform == 'darwin'
tensorflow==2.12.0; sys_platform != 'darwin'
opennsfw2==0.10.2
protobuf==4.23.2
tqdm==4.65.0
tqdm==4.65.0
Loading

0 comments on commit 7033df8

Please sign in to comment.