[IEEE Trans. TGRS 2025] SDS-Net: Shallow-Deep Synergism-detection Network for Infrared Small Target Detection
SDS-Net is a deep learning framework designed for infrared small target detection (IRSTD). The network employs a shallow-deep synergism strategy that effectively combines multi-scale features from different depths of the network to enhance detection performance.
- Shallow-Deep Synergism Architecture: Integrates features from both shallow and deep layers for better target-background discrimination
- Multi-Scale Feature Fusion: Utilizes MSCA (Multi-Scale Cross Attention) and MSSA (Multi-Scale Self Attention) modules
- Deep Supervision: Implements deep supervision during training for better convergence
- Comprehensive Evaluation: Supports multiple evaluation metrics including mIoU, nIoU, Pd, Fa, and F1-score
The SDS-Net architecture consists of:
- Backbone Network: Feature extraction backbone with ResNet-style blocks
- Shallow Module: Processes early-stage features with cross-attention mechanisms
- Deep Module: Handles high-level semantic features with self-attention
- Fusion Blocks: Combines features from different depths using ADSF (Adaptive Deep-Shallow Fusion)
- Multi-Scale Attention Mechanisms: MSCA and MSSA for effective feature interaction
The framework provides comprehensive evaluation metrics:
- mIoU: Mean Intersection over Union
- nIoU: Normalized IoU
- Pd: Probability of Detection
- Fa: False Alarm Rate
- F1-score: Harmonic mean of precision and recall
The framework supports multiple IRSTD datasets:
- NUAA-SIRST [download]
- NUDT-SIRST [download]
- IRSTD-1K [download]
- NUDT-SIRST-Sea (for maritime target detection)
- IRDST-real (real-world infrared dataset)
# Clone the repository
git clone https://github.com/PhysiLearn/SDS-Net.git
cd SDS-Net
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the package with dependencies
pip install .
# Or install in editable mode for development
pip install -e .
# Create conda environment
conda create -n sdsnet python=3.8
conda activate sdsnet
# Install PyTorch (adjust for your CUDA version)
conda install pytorch torchvision pytorch-cuda=11.8 -c pytorch -c nvidia
# Install other dependencies
pip install einops ml_collections thop
pip install scikit-image Pillow opencv-python
pip install tensorboard tqdm matplotlib# Install core dependencies
pip install torch torchvision
pip install einops ml_collections thop
pip install scikit-image Pillow opencv-python
pip install tensorboard tqdm matplotlibOrganize your dataset in the following structure:
datasets/
├── NUAA-SIRST/
│ ├── images/
│ ├── masks/
│ └── img_idx/
│ ├── train_NUAA-SIRST.txt
│ └── test_NUAA-SIRST.txt
├── NUDT-SIRST/
│ ├── images/
│ ├── masks/
│ └── img_idx/
│ ├── train_NUDT-SIRST.txt
│ └── test_NUDT-SIRST.txt
└── IRSTD-1K/
├── images/
├── masks/
└── img_idx/
├── train_IRSTD-1K.txt
└── test_IRSTD-1K.txt
sds-train --dataset_names ['NUDT-SIRST'] --model_names ['SDSNet'] --epochs 1000python train.py Key Arguments:
--dataset_names: List of datasets to train on--model_names: Model architecture (default: ['SDSNet'])--batchSize: Training batch size (default: 16)--patchSize: Training patch size (default: 256)--epochs: Number of training epochs (default: 1000)--dataset_dir: Dataset directory path (default: './datasets')--save: Checkpoint save path (default: './log')--log_dir: TensorBoard log directory (default: './otherlogs/SDSNet')
sds-test --dataset_names ['NUDT-SIRST'] --model_names ['SDSNet'] --pth_dirs ['NUDT-SIRST/SDSNet_673_best.pth.tar']python test.py SDS-Net/
├── model/
│ ├── SDSNet.py # Main model architecture
│ └── Config.py # Model configuration
├── images/ # Performance charts and visualizations
├── dataset.py # Dataset loading utilities
├── train.py # Training script
├── test.py # Testing and evaluation script
├── metrics.py # Evaluation metrics
├── utils.py # Utility functions
├── warmup_scheduler.py # Learning rate scheduling
├── pyproject.toml # Modern Python project configuration
└── README.md # This file
The model configuration is defined in model/Config.py:
config = {
'transformer': {
'num_heads': 4,
'num_layers': 4
},
'patch_sizes': [16, 8, 4],
'base_channel': 32,
'n_classes': 1
}If you find this work useful, please consider citing:
@article{SDSNet2025,
title={SDS-Net: Shallow–Deep Synergism-Detection Network for Infrared Small Target Detection},
author={Yue, Taoran and Lu, Xiaojin and Cai, Jiaxi and Chen, Yuanping and Chu, Shibing},
journal={IEEE Transactions on Geoscience and Remote Sensing},
volume={63},
pages={1–13},
year={2025},
publisher={Institute of Electrical and Electronics Engineers (IEEE)},
ISSN={1558-0644},
DOI={10.1109/tgrs.2025.3588117},
url={http://dx.doi.org/10.1109/tgrs.2025.3588117}
}Paper Title: SDS-Net: Shallow-Deep Synergism-detection Network for Infrared Small Target Detection
For questions or issues regarding SDS-Net, please contact the development team or open an issue on GitHub.
This implementation is inspired by recent advances in infrared small target detection and builds upon the following works:
This project is released under the MIT License.
