All Projects → IDKiro → StarEnhancer

IDKiro / StarEnhancer

Licence: GPL-3.0 license
[ICCV 2021 Oral] StarEnhancer: Learning Real-Time and Style-Aware Image Enhancement

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to StarEnhancer

CURL
Code for the ICPR 2020 paper: "CURL: Neural Curve Layers for Image Enhancement"
Stars: ✭ 177 (+39.37%)
Mutual labels:  image-enhancement
Image-Contrast-Enhancement
C++ implementation of several image contrast enhancement techniques.
Stars: ✭ 139 (+9.45%)
Mutual labels:  image-enhancement
ICCV2021-Single-Image-Desnowing-HDCWNet
This paper is accepted by ICCV 2021.
Stars: ✭ 47 (-62.99%)
Mutual labels:  image-enhancement
Awesome-low-level-vision-resources
A curated list of resources for Low-level Vision Tasks
Stars: ✭ 35 (-72.44%)
Mutual labels:  image-enhancement
PPCN
Tensorflow implementation of Perception-Preserving Convolutional Networks for Image Enhancement on Smartphones (ECCV 2018 Workshop PIRM)
Stars: ✭ 58 (-54.33%)
Mutual labels:  image-enhancement
Awesome-ICCV2021-Low-Level-Vision
A Collection of Papers and Codes for ICCV2021 Low Level Vision and Image Generation
Stars: ✭ 163 (+28.35%)
Mutual labels:  image-enhancement
pytorch-neural-enhance
Experiments on CNN-based image enhancement in pytorch
Stars: ✭ 29 (-77.17%)
Mutual labels:  image-enhancement
subjectiveqe-esrgan
PyTorch implementation of ESRGAN (ECCVW 2018) for compressed image subjective quality enhancement.
Stars: ✭ 12 (-90.55%)
Mutual labels:  image-enhancement
Awesome-Underwater-Image-Enhancement
A collection of awesome underwater image enhancement methods.
Stars: ✭ 57 (-55.12%)
Mutual labels:  image-enhancement
image-filtering
image filtering techniques in python with examples
Stars: ✭ 19 (-85.04%)
Mutual labels:  image-enhancement
UWCNN
Code and Datasets for "Underwater Scene Prior Inspired Deep Underwater Image and Video Enhancement", Pattern Recognition, 2019
Stars: ✭ 82 (-35.43%)
Mutual labels:  image-enhancement
Mobile Image-Video Enhancement
Sensifai image and video enhancement module on mobiles
Stars: ✭ 39 (-69.29%)
Mutual labels:  image-enhancement

StarEnhancer: Learning Real-Time and Style-Aware Image Enhancement

paper paper GoogleDrive BaiduPan Basic Enhancer

Abstract: Image enhancement is a subjective process whose targets vary with user preferences. In this paper, we propose a deep learning-based image enhancement method covering multiple tonal styles using only a single model dubbed StarEnhancer. It can transform an image from one tonal style to another, even if that style is unseen. With a simple one-time setting, users can customize the model to make the enhanced images more in line with their aesthetics. To make the method more practical, we propose a well-designed enhancer that can process a 4K-resolution image over 200 FPS but surpasses the contemporaneous single style image enhancement methods in terms of PSNR, SSIM, and LPIPS. Finally, our proposed enhancement method has good interactability, which allows the user to fine-tune the enhanced image using intuitive options.

StarEnhancer

Getting started

Install

We test the code on PyTorch 1.8.1 + CUDA 11.1 + cuDNN 8.0.5, and close versions also work fine.

pip install -r requirements.txt

We mainly train the model on RTX 2080Ti * 4, but a smaller mini batch size can also work.

Prepare

You can generate your own dataset, or download the one we generate.

The final file path should be the same as the following:

┬─ save_model
│   ├─ stylish.pth.tar
│   └─ ... (model & embedding)
└─ data
    ├─ train
    │   ├─ 01-Experts-A
    │   │   ├─ a0001.jpg
    │   │   └─ ... (id.jpg)
    │   └─ ... (style folder)
    ├─ valid
    │   └─ ... (style folder)
    └─ test
        └─ ... (style folder)

Download

Data and pretrained models are available on GoogleDrive or BaiduPan (jvyf).

Generate

  1. Download raw data from MIT-Adobe FiveK Dataset.
  2. Download the modified Lightroom database fivek.lrcat, and replace the original database with it.
  3. Generate dataset in JPEG format with quality 100, which can refer to this issue.
  4. Run generate_dataset.py in data folder to generate dataset.

Train

Firstly, train the style encoder:

python train_stylish.py

Secondly, fetch the style embedding for each sample in the train set:

python fetch_embedding.py

Lastly, train the curve encoder and mapping network:

python train_enhancer.py

Test

Just run:

python test.py

Testing LPIPS requires about 10 GB GPU memory, and if an OOM occurs, replace the following lines

lpips_val = loss_fn_alex(output * 2 - 1, target_img * 2 - 1).item()

with

lpips_val = 0

Notes

Due to licenses, we are unable to release part of the source code. This repository provides a pure python implementation for research use. There are some differences between the repository and the paper as follows:

  1. The repository uses a ResNet-18 w/o BN as the curve encoder's backbone, and the paper uses a more lightweight model.
  2. The paper uses CUDA to implement the color transform function, and the repository uses torch.gather to implement it.
  3. The repository removes some tricks used in training lightweight models.

Overall, this repository can achieve higher performance, but will be slightly slower.

Citation

If you find this work useful for your research, please cite our paper:

@inproceedings{song2021starenhancer,
  title={StarEnhancer: Learning Real-Time and Style-Aware Image Enhancement},
  author={Song, Yuda and Qian, Hui and Du, Xin},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={4126--4135},
  year={2021}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].