Skip to content

Commit f4d8d9f

Browse files
authored
Merge pull request #7 from jangsoopark/v2.1.0
V2.1.0
2 parents 4d9416e + 4fdf008 commit f4d8d9f

File tree

15 files changed

+256
-59
lines changed

15 files changed

+256
-59
lines changed

README.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ The proposed model only consists of **sparsely connected layers** without any fu
4141
## Training
4242
For training, this implementation fixes the random seed to `12321` for `reproducibility`.
4343

44-
The experimental conditions are same as in the paper, except for `data augmentation` and `learning rate`.
45-
The `learning rate` is initialized with `1e-3` and decreased by a factor of 0.1 **after 26 epochs**.
44+
The experimental conditions are same as in the paper, except for `data augmentation`.
4645
You can see the details in `src/model/_base.py` and `experiments/config/AConvNet-SOC.json`
4746

4847
### Data Augmentation
@@ -52,10 +51,9 @@ You can see the details in `src/model/_base.py` and `experiments/config/AConvNet
5251

5352
- However, for SOC, this repository does not use random shifting tue to accuracy issue.
5453
- You can see the details in `src/data/generate_dataset.py` and `src/data/mstar.py`
55-
- This implementation failed to achieve higher than 98% accuracy when using random sampling.
5654
- The implementation details for data augmentation is as:
57-
- Crop the center of 94 x 94 size image on 128 x 128 SAR image chip (49 patches per image chip).
58-
- Extract 88 x 88 patches with stride 1 from 94 x 94 image.
55+
- Crop the center of 94 x 94 size image on 100 x 100 SAR image chip (49 patches per image chip).
56+
- Extract 88 x 88 patches with stride 1 from 94 x 94 image with random cropping.
5957

6058

6159
## Experiments
@@ -141,14 +139,14 @@ MSTAR-PublicMixedTargets-CD1/MSTAR_PUBLIC_MIXED_TARGETS_CD1
141139
- Place the two directories (`train` and `test`) to the `dataset/raw`.
142140
```shell
143141
$ cd src/data
144-
$ python3 generate_dataset.py --is_train=True --use_phase=True --chip_size=94 --dataset=soc
145-
$ python3 generate_dataset.py --is_train=False --use_phase=True --dataset=soc
142+
$ python3 generate_dataset.py --is_train=True --use_phase=True --chip_size=100 --patch_size=94 --use_phase=True --dataset=soc
143+
$ python3 generate_dataset.py --is_train=False --use_phase=True --chip_size=128 --patch_size=128 --use_phase=True --dataset=soc
146144
$ cd ..
147-
$ python3 train.py
145+
$ python3 train.py --config_name=config/AConvNet-SOC.json
148146
```
149147

150148
#### Results of SOC
151-
- Final Accuracy is **99.18%** (The official accuracy is 99.13%)
149+
- Final Accuracy is **99.13%** at epoch 26 (The official accuracy is 99.13%)
152150
- You can see the details in `notebook/experiments-SOC.ipynb`
153151

154152
- Visualization of training loss and test accuracy
@@ -165,10 +163,10 @@ $ python3 train.py
165163

166164
| Noise | 1% | 5% | 10% | 15%|
167165
| :---: | :---: | :---: | :---: | :---: |
168-
| AConvNet-PyTorch | 98.56 | 94.39 | 85.03 | 73.65 |
166+
| AConvNet-PyTorch | 98.60 | 95.18 | 85.36 | 73.24 |
169167
| AConvNet-Official | 91.76 | 88.52 | 75.84 | 54.68 |
170168

171-
169+
<!--
172170
### Extended Operating Conditions (EOC)
173171
174172
#### EOC-1 (Large depression angle change)
@@ -216,15 +214,28 @@ MSTAR-PublicMixedTargets-CD2/MSTAR_PUBLIC_MIXED_TARGETS_CD2
216214
└ ...
217215
218216
```
219-
- Train Target: 2S1, BRDM2, T72, ZSU234 with depression angle 17$\degree$
220-
- Test Target: 2S1, BRDM2, T72, ZSU234 with depression angle 30$\degree$
217+
218+
#### Quick Start Guide for Training
219+
220+
- Dataset Preparation
221+
- Download the [soc-dataset.zip](https://github.com/jangsoopark/AConvNet-pytorch/releases/download/V2.0.0/soc-raw.zip)
222+
- After extracting it, you can find `train` and `test` directories inside `raw` directory.
223+
- Place the two directories (`train` and `test`) to the `dataset/raw`.
224+
```shell
225+
$ cd src/data
226+
$ python3 generate_dataset.py --is_train=True --use_phase=True --chip_size=96 --dataset=eoc-1
227+
$ python3 generate_dataset.py --is_train=False --use_phase=True --dataset=soc
228+
$ cd ..
229+
$ python3 train.py --config_name=config/AConvNet-EOC-1.json
230+
```
231+
221232
222233
#### EOC-2 (Target configuration and version variants)
223234
224235
### Outlier Rejection
225236
226237
### End-to-End SAR-ATR Cases
227-
238+
-->
228239
## Details about the specific environment of this repository
229240

230241
| | |

assets/figure/001.png

15.8 KB
Loading

assets/figure/2S1.png

1.23 KB
Loading
181 Bytes
Loading
4.18 KB
Loading

experiments/config/AConvNet-EOC-1.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"num_classes": 4,
55
"channels": 2,
66
"batch_size": 100,
7-
"epochs": 50,
7+
"epochs": 100,
88
"momentum": 0.9,
9-
"lr": 1e-3,
10-
"lr_step": [14],
9+
"lr": 1e-4,
10+
"lr_step": [50],
1111
"lr_decay": 0.1,
1212
"weight_decay": 4e-3,
1313
"dropout_rate": 0.5

experiments/config/AConvNet-SOC.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"num_classes": 10,
55
"channels": 2,
66
"batch_size": 100,
7-
"epochs": 50,
7+
"epochs": 100,
88
"momentum": 0.9,
99
"lr": 1e-3,
10-
"lr_step": [26],
10+
"lr_step": [50],
1111
"lr_decay": 0.1,
1212
"weight_decay": 4e-3,
1313
"dropout_rate": 0.5

notebook/experiments-SOC.ipynb

Lines changed: 27 additions & 24 deletions
Large diffs are not rendered by default.

notebook/target-chip.ipynb

Lines changed: 156 additions & 0 deletions
Large diffs are not rendered by default.

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ tqdm==4.61.2
66
torchvision==0.10.0+cu111
77
matplotlib
88
scikit-learn
9-
seaborn
9+
seaborn
10+
Pillow

0 commit comments

Comments
 (0)