Abstract
Traditional mobile Image Signal Processors (ISPs) rely on hand-crafted algorithms that often introduce visual artifacts and limit the potential of smartphone camera sensors. While deep learning models offer a promising alternative, their computational demands typically exceed the capabilities of mobile hardware. This paper presents PyNet-V2 Mobile, a novel convolutional neural network (CNN) architecture designed to convert RAW sensor data into high-quality RGB images directly on-device. By utilizing an inverted pyramidal structure and efficient attention mechanisms, PyNet-V2 Mobile achieves professional-grade results with a model size of only 3.6 MB, enabling real-time processing on modern mobile NPUs.
1. Introduction
Smartphone photography is fundamentally constrained by the physical dimensions of mobile sensors and lenses. To mitigate these limitations, manufacturers employ an Image Signal Processor (ISP)—a complex pipeline of algorithms responsible for demosaicing, denoising, white balance, and color correction. However, traditional ISPs often produce a "watercolor" effect, characterized by aggressive sharpening and the loss of fine textures.
While deep learning models like the original PyNet have demonstrated the ability to produce DSLR-like quality from mobile RAW data, they are often too heavy for practical use, frequently causing out-of-memory (OOM) errors when processing full-resolution 12MP images. PyNet-V2 Mobile addresses this by prioritizing architectural efficiency and NPU compatibility without sacrificing visual fidelity.
2. Methodology
2.1 Architecture Design
PyNet-V2 Mobile utilizes an inverted pyramidal CNN architecture that processes images across three distinct scales. This multi-scale approach allows the model to handle global features (like illumination) at lower resolutions while refining local textures at higher resolutions.
To maximize efficiency, the authors implemented several key innovations:
- Space-to-Depth Input: Instead of standard downsampling, which can discard critical sensor data, the model reshapes the raw RGBG Bayer pattern into four feature maps. This preserves all original information for the initial processing layers.
- Grouped Residual Blocks: To reduce the computational footprint, feature maps are split into parallel channels (2 to 4 parts) before undergoing convolution. These channels are then concatenated, significantly lowering the number of parameters compared to standard convolutions.
- NPU Optimization: The model is designed to be fully compatible with the Android Neural Networks API (NNAPI), ensuring it can leverage dedicated AI hardware (NPUs/APUs) for maximum speed and power efficiency.
2.2 Attention Mechanisms
The model incorporates two specific attention modules to enhance image quality:
- Channel Attention Block (CAM): This module learns global, content-dependent features, allowing the network to make sophisticated adjustments to brightness and color balance based on the overall scene.
- Spatial Attention Block (SAM): Utilizing $5 \times 5$ depthwise convolutions, the SAM focuses on boosting local texture and edge reconstruction, ensuring that fine details are preserved.
2.3 Training Strategy
The network is trained sequentially across its scales. Lower scales are trained first to establish global color and luminance mapping. Higher scales are then fine-tuned to reconstruct high-frequency details. The loss function is a composite of VGG-perceptual loss, Structural Similarity Index (SSIM), and Mean Squared Error (MSE), balancing pixel-perfect accuracy with human-perceived sharpness.
3. Experimental Setup and Dataset
The model was trained and evaluated using the Fujifilm UltraISP dataset. This dataset provides a rigorous benchmark by pairing RAW images from a Sony IMX586 mobile sensor with ground-truth targets captured by a professional 102MP Fujifilm GFX100 medium-format camera. The training set consisted of 99,000 aligned $256 \times 256$ patches derived from over 6,000 daytime image pairs.
4. Results
4.1 Performance and Efficiency
PyNet-V2 Mobile demonstrates significant improvements in processing speed and memory management over its predecessors. On a MediaTek Dimensity 9000 chipset, the model processes a 12MP photo in:
- 1246ms on the mobile GPU.
- 413ms on the NPU (using INT8 quantization).
At just 3.6 MB, the model is small enough to reside in mobile cache and avoids the OOM issues that plague larger ISP-replacement models.
4.2 Image Quality
In terms of quantitative metrics, PyNet-V2 Mobile achieved a PSNR of 24.72 and an SSIM of 0.8783. While the original, much larger PyNet scored slightly higher (25.01 PSNR), it was 50 times slower and incapable of processing full-resolution images on standard mobile hardware. Qualitative analysis confirms that PyNet-V2 Mobile successfully eliminates the "watercolor" artifacts of traditional ISPs, producing natural textures and color rendition that closely mimics the professional Fujifilm reference.
5. Limitations and Future Work
Despite its success in daytime conditions, the model faces challenges in low-light environments where RAW noise levels are significantly higher. Additionally, the current architecture does not account for lens-specific optical distortions such as vignetting. Future iterations may explore the integration of a dedicated super-resolution module or specialized training on low-light datasets to further expand the model's versatility.
6. Conclusion
PyNet-V2 Mobile represents a significant step toward bringing professional-grade image processing to mobile devices. By combining an efficient multi-scale architecture with NPU-optimized operations, it proves that deep learning can replace traditional ISP pipelines, offering superior visual quality within the strict power and thermal constraints of a smartphone.
Summary updated