All Projects → MohitLamba94 → Restoring-Extremely-Dark-Images-In-Real-Time

MohitLamba94 / Restoring-Extremely-Dark-Images-In-Real-Time

Licence: other
The project is the official implementation of our CVPR 2021 paper, "Restoring Extremely Dark Images in Real Time"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Restoring-Extremely-Dark-Images-In-Real-Time

Cvpr2021 Papers With Code
CVPR 2021 论文和开源项目合集
Stars: ✭ 7,138 (+8935.44%)
Mutual labels:  paper, cvpr, cvpr2021
Tensorflow-YOLACT
Implementation of the paper "YOLACT Real-time Instance Segmentation" in Tensorflow 2
Stars: ✭ 97 (+22.78%)
Mutual labels:  real-time, paper
Modaily-Aware-Audio-Visual-Video-Parsing
Code for CVPR 2021 paper Exploring Heterogeneous Clues for Weakly-Supervised Audio-Visual Video Parsing
Stars: ✭ 19 (-75.95%)
Mutual labels:  cvpr, cvpr2021
Werk
High-throughput / low-latency C++ application framework
Stars: ✭ 30 (-62.03%)
Mutual labels:  real-time, low-latency
TailCalibX
Pytorch implementation of Feature Generation for Long-Tail Classification by Rahul Vigneswaran, Marc T Law, Vineeth N Balasubramaniam and Makarand Tapaswi
Stars: ✭ 32 (-59.49%)
Mutual labels:  cvpr, pytorch-implementation
CVPR2021-Papers-with-Code-Demo
收集 CVPR 最新的成果,包括论文、代码和demo视频等,欢迎大家推荐!
Stars: ✭ 752 (+851.9%)
Mutual labels:  cvpr, cvpr2021
TMNet
The official pytorch implemention of the CVPR paper "Temporal Modulation Network for Controllable Space-Time Video Super-Resolution".
Stars: ✭ 77 (-2.53%)
Mutual labels:  paper, cvpr
CURL
Code for the ICPR 2020 paper: "CURL: Neural Curve Layers for Image Enhancement"
Stars: ✭ 177 (+124.05%)
Mutual labels:  paper, cvpr
cool-papers-in-pytorch
Reimplementing cool papers in PyTorch...
Stars: ✭ 21 (-73.42%)
Mutual labels:  paper, cvpr
CoMoGAN
CoMoGAN: continuous model-guided image-to-image translation. CVPR 2021 oral.
Stars: ✭ 139 (+75.95%)
Mutual labels:  cvpr, cvpr2021
MIRNet-Keras
Keras Implementation of MIRNet - SoTA in Image Denoising, Super Resolution and Image Enhancement - CVPR 2020
Stars: ✭ 21 (-73.42%)
Mutual labels:  denoising, low-light-image-enhancement
cvpr-buzz
🐝 Explore Trending Papers at CVPR
Stars: ✭ 37 (-53.16%)
Mutual labels:  cvpr, cvpr2021
single-positive-multi-label
Multi-Label Learning from Single Positive Labels - CVPR 2021
Stars: ✭ 63 (-20.25%)
Mutual labels:  cvpr, cvpr2021
MetaBIN
[CVPR2021] Meta Batch-Instance Normalization for Generalizable Person Re-Identification
Stars: ✭ 58 (-26.58%)
Mutual labels:  cvpr, cvpr2021
deadsfu
Dead-simple WebRTC broadcasting. From the browser, or your application. Cloud-native and scalable.
Stars: ✭ 23 (-70.89%)
Mutual labels:  real-time, low-latency
ripple
Simple shared surface streaming application
Stars: ✭ 17 (-78.48%)
Mutual labels:  real-time, low-latency
AMP-Regularizer
Code for our paper "Regularizing Neural Networks via Adversarial Model Perturbation", CVPR2021
Stars: ✭ 26 (-67.09%)
Mutual labels:  cvpr, cvpr2021
BCNet
Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]
Stars: ✭ 434 (+449.37%)
Mutual labels:  cvpr, cvpr2021
noise-synthesis
Rethinking Noise Synthesis and Modeling in Raw Denoising (ICCV2021)
Stars: ✭ 63 (-20.25%)
Mutual labels:  denoising, low-light
AODA
Official implementation of "Adversarial Open Domain Adaptation for Sketch-to-Photo Synthesis"(WACV 2022/CVPRW 2021)
Stars: ✭ 44 (-44.3%)
Mutual labels:  cvpr, cvpr2021

Restoring-Extremely-Dark-Images-In-Real-Time

The project is the official implementation of our CVPR 2021 paper, "Restoring Extremely Dark Images in Real Time"
Mohit Lamba, Kaushik Mitra

Click to watch Demo Video

A practical low-light enhancement solution must be computationally fast, memory-efficient, and achieve a visually appealing restoration. Most of the existing methods target restoration quality and thus compromise on speed and memory requirements, raising concerns about their real-world deployability. We propose a new deep learning architecture for extreme low-light single image restoration, which despite its fast & lightweight inference, produces a restoration that is perceptually at par with state-of-the-art computationally intense models. To achieve this, we do most of the processing in the higher scale-spaces, skipping the intermediate-scales wherever possible. Also unique to our model is the potential to process all the scale-spaces concurrently, offering an additional 30% speedup without compromising the restoration quality. Pre-amplification of the dark raw-image is an important step in extreme low-light image enhancement. Most of the existing state of the art methods need GT exposure value to estimate the pre-amplification factor, which is not practically feasible. Thus, we propose an amplifier module that estimates the amplification factor using only the input raw image and can be used “off-the-shelf” with pre-trained models without any fine-tuning. We show that our model can restore an ultra-high-definition 4K resolution image in just 1 sec. on a CPU and at 32 fps on a GPU and yet maintain a competitive restoration quality. We also show that our proposed model, without any fine-tuning, generalizes well to cameras not seen during training and to subsequent tasks such as object detection.

How to Use the Code?

The code was tested on Ubuntu 16.04 LTS and Google Colab with PyTorch 1.4. Apart from commonly used libraries you need to install rawpy pip install rawpy. To measure floating point operations you additionally require pip install ptflops.

To execute the following demos in Google Colab add %%bash at the beginning.

Quick Demo

pip install rawpy
git clone https://github.com/MohitLamba94/Restoring-Extremely-Dark-Images-In-Real-Time.git
cd Restoring-Extremely-Dark-Images-In-Real-Time
python demo.py

The above code will read extreme low-light images present in demo_imgs, create demo_restored_images directory and save the restored images for different estimated amplification factor in this directory. The expected output in Google Colab is,

...... Loading all files to CPU RAM

Image No.: 1, Amplification_m=1: 22.907602310180664
Image No.: 2, Amplification_m=1: 53.080570220947266
Image No.: 3, Amplification_m=1: 45.878238677978516

Files loaded to CPU RAM......

Network parameters : 784768

Device on GPU: False

Restored images saved in DEMO_RESTORED_IMAGES directory

The restored images should look like this.

Measure Time-Memory Complexity

pip install ptflops
git clone https://github.com/MohitLamba94/Restoring-Extremely-Dark-Images-In-Real-Time.git
cd Restoring-Extremely-Dark-Images-In-Real-Time
python time_complexity.py

The expected output on google Colab is,

---Our Model parameters : 784768
---SID model parameters : 7760748

Computational complexity of Our model:   41.38 GMac
Computational complexity of SID model:   440.46 GMac
Beginning Warmup...
Time taken by our model on CPU for 8MP image : 1.827214765548706 seconds
Time taken by SID model on CPU for 8MP image : 9.998942331314088 seconds

Training and Testing

We trained the network for 1 Million iterations on RAW images. As RAW images are bulky, reading them from storage is an expensive step. We therefore recommend loading the dataset into CPU RAM for 8-10x faster training.

If loading dataset into RAM first clear your swap,

swapoff -a && swapon -a

Then till the dataset loads into RAM, you may need to clear cache at regular intervals using,

sudo sh -c "/bin/echo 1 > /proc/sys/vm/drop_caches"

We provide a dummy train.py to give an overview of training and testing procedure and provide detailed comments to modify the code to your requiremnts.

Cite Us

@inproceedings{RealTimeDarkImageRestorationCvpr2021,
  title={Restoring Extremely Dark Images in Real Time},
  author={Lamba, Mohit and Mitra, Kaushik},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={3487--3497},
  year={2021}
}

License

Copyright © Mohit Lamba, 2021. Patent Pending. All rights reserved. Please see the license file for terms.

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].