sayakpaul HF staff commited on
Commit
ce9a4ac
1 Parent(s): 5a1ae8a
Files changed (1) hide show
  1. README.md +62 -2
README.md CHANGED
@@ -1,11 +1,71 @@
1
  ---
 
2
  library_name: keras
 
3
  tags:
 
4
  - maxim
 
 
 
5
  ---
6
 
 
 
 
 
 
 
7
  ## Model description
8
- This is the MAXIM model as described in [MAXIM: Multi-Axis MLP for Image Processing](https://arxiv.org/abs/2201.02973) by Tu et al. The model was obtained by porting the official JAX params available [here](https://github.com/google-research/maxim). Porting code is available [here](https://github.com/sayakpaul/maxim-tf).
 
 
 
 
 
 
 
 
 
 
9
 
10
  ## Intended uses & limitations
11
- The model was pre-trained on the REDS dataset and is intended to use for image deblurring.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - reds
11
  ---
12
 
13
+ # MAXIM pre-trained on REDS for image deblurring
14
+
15
+ 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).
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
+ ![](https://github.com/google-research/maxim/raw/main/maxim/images/overview.png)
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 28.93 and an SSIM of 0.865.
30
+
31
 
32
  ## Intended uses & limitations
33
+
34
+ You can use the raw model for image deblurring tasks.
35
+
36
+ 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).
37
+
38
+ ### How to use
39
+
40
+ Here is how to use this model:
41
+
42
+ ```python
43
+ from huggingface_hub import from_pretrained_keras
44
+ from PIL import Image
45
+
46
+ import tensorflow as tf
47
+ import numpy as np
48
+ import requests
49
+
50
+ url = "https://github.com/sayakpaul/maxim-tf/blob/main/images/Deblurring/input/109fromGOPR1096.MP4.png?raw=true"
51
+ image = Image.open(requests.get(url, stream=True).raw)
52
+ image = np.array(image)
53
+ image = tf.convert_to_tensor(image)
54
+ image = tf.image.resize(image, (256, 256))
55
+
56
+ model = from_pretrained_keras("google/maxim-s3-deblurring-reds")
57
+ predictions = model.predict(tf.expand_dims(image, 0))
58
+ ```
59
+
60
+ 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).
61
+
62
+ ### Citation
63
+
64
+ ```bibtex
65
+ @article{tu2022maxim,
66
+ title={MAXIM: Multi-Axis MLP for Image Processing},
67
+ author={Tu, Zhengzhong and Talebi, Hossein and Zhang, Han and Yang, Feng and Milanfar, Peyman and Bovik, Alan and Li, Yinxiao},
68
+ journal={CVPR},
69
+ year={2022},
70
+ }
71
+ ```