We build a module that synthesizes super-resolution images by 4x upscaling. While preparing, we utilize the pretrained model SeemoRe provided by eduardzamfir at HuggingFace. The demo is accessible at the HuggingFace space.
- Install Conda, if not already installed.
- Clone the repository:
git clone https://github.com/byrkbrk/synthesizing-super-resolution-by-experts.git
- Change the directory:
cd synthesizing-super-resolution-by-experts
- Create the environment:
conda env create -f synthesizing-sr-by-experts.yaml
- Activate the environment:
conda activate synthesizing-sr-by-experts
- Download & install Python (version==3.11)
- Clone the repository:
git clone https://github.com/byrkbrk/synthesizing-super-resolution-by-experts.git
- Change the directory:
cd synthesizing-super-resolution-by-experts
- Install packages using
pip
:pip install -r requirements.txt
Check it out how to use:
python3 synthesize.py --help
Output:
Synthesize (4x upscaled) super-resolution images by SeemoRe
positional arguments:
image_name Name of the image that be upscaled. Note image that be
processed must be in `low-res-images` directory
options:
-h, --help show this help message and exit
--device {cuda,mps,cpu}
Name of the GPU device that be used during inference.
Default: None
Execute the followings to obtain super-resolved images:
python3 synthesize.py building.png
python3 synthesize.py plant.png
The output images seen below (left: Original, right: Super-resolved) will be saved into ./synthesized-images
folder.
To run the gradio app on your local computer, execute:
python3 app.py
Then, visit the url http://127.0.0.1:7860 to open the interface.
See the display below for an example usage of the module via Gradio.