ROI-Packing: Efficient Region-Based Compression for Machine Vision

Md Eimran Hossain Eimon, Andreas Krause, A. G. Amitha Perera, Juan Merlos, Hari Kalva, Velibor Adzic, Borko Furht · DOI

Abstract

This paper introduces ROI-Packing, an efficient image compression method tailored specifically for machine vision. By prioritizing regions of interest (ROI) critical to end-task accuracy and packing them efficiently while discarding less relevant data, ROI-Packing achieves significant compression efficiency without requiring retraining or fine-tuning of end-task models. Comprehensive evaluations across five datasets and two popular end-tasks—object detection and instance segmentation—demonstrate up to a 44.10% reduction in bitrate without compromising end-task accuracy, along with an 8.88% improvement in accuracy at the same bitrate compared to the state-of-the-art Versatile Video Coding (VVC) codec standardized by the Moving Picture Experts Group (MPEG).

Introduction

Traditional image compression standards, such as JPEG or H.264, are optimized for the Human Visual System (HVS). These codecs prioritize visual fidelity by discarding high-frequency details that are less perceptible to humans while maintaining background aesthetics. However, the rise of edge computing and remote AI inference has shifted the paradigm. In scenarios like smart city traffic monitoring, edge devices transmit images to powerful servers for machine vision tasks like object detection. For these "machine observers," background details are often irrelevant noise. Transmitting full-resolution images optimized for humans wastes significant bandwidth. ROI-Packing addresses this by focusing compression resources solely on Regions of Interest (ROI) required for downstream AI tasks.

Methodology

The ROI-Packing framework operates as a pre- and post-processing layer for standard video codecs like Versatile Video Coding (VVC). The pipeline consists of five primary stages:

  1. Region Detection & Padding: A lightweight detector (e.g., YOLOv7) identifies objects on the edge device. Bounding boxes are padded by 15 pixels to preserve the local context necessary for accurate feature extraction by the server-side model.
  2. Extraction & Scaling: Overlapping regions are merged using a Convex Hull algorithm. Regions are then aligned to a 16x16 grid and adaptively scaled based on object type to optimize bit allocation.
  3. Region Packing: This is the core innovation. Extracted rectangular slices are arranged into a single, smaller composite frame using a greedy bin-packing algorithm. This minimizes empty space and reduces the total pixel count to be encoded.
  4. Encoding: The packed frame is compressed using VVC. Metadata containing the original coordinates and scaling factors is embedded in the bitstream.
  5. Decoding & Unpacking: On the server, the frame is decoded, and regions are restored to their original spatial positions. The remaining background is filled with black pixels, creating a reconstructed image ready for inference.
The comprehensive ROI-Packing architecture, showing the transition from input image to bitstream and final reconstruction.
An example of the packed regions collage generated by the ROI-Packing algorithm to minimize transmitted data.

Experimental Results

The method was rigorously tested using the MPEG Common Test Conditions (CTC) for Video Coding for Machines. Evaluations spanned five datasets (OpenImages, TVD, and FLIR) and two tasks: object detection and instance segmentation.

Key findings include:

  • Efficiency: ROI-Packing achieved a 44.10% reduction in bitrate (BD-Rate) compared to standard VVC compression at equivalent accuracy levels.
  • Accuracy: At fixed bitrates, the method improved mean Average Precision (mAP) by up to 8.88%.
  • Compatibility: Because the spatial geometry is restored during unpacking, the system requires zero retraining of downstream models.

Discussion and Limitations

A key insight of this work is that Convolutional Neural Networks (CNNs) are robust to "blacked-out" backgrounds as long as the spatial relationships within and between ROIs are preserved. This allows for aggressive data reduction by simply not transmitting non-ROI pixels. However, the method faces challenges with low-fidelity data; performance on the FLIR infrared dataset was less pronounced at very low bitrates, where aggressive compression can destroy critical thermal features.

Conclusion and Future Work

ROI-Packing demonstrates that machine-centric compression can yield massive bandwidth savings without sacrificing performance. Future research will focus on extending this technique to temporal video coding, exploiting redundancies across frames to further optimize transmission for real-time machine vision applications.

Summary updated

BibTeX
@misc{eimon2025roi,
  author = {Md Eimran Hossain Eimon and Andreas Krause and A. G. Amitha Perera and Juan Merlos and Hari Kalva and Velibor Adzic and Borko Furht},
  title = {{ROI-Packing: Efficient Region-Based Compression for Machine Vision}},
  year = {2025},
  eprint = {2512.09258},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.09258},
}
Figure