DEV Community

Daisuke Majima
Daisuke Majima

Posted on • Originally published at qiita.com

Brightening dark images with machine learning (GLADNet)

How to use a machine-learning model that brightens low-light images

Using a model called GLADNet, we brighten dark images. It's easy to run in Python.




I want to extract information from dark images

If you can brighten images that came out too dark, or footage from night-time surveillance or dashcams, you can sometimes extract useful information.

But simply adjusting brightness with a filter doesn't add any information.

GLADNet brightens them cleanly

Just feed an image into GLADNet and a bright image comes back. It really looks like it was actually shot brighter.

Usage

Clone the GLADNet repository and run with the following command:

python main.py --use_gpu=1 --gpu_idx=0 --gpu_mem=0.5 --phase=test --test_dir=path/to/input_images --save_dir=path/to/output
Enter fullscreen mode Exit fullscreen mode


For various uses

With techniques like this you can capture the information you need without missing it — and even "ghost photos" stop being scary.





Originally published in Japanese on Qiita. I build apps with Core ML and ARKit and write about ML/AR. GitHub / X

Top comments (0)