Project Page Β |Β Paper
The official code for MetaWeather: Few-shot Weather-Degraded Image Restoration (ECCV 2024).
MetaWeather
β data
β β BID
β β β case1
β β β case2
β β β ...
β β β case6
β β β gt
β β SPAData/real_test_100
β β β input
β β β gt
β β realsnow
β β β train
β β β β input
β β β β gt
β β β test
β β β input
β β β gt
β β BID-case1-train.txt
β β BID-case1-test.txt
β β BID-case2-train.txt
β β BID-case2-test.txt
β β ...
β β BID-case6-test.txt
β β spadata-train.txt
β β spadata-test.txt
β β realsnow-train.txt
β β realsnow-test.txt
β β simmim_pretrain__swin_base__img192_window6__800ep.pth
β checkpoints
β metaweather_meta_train.pth
β metaweather_1shot_case1.pth
β metaweather_1shot_case2.pth
β ...
Download the datasets below:
Download checkpoints [Link]
- Place them in
./checkpoints/
Use conda environment:
conda env create -f env.yamlIf you want to train the model from the scratch, download simmim_pretrain__swin_base__img192_window6__800ep.pth from [Link]
- Place the file in
data.
python3 train.py --stage=0 --meta_train=True --exp_name=testpython3 train.py --stage=1 --case=<case> --meta_train=True --exp_name=test --checkpoint=<path-to-checkpoint>- case: (1-6) BID Task II.A Case 1-6, (7) SPA-Data, (8) RealSnow
python3 test.py --case=<case> --exp_name=test --checkpoint=<path-to-checkpoint>- case: (1-6) BID Task II.A Case 1-6, (7) SPA-Data, (8) RealSnow
Examples
python3 test.py --case=1 --checkpoint=./checkpoints/metaweather_1shot_case1.pthpython3 test.py --case=3 --checkpoint=./checkpoints/metaweather_1shot_case3.pthTested on Ubuntu 20.04, NVIDIA RTX 3090, CUDA 11.7, PyTorch 2.0.1, Python 3.10
Our code is built upon the following works:
TODOThis work was supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No.2019-0-01126, Self-learning based Autonomic IoT Edge Computing).