sayakpaul HF staff commited on
Commit
71944c3
1 Parent(s): 4c058bf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +62 -2
README.md CHANGED
@@ -1,11 +1,71 @@
1
  ---
 
2
  library_name: keras
 
 
 
 
 
 
 
3
  ---
4
 
 
 
 
 
 
 
5
  ## Model description
6
 
7
- This is the MAXIM model as described in [MAXIM: Multi-Axis MLP for Image Processing](https://arxiv.org/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).
 
 
 
 
 
 
 
 
8
 
9
  ## Intended uses & limitations
10
 
11
- The model was pre-trained on the LOL dataset and is intended to use for low-light enhancement.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - lol
11
  ---
12
 
13
+ # MAXIM pre-trained on LOL for image enhancement
14
+
15
+ MAXIM model pre-trained for image enhancement. 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 23.43 and an SSIM of 0.863.
30
 
31
  ## Intended uses & limitations
32
 
33
+ You can use the raw model for image enhancement 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/Dehazing/input/0048_0.9_0.2.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-s2-enhancement-lol")
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
+ ```
71
+