davidserra9 commited on
Commit
40ab710
Β·
verified Β·
1 Parent(s): 117183e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -124
README.md CHANGED
@@ -1,124 +1,9 @@
1
- ![thumbnail](/assets/thumbnail.png)
2
-
3
- This repository is the official implementation of "NamedCurves: Learned Image Enhancement via Color Naming" @ ECCV24.
4
-
5
- [![arXiv](https://img.shields.io/badge/ArXiv-Paper-B31B1B)](https://arxiv.org/abs/2407.09892)
6
- [![web](https://img.shields.io/badge/Project-Page-orange)](https://namedcurves.github.io/)
7
-
8
- [David Serrano-Lozano](https://davidserra9.github.io/), [Luis Herranz](http://www.lherranz.org/), [Michael S. Brown](http://www.cse.yorku.ca/~mbrown/) and [Javier Vazquez-Corral](https://www.jvazquez-corral.net/)
9
-
10
- ## News πŸš€
11
- - [Nov24] Code update. We release the inference images for MIT5K-UEGAN.
12
- - [July24] We realease the code and pretrained models of our paper.
13
- - [July24] Our paper NamedCurves is accepted to ECCV24!
14
-
15
- ## TODO:
16
- - torch Dataset object for PPR10K
17
- - Create notebook
18
- - Create gradio demo
19
-
20
- ## Method
21
-
22
- We propose NamedCurves, a learning-based image enhancement technique that decomposes the image into a small set of named colors. Our method learns to globally adjust the image for each specific named color via tone curves and then combines the images using and attention-based fusion mechanism to mimic spatial editing. In contrast to other SOTA methods, NamedCurves allows interpretability thanks to computing a set of tone curves for each universal color name.
23
-
24
- ![architecture](/assets/architecture-overview.png)
25
-
26
- ## Data
27
-
28
- In this paper we use two datasets: [MIT-Adobe FiveK](https://data.csail.mit.edu/graphics/fivek/) and [PPR10K](https://github.com/csjliang/PPR10K).
29
-
30
- ### MIT-Adobe FiveK
31
-
32
- MIT FiveK dataset consists of 5,000 photographs taken by SLR cameras by a set of different photographers that cover a broad range of scenes, subjects, and lighting conditions. They are all in RAW format. Then, 5 different photography students adjust the tone of the photos. Each of them retouched all the 5,000 photos using Adobe Lightroom.
33
-
34
- Following previous works we decided to use just the expert-C redition. To obtain the retouched images, we have to render the RAW files using Adobe Lightroom. Because of this, researchers have created different rendered versions of the dataset. In this paper, we use 3 different versions: DPE, UPE and UEGAN, dubbed after the method that introduced them. Some methods were evaluated in only some of the versions and their code and models are not available, so we considered it was fair to compare our results in the same conditions as they did. Now, we will provide information on the properties of each version and how to obtain them:
35
-
36
- The dataset can be downloaded [here](ttps://data.csail.mit.edu/graphics/fivek/). After downloading the images you will need to use Adobe Lightroom to pre-process them according to each version.
37
-
38
- - The **DPE** version uses the first 2,250 images of the dataset for training, the following 2,250 for validation and the last 500 for testing. The images are rendered to have the short edge to 512 pixels. Please see the [issue](https://github.com/sjmoran/CURL/issues/20) for detailed instructions.
39
-
40
- - The **UPE** version uses the first 4,500 images of the dataset for training and the last 500 for testing. The images are rendered to have the short edge to 512 pixels. Please see the [issue](https://github.com/dvlab-research/DeepUPE/issues/26) for detailed instructions.
41
-
42
- - The **UEGAN** version uses the first 4,500 images of the dataset for training and the last 500 for testing. The images are rendered to have the short edge to 512 pixels. For downloading the rendered images from [Google Drive](https://drive.google.com/drive/folders/1x-DcqFVoxprzM4KYGl8SUif8sV-57FP3). Please see the [official repository](https://github.com/dvlab-research/DeepUPE) for more information.
43
-
44
- ### PPR10K
45
- PPR10K contains 1,681 high-quality RAW portraits photos manually retouched by 3 experts. The dataset can be downloaded from the [official repository](https://github.com/csjliang/PPR10K). We used the 480p images.
46
-
47
- ## Getting started
48
-
49
- ### Environment setup
50
-
51
- We provide a Conda environment file ```requirements.txt``` with all necessary dependencies, except for PyTorch and Torchvision. Follow the instructions below to set up the environment.
52
-
53
- First, create and activate the Conda environment:
54
-
55
- ```
56
- conda create -n namedcurves python=3.8
57
- conda activate namedcurves
58
- ```
59
-
60
- Alternatively, you can set up a virtual environment:
61
- ```
62
- python3 -m venv venv
63
- source venv/bin/activate
64
- ```
65
-
66
- Next, install PyTorch and Torchvision with the appropriate versions based on your CUDA and driver dependencies. Visit the [Pytorch Official Page](https://pytorch.org/get-started/previous-versions/) for specific installation commands. For example:
67
-
68
- ```
69
- pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
70
- ```
71
-
72
- Once PyTorch is installed, you can install the remaining dependencies from the ```requirements.txt``` file:
73
-
74
- ```
75
- pip install -r requirements.txt
76
- ```
77
-
78
- Alternatively, you can manually install the required packages:
79
- ```
80
- pip install omegaconf matplotlib scipy scikit-image lpips torchmetrics
81
- ```
82
-
83
- ### Results
84
-
85
- We provide our results for the MIT5K dataset in the following format: aXXXX_Y_Z.png, where XXXX is the 4-digit file ID, Y is the PSNR value, and Z is the $\Delta E2000$ color difference of the image. All numeric values are rounded to two decimal places.
86
-
87
- | | PSNR | SSIM | $\Delta E2000$ | Images |
88
- | :-------- | :------: | :-------: | :--------------: | :-------: |
89
- | MIT5K | 25.59 | 0.936 | 6.07 | [Link](https://cvcuab-my.sharepoint.com/:f:/g/personal/dserrano_cvc_uab_cat/EijObxqdogJHpNufwKKZE4ABI78-4iQnO78V2mHkzfs07A?e=tVTWAq)
90
-
91
- ### Pre-trained models
92
-
93
- Create and store the pre-trained models in a folder inside the repository.
94
-
95
- ```
96
- cd namedcurves
97
- mkdir pretrained
98
- ```
99
-
100
- The weights can be found [here](https://github.com/davidserra9/namedcurves/releases/tag/v1.0). Alternatively, you can run:
101
-
102
- ```
103
- cd namedcurves
104
- bash scripts/download_checkpoints.sh
105
- ```
106
-
107
-
108
- ## Inference
109
-
110
- The following command takes an image file or a folder with images and saves the results in the specified directory.
111
-
112
- ```
113
- python test.py --input_path assets/a4957-input.png --output_path output/ --config_path configs/mit5k_upe_config.yaml --model_path pretrained/mit5k_uegan_psnr_25.59.pth
114
- ```
115
-
116
- ## Training
117
-
118
- Modify the configurations of the ```configs``` folders and run the following command:
119
-
120
- ```
121
- python train.py --config configs/mit5k_upe_config.yaml
122
- ```
123
-
124
-
 
1
+ title: NamedCurves
2
+ emoji: πŸš€
3
+ colorFrom: purple
4
+ colorTo: blue
5
+ sdk: gradio
6
+ sdk_version: 4.16.0
7
+ app_file: app.py
8
+ pinned: false
9
+ license: mit