Home

Awesome

Ship-Go: SAR Ship Images Inpainting via Instance-to-Image Generative Diffusion Models

Paper |

Introduce

This is an official implementation of Ship-Go: SAR Ship Images Painting via Instance-to-Image Generative Diffusion Models by Pytorch, the code template is from the project: Plattle.

Pre-trained Model

DatasetTaskEpochsGPUs×Days×BsURL
SSDDPainting50001×5×2Google Drive

Bs indicates sample size per gpu.

Data Prepare

For SSDD:
-datasets
--sargen
----Annotations_seg (includes seg annotations, .xml)
----images(includes sar images, .jpg)
----flist (includes train/test list, .flist)

Config file selection

For SSDD dataset, please select the config file "config/sard.json"

For HRSID dataset, please select the config file "config/sard_hrsid.json"

Training/Resume Training

  1. Download the checkpoints from given links.
  2. Set resume_state of configure file to the directory of previous checkpoint. Take the following as an example, this directory contains training states and saved model:
"path": { //set every part file path
	"resume_state": "experiments/ssdd/checkpoint/5000" 
},
  1. Run the script:
python run.py -p train -c config/sard.json

Test

  1. Modify the configure file to point to your data following the steps in Data Prepare part.
  2. Set your model path following the steps in Resume Training part.
  3. Run the script:
python run.py -p test -c config/sard.json

Citation

@article{zhang2024ship,
  title={Ship-Go: SAR Ship Images Inpainting via instance-to-image Generative Diffusion Models},
  author={Zhang, Xin and Li, Yang and Li, Feng and Jiang, Hangzhi and Wang, Yanhua and Zhang, Liang and Zheng, Le and Ding, Zegang},
  journal={ISPRS Journal of Photogrammetry and Remote Sensing},
  volume={207},
  pages={203--217},
  year={2024},
  publisher={Elsevier}
}