Paper commentary
U-shape Transformer for Underwater Image Enhancement
- Problem Data-driven underwater image enhancement lacks a large set of real paired training images, and existing networks do not model the uneven attenuation across color channels and spatial regions.
- Method Builds the 4279-group LSUI dataset with reference, segmentation and transmission maps, and proposes a U-shape Transformer with CMSFFT and SGFMT modules trained with a loss that combines RGB, LAB and LCH terms.

Fig. 4 . The network structure of U-shape Transformer. CMSFFT and SGFMT modules specially designed for UIE tasks reinforce the network’s attention to the more severely attenuated color channels and spatial regions. The multi-scale connections of the generator and the discriminator make the gradient flow freely between the generator and the discriminator, therefore making the training process more stable.
Original paper · CC BY 4.0 · Lintao Peng, Chunli Zhu, Liheng Bian · U-shape Transformer for Underwater Image Enhancement · Original paper figure · Extracted the figure area from page 5 of the original PDF.Gaps in existing underwater enhancement
Visual-prior methods adjust contrast, brightness and saturation directly without modeling the physical degradation, and the authors argue this limits how much quality can improve. Physical-model methods estimate medium transmission and background light and invert an imaging model, but their model assumptions do not always hold in complex water, and estimating several parameters at once is hard.
Data-driven methods perform well, but the paired datasets behind them are small, cover few scenes, or are not real-world, which limits what they learn. Attenuation that differs between color channels and between spatial areas has also not been handled inside one framework. The study therefore targets two things together: a larger real dataset with reference images, and a transformer design that addresses uneven attenuation directly.
How the LSUI reference set was built
The authors collected 8018 underwater images, partly captured by themselves and partly taken from public datasets, and state that these were used only for academic purposes. In the first round, 18 existing UIE methods each processed every collected image, giving a pool of 18 * 8018 candidates. To limit manual selection, UIQM and UCIQE, two non-reference metrics with equal weights, scored all candidates, and the top three of each raw image were kept as a set of 3 * 8018 images.
Twenty volunteers with image-processing experience rated each candidate on five criteria: contrast, saturation, color correction, artifact degree, and over- or under-enhancement, each on a 0-10 scale. Each rating was normalized to 0-1, so a reference candidate's total across the five criteria is at most 100, and the top-ranked candidate of each raw image was chosen as its reference.
Raw images whose top total fell below 70 were removed.
Some references still had blur, color cast or noise, so in a second round volunteers named the problems and the fixes, which were applied with enhancement methods [43], [50], [51]. The final dataset has 4279 images with reference images, segmentation maps and transmission maps, and it includes deep-sea and underwater cave scenes that the authors say earlier datasets lack.
Compared with UIEB, the LSUI set covers more scenes and object categories, as Figure 2 shows. Figure 3 gives examples in each group ordered as reference, raw image, segmentation map and transmission map.
U-shape Transformer at a glance
The generator takes the raw image and also downsamples it three times; each reduced copy passes through a 1*1 convolution and then a convolution block of its own scale. Together with the full-size input, these four blocks produce the features that feed the CMSFFT and SGFMT modules. Figure 4 places the two modules in the generator and the discriminator, with the multi-scale links between them.
On the decoding side, the SGFMT output is remapped and sent to the first convolution block, while the four convolution blocks at different scales each receive one of the four CMSFFT outputs. The discriminator's four blocks each take the output of the block above, a same-size feature from the decoder, and a 1*1 convolution of the reference image downsampled to that size.
The authors state that these multi-scale links let gradients flow across scales between generator and discriminator, which they credit for a more stable training process.
SGFMT: global context at the bottleneck
SGFMT replaces the generator's original bottleneck. Its input feature map is H/16 by W/16 by C, and a linear projection turns it into a sequence of HW/256 tokens with C channels. A learnable position embedding is added to these tokens so that each region keeps its position: \[ S_{in} = W * F_{in} + PE \] The sequence then enters a transformer block of 4 standard transformer layers.
Each layer applies multi-head attention and a feed-forward network, and each sublayer's output is added to its input after layer normalization: \[ S'_l = \mathrm{MHA}(\mathrm{LN}(S_{l-1})) + S_{l-1} \] \[ S_l = \mathrm{FFN}(\mathrm{LN}(S'_l)) + S'_l \] The final sequence is restored to a feature map of the same size as the input.
Figure 5 shows this data flow.
CMSFFT: channel-wise fusion of encoder scales
CMSFFT replaces the generator's skip connections. Each of the four encoder feature maps is projected into a token sequence by a convolution whose filter and stride follow its scale, with P set to 32. The channel counts C1, C2, C3 and C4 are 64, 128, 256 and 512, and the four sequences are concatenated along the channel dimension to form S with C = C1 + C2 + C3 + C4.
Queries Q_i come from each scale's own sequence, while keys K and values V come from the concatenated sequence: \[ Q_i = S_i W_{Q_i}, \quad K = S W_K, \quad V = S W_V \]
Attention runs along the channel axis rather than the patch axis of standard transformers, so it can point the network at channels that are degraded more. For each scale, the query-key similarity is scaled, passed through instance normalization and a softmax, and multiplied with V transposed; the authors normalize the similarity maps to help gradients spread smoothly.
The outputs of N = 4 heads are averaged and added to the query: \[ \mathrm{CMHA}_i = \frac{1}{N}\sum_{n=1}^{N} \mathrm{CA}_{in} + Q_i \]
A feed-forward step then gives \[ O_i = \mathrm{CMHA}_i + \mathrm{MLP}(\mathrm{LN}(\mathrm{CMHA}_i)) \], and this is repeated l = 4 times to build the l-layer transformer. The four output sequences are reshaped back into four feature maps, which are the inputs of the decoder's convolution blocks.
Multi-color space loss
The generator output G(x) and the reference y are each converted from RGB to LAB and to LCH before the color losses are computed: \[ (L_{G(x)}, A_{G(x)}, B_{G(x)}) = \mathrm{RGB2LAB}(G(x)), \quad (L_y, A_y, B_y) = \mathrm{RGB2LAB}(y) \] The LCH conversion is applied in the same way: \[ (L_{G(x)}, C_{G(x)}, H_{G(x)}) = \mathrm{RGB2LCH}(G(x)), \quad (L_y, C_y, H_y) = \mathrm{RGB2LCH}(y) \]
The LAB loss adds a squared difference of the L channel to two negative log terms over quantized A and B values, with Q denoting the quantization operator: \[ L_{LAB}(G(x),y) = E_{x,y}\Big[(L_y - L_{G(x)})^2 - \sum_{i=1}^{n} Q(A_{y_i})\log Q(A_{G(x)_i}) - \sum_{i=1}^{n} Q(B_{y_i})\log Q(B_{G(x)_i})\Big] \] The LCH loss has a negative log term over quantized L values plus squared differences of C and H: \[ L_{LCH}(G(x),y) = E_{x,y}\Big[-\sum_{i=1}^{n} Q(L_{y_i})\log Q(L_{G(x)_i}) + (C_y - C_{G(x)})^2 + (H_y - H_{G(x)})^2\Big] \]
The generator is trained with an RGB L2 loss, a perceptual loss, and the LAB and LCH losses, together with a standard GAN loss: \[ L_{GAN}(G,D) = E_y[\log D(y)] + E_x[\log(1-D(G(x)))] \] The discriminator D maximizes this GAN term, and the generator minimizes it. The full objective weights the terms as \[ G^* = \arg\min_G \max_D L_{GAN}(G,D) + \alpha L_{LAB}(G(x),y) + \beta L_{LCH}(G(x),y) + \gamma L_{RGB}(G(x),y) + \mu L_{per}(G(x),y) \] with alpha = 0.001, beta = 1, gamma = 0.1 and mu = 100, which the authors set through numerous experiments.
Color space choice and the value of LSUI
Each candidate color space was used as a single-space term in the mixed loss, and the network was trained on Train-L and tested on Test-L400 and Test-U90. The authors justify the choice by properties of the spaces: RGB channels are highly correlated and sensitive to brightness and shadows, LAB tracks human vision with a more uniform color distribution, and LCH separates brightness, saturation and hue.
Table II compares U-net, UGAN and the U-shape Transformer trained on Train-U, Train-E and Train-L, with Train-L being LSUI. The authors read this as evidence that LSUI's richer scenes and better references improve the enhancement and generalization of the tested network; Figure 7 shows the same trend visually, with the Train-L results showing the least color cast.
Full-reference results against ten methods
The comparison covers ten methods: UIBLA, UDCP, Fusion, Retinex based, RGHS, WaterNet, FUnIE, UGAN, UIE-DAL and Ucolor. The abstract states a superiority of more than 2dB, which these Table III values are the basis for.
Figure 8 places the same methods side by side on Test-L400 and Test-U90 samples, and the authors describe UIBLA's color casts, Retinex's residual casts and the local over-enhancement of UGAN and Ucolor. The authors also state that five open-source data-driven methods were retrained on LSUI, and they attribute the weaker results of those methods to specific design gaps, such as FUnIE's limited scalability on complex samples.
Non-reference and color restoration results
On the Test-U60 set the U-shape Transformer scored 3.91 PS, 0.73 UCIQE and 4.74 NIQE, and on SQUID it scored 3.23 PS and 4.24 NIQE. Its UIQM values, 0.85 on Test-U60 and 0.89 on SQUID, are not the highest in Table IV, where Fusion reaches 1.23 UIQM on Test-U60. The authors note that UCIQE and UIQM are not sensitive to color artifacts and casts, so they treat them as references rather than absolute judgments.
Figure 9 shows the perception scores in each corner for the same methods.
Table V measures CIEDE2000 between Color Checker patches and each method's output on Color-Checker7, where a lower value is better. The U-shape Transformer has the lowest value for Pentax W60, Pentax W80, Cannon D10, Fuji Z33, Panasonic TS1 and Olympus T6000, and its average is 9.20 against 11.23 for Ucolor. Its Olympus T8000 value of 11.14 is higher than Fusion's 10.97.
The authors describe UDCP and UIBLA results as bluish, Retinex as color distorted, and UGAN and UIE-DAL as low in saturation with excessive reddish compensation. Figure 10 shows a Fuji Z33 example with CIEDE2000 values printed in the top-left corner of each image.
Ablation of the four modules
The ablation trains every model on Train-L; the baseline BL refers to the design the authors cite as [33], and each variant adds one module, CMSFFT, SGFMT, the multi-scale gradient flow mechanism MSG, or the multi-color space loss MCSL, to BL. Adding CMSFFT gave 22.47 and 0.88 on Test-L400 and 21.72 and 0.86 on Test-U90, and adding SGFMT gave 21.78 and 0.86 and 21.36 and 0.87.
Adding MSG gave 20.11 and 0.82 on Test-L400 and 21.24 and 0.85 on Test-U90, and adding MCSL gave 21.51 and 0.82 and 20.16 and 0.81. The full model reached 24.16 and 0.93 on Test-L400 and 22.91 and 0.91 on Test-U90, the best of all rows.
Figure 11 shows the ablation on a Test-L400 sample, with PSNR values for each variant. The authors say BL+MSG has less noise and fewer artifacts than BL, that BL+MCSL shows uneven local artifacts from weak attention guidance, and that BL+CMSFFT and BL+SGFMT produce evenly distributed results whose overall color is inaccurate.
Limitations
The main test split, Test-L400, comes from the same LSUI dataset as the training split, which was randomly divided into 3879 training images and 400 test images. The cross-dataset checks use Test-U90, Test-U60 with 60 images and SQUID with 16 images.
The authors state that deep-ocean low-light scenes cannot be collected in the current dataset and leave them to future work with low-light boosting. The reference images come from ranking outputs of existing UIE methods and from volunteer votes rather than from measured ground truth. The PS scores come from a survey following [23], and the number of raters is not stated in the text.
The color space choice was made from PSNR on Test-L400 and Test-U90, the same test sets used for the final evaluation. The loss weights were set through numerous experiments, and no search range is given. Table II's training sets differ in size and source, with Train-U at 800 pairs plus 1,250 synthetic images and Train-E taken from EUVP, so the dataset comparison mixes size and source.
The ablation is run only on Train-L, and the full model's FLOPs and parameter count are not the lowest among the compared methods.
Paper info
- Authors
- Lintao Peng, Chunli Zhu, Liheng Bian
- Venue
- arXiv · Preprint
- First published
- 2021-11-23
- Added
- 2026-11-6
- Updated
- 2022-6-12
- Version
- v6
- arXiv
- 2111.11843
- DOI
- 10.1109/tip.2023.3276332
- Category
- cs.CV · eess.IV
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
The light absorption and scattering of underwater impurities lead to poor underwater imaging quality. The existing data-driven based underwater image enhancement (UIE) techniques suffer from the lack of a large-scale dataset containing various underwater scenes and high-fidelity reference images. Besides, the inconsistent attenuation in different color channels and space areas is not fully considered for boosted enhancement. In this work, we constructed a large-scale underwater image (LSUI) dataset including 5004 image pairs, and reported an U-shape Transformer network where the transformer model is for the first time introduced to the UIE task. The U-shape Transformer is integrated with a channel-wise multi-scale feature fusion transformer (CMSFFT) module and a spatial-wise global feature modeling transformer (SGFMT) module, which reinforce the network's attention to the color channels and space areas with more serious attenuation. Meanwhile, in order to further improve the contrast and saturation, a novel loss function combining RGB, LAB and LCH color spaces is designed following the human vision principle. The extensive experiments on available datasets validate the state-of-the-art performance of the reported technique with more than 2dB superiority.
Quote from the paper
Lintao Peng, Chunli Zhu, Liheng Bian (2021). U-shape Transformer for Underwater Image Enhancement. arXiv:2111.11843v6. https://doi.org/10.1109/tip.2023.3276332
BibTeX
@article{peng2021shape,
title = {{U-shape Transformer for Underwater Image Enhancement}},
author = {Lintao Peng and Chunli Zhu and Liheng Bian},
year = {2021},
eprint = {2111.11843},
archivePrefix = {arXiv},
doi = {10.1109/tip.2023.3276332},
url = {https://arxiv.org/abs/2111.11843v6}
}