Dem2TA: Beyond Pixels, Towards Perception

Ping Chen, Zhongwei Lin, Xiang He, Xiangming Wang, Kai Zhang, Jiezhang Cao, Yongyong Chen, Jingyong Su, Jie Liu, Haijin ZengarXiv 2026 · arXiv

TL;DR

Most computer vision models are fed images that were "developed" for human eyes, but what looks good to a person isn't always what's best for a machine. Dem2TA bridges this gap by teaching the very first step of image processing—demosaicing—to prioritize what a neural network needs to see, resulting in significant boosts to object detection and segmentation without sacrificing image quality.

What Problem Does This Paper Address?

When your phone takes a photo, it doesn't capture a full-color RGB image immediately. Instead, it captures a "Bayer RAW" image—a mosaic of red, green, and blue pixels. An Image Signal Processor (ISP) then performs demosaicing to interpolate the missing colors and create the pixels we see.

Traditionally, ISPs are tuned for "visual fidelity"—making things look sharp and pretty for humans. However, researchers have found that "pretty" doesn't always mean "useful" for downstream AI tasks like detecting a car or segmenting a medical scan. While recent work has tried to make ISPs "task-aware," they often treat the demosaicing stage as a fixed black box or simplify it too much.

The authors of Dem2TA argue that demosaicing is an underused goldmine for task adaptation. If we can guide how pixels are reconstructed from the very start, we can provide much richer information to the AI models that follow.

Methods

The authors propose a two-stage framework called Dem2TA (Demosaicing to Task Adaptation).

Stage 1: Demosaicing Adaptation

Instead of starting from scratch, they take a high-quality, pretrained demosaicing model (like Restormer) and "nudge" it. They jointly train this reconstruction frontend with a downstream task network (like a detector).

To keep the image from turning into unrecognizable "machine-noise," they use a Fidelity Anchor—a loss function that ensures the output still looks like a real image. Crucially, they introduce Complementary Representation Alignment. They use features from a "teacher" model (DINOv2) to provide semantic context and features from the task network itself to provide spatial cues. This forces the demosaicing decoder to organize its internal features around objects and structures that matter for the task.

Figure 1. Comparison of task-driven ISP paradigms. (a,b) Joint image-mapping optimization and task-adaptive modulation. (c) Our two-stage approach jointly adapts reconstruction and percep- tion through complementary supervision, then optimizes a local ISP with the reconstruction frontend frozen.

Stage 2: Task-Adaptive Local ISP

Once the demosaicing is adapted, they freeze it. Then, they add a lightweight, learnable "Local ISP" layer. This layer doesn't change the underlying pixels but applies spatially adaptive tweaks to Tone, Color, and Detail. Think of it as a smart, automated "Filter" that highlights the specific parts of an image that help the AI model make a better decision.

Figure 2. Overview of Dem2TA, which adapts fidelity features for perception before refining task rendering. Stage 1 jointly adapts the demosaicing frontend and downstream model with fidelity and complementary representation supervision. Stage 2 freezes the adapted frontend and jointly optimizes a local ISP with the downstream model. Flames and snowflakes indicate trainable and frozen modules.

Datasets

  • Synthetic COCO RAW: A dataset derived from the famous COCO benchmark, simulating RAW sensor data with both Single-Bayer and Quad-Bayer layouts.
  • Real-Capture Dataset: The authors introduced a manually verified dataset of 100 real RAW images (from Huawei Mate 70, iPhone 14, etc.) with over 1,100 annotated instances to prove their method works in the real world, not just in simulations.

Key Insights and Ideas

  • PSNR is a Liar: One of the most striking findings is that higher pixel-level accuracy (measured by PSNR) does not necessarily lead to better task performance. Sometimes, a slight drop in "visual" quality allows the model to capture features that are far more useful for perception.
  • Demosaicing is Semantic: By aligning demosaicing features with DINOv2, the model learns to "understand" the scene while it is still reconstructing it. It’s like a painter who knows they are painting a face, so they pay extra attention to the eyes and mouth.
  • Stability Matters: By freezing the reconstruction frontend in Stage 2, the authors ensure that the local ISP tweaks are built on a stable foundation, preventing the two stages from "fighting" each other during optimization.

Key Results

Dem2TA was tested against strong baselines like TA-ISP and RAW-Adapter:

  • On Synthetic Data: It improved detection Average Precision (AP) by 0.46 points and segmentation Intersection-over-Union (IoU) by 1.06 points compared to the previous state-of-the-art.
  • On Real Captures: The performance gains held up, with a 0.63 point improvement in segmentation IoU.
  • Efficiency: The "Small" version of the model (Dem2TA-S) achieved competitive results with significantly fewer parameters, making it more viable for edge devices.

Limitations and Future Work

  • The Fidelity Trade-off: In the smaller, more lightweight versions of the model, there is a more pronounced trade-off where task performance goes up but visual fidelity (PSNR) drops noticeably. Finding a "sweet spot" for tiny models remains a challenge.
  • Dataset Scale: While the real-capture dataset is a great start, 100 images is small for deep learning. Expanding this to thousands of diverse sensor types and lighting conditions is the next logical step.
  • Automatic Discovery: Currently, the model relies on prompts or existing detectors. Moving toward fully autonomous "instance discovery" directly from RAW data is a promising future direction.

Summary updated

Abstract

Task-oriented image signal processors (ISPs) adapt RAW-to-RGB processing for downstream perception. However, explicit demosaicing is often simplified, kept fixed, or optimized primarily for reconstruction quality, leaving this stage insufficiently integrated into task adaptation. We propose \textbf{Dem2TA}, a framework that incorporates fidelity-supervised demosaicing into the adaptation of the perception pipeline. Starting from a pretrained demosaicing model, we jointly adapt the reconstruction frontend and downstream network using reconstruction and task supervision, together with complementary semantic and task representation alignment. We then freeze the adapted frontend and jointly optimize a lightweight local ISP with the downstream model to refine task-specific rendering without changing the reconstructed linear RGB. Experiments on synthetic RAW detection and box-prompted segmentation demonstrate the effectiveness of representation-guided joint adaptation and subsequent local rendering. Evaluation on a manually verified real-capture dataset further supports transfer beyond synthetic inputs. Compared with TA-ISP on the same adapted foundation, Dem2TA improves detection AP by 0.46 points and segmentation IoU by 1.06 points on synthetic COCO RAW, and segmentation IoU by 0.63 points on real captures.
BibTeX
@misc{chen2026dem,
  author = {Ping Chen and Zhongwei Lin and Xiang He and Xiangming Wang and Kai Zhang and Jiezhang Cao and Yongyong Chen and Jingyong Su and Jie Liu and Haijin Zeng},
  title = {{Dem2TA: Beyond Pixels, Towards Perception}},
  year = {2026},
  eprint = {2611.27209},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.27209},
}
Figure