Tensorflow implementation of MIRNet for Low-light image enhancement

Overview

MIRNet

Tensorflow implementation of the MIRNet architecture as proposed by Learning Enriched Features for Real Image Restoration and Enhancement.

Lanuch Notebooks: Binder

Wandb Logs: https://wandb.ai/19soumik-rakshit96/mirnet

TFLite Variant of MIRNet: https://github.com/sayakpaul/MIRNet-TFLite.

TFLite Models on Tensorflow Hub: https://tfhub.dev/sayakpaul/lite-model/mirnet-fixed/dr/1.

Tensorflow JS Variant of MIRNet: https://github.com/Rishit-dagli/MIRNet-TFJS.

Pre-trained Weights

Citation

@misc{
    2003.06792,
    Author = {Syed Waqas Zamir and Aditya Arora and Salman Khan and Munawar Hayat and Fahad Shahbaz Khan and Ming-Hsuan Yang and Ling Shao},
    Title = {Learning Enriched Features for Real Image Restoration and Enhancement},
    Year = {2020},
    Eprint = {arXiv:2003.06792},
}
You might also like...
Implementation for paper "STAR: A Structure-aware Lightweight Transformer for Real-time Image Enhancement" (ICCV 2021).

STAR-pytorch Implementation for paper "STAR: A Structure-aware Lightweight Transformer for Real-time Image Enhancement" (ICCV 2021). CVF (pdf) STAR-DC

Official Tensorflow implementation of
Official Tensorflow implementation of "M-LSD: Towards Light-weight and Real-time Line Segment Detection"

M-LSD: Towards Light-weight and Real-time Line Segment Detection Official Tensorflow implementation of "M-LSD: Towards Light-weight and Real-time Line

A repository that shares tuning results of trained models generated by TensorFlow / Keras. Post-training quantization (Weight Quantization, Integer Quantization, Full Integer Quantization, Float16 Quantization), Quantization-aware training. TensorFlow Lite. OpenVINO. CoreML. TensorFlow.js. TF-TRT. MediaPipe. ONNX. [.tflite,.h5,.pb,saved_model,tfjs,tftrt,mlmodel,.xml/.bin, .onnx]
I-SECRET: Importance-guided fundus image enhancement via semi-supervised contrastive constraining

I-SECRET This is the implementation of the MICCAI 2021 Paper "I-SECRET: Importance-guided fundus image enhancement via semi-supervised contrastive con

Underwater image enhancement

LANet Our work proposes an adaptive learning attention network (LANet) to solve the problem of color casts and low illumination in underwater images.

The 7th edition of NTIRE: New Trends in Image Restoration and Enhancement workshop will be held on June 2022 in conjunction with CVPR 2022.
The 7th edition of NTIRE: New Trends in Image Restoration and Enhancement workshop will be held on June 2022 in conjunction with CVPR 2022.

NTIRE 2022 - Image Inpainting Challenge Important dates 2022.02.01: Release of train data (input and output images) and validation data (only input) 2

PyTorch Implementation of
PyTorch Implementation of "Light Field Image Super-Resolution with Transformers"

LFT PyTorch implementation of "Light Field Image Super-Resolution with Transformers", arXiv 2021. [pdf]. Contributions: We make the first attempt to a

PyTorch implementation of
PyTorch implementation of "A Full-Band and Sub-Band Fusion Model for Real-Time Single-Channel Speech Enhancement."

FullSubNet This Git repository for the official PyTorch implementation of "A Full-Band and Sub-Band Fusion Model for Real-Time Single-Channel Speech E

The official implementation of ICCV paper
The official implementation of ICCV paper "Box-Aware Feature Enhancement for Single Object Tracking on Point Clouds".

Box-Aware Tracker (BAT) Pytorch-Lightning implementation of the Box-Aware Tracker. Box-Aware Feature Enhancement for Single Object Tracking on Point C

Comments
  • mirnet.inference.Inferer gives error

    mirnet.inference.Inferer gives error

    I have watch the youtube video https://www.youtube.com/watch?v=b5Uz_c0JLMs from Bhavesh Bhatt and copy the notebook. I only used my own picture (see attachment)

    The code

    from glob import glob
    import tensorflow as tf
    import numpy as np
    from matplotlib import pyplot as plt
    from mirnet.inference import Inferer
    from mirnet.utils import download_dataset, plot_result
    from PIL import Image
    
    inferer = Inferer()
    inferer.download_weights('1sUlRD5MTRKKGxtqyYDpTv7T3jOW6aVAL')
    inferer.build_model(
        num_rrg=3, num_mrb=2, channels=64,
        weights_path='low_light_weights_best.h5'
    )
    
    #inferer.model.summary()
    
    inferer.model.save('mirnet')
    
    IMAGE_LOC = 'IMG_3598_resize3.jpg'
    
    print("image converteren..")
    original_image, output_image = inferer.infer(IMAGE_LOC)
    plot_result(original_image, output_image)
    

    But i get an error on the code -> original_image, output_image = inferer.infer(IMAGE_LOC) I used a jpeg file of 22.8 KB with width=600 and height=337 pixels and I get the following error:

    InvalidArgumentError Traceback (most recent call last)

    in () ----> 1 original_image, output_image = inferer.infer(IMAGE_LOC) 2 plot_result(original_image, output_image)

    7 frames

    /usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name) 58 ctx.ensure_initialized() 59 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, ---> 60 inputs, attrs, num_outputs) 61 except core._NotOkStatusException as e: 62 if name is not None:

    InvalidArgumentError: Incompatible shapes: [1,337,600,64] vs. [1,336,600,64] [[node model_1/add_180/add (defined at /content/MIRNet/mirnet/inference.py:39) ]] [Op:__inference_predict_function_126722]

    Function call stack: predict_function

    IMG_3598_resize3

    I have also try with different sizes but I get similar errors.

    I used google colab

    Any idea why it is not working..

    Thanks sofar.

    Henk

    opened by hboen 2
  • Image quality get reduced.

    Image quality get reduced.

    Hi, when I pass my image without resizing, then I get error, But after doing resizing to (1560, 2080) it's working fine but image quality gets reduced. How I will solve this issue??

    opened by amitbiswas1999 0
  • Huge memory needed ?

    Huge memory needed ?

    Hello, I successfully enhanced a part of an image with your tool however even with 32Go of ram I can't use it on a photo, is htere a way to automaticaly process the image in several parts ?

    opened by Entretoize 0
Owner
Soumik Rakshit
Wit Beyond Measure is Man's Greatest Treasure
Soumik Rakshit
Official implementation for "Low-light Image Enhancement via Breaking Down the Darkness"

Low-light Image Enhancement via Breaking Down the Darkness by Qiming Hu, Xiaojie Guo. 1. Dependencies Python3 PyTorch>=1.0 OpenCV-Python, TensorboardX

Qiming Hu 30 Jan 1, 2023
From Fidelity to Perceptual Quality: A Semi-Supervised Approach for Low-Light Image Enhancement (CVPR'2020)

Under-exposure introduces a series of visual degradation, i.e. decreased visibility, intensive noise, and biased color, etc. To address these problems, we propose a novel semi-supervised learning approach for low-light image enhancement.

Yang Wenhan 117 Jan 3, 2023
The code release of paper Low-Light Image Enhancement with Normalizing Flow

[AAAI 2022] Low-Light Image Enhancement with Normalizing Flow Paper | Project Page Low-Light Image Enhancement with Normalizing Flow Yufei Wang, Renji

Yufei Wang 176 Jan 6, 2023
The code of Zero-shot learning for low-light image enhancement based on dual iteration

Zero-shot-dual-iter-LLE The code of Zero-shot learning for low-light image enhancement based on dual iteration. You can get the real night image tests

null 1 Mar 18, 2022
Learning Lightweight Low-Light Enhancement Network using Pseudo Well-Exposed Images

Learning Lightweight Low-Light Enhancement Network using Pseudo Well-Exposed Images This repository contains the implementation of the following paper

Seonggwan Ko 9 Jul 30, 2022
3D2Unet: 3D Deformable Unet for Low-Light Video Enhancement (PRCV2021)

3DDUNET This is the code for 3D2Unet: 3D Deformable Unet for Low-Light Video Enhancement (PRCV2021) Conference Paper Link Dataset We use SMOID dataset

null 1 Jan 7, 2022
Code for HLA-Face: Joint High-Low Adaptation for Low Light Face Detection (CVPR21)

HLA-Face: Joint High-Low Adaptation for Low Light Face Detection The official PyTorch implementation for HLA-Face: Joint High-Low Adaptation for Low L

Wenjing Wang 77 Dec 8, 2022
EDCNN: Edge enhancement-based Densely Connected Network with Compound Loss for Low-Dose CT Denoising

EDCNN: Edge enhancement-based Densely Connected Network with Compound Loss for Low-Dose CT Denoising By Tengfei Liang, Yi Jin, Yidong Li, Tao Wang. Th

workingcoder 115 Jan 5, 2023
A Low Complexity Speech Enhancement Framework for Full-Band Audio (48kHz) based on Deep Filtering.

DeepFilterNet A Low Complexity Speech Enhancement Framework for Full-Band Audio (48kHz) based on Deep Filtering. libDF contains Rust code used for dat

Hendrik Schröter 292 Dec 25, 2022
LLVIP: A Visible-infrared Paired Dataset for Low-light Vision

LLVIP: A Visible-infrared Paired Dataset for Low-light Vision Project | Arxiv | Abstract It is very challenging for various visual tasks such as image

CVSM Group -  email: czhu@bupt.edu.cn 377 Jan 7, 2023