Update README.md
Browse files
README.md
CHANGED
@@ -1,11 +1,62 @@
|
|
1 |
---
|
|
|
2 |
library_name: keras
|
3 |
tags:
|
|
|
4 |
- maxim
|
|
|
|
|
5 |
---
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
## Model description
|
8 |
-
|
|
|
|
|
|
|
9 |
|
10 |
## Intended uses & limitations
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: apache-2.0
|
3 |
library_name: keras
|
4 |
tags:
|
5 |
+
- vision
|
6 |
- maxim
|
7 |
+
datasets:
|
8 |
+
- reds
|
9 |
---
|
10 |
|
11 |
+
# MAXIM pre-trained on REDS for image deblurring
|
12 |
+
|
13 |
+
MAXIM model pre-trained for image deblurring. 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).
|
14 |
+
|
15 |
+
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.
|
16 |
+
|
17 |
## Model description
|
18 |
+
|
19 |
+
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:
|
20 |
+
|
21 |
+

|
22 |
|
23 |
## Intended uses & limitations
|
24 |
+
|
25 |
+
You can use the raw model for image deblurring tasks.
|
26 |
+
|
27 |
+
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).
|
28 |
+
|
29 |
+
### How to use
|
30 |
+
|
31 |
+
Here is how to use this backbone encoder:
|
32 |
+
|
33 |
+
```python
|
34 |
+
from huggingface_hub import from_pretrained_keras
|
35 |
+
from PIL import Image
|
36 |
+
|
37 |
+
import tensorflow as tf
|
38 |
+
import numpy as np
|
39 |
+
import requests
|
40 |
+
|
41 |
+
url = "https://github.com/sayakpaul/maxim-tf/blob/main/images/Deblurring/input/109fromGOPR1096.MP4.png?raw=true"
|
42 |
+
image = Image.open(requests.get(url, stream=True).raw)
|
43 |
+
image = np.array(image)
|
44 |
+
image = tf.convert_to_tensor(image)
|
45 |
+
image = tf.image.resize(image, (256, 256))
|
46 |
+
|
47 |
+
model = from_pretrained_keras("google/maxim-s3-deblurring-reds")
|
48 |
+
predictions = model.predict(tf.expand_dims(image, 0))
|
49 |
+
```
|
50 |
+
|
51 |
+
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).
|
52 |
+
|
53 |
+
### Citation
|
54 |
+
|
55 |
+
```bibtex
|
56 |
+
@article{tu2022maxim,
|
57 |
+
title={MAXIM: Multi-Axis MLP for Image Processing},
|
58 |
+
author={Tu, Zhengzhong and Talebi, Hossein and Zhang, Han and Yang, Feng and Milanfar, Peyman and Bovik, Alan and Li, Yinxiao},
|
59 |
+
journal={CVPR},
|
60 |
+
year={2022},
|
61 |
+
}
|
62 |
+
```
|