"Do as I do!" - studying the impersonator

The most interesting and promising developments in the field of AI are related to neural networks. Today we will consider Impersonator ++ to gain experience in the field of Deep fake.





Currently, the most interesting and promising developments in the field of AI are related to neural networks.





They make it possible to achieve great success in the field of computer vision, video and image conversion.





, Deep fake, . .





( ) . , , , .





2020 Deep fake «» : , .





«». Impersonator++. , «», . :





, , , .





« », DeepFake , . , , .





Impersonator++ Linux Windows, CUDA, gcc 7.5+, ffmpeg (ffprobe). : https://www.impersonator.org. , Impersonator++.





.





. .





!apt-get install ffmpeg #  ffmpeg
import os
os.environ["CUDA_HOME"] = "/usr/local/cuda-10.1" #  CUDA_HOME
!echo $CUDA_HOME
      
      



github :





!git clone https://github.com/iPERDance/iPERCore.git
cd /content/iPERCore/
!python setup.py develop
      
      



, :





!wget -O assets/checkpoints.zip "https://download.impersonator.org/iper_plus_plus_latest_checkpoints.zip"
!unzip -o assets/checkpoints.zip -d assets/
!rm assets/checkpoints.zip
!wget -O assets/samples.zip  "https://download.impersonator.org/iper_plus_plus_latest_samples.zip"
!unzip -o assets/samples.zip -d  assets
!rm assets/samples.zip
      
      



, , :





import os
import os.path as osp
import platform
import argparse
import time
import sys
import subprocess
from IPython.display import HTML
from base64 import b64encode
      
      



:





gpu_ids = "0"

#  
image_size = 512
#  -     2,   ,     num_source
num_source = 2
#   ,    ,    
assets_dir = "/content/iPERCore/assets"

#    
output_dir = "./results"

#          
work_assets_dir = os.path.join("./assets")

if not os.path.exists(work_asserts_dir):
    os.symlink(osp.abspath(assets_dir), osp.abspath(work_assets_dir),
               target_is_directory=(platform.system() == "Windows"))

cfg_path = osp.join(work_assets_dir, "configs", "deploy.toml")
      
      



, , :





model_id = “ident_remove_mask_multi”

#   ,    
src_path = “\”path?=/persons/person1.png\””

#     ,  , 
ref_path = "\"path?=/movement/remove_the_mask/act1.mp4\""

!python -m iPERCore.services.run_imitator  \
  --gpu_ids     $gpu_ids       \
  --num_source  $num_source    \
  --image_size  $image_size    \
  --output_dir  $output_dir    \
  --model_id    $model_id      \
  --cfg_path    $cfg_path      \
  --src_path    $src_path      \
  --ref_path    $ref_path
      
      



, , mp4 . :





, – , – .





, . .





, , , , .





So far, people can recognize most of the materials obtained with the help of DeepFake with the naked eye, but progress does not stand still, and we believe that it is worth developing / preparing systems for recognizing such imitations already now. But this is a separate topic. It should also be noted that a tool can bring not only harm, but also benefit - it all depends on the hands in which it falls. And in the hands of filmmakers, advertising agencies, educational funds, this tool, with further development, can create many interesting things.








All Articles