Abstract
Traditional underwater image enhancement (UIE) methods typically produce deterministic, "one-size-fits-all" outputs that lack flexibility for diverse aesthetic or scientific requirements. We present ColorCode, a novel framework that treats UIE as a decomposition and reconstruction task. By separating an image into distinct content and color codes and constraining the color latent space to a Gaussian distribution, ColorCode enables three powerful capabilities: standard color enhancement, color adaptation based on guidance images, and continuous color interpolation for realistic variations. Our approach achieves state-of-the-art performance across multiple benchmarks while providing unprecedented user control over the enhancement process.
Introduction
Underwater photography is fundamentally limited by the physics of light attenuation. As light travels through water, longer wavelengths (red and yellow) are absorbed more rapidly than shorter ones (blue and green), resulting in a pervasive color cast and loss of vibrant detail. While deep learning has advanced UIE, existing models are largely deterministic, offering a single fixed result for any given input. This lack of flexibility is a significant hurdle for researchers and artists who require specific color balances. Furthermore, many models fail to preserve the semantic integrity of colors because they do not explicitly separate image structure from color information.
Methods: The ColorCode Framework
The ColorCode framework is built upon a decomposition-reconstruction architecture inspired by multimodal unsupervised image-to-image translation.
1. Color-Content Decomposition
The model splits a distorted underwater image into two latent representations: a content code, which captures structure and texture, and a color code, which encapsulates semantic color information.
2. Explicit Latent Constraints
To ensure the color code is semantically meaningful and navigable, the authors apply a Maximum Mean Discrepancy (MMD) loss. This forces the color codes to follow a Gaussian distribution, transforming a standard restoration problem into a generative one where users can "sample" or "interpolate" through a continuous color space.
3. Functional Capabilities
As shown in Figure 1, the framework supports three primary tasks:
- Color Enhancement (CE): A supervised path to generate a high-quality reference result.
- Color Adaptation (CA): Users can provide a guidance image to transfer specific color characteristics to the target scene using a weight factor ($\alpha$).
- Color Interpolation (CI): By sampling points in the latent space, the model generates a smooth spectrum of realistic color variations.
Key Insights: Color vs. Style
A core contribution of this work is the distinction between "color codes" and traditional "style codes." While style transfer often alters the artistic feel or texture of an image, a color code in the context of UIE must align strictly with physical or biological references to ensure accuracy.
By leveraging a "hue invariance" prior—the observation that the underlying hue of long-wavelength light is often preserved even as intensity fades—ColorCode ensures that color adaptations remain physically plausible. Figure 4 demonstrates how the proposed color code interpolation produces results that more closely match the reference compared to standard style-based methods.
Results and Performance
ColorCode was evaluated on four major benchmarks: UIEB, LSUI, EUVP, and UFO-120.
- Quantitative Excellence: The model consistently ranks in the top three for PSNR (Peak Signal-to-Noise Ratio), SSIM (Structural Similarity), and UIQM (Underwater Image Quality Measure). On the UIEB dataset, it achieved a PSNR of 21.65, outperforming specialized architectures like UColor and WaterNet.
- Qualitative Superiority: Visual analysis confirms that ColorCode recovers fine textures and vibrant, natural-looking colors without the artificial over-saturation common in other deep-learning methods.
- Semantic Interpolation: The ability to "walk" through the latent space allows for smooth transitions (e.g., shifting a fish from a blue tint to its natural orange), proving the latent space is well-organized and semantically grounded.
Conclusion and Future Work
ColorCode introduces a controllable dimension to underwater image enhancement. While highly effective, the model's color adaptation feature currently relies on training data that includes at least some residual long-wavelength light to learn hue invariance. Future research will focus on extending this decomposition approach to address other complex degradations, such as non-uniform lighting and backscatter, with similar precision and user control.
Summary updated