Recap of the Business Case

We develop High Speed Embedded Vision modules for use cases in the Textile Industries. These high-speed modules are built using our proprietary Image Signal Processors (ISP) that run on Zynq platform. One of the challenges that we face is to differentiate colour and texture of objects from the background. We use deep learning for such use cases and as they are hard real time requirements, we implement them on embedded FPGA processors. In this context we continuously explore methods (like DPU and Pynq – BNN) to implement deep learning on embedded FPGA. This blog post is about our experience in implementing such applications using Pynq – BNN.

Previous Blog: Why Binary Neural Networks?

Why PYNQ framework for implementing BNN?

For developers hoping to leverage FPGA performance, the conventional FGPA development process has remained a significant barrier to implementation. Xilinx effectively removed that barrier with its PYNQ environment.

In PYNQ, PL bitstreams are encapsulated in pre-built libraries called overlays, which serve a similar role as software libraries in the development process and execution environment. During the boot load process, bitstreams associated with the required overlays configure the PL fabric. However, this process remains transparent to developers who take advantage of the overlay’s functionality through the Python application programming interface (API) associated with each overlay. During development, engineers can combine software libraries and overlays as needed, working through their respective APIs to implement the application. During execution the processor system executes software library code as usual, while the PL fabric implements the functionality provided in the overlay. The result is the kind of accelerated performance that continues to drive interest in FPGA-based designs for increasingly demanding applications.

BNN Overlays are available for both Fully connect networks (LFC) and Convolution networks (CNV) on Pynq Z2, Z1 and Arty Z7. For this project we have implemented BNN using Pynq on Arty Z7.

Pynq BNN Overlays

The Pynq platform provides two overlays –

LFC

Fully Connected network designed for black and white operations on a 28 by 28 input

CNV

Convolution network designed for RGB operations 32 by 32 input

Next in this blog series will be –
Part 3: Implementing Pynq – BNN