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.
cd your/script/path
python infer.py --data_source your/dataset/path --model_path ../pretrained/your-model.pth --save_image --experiment your-experiment-name
cd your/script/path
python train.py --data_source your/dataset/path --experiment your-experiment --lambda_cont 0.5 --lambda_fft 0.1
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.
when training and validating: the default path is '../results/your-experiment'
when inferring: the default path is '../outputs/your-experiment/infer'