MAXIM model pre-trained for image deblurring. It was introduced in the paper
MAXIM: Multi-Axis MLP for Image Processing by Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, Yinxiao Li and first released in
this repository.
Disclaimer: The team releasing MAXIM did not write a model card for this model so this model card has been written by the Hugging Face team.
MAXIM introduces a shared MLP-based backbone for different image processing tasks such as image deblurring, deraining, denoising, dehazing, low-light image enhancement, and retouching. The following figure depicts the main components of MAXIM:
The authors didn't release the training code. For more details on how the model was trained, refer to the
original paper.
As per the
table, the model achieves a PSNR of 39.45 and an SSIM of 0.962.
You can use the raw model for image deblurring tasks.
The model is
officially released in JAX. It was ported to TensorFlow in
this repository.
1from huggingface_hub import from_pretrained_keras
2from PIL import Image
3
4import tensorflow as tf
5import numpy as np
6import requests
7
8url = "https://github.com/sayakpaul/maxim-tf/raw/main/images/Deblurring/input/1fromGOPR0950.png"
9image = Image.open(requests.get(url, stream=True).raw)
10image = np.array(image)
11image = tf.convert_to_tensor(image)
12image = tf.image.resize(image, (256, 256))
13
14model = from_pretrained_keras("google/maxim-s3-deblurring-realblur-r")
15predictions = model.predict(tf.expand_dims(image, 0))
For a more elaborate prediction pipeline, refer to
this Colab Notebook.
1@article{tu2022maxim,
2 title={MAXIM: Multi-Axis MLP for Image Processing},
3 author={Tu, Zhengzhong and Talebi, Hossein and Zhang, Han and Yang, Feng and Milanfar, Peyman and Bovik, Alan and Li, Yinxiao},
4 journal={CVPR},
5 year={2022},
6}