Skip to content

Official implementation of "LIIFusion" ('24 KIBME Summer Conference)

License

Notifications You must be signed in to change notification settings

novwaul/LIIFusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Quantitative Results

  • DIV2K

    스크린샷 2024-11-03 오전 12 01 41
  • Benchmarks

    스크린샷 2024-11-02 오후 11 56 55
  • CelebA-HQ(1-100 images)

    스크린샷 2024-11-02 오후 11 29 49
  • Inference time per image

    스크린샷 2024-11-02 오후 11 57 38

Qualitative Results

  • Stage 2 B100

    스크린샷 2024-11-02 오후 11 31 34
  • Stage 2 Urban100

    스크린샷 2024-11-02 오후 11 30 08
  • Stage 2 CelebA-HQ

    스크린샷 2024-11-02 오후 11 30 35

Data

We use DIV2K, FFHQ, CelebA-HQ and Benchmark. The Benchmark includes Set5, Set14, Urban100, and B100. mkdir load for putting the dataset folders.

How to train

  • Stage1
    python train.py --config [path-to-config]
  • Stage2
    python train.py --config [path-to-config]

How to test

  • 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] 

How to upsample an image

 python demo.py --input [IMAGE_PATH] --model [MODEL_PATH] --scale [SCALE_NUM]

Acknowledgement

This code is based on these LIIF, DiffIR, and SwinIR repos.

About

Official implementation of "LIIFusion" ('24 KIBME Summer Conference)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published