accelerating your embedded vision / machine learning ... · accelerating your embedded vision /...

20
Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack Giles Peckham, Xilinx

Upload: others

Post on 05-Jun-2020

5 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack

Giles Peckham, Xilinx

Page 2: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Xilinx Foundation at the Edge Vision Customers Using Xilinx

>80 ProAV & Broadcast Suppliers

>60 Smart Camera & Visualization Suppliers

>50 Industrial Vision Equipment Makers

>10 Medical Diagnostic Suppliers

>5 VR/AR Equipment Makers

>80 ADAS Models From 23 Makers

>5 Drone Suppliers

Page 2

Page 3: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Edge Resident Apps Cloud Hosted Apps

Traffic & Network Analytics

Sales, Marketing & Customer

Service

Factory & Operations

Analytics

Clinical Analytics &

Recommendations

Autonomous Cars &Trucks

Delivery Drones,

Warehouse Robots

Robots/Cobots, UAV,

Inspection

Medical Imaging &

Surgical Robots

Ad Targeting and E-Commerce Personal VR/Gaming

Smart Displays

Personal Assistants

Transportation & Grid Control

Cyber Security

Factory Control &

Surveillance

Medical Diagnostics

Hybrid Solutions

Consumer/Entertainment/Retail

Transportation/Infrastructure

Enterprise Operations

Oil & Gas/Agriculture

Industrial/Military

Medical/Healthcare

Field Sensor Data Analytics Field Drones & Robots Climate, Water,

Energy & Flow Control

Source: Machine Learning Landscape from Moor Insights & Strategy

Machine Learning: From the Edge to the Cloud

Page 3

Page 4: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Applications: Wide Range of Rapidly Changing Vision Guided Systems

Embedded Vision Systems Vision Guided Autonomous Systems

Vision Guided ‘Cobots’

‘Sense and Avoid’ & Autonomous Drones

Augmented Reality and HUDs

Autonomous Vehicles

Automated Surveillance

Automated Medical Diagnostics

Factory Robotics

Camera Equipped Aircraft

Physical Displays and HMI

Forward Auto Camera

Video Security Cams

Medical Imaging and Human Eye

Page 4

Page 5: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Must Keep Up with Sensor Fusion Evolution

Sensor Categories

Temperature

Magnetic Chemical

Pressure

Force

Density

Level

Humidity

Velocity

Flow

Fluid

Gas

Vibration

Sound

Acoustic

Position

Angle

Distance

Speed

Proximity

Acceleration

Displacement

Imaging

Light Infrared

HI Res

CCD Photon

Radar

Lidar

Ultrasonic

3D Lidar

Solid State

Accelerometer

Gyroscopic

AI Expansion Traditional Growth

Multispectral

Cameras

Sensor

Types

Multi-mode

Lidar

GPS

IMU

Imagers

Multispectral

RF

Page 5

Page 6: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Must Keep Up with Neural Network Evolution

Alex Net

Deep Belief

Neural Net

ZFNet

VGG Net

GoogLeNet

Microsoft

ResNet

ANN DCNN

Perceptron

TDNN

Belief Net

Fractal Net

CNN

LeNet5

Perceptron

1958 1980 1990 2000 1960 2012 2014 2015 2016 2017

Squeeze Net

WaveNet

DTNN

Spatial

Transformer

Net

Spike NN

Inception Net

ResNET

SSD

Fast

RCNN

Faster

RCNN

40 Years 5 Years 2 Years Future

YOLO ROLO

Madaline Back

Propagation

DCCN HashNet

SGAN

DRQN

VDCNN

StuffNet

QuickNet

Floating Point 8-bit to 1-bit and Variable Precision Inference

DenseNet

FINN

Page 6

Page 7: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Mandates: From Embedded Vision to Autonomous Systems

Xilinx Unique Application Advantages

Responsive

Reconfigurable

Connected

Optimized from Sensors to Inference & Control

Reconfigurable for Latest Networks & Sensors

Any-to-Any Connectivity

Page 7

Page 8: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Mandates: From Embedded Vision to Autonomous Systems

Xilinx Unique Application Advantages

Responsive

Reconfigurable

Connected

Optimized from Sensors to <8-bit Inference & Control

Reconfigurable for Latest Networks & Sensors

Any-to-Any Connectivity

Barrier to Broad Adoption:

Software Defined Programming, Libraries and Frameworks

Page 8

Page 9: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Application Development

Algorithm Development

Platform Development

DNN

CNN

GoogLeNet

SSD

FCN …

Page 9

Page 10: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Algorithm

to RTL

Develo

pm

ent

Tim

e

SDSoC

C/C++

“A subsystem design used

to take 3 weeks. I’ve done

it in 4 days with SDSoC.”

- DSP Engineer

Bitstream

Generation

OpenCV Apps

ML Apps

Traditional RTL flow OpenCV Machine Learning

“reVISION will shorten our development cycle for new

products and upgrades by up to 12 months.”

- System Architect System

Integration

20% Xilinx/80% User

80% Xilinx/20% User

Ease of Use

Removing the Barrier to Broad Adoption: reVISION Stack

Page 10

Page 11: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Page 11

Machine Learning Inference

Page 12: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Training: Process for machine to

“learn” and optimize model from data

Inference: Using trained models to

predict/estimate outcomes from new

observations in efficient deployments

INFERENCE

Fewer

“dog”

“dog”

Input

”cat”

TRAINING

= ?

Many

labels

Error

Input

FP-32 FIXED-16

(INT16)

FIXED-8

(INT8)

Difference

vs FP32

VGG-16 86.6% 86.6% 86.4% (0.2%)

GoogLeNet 88.6% 88.5% 85.7% (2.9%)

SqueezeNet 81.4% 81.4% 80.3% (1.1%)

Inference now 8 bit and below

for maximum efficiency

The Divergence of Training and Inference in Machine Learning

Top-5

Accuracy

Page 13: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Page 13

Inference Precisions Moving to Lower and Variable Precision

Citation: https://arxiv.org/pdf/1510.00149.pdf

# of weight bits # of weight bits

Page 14: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Page 14

Xilinx: Future Proof Architecture for Any Precisions

2012 2013 2018 2015 2014 2017 2019 2016 2020

FP32 FP/INT16 INT8 INT6 INT4 INT2 INT1

GPU

CPU

Xilinx

Limited to 32 bit operations

New devices required to

support change in precision efficiently

Beyond 8 bit

Reconfigurable to scale and

optimize for different precisions

32

16 2

x

8

4 2 1

16 8

Page 15: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Page 15

Low Latency Inference by Layer to Layer Dataflow On Chip

GPU/CPU: Dataflow using Off chip memory

Xilinx: Maximum local data reuse “layer merging” between layers

On-chip Memory Nvidia Tegra X1 (GPU L2 Cache) Xilinx ZU7 (BRAM + URAM)

2 Mb 38 Mb

Up to 19x More On-chip Memory than SoCs and eGPUs

*Nvidia TX1 spec: http://wccftech.com/nvidia-tegra-x1-super-chip-announced-ces-2015-features-maxwell-core-architecture-256-cuda-cores/

Page 16: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Page 16

xFdnn: Direct Deep Learning Inference from Caffe

Compiles only ARM software code in minutes. No hardware compilation

1 2 3 Import .prototxt and

trained weights

Call prototxt runtime

API in your application

Cross-compile for

Cortex-A53 and run on

a board

Page 17: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Page 17

Deep Learning Design Examples

Mar 2017 Roadmap

GoogLeNet

@ batch = 1

Images/s 115 370

Power (W) 6.0 7.0

Images/s/watt 19.2 53.0

Mar 2017 Roadmap

SSD

@ batch = 1

Images/s 6.3 Coming Soon

Power (W) 6.5 Coming Soon

Images/s/watt 1.0 Coming Soon

Mar 2017 Roadmap

FCN-AlexNet

@ batch = 1

Images/s 7.0 Coming Soon

Power (W) 6.5 Coming Soon

Images/s/watt 1.1 Coming Soon

Page 18: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Page 18

Performance: More efficient than Nvidia Tegra X1

6x Images/sec/watt

42x

Frames/sec/watt

Computer

Vision

Machine

Learning

Inference

Xilinx

Benchmark

Xilinx

Benchmark

• nVidia GoogLeNet performance: https://devblogs.nvidia.com/parallelforall/jetpack-doubles-jetson-tx1-deep-learning-inference/

• ML based on Xilinx GoogleNet performance roadmap in 2H2017: 180 img/s in May 2017, 370 img/s in 2H17

• LK Dense Optical Flow using pyramid = 5, iteration = 5

• All benchmarks utilize as much resources as possible on GPU (~99%) and programmable logic (~70%)

GoogLeNet

@ batch = 1

Xilinx ZU9 Xilinx ZU5 Nvidia TX1

Images/s 370.0 155.0 70

Power (W) 7.0 4.5 7.9

Images/s/watt 53.0 34.5 8.9

CV::

StereoLBM @1080p

Xilinx ZU9 Xilinx ZU5 nVidia TX1

Frames/s 700 296 28

Power (W) 4.8 3.3 7.9

Frames/s/watt 145.8 89.7 3.5

CV::

LK Dense

Optical Flow @720p

Xilinx ZU9 Xilinx ZU5 nVidia TX1

Frames/s 170 73 7

Power (W) 4.8 3.3 7.9

Frames/s/watt 35.4 22.1 0.9

Page 19: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Page 19

Latency: Xilinx Provides Fastest Response Time for Any Batch Size

1/5 Latency (ms)

Real Time

Applications

Latency

Xilinx

Benchmark

*nVidia GoogLeNet performance: https://devblogs.nvidia.com/parallelforall/jetpack-doubles-jetson-tx1-deep-learning-inference/

GoogLeNet

@ batch = 1

Xilinx ZU9 Xilinx ZU5 Nvidia TX1

Images/s 370.0 155.0 70

Latency (ms) 2.7 6.4 14.2

GoogLeNet

@ batch = 8

Xilinx ZU9 Xilinx ZU5 Nvidia TX1

Images/s 370.0 155.0 163

Latency (ms) 2.7 6.4 49.0

For large batch, Nvidia

latency increases

significantly

Page 20: Accelerating your Embedded Vision / Machine Learning ... · Accelerating your Embedded Vision / Machine Learning design with the reVISION Stack ... Platform Development DNN ... Broadening

© Copyright 2017 Xilinx .

Removing the Barriers for Expansion into a Wide Range of Vision Guided Machine Learning Applications

Broadening the Development and Deployment of Machine Learning Applications from the Edge to the Cloud

Page 20