ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [DeepFake] 관련 논문 정리
    Paper Review/Face 2022. 2. 24. 16:40

    - 수정 중 -

    Tools  Key Features  Link 
    Faceswap_GAN(2018)  - Adversarial loss + Perceptual loss 
    - AutoEncoder architecture 
    https://github.com/shaoanlu/faceswap-GAN
    DeepFaceLab(2020)  - Expand from the Faceswap model 
    - Multiple face extraction modes 
    https://github.com/iperov/DeepFaceLab

    https://arxiv.org/abs/2005.05535
    FSGAN(2019) - Adjust to both pose and expression variations https://openaccess.thecvf.com/content_ICCV_2019/html/Nirkin_FSGAN_Subject_Agnostic_Face_Swapping_and_Reenactment_ICCV_2019_paper.html
    StyleGAN(2019) - New architecture leads to automatic, unsupervised separation of high-level attributes and scale-specific control of the synthesis of images https://openaccess.thecvf.com/content_CVPR_2019/html/Karras_A_Style-Based_Generator_Architecture_for_Generative_Adversarial_Networks_CVPR_2019_paper.html
    Face2Face(2016) - Animate the facial expressions of the target video by a source actor and re-render the manipulated output video in a photo-realistic fashion https://openaccess.thecvf.com/content_cvpr_2016/html/Thies_Face2Face_Real-Time_Face_CVPR_2016_paper.html
    Nerual Voice Puppetry(2020) - Method for audio-driven facial video synthesis 
    - Synthesize videos of a talking head from an audio sequence of another person using 3D face representation
    https://arxiv.org/pdf/1912.05566.pdf%22

    # Faceswap GAN 

    관련 Github 참고 

    # DeepFaceLab 

    DeepFaceLab은 face swapping 뿐만이 아니라 face detector, face recognition등의 다양한 module들로 완전한 파이프라인을 구성한다. 또한, 모든 코드가 오픈소스로 공개되어 있으며, defending deepfake에도 기여하였다. 

     

    이러한 파이프라인은 크게 Extraction, Training, Conversion 3개의 파이프라인으로 구성된다. 데이터는 source와 destination만 존재한다. 

    1. Extraction 

    Extraction과정에서는 입력 이미지로부터 만들어진 mask와 facial landmarks를 아래의 단계를 걸쳐 출력한다. 

    1.1 Face Detection

    입력 데이터로부터 target face를 찾는 과정. 여러 크기의 얼굴을 감지할 수 있는 S3FD의 default face detector를 사용한다. 

    1.2 Face Alignmnet 

    시간이 지나도 안정적으로 facial landmarks를 유지하는 algorithm을 사용하여 front/side view에 대한 facial landmark template을 만든다.

    1.3 Face Segmentation

    Face Alignment 이후 머리카락, 손가락, 안경 등 정확한 segmentation이 수행되도록 fine-grained Face segmentation network를 사용한다. 이를 통해 얼굴을 덮은 장애물들을 제거한다. 

     

    2. Training 

    Training 단계는 face swapping에 가장 중요한 역할을 맡는다. Source와 destination의 pair를 일치시키기 위한 2가지 structure(DF, LIAE)가 사용된다. 

    2.1 DF structure 

    DF structure는 encoder와 src와 dst 사이에 공유된 가중치를 가진 Inter, src와 dst에 별도로 속하는 두 개의 decoder로 구성된다. 공유된 encoder와 inter를 통해 src와 dst의 일반화가 진행되며, 이는 페어링되지 않은 문제를 쉽게 해결한다. 하지만, DF structure는 조명과 같은 충분한 정보를 dst로부터 상속할 수 없다.

    2.2 LIAE structure 

    LIAE structure는 이러한 빛에 대한 일관성 문제를 강화한다. Inter AB는 src와 dst의 latent code를 만들고 InterB는 dst의 latent code만을 만든다. InterAB에서 나온 src에 대한 latent code 두개를 concatenate 하고 InterAB에서 나온 dst에 대한 latent code와 InterB에서 나온 dst에 대한 latent code를 concatenate 한다. InterAB를 통해 well-aligned된 결과의 class를 dst로 방향을 바꾸기 위해 두 layer에서 추출된 dst에 대한 latent code를 concatenate한다. 이후, decoder에 들어가고 mask와 함께 예측된 src(dst)를 얻는다. Generalization과 clarity를 위해 DSSIM와 MSE loss를 혼합한 mixed loss를 사용한다. 

    3. Conversion 

    Conversion 과정에서는 src를 dst로 변환하며 출력을 더 매끄럽게 만들어준다. 첫 번째로, dst decoder를 통해 src의 원래 위치로 마스크와 함께 생성된 얼굴로 변환한다.

     

    두번째로 외부 윤곽을 따라 대상 이미지와 매끄럽게 맞도록 재연하는 블렌딩 과정이다. 안정된 안색을 유지하기 위해  5개의 색상 전달 알고리즘(Reinhard color transfer, iterative distribution transfer)을 추가로 제공한다. 블렌딩은 특히 재연된 얼굴과 구분된 영역 및 대상 얼굴 사이의 교차점에서 다양한 피부톤, 얼굴 모양 및 조명 조건을 고려해야 한다. 이것은 Poisson blending을 통해 구현한다. 

     

    마지막으로, pre-trained face super-resolution nueral network를 추가하여 blended face을 더욱 선명하게 구현한다. 

     

    # FSGAN 

    FSGAN은 단순히 얼굴만 swap하지 않는 face reenactment와 segmentation, inpainting, blending 세 가지 모듈을 통합한 GAN-based 모델이다. 

     

    # StyleGAN 

    StyleGAN은 새로운 style-based generator 구조를 사용하여 생성되는 이미지의 attribute(성별, 연령, 스타일,...)에 대한 조절을 가능하게 한다. 학습 데이터셋이 어떤 분포를 갖고 있을지 모르니 GAN에 random noise를 바로 넣어주지 않고 학습 데이터셋과 비슷한 확률 분포를 갖도록 non-linear하게 mapping을 우선적으로 하고 mapping된 latent vector(w)를 입력으로 사용하는 모델이다.  

    따라서, 기존의 GAN과는 다르게 mapping network를 통해 intermediate vector(w)로 변환한 후 이미지를 생성한다. 이를 통해 visual attribute를 조절하기 간편해진다. 

     

    이러한 w는 Synthesis network에서 이미지를 생성하는 과정에 style을 각 단계에 입히는 데 사용된다. 또한, 같은 사람이라도 다를 수 있는 머리카락, 주름 등의 요소를 사실적으로 보이게 하기 위해 synthesis network의 각 단계에 random noise를 함께 추가해준다. 

     

     

     

    참고 
    Deep Learning for Deepfakes Creation and Detection: A Survey
    https://arxiv.org/abs/1909.11573
Designed by Tistory.