728x90
반응형
VToonify
- paper https://arxiv.org/abs/2209.11224
- 원본 이미지의 input 값을 어느 정도 degree로 변환할지 변경 가능
- 기존의 StyleGAN에서 영상을 Toonify 진행시 발생하는 단점인 해상도 문제를 해결했다.
- Toonify와 DualStyleGAN 모델 둘다 지원 (www.mmlab-ntu.com/project/vtoonify/)
null - multi-scale content condition으로 원본 이미지와 stylegan의 변환 이미지를 합쳤다.(Trainable Fusion Module 사용)
- 기존 StyleGAN은 영상 변환시 부자연스러움을 개선
- reference style에 따라 변환 가능
- pre-trained model 제공 (정말 감사!)
- 상업적 사용 불가 주의
null
VToonifynull
M1 Mac에서 CPU로 구동
- M1 MAC은 CUDA가 없으므로 stylegan에서 제공하는 cpu 버전의 모듈로 바꿔준다.
# vtoonify의 model.stylegan.model.py 파일에서 metric 불러오는 부분의 모듈을 op_cpu로 바꿔준다.
# op -> op_cpu
from model.stylegan.op_cpu import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix
# parameter style_degree 0~1 Toonify 정도
optional arguments:
-h, --help show this help message and exit
--content CONTENT path of the content image/video
--style_id STYLE_ID the id of the style image
--style_degree STYLE_DEGREE
style degree for VToonify-D
--color_transfer transfer the color of the style
--ckpt CKPT path of the saved model
--output_path OUTPUT_PATH
path of the output images
--scale_image resize and crop the image to best fit the model
--style_encoder_path STYLE_ENCODER_PATH
path of the style encoder
--exstyle_path EXSTYLE_PATH
path of the extrinsic style code
--faceparsing_path FACEPARSING_PATH
path of the face parsing model
--video if true, video stylization; if false, image stylization
--cpu if true, only use cpu
--backbone BACKBONE dualstylegan | toonify
--padding PADDING PADDING PADDING PADDING
left, right, top, bottom paddings to the face center
--batch_size BATCH_SIZE
batch size of frames when processing video
--parsing_map_path PARSING_MAP_PATH
path of the refined parsing map of the target video
Result
- cartoon 빼고는 다 징그러워 보인다.
- 모델과 train util 또한 제공되므로 고흐풍~, spongebob풍 등 dataset 적용해 볼 수 있을 거 같다.
- style_degree 조절 가능
null
반응형
'Deep Learning' 카테고리의 다른 글
[ASR, ] Deepspeech2 (0) | 2023.02.22 |
---|---|
[NVIDIA RIVA] ngc 등록 (0) | 2023.01.27 |
ViT(Vision in Transformer) Review (0) | 2022.12.19 |
Tensor 가지고 놀기 [Einsum + einops] (0) | 2022.12.17 |
[Computer Vision] Image Modul Pillow import Error (0) | 2022.12.14 |