Home

Awesome

PWC PWC PWC PWC PWC PWC

PWC PWC

PWC PWC PWC PWC PWC

PWC PWC

MAXIM: Multi-Axis MLP for Image Processing (CVPR 2022 Oral, Best Paper Nomination)

Paper Open In Colab slides Poster

This repo hosts the official implementation of the MAXIM models:

"MAXIM: Multi-Axis MLP for Image Processing". CVPR 2022 Oral.
Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, and Yinxiao Li
Google Research, University of Texas at Austin

Disclaimer: This is not an officially supported Google product.

News:

Quick Demos

Try the web demo for Image Denoising, Deblurring, Deraining, Dehazing and Enhancement with customized input image here Replicate

Try the Colab here using Open In Colab

Architecture

Model overview

Installation

Install dependencies:

pip install -r requirements.txt

Setup project:

pip install .

Results and Pre-trained models

We provide the pre-trained models and visual results. Please contact us if you have any questions or requests.

TaskDatasetPSNRSSIMModel#paramsFLOPsckptoutputs
DenoisingSIDD39.960.960MAXIM-3S22.2M339Gckptimages
DenoisingDND39.840.954MAXIM-3S22.2M339Gckptimages
DeblurringGoPro32.860.961MAXIM-3S22.2M339Gckptimages
DeblurringHIDE32.830.956MAXIM-3S22.2M339Gckptimages <!--(https://console.cloud.google.com/storage/browser/gresearch/maxim/results/Deblurring/GoPro/)-->
DeblurringREDS28.930.865MAXIM-3S22.2M339Gckptimages <!--(https://console.cloud.google.com/storage/browser/gresearch/maxim/results/Deblurring/REDS/)-->
DeblurringRealBlur-R39.450.962MAXIM-3S22.2M339Gckptimages
DeblurringRealBlur-J32.840.935MAXIM-3S22.2M339Gckptimages
DerainingRain13k33.240.933MAXIM-2S14.1M216Gckptimages
DerainingRaindrop31.870.935MAXIM-2S14.1M216Gckptimages
DehazingRESIDE-Indoor38.110.991MAXIM-2S14.1M216Gckptimages
DehazingRESIDE-Outdoor34.190.985MAXIM-2S14.1M216Gckptimages
EnhancementLOL23.430.863MAXIM-2S14.1M216Gckptimages
EnhancementFiveK26.150.945MAXIM-2S14.1M216Gckptimages
<!-- You can also download most of the training and test datasets we used on [gcloud](https://console.cloud.google.com/storage/browser/gresearch/maxim/datasets/). -->

Demo

First download corresponding checkpoints and then go ahead and run:

<details> <summary><strong>Image Denoising</strong> (click to expand) </summary>
python3 maxim/run_eval.py --task Denoising --ckpt_path ${SIDD_CKPT_PATH} \
  --input_dir maxim/images/Denoising --output_dir maxim/images/Results --has_target=False
</details> <details> <summary><strong>Image Deblurring</strong> (click to expand) </summary>
python3 maxim/run_eval.py --task Deblurring --ckpt_path ${GOPRO_CKPT_PATH} \
  --input_dir maxim/images/Deblurring --output_dir maxim/images/Results --has_target=False
</details> <details> <summary><strong>Image Deraining</strong> (click to expand) </summary>

Rain streak:

python3 maxim/run_eval.py --task Deraining --ckpt_path ${RAIN13K_CKPT_PATH} \
  --input_dir maxim/images/Deraining --output_dir maxim/images/Results --has_target=False

Rain drop:

python3 maxim/run_eval.py --task Deraining --ckpt_path ${RAINDROP_CKPT_PATH} \
  --input_dir maxim/images/Deraining --output_dir maxim/images/Results --has_target=False
</details> <details> <summary><strong>Image Dehazing</strong> (click to expand) </summary>

Indoor:

python3 maxim/run_eval.py --task Dehazing --ckpt_path ${REDISE_INDOOR_CKPT_PATH} \
  --input_dir maxim/images/Dehazing --output_dir maxim/images/Results --has_target=False

Outdoor:

python3 maxim/run_eval.py --task Dehazing --ckpt_path ${REDISE_OUTDOOR_CKPT_PATH} \
  --input_dir maxim/images/Dehazing --output_dir maxim/images/Results --has_target=False
</details> <details> <summary><strong>Image Enhancement</strong> (click to expand) </summary>

Low-light enhancement:

python3 maxim/run_eval.py --task Enhancement --ckpt_path ${LOL_CKPT_PATH} \
  --input_dir maxim/images/Enhancement --output_dir maxim/images/Results --has_target=False

Retouching:

python3 maxim/run_eval.py --task Enhancement --ckpt_path ${FIVEK_CKPT_PATH} \
  --input_dir maxim/images/Enhancement --output_dir maxim/images/Results --has_target=False
</details>

Results

<details> <summary><strong>Image Denoising</strong> (click to expand) </summary> <img src = "https://user-images.githubusercontent.com/43280278/149262475-a73668f2-9fe1-4374-8ed3-4831acca8052.png" width="400"> </details> <details> <summary><strong>Image Deblurring</strong> (click to expand) </summary> <table> <tr> <td> <img src = "https://user-images.githubusercontent.com/43280278/149261823-b77e9513-b3b5-4caf-a0eb-67bf18c2f681.png" width="500"> </td> <td> <img src = "https://user-images.githubusercontent.com/43280278/149261858-24664c33-dc8a-47c3-b84d-ba64b1c05937.png" width="500"> </td> </tr> <tr> <td><p align="center"><b>Synthetic blur</b></p></td> <td><p align="center"><b>Realistic blur</b></p></td> </tr> </table> </details> <details> <summary><strong>Image Deraining</strong> (click to expand) </summary> <table> <tr> <td> <img src = "https://user-images.githubusercontent.com/43280278/149261908-8bce72cf-b343-4bf8-8462-8be363616cfa.png" width="700"> </td> <td> <p align="top"> <img src = "https://user-images.githubusercontent.com/43280278/149262066-7b93538a-2ccc-4ea0-9187-ef1b54734392.png" width="400"> </td> </tr> <tr> <td><p align="center"><b>Rain streak</b></p></td> <td><p align="center"><b>Rain drop</b></p></td> </tr> </table> </details> <details> <summary><strong>Image Dehazing</strong> (click to expand) </summary> <img src = "https://user-images.githubusercontent.com/43280278/149261947-22954827-ce62-44e8-974a-0aa8d94a4bd9.png" width="250"> </details> <details> <summary><strong>Image Enhancement</strong> (click to expand) </summary> <img src = "https://user-images.githubusercontent.com/43280278/149262540-77d16592-9305-4fd7-80c6-b9d30000cc29.png" width="400"> </details>

Citation

Should you find this repository useful, please consider citing:

@article{tu2022maxim,
  title={MAXIM: Multi-Axis MLP for Image Processing},
  author={Tu, Zhengzhong and Talebi, Hossein and Zhang, Han and Yang, Feng and Milanfar, Peyman and Bovik, Alan and Li, Yinxiao},
  journal={CVPR},
  year={2022},
}

Acknowledgement

This repository is built on the vision_transformer and musiq repositories. Our work is also inspired by HiT, MPRNet, and HINet.