Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.
/ Awesome-Deep-Fake Public archive

Explore deepfake tech powered by AI. Craft unique content responsibly using free AI tools.

License

Notifications You must be signed in to change notification settings

mejbass/Awesome-Deep-Fake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Creating a Deepfake Video

Awesome Refacer Colab Notebook

Dive into the world of deepfake technology fueled by AI advancements. While making unique content is more accessible, ethical use is vital. This post guides you through creating a deepfake responsibly with free AI tools.

As we explore the fascinating world of deepfake technology, it's imperative that we approach this powerful tool with a sense of responsibility and ethics. Remember, with great power comes great responsibility.

DALL-E-2023-11-22-12 09 42---Create-a-3_2-aspect-ratio--high-resolution-header-image-for-an-educational-project-titled--Creating-a-Deepfake-Video---The-Trailer- -The-image-should-

Exemple:

I integrated my face into a scene from Mr. Robot, putting a personalized twist on Rami Malek's iconic role.

Mejbass.Mr.Robot.mp4

Tips for Responsible Deepfake Creation

  • Consent is Key: Always obtain explicit consent from individuals whose likenesses you wish to use.
  • Integrity Matters: Ensure that the content you create is never harmful or defamatory.
  • Purposeful Creation: Strive to make content that is fun or serves a productive purpose.
  • Reflect Before You Act: Before publishing or sharing a deepfake video, consider its impact.

This project is a profound opportunity to engage with AI in a way that can illuminate its potential for good. Let's set an example for the responsible use of AI and build a community that prioritizes ethical considerations in all our technological endeavors.

We trust in your judgment and creativity.

  • Remember:

  • Consent is Key

  • Integrity Matters

  • Purposeful Creation

  • Reflect Before You Act

Content Preparation

Before delving into the creation process, gather the essential files required for a seamless deep fake video production:

  • Source Video: Select a video that you wish to deep clone.
  • Target Faces Images: Obtain images of the faces you intend to manipulate.
  • Replacement Faces Images: Collect images of the faces that will replace the original faces in the target video.

Refacer

To facilitate the deepfake creation process, we’ll be using a tool called Refacer. You can check out the Tool on GitHub.

This tool enables you to create deepfakes with multiple faces with just one click! It is powered by the excellent Insightface and inspired by Roop.

For instructions on how to use Refacer, refer to the Refacer Documentation.

Instantiating and Running Refacer on Google Colab

Initiate the installation and setup process by clicking the play button on the Refacer Colab notebook. This action allocates the necessary resources and installs the required packages.

AAI-P001-01

AAI-P001-02

Accessing Refacer Webapp

After completion, the program will provide a link to access the application used for deep clone creation. This is a temporary link that you can use to use Refacer on the web.

AAI-P001-03

Running Refacer Locally

In case you face difficulties running Refacer on Google Colab, follow the below steps to running it locally on your computer.

In case you face difficulties running Refacer on Google Colab. Follow the below steps to running it locally on your computer.

First create a folder that you will put your files in. Then go ahead and download this file inswapper_128.onnx and place it inside the folder you just created.

Then open the terminal and navigate to the folder you just created and copy paste the following commands one by one to run them.

  1. Clone the Refacer repository: Use the following command to clone the Refacer repository from GitHub:

    git clone https://github.com/xaviviro/refacer.git
    
  2. Navigate to the refacer directory: Depending on your operating system, use one of the following commands:

    • For Linux/Mac:
      cd refacer
      
    • For Windows:
      chdir refacer
      
  3. Update requirements.txt: Open the requirements.txt file and replace gradio==3.33.1 with gradio==3.36.1. Save and close the file.

  4. Install packages: Install the required packages by running the following command:

    pip install -r requirements.txt
    
  5. Run the app: Start the Refacer application by executing the following command:

    python app.py
    
  6. Access the application: Finally, open your web browser and navigate to the following address:

    http://127.0.0.1:7680
    

You're now ready to use Refacer locally on your computer!

Finaly, open your web browser and navigate to the following address: http://127.0.0.1:7680

Through Google Colab

You can access the Refacer through Google Colab by following this link: refacer_colab.ipynb

Introducing the Refacer Webapp

The Refacer web application comprises four main sections:

  1. Original Video Upload
  2. Target Faces Placement
  3. Replacement Faces Placement
  4. Output File Display

AAI-P001-04

Upload the required files

Upload the respective files to their designated sections and click “Reface” (The big orange button at the bottom of the page). This action initiates a process that will “reface” all frames in the video using the provided faces. Please note that this process may take some time.

Refacing - Let's Go!!

Upon clicking “Reface” the process begins, showcasing the transformation of the video frames. Monitor the progress as the deepfake video takes shape.

AAI-P001-07

Accessing the Output File

The output file is accessible on the Refacer web app. However, if the video does not appear promptly, check the Colab file for a completion message indicating the location of the refaced video.

AAI-P001-08

AAI-P001-09

Refacer Not Working?

If you have difficulty with Refacer, try out these alternative tools.

Done!

Congratulations, you have successfully created your first deepfake video.

Remember:

  • Consent is Key
  • Integrity Matters
  • Purposeful Creation
  • Reflect Before You Act

Questions? Feedback? Requests? Discord: Samej2023

Disclaimer for Refacer

⚠️ This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

⚠️ This software is intended for educational and research purposes only. It is not intended for use in any malicious activities. The author of this software does not condone or support the use of this software for any harmful actions, including but not limited to identity theft, invasion of privacy, or defamation. Any use of this software for such purposes is strictly prohibited.

⚠️ You may only use this software with images for which you have the right to use and the necessary permissions. Any use of images without the proper rights and permissions is strictly prohibited.

⚠️ The author of this software is not responsible for any misuse of the software or for any violation of rights and privacy resulting from such misuse.

⚠️ To prevent misuse, the software contains an integrated protective mechanism that prevents it from working with illegal or similar types of media.

⚠️ By using this software, you agree to abide by all applicable laws, to respect the rights and privacy of others, and to use the software responsibly and ethically.