Actual-time face swap and video deepfake with a single click on and solely a single picture.
Disclaimer
This deepfake software program is designed to be a productive software for the AI-generated media business. It might help artists in animating customized characters, creating participating content material, and even utilizing fashions for clothes design.
We’re conscious of the potential for unethical purposes and are dedicated to preventative measures. A built-in examine prevents this system from processing inappropriate media (nudity, graphic content material, delicate materials like conflict footage, and many others.). We are going to proceed to develop this mission responsibly, adhering to the regulation and ethics. We could shut down the mission or add watermarks if legally required.
-
Moral Use: Customers are anticipated to make use of this software program responsibly and legally. If utilizing an actual particular person’s face, get hold of their consent and clearly label any output as a deepfake when sharing on-line.
-
Content material Restrictions: The software program consists of built-in checks to forestall processing inappropriate media, akin to nudity, graphic content material, or delicate materials.
-
Authorized Compliance: We adhere to all related legal guidelines and moral tips. If legally required, we could shut down the mission or add watermarks to the output.
-
Person Duty: We aren’t chargeable for end-user actions. Customers should guarantee their use of the software program aligns with moral requirements and authorized necessities.
By utilizing this software program, you agree to those phrases and decide to utilizing it in a fashion that respects the rights and dignity of others.
Customers are anticipated to make use of this software program responsibly and legally. If utilizing an actual particular person’s face, get hold of their consent and clearly label any output as a deepfake when sharing on-line. We aren’t chargeable for end-user actions.
TLDR; Stay Deepfake in simply 3 Clicks
1. Choose a face 2. Choose which digicam to make use of 3. Press dwell!
Options & Makes use of – All the things is in real-time
Mouth Masks
Retain your unique mouth for correct motion utilizing Mouth Masks
Face Mapping
Use completely different faces on a number of topics concurrently
Your Film, Your Face
Watch motion pictures with any face in real-time
Stay Present
Run Stay reveals and performances
Memes
Create Your Most Viral Meme But
Created utilizing Many Faces function in Deep-Stay-Cam
Omegle
Shock folks on Omegle
Set up (Guide)
Please bear in mind that the set up requires technical expertise and isn’t for rookies. Contemplate downloading the prebuilt model.
Click on to see the method
### Set up That is extra more likely to work in your pc however might be slower because it makes use of the CPU. **1. Arrange Your Platform** – Python (3.10 advisable) – pip – git – [ffmpeg](https://www.youtube.com/watch?v=OlNWCpFdVMA) – “`iex (irm ffmpeg.tc.ht)“` – [Visual Studio 2022 Runtimes (Windows)](https://visualstudio.microsoft.com/visual-cpp-build-tools/) **2. Clone the Repository**
git clone https://github.com/hacksider/Deep-Stay-Cam.git
cd Deep-Stay-Cam
**3. Obtain the Fashions** 1. [GFPGANv1.4](https://huggingface.co/hacksider/deep-live-cam/resolve/predominant/GFPGANv1.4.pth) 2. [inswapper_128_fp16.onnx](https://huggingface.co/hacksider/deep-live-cam/resolve/predominant/inswapper_128_fp16.onnx) Place these information within the “**fashions**” folder. **4. Set up Dependencies** We extremely advocate utilizing a `venv` to keep away from points. For Home windows:
python -m venv venv
venvScriptsactivate
pip set up -r necessities.txt
**For macOS:** Apple Silicon (M1/M2/M3) requires particular setup:
# Set up Python 3.10 (particular model is necessary)
brew set up [email protected]# Set up tkinter package deal (required for the GUI)
brew set up [email protected]
# Create and activate digital atmosphere with Python 3.10
python3.10 -m venv venv
supply venv/bin/activate
# Set up dependencies
pip set up -r necessities.txt
** In case one thing goes incorrect and you could reinstall the digital atmosphere **
# Deactivate the digital atmosphere
rm -rf venv# Reinstall the digital atmosphere
python -m venv venv
supply venv/bin/activate
# set up the dependencies once more
pip set up -r necessities.txt
**Run:** If you do not have a GPU, you may run Deep-Stay-Cam utilizing `python run.py`. Notice that preliminary execution will obtain fashions (~300MB). ### GPU Acceleration **CUDA Execution Supplier (Nvidia)** 1. Set up [CUDA Toolkit 11.8.0](https://developer.nvidia.com/cuda-11-8-0-download-archive) 2. Set up dependencies:
pip uninstall onnxruntime onnxruntime-gpu
pip set up onnxruntime-gpu==1.16.3
3. Utilization:
python run.py --execution-provider cuda
**CoreML Execution Supplier (Apple Silicon)** Apple Silicon (M1/M2/M3) particular set up: 1. Be sure to’ve accomplished the macOS setup above utilizing Python 3.10. 2. Set up dependencies:
pip uninstall onnxruntime onnxruntime-silicon
pip set up onnxruntime-silicon==1.13.1
3. Utilization (necessary: specify Python 3.10):
python3.10 run.py --execution-provider coreml
**Necessary Notes for macOS:** – You **should** use Python 3.10, not newer variations like 3.11 or 3.13 – At all times run with `python3.10` command not simply `python` when you’ve got a number of Python variations put in – When you get error about `_tkinter` lacking, reinstall the tkinter package deal: `brew reinstall [email protected]` – When you get mannequin loading errors, examine that your fashions are within the right folder – When you encounter conflicts with different Python variations, take into account uninstalling them: “`bash # Listing all put in Python variations brew listing | grep python # Uninstall conflicting variations if wanted brew uninstall –ignore-dependencies [email protected] [email protected] # Maintain solely Python 3.10 brew cleanup “` **CoreML Execution Supplier (Apple Legacy)** 1. Set up dependencies:
pip uninstall onnxruntime onnxruntime-coreml
pip set up onnxruntime-coreml==1.13.1
2. Utilization:
python run.py --execution-provider coreml
**DirectML Execution Supplier (Home windows)** 1. Set up dependencies:
pip uninstall onnxruntime onnxruntime-directml
pip set up onnxruntime-directml==1.15.1
2. Utilization:
python run.py --execution-provider directml
**OpenVINO™ Execution Supplier (Intel)** 1. Set up dependencies:
pip uninstall onnxruntime onnxruntime-openvino
pip set up onnxruntime-openvino==1.15.0
2. Utilization:
python run.py --execution-provider openvino
Utilization
1. Picture/Video Mode
- Execute
python run.py
. - Select a supply face picture and a goal picture/video.
- Click on “Begin”.
- The output might be saved in a listing named after the goal video.
2. Webcam Mode
- Execute
python run.py
. - Choose a supply face picture.
- Click on “Stay”.
- Anticipate the preview to seem (10-30 seconds).
- Use a display seize software like OBS to stream.
- To vary the face, choose a brand new supply picture.
Ideas and Tips
Try these useful guides to get essentially the most out of Deep-Stay-Cam:
Go to our official weblog for extra suggestions and tutorials.
Command Line Arguments (Unmaintained)
choices:
-h, --help present this assist message and exit
-s SOURCE_PATH, --source SOURCE_PATH choose a supply picture
-t TARGET_PATH, --target TARGET_PATH choose a goal picture or video
-o OUTPUT_PATH, --output OUTPUT_PATH choose output file or listing
--frame-processor FRAME_PROCESSOR [FRAME_PROCESSOR ...] body processors (decisions: face_swapper, face_enhancer, ...)
--keep-fps maintain unique fps
--keep-audio maintain unique audio
--keep-frames maintain momentary frames
--many-faces course of each face
--map-faces map supply goal faces
--mouth-mask masks the mouth area
--video-encoder {libx264,libx265,libvpx-vp9} alter output video encoder
--video-quality [0-51] alter output video high quality
--live-mirror the dwell digicam show as you see it within the front-facing digicam body
--live-resizable the dwell digicam body is resizable
--max-memory MAX_MEMORY most quantity of RAM in GB
--execution-provider {cpu} [{cpu} ...] accessible execution supplier (decisions: cpu, ...)
--execution-threads EXECUTION_THREADS variety of execution threads
-v, --version present program's model quantity and exit
Searching for a CLI mode? Utilizing the -s/–source argument will make the run program in cli mode.
Press
We’re at all times open to criticism and are prepared to enhance, that is why we did not cherry-pick something.
Credit
Contributions
Stars to the Moon 🚀