/MIPI24_NFR_LVGroup_HFUT

Nightime Flare Removal @mipi-challenge (Team LVGroup_HFUT)

Primary LanguagePython

MIPI Challenge 2024 Team LVGroup_HFUT

This repository is the official MIPI Challenge 2024 implementation of Team LVGroup_HFUT in Nighttime Flare Removal.

The restoration results of the tesing images and pretrained model can be downloaded from Google Drive.

Usage

Single image inference

cd your/script/path

python infer.py --data_source your/dataset/path --model_path ../pretrained/your-model.pth --save_image --experiment your-experiment-name

Train

cd your/script/path

python train.py --data_source your/dataset/path --experiment your-experiment --lambda_cont 0.5 --lambda_fft 0.1

Dataset format

The format of the dataset should meet the following code in datasets.py:

self.img_paths = sorted(glob.glob(data_source + '/train/train_input_2k' + '/*.*')) `

self.gt_paths = sorted(glob.glob(data_source + '/train/train_gt_2k' + '/*.*'))

or

self.img_paths = sorted(glob.glob(data_source + '/test/test_input_2k_bicubic' + '/*.*'))

data_source is given by the command line.

Path to saving results

when training and validating: the default path is '../results/your-experiment'

when inferring: the default path is '../outputs/your-experiment/infer'