Our challenge is to develop a procedure for creating realistic night scene photos without actual ground-truth images. This task is important for surveillance, security, and art. Submissions will be evaluated by mean opinion scores and professional photographers.
This repo contains the source code of Night Photography Rendering Challenge 2024.
To work with code it is recommended to use Python 3.9+.
The required packages are listed in requirements.txt
and can be installed by calling:
pip install -r requirements.txt
Module raw_prc_pipeline
contains the source code of various methods and functions that can be used for processing raw images, including:
- Parsing metadata (see
raw_prc_pipeline/exif_*.py
files) - Demosaicing, white_balancing (Gray World, White Patch, Shades of Gray, Improved White Patch), tone mapping and other methods (see
raw_prc_pipeline/pipeline_utils.py
) - Implemtations of demo classes of raw image processing pipeline and image processing pipeline executor (see
raw_prc_pipeline/pipeline.py
)
Directory data
conatins example of challenge data:
- PNG file with raw image data (see
data/test_heawei.png
) and - Corresponding JSON file (see
data/test_heawei.json
) with necessary metadata including:black_level
,white_level
,cfa_pattern
,color_matrix_*
and etc. Metadata was extracted usingraw_prc_pipeline
module.
Caution If color_matrix_*
is not provided average color matrix of Huawei Mate 40 Pro is used instead.
Directory demo
contains demonstration script for processing PNG raw images with JSON metadata using implemented classes and finctions from raw_prc_pipeline
.
To process PNG images with corresponding metadata from data
directory call the following command:
python -m demo.process_pngs -p data -ie gw -tm Flash
To see other arguments of the script call python -m demo.process_pngs -h
from the root directory.
Also you can use more reproducible way via Docker:
sudo docker build -t nightimaging .
sudo docker run --rm -u $(id -u):$(id -g) -v $(pwd)/data:/data nightimaging ./run.sh
Also the visualizations of different stages of implemented demo raw image processing pipeline can be found in the demo/process_img.ipynb
file, which one can .
Dockers and all models from teams is availiable on hugging face repo.