TL;DR
Hybrid Event-based Vision Sensors (HybridEVS) blend high-speed event tracking with Quad Bayer color filters, but missing color at event pixels causes severe artifacts during demosaicing. This paper introduces TSANet, a lightweight two-stage network that separates event pixel inpainting/denoising from RGB demosaicing while using State Space Models (Mamba) and cross-attention with positional priors. It achieves state-of-the-art reconstruction quality while cutting parameters by $1.86\times$ and computational complexity (FLOPs) by $3.29\times$ compared to DemosaicFormer.
What Problem Does This Paper Address?
Traditional cameras suffer from motion blur and poor dynamic range, whereas neuromorphic event cameras record per-pixel asynchronous brightness changes at high speeds. Recently proposed HybridEVS sensors combine both worlds by laying out a Quad Bayer Color Filter Array (CFA) and assigning specific pixels exclusively to record event motion rather than RGB intensity.
However, reconstructing a full-color RGB image from this sensor is challenging:
- Missing color data: Event pixels contain zero RGB data, causing severe hole-like artifacts and aliasing.
- Quad Bayer complexity: Quad Bayer patterns already have large spatial gaps between same-colored pixel bins, making joint demosaicing and denoising difficult.
- Edge compute constraints: Existing all-in-one transformer networks are computationally heavy and memory-hungry, preventing real-time deployment on mobile or edge devices.
Methods
The authors propose TSANet (Two-stage network via State space augmented cross-Attention), breaking the recovery pipeline into two dedicated, progressive sub-networks:
- Two-Stage Architecture:
- Quad-to-Quad (Q2Q): A compact U-Net that inpaints missing event pixels (preceded by a coarse neighborhood average) and removes capture noise to output a clean Quad Bayer image.
- Quad-to-RGB (Q2R): A larger U-Net dedicated solely to Quad Bayer demosaicing into standard 3-channel RGB.
- Two-Step Training Strategy: Sub-networks are pretrained separately on synthetic intermediate clean targets before end-to-end joint fine-tuning.
- Explicit Positional Encoding via Fourier Feature Module (FFM):
- Both stages use dual-branch encoders (one for image features, one for position priors).
- Sensor layout priors (the Quad Bayer pattern and the binary event pixel map) pass through sinusoidal Fourier embeddings to help restore fine, high-frequency textures.
- State Space Augmented Hybrid Blocks:
- Cross-Swin State Block (CSSB): Used in the Q2R encoder. It splits channels into two parallel branches: a Quad Bayer Cross Swin Attention (QCSA) branch that computes local window cross-attention between position priors and image features, and a Residual Vision State Space (RVSS) module (derived from Mamba) that models global spatial dependencies with linear $O(N)$ complexity.
- Conv State Block (CSB): Used in the Q2R decoder. It pairs residual convolutions for local feature refinement with RVSS for global context.
- Spatial Position Attention (SPA): A lightweight gated element-wise dot-product mechanism used in the Q2Q stage to condition image features on position maps at minimal compute cost.
Datasets
- MIPI 2024 Challenge Dataset (Demosaic for HybridEVS): 800 training pairs (Quad Bayer + RGB at 2K resolution with real-world noise) and 26 test pairs.
- Simulated HybridEVS Benchmarks: Evaluated by sub-sampling and masking RGB images from five standard image datasets (Kodak, BSD100, Urban100, and Wed [first 100 images]) and two dynamic video datasets (REDS and Vid4).
Key Insights and Ideas
- Decoupling inpainting from demosaicing works better than "all-in-one": Concurrently solving missing-pixel inpainting, denoising, and non-Bayer demosaicing causes models to hallucinate color errors. Solving pixel completion first allows the demosaicing stage to focus purely on color spectrum interpolation.
- Explicit position priors outperform implicit feature learning: Because CFA patterns and event pixel layouts are static and periodic, feeding them into a dedicated position encoder (strengthened with Fourier features) drastically sharpens reconstructed edges.
- Hybrid Mamba + Window Attention gives the best efficiency tradeoff: Pure vision transformers are too heavy; pure CNNs miss global context. Pairing local cross-attention (which aligns the color layout locally) with 2D State Space Models (which capture global dependencies linearly) reduced parameters by 38% with merely a 0.02 dB drop in PSNR.
Key Results
- Performance vs. Efficiency:
- Compared to the previous leading method, DemosaicFormer (30.28M parameters, 491.1G FLOPs), TSANet-l achieves a higher average SSIM (0.984 vs. 0.980) and matching/better PSNR (38.18 dB) across seven datasets with only 16.26M parameters ($1.86\times$ reduction) and 149.4G FLOPs ($3.29\times$ reduction).
- Across the seven benchmark datasets, TSANet-l ranks first in PSNR/SSIM on three and second-best on the other four.
- Scalability across model tiers:
- The authors present three variants—TSANet-s (4.00M / 37.4G), TSANet-m (8.74M / 81.9G), and TSANet-l (16.26M / 149.4G)—which outperform competing CNN and Transformer baselines (like Restormer, NAFNet, and PIPNet) within their respective compute budgets.
- Ablations on TSANet-s (MIPI dataset):
- Incorporating the position prior branch added +0.06 dB PSNR with only an 8% parameter overhead.
- Pretraining the sub-stages provided a +0.13 dB PSNR boost over training purely end-to-end from scratch.
Limitations and Future Work
- Reliance on Fixed Sensor Masks: The approach assumes a known, static distribution of event pixels and CFA masks. Dynamic adjustments to event sensor layout were not explored.
- Synthetic Evaluation Gaps: While evaluated on real 2K MIPI data, temporal video evaluations relied on simulated event masks overlaid onto standard benchmark datasets (REDS and Vid4) rather than real raw event video hardware captures.
- Future Directions: Deploying and benchmarking optimized inference kernels directly on target mobile hardware/edge NPUs, and leveraging temporal event streams across frames rather than single-frame static event masks.
Summary updated