Skip to content

Commit e43d2b2

Browse files
committed
Add notebook for DarkIR model
1 parent 6b9d67f commit e43d2b2

File tree

4 files changed

+1594
-0
lines changed

4 files changed

+1594
-0
lines changed

.ci/spellcheck/.pyspelling.wordlist.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ CUDA
154154
CustomEncoderWav
155155
CVF
156156
CVPR
157+
CNNs
157158
Databricks
158159
databricks
159160
dataloader
@@ -163,6 +164,7 @@ DataLoaders
163164
DataModule
164165
dataset
165166
datasets
167+
DarkIR
166168
DaViT
167169
DCAE
168170
DDIM
@@ -434,6 +436,7 @@ Jupyter's
434436
JupyterLab
435437
Kaiming
436438
Kalman
439+
kagglehub
437440
kbps
438441
KD
439442
KDE
@@ -507,6 +510,10 @@ LogSoftmax
507510
LoRA
508511
LoRAs
509512
lora
513+
LOLBlur
514+
LOLv
515+
LOL
516+
LLIE
510517
lraspp
511518
LRASPP
512519
LTS
@@ -854,6 +861,7 @@ ResNet
854861
resnet
855862
RetinaFace
856863
RetroMAE
864+
Retinex
857865
RGB
858866
Riffusion
859867
riffusion
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Low-Light Image Restoration with DarkIR model using OpenVINO™
2+
3+
[DarkIR](https://arxiv.org/abs/2412.13443) is an CNN model for Low-Light Image Restoration.
4+
5+
Photography during night or in dark conditions typically suffers from noise, low light and blurring issues due to the dim environment and the common use of long exposure. Although Deblurring and Low-light Image Enhancement (LLIE) are related under these conditions, most approaches in image restoration solve these tasks separately. DarkIR is an efficient and robust neural network for multi-task low-light image restoration. This approach proposes new attention mechanisms to enhance the receptive field of efficient CNNs. Current method reduces the computational costs in terms of parameters and MAC operations compared to previous methods. DarkIR achieves new state-of-the-art results on the popular LOLBlur, LOLv2 and Real-LOLBlur datasets, being able to generalize on real-world night and dark images.
6+
7+
![networks-scheme](https://raw.githubusercontent.com/cidautai/DarkIR/refs/heads/main/assets/networks-scheme.png)
8+
9+
[**image_source*](https://github.com/cidautai/DarkIR/blob/main/assets/networks-scheme.png)
10+
11+
You can find more information about this model in the [research paper](https://arxiv.org/abs/2412.13443) and GitHub [repository](https://github.com/cidautai/DarkIR).
12+
13+
14+
The notebook contains the following steps:
15+
16+
1. Prepare the PyTorch model.
17+
2. Prepare data and perform inference of the PyTorch model with image.
18+
3. Convert model to OpenVINO IR, using the model conversion API.
19+
4. Run inference with OpenVINO with image and video.
20+
5. Quantize the converted model with NNCF.
21+
6. Check the quantized model inference result.
22+
7. Compare model size of converted and quantized models.
23+
8. Compare performance of converted and quantized models.
24+
9. Launch interactive demo
25+
26+
27+
## Installation Instructions
28+
29+
This is a self-contained example that relies solely on its own code.</br>
30+
We recommend running the notebook in a virtual environment. You only need a Jupyter server to start.
31+
For details, please refer to [Installation Guide](../../README.md)..
32+
33+
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=5b5a4db0-7875-4bfb-bdbd-01698b5b1a77&file=notebooks/lol-image-restoration-darkir/README.md" />
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from pathlib import Path
2+
import gradio as gr
3+
4+
examples = [[img] for img in Path("./DarkIR/assets/qualis/inputs").glob("*.png")]
5+
6+
7+
def make_demo(fn):
8+
demo = gr.Interface(
9+
fn=fn, inputs=[gr.Image(type="pil", label="input")], outputs=[gr.Image(type="pil", label="output")], title="Low-Light-Deblurring", examples=examples
10+
)
11+
return demo

0 commit comments

Comments
 (0)