Fix typos discovered by codespell (#95)

* Improve performance

* !fixup Fix typo discovered by codespell

* fixup! Fix typo discovered by codespell

* fixup! Add codespell to lint process
This commit is contained in:
Christian Clauss
2021-09-27 08:53:03 +02:00
committed by GitHub
parent aa584e05bc
commit 14247a89d9
4 changed files with 6 additions and 5 deletions

View File

@@ -20,11 +20,12 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 yapf isort pip install codespell flake8 isort yapf
# modify the folders accordingly # modify the folders accordingly
- name: Lint - name: Lint
run: | run: |
codespell
flake8 . flake8 .
isort --check-only --diff realesrgan/ scripts/ inference_realesrgan.py setup.py isort --check-only --diff realesrgan/ scripts/ inference_realesrgan.py setup.py
yapf -r -d realesrgan/ scripts/ inference_realesrgan.py setup.py yapf -r -d realesrgan/ scripts/ inference_realesrgan.py setup.py

View File

@@ -32,7 +32,7 @@ Here are steps for data preparation.
#### Step 1: [Optional] Generate multi-scale images #### Step 1: [Optional] Generate multi-scale images
For the DF2K dataset, we use a multi-scale strategy, *i.e.*, we downsample HR images to obtain several Ground-Truth images with different scales. <br> For the DF2K dataset, we use a multi-scale strategy, *i.e.*, we downsample HR images to obtain several Ground-Truth images with different scales. <br>
You can use the [scripts/generate_multiscale_DF2K.py](scripts/generate_multiscale_DF2K.py) script to geneate multi-scale images. <br> You can use the [scripts/generate_multiscale_DF2K.py](scripts/generate_multiscale_DF2K.py) script to generate multi-scale images. <br>
Note that this step can be omitted if you just want to have a fast try. Note that this step can be omitted if you just want to have a fast try.
```bash ```bash

View File

@@ -6,7 +6,7 @@
- [PyTorch Inference](#PyTorch-Inference) - [PyTorch Inference](#PyTorch-Inference)
- [ncnn Executable File](#ncnn-Executable-File) - [ncnn Executable File](#ncnn-Executable-File)
- [Comparisons with waifu2x](#Comparisons-with-waifu2x) - [Comparisons with waifu2x](#Comparisons-with-waifu2x)
- [Comparions with Sliding Bars](#Comparions-with-Sliding-Bars) - [Comparisons with Sliding Bars](#Comparions-with-Sliding-Bars)
<p align="center"> <p align="center">
<img src="https://raw.githubusercontent.com/xinntao/public-figures/master/Real-ESRGAN/cmp_realesrgan_anime_1.png"> <img src="https://raw.githubusercontent.com/xinntao/public-figures/master/Real-ESRGAN/cmp_realesrgan_anime_1.png">

View File

@@ -81,10 +81,10 @@ def main():
h, w = img.shape[0:2] h, w = img.shape[0:2]
if max(h, w) > 1000 and args.netscale == 4: if max(h, w) > 1000 and args.netscale == 4:
import warnings import warnings
warnings.warn('The input image is large, try X2 model for better performace.') warnings.warn('The input image is large, try X2 model for better performance.')
if max(h, w) < 500 and args.netscale == 2: if max(h, w) < 500 and args.netscale == 2:
import warnings import warnings
warnings.warn('The input image is small, try X4 model for better performace.') warnings.warn('The input image is small, try X4 model for better performance.')
try: try:
if args.face_enhance: if args.face_enhance: