This repository is the official MIPI Challenge 2022 implementation of Team LVGroup_HFUT in Image Restoration for Under-display Camera.
The restoration results of the tesing images can be downloaded from here.
cd your/script/path
python infer.py --data_source your/dataset/path --model_path ../pretrained/optimal.pth --save_image --experiment your-experiment
cd your/script/path
python train.py --data_source your/dataset/path --experiment your-experiment
cd your/script/path
python test.py --data_source your/dataset/path --model_path ../pretrained/optimal.pth --experiment your-experiment
The format of the dataset should meet the following code in datasets.py:
self.img_paths = sorted(glob.glob(data_source + '/' + mode + '/input' + '/*.*'))
self.gt_paths = sorted(glob.glob(data_source + '/' + mode + '/GT' + '/*.*'))
or
self.img_paths = sorted(glob.glob(data_source + '/' + 'test' + '/input' + '/*.*'))
data_source is given by the command line.
mode can be 'train' or 'val'.
when training and validating: the default path is '../results/your-experiment'
when testing: the default path is '../outputs/your-experiment/test'
when inferring: the default path is '../outputs/your-experiment/infer'