Recovering Missing Regions of Earth Magnetic Anomaly Grid data (EMAG2) Using RePaint based on Diffusion Model
pip install numpy torch blobfile tqdm pyYaml pillow pandas # e.g. torch 1.7.1+cu110.
Name | Note |
---|---|
Completion results | Our completion results including csv and pdf |
Public EMAG2 data | EMAG2 data |
Pretrained model | Pretrained guided-diffusion model |
Place the pretrained model under ./pretrain
and original EMAG2 data under ./EMAG2
.
We prepare an easy test for quick evaluation. The input images and masks are in ./data
.
bash shell/easy_test.sh
Download EMAG2_V3 and place it in ./EMAG2
. Run the below command, you can preprocess the EMAG2_V3.
python scripts/preprocess.py
bash shell/step1.sh
bash shell/step2.sh
How to apply it for other datasets?
If you want train new completion model on a new dataset, it is recommended to follow guided-diffusion repository to obtain guided-diffusion model, then follow our completion method.
Our code is built upon RePaint and guided-diffuion. We thank the authors for their excellent work.
If you have any question, feel free to contact fymao@zju.edu.cn or fangyuanmaocs@gmail.com .