MobileStyleGAN.pytorch
initial public release
공식 Pytorch 구현

함께 제공되는 비디오는 YouTube에서 찾을 수 있습니다. 자세한 내용은 종이를 참조하십시오.
pip install -r requirements.txt
python train.py --cfg configs/mobile_stylegan_ffhq.json --gpus < n_gpus > 당사의 프레임 워크는 Rosinality/Stylegan2-Pytorch의 StyleGan2 Checkpoints 형식을 지원합니다. CKPT를 StyleGan2의 자신의 체크 포인트를 프레임 워크로 변환하려면 다음과 같습니다.
python convert_rosinality_ckpt.py --ckpt < path_to_rosinality_stylegan2_ckpt > --ckpt-mnet < path_to_output_mapping_network_ckpt > --ckpt-snet < path_to_output_synthesis_network_ckpt > --cfg-path < path_to_output_config_json >체크 포인트가 올바르게 변환되었는지 확인하려면 데모 시각화 만 실행하십시오.
python demo.py --cfg < path_to_output_config_json > --ckpt " " --generator teacherpython generate.py --cfg configs/mobile_stylegan_ffhq.json --device cuda --ckpt < path_to_ckpt > --output-path < path_to_store_imgs > --batch-size < batch_size > --n-batches < n_batches > FID 점수를 평가하기 위해 수정 된 버전의 Pytorch-Fid 라이브러리를 사용합니다.
python evaluate_fid.py < path_to_ref_dataset > < path_to_generated_imgs > Mobilestylegan을 사용하여 데모 시각화 실행 :
python demo.py --cfg configs/mobile_stylegan_ffhq.json --ckpt < path_to_ckpt >Stylegan2 vs. Mobilestylegan을 사용하여 시각적 비교 실행 :
python compare.py --cfg configs/mobile_stylegan_ffhq.json --ckpt < path_to_ckpt > python train.py --cfg configs/mobile_stylegan_ffhq.json --ckpt < path_to_ckpt > --export-model onnx --export-dir < output_dir > python train.py --cfg configs/mobile_stylegan_ffhq.json --ckpt < path_to_ckpt > --export-model coreml --export-dir < output_dir > OpenVino 프레임 워크를 사용하여 Edge Devices에서 모델을 배포하는 예로서 외부 라이브러리 Random_face를 제공합니다.
| 이름 | 버팀대 |
|---|---|
| Mobilestylegan_ffhq.ckpt | 7.75 |
(*) 당사의 프레임 워크는 자동 다운로드 사전화 모델을 지원하며 --ckpt <pretrined_model_name> 만 사용하십시오.
| 암호 | 원천 | 특허 |
|---|---|---|
| 맞춤형 커다 커널 | https://github.com/nvlabs/stylegan2 | NVIDIA 라이센스 |
| Stylegan2 블록 | https://github.com/rosinality/stylegan2-pytorch | MIT |
우리는 우리의 프로젝트에 기여한 사람들에게 감사의 말씀을 전하고 싶습니다 ::
이 작업의 결과와 코드를 사용하는 경우 다음과 같이 인용하십시오.
@misc{belousov2021mobilestylegan,
title={MobileStyleGAN: A Lightweight Convolutional Neural Network for High-Fidelity Image Synthesis},
author={Sergei Belousov},
year={2021},
eprint={2104.04767},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@article{BELOUSOV2021100115,
title = {MobileStyleGAN.pytorch: PyTorch-based toolkit to compress StyleGAN2 model},
journal = {Software Impacts},
year = {2021},
issn = {2665-9638},
doi = {https://doi.org/10.1016/j.simpa.2021.100115},
url = {https://www.sciencedirect.com/science/article/pii/S2665963821000452},
author = {Sergei Belousov},
}