video-to-video synthesis
video-to-video synthesis
source video -> photorealistic video
(segmentation masks, sketches, and poses)
1. vid2vid youtube https://youtu.be/GrP_aOSXt5U
high-resolution(2K)
photorealistic
(여기까지는 pix2pixHD에서 해결)
temporally coherent한 video 생성(~30
초)
Cityscapes
좌상: input. 우상: pix2pixHD.
좌측 아래: COVST. 우측 아래: vid2vid (ours).
pix2pixHD, COVST: 건물,도로가 일관성이 없음.
sketch-to-face video
FaceForensics dataset
뉴스 리포터의 854 개 videos
pose-to-dance video
왼쪽: Lisa Rhee(training dataset)의 포즈(옷만 다르게 생성)
https://youtu.be/YU4tRHG-PSI
가운데와 오른쪽: 다른 댄서
학습한 적 없는 body shapes과 motions에도 가능
Future video prediction
Top left: ground truth. Top right: PredNet [42].
Bottom left: MCNet [65]. Bottom right: ours.
시간이 지나도 blurry하지 않음
Related Work
Unconditional video synthesis
VGAN [66] , MoCoGAN [64]
저해상도와 짧은 길이라는 한계.
Future video prediction
관찰된 몇개 프레임만 보고 그 다음 비디오를 예측.
시간 지날수록 blurry함
긴 주기 생성도 실패.
+) 근데 vid2vid 방법으로 해봤더니 잘된다.
Video-to-video synthesis
기존의 방법은
특정 문제(super-resolution,matting and blending, inpainting)
만 해결하도록 설계되어있음
+) vid2vid 는 확장성도 좋다.
HOW?
네트워크 구조 잘 만들고
objective function 잘 만들어서
mapping function을 학습
vid2vid를 이해하기위해 알면 좋은 논문
gan, dcgan, cgan,
pix2pix, perceptual loss, pix2pixHD
source images(sequence):
real images(source images랑 한쌍):
synthesized images:
Markov assumption
depends on three things:
1. the current source image
2. the past L source images
3. the past L generated images
L =2
a feed-forward network F
a feed-forward network F
1 is an image of all ones.
warped from the previous frame
hallucinate new pixels
a feed-forward network F
-> temporally coherent한 결과를 얻어냄
occlusion mask가 필요한 이유
이 추정은 도중에 물체가 가려지지 않을 때 정확하다. 따라서 가려진
부분을 추정하는 mask가 필요.
optical flow 아이디어가 나온 논문
COVST(coherent video style transfer)
based on pix2pixHD
ground truth optical flow를 직접 사용해서 실제 응용 불가능
COVST(coherent video style transfer)
optical flow를 통해 생성하는 이유
비디오 신호는 전후에 많은 양의 redundant 정보가 있다.
-> 현 프레임과 다음 프레임 사이의 optical flow가 알려져 있으면,
현 프레임을 왜곡하여 다음 프레임을 추정할 수 있다.
strong Foreground-background prior
(ref: Generating Videos with Scene Dynamics)
semantic segmentation masks 사용시에
foreground(차,행인)와 background(건물, 길) 지역을 나눌 수 있다.
strong Foreground-background prior 적용 후
Foreground-background
foreground model와 background model로 분해
+) mB,t 는 ground truth background mask
Foreground-background
background는 전반적인 변환이 있어서 optical flow가 꽤 정확히 추
정된다.
background hallucination function HB는 가려진 영역만 합성한다.
foreground 물체는 큰 모션을 가지고 작은 부분을 차지해서 optical
flow추청이 어렵다.
따라서 대부분의 foreground content를 합성해야 한다.
optical flow
: optical flow
: hallucinated image
: occlusion mask
W: optical flow prediction func, M: mask prediction function.
network architecture
M, W, H -> residual network architecture(고해상도를 위해)
occlusion mask가 binary가 아니고 0~1값
인 이유
“zoom in” 을 다루기 위해
물체가 카메라에 가까이 오는 상황에
이전 프레임을 warping 하는 방법만 쓰면
시간이 지날 수록 물체는 좀더 blurry해진다.
-> warped pixels와 newly synthesized pixels를 적절히 섞어서 해결
multiple discriminators 사용
: model collapse을 완화
image discriminator DI
랜덤으로 이미지 pair 추줄(from 1 to T)
image GAN loss(multi-scale PatchGAN)
video discriminator DV
랜덤으로 K개의 연속된 프레임 추출 (from K + 1 to T + 1)
video GAN loss(temporally multi-scale)
flow loss LW
1st: ground truth와 estimated flow
2nd: warping loss(warp the previous frame to the next frame)
where
LI is the GAN loss on DI ,
LV is the GAN loss on DV ,
LW(F) is the flow estimation loss.
feature matching loss
(match the statistics of features extracted by discriminators)
VGG feature matching loss
VGG로 진짜 이미지와 생성된 이미지의feature를 추출
그 features를 L1loss로 최소화
coarse-to-fine generator : 고해상도 처리
를 위해
512 x 256 -> 1024 x 512 -> 2048 x 1024
M과 W 함수는 모든 가중치를 공유
objective function
image GAN loss
video GAN loss
optical flow loss
feature matching loss
VGG feature matching loss
실제 구현
40 epochs
ADAM -> (B1, B2) = (0.5, 0.999)
lr = 0,0002
LSGAN loss
NVIDIA DGX1 (8 V100 GPUs, each with 16GB memory)
batch당 짧은 video 하나
학습시간 : 10 일
Cityscapes
Apolloscape
Ablation study
no background–foreground prior
no conditional video discriminator
no flow warping(only use H)
Future video prediction
관찰된 몇개 프레임만 보고 그 다음 비디오를 예측.
두 개의 tasks
1. future semantic segmentation masks 생성(sub-vid2vid)
2. 생성된 segmentation masks로 비디오 생성(vid2vid)
Cityscapes dataset
2048 x 1024 street scene videos (독일)
training set: 2975 videos(30 frames)
validation set: 500 videos(30 frames)
30프레임으로 학습했는데도 1200 프레임 생성 성공
ground truth 문제 해결
ground truth semantic segmentation masks 가 부족
->DeepLabV3(semantic segmentation network)사용해서 추가
ground truth flow 추출은 FlowNet2 사용
instance segmentation masks추출은 Mask R-CNN을 사용
Apolloscape dataset
Left: pix2pixHD. Center: COVST. Right: proposed.
73 street scene videos (베이징, 100~1000 frames)
training/validation 반반 나눠서 사용
Face video dataset
FaceForensics dataset
뉴스 리포터의 854 개 videos
training:704
validation:150
Dlib으로 sketches를 추출
background는 얼굴 바깥을 Canny edges로 추출
Canny edges
Dance video dataset
약 3 ~ 4분 YouTube dance videos
DensePose와 OpenPose로 pose 추출하고 둘을 concat해서 사용
training set 댄서 1명
test set 다른 댄스모션, 다른 댄서
multi-modal video synthesis
같은 input인데 도로 표면이 다름
도로 instance 제외하고 다른 instance의 feature vector를 고정한 결
과
Semantic manipulation
왼쪽: 나무 -> 건물
오른쪽: 건물 -> 나무
Human preference score
Amazon Mechanical Turk (AMT)
질문1 어느 쪽이 진짜 카메라로 찍은 비디오 같나요?
질문2 temporal coherence, image quality을 체크해주세요.
Fréchet Inception Distance (FID)
이미지 품질과 temporal consistency 측정
ResNeXt, I3D(3D CNN 모델)로 feature 추출
mean, covariance matrix 을 가지고 계산
Limitations and future work
1. 방향 바꾸는 차 합성시 문제
->3D 단서를 추가(depth maps)
2. 차 색깔이 점점 변함
-> object tracking 정보를 활용
3. semantic manipulations (나무->건물) -> visible
artifacts
->모델이 label shapes에 덜 민감하도록 학습
Multimodal synthesis
feature embedding scheme
instance-level semantic segmentation masks
encoder E를 학습
ground truth 이미지 xt를 d차원의 feature map으로 인코딩
d = 3
training
같은 object에 속한 모든 픽셀은 같은 feature vectors를 공유하기 위
해
feature map에 instance feature averaging을 적용
instance-averaged feature map zt와 semantic segmentation mask
st 으로 generator F을 학습한다.
학습이 끝나면,동일한 클래스에 속한 feature vectors를 mixture of
Gaussian distribution에 맞춥니다.
testing
각각의 object instance에 대한 feature vector을 샘플링
generator F는 feature vectors에 따라 다른 결과물을 생성

Vid2vid