maxim s3 denoising sidd
googleIntroduction
The MAXIM model is pre-trained for image denoising and is introduced in the paper "MAXIM: Multi-Axis MLP for Image Processing" by Zhengzhong Tu et al. It is designed for various image processing tasks, including image deblurring, deraining, denoising, dehazing, low-light image enhancement, and retouching. The model was originally released by Google Research and has been ported to TensorFlow by the Hugging Face team.
Architecture
MAXIM employs a shared MLP-based backbone tailored for multiple image processing tasks. The architecture is designed to handle diverse challenges in image enhancement and restoration. An overview of its components can be found in the provided image link in the documentation.
Training
The original authors did not release the training code for MAXIM. However, details on the training procedure and results are available in the original paper. The model reportedly achieves a PSNR of 39.96 and an SSIM of 0.96, indicating high performance in image denoising tasks.
Guide: Running Locally
To use the MAXIM model for image denoising tasks locally, follow these steps:
-
Install necessary libraries:
pip install tensorflow huggingface-hub
-
Load and preprocess an image:
from PIL import Image import numpy as np import tensorflow as tf import requests url = "https://github.com/sayakpaul/maxim-tf/raw/main/images/Denoising/input/0011_23.png" image = Image.open(requests.get(url, stream=True).raw) image = np.array(image) image = tf.convert_to_tensor(image) image = tf.image.resize(image, (256, 256))
-
Load the pre-trained model and make predictions:
from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("google/maxim-s3-denoising-sidd") predictions = model.predict(tf.expand_dims(image, 0))
For detailed inference and to run the model with dynamic resizing, refer to the provided Colab Notebook. Utilizing cloud GPUs, such as those from Google Cloud or AWS, is recommended for handling larger datasets or for faster computation.
License
The MAXIM model is released under the Apache 2.0 license, allowing for both academic and commercial use with proper attribution.