Image Classification with DIGITS NVIDIA Deep Learning Institute 1 - - PowerPoint PPT Presentation

image classification with digits
SMART_READER_LITE
LIVE PREVIEW

Image Classification with DIGITS NVIDIA Deep Learning Institute 1 - - PowerPoint PPT Presentation

Image Classification with DIGITS NVIDIA Deep Learning Institute 1 DEEP LEARNING INSTITUTE DLI Mission Helping people solve challenging problems using AI and deep learning. Developers, data scientists and engineers Self-driving cars,


slide-1
SLIDE 1

1

Image Classification with DIGITS

NVIDIA Deep Learning Institute

slide-2
SLIDE 2

2

DEEP LEARNING INSTITUTE

DLI Mission Helping people solve challenging problems using AI and deep learning.

  • Developers, data scientists and

engineers

  • Self-driving cars, healthcare and

robotics

  • Training, optimizing, and deploying

deep neural networks

slide-3
SLIDE 3

3 3

Agenda

  • Intro to Deep Learning
  • Training vs. Programming
  • Train our first neural network - Lab
  • How networks “learn”
  • Increasing performance - Lab
  • Next Steps
slide-4
SLIDE 4

4

WHAT IS DEEP LEARNING?

slide-5
SLIDE 5

ACCOMPLISHING COMPLEX GOALS

slide-6
SLIDE 6

SWEEPING ACROSS INDUSTRIES

Internet Services Medicine Media & Entertainment Security & Defense Autonomous Machines

➢ Cancer cell detection ➢ Diabetic grading ➢ Drug discovery ➢ Pedestrian detection ➢ Lane tracking ➢ Recognize traffic signs ➢ Face recognition ➢ Video surveillance ➢ Cyber security ➢ Video captioning ➢ Content based search ➢ Real time translation ➢ Image/Video classification ➢ Speech recognition ➢ Natural language processing

slide-7
SLIDE 7

“Seeing” Gravity In Real Time insideHPC.com Survey November 2016

92%

believe AI will impact their work

93%

using deep learning seeing positive results

TRANSFORMING RESEARCH

Accelerating Drug Discovery

slide-8
SLIDE 8

Difference in Workflow

Input Hand Designed Features Output Classic Machine Learning [ 1990 : now ] Examples [ Regression and SVMs ] Model / Mapping Example [ Conv Net ] Input Simple Features Output Deep/End-to-End Learning [ 2012 : now ] Model/ Mapping Complex Features

slide-9
SLIDE 9

Traditional Workflow

Input Hand Designed Features Output Classic Machine Learning [ 1990 : now ] Examples [ Regression and SVMs ] Model / Mapping Challenge in Slack channel: How would you describe this image to someone (or something) blind? Difficult: From it’s raw pixels. Medium: From geometric primitives (lines, curves, colors) Easy: Using any words that you may know

slide-10
SLIDE 10

Deep Learning Workflow

Example [ Conv Net ] Input Simple Features Output Deep/End-to-End Learning [ 2012 : now ] Model/ Mapping Complex Features Experience: Trust Neural Network to learn features and model by providing inputs and outputs. Key Skill: Experience (data) creation

slide-11
SLIDE 11

11 11

INPUT TO OUTPUT

Louie or Not Louie?

1 = Louie 0= Not Louie .85 = 85% confident Louie

slide-12
SLIDE 12

12 12

INPUT TO OUTPUT

Louie or Not Louie?

Yes, this beagle is Louie!

1 = Louie 0= Not Louie .85 = 85% confident Louie

slide-13
SLIDE 13

13 13

No, not Louie!

INPUT TO OUTPUT

Louie or Not Louie?

1 = Louie 0= Not Louie .85 = 85% confident Louie

slide-14
SLIDE 14

14 14

No, not Louie!

INPUT TO OUTPUT

Louie or Not Louie?

1 = Louie 0= Not Louie .85 = 85% confident Louie

slide-15
SLIDE 15

15 15

Yup, that’s Louie!

INPUT TO OUTPUT

Louie or Not Louie?

1 = Louie 0= Not Louie .85 = 85% confident Louie

slide-16
SLIDE 16

16 16

Yea, that’s Louie!

INPUT TO OUTPUT

Louie or Not Louie?

1 = Louie 0= Not Louie .85 = 85% confident Louie

slide-17
SLIDE 17

17 17

Yes! Another epoch?

INPUT TO OUTPUT

Louie or Not Louie?

1 = Louie 0= Not Louie .85 = 85% confident Louie

slide-18
SLIDE 18

HOW IT WORKS

slide-19
SLIDE 19

HOW IT WORKS

slide-20
SLIDE 20

HOW IT WORKS

slide-21
SLIDE 21

HOW IT WORKS

slide-22
SLIDE 22

22

Training a network with data

Lab

slide-23
SLIDE 23

23 23

HANDWRITTEN DIGIT RECOGNITION

HELLO WORLD of machine learning

slide-24
SLIDE 24

24

WHAT THIS LAB IS

  • An introduction to:
  • Deep Learning
  • Workflow of training a network
  • Understanding the results
  • Hands-on exercises using DIGITS for computer vision and

classification

slide-25
SLIDE 25

25

NVIDIA’S DIGITS

slide-26
SLIDE 26

26 26

Process Data Configure DNN Visualization Monitor Progress

Interactive Deep Learning GPU Training System

NVIDIA DIGITS

slide-27
SLIDE 27

27

WHAT THIS LAB IS NOT

  • Intro to machine learning from first principles
  • Rigorous mathematical formalism of neural networks
  • Survey of all the features and options of tools and frameworks
slide-28
SLIDE 28

28

ASSUMPTIONS

  • No background in Deep Learning needed
  • Understand how to:
  • Navigate a web browser
  • Download files
  • Locate files in file managers
slide-29
SLIDE 29

29

LAB OVERVIEW

  • Learn about the workflow of Deep Learning
  • Load data
  • Expose a network to data
  • Evaluate model results
  • Try different techniques to improve initial results
slide-30
SLIDE 30

30

LAUNCHING THE LAB

slide-31
SLIDE 31

31

NAVIGATING TO QWIKLABS

1. Navigate to: https://nvlabs.qwiklab.com 2. Login or create a new account

slide-32
SLIDE 32

32

ACCESSING LAB ENVIRONMENT

3. Select the event specific In-Session Class in the upper left 4. Click the “Image Classification with DIGITS” Class from the list

slide-33
SLIDE 33

33

LAUNCHING THE LAB ENVIRONMENT

5. Click on the Select button to launch the lab environment

  • After a short

wait, lab Connection information will be shown

  • Please ask Lab

Assistants for help!

slide-34
SLIDE 34

34

LAUNCHING THE LAB ENVIRONMENT

6. Click on the Start Lab button

slide-35
SLIDE 35

35

LAUNCHING THE LAB ENVIRONMENT

You should see that the lab environment is “launching” towards the upper-right corner

slide-36
SLIDE 36

36

CONNECTING TO THE LAB ENVIRONMENT

7. Click on “here” to access your lab environment / Jupyter notebook

slide-37
SLIDE 37

37

CONNECTING TO THE LAB ENVIRONMENT

You should see your “Image Classification with DIGITS” Jupyter notebook

slide-38
SLIDE 38

38

JUPYTER NOTEBOOK

1. Place your cursor in the code 2. Click the “run cell” button 3. Confirm you receive the same result

slide-39
SLIDE 39

39

STARTING DIGITS

Instruction in Jupyter notebook will link you to DIGITS

slide-40
SLIDE 40

40

ACCESSING DIGITS

  • Will be prompted to

enter a username to access DIGITS

  • Can enter any

username

  • Use lower case

letters

slide-41
SLIDE 41

41

Evaluating Performance

slide-42
SLIDE 42

42 42

Loss function (Validation) Loss function (Training) Accuracy

  • btained from

validation dataset

EVALUATE THE MODEL

slide-43
SLIDE 43

43

DEEP LEARNING APPROACH - TRAINING

Input

Process

  • Forward propagation

yields an inferred label for each training image

  • Loss function used to

calculate difference between known label and predicted label for each image

  • Weights are adjusted

during backward propagation

  • Repeat the process

Forward propagation Backward propagation

slide-44
SLIDE 44

44

Next Challenges

  • Increase accuracy and

confidence with similar data

  • Generalize performance to

more diverse data Ideas?

slide-45
SLIDE 45

45

Lab Review

slide-46
SLIDE 46

46

Defaults Training+Data

1 : 99.90 % 0 : 93.11 % 2 : 69.03 % 2 : 87.23 % 8 : 71.37 % 8 : 71.60 % 8 : 85.07 % 8 : 79.72 % 0 : 99.00 % 0 : 95.82 % 8 : 99.69 % 8 : 100.0 % 8 : 54.75 % 2 : 70.57 %

More data

Full dataset ( 10 epochs )

  • 99% of accuracy

achieved

  • No improvements in

recognizing real-world images

slide-47
SLIDE 47

47

SMALL DATASET FULL DATASET +INVERTED

1 : 99.90 % 0 : 93.11 % 1 : 90.84 % 2 : 69.03 % 2 : 87.23 % 2 : 89.44 % 8 : 71.37 % 8 : 71.60 % 3 : 100.0 % 8 : 85.07 % 8 : 79.72 % 4 : 100.0 % 0 : 99.00 % 0 : 95.82 % 7 : 82.84 % 8 : 99.69 % 8 : 100.0 % 8 : 100.0 % 8 : 54.75 % 2 : 70.57 % 2 : 96.27 %

DATA AUGMENTATION

Adding inverted images ( 10 epochs )

slide-48
SLIDE 48

48

DATA AUGMENTATION

Adding Inverted Images

slide-49
SLIDE 49

49

SMALL DATASET FULL DATASET +INVERTED ADDING LAYER

1 : 99.90 % 0 : 93.11 % 1 : 90.84 % 1 : 59.18 % 2 : 69.03 % 2 : 87.23 % 2 : 89.44 % 2 : 93.39 % 8 : 71.37 % 8 : 71.60 % 3 : 100.0 % 3 : 100.0 % 8 : 85.07 % 8 : 79.72 % 4 : 100.0 % 4 : 100.0 % 0 : 99.00 % 0 : 95.82 % 7 : 82.84 % 2 : 62.52 % 8 : 99.69 % 8 : 100.0 % 8 : 100.0 % 8 : 100.0 % 8 : 54.75 % 2 : 70.57 % 2 : 96.27 % 8 : 70.83 %

MODIFIED NETWORK

Adding filters and ReLU layer ( 10 epochs )

slide-50
SLIDE 50

50

MODIFY THE NETWORK

Necessary for less “solved” challenges.

layer { name: "pool1“ type: "Pooling“ … } layer { name: "reluP1" type: "ReLU" bottom: "pool1" top: "pool1" } layer { name: "reluP1“ layer { name: "conv1" type: "Convolution" ... convolution_param { num_output: 75 ... layer { name: "conv2" type: "Convolution" ... convolution_param { num_output: 100 ...

slide-51
SLIDE 51

51

Next Steps

  • Experiment with Image Classification
  • Different datasets
  • Increase performance
  • Learn to train existing networks with data for other challenges
  • Learn about network construction
  • Learn about how to create an image classifier with other frameworks
  • Caffe/Keras
  • Tensorflow
  • Etc.
slide-52
SLIDE 52

52

Appendix

slide-53
SLIDE 53

53

Activation functions

tanh Sigmoid ReLU

slide-54
SLIDE 54

54 54

CNN - Example

Each pixel is a neuron

slide-55
SLIDE 55

55 55

CNN - Example - 1st Feature Map

3x3 Kernel, 1 Stride, weights constant per kernel

slide-56
SLIDE 56

56 56

CNN - Example - 1st Feature Map

3x3 Kernel, 1 Stride, weights constant per kernel

slide-57
SLIDE 57

57 57

CNN - Example - 1st Feature Map

3x3 Kernel, 1 Stride, weights constant per kernel

slide-58
SLIDE 58

58 58

CNN - Example - 1st Feature Map

3x3 Kernel, 1 Stride, weights constant per kernel

slide-59
SLIDE 59

59 59

CNN - Example - 1st Feature Map

3x3 Kernel, 1 Stride, weights constant per kernel

slide-60
SLIDE 60

60 60

CNN - Example - 1st Feature Map

3x3 Kernel, 1 Stride, weights constant per kernel

slide-61
SLIDE 61

61

CNN - Example - 2nd Feature Map

slide-62
SLIDE 62

62

CNN - Example - 2nd Feature Map

slide-63
SLIDE 63

63

CNN - Example - 2nd Feature Map

slide-64
SLIDE 64

64

CNN - Example - 2nd Feature Map

slide-65
SLIDE 65

65

CNN - Example - 2nd Feature Map

slide-66
SLIDE 66

66

CNN - Example - 2nd Feature Map

slide-67
SLIDE 67

67

CNN - Example - Consecutive Convolutions

  • Each filter in above layer performs convolution on all filters in previous

layer, same for colour channels.

slide-68
SLIDE 68

68

CNN - Example - Consecutive Convolutions

  • Each filter in above layer performs convolution on all filters in

previous layer, same for colour channels.

slide-69
SLIDE 69

69

CNN - Example - Consecutive Convolutions

  • Each filter in above layer performs convolution on all filters in

previous layer, same for colour channels.

slide-70
SLIDE 70

70

CNN - Example - Consecutive Convolutions

  • Each filter in above layer performs convolution on all filters in

previous layer, same for colour channels.

slide-71
SLIDE 71

71

Pooling

  • Pooling performs subsampling and reduces network size
  • Example of MAX pooling (selecting the maximum value)

[http://cs231n.github.io/]

slide-72
SLIDE 72

72

www.nvidia.com/dli

Instructor: