Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,124 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
## π οΈ Requirements
|
| 5 |
+
|
| 6 |
+
### Environment
|
| 7 |
+
- **Python** 3.10+
|
| 8 |
+
- **PyTorch** 1.13.0+
|
| 9 |
+
- **CUDA** 11.6+
|
| 10 |
+
- **Ubuntu** 18.04 or higher / Windows 10
|
| 11 |
+
|
| 12 |
+
### Installation
|
| 13 |
+
|
| 14 |
+
```bash
|
| 15 |
+
# Create conda environment
|
| 16 |
+
conda create -n dccs python=3.8 -y
|
| 17 |
+
conda activate dccs
|
| 18 |
+
|
| 19 |
+
# Install PyTorch
|
| 20 |
+
pip install torch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0
|
| 21 |
+
|
| 22 |
+
# Install dependencies
|
| 23 |
+
pip install packaging
|
| 24 |
+
pip install timm==0.4.12
|
| 25 |
+
pip install pytest chardet yacs termcolor
|
| 26 |
+
pip install submitit tensorboardX
|
| 27 |
+
pip install triton==2.0.0
|
| 28 |
+
pip install causal_conv1d==1.0.0
|
| 29 |
+
pip install mamba_ssm==1.0.1
|
| 30 |
+
|
| 31 |
+
# Or simply run
|
| 32 |
+
pip install -r requirements.txt
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## π Dataset Preparation
|
| 36 |
+
|
| 37 |
+
We evaluate our method on three public datasets: **IRSTD-1K**, **NUAA-SIRST**, and **SIRST-Aug**.
|
| 38 |
+
|
| 39 |
+
| Dataset | Link |
|
| 40 |
+
|---------|------|
|
| 41 |
+
| IRSTD-1K | [Download](https://github.com/RuiZhang97/ISNet) |
|
| 42 |
+
| NUAA-SIRST | [Download](https://github.com/YimianDai/sirst) |
|
| 43 |
+
| SIRST-Aug | [Download](https://github.com/Tianfang-Zhang/AGPCNet) |
|
| 44 |
+
|
| 45 |
+
Please organize the datasets as follows:
|
| 46 |
+
|
| 47 |
+
```
|
| 48 |
+
βββ dataset/
|
| 49 |
+
β βββ IRSTD-1K/
|
| 50 |
+
β β βββ images/
|
| 51 |
+
β β β βββ XDU514png
|
| 52 |
+
β β β βββ XDU646.png
|
| 53 |
+
β β β βββ ...
|
| 54 |
+
β β βββ masks/
|
| 55 |
+
β β β βββ XDU514.png
|
| 56 |
+
β β β βββ XDU646.png
|
| 57 |
+
β β β βββ ...
|
| 58 |
+
β β βββ trainval.txt
|
| 59 |
+
β β βββ test.txt
|
| 60 |
+
β βββ NUAA-SIRST/
|
| 61 |
+
β β βββ ...
|
| 62 |
+
β βββ SIRST-Aug/
|
| 63 |
+
β βββ ...
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## π Training
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
python main.py --dataset-dir '/path/to/dataset' \
|
| 70 |
+
--batch-size 4 \
|
| 71 |
+
--epochs 400 \
|
| 72 |
+
--lr 0.05 \
|
| 73 |
+
--mode 'train'
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
**Example:**
|
| 77 |
+
```bash
|
| 78 |
+
python main.py --dataset-dir './dataset/IRSTD-1K' --batch-size 4 --epochs 400 --lr 0.05 --mode 'train'
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
## π Testing
|
| 82 |
+
|
| 83 |
+
```bash
|
| 84 |
+
python main.py --dataset-dir '/path/to/dataset' \
|
| 85 |
+
--batch-size 4 \
|
| 86 |
+
--mode 'test' \
|
| 87 |
+
--weight-path '/path/to/weight.tar'
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
**Example:**
|
| 91 |
+
```bash
|
| 92 |
+
python main.py --dataset-dir './dataset/IRSTD-1K' --batch-size 4 --mode 'test' --weight-path './weight/irstd1k_weight.pkl'
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
## π Results
|
| 96 |
+
|
| 97 |
+
### Quantitative Results
|
| 98 |
+
|
| 99 |
+
| Dataset | IoU (Γ10β»Β²) | Pd (Γ10β»Β²) | Fa (Γ10β»βΆ) | Weights |
|
| 100 |
+
|:-------:|:------------:|:----------:|:----------:|:-------:|
|
| 101 |
+
| IRSTD-1K | 69.64 | 95.58 | 10.48 | [Download](https://drive.google.com/file/d/1KqlOVWIktfrBrntzr53z1eGnrzjWCWSe/view?usp=sharing) |
|
| 102 |
+
| NUAA-SIRST | 78.65 | 78.65 | 2.48 | [Download](https://drive.google.com/file/d/13JQ3V5xhXUcvy6h3opKs15gseuaoKrSQ/view?usp=sharing) |
|
| 103 |
+
| SIRST-Aug | 75.57 | 98.90 | 33.46 | [Download](https://drive.google.com/file/d/1lcmTgft0LStM7ABWDIMRHTkcOv95p9LO/view?usp=sharing) |
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
## π Project Structure
|
| 107 |
+
|
| 108 |
+
```
|
| 109 |
+
DCCS/
|
| 110 |
+
βββ dataset/ # Dataset loading and preprocessing
|
| 111 |
+
βββ model/ # Network architecture
|
| 112 |
+
βββ utils/ # Utility functions
|
| 113 |
+
βββ weight/ # Pretrained weights
|
| 114 |
+
βββ main.py # Main entry point
|
| 115 |
+
βββ requirements.txt # Dependencies
|
| 116 |
+
βββ README.md
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
## π Acknowledgement
|
| 120 |
+
|
| 121 |
+
We sincerely thank the following works for their contributions:
|
| 122 |
+
|
| 123 |
+
- [BasicIRSTD](https://github.com/XinyiYing/BasicIRSTD) - A comprehensive toolbox
|
| 124 |
+
- [MSHNet](https://github.com/ying-fu/MSHNet) - Scale and Location Sensitive Loss
|