This project implements a ORB feature extractor accelerator on FPGA (on PYNQ-Z2 board). ORB ( Oriented FAST and Rotated BRIEF) feature is a kind of image feature based on oriented FAST feature and BRIEF descriptor. It's easy to calculate and robust to rotating so it's widely used in embedded computer vision application. For example, it's used in feature matching of some SLAM (Simultaneous Localization And Mapping) system, such as ORB-SLAM and ORB-SLAM2. SLAM system help robot or other platform to locate themselves and build a map of their surroudings. Here is a brief explanation of how ORB Features are extracted.
The extractor will take a gray image and applys a FAST extractor on it. After feature points being found, it will calculate m01 and m10 moment of the feature points and figure out the angles of them. Calculating BRIEF descriptors needs those angles and a gray image which is the original gray image applied a 7x7 gaussian filter.
Resource | Utilization | Available | Utilization |
---|---|---|---|
LUT | 35807 | 53200 | 67.31 |
LUTRAM | 1412 | 17400 | 8.11 |
FF | 54895 | 106400 | 51.59 |
BRAM18K | 50 | 140 | 35.71 |
DSP | 24 | 220 | 10.91 |
Platform | Average Delay | Throughoutput |
---|---|---|
PS 650mHz -O | 291.7 ms | 3.43 FPS |
PS 650mHz -O2 | 98.5 ms | 10.20 FPS |
PL 140mHz | 17.56 ms | 56.58 FPS |
Feature points are drawn on the picture.Descriptors can be read in the buffer filled by DMA.
Run these command lines on your Pynq-Z2 Board (tested on v2.4):
sudo pip3 install git+https://github.com/Siudya/ORB_FPGA.git
HLS sources files
Vivado project
Notebook run in Jupyter Notebook
A .cpp file that test the same process on CPU
Images for testing
.bit and .hwh files for PYNQ
vivado 2018.3 is required.
Open Vivado HLS command terminal and run these commands :
cd <path-to-proj>/ip
vivado_hls -f build_ip.tcl
This should take about half an hour.
Open Vivado command terminal and run these commands :
cd <path-to-proj>/pynq_arch
source pynq_arch.tcl