우리의 일에 관심을 가져 주셔서 감사합니다. Real-Esrgan의 애니메이션 이미지 및 비디오 에 대한 작은 모델 에 대한 새로운 업데이트를 확인할 수도 있습니까 ?
GFPGAN은 실제 얼굴 복원을위한 실용적인 알고리즘을 개발하는 것을 목표로합니다.
그것은 맹인 얼굴 복원을 위해 사전 간면 간 ( 예 : Stylegan2)에 캡슐화 된 풍부하고 다양한 사전을 활용합니다.
faq.md에서 자주 묻는 질문을 자주 찾을 수 있습니다.
업데이트
GFPGAN이 사진/프로젝트에 도움이된다면이 리포지기를 도와 주거나 친구에게 추천하십시오. 감사해요? 기타 권장 프로젝트 :
[종이] [프로젝트 페이지] [데모]
Xintao Wang, Yu Li, Honglun Zhang, Ying Shan
응용 연구 센터 (ARC), Tencent PCG
우리는 이제 깨끗한 버전의 GFPGAN을 제공하며, 이는 맞춤형 CUDA 확장증이 필요하지 않습니다.
이 논문에서 원본 모델을 사용하려면 설치를 위해서는 PaperModel.md를 참조하십시오.
복제 레포
git clone https://github.com/TencentARC/GFPGAN.git
cd GFPGAN종속 패키지를 설치하십시오
# Install basicsr - https://github.com/xinntao/BasicSR
# We use BasicSR for both training and inference
pip install basicsr
# Install facexlib - https://github.com/xinntao/facexlib
# We use face detection and face restoration helper in the facexlib package
pip install facexlib
pip install -r requirements.txt
python setup.py develop
# If you want to enhance the background (non-face) regions with Real-ESRGAN,
# you also need to install the realesrgan package
pip install realesrgan예를 들어 v1.3 버전을 취합니다. 더 많은 모델이 여기에서 찾을 수 있습니다.
미리 훈련 된 모델 다운로드 : gfpganv1.3.pth
wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -P experiments/pretrained_models추론!
python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1.3 -s 2 Usage: python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1.3 -s 2 [options]...
-h show this help
-i input Input image or folder. Default: inputs/whole_imgs
-o output Output folder. Default: results
-v version GFPGAN model version. Option: 1 | 1.2 | 1.3. Default: 1.3
-s upscale The final upsampling scale of the image. Default: 2
-bg_upsampler background upsampler. Default: realesrgan
-bg_tile Tile size for background sampler, 0 for no tile during testing. Default: 400
-suffix Suffix of the restored faces
-only_center_face Only restore the center face
-aligned Input are aligned faces
-ext Image extension. Options: auto | jpg | png, auto means using the same extension as inputs. Default: auto이 논문에서 원래 모델을 사용하려면 설치 및 추론은 PaperModel.md를 참조하십시오.
| 버전 | 모델 이름 | 설명 |
|---|---|---|
| v1.3 | gfpganv1.3.pth | v1.2에 기초하고; 보다 자연스러운 복원 결과; 매우 낮은 품질 / 고품질 입력에 대한 더 나은 결과. |
| v1.2 | gfpgancleanv1-noce-c2.pth | 색상화 없음; CUDA 확장이 필요하지 않습니다. 사전 프로세싱으로 더 많은 데이터로 교육을 받았습니다. |
| v1 | gfpganv1.pth | 색상화와 함께 종이 모델. |
비교는 비교됩니다 .md.
v1.3은 항상 v1.2보다 낫지는 않습니다. 목적과 입력에 따라 다른 모델을 선택해야 할 수도 있습니다.
| 버전 | 강점 | 약점 |
|---|---|---|
| v1.3 | ✓ 자연 출력 ✓ 매우 낮은 품질의 입력에 대한 결과 ✓ 상대적으로 고품질 입력에 대해 작업하십시오 ✓ (2 회) 복원을 반복 할 수 있습니다 | ✗별로 날카 롭지 않습니다 ✗ 정체성에 약간의 변화가 있습니다 |
| v1.2 | ✓ 더 선명한 출력 ✓ 뷰티 메이크업과 함께 | ∎ 일부 출력은 부자연 스럽습니다 |
여기에서 더 많은 모델 (예 : 판별 자)을 찾을 수 있습니다 : [Google Drive] 또는 [Tencent Cloud 腾讯微云]
우리는 GFPGAN (논문에서 사용)에 대한 교육 코드를 제공합니다.
자신의 요구에 따라 개선 할 수 있습니다.
팁
절차
(얼굴 구성 요소 랜드 마크가 필요하지 않은 간단한 버전 ( options/train_gfpgan_v1_simple.yml )을 시도 할 수 있습니다.)
데이터 세트 준비 : FFHQ
미리 훈련 된 모델 및 기타 데이터를 다운로드하십시오. experiments/pretrained_models 폴더에 넣으십시오.
구성 파일 options/train_gfpgan_v1.yml 에 따라 수정하십시오.
훈련
Python -m Torch.diptributed.launch ---nproc_per_node = 4 ---master_port = 22021 gfpgan/train.py -opt 옵션/train_gfpgan_v1.yml --- launcher pytorch
GFPGAN은 Apache 라이센스 버전 2.0에 따라 릴리스됩니다.
@InProceedings{wang2021gfpgan,
author = {Xintao Wang and Yu Li and Honglun Zhang and Ying Shan},
title = {Towards Real-World Blind Face Restoration with Generative Facial Prior},
booktitle={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2021}
}
질문이 있으시면 [email protected] 또는 [email protected] 으로 이메일을 보내주십시오.