Efficient Semantic Segmentation by Altering Resolutions for Compressed Videos

Yubin Hu, Yuze He, Yanghao Li, Jisheng Li, Yuxing Han, Jiangtao Wen, Yong-Jin Liu

Abstract

Semantic segmentation in video is a computationally demanding task, often exceeding the real-time processing capabilities of edge devices. This paper introduces AR-Seg, a novel framework that optimizes efficiency by processing non-keyframes at lower resolutions. By leveraging motion vectors inherent in compressed video streams and a specialized Cross Resolution Feature Fusion (CReFF) module, AR-Seg bridges the gap between low-resolution speed and high-resolution accuracy. Experimental results on standard benchmarks like CamVid and Cityscapes demonstrate that AR-Seg can reduce computational costs by up to 70% while maintaining or even improving segmentation performance compared to high-resolution baselines.

Introduction

Semantic segmentation—the process of assigning a category label to every pixel—is a cornerstone of computer vision for autonomous driving and robotics. However, its high computational complexity makes real-time execution on high-resolution video streams challenging. While previous research has focused on designing lightweight network architectures, the impact of input resolution has been largely overlooked.

Reducing input resolution offers a quadratic reduction in computational cost; for instance, halving the resolution reduces the pixel count by 75%. Unfortunately, standard low-resolution (LR) processing typically results in significant accuracy degradation due to the loss of fine spatial details. AR-Seg addresses this by selectively processing keyframes (I-frames) at high resolution (HR) and intermediate frames (P-frames) at low resolution, using temporal information to recover lost details.

The AR-Seg Framework

The AR-Seg framework consists of two main branches tailored for different frame types in a compressed video stream. It utilizes the existing structure of video codecs to minimize overhead.

Cross Resolution Feature Fusion (CReFF)

To compensate for the information loss in LR P-frames, AR-Seg introduces the CReFF module. This module performs two primary functions:

  1. Motion Vector Warping: Instead of computing expensive optical flow, AR-Seg extracts Motion Vectors (MVs) directly from the compressed video (e.g., H.265). These MVs are used to warp high-quality features from the preceding HR I-frame to align with the current LR P-frame.
  2. Local Attention: Since MVs can be coarse or noisy, a local attention mechanism is employed. It selectively aggregates the warped HR features with the current LR features, effectively "refining" the low-resolution representation with high-resolution details.
The AR-Seg architecture featuring CReFF and Feature Similarity Training (FST).

Feature Similarity Training (FST)

To ensure the LR branch produces features compatible with the HR branch, the authors propose Feature Similarity Training. This involves a dual-supervision strategy:

  • Explicit Supervision: A similarity loss (MSE) encourages the fused LR features to match the ground-truth HR features.
  • Implicit Supervision: The final decoding layer (the classifier) is shared between both branches and frozen during LR training. This forces the LR branch to generate features that the HR-trained classifier can accurately interpret.

Experimental Evaluation

The researchers evaluated AR-Seg on the CamVid and Cityscapes datasets, simulating real-world conditions by compressing the video using the HEVC/H.265 standard.

Performance and Efficiency

AR-Seg demonstrates a superior trade-off between accuracy (mIoU) and computational cost (GFLOPs). On the CamVid dataset with a PSPNet18 backbone, AR-Seg achieved a 67% reduction in GFLOPs compared to the full HR baseline. Remarkably, the mIoU actually improved from 69.43% to 70.82%, suggesting that the temporal fusion provides a beneficial regularizing effect.

Comparison of mIoU vs. GFLOPs for AR-Seg and standard baselines.

Real-world Speedup

Inference tests on an NVIDIA RTX 3090 GPU showed significant throughput increases. For CamVid, the frame rate increased from 32 fps to 68 fps (a 2.1x speedup). For Cityscapes, the speed increased from 10 fps to 33 fps (a 3.3x speedup), making real-time high-resolution segmentation feasible on modern hardware.

Conclusion

AR-Seg provides a versatile, backbone-agnostic solution for efficient video semantic segmentation. By intelligently altering resolutions and mining "free" motion data from video codecs, it achieves significant speedups without sacrificing accuracy. Future work includes exploring adaptive scheduling for HR/LR frame selection and extending the framework to support bidirectional B-frames for enhanced temporal consistency.

Summary updated

BibTeX
@inproceedings{hu2023efficient,
  author = {Yubin Hu and Yuze He and Yanghao Li and Jisheng Li and Yuxing Han and Jiangtao Wen and Yong-Jin Liu},
  title = {{Efficient Semantic Segmentation by Altering Resolutions for Compressed Videos}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure