ztMotaLee / MIPI_UDC_LVGroup_HFUT

Image Restoration for Under-display Camera @MIPI-challenge (Team LVGroup_HFUT)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIPI Challenge 2022 Team LVGroup_HFUT

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.

Usage

Single image inference

cd your/script/path

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

Train

cd your/script/path

python train.py --data_source your/dataset/path --experiment your-experiment

Test

cd your/script/path

python test.py --data_source your/dataset/path --model_path ../pretrained/optimal.pth --experiment your-experiment

Dataset format

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'.

Path to saving results

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'

About

Image Restoration for Under-display Camera @MIPI-challenge (Team LVGroup_HFUT)

License:MIT License


Languages

Language:Python 100.0%