35
Nikolai Smolyanskiy, Alexey Kamenev, Jeffrey Smith AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017 Project Redtail

AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

Nikolai Smolyanskiy, Alexey Kamenev, Jeffrey Smith

AUTONOMOUS DRONE NAVIGATIONWITH DEEP LEARNING

May 8, 2017

Project Redtail

Page 2: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

2

100% AUTONOMOUS FLIGHT OVER 1 KM FOREST TRAIL AT 3 M/S

Page 3: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

3

AGENDA

Why autonomous path navigation?

Our deep learning approach to navigation

System overview

Our deep neural network for trail navigation

SLAM and obstacle avoidance

Page 4: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

4

WHY PATH NAVIGATION?

Industrial inspection

Search and rescue

Video and photography

Delivery

Drone racing

Drone / MAV Scenarios

Page 5: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

5

WHY PATH NAVIGATION?

Delivery

Security

Robots for hotels, hospitals, warehouses

Home robots

Self-driven cars

Land Robotics Scenarios

Page 6: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

6

DEEP LEARNING APPROACH

NVIDIA’s end-to-end self-driving car

Giusti et al. 2016, IDSIA / University of Zurich

Several research projects used DL and ML for navigation

Can we use vision only navigation?

Page 7: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

7

OUR PROTOTYPE FOR TRAIL NAVIGATION WITH DNN

Page 8: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

8

SIMULATIONWe used software in the loop simulator (Gazebo based)

Page 9: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

9

PROJECT PROGRESS

Page 10: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

10

PROJECT TIMELINE

October

SimulatorFlights

Level of

Auto

nom

y

August

DNN Prototype

December

OutdoorFlights. Control

Problems

February

Forest Flights.

Control and DNN

problems

April

100% AI Flight

January 2017NovemberSeptember March

Development

88-89% AI Flight

50% AI Flights,

Oscillations,Crashes

Page 11: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

11100% AUTONOMOUS FLIGHT OVER 250 METER TRAIL AT 3 M/S

Page 12: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

12

DATA FLOW

TrailNetDNN

CameraSteering

Controller

Pixhawk

Autopilot

Probabilities of:

3 views: Left, Center, Right

3 positions: Left, Middle, Right

Next waypoint:

Position

Orientation

Image Frame:

640x360

Page 13: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

13

TRAINING DATASETS

IDSIA, Swiss Alps dataset: 3 classes, 7km of trails, 45K/15K train/test sets

Automatic labelling from left, center, right camera views

Our own Pacific NW dataset: 9 classes, 6km of trails, 10K/2.5K train/test sets

Giusti et al. 2016

Page 14: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

14

HARDWARE SETUP Customized 3DR Iris+ with Jetson TX1/TX2

We use a simple 720p front facing webcam as input to our DNNs

Pixhawk and PX4 flight stack are used as a low level autopilot

PX4FLOW with downfacing camera and Lidar are used for visual-inertial stabilization

Page 15: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

15

SOFTWARE ARCHITECTUREOur runtime is a set of ROS nodes

Steering Controller

PX4 / Pixhawk

Autopilot

TrailNetDNN

SLAM to compute semi-dense maps

ROSJoystick

Object Detection DNN

Camera

Page 16: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

16

CONTROLOur control is based on waypoint setting

𝑎 = 𝛽1 ( 𝑃𝑟 𝑣𝑖𝑒𝑤𝑟𝑖𝑔ℎ𝑡 𝑖𝑚𝑎𝑔𝑒 − 𝑃𝑟 𝑣𝑖𝑒𝑤𝑙𝑒𝑓𝑡 𝑖𝑚𝑎𝑔𝑒 ) +

𝛽2( 𝑃𝑟 𝑠𝑖𝑑𝑒𝑟𝑖𝑔ℎ𝑡 𝑖𝑚𝑎𝑔𝑒 − 𝑃𝑟 𝑠𝑖𝑑𝑒𝑙𝑒𝑓𝑡 𝑖𝑚𝑎𝑔𝑒 )

𝑎 − "𝑠𝑡𝑒𝑒𝑟𝑖𝑛𝑔" 𝑎𝑛𝑔𝑙𝑒; 𝛽1, 𝛽2 − "𝑟𝑒𝑎𝑐𝑡𝑖𝑜𝑛" 𝑎𝑛𝑔𝑙𝑒𝑠

𝑎 old direction

new waypoint / direction𝑎 > 0 𝑡𝑢𝑟𝑛𝑠 𝑙𝑒𝑓𝑡,𝑎 < 0 𝑡𝑢𝑟𝑛𝑠 𝑟𝑖𝑔ℎ𝑡

Page 17: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

17

TRAILNET DNN

1. Train ResNet-18-based network (rotation only) using large Swiss Alps dataset

2. Train translation only using small PNW dataset

Input: 320x180x3 conv2_x conv3_x conv4_x conv5_x

translation (3)

rotation (3)

Output: 6

S-RESNET-18

K. He et al. 2015

Page 18: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

18

TRAILNET DNN

Classification instead of regression

Ordinary cross-entropy is not enough:

Training with custom loss

1. Images may look similar and contain label noise

2. Network should not be over-confident

R:1.0L:1.0

C: 1.0

Page 19: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

19

TRAILNET DNNTraining with custom loss

Softmax cross entropy with label smoothing (smoothing deals with noise)

Model entropy (helps to avoid model over-confidence)

Cross-side penalty (improves trail side predictions)

𝑡 = 𝑎𝑟𝑔𝑚𝑎𝑥 𝒑

𝜃 = ቊ𝑦2−𝑡, 𝑡 = 0, 2

0, 𝑡 = 1

𝒚: 𝑠𝑜𝑓𝑡𝑚𝑎𝑥 𝑜𝑢𝑡𝑝𝑢𝑡

𝒑: 𝑠𝑚𝑜𝑜𝑡ℎ𝑒𝑑 𝑙𝑎𝑏𝑒𝑙𝑠

𝛼, 𝛽: 𝑠𝑐𝑎𝑙𝑎𝑟𝑠

Loss:

𝐿 = −

𝑖

𝑝𝑖 ln 𝑦𝑖 − 𝛼(−

𝑖

𝑦𝑖 ln 𝑦𝑖 ) + 𝛽𝜃

where

V. Mnih et al. 2016

Page 20: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

20DNN ISSUES

Page 21: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

21

DNN EXPERIMENTS

NETWORK AUTONOMYACCURACY(ROTATION)

LAYERSPARAMETERS(MILLIONS)

TRAINTIME

(HOURS)

S-ResNet-18 100% 84% 18 10 13

SqueezeNet 98% 86% 19 1.2 8

Mini AlexNet 97% 81% 7 28 4

ResNet-18 CE 88% 92% 18 10 10

Giusti et al. 80% 79% 6 0.6 2

[K. He et al. 2015]; [F. Iandola et al. 2016]; [A. Krizhevsky et al. 2012]; [A. Giusti et al. 2016];

Page 22: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

22

DISTURBANCE TEST

Page 23: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

23

MORE TRAINING DETAILS

Data augmentation is important: flips, scale, contrast, brightness, rotation etc

Undersampling for small nets, oversampling for large nets

Training : Caffe + DIGITS

Inference: Jetson TX-1/TX-2 with TensorRT

Page 24: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

24

RUNNING ON JETSON

NETWORK FP PRECISIONTX-1 TIME

(MSEC)

ResNet-18 32 19.0

S-ResNet-1832 21.7

16 11.0

SqueezeNet32 8.1

16 3.1

Mini AlexNet32 17.0

16 7.5

YOLO Tiny32 19.1

16 12.0

YOLO32 115.2

16 50.4

TX-2 TIME(MSEC)

11.1

14.0

7.0

6.0

2.5

9.0

4.5

11.4

5.2

63.0

27.0

Page 25: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

25

OBJECT DETECTION DNN

Modified version YOLO (You Only Look Once) DNN

Replaced Leaky ReLU with ReLU

Trained using darknet then converted to Caffe model

TrailNet and YOLO are running simultaneously in real time on Jetson

J. Redmon et al. 2016

Page 26: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

26THE NEED FOR OBSTACLE AVOIDANCE

Page 27: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

27SLAM

Page 28: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

28SLAM RESULTS

dso_results.mp4 goes here

Page 29: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

29

PROCRUSTES ALGORITHM

Aligns two correlated point clouds

Gives us real-world scale SLAM data

Find the transform

SLAM space

World space

𝑤𝑠𝑇

Page 30: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

30

PIXHAWK VISUAL ODOMETRY

Optical flow sensor PX4FLOW

Single-point LIDAR for height

Gives 10-20% error in pose estimation

Estimating error

PX4 pose from flight in 10m square

Page 31: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

31

ROLLING SHUTTER

Page 32: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

32

SLAM FOR ROLLING SHUTTER CAMERAS

Solve for camera pose for each scanline

Run time is an issue

2x - 4x slower than competing algorithms

Direct Semi-dense SLAM for Rolling Shutter Cameras (J.H. Kim, C. Cadena, I. Reid) In IEEE International Conference on Robotics and Automation, ICRA 2016

Page 33: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

33

SEMI-DENSE MAP COMPUTE TIMES ON JETSON

TX1 CPU USAGE TX1 FPS TX2 CPU TX2 FPS

DSO 3 cores @ ~60% 1.9 3 cores @ ~65% 4.1

RRD-SLAM3 cores @ ~80%

0.2 3 cores @ ~80% 0.35

Page 34: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017

34

CONCLUSIONS. FUTURE WORK

We achieved 1 km forest flights with semantic DNN

Accurate depth maps are needed to avoid unexpected obstacles

Visual SLAM can replace optical flow in visual-inertial stabilization

Safe reinforcement learning can be used for optimal control

Page 35: AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNINGon-demand.gputechconf.com/gtc/2017/presentation/s7172... · 2017-05-16 · AUTONOMOUS DRONE NAVIGATION WITH DEEP LEARNING May 8, 2017