sczhou commited on
Commit
f75e5d7
·
unverified ·
1 Parent(s): 638853d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -6
README.md CHANGED
@@ -78,7 +78,7 @@ python basicsr/setup.py develop
78
 
79
  ### Quick Inference
80
 
81
- ##### Download Pre-trained Models:
82
  Download the facelib pretrained models from [[Google Drive](https://drive.google.com/drive/folders/1b_3qwrzY_kTQh0-SnBoGBgOrJ_PLZSKm?usp=sharing) | [OneDrive](https://entuedu-my.sharepoint.com/:f:/g/personal/s200094_e_ntu_edu_sg/EvDxR7FcAbZMp_MA9ouq7aQB8XTppMb3-T0uGZ_2anI2mg?e=DXsJFo)] to the `weights/facelib` folder. You can manually download the pretrained models OR download by runing the following command.
83
  ```
84
  python scripts/download_pretrained_models.py facelib
@@ -89,22 +89,24 @@ Download the CodeFormer pretrained models from [[Google Drive](https://drive.goo
89
  python scripts/download_pretrained_models.py CodeFormer
90
  ```
91
 
92
- ##### Prepare Testing Data:
93
  You can put the testing images in the `inputs/TestWhole` folder. If you would like to test on cropped and aligned faces, you can put them in the `inputs/cropped_faces` folder.
94
 
95
 
96
- ##### Testing on Face Restoration:
 
97
  ```
98
  # For cropped and aligned faces
99
  python inference_codeformer.py --w 0.5 --has_aligned --test_path [input folder]
100
-
 
101
  # For the whole images
102
  # Add '--bg_upsampler realesrgan' to enhance the background regions with Real-ESRGAN
103
  # Add '--face_upsample' to further upsample restorated face with Real-ESRGAN
104
  python inference_codeformer.py --w 0.7 --test_path [input folder]
105
  ```
106
 
107
- NOTE that *w* is in [0, 1]. Generally, smaller *w* tends to produce a higher-quality result, while larger *w* yields a higher-fidelity result.
108
 
109
  The results will be saved in the `results` folder.
110
 
@@ -127,4 +129,4 @@ This project is licensed under <a rel="license" href="https://github.com/sczhou/
127
  This project is based on [BasicSR](https://github.com/XPixelGroup/BasicSR). Some codes are brought from [Unleashing Transformers](https://github.com/samb-t/unleashing-transformers), [YOLOv5-face](https://github.com/deepcam-cn/yolov5-face), and [FaceXLib](https://github.com/xinntao/facexlib). We also adopt [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) to support background image enhancement. Thanks for their awesome works.
128
 
129
  ### Contact
130
- If you have any question, please feel free to reach me out at `[email protected]`.
 
78
 
79
  ### Quick Inference
80
 
81
+ #### Download Pre-trained Models:
82
  Download the facelib pretrained models from [[Google Drive](https://drive.google.com/drive/folders/1b_3qwrzY_kTQh0-SnBoGBgOrJ_PLZSKm?usp=sharing) | [OneDrive](https://entuedu-my.sharepoint.com/:f:/g/personal/s200094_e_ntu_edu_sg/EvDxR7FcAbZMp_MA9ouq7aQB8XTppMb3-T0uGZ_2anI2mg?e=DXsJFo)] to the `weights/facelib` folder. You can manually download the pretrained models OR download by runing the following command.
83
  ```
84
  python scripts/download_pretrained_models.py facelib
 
89
  python scripts/download_pretrained_models.py CodeFormer
90
  ```
91
 
92
+ #### Prepare Testing Data:
93
  You can put the testing images in the `inputs/TestWhole` folder. If you would like to test on cropped and aligned faces, you can put them in the `inputs/cropped_faces` folder.
94
 
95
 
96
+ #### Testing on Face Restoration:
97
+ [Note] when comparing our model in your paper, please run the following command indicating `--has_aligned` (for cropped and aligned faces), as the command for the whole image will involve a process of face-background fusion that may damage hair texture on the boundary, which leads to unfair comparison.
98
  ```
99
  # For cropped and aligned faces
100
  python inference_codeformer.py --w 0.5 --has_aligned --test_path [input folder]
101
+ ```
102
+ ```
103
  # For the whole images
104
  # Add '--bg_upsampler realesrgan' to enhance the background regions with Real-ESRGAN
105
  # Add '--face_upsample' to further upsample restorated face with Real-ESRGAN
106
  python inference_codeformer.py --w 0.7 --test_path [input folder]
107
  ```
108
 
109
+ Fidelity weight *w* lays in [0, 1]. Generally, smaller *w* tends to produce a higher-quality result, while larger *w* yields a higher-fidelity result.
110
 
111
  The results will be saved in the `results` folder.
112
 
 
129
  This project is based on [BasicSR](https://github.com/XPixelGroup/BasicSR). Some codes are brought from [Unleashing Transformers](https://github.com/samb-t/unleashing-transformers), [YOLOv5-face](https://github.com/deepcam-cn/yolov5-face), and [FaceXLib](https://github.com/xinntao/facexlib). We also adopt [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) to support background image enhancement. Thanks for their awesome works.
130
 
131
  ### Contact
132
+ If you have any question, please feel free to reach me out at `[email protected]`.