SG_Low_Light_Image_Enhancement

Semantic-Guided Low-Light Network Enhancement

Semantic-Guided Low-Light Network is a task that integrates semantic information into the process of enhancing the quality of images captured in low-light conditions. By incorporating semantic guidance, this task aims to improve the accuracy and effectiveness of enhancing low-light images by considering the context and content of the scene.

apache-2.0
Image-to-Image
PyTorch
English
by @AIOZNetwork
1

Last updated: 14 days ago


Generic badge Generic badge

Semantic-Guided Low-Light Image Enhancement

Summary

Introduction

Low-light images pose significant challenges to both human perception and computer vision tasks such as detection and segmentation. This work presents a semantic-guided zero-shot learning framework for enhancing low-light images and videos without the need for paired datasets or semantic annotations.

The model introduces:

  • An enhancement factor extraction network based on depthwise separable convolutions to efficiently learn illumination adjustments.
  • A recurrent image enhancement network that progressively improves image brightness and clarity.
  • An unsupervised semantic segmentation network to preserve high-level semantics during enhancement.

Parameters

Inputs

  • input_image - (image -.png|.jpg|.jpeg): The model takes a low-light image as input. These are images captured in low-light environments, often appearing dim, blurry, or noisy due to insufficient lighting conditions or other constraints.

Output

  • output_image - (image -.png): The model produces an output of an improved image, with enhanced brightness and clearer details compared to the input image. Enhancements may include overall brightness enhancement, color balancing, detail enhancement, and noise reduction to achieve the best possible result.

Examples

inputoutput

Usage for developers

Please find below the details to track the information and access the code for processing the model on our platform.

Requirements

pip install -r requirements.txt

Code based on AIOZ structure

import torch, os
import torchvision
from .modeling import model
from .utils import image_from_path, scale_image

...
def load_model(weight_path: Union[str, Path], scale_factor: int, device: torch.device):
    ...

def enhance_image(input_image_path: Union[str, Path], model_dir: Union[str, Path], device: Literal["cpu", "cuda", "gpu"]) -> str:
    ...
    
def do_ai_task(
        input: Union[str, Path],
        model_storage_directory: Union[str, Path],
        device: Literal["cpu", "cuda", "gpu"] = "cpu",
        *args, **kwargs) -> Any:
    """Define AI task: load model, pre-process, post-process, etc ..."""
    # Define AI task workflow. Below is an example
    device = "cuda" if torch.cuda.is_available() else "cpu"
    output_path = enhance_image(input_image, model_storage_directory, device)
    return output_path

Reference

This repository is based on and inspired by ShenZheng2000's work. We sincerely appreciate their generosity in sharing the code.

License

We respect and comply with the terms of the author's license cited in the Reference section.

Citation

@inproceedings{zheng2022semantic,
  title={Semantic-guided zero-shot learning for low-light image/video enhancement},
  author={Zheng, Shen and Gupta, Gaurav},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
  pages={581--590},
  year={2022}
}