explaingit

cchen156/learning-to-see-in-the-dark

5,561PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

TLDR

A research project that trains a neural network to brighten extremely dark photos, turning a quick, noisy night shot into a clear, well-lit image without a long exposure.

Mindmap

mindmap
  root((See in the Dark))
    What it does
      Low-light photo fix
      Neural network maps dark to bright
      CVPR 2018 research
    Tech Stack
      Python TensorFlow
      Rawpy raw images
    Requirements
      GPU required
      64-128 GB RAM
      25-52 GB dataset
    Supported Cameras
      Sony sensors
      Fuji sensors
    Audience
      CV researchers
      ML engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run pretrained models to enhance very dark Sony or Fuji camera raw photos without needing a long exposure.

USE CASE 2

Study or extend a CVPR 2018 neural network approach to low-light image enhancement for your own research.

USE CASE 3

Retrain the model on a custom paired dataset to support a different camera sensor.

Tech stack

PythonTensorFlowRawpy

Getting it running

Difficulty · hard Time to first run · 1day+

Requires Python 2.7, a GPU, 64-128 GB RAM for training, and 25-52 GB dataset downloads, pretrained models only work on Sony or Fuji cameras.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This repository contains the code for a research project presented at CVPR 2018, a major academic conference on computer vision. The project is called "Learning to See in the Dark" and it addresses a specific photography problem: how to get a bright, clear image from a camera when the available light is extremely low, such as at night or in a dimly lit room. A conventional camera in low-light conditions produces a noisy, dark image because the sensor does not collect enough light. The typical approach is to raise the camera's ISO setting, but that amplifies noise along with the signal. This research takes a different approach: it trains a neural network, a type of machine learning system, on pairs of very short-exposure raw photos and the matching long-exposure photos of the same scene. The network learns to map the grainy, dark short-exposure image onto something that looks like the properly lit long-exposure version, without the photographer having to wait or use a tripod for a long exposure. The project works with raw sensor data rather than processed JPEG or PNG images. Raw data preserves more detail than a processed image and gives the network more to work with. Pretrained models are provided for photos taken with Sony and Fuji cameras, the README notes that these models are tuned to specific camera sensors and will likely not work well on photos from a different camera. Running the provided models requires Python 2.7, TensorFlow, and a library called Rawpy for reading raw image files. The dataset of paired images is available as downloads totaling around 25 GB for the Sony set and 52 GB for the Fuji set. Training the models from scratch requires a GPU and a large amount of RAM: at least 64 GB for the Sony model and 128 GB for the Fuji model. This is a research prototype, not a production tool. The README explicitly states it is intended to prove a concept rather than ship as a product. The code is released under the MIT License.

Copy-paste prompts

Prompt 1
I have a very dark Sony raw image file. Show me step-by-step how to run the Learning to See in the Dark pretrained model on it using Python and TensorFlow.
Prompt 2
How does the Learning to See in the Dark neural network architecture work, and what loss function does it use to learn from paired short/long-exposure photos?
Prompt 3
I want to adapt this model to a camera other than Sony or Fuji. What data do I need to collect and which parts of the training code do I need to change?
Prompt 4
Walk me through setting up the Python 2.7 and TensorFlow environment needed to run this project and avoid common version conflicts.
Open on GitHub → Explain another repo

← cchen156 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.