Mondrian: On-Device High-Performance Video Analytics with Compressive Packed Inference

Changmin Jeon, Seonjun Kim, Juheon Yi, Youngki Lee · DOI

Introduction

Running sophisticated object detection models on high-resolution 1080p video is a massive challenge for edge devices. A high-end mobile GPU might take over a second to process a single 1080p frame, making real-time (30 FPS) analytics impossible. Mondrian is a novel edge system that enables real-time, high-accuracy object detection on 1080p video streams by dynamically shrinking Regions of Interest (ROIs) and packing them into large "canvases."

Mondrian packs ROIs from multiple FHD frames into a single high-resolution canvas to maximize hardware utilization.

Problem Statement

Current solutions usually fall into two camps, both with significant flaws:

  1. Input Resizing: Shrinking the whole frame to a lower resolution (e.g., 320x320) makes it fast but destroys accuracy for small or distant objects.
  2. ROI Extraction: Only processing "interesting" parts of the frame saves pixels, but mobile accelerators (GPUs/NPUs) are inefficient when processing many small, individual crops. They thrive on large, parallel workloads.

The authors identify a "safe area" for every object—the minimum resolution at which it can still be detected accurately. This safe area changes constantly based on the object's pose, lighting, and occlusions.

The Mondrian System

The core of Mondrian is Compressive Packed Inference (CPI), which optimizes the inference process through three main stages.

The Compressive Packed Inference (CPI) pipeline: extracting, rescaling, and packing ROIs for efficient inference.

1. Hybrid ROI Scale Estimator

Instead of using a fixed size for ROI crops, Mondrian dynamically rescales them to their "safe area." * Proactive Predictor: A lightweight Decision Tree model uses "zero-cost" features (like ROI area, motion vectors, and tracking error) to guess a coarse safe scale. * Reactive Tuner: To ensure the guess is optimal, the system periodically "probes" slightly smaller scales. If detection still works at a smaller size, it adopts that scale to save more pixels.

2. Packed Canvas Generator

Once the ROIs are shrunk, Mondrian doesn't process them one by one.

  • Canvas Planning: It uses a branch-and-bound algorithm to solve a "knapsack problem," determining how many large canvases (e.g., 1280x1280) it should create to stay within the application's latency limits.
  • ROI Packing: It uses a "Guillotine algorithm" (a 2D bin-packing approach) to tightly pack the variable-sized, rescaled ROIs into these canvases. This "collage" of objects is then sent to the GPU as a single high-resolution image, maximizing hardware utilization.

3. Packed Canvas-aware Fine-tuning

Standard models struggle when objects are packed into collages. The authors fine-tuned their detectors specifically on these packed canvases, adding borders around ROIs to prevent the model's receptive field from "bleeding" between unrelated objects.

Evaluation and Key Results

The system was evaluated using the MTA (Multi-Target multi-camera pedestrian tracking) dataset, consisting of 12 high-resolution (1080p) videos categorized into Easy, Normal, and Hard scenarios.

Evaluated on a Samsung Galaxy S22 (Adreno 730 GPU), Mondrian demonstrated significant improvements:

  • Throughput: Achieved 6.65x higher throughput than standard frame-wise inference, enabling ~30 FPS processing for 1080p streams.
  • Accuracy: Outperformed state-of-the-art baselines (like FlexPatch) by 15.0-19.7% mAP.
  • Packing Efficiency: The system consistently achieved an 80-90% fill-up ratio on its canvases, meaning very few pixels were wasted on empty background.
  • Overhead: The entire management pipeline (extraction, scaling, packing) adds minimal overhead, with the scale predictor taking less than 1ms.

Conclusion

Mondrian demonstrates that reducing pixel count is only half the battle for edge video analytics; hardware efficiency is equally critical. By combining dynamic "safe area" estimation with aggressive ROI packing, Mondrian achieves a breakthrough in real-time high-resolution object detection. Future work includes extending the system to support a wider variety of object classes and optimizing for heterogeneous processors like NPUs and TPUs.

Summary updated

BibTeX
@misc{jeon2024mondrian,
  author = {Changmin Jeon and Seonjun Kim and Juheon Yi and Youngki Lee},
  title = {{Mondrian: On-Device High-Performance Video Analytics with Compressive Packed Inference}},
  year = {2024},
  eprint = {2403.07598},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.07598},
}
Figure