• Stars
    star
    456
  • Rank 95,985 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python implementation of two low-light image enhancement techniques via illumination map estimation

Low-light-Image-Enhancement

Python implementation of two low-light image enhancement techniques via illumination map estimation, based on the following papers:

  • Dual Illumination Estimation for Robust Exposure Correction [link]
  • LIME: Low-light Image Enhancement via Illumination Map Estimation [link]

Both methods are based on retinex modelling, and aim at estimating the illumination map by preserving the prominent structure of the image, while removing the redundant texture details. To do this, the same optimization formulation is used by both papers (see references). The novelty introduced by the first paper (called DUAL below) compared to the second (called LIME below) is the estimation of this map for the original image, and for its inverted version, which allows to correct both the under-exposed and over-exposed parts of the image.

The code implemented in this repository allows the use of both methods, which can be easily selected from the script parameters.

Installation

This implementation runs on python >= 3.7, use pip to install dependencies:

pip3 install -r requirements.txt

Usage

Use the demo.py script to enhance your images.

usage: demo.py [-h] [-f FOLDER] [-g GAMMA] [-l LAMBDA_] [-ul] [-s SIGMA]
               [-bc BC] [-bs BS] [-be BE] [-eps EPS]

Python implementation of two low-light image enhancement techniques via illumination map estimation.

optional arguments:
  -h, --help            show this help message and exit
  -f FOLDER, --folder FOLDER
                        folder path to test images.
  -g GAMMA, --gamma GAMMA
                        the gamma correction parameter.
  -l LAMBDA_, --lambda_ LAMBDA_
                        the weight for balancing the two terms in the illumination refinement optimization objective.
  -ul, --lime           Use the LIME method. By default, the DUAL method is used.
  -s SIGMA, --sigma SIGMA
                        Spatial standard deviation for spatial affinity based Gaussian weights.
  -bc BC                parameter for controlling the influence of Mertens's contrast measure.
  -bs BS                parameter for controlling the influence of Mertens's saturation measure.
  -be BE                parameter for controlling the influence of Mertens's well exposedness measure.
  -eps EPS              constant to avoid computation instability.

Example

python3 demo.py -f ./demo/ -l 0.15 -g 0.6

Result

Low Light Image Enhanced Image

TODO

  • Add a fourier based solver to speed up the inference

πŸŽ“ Citation

If you find this work useful in your research, please consider citing:

@misc{lowlightpython,
  author = {Souhaib Attaiki},
  title = {Low light Image Enhancement},
  year = {2020},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/pvnieo/Low-light-Image-Enhancement}},
}

More Repositories

1

DPFM

Pytorch code for "DPFM: Deep Partial Functional Maps" - 3DV 2021 (Oral)
Python
40
star
2

GeomFmaps_pytorch

A minimalist pytorch implementation of: "Deep Geometric Functional Maps: Robust Feature Learning for Shape Correspondence"
Python
24
star
3

ManGAN

Automatic Manga colorization using Generative Adversarial Networks.
Python
18
star
4

FMNet-pytorch

A Pytorch implementation of: "Deep Functional Maps: Structured Prediction for Dense Shape Correspondence"
Python
17
star
5

Manga-Panel-Extractor

An implementation of a Manga Panel Extractor
Python
16
star
6

SURFMNet-pytorch

A pytorch implementation of: "Unsupervised Deep Learning for Structured Shape Matching"
Python
16
star
7

clover

Pytorch code for "Understanding and Improving Features Learned in Deep Functional Maps" - CVPR 2023
Python
7
star
8

Deep-Levi

Automatic colorization using deep neural networks.
Python
7
star
9

Bankruptcy-Explained

A data mining project that aims to predict a company's bankruptcy based solely on its financial ratios
Jupyter Notebook
6
star
10

vader

Pytorch code for "Generalizable Local Feature Pre-training for Deformable Shape Analysis" - CVPR 2023
Python
6
star
11

SNK

Pytorch code for "SNK: Shape Non-rigid Kinematics" - NeurIPS 2023
Python
6
star
12

NCP

Pytorch code for "NCP: Neural Correspondence Prior for Effective Unsupervised Shape Matching" - NeurIPS 2022
Jupyter Notebook
4
star
13

searchy

Implementation of a search engine on the cacm and CS276 (Stanford) collections.
Jupyter Notebook
4
star
14

diffusion-net-plus

Python
4
star
15

tridesic

Multiple geodesic distance algorithms on triangular surface meshes in Python
C++
4
star
16

cp2p-pfarm-benchmark

Benchmark for non-rigid part-to-part shape matching
3
star
17

beating-atari

Implementation of RL algorithms to beat Atari 2600 games
Python
2
star
18

ivf-program-verifier

Implementing a model-checker from control graphs.
Python
1
star
19

awesome-3d-computer-vision

A curated list of awesome 3D computer vision resources
1
star