LIIFusion: Learning Implicit Image Function Using Image Prior Generated by an Efficient Diffusion Model for Arbitrary-Scale Image Super-Resolution
This is the official implementation of the 2024 JOURNAL OF BROADCAST ENGINEERING (KIBME) special paper Learning Implicit Image Function Using Image Prior Generated by an Efficient Diffusion Model for Arbitrary-Scale Image Super-Resolution. Inspired by LIIF, DiffIR, and IDM, we fuse INR and latent diffusion for arbitrary scale, efficient and realistic image SR. Our model needs two stage training. At the first stage, our model learns how to encode a prior from a HR image. By injecting the prior to a latent representation of a LR image, LIIF can upsample the LR image more correctly. At the second stage, the prior encoding module is replaced to diffusion module. We expect that by sampling the prior from the diffusion module, we can generate plausible details for SR images. Besides, as we conduct the diffusion prcoess on a prior, we can reduce computational cost and the number of denoising step than IDM. To alleviate over-smoothing problem, we give GAN loss to our model. Quantitative and qualitative results are as follows.
We use DIV2K, FFHQ, CelebA-HQ and Benchmark. The Benchmark includes Set5, Set14, Urban100, and B100.
mkdir load
for putting the dataset folders.
- Stage1
python train.py --config [path-to-config]
- Stage2
python train.py --config [path-to-config]
- DIV2K
bash scripts/test-div2k.sh [MODEL_PATH] [GPU]
- Benchmark
bash scripts/test-benchmark.sh [MODEL_PATH] [GPU]
- CelebA-HA(1-100 images)
bash scripts/test-celebahq.sh [MODEL_PATH] [GPU]
python demo.py --input [IMAGE_PATH] --model [MODEL_PATH] --scale [SCALE_NUM]