Access Official Technical PDF

Share Summary:LinkedInEmail

Real-time computer vision can place demanding performance requirements on embedded systems, where power, cost, and physical size matter alongside throughput. Implementing an entire vision algorithm in dedicated hardware may meet those requirements, but it can also require substantial RTL development and create a design that is difficult to debug or adapt. FPGA computer vision acceleration offers another path: keep most of the application programmable, then add hardware only where profiling shows it will make a meaningful difference.

A thesis examining this approach applied it to face detection, convolutional neural networks (CNNs), and binary neural networks. Across the case studies, the central idea was consistent: begin with software, exploit vector processing, and customize the hardware around the most time-consuming inner loops.

A software-first model for FPGA computer vision acceleration

The approach uses a host processor alongside a soft vector processor implemented in FPGA fabric. The host manages control flow and input/output, while the vector engine executes data-parallel operations. Software moves data into a scratchpad memory, issues vector instructions, and transfers results back as needed.

Development proceeds in stages. First, the application runs on the host processor to establish a baseline. Next, the code is adapted to use the existing vector overlay. Finally, profiling identifies critical sections that could benefit from custom vector instructions: hardware operations integrated into the vector processor and called from software.

This sequence matters because it avoids committing prematurely to a large, fixed-function design. Engineers can measure where time is being spent, accelerate a specific bottleneck, and then profile again. If the workload shifts or another section becomes limiting, the design can be refined iteratively.

Why vector processing alone may not be enough

Vector processing applies one instruction across multiple data elements, making it well suited to repetitive calculations such as image operations. But algorithms do not all map neatly to this model. Face detection with a classifier cascade, for example, can reject an image location early when a stage fails. Different locations may therefore require different amounts of work. In a conventional SIMD approach, inactive elements can still consume processing capacity.

The examined vector overlay addressed this challenge with masking and wavefront skipping. Masking lets instructions operate only on active elements. Wavefront skipping can avoid executing groups of elements when all are masked off. These mechanisms help manage the variable work in cascaded detection, while vectorization handles calculations shared across many image locations.

Vector processors also rely on careful data movement. Operands are placed in scratchpad memory, and a DMA engine transfers data between the scratchpad and main memory. Software must coordinate these operations with computation. Long vectors and overlapping transfers with processing can help keep the execution units occupied.

Three vision workloads, one development strategy

Face detection with LBP features

The face-detection case study used Multi-Block Local Binary Pattern (MB-LBP) features. Each feature compares a center image region with its neighbors to create a bit pattern, then uses that pattern to look up a pass-or-fail result. The classifier groups features into stages, allowing a candidate location to be rejected before every feature is evaluated.

To make the computation more suitable for vector hardware, the implementation restricted feature block sizes and used precomputation to reuse calculations. It also formulated feature-value quantization as an integer linear programming problem, allowing the inner loop to use values of eight bits or fewer. Custom instructions then targeted LBP pattern generation and lookup operations.

The resulting system achieved a reported 248.4-times speedup over its ARM Cortex-A9 baseline, including a 25-times improvement from vectorization before custom instructions were added. The custom RTL for the face-detection overlay required fewer than 800 lines. The thesis also reported that the approach was 2.4 to 3.5 times faster than the compared dedicated-hardware systems.

CNN inference and binary networks

CNN inference presents a different workload: convolution layers perform large numbers of multiply-accumulate operations, while pooling and fully connected layers add further computation and data movement. In the CNN case study, the overlay used reduced-width, eight-bit data and a custom instruction for 3-by-3 convolution. The reported system reached 12.4 frames per second in a single-core configuration and 24.4 frames per second in a dual-core configuration for the evaluated setup. These are case-study results, not a general performance guarantee for other networks or FPGA platforms.

A separate case study examined binary neural networks, which use weights of plus or minus one. This limits the need for general multiplication and reduces the weight representation to one bit. A lightweight overlay for these networks used about 5,000 four-input lookup tables. For a person-classification network, the reported runtime improved 71 times over the RISC-V host processor, with approximately 200 lines of custom RTL.

Practical considerations for engineering teams

The method is most useful when teams can preserve software flexibility while identifying a small amount of computation that dominates runtime. It does not remove the need for hardware design: custom instructions still require RTL, and the application must be adapted to the vector processor’s programming and data-movement model. Instead, it narrows the hardware effort to targeted operations rather than implementing the complete algorithm as a fixed pipeline.

  • Establish a baseline: Measure the application on the available host processor before selecting an accelerator.
  • Profile after vectorization: The bottleneck may change once the general-purpose computation is parallelized.
  • Account for data movement: Scratchpad capacity, DMA transfers, and vector length affect how effectively the processing units are used.
  • Evaluate workload fit: Regular operations such as convolution and repeated feature calculations may suit vectorization, while variable execution requires attention to masking and divergence.
  • Track design complexity: Performance should be considered alongside the RTL required and the effort to maintain or modify the implementation.

Conclusion

Hybrid FPGA acceleration provides a practical design pattern for embedded vision workloads: preserve the adaptability of software, use vector processing for broad parallelism, and reserve custom hardware for measured hotspots. The reported face-detection and neural-network results demonstrate how that strategy can address distinct algorithms without requiring a complete dedicated-hardware implementation. For engineering teams, the key is an iterative process of profiling, vectorizing, measuring, and adding hardware selectively—balancing throughput against development complexity and the constraints of the target system.

Access Official Technical PDF

About The Author