This is an offline demo of Enhancer Image Enhancement.
The basic requirements for this demo are:
- Ubuntu System
- Python 3+
We recommend creating a new conda virtual environment to run this demo, as follow:
-
Clone this repository:
git clone https://github.com/ZHKKKe/Harmonizer.git cd Harmonizer
-
Download the pre-trained model
enhancer.pth
from this link and put it into the folderHarmonizer/pretrained/
. -
Create a conda virtual environment named
harmonizer
(if it doesn't exist) and activate it. Here we usepython=3.8
as an example:conda create -n harmonizer python=3.8 source activate harmonizer
-
Install PyTorch and the required python dependencies (please make sure your CUDA version is supported by the PyTorch version installed). In the root path of this repository, run:
pip install -r src/requirements.txt
-
Execute the demo code in the root path of this repository, as:
python -m demo.image_enhancement.run \ --example-path ./demo/image_enhancement/example
where
./demo/image_enhancement/example
contains a sample we provided.
If you want to test your own samples, please refer to the folder./demo/image_enhancement/example
to prepare theoriginal
image. -
Check the image enhancement results in the folder:
./demo/image_enhancement/example/enhanced
.