RAWPrism: A Three-Task Dataset and a Unified Model for RAW-Domain Image Fusion

Tianyi Hu, Yangdong Li, Shuyan Liu, Zihan Cao, Jingze Liang, Shaojie Wu, Chenyang Feng, Jincheng Di, Weijie Xiao, Liangjian DengarXiv 2026

TL;DR

Before a photo hits your screen as a polished RGB image, your camera's Image Signal Processor (ISP) has already warped its light values, smoothed over noise, and guessed missing colors. RAWPrism steps upstream of that pipeline, introducing the first unified dataset and lightweight neural network (just 3.58M parameters) capable of fusing multi-exposure, multi-focus, and infrared–visible images directly in the raw sensor domain. By combining images while light measurements are still linear and untampered, a single model checkpoint handles three distinct physical regimes cleanly and efficiently.

What Problem Does This Paper Address?

Image fusion is the art of taking two flawed views of the same scene and stitching together the best parts of each: merging dark and bright exposures (MEF), near and far focus planes (MFF), or visible texture with thermal heat signatures (IVIF).

Almost all unified fusion models operate on standard RGB images. The catch? RGB images are heavily "cooked." By the time an ISP finishes demosaicing (interpolating missing colors from the sensor's checkerboard Color Filter Array, or CFA), denoising, and applying nonlinear tone curves, the clean physics of light are gone. Working directly on untouched RAW sensor data preserves linear light relationships and predictable noise—huge advantages when blending exposures or picking sharp focus before color interpolation muddies the edges. Until now, however, no dataset or unified model existed to tackle all three fusion tasks together in the RAW domain.

Figure 1. RAWPrism’s three fusion settings. MEF pairs under/over exposures, MFF pairs near/far focus, and IVIF pairs reconstructed visible RAW with infrared. The examples illustrate complementary bright/dark detail, focus detail, and visible texture/thermal targets supplied to the shared model.

Methods

RAWPrism processes two RAW inputs into a single fused RAW output using one shared 3.58M-parameter checkpoint, without needing ground-truth fused images for training.

Overview of the RAWPrism architecture, showing the CFA-aware Prism decomposition, task-conditioned Reliability Field Gate, and shared U-Net.

Here is what makes the pipeline tick:

  • Prism (CFA-Aware Representation): Standard Bayer sensors capture a $2 \times 2$ grid of one Red, two Greens, and one Blue pixel. Instead of naive RGB conversion, RAWPrism packs these four sub-planes and uses a learned directional predictor to estimate green values at red/blue spots. Applying a fixed mathematical operation called a Hadamard transform cleanly separates spatial structure (four channels) from color differences (two residual channels). Because it stores exact residuals, this step is mathematically invertible—zero information is lost.
  • Reliability Field Gate (RFG): A lightweight convolutional module conditioned on a learned "task token" (telling the network whether it is doing MEF, MFF, or IVIF). Using Feature-wise Linear Modulation (FiLM) and a softmax layer, it predicts pixel-by-pixel weights ($w_1 + w_2 = 1$) deciding which input image to trust where.
  • Shared Backbone & Self-Supervised Losses: Weighted features pass through a standard Restormer-style three-level U-Net modulated by Adaptive LayerNorm, followed by tiny task-specific $1 \times 1$ convolutional heads and inverse CFA synthesis. During training, custom loss functions score the output directly against the input pairs (e.g., picking high-SNR pixels for exposure, local gradient energy for focus, and maximum gradients for thermal/visible), guided alongside a differentiable proxy ISP.

Datasets

To make this research possible, the authors built the RAWPrism Dataset, partitioned strictly at the scene level (train/val/test) to prevent data leakage:

  • MEF (422 pairs, $4032 \times 3024$): Newly captured native RAW under- and over-exposed scenes (338 / 42 / 42 split).
  • MFF (150 pairs, $3990 \times 2980$): Newly captured and spatially registered near- and far-focus native RAW pairs (120 / 15 / 15 split).
  • IVIF (1,500 scenes, $800 \times 600$): Derived from the existing FMB benchmark. Because paired native RAW + thermal cameras are rare, the authors used an inverse-ISP network (ReRAW) to reconstruct synthetic visible RAW from FMB's RGB images, and CycleISP to render matched RGB baselines for fair comparison (1,140 / 80 / 280 split).

Key Insights and Ideas

  • Coordinate choices matter: In inference-time ablations, swapping the fixed Hadamard transform out for an identity matrix caused steep drops across edge preservation ($Q_{AB/F}$ fell from 0.716 to 0.582) and information fidelity, proving the network genuinely relies on separating green structure from chroma.
  • Beware of Mutual Information (MI) traps: The authors include clever "source-copy controls"—testing what happens if you lazily output just one of the input images without fusing anything. Simply copying an input image yields wildly inflated MI scores (e.g., 8.204 vs. RAWPrism's 5.284 in IVIF), because an image shares maximum statistical information with itself! Pairing MI with difference-correlation metrics (SCD), where lazy copies flop, is essential for honest evaluation.
  • The ISP is part of the benchmark: Changing how RAW outputs and references are rendered to RGB for scoring (e.g., OpenCV display rendering vs. standard FMB references) noticeably shifts metric rankings—meaning RAW-vs-RGB comparisons must explicitly lock down rendering protocols.

Key Results

Using a single 3.58M-parameter model—nearly $8\times$ smaller than UniFusion (27.04M) and $95\times$ smaller than TC-MoA (340.89M)—RAWPrism delivers competitive multi-task performance:

  • MEF (42 test scenes): Ranks 1st in Mutual Information (7.248, beating SwinFusion by +1.788), SCD (0.380), and Correlation Coefficient (0.957), and 2nd in Visual Information Fidelity (VIF = 1.005).
  • MFF (15 test scenes): Achieves the highest mean MI (5.758) and ranks 3rd in edge preservation ($Q_{AB/F} = 0.581$).
  • IVIF (280 Protocol-C scenes): Leads 4 of 8 metrics against specialized and unified RGB baselines, including Entropy (7.392), Standard Deviation (0.222), MI (5.284), and VIF (0.495).

Limitations and Future Work

  • Reconstructed vs. Native IVIF: While MEF and MFF use real camera RAWs, the IVIF track relies on inverse-ISP reconstructions from RGB, which cannot recover true sensor noise or clipped highlights.
  • Small MFF test split & protocol sensitivity: The MFF test set has only 15 scenes, and rankings shift depending on whether a legacy R/B-swapped renderer or metadata-corrected renderer is used. Furthermore, MEF/MFF RGB baselines were evaluated zero-shot, whereas RAWPrism was trained on the target domain.
  • Capture series overlap: Quality audits flagged some near-duplicate scenes from the same photography bursts across train/test splits; grouping by capture session would test stricter generalization.
  • Next steps: Training matched single-task RAW models vs. RGB models on identical scenes will help cleanly isolate how much performance comes from the RAW representation itself versus multi-task parameter sharing.

Summary updated

Abstract

Research on multi-exposure fusion (MEF), multi-focus fusion (MFF), and infrared-visible image fusion (IVIF) has largely focused on rendered RGB images, while unified fusion across these tasks in the RAW domain before image signal processing (ISP) remains relatively underexplored. To support research in this setting, we introduce the RAWPrism dataset, covering all three tasks, and the RAWPrism model, a lightweight unified multi-task fusion network. The RAWPrism dataset comprises 422 usable MEF scenes and 150 registered MFF pairs from our RAW captures, together with 1,500 FMB-derived IVIF samples, in which the visible RAW inputs are reconstructed by ReRAW and their RGB counterparts rendered by CycleISP. Scene-level partitions and task-specific rendering and scoring protocols connect these resources to method development and evaluation. To our knowledge, the RAWPrism model is the first to unify MEF, MFF, and IVIF directly in the RAW domain. It combines a CFA-aware representation, task-conditioned source gating, and a shared backbone to support all three tasks with one 3.58M-parameter checkpoint. Together, the dataset and model support the study of shared fusion mechanisms across exposure, focus, and spectral complementarity.
BibTeX
@misc{hu2026rawprism,
  author = {Tianyi Hu and Yangdong Li and Shuyan Liu and Zihan Cao and Jingze Liang and Shaojie Wu and Chenyang Feng and Jincheng Di and Weijie Xiao and Liangjian Deng},
  title = {{RAWPrism: A Three-Task Dataset and a Unified Model for RAW-Domain Image Fusion}},
  year = {2026},
  eprint = {2611.34359},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.34359},
}
Figure