DDNM  by wyhuai

Zero-shot image restoration via diffusion null-space modeling (research paper)

created 2 years ago
1,277 stars

Top 31.8% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides DDNM, a zero-shot image restoration method that leverages denoising diffusion models for various tasks without requiring task-specific training or optimization. It is designed for researchers and practitioners in computer vision and image processing seeking flexible and powerful image restoration capabilities.

How It Works

DDNM operates by projecting the diffusion process into the null-space of the degradation operator. This allows it to effectively remove degradations while preserving image content, even for arbitrary sizes and complex restoration tasks. The method offers two versions: an SVD-based approach for higher precision in noisy tasks and a simplified version that allows users to define custom degradation operators.

Quick Start & Requirements

  • Install: pip install numpy torch blobfile tqdm pyYaml pillow
  • Prerequisites: PyTorch (e.g., 1.7.1+cu110), Python. GPU recommended for performance.
  • Pre-trained Models: Download models for face restoration (SDEdit) or general images (guided-diffusion) and place them in DDNM/exp/logs/.
  • Example Run: python main.py --ni --simplified --config celeba_hq.yml --path_y celeba_hq --eta 0.85 --deg "sr_averagepooling" --deg_scale 4.0 --sigma_y 0 -i demo
  • More Info: Project Page

Highlighted Details

  • Supports a wide range of restoration tasks including super-resolution, denoising, colorization, inpainting, deblurring, and compressed sensing.
  • Capable of handling arbitrary image sizes through a Mask-Shift Restoration technique.
  • Offers flexibility to define custom degradation operators and noise levels for user-specific applications.
  • Implemented based on techniques from RePaint and DDRM, with code structure inspired by DDRM.

Maintenance & Community

The project is associated with Peking University and PCL. Links to a Colab demo are provided for high-quality results.

Licensing & Compatibility

The repository does not explicitly state a license in the README. This requires clarification for commercial use or integration into closed-source projects.

Limitations & Caveats

The README mentions that high-quality results in the front figure are often generated by applying DDNM to models in RePaint, suggesting potential dependencies or performance variations. Reproducing paper results requires downloading specific datasets. The licensing status is unclear.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
29 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.