Table of Contents
Fetching ...

RAWIC: Bit-Depth Adaptive Lossless Raw Image Compression

Chunhang Zheng, Tongda Xu, Mingli Xie, Yan Wang, Dou Li

Abstract

Raw images preserve linear sensor measurements and high bit-depth information crucial for advanced vision tasks and photography applications, yet their storage remains challenging due to large file sizes, varying bit depths, and sensor-dependent characteristics. Existing learned lossless compression methods mainly target 8-bit sRGB images, while raw reconstruction approaches are inherently lossy and rely on camera-specific assumptions. To address these challenges, we introduce RAWIC, a bit-depth-adaptive learned lossless compression framework for Bayer-pattern raw images. We first convert single-channel Bayer data into a four-channel RGGB format and partition it into patches. For each patch, we compute its bit depth and use it as auxiliary input to guide compression. A bit-depth-adaptive entropy model is then designed to estimate patch distributions conditioned on their bit depths. This architecture enables a single model to handle raw images from diverse cameras and bit depths. Experiments show that RAWIC consistently surpasses traditional lossless codecs, achieving an average 7.7% bitrate reduction over JPEG-XL. Our code is available at https://github.com/chunbaobao/RAWIC.

RAWIC: Bit-Depth Adaptive Lossless Raw Image Compression

Abstract

Raw images preserve linear sensor measurements and high bit-depth information crucial for advanced vision tasks and photography applications, yet their storage remains challenging due to large file sizes, varying bit depths, and sensor-dependent characteristics. Existing learned lossless compression methods mainly target 8-bit sRGB images, while raw reconstruction approaches are inherently lossy and rely on camera-specific assumptions. To address these challenges, we introduce RAWIC, a bit-depth-adaptive learned lossless compression framework for Bayer-pattern raw images. We first convert single-channel Bayer data into a four-channel RGGB format and partition it into patches. For each patch, we compute its bit depth and use it as auxiliary input to guide compression. A bit-depth-adaptive entropy model is then designed to estimate patch distributions conditioned on their bit depths. This architecture enables a single model to handle raw images from diverse cameras and bit depths. Experiments show that RAWIC consistently surpasses traditional lossless codecs, achieving an average 7.7% bitrate reduction over JPEG-XL. Our code is available at https://github.com/chunbaobao/RAWIC.

Paper Structure

This paper contains 17 sections, 7 equations, 3 figures, 6 tables.

Figures (3)

  • Figure 1: The comparison between previous bit-depth-specific lossless image compression methods and our proposed bit-depth adaptive lossless raw image compression method. (a) Exiting methods train the model a specific bit depth and can only compress raw images with the same bit depth. (b) Our proposed method uses a single model to compress raw images across different bit depths.
  • Figure 2: Visualization of raw image and corresponding pixel-wise bit depth map. The pixel-wise bit depth is computed as $\lceil \log_2(\text{value}+1) \rceil$. It can be observed that different regions in the raw image exhibit varying bit depths.
  • Figure 3: The overall architecture of RAWIC. The input raw image is first converted to an RGGB four-channel format and split into patches. Each patch is then processed by a bit-depth adaptive entropy model that estimates the pixel distribution conditioned on the bit depth of the patch. Q denotes the quantization operation. AE and AD represent arithmetic encoder and arithmetic decoder, respectively.