(README not completed yet)
There are algorithmic methods of improving low light images, such as: Gamma Correction, Histogram Balance, Denoising and so forth, but these methods don't consistently yield authentic results for every case.
Upon taking a photo under low light conditions, the reflected light beams of the objects come into the sensor of the camera, however due to low light conditions, the sensor is more sensitive to noise coming inside as well.
By using the traditional algorithmic methods, the recieved visual data is amplified along with the noise too.
Denoising could help, but what pixels are considered as noise and what some aren't?
Such an algorithm could be easily developed by using Convolutional Neural Network, mostly because we have a plenty of data to feed the model on.
The concept here is to provide pairs of dark and bright images of the same objects, in batches, so the model is trained to recognise patterns and features that should be amplified.
- PSNR (Peak Signal-to-Noise Ratio)
- SSIM (Structural Similarity)
- Illumaninace [lux]
I have used existing code implementations for these metrics.
For instance, the PSNR code in python is:
def psnr(pred, targs, data_range=1):
mse = F.mse_loss(pred, targs)
return 20 * torch.log10(data_range / torch.sqrt(mse))
Note: Data range is 1, because tensors contain pixels' values of mapped values between 0 to 1.
- Learn: Gather knowlodge about Deep learning, especially Residual Networks and Unet Networks
- Try: Programm a neureal network that is trained with dark images and their paired bright images
- Improve: Optimize its specifications, as in batch-size, depth of layers, input files sizes, learning rates, and so on
- Compare: Use SID dataset [1] and examine our performance to theirs
- Ace: Tweak current architectures or develop better architectures for deep learning
(to complete links for downloading, explanationss)
(to complete insights about training SID, about testing SID, comparing SSIM and PSNR)
After making this work complete, I've created a new package fastai-rawpy
that lets importing rawpy
into fastai
and hence, use better quality of images, by using RAW image files. For more info:
https://github.com/lejrn/fastai-RawPy
- Big thanks to both Or Biton, my partner, and our guiding professional figure, Prof. Adrian Stern.
- Further thanks to the fast.ai community, especially its founder Jeremy Howdy.
[1] Chen Chen, Qifeng Chen, Jia Xu, and Vladlen Koltun, "Learning to See in the Dark", in CVPR, 2018.
[2] Neural Blind Deconvolution Using Deep Priors (CVPR 2020)