Step 1: Setting Up The Subject

The first thing you need to do is to get a good idea about the body of the person you would like to recreate in the video. The most important aspect being the shape of their head. There are two main ways to do this;

  1. Use a celebrity with a similar body and head shape.
  2. Use a prompt to create the desired body and head shape.

Use A Celebrity With A Similar Body And Head Shape.

You can use any image search engine and look at selections of celebrities that match the person you are creating.

Use A Prompt To Create The Body And Head Shape.

This would depend on the shot you are going for. If it’s just a head shot then focus on the body wont matter as much. But it is vital that the shape matches that of the target person you are trying to recreate.

Step 2: Preparing Media

Make sure there are no gaps in the filenames that you use for the target video and source image. Save them and move to the next step.

Getting The Source Image Ready

Make sure your source image has a clear full face looking towards the camera. Eyes open and mouth closed for best effect.
In our tests we found that .png files work best as sometimes the Ai will not be able to recognise the face for other file formats.

Getting The Target Video Ready

This would depend on the shot you are going for. If it’s just a head shot then focus on the body wont matter as much. But it is vital that the shape matches that of the target person you are trying to recreate.

Step 3: Process Video

Next use this Google Colab here and take the following steps;

https://colab.research.google.com/drive/1o2LG8e_kg174vPjI_OQ9Xs1r8U4BSk-w?usp=drive_link#scrollTo=nCKli1C-_EaO

  1. Run the “Clone roop repo and install dependencies” cell by clicking on the play button and wait until it’s completed. Ignore the error message saying to restart the runtime.
  2. Run the “download model” cell.
  3. While the model downloads click on the folder icon in the left hand sidebar.
  4. Drag the source image file and drop it in the sidebar.
  5. Drag the target video file and drop it in the sidebar.
  6. Once all the files are uploaded click on the 3 dots beside the source image file you just uploaded and select “copy path”.
  7. Then go to the final “Deepfake” cell and replace the source path in the cell with the path of the source file you just copied.
  8. Click on the 3 dots beside the target video file you just uploaded and select “copy path”.
  9. Then go to the final “Deepfake” cell and replace the target path in the cell with the path of the target video file you just copied.
  10. Run the final cell and wait for the process to complete. It should take 2 – 3 mins for a standard Pika Ai video of 3 seconds.
  11. Once completed a file called [swapped.mp4] will appear alongside the other files in the Google Colab directory.
  12. Your file is now ready to download.

Results

Now you should have the face in the source imaged mapped to the most prominent faces in your video. There are limitations to this technique. But we will be releasing later guides on how to work with multiple faces as well as using alternative methods to acheive these results. So follow our us to get notified first.