UniFab HDR Upconverter AI|Technical Principle

With advances in display technology, High Dynamic Range (HDR) content has become the visual standard due to its wide luminance and rich colors. However, Standard Dynamic Range (SDR) content lacks sufficient brightness and color to fully meet HDR display requirements.
To solve this, UniFab developed an end-to-end SDR-to-HDR conversion method using deep learning that combines convolutional and generative adversarial networks. Through multi-task loss, adaptive tone mapping, and gamut expansion, it enhances details and color, improving dynamic range and realism.
The method also integrates supervised and unsupervised training with diverse data augmentation to boost model generalization and adaptability, offering a solid solution for high-quality SDR-to-HDR conversion across various applications.

Interpretation of HDR-related parameters

Dynamic Range

Dynamic range refers to the luminance ratio between the brightest highlights and the darkest shadows in a video signal, reflecting the richness of details in light and dark areas and the visual expressiveness of the image. The larger the dynamic range, the more abundant the details in light and shadow the video can display, thereby enhancing realism and immersive experience.

5295be59-acd5-4438-8280-f45c59e487a6.png

Standard Dynamic Range

SDR

  • The dynamic range is about 6 to 10 stops, with a limited brightness range.
  • Typically, 8 bits per channel, 24 bits per pixel.
  • Peak brightness ranges from 100 to 400 nits (cd/m²), depending on the display device.
  • Contrast ratio is approximately 1,200:1.

High Dynamic Range

HDR

  • Dynamic range usually spans 12 to 17.6 stops, with most cameras capable of around 15 stops.
  • Commonly 10 bits per channel (supporting up to 32-bit floating point), up to 96 bits per pixel.
  • Theoretically, peak brightness can reach 10,000 nits, though most HDR displays have a maximum brightness of about 1,000 to 2,000 nits.
  • LCD displays can achieve contrast ratios up to 20,000:1, while OLED displays can exceed 1,000,000:1.


Compared to SDR, HDR not only expands the numeric range between the brightest and darkest points but also provides finer detail in midtones and shadow areas. This performance is limited by the peak brightness and contrast capabilities of the display device. Furthermore, different HDR formats (such as HDR10, Dolby Vision, and HLG) vary in color gamut, dynamic metadata, and color depth, affecting the final visual effect.

Snipaste_2025-09-10_11-57-16.jpg

If you watch HDR videos on a non-HDR display, you may see the entire image appear grayish, with lower contrast and saturation, as shown in the example above.

Snipaste_2025-09-10_11-57-38.jpg

The above image was captured using an HDR display👆.

Core Architecture of UniFab SDR to HDR

SDR (Standard Dynamic Range) content typically lacks detail in highlights and shadows, as well as a wide range of color information. HDR (High Dynamic Range) requires the image to have a much greater brightness range and a broader color gamut. Simple linear contrast stretching can result in image distortion, color shifts, or increased noise. Therefore, AI-driven SDR to HDR conversion must ensure naturalness and authenticity of the image while generating new visual details.

2.1 Deep Learning Model Architecture

UniFab has developed a multimodal deep learning pipeline for high-fidelity SDR to HDR mapping. The core model combines CNNs and GANs to perform content-adaptive feature extraction and style transfer, accurately restoring luminance gradients and color distributions from limited dynamic range inputs, resulting in HDR images with authentic details and natural perception.

2.1.1 Hierarchical Convolutional Neural Network (CNN)
UniFab uses a deep multi-scale convolutional network designed for SDR images. It combines local spatial details with global semantic context via cross-layer fusion and skip connections, allowing more precise reconstruction of luminance and color in HDR restoration.

06.jpg
  • Feature Pyramid Networks (FPN): Constructs a multi-scale feature pyramid to extract features from coarse edges to fine textures, addressing detail loss in highlights and shadows of SDR images, thus improving detail recovery in HDR images.
  • Residual Learning and Sparse Connections: Uses residual blocks to prevent gradient vanishing and enhance the recovery of high-frequency details in SDR images, avoiding over-smoothing and ensuring rich, authentic HDR details.
  • Attention Mechanisms: Integrates channel and spatial attention to selectively boost features in SDR regions with weak luminance gradients and color details, focusing on highlights and complex textures to improve local contrast and structure in HDR images.
  • Non-local Operations: Captures long-range dependencies to enhance spatial continuity of luminance and color gradients, ensuring smooth transitions and overall coherence in HDR images.

2.1.2 Conditional Generative Adversarial Network (Conditional GAN)

UniFab, based on the conditional GAN framework and tailored to the data characteristics of SDR images, constructs an end-to-end mapping model to accurately expand the limited SDR color gamut and dynamic range into the color and luminance space of High Dynamic Range (HDR) images.

02.jpg
  • Generator Architecture: A U-Net with encoder-decoder paths and skip connections reconstructs multi-scale details using convolutional, deconvolutional, and pixel normalization layers. A Spatial Transformer Network (STN) dynamically corrects local geometric distortions, ensuring geometric accuracy and preserving SDR structure during conversion.
  • Multi-discriminator Framework: Multiple discriminators focus on texture (high-frequency details), color consistency, and global visual style, jointly guiding the generator to enhance authenticity and naturalness of SDR-to-HDR conversion.
  • Adversarial and Perceptual Loss: Adversarial loss from discriminator feedback enhances texture and structural realism, while perceptual loss compares generated and real HDR images in a high-level feature space, improving subjective and objective quality.
  • Cycle-consistency Loss: Based on CycleGAN, this loss enforces stable bidirectional mapping between SDR and HDR, ensuring reliable inverse recovery, better generalization to unseen SDR inputs, and increased training diversity.

2.2 Multi-task Loss Function

UniFab employs a multi-task loss framework to improve SDR-to-HDR conversion by jointly optimizing pixel accuracy, structural consistency, visual quality, and color fidelity. The key loss components are:

03.jpg

Multi-task Loss Function

  • L1/L2 Reconstruction Loss: Measures pixel-level absolute (L1) or squared (L2) error between generated and ground truth HDR images, balancing sharp detail preservation and noise reduction.
  • Contrast and Luminance Loss: Enhances details in highlights and shadows, recovering luminance levels lost due to SDR dynamic range limits, preventing highlight clipping and shadow crushing, and improving visual depth.
  • Perceptual Loss: Uses features from pre-trained deep networks to compare images in feature space, capturing texture and structure more aligned with human perception, boosting detail richness and style consistency.
  • Color Consistency Loss: Ensures color distribution of generated images aligns with inputs by matching statistics in color spaces like Lab or YCbCr, maintaining natural color transitions and avoiding distortions.
  • Structural Similarity Loss (SSIM Loss): Optionally measures similarity of local structures and textures, promoting clear detail organization and spatial consistency in line with human vision.
  • Adversarial Loss: Through GAN discriminator feedback, encourages generation of realistic textures and high dynamic details, surpassing traditional pixel-based optimization for more natural HDR results.
  • Edge Preservation Loss: Emphasizes high-frequency edges during training to accurately restore details, avoiding blurring and preserving image sharpness and structural stability.

2.3 Brightness and Color Dynamic Expansion Algorithm

To achieve high-quality SDR to HDR conversion, UniFab has designed and implemented a systematic brightness and color dynamic expansion algorithm. This algorithm ensures the enhancement of HDR images in terms of color richness and visual realism through multi-level and multi-dimensional strategies.

01.jpg

Adaptive Tone Mapping
This module uses content-aware algorithms to dynamically adjust brightness and contrast for HDR output. It balances local and global contrast through multi-scale adjustments and spatial filters, ensuring natural brightness transitions without detail loss. Brightness mapping adapts based on image statistics and scene lighting, smoothly expanding SDR’s limited range to HDR’s wider range, preserving realism and preventing visual fatigue. Saturation is also adaptively controlled to avoid color oversaturation and distortion.

Color Gamut Expansion
SDR content generally uses Rec.709, while HDR uses the wider Rec.2020 color gamut. UniFab’s module employs deep learning-based color mapping to restore colors lost due to SDR’s gamut limits. Accurate color space transformations ensure minimal distortion, while manual settings allow professional fine-tuning of tone, saturation, and hue for customized looks.

Local Contrast Enhancement
Multi-scale techniques enhance contrast locally and globally by decomposing brightness layers via Laplacian pyramid or wavelets to avoid artifacts. Edge and texture details are preserved through guided filtering and edge detection, while adaptive contrast adjustment maintains shadow detail and prevents highlight overexposure, achieving balanced, rich contrast overall.

2.4 Dataset and Training Strategy

To ensure UniFab’s generalization and accuracy in SDR to HDR conversion, we designed a comprehensive dataset construction and diversified training strategy, covering supervised, unsupervised, and data augmentation techniques for various complex environments and scenarios.

Paired Supervised Training: Using high-quality, scene-rich paired SDR-HDR images, the model is trained under supervision to learn dynamic range expansion, detail restoration, and color mapping. Paired data includes professionally captured and post-processed HDR synthesized images, ensuring precise matching and authenticity.

Unsupervised Learning: Incorporating CycleGAN and related unsupervised frameworks to train without paired HDR references. This approach uses cycle-consistency loss to ensure reversible mappings and domain adaptation to mitigate distribution discrepancies, enhancing data diversity and generalization—ideal for applications like surveillance and live streaming.

04.jpg

Data Augmentation

  • Enhances data richness and model robustness through
  • Multi-resolution Cropping: Random cropping and scaling of image patches to improve perception of textures and structures at multiple scales.
  • Exposure Fusion: Synthesizing SDR images with multiple exposures to simulate varied lighting conditions, expanding the dynamic range in training data.
  • Color and Geometric Transformations: Including color jittering, contrast adjustment, rotation, and mirroring to diversify data distribution and prevent overfitting.

UniFab SDR to HDR Highlights

Diverse Model Conversion

UniFab HDR Upconverter AI integrates four deep learning models tailored for different video resolutions. It effectively addresses challenges in dynamic range expansion, color mapping, and detail restoration during SDR to HDR conversion, ensuring superior image quality and natural visual transitions across various scenes and resolutions.

Fast Model

  • Lightweight dynamic range expansion: Combines depthwise separable convolution and dynamic gamma mapping for fast, stable luminance extension, ideal for real-time scenarios.
  • Temporal noise suppression and frame consistency: Uses temporal feature aggregation to reduce dynamic noise and flicker while ensuring fast inference, enhancing HDR video smoothness.
  • Efficient color correction: Employs conditional batch normalization for tone adjustment, improving basic color restoration and rapid color space tuning in low-complexity scenes.
07.jpg

FHD (1080p) Model

  • Multi-scale luminance mapping and edge preservation: Uses atrous convolution and skip connections to accurately extract local brightness gradients and edges, preventing highlight clipping and shadow detail loss.
  • Cross-layer semantic fusion: Enhances global semantic understanding through feature fusion, balancing local detail with overall style.
  • Dynamic color space adaptation: Adjusts tone mapping curves to support major SDR standards mapped to HDR P3 or Rec.2020 for natural color transitions.
08.jpg

QHD Model

  • Deep residual network with dual attention: Utilizes deep residual decoding and channel-spatial attention to recover high-frequency details and complex textures.
  • Adaptive noise filtering and detail enhancement: Local noise estimation balances noise reduction and detail preservation, tackling noise amplification at QHD resolution.
  • Local lighting estimation: Dynamically corrects local illumination to improve brightness gradation in shadows and highlights.
09.jpg

4K UHD Model

  • Multi-modal GAN architecture: Integrates multi-scale discriminators for fine texture, color, and style optimization to achieve high-precision HDR mapping in 4K content.
  • Spatial transformer network and non-local attention: Corrects geometric distortion and captures long-range pixel relations, ensuring spatial coherence and smooth color gradients.
  • Multi-loss training: Combines perceptual, adversarial, and gradient preservation losses to enhance realism and detail restoration.

Support for Two Major HDR Color Spaces

UniFab HDR Upconverter AI supports the two leading HDR color space standards—HDR DCI-P3 and HDR Rec.2020—allowing users to choose the optimal output based on their display devices and application needs. Leveraging advanced deep learning and image processing techniques, it achieves precise mapping from limited dynamic range and gamut SDR images to wide HDR color spaces, with key features as follows:

v2-3a55b4540248ffc6c308c23af36f4181_1440w.jpg

1. Color Space Mapping and Conversion

Adaptive color transformation network: Uses conditional GAN with multi-scale convolutions to dynamically learn nonlinear mappings from SDR to target HDR spaces (DCI-P3 or Rec.2020), enabling fine control over high-dimensional color distributions.

Multi-component color correction: Applies linear and nonlinear calibrations per RGB channel through color matrix transformations and gamma correction to ensure accurate and consistent colors.

Joint gamma and tone mapping optimization: Combines HDR-specific transfer functions (PQ or HLG) to enhance shadow details and highlight color fidelity, preventing distortion and color shifts.

2. Dynamic Range Expansion and Luminance Mapping

Multi-scale luminance modeling: Extracts low-frequency brightness and high-frequency textures via deep convolutional features, supporting detail enhancement and global luminance extension.

Adaptive highlight and shadow enhancement: Uses local contrast enhancement and nonlinear brightness stretch to restore bright details and reveal shadow information, enriching HDR luminance and smooth transitions.

Dynamic tone mapping: Adjusts tone curves in real-time based on scene content to avoid brightness compression and highlight clipping during SDR-to-HDR conversion, improving visual comfort.

3. Color Fidelity and Visual Consistency

High-dimensional color distribution matching: Jointly trains with perceptual and color consistency losses to ensure high fidelity in tone, saturation, and contrast, minimizing visual deviations.

Non-local self-attention: Captures long-range pixel color correlations to prevent color discontinuities and artifacts, enhancing natural color gradation and overall image cohesion.

Speed Improvement

To meet real-time HDR conversion demands for high-resolution videos, UniFab optimized the architecture and operator-level acceleration of the 3027 version model, significantly boosting inference speed. This ensures efficient SDR-to-HDR mapping while maintaining high-quality HDR visuals. Below are the measured conversion performance data and key technical measures based on a 9-minute 57-second, 24fps test clip across various GPU platforms:

Test Source
Duration: 9min 57s 
Frame Rate: 24fps
GPUModelTest Results
NVIDIA GeForce RTX 4060 Ti4K UHD Model

UniFab 3027

Conversion time 2h 46m 40s 

Speed 1.44fps

UniFab 3028

Conversion time 1h 3m 32s

Speed 3.78fps

NVIDIA GeForce RTX 5070QHD Model

UniFab 3027

Conversion time 30m 16s

Speed 7.71fps

UniFab 3028

Conversion time 27m 48s

Speed 8.45fps

NVIDIA GeForce RTX 3050FHD (1080p) Model

UniFab 3027

Conversion time 51m 8s

Speed 4.93fps

UniFab 3028

Conversion time 26m 9s

Speed 9.04fps

NVIDIA GeForce RTX 2080Fast Model

UniFab 3027

Conversion time 15m

Speed 16-17fps

UniFab 3028

Conversion time 10m

Speed stable 16-25fps

Technical Details and Optimization

  • Network pruning and depthwise separable convolutions reduce model complexity and speed up inference.
  • Mixed precision training uses FP16 to boost speed and lower memory without losing stability.
  • Multithreading and operator fusion accelerate data loading and execution, minimizing latency.
  • Module-specific optimizations speed up dynamic range expansion, color conversion, and edge attention while preserving quality.
  • Improved temporal feature fusion ensures frame consistency, reducing flicker and jitter in videos.

Future Prospects and Upgrade Plans

Deeper Network Optimization and Automated Search

We plan to introduce Neural Architecture Search (NAS) to automatically explore and design more efficient network structures, further improving SDR-to-HDR conversion quality and inference speed while balancing model compactness and performance.

Multimodal Sensor Data Integration

We aim to incorporate auxiliary data such as sensor depth information and scene lighting measurements to build multimodal fusion models, significantly enhancing dark detail recovery and HDR mapping accuracy under complex lighting.

Continuous Improvement of Multi-task Loss Functions

We plan to adopt loss functions aligned with human visual perception, such as adaptive loss weighting based on visual models and guided by subjective user feedback, to better match the perceived realism.

Support for Multiple HDR Formats

Future releases will support additional HDR standards (e.g., HDR10+, Dolby Vision dynamic metadata), enabling broader device compatibility and content ecosystem integration, enhancing system versatility and market competitiveness.

Cloud Deployment and Edge Computing Optimization

UniFab will keep strengthening its technological edge and application scope in SDR-to-HDR conversion, delivering higher quality, efficiency, and wider coverage HDR visual solutions to meet evolving user needs and diverse scenarios.

👉 Community Link:

If you have topics of interest or models to follow, please leave a message in the forum. We will seriously consider your testing and evaluation suggestions and regularly publish professional technical reviews and upgrade reports.

Next Article Preview: UniFab HDR Upconverter AI|Technical Principle

Previous Articles:UniFab Smoother AI

📕UniFab Anime Model Iteration

📗Unifab Colorizer AI: Working Principles and Evolution Through Iterations

📘The Iterations of UniFab Face Enhancer AI

📙UniFab Texture Enhanced: Technical Analysis and Real-World Data Comparison

EthanMore >>
I am the product manager of UniFab. From a product perspective, I will present authentic software data and performance comparisons to help users better understand UniFab and stay updated with our latest developments.