Skip to content

[TGRS 2024]Diff-Mosaic: Augmenting Realistic Representations in Infrared Small Target Detection via Diffusion Prior

License

Notifications You must be signed in to change notification settings

YupeiLin2388/Diff-Mosaic

Repository files navigation

Diff-Mosaic

Diff-Mosaic :Augmenting Realistic Representations in Infrared Small Target Detection via Diffusion Prior(TGRS 2024) pdf

Framework

framework

Experiment result

result

Inastall

conda create -n diffmosaic python=3.9
conda activate diffmosaic
pip install -r requirements.txt

pre-trained model

  1. Download Open clip model( [huggingface]) and place it in ./weights/
  2. Download Pixel-prior model ( NUDT-SIRST , SIRST) and place in ./weights/
  3. Download Diff-prior model ( NUDT-SIRST, SIRST ) and place in ./weights/

Data Preparation

  1. download the NUDT-SIRST dataset and SIRST dataset
  2. run mosaic.py to generate Mosaic image
  3. run degrade.py to get mix image

Generate augmentation sample

python inference.py --input ./add_noise/NUDT_mosaic/  --config configs/model/diff_prior.yaml --ckpt weights/NUDT_stage2/last.ckpt --swinir_ckpt weights/NUDT_stage1/last.ckpt --steps 50 --sr_scale 1 --repeat_times 1 --color_fix_type wavelet --output results/nudt_moc/ --device cuda --use_guidance --g_scale 400 --g_t_start 200

Detection network

  1. Download dataset( [google]) and place it in ./detection_model/dataset/
  2. Downolad pretrained model ( [google]) and place it in ./detection_model/pretrained_model/
  3. cd ./detection_model/

train

python train.py --base_size 256 --crop_size 256 --epochs 3000 --dataset enh_NUDT_aug --split_method 50_50 --model DNANet --backbone resnet_18  --deep_supervision True --train_batch_size 40 --test_batch_size 16 --mode TXT

inference

python test.py --base_size 256 --crop_size 256   --model_dir ./pretrained_model/NUDT.tar --dataset NUDT_aug --split_method 50_50 --model DNANet --backbone resnet_18  --deep_supervision True --test_batch_size 1 --mode TXT

Acknowledgement

This project is build based on DNANet and DiffBIR. We thank the authors for sharing their code.

About

[TGRS 2024]Diff-Mosaic: Augmenting Realistic Representations in Infrared Small Target Detection via Diffusion Prior

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages