Hardware Acceleration of Feature Detection and Description - - PowerPoint PPT Presentation

hardware acceleration of feature detection and
SMART_READER_LITE
LIVE PREVIEW

Hardware Acceleration of Feature Detection and Description - - PowerPoint PPT Presentation

Hardware Acceleration of Feature Detection and Description Algorithms on LowPower Embedded Platforms Onur Ulusel, Christopher Picardo, Christopher Harris, Sherief Reda, R. Iris Bahar, School of Engineering, Brown University Image Processing


slide-1
SLIDE 1

Hardware Acceleration of Feature Detection and Description Algorithms on Low‐Power Embedded Platforms

Onur Ulusel, Christopher Picardo, Christopher Harris, Sherief Reda, R. Iris Bahar, School of Engineering, Brown University

slide-2
SLIDE 2

Image Processing in Mobile Systems

2

  • Image processing is everywhere!

– Input data has changed from words/numbers to images – Sensors have improved dramatically

  • Image processing is a major driving factor in

technological advancement

– Autonomization relies on image processing

  • Mobile/Embedded platforms??

– Real‐time computing + limited data bandwidth  prefer local computing to offloading to cloud – BUT image processing can be very computationally intensive and power hungry

www.google.com www.guardiantv.com

slide-3
SLIDE 3

Accelerating Image Processing on Low Power Embedded Platforms

  • Meeting real time image processing requirements for many of these

applications requires HW assisted acceleration

  • Which algorithms do we accelerate?

– Feature detection and feature description are key building blocks for image retrieval, biometric identification, visual odometry, etc. – Computational efficient detection and analysis of image features is critical for performance and energy‐efficiency

3

http://www.sybernautix.com/ https://blog.pivotal.io https://vision.in.tum.de

slide-4
SLIDE 4

Hardware Acceleration for Energy Constrained Image Processing

  • Low power embedded platforms

– Field Programmable Gate Arrays (FPGAs) – Graphical Processing Units (GPUs) – Low power general processors (CPUs)

4

FPGAs GPUs Xilinx Virtex 6 Xilinx Zynq 7020 1532 core NVIDIA GeForce GTX 680 192 core NVIDIA Jetson TK1 Power 15 W <5W 195 W <12W

slide-5
SLIDE 5

Our Contributions

  • Comparative study of feature detection and description

algorithms

– What are their computation kernel characteristics?

  • Comparative study of platforms for embedded applications

– Advantages/disadvantages of each platform?

  • Accelerating algorithms on different platforms

– How can algorithms be modified to better exploit available hardware of each platform? – How does performance compare in terms of run time and energy consumption?

5

slide-6
SLIDE 6

Feature Detection

  • What is a ‘feature’?

– An “interesting” part of an image that can be used to identify objects

  • Examples: Edges, corners, ridges, blobs

6

Slide adapted from Darya Frolova, Denis Simakov, Weizmann Institude

flat region: no change within block edge: no change along the edge corner: change in all directions

slide-7
SLIDE 7

Feature Description

  • Given the features, uniquely describe them so they can be matched in other

images

  • Descriptors summarize characteristics of the features

– E.g., intensity, orientation

  • Descriptors should be distinctive and insensitive to local image deformations.

7

Images from: R. Szeliski, Computer Vision: Algorithms and Applications

slide-8
SLIDE 8

Accuracy and Run‐time Comparisons

8

  • HoG (Histogram of Gradient) based Descriptors

– SIFT: Scale‐Invariant Feature Transform – SURF: Speeded Up Robust Features

  • Binary Feature Descriptors

– BRIEF: Binary Robust Independent Elementary Features – BRISK: Binary Robust Invariant Scalable Keypoints

1 10 100 1000 20 40 60 80 SIFT SURF BRIEF BRISK CPU run‐time (ms) ‐ log scale Accuracy Percetage Precision Recall Run‐time (% of detected features that are correct) (% of features detected)

slide-9
SLIDE 9

FAST: Features from Accelerated Segment Test

9

Bresenham Circle sliding window

12‐pixel continuity?  If so then feature Pre‐compare pixels 1, 5, 9, and 13 to determine possibility for continuity On average 98.5% of the comparisons fail the continuity test at the pre‐compare stage

Rosten and Drummond, ECCV’06

slide-10
SLIDE 10

BRIEF: Binary Robust Independent Elementary Features

  • Compare intensities of pairs of

points using Hamming distance

  • BRIEF Sampling pattern

–512 sampling pairs –For each pair, Xiis at (0,0) and Yi takes all possible values from coarse polar grid –Sampling pairs are generated from a 31×31 region around center pixel

10

Chosen sampling pattern results in a 512‐bit characterization array

slide-11
SLIDE 11

BRISK: Binary Robust Invariant Scalable Keypoints

11

  • BRISK uses custom sampling pattern
  • 512 sampling pairs generated from a

31×31 region (like BRIEF)

  • Distinguishes between short/long pairs

–Short pairs used similar to BRIEF to generate descriptor vectors based

  • n intensity comparisons

–Long pairs used for orientation computation by rotating sampling pattern

BRISK sampling pattern Red circles represent standard deviation of Gaussian smoothing

slide-12
SLIDE 12

Start R d I Frame Read Input Frame h i l l Bresenham circle For each pixel , p, apply the 7x7 filter of Bresenham circle is a corner p is a corner Generate N sampling pairs , Xi and Yi, around p Xi > Yi Di = 1 Di = 0

Feature Detection Brief Feature Description

Stop False False

Algorithm Flowchart

  • FAST feature detection +

BRIEF feature description

  • Obtaining sampling window

for feature description requires irregular access pattern

FAST BRIEF

slide-13
SLIDE 13

Start R d I Frame Read Input Frame F h i l l Bresenham circle For each pixel , p, apply the 7x7 filter of Bresenham circle is a corner p is a corner Generate N sampling pairs , Xi and Yi, around p Xi > Yi Di = 1 Di = 0

Feature Detection

False False Perform Orientation Compensation for BRISK Stop

Feature Description

Algorithm Flowchart

  • FAST feature detection +

BRISK feature description

  • BRISK requires an extra step

for orientation compensation

– A significant amount of extra hardware resources for this step

FAST BRISK

slide-14
SLIDE 14

Experimental Embedded Platforms

  • FPGA: MicroZED development board:

– 28nm Zynq 7020 SoC – Artix‐7 FPGA + 1GB DDR3 – dual‐core Arm Cortex A9 CPU (for debug and init. only)

  • GPU & CPU: Jetson TK1 development kit

– 28nm Tegra K1 SoC – Kepler GPU with 192 CUDA cores @ 950MHz – Quadcore ARM Cortex A15 CPU @ 2.5GHz (single core activated) – 2GB Memory – Running OpenCV versions of FAST, BRIEF, BRISK

14

slide-15
SLIDE 15

Feature Detection & Description: Block Diagram

Image data

Zig‐Zag Traversing Line Buffers Mask Size Register Array

Buffer Address Generator and Register Array

+ ‐ + ‐ + ‐ + ‐

Pre‐compute units

Equality

X 12

+ ‐

Circle Comparator

X x x x

x&y coordinates Enable & Sync signals

ARM Cortex A9 CPU Central Interconnect

32b GP AXI Master Port

10‐Line word Buffer Processing System (PS) Control

Programmable Logic (PL)

is_corner

Smoothing & Region Generation N‐wide comparator Orientation Compensation

descriptor

AXI Interconnect

+ ‐

Memory Interface DDR3 15

  • rientation
slide-16
SLIDE 16

Feature Detection & Description: Block Diagram

Image data

Zig‐Zag Traversing Line Buffers Mask Size Register Array

Buffer Address Generator and Register Array

+ ‐ + ‐ + ‐ + ‐

Pre‐compute units

Equality

X 12

+ ‐

Circle Comparator

X x x x

x&y coordinates Enable & Sync signals

ARM Cortex A9 CPU Central Interconnect

32b GP AXI Master Port

10‐Line word Buffer Processing System (PS) Control

Programmable Logic (PL)

is_corner

Smoothing & Region Generation N‐wide comparator Orientation Compensation

descriptor

AXI Interconnect

+ ‐

Memory Interface DDR3 16

  • rientation

FAST Feature Detection

slide-17
SLIDE 17

Feature Detection & Description: Block Diagram

Image data

Zig‐Zag Traversing Line Buffers Mask Size Register Array

Buffer Address Generator and Register Array

+ ‐ + ‐ + ‐ + ‐

Pre‐compute units

Equality

X 12

+ ‐

Circle Comparator

X x x x

x&y coordinates Enable & Sync signals

ARM Cortex A9 CPU Central Interconnect

32b GP AXI Master Port

10‐Line word Buffer Processing System (PS) Control

Programmable Logic (PL)

is_corner

Smoothing & Region Generation N‐wide comparator Orientation Compensation

descriptor

AXI Interconnect

+ ‐

Memory Interface DDR3 17

  • rientation

BRIEF Descriptor

slide-18
SLIDE 18

Feature Detection & Description: Block Diagram

Image data

Zig‐Zag Traversing Line Buffers Mask Size Register Array

Buffer Address Generator and Register Array

+ ‐ + ‐ + ‐ + ‐

Pre‐compute units

Equality

X 12

+ ‐

Circle Comparator

X x x x

x&y coordinates Enable & Sync signals

ARM Cortex A9 CPU Central Interconnect

32b GP AXI Master Port

10‐Line word Buffer Processing System (PS) Control

Programmable Logic (PL)

is_corner

Smoothing & Region Generation N‐wide comparator Orientation Compensation

descriptor

AXI Interconnect

+ ‐

Memory Interface DDR3 18

  • rientation

BRISK Descriptor

slide-19
SLIDE 19

Feature Detection & Description: Block Diagram

19

Feature detection logic

Image data

Zig‐Zag Traversing Line Buffers Mask Size Register Array

Buffer Address Generator and Register Array

+ ‐ + ‐ + ‐ + ‐

Pre‐compute units

Equality

X 12

+ ‐

Circle Comparator

X x x x

x&y coordinates Enable & Sync signals

ARM Cortex A9 CPU Central Interconnect

32b GP AXI Master Port

10‐Line word Buffer Processing System (PS) Control

Programmable Logic (PL)

is_corner

Smoothing & Region Generation N‐wide comparator Orientation Compensation

descriptor

AXI Interconnect

+ ‐

Memory Interface DDR3

  • rientation

Descriptor logic Data control logic for detection and description

slide-20
SLIDE 20

Results: Run‐time

4.4 25.8 13.8 13.7 36.4 103.7 18.2 13.7 50.8 111.7 27.6 13.7

20 40 60 80 100 120 Intel i7 CPU ARM on Jetson Tegra GPU on Jetson Zynq FPGA

Run‐time (ms)

FAST FAST+BRIEF FAST+BRISK

20

slide-21
SLIDE 21

Results: Power & Energy

21

(detection) (detection + description)

21.5 6.5 4.3 2.20 22.2 6.2 6.3 2.27 22.4 6.3 6.3 2.31 5 10 15 20 25 Intel i7 CPU Embedded CPU Tegra GPU Zynq FPGA Power (W) FAST FAST+BRIEF FAST+BRISK 94.0 166.8 59.3 30.00 809.4 696.4 114.1 30.96 1137.7 705.1 174.3 31.58 200 400 600 800 1000 1200 Intel i7 CPU Embedded CPU Tegra GPU Zynq FPGA Energy (mJ) FAST FAST+BRIEF FAST+BRISK

slide-22
SLIDE 22

Results: Profiling

  • Feature description stalled due to memory throttle

– Needs better data management

22 0.0% 5.0% 10.0% 15.0% 20.0% 25.0% 30.0% 35.0% 40.0% 45.0% Execution Dependency Pipe Busy Memory Throttle Not Selected

Stall Reasons during GPU Computation

Description Detection

(BRIEF) (FAST)

0% 20% 40% 60% 80% 100%

FPGA: FAST FPGA: FAST + BRIEF GPU: FAST GPU: FAST + BRIEF

Instruction Distribution

Load/Store FP/Integer

  • Feature description for GPU implementation

has bump in load/store ops

– Almost 10X more than just FAST

slide-23
SLIDE 23

Results: FPGA Resource Utilization

23

10% 14% 27% 32% 19% 37% 57% 66% 37%

LookUp Tables Flip Flops Block Rams FAST FAST+BRIEF FAST+BRISK

Lookup Tables Flip Flops Block RAMs FAST 4564 1551 8 FAST + BRIEF 14398 2093 11 FAST + BRISK 25575 7115 11

  • BRISK requires significant amount of extra resources for

smoothing and orienting

  • Extra resources do not translate to much extra power

Distribution of resources Resource utilization

slide-24
SLIDE 24

Conclusions

  • FPGA outperforms CPUs and GPUs in terms of power & performance

– FAST + BRISK: 36 fps vs. 147 fps – FPGA amenable to various HW optimizations:

  • deep pipelining, optimized memory access, pre‐computation
  • FGPA implementations better for handling multiple kernels

– For GPUs, multiple kernels highly bounded by kernel scheduler and memory bottlenecks – FPGA customization on layers better for tackling operations on multiple kernels.

  • Use profiling on GPU implementation as first step to FPGA optimization

– identify nature of bottlenecks – Customized FPGA HW can often better manage certain types of bottlenecks

24