HVI Colour Space & CIDNet – Detailed Study Notes

Paper & Context

  • Title: “You Only Need One Color Space: An Efficient Network for Low-light Image Enhancement” (arXiv:2402.05809v3, 17 Jun 2024)

  • Task focus: Low-Light Image Enhancement (LLIE) – restoring brightness, suppressing noise, correcting color bias in images captured with insufficient illumination.

  • Core claim: A single, newly designed color space (HVI) is enough to stabilise LLIE; it removes the need for juggling sRGB & HSV/YCbCr during training/inference.

  • Code: https://github.com/Fediory/HVI-CIDNet

Motivation & Shortcomings of Existing Color Spaces

  • sRGB

    • Brightness & chromaticity entangled across three channels.

    • Tiny noise in one channel (e.g., red) ⇒ large global colour/brightness artifacts (Fig 1).

    • Networks compensate with many parameters and explicit colour/brightness losses.

  • HSV

    • Separates Value (brightness) from Hue/Saturation but…

    • Hue axis is discontinuous (wrap-around at 0/1 produces colour jumps).

    • Entire plane at Value = 0 maps to a single RGB triplet ⇒ one-to-many mapping ⇒ black artifacts in extreme dark regions.

  • YCbCr

    • Solves hue discontinuity but still has non-bijective pure-black mapping.

Proposed HVI (Horizontal/Vertical-Intensity) Colour Space

  • Design goals: (i) strict one-to-one mapping to sRGB, (ii) explicit decoupling of intensity vs. chroma, (iii) trainable adaptability to camera spectral bias & illumination range.

Building Blocks
  • Intensity map

    • I<em>max⁡=max⁡</em>c∈R,G,B(Ic)I<em>{\max}=\max</em>{c\in{R,G,B}}(I_c)

  • Trainable parameters

    • kk : adjusts colour-point density in low-intensity regions.

    • Colour-density plane C<em>k=k sin⁡!(πI</em>max⁡2)+ε,  ε=10−8C<em>k=k\,\sin!\bigl(\tfrac{\pi I</em>{\max}}{2}\bigr)+\varepsilon,\;\varepsilon=10^{-8}

    • γ<em>G,  γ</em>B\gamma<em>G,\;\gamma</em>B : camera-specific hue-bias factors to neutralise green / blue dominance.

    • Piece-wise linear perceptual hue mapping Pγ(H)P_{\gamma}(H) (Eq 3).

    • Trainable function T(x)T(x) : saturation reshaping; must satisfy T(0)=T(1),  T≥0T(0)=T(1),\;T\ge0.

  • Orthogonal HV plane

    • h=cos⁡(2πP<em>γ),  v=sin⁡(2πP</em>γ)h=\cos(2\pi P<em>{\gamma}),\;v=\sin(2\pi P</em>{\gamma})

    • Final horizontal / vertical channels

    • H^=C<em>k⊙S⊙T(P</em>γ)⊙h\hat H = C<em>k\odot S\odot T(P</em>{\gamma})\odot h

    • V^=C<em>k⊙S⊙T(P</em>γ)⊙v\hat V = C<em>k\odot S\odot T(P</em>{\gamma})\odot v

Inverse (PHVIT)
  • Recover h^,v^\hat h,\hat v from enhanced maps, then hue via H=Fγ(atan2⁡(v^,h^)) mod 1H=F_{\gamma}\bigl(\operatorname{atan2}(\hat v,\hat h)\bigr)\bmod1.

  • Saturation S=α<em>Sh^2+v^2S=\alpha<em>S\sqrt{\hat h^2+\hat v^2}, Value V=α</em>I IV=\alpha</em>I\,I (linear gains α<em>S,α</em>I\alpha<em>S,\alpha</em>I).

  • Guarantees surjective HVI→HSV and bijective HVI→sRGB.

CIDNet: Colour- & Intensity-Decoupling Network

  • Lightweight: 1.88 M parameters, 7.57 GFLOPs (256² input) – suitable for edge devices.

  • Pipeline

    1. HVIT: sRGB → (Intensity map I, HV map) in HVI.

    2. Dual-branch UNet-based enhancement network.

    • Intensity-branch (I-branch): learns global illumination mapping.

    • HV-branch: denoises colour & preserves structure.

    1. Six Lighten Cross-Attention (LCA) blocks inserted symmetrically.

    2. Residual addition of original HVI maps for ease of learning.

    3. PHVIT: enhanced HVI → sRGB.

Lighten Cross-Attention (LCA) Block
  • Sub-modules

    • Cross-Attention Block (CAB)
      • Query from one branch, Key/Value from the other ⇒ bidirectional guidance.
      • Output: Y^=W<em>V(Softmax(QKT/α</em>H)V)+Y\hat Y = W<em>V\bigl(\text{Softmax}(QK^T/\alpha</em>H)V\bigr)+Y.

    • Intensity Enhance Layer (IEL)
      • Decomposes CAB output into illumination Y<em>IY<em>I & reflectance Y</em>RY</em>R via depth-wise convs.
      • Enhancement: Y~<em>I=W</em>s[(tanh⁡(W<em>sY</em>I)+Y<em>I)⊙(tanh⁡(W</em>sY<em>R)+Y</em>R)]\tilde Y<em>I = W</em>s[(\tanh(W<em>sY</em>I)+Y<em>I)\odot(\tanh(W</em>sY<em>R)+Y</em>R)].

    • Color Denoise Layer (CDL): symmetric to IEL but focuses on chroma noise suppression.

Loss Functions
  • In HVI space

    • L<em>HVI=λ</em>1 L<em>1+λ</em>e L<em>edge+λ</em>p LperceptualL<em>{HVI}=\lambda</em>1\,L<em>1+\lambda</em>e\,L<em>{edge}+\lambda</em>p\,L_{perceptual}

  • In sRGB space: identical loss definition.

  • Joint objective: L=λ<em>cL</em>HVI+LRGBL=\lambda<em>c L</em>{HVI}+L_{RGB}.

Experimental Setup

  • Datasets

    • Paired: LOL-v1 (485/15), LOL-v2-Real (689/100), LOL-v2-Syn (900/100), SICE (train/val/test = 7:1:2), Sony-Total-Dark (SID subset), LOL-Blur.

    • Unpaired: DICM, LIME, MEF, NPE, VV.

  • Training details

    • Optimiser: Adam (β<em>1=0.9,  β</em>2=0.999)(\beta<em>1=0.9,\;\beta</em>2=0.999).

    • LR schedule: cosine annealing from 1×10−4→1×10−71\times10^{-4}\to1\times10^{-7}.

    • Padded inputs to multiple of 88, reflect padding.

    • Clip to admissible HVI domain (h,v,i)∣h2+v2≤sin⁡2!(πi2k){(h,v,i)\mid h^2+v^2\le\sin^2!\bigl(\frac{\pi i}{2k}\bigr)}.

  • Metrics

    • Paired: PSNR, SSIM, LPIPS.

    • Unpaired: BRISQUE, NIQE.

Quantitative Highlights (selected)

  • LOL-v1 GT-mean: PSNR=28.14\text{PSNR}=28.14 dB / SSIM=0.889\text{SSIM}=0.889 / LPIPS=0.079\text{LPIPS}=0.079 (best or 2ⁿᵈ best across board).

  • LOL-v2-Real Normal-light: PSNR=24.11\text{PSNR}=24.11 / SSIM=0.868\text{SSIM}=0.868 – exceeds RetinexFormer by +1.32 dB.

  • Sony-Total-Dark: +9.9 % PSNR vs. LEDNet, –12.7 % LPIPS.

  • LOL-Blur: 26.57 dB PSNR & lowest perceptual error, despite lowest FLOPs.

Qualitative Observations

  • CIDNet restores true object colours without over-saturation; avoids green cast typical of SNR-Aware.

  • Preserves fine texture in shadows; no hue flipping in near-black regions (proof of bijective HVI).

  • Under extreme darkness (Sony-Total-Dark): convincingly hallucinates missing details while keeping global tone natural.

Ablation Findings

  • Colour space choice

    • HVI > sRGB > HSV; switching to HSV drops PSNR by ≥10 dB (due to hue discontinuity).

  • LCA efficacy

    • Adding LCA to baseline UNet (+HVI) ↑PSNR by +5.4 dB.

    • Removing CAB leads to over-exposed halos; removing IEL / CDL leaves noise or under-exposure.

  • Dual-branch vs. single branch

    • Separate HV & I paths ↑PSNR +1.16 dB.

  • Loss design

    • Combining HVI-space & RGB-space losses superior; adding VGG19 perceptual loss yields extra +0.68–1.99 dB.

  • HVIT variants

    • Feeding Intensity-map + full HVI-map (ours) outperforms “all-HVI” or “Int+HV-only” inputs.

Robustness & Generalisation

  • Cross-dataset (train LOL-v1 → test LOL-v2-Syn): top SSIM 0.820 & best LPIPS 0.215.

  • Plug-and-play HVI transform

    • Augments RetinexFormer, LEDNet, Restormer, SNR-Aware; all 11 metrics improve while FLOPs unchanged.

  • Inference latency (256×256)

    • GPU ≈ 0.053 s, CPU ≈ 0.416 s – fastest among compared methods.

Practical & Ethical Considerations

  • Edge deployment feasible: <2 M parameters.

  • Applicable to surveillance, mobile photography, medical endoscopy where low-light capture common.

  • Ethical use: enhanced images may reveal previously hidden personal details; consent & privacy policies required.

  • Avoid misleading forensic conclusions: network may hallucinate plausible but incorrect content in totally black regions.

Connections & Future Directions

  • Extends Retinex-theory separation via learned colour space instead of manual Y channel.

  • Bridges classical colour science (bijective mapping) with deep learning adaptability (trainable k, γ parameters).

  • Potential to integrate HVI into diffusion-based LLIE, HDR reconstruction, or video frame pipelines.

  • Further study: hardware-aware training to auto-adapt HVI to specific sensor spectral response.