Update README.md
Browse files
README.md
CHANGED
|
@@ -1,11 +1,70 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: keras
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
## Model description
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
## Intended uses & limitations
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
library_name: keras
|
| 4 |
+
language: en
|
| 5 |
+
tags:
|
| 6 |
+
- vision
|
| 7 |
+
- maxim
|
| 8 |
+
- image-to-image
|
| 9 |
+
datasets:
|
| 10 |
+
- sidd
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# MAXIM pre-trained on SIDD for image denoising
|
| 14 |
+
|
| 15 |
+
MAXIM model pre-trained for image denoising. It was introduced in the paper [MAXIM: Multi-Axis MLP for Image Processing](https://arxiv.org/abs/2201.02973) by Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, Yinxiao Li and first released in [this repository](https://github.com/google-research/maxim).
|
| 16 |
+
|
| 17 |
+
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.
|
| 18 |
+
|
| 19 |
## Model description
|
| 20 |
|
| 21 |
+
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:
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
|
| 25 |
+
## Training procedure and results
|
| 26 |
+
|
| 27 |
+
The authors didn't release the training code. For more details on how the model was trained, refer to the [original paper](https://arxiv.org/abs/2201.02973).
|
| 28 |
+
|
| 29 |
+
As per the [table](https://github.com/google-research/maxim#results-and-pre-trained-models), the model achieves a PSNR of 39.96 and an SSIM of 0.96.
|
| 30 |
|
| 31 |
## Intended uses & limitations
|
| 32 |
|
| 33 |
+
You can use the raw model for image denoising tasks.
|
| 34 |
+
|
| 35 |
+
The model is [officially released in JAX](https://github.com/google-research/maxim). It was ported to TensorFlow in [this repository](https://github.com/sayakpaul/maxim-tf).
|
| 36 |
+
|
| 37 |
+
### How to use
|
| 38 |
+
|
| 39 |
+
Here is how to use this model:
|
| 40 |
+
|
| 41 |
+
```python
|
| 42 |
+
from huggingface_hub import from_pretrained_keras
|
| 43 |
+
from PIL import Image
|
| 44 |
+
|
| 45 |
+
import tensorflow as tf
|
| 46 |
+
import numpy as np
|
| 47 |
+
import requests
|
| 48 |
+
|
| 49 |
+
url = https://github.com/sayakpaul/maxim-tf/raw/main/images/Denoising/input/0011_23.png
|
| 50 |
+
image = Image.open(requests.get(url, stream=True).raw)
|
| 51 |
+
image = np.array(image)
|
| 52 |
+
image = tf.convert_to_tensor(image)
|
| 53 |
+
image = tf.image.resize(image, (256, 256))
|
| 54 |
+
|
| 55 |
+
model = from_pretrained_keras(google/maxim-s3-denoising-sidd)
|
| 56 |
+
predictions = model.predict(tf.expand_dims(image, 0))
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
For a more elaborate prediction pipeline, refer to [this Colab Notebook](https://colab.research.google.com/github/sayakpaul/maxim-tf/blob/main/notebooks/inference-dynamic-resize.ipynb).
|
| 60 |
+
|
| 61 |
+
### Citation
|
| 62 |
+
|
| 63 |
+
```bibtex
|
| 64 |
+
@article{tu2022maxim,
|
| 65 |
+
title={MAXIM: Multi-Axis MLP for Image Processing},
|
| 66 |
+
author={Tu, Zhengzhong and Talebi, Hossein and Zhang, Han and Yang, Feng and Milanfar, Peyman and Bovik, Alan and Li, Yinxiao},
|
| 67 |
+
journal={CVPR},
|
| 68 |
+
year={2022},
|
| 69 |
+
}
|
| 70 |
+
```
|