FP-Stereo: Hardware-Efficient Stereo Vision for Embedded Applications

Jieru Zhao, Tingyuan Liang, Liang Feng, Wenchao Ding, Sharad Sinha, Wei Zhang, Shaojie Shen · DOI

TL;DR

This paper introduces FP-Stereo, an open-source, hardware-efficient library for building high-performance stereo matching pipelines on FPGAs. It automates the design process, offering a balance of accuracy, speed, and resource usage for embedded applications, outperforming existing state-of-the-art FPGA solutions.

What Problem Does This Paper Address?

Real-time depth estimation using stereo vision is crucial for many embedded applications like autonomous vehicles and robotics. However, achieving the right balance between accuracy, speed, and hardware cost for stereo matching algorithms on resource-constrained FPGAs is a significant design challenge. Existing solutions often require substantial manual effort, compromise accuracy for speed, or lack flexibility to adapt to diverse application requirements. This paper aims to address this by providing an automated, flexible, and efficient stereo matching pipeline for FPGAs.

Methods

FP-Stereo is built around the Semi-Global Matching (SGM) algorithm, a popular choice for its accuracy-speed trade-off. The library offers a modular approach, supporting various methods for each stage of the SGM pipeline:

  • Matching Cost Computation: Supports multiple cost functions like Sum of Absolute Differences (SAD), Zero-Mean SAD (ZSAD), Census Transform, and Rank Transform.
  • Cost Aggregation: Implements an optimized pathwise accumulation strategy, including an interleaving and reordering technique to improve parallelism and reduce hardware resource overhead.
  • Disparity Computation and Refinement: Includes a winner-takes-all strategy for disparity computation and optional refinement steps like Left-Right consistency checks and median filtering.

Key to FP-Stereo's efficiency are several optimization and automation techniques:

  • High-Level Synthesis (HLS) Pragmas: Extensive use of dataflow, pipeline, and unroll pragmas to exploit parallelism and optimize execution.
  • Memory Optimization: Techniques like array partitioning and data packing are employed to efficiently utilize on-chip BRAMs and reduce memory usage.
  • Auto-computed Data Widths: Automatically determines optimal data widths for variables, reducing resource usage without sacrificing accuracy.
  • Automatic Code Generation: Generates synthesizable C code for the FPGA accelerator and host code, significantly shortening the development cycle.

Datasets

The primary dataset used for evaluation is the KITTI 2015 dataset. This dataset is a standard benchmark for stereo vision tasks, providing image pairs with ground truth disparity information. The paper evaluates configurations on both full KITTI resolution (1242x374) and a reduced resolution (900x260).

Key Insights and Ideas

  • Automated Design is Key: The paper strongly advocates for HLS-driven automation to democratize FPGA-based stereo vision, significantly reducing design effort and time.
  • Flexibility is Paramount: FP-Stereo's strength lies in its modularity, allowing users to select different cost functions, window sizes, and refinement strategies to tailor performance to specific accuracy, speed, and resource constraints.
  • Interleaving and Reordering for Aggregation: The novel strategy to interleave and reorder matching costs during aggregation is crucial for maximizing parallelism in the cost aggregation stage, a bottleneck in many SGM implementations.
  • Data Packing for Memory Efficiency: Packing data into single memory instances, rather than relying solely on array partitioning, offers a significant reduction in memory usage (up to 50%) while maintaining fast access.
  • Guidance for Design Choices: The paper provides valuable experimental analysis, offering users clear guidance on how algorithmic choices (cost function, window size, etc.) impact accuracy, speed, and resource utilization, enabling informed design decisions.

Key Results

FP-Stereo demonstrates superior performance compared to state-of-the-art FPGA solutions:

  • Accuracy: Achieves 6.08% lower D1-all error compared to xfOpenCV.
  • Speed: Offers a 2x speedup (161 FPS) over xfOpenCV at full KITTI resolution.
  • Resource Usage: Consumes 30% fewer resources (BRAMs, LUTs, FFs).
  • Energy Efficiency: Uses 40% less energy.
  • Speed/Power Ratio: Achieves an impressive 145x FPS/Watt.

Compared to GPU designs, FP-Stereo achieves comparable accuracy at a competitive speed while consuming significantly less power.

Limitations and Future Work

  • Limited Path Aggregation: Currently, FP-Stereo supports four-path aggregation. The authors mention plans to support more directions in the future to potentially improve accuracy further.
  • Hardware Budgets: While the paper provides guidance, the optimal choice of design parameters is still constrained by the specific hardware budget of the target embedded system.
  • Future Work: The authors suggest exploring more directions for cost aggregation. The open-source nature of FP-Stereo also invites community contributions and extensions.

Summary updated

BibTeX
@inproceedings{zhao2020fp,
  author = {Jieru Zhao and Tingyuan Liang and Liang Feng and Wenchao Ding and Sharad Sinha and Wei Zhang and Shaojie Shen},
  title = {{FP-Stereo: Hardware-Efficient Stereo Vision for Embedded Applications}},
  booktitle = {FPL},
  year = {2020},
  doi = {10.1109/fpl50879.2020.00052},
}
Figure