Bridging Modalities and Tasks: A Unified Hierarchical ViT for SAR-to-Optical Translation and Semantic Segmentation
Authors: Siyuan Liu, Xuze Zhang, Yongshun Wang, Licong Pan, Hang Liu, Huihui Li
Organizations: School of Automation, Northwestern Polytechnical University, Xi’an 710129, China · School of Cybersecurity, Northwestern Polytechnical University, Xi’an 710129, China
Synthetic Aperture Radar (SAR) images have all-weather, day-and-night observation capabilities. However, compared with optical images, their speckle noise and non-intuitive scattering mechanism limit the interpretability of the images. Generative models for SAR-to-optical (S2O) conversion can improve visual interpretability, but existing methods often ignore the constraints on semantic structure, which are necessary for downstream tasks, for the sake of visual effects. We propose a unified collaborative dual-task learning framework, termed BMT (Bridging Modalities and Tasks), that jointly optimizes S2O image translation and semantic segmentation through a shared hierarchical Vision Transformer. The framework integrates: (1) a LocalViTBlock that fuses global self-attention with spatial depthwise convolution through a learnable gating mechanism; (2) an enhanced output module combining multi-scale refinement processing, color correction and anti-aliasing, which calibrates channel-level color statistics through feature fusion; (3) a ControlNet-style conditional injection mechanism that encodes SAR wavelet features and segmentation labels into a multi-scale feature pyramid and injects them at each encoder layer through zero-initialized convolution; (4) a bounded Kendall uncertainty weighting scheme that prevents either task from dominating the shared representation. We evaluate the framework under both paired and unpaired translation settings, on the public WHU-OPT-SAR paired dataset and a self-constructed unpaired ship dataset built from HRSID and DIOR, respectively. The experimental results show that the proposed method achieves competitive S2O translation quality and semantic segmentation performance. The dataset and source code have been publicly released at https://github.com/Lewisyuaner/BMT-S2O-main.
Figures & tables
Fig. 1: Overall architecture of the proposed framework for unpaired S2O image translation and semantic segmentation. The shared hierarchical ViT encoder processes the input through four stages. A ControlNet-style condition injection mechanism encodes SAR wavelet features and segmentation labels into a multi-scale feature pyramid, injected at every encoder level via zero-initialized convolutions. The bottleneck features are fed to dual decoders: a generation decoder with multi-scale color correction and a segmentation decoder with ViT decoder stages.
Fig. 2: Visual comparison of SAR-to-optical translation results on the WHU-OPT-SAR dataset.
Fig. 3: Visual comparison of semantic segmentation results (obtained with a pre-trained FCN-32s) on the optical images generated by different S2O methods on the WHU-OPT-SAR dataset.
Method
SSIM ↑ (%)
PSNR ↑ (dB)
FID ↓
KID ↓ ( ×100 )
CycleGAN
39.63
19.82
174.18
7.72
Pix2pix
39.25
21.54
192.21
10.98
Pix2pixHD
38.89
22.17
229.32
16.54
StegoGAN
23.98
17.47
203.19
10.28
PatchGCL
37.91
19.73
190.72
10.54
S-CycleGAN
35.21
21.96
311.45
28.15
TABLE I: Comparison on the WHU-OPT-SAR dataset.
Method
Results
Category(mIoU)
mIoU ↑
mPA ↑
Farmland
City
Village
Water
Forest
Road
Others
Optical
40.83
53.34
51.65
54.28
22.29
65.18
67.57
6.46
18.38
SAR Image
34.06
43.34
45.49
46.08
15.18
62.40
65.47
1.99
1.83
CycleGAN
25.89
35.05
34.53
41.06
8.62
47.09
48.50
0.62
0.86
Pix2pix
22.41
30.46
38.29
14.97
8.05
35.61
58.92
0.33
0.67
Pix2pixHD
27.20
36.33
39.88
24.47
14.78
47.37
60.98
1.22
1.69
TABLE II: SEGMENTATION QUANTITATIVE EVALUATION RESULTS OF DIFFERENT METHODS USING FCN ON THE WHU-OPT-SAR DATASET
Fig. 4: Visual comparison of S2O translation results on the HRSID-DIOR ship dataset.
Fig. 5: Visual comparison of semantic segmentation results on the HRSID-DIOR ship dataset.
Method
FID ↓
KID ( ×100 ) ↓
CycleGAN
176.757
7.357
U-GAT-IT
166.900
8.096
CUT
145.782
5.741
F-LSeSim
165.002
7.888
NICE-GAN
156.878
6.831
StegoGAN
182.549
9.624
TABLE III: Quantitative comparison on the S2O translation task.
Method
Overall
Category IoU
Category Acc
mIoU ↑
mPA ↑
Bg.
Ship
Bg.
Ship
U-Net
88.41
91.80
99.40
77.43
99.80
83.90
Mask R-CNN
82.33
89.19
98.99
65.67
99.51
78.88
PSPNet
83.90
89.55
99.11
68.68
99.61
79.49
HRNet
88.25
91.62
99.39
77.04
99.79
83.45
SegFormer
82.79
90.17
99.01
66.57
99.47
80.87
TABLE IV: Quantitative comparison on the semantic segmentation task.
Branchs
Quantitative Metrics
Seg.
Trans.
SSIM
PSNR
FID
KID
mIoU
mPA
✓
×
-
-
-
-
39.08
49.34
×
✓
40.15
20.80
178.54
8.19
-
-
✓
✓
42.25
22.10
159.20
6.47
41.17
51.36
TABLE V: Ablation study of task branchs and quantitative metrics on WHU-OPT-SAR.
Modules
Quantitative Metrics
Local.
Cond.
perc.
SSIM
PSNR
FID
KID
mIoU
mPA
×
×
×
42.25
22.10
159.20
5.47
41.17
51.36
✓
×
×
43.73
22.30
158.46
5.21
41.78
52.02
✓
✓
×
44.90
22.30
151.48
5.47
44.04
54.39
✓
✓
✓
45.54
22.40
156.31
6.18
44.09
54.73
TABLE VI: Ablation study of module configurations and quantitative metrics on WHU-OPT-SAR.
Modules
Quantitative Metrics
Local.
Cond.
mIoU ↑
mPA ↑
FID ↓
KID ( ×100 ) ↓
×
×
84.54
90.44
174.49
6.62
√
×
88.01
93.07
173.73
6.34
√
√
87.62
92.72
164.21
6.23
TABLE VII: Ablation study of the LocalViTBlock and Condition Module on HRSID-DIOR.
Loss Functions
Quantitative Metrics
LSegcyc
Lcolor
Lhist
mIoU ↑
mPA ↑
FID ↓
KID ( ×100 ) ↓
×
×
×
87.62
92.72
164.21
6.23
√
×
×
88.32
92.25
168.20
6.58
√
√
×
88.91
93.03
165.25
6.19
√
√
√
88.51
93.07
161.81
5.81
TABLE VIII: Ablation study of the loss functions on HRSID-DIOR.