Slide 1

Slide 1 text

PILL/CANDY DEFECT DETECTION Alex Loosley, Data Reply GmbH

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

APPROVAL TO SPEAK

Slide 5

Slide 5 text

the use case

Slide 6

Slide 6 text

Vicky Qian Peter Schaab Wadim Pessin Johannes Oberreuter

Slide 7

Slide 7 text

NOT ALL PILLS ARE CREATED PERFECT quality control in pill production broken pill presses image classification

Slide 8

Slide 8 text

SETUP • Monitor tic-tac pills after production in real time • 2 high-speed cameras • Pill classifier

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

CLASSIFYING PILLS input deep learning output non-defective defective

Slide 12

Slide 12 text

WHY DEEP LEARNING? automatic feature extraction robustness to variation reusability scalability

Slide 13

Slide 13 text

CONVOLUTIONAL NEURAL NETWORK • emulate visual cortex • translationally invariant • exploit spatial correlations source: Wikipedia features increasingly non-local

Slide 14

Slide 14 text

CONVOLUTIONAL NEURAL NETWORK Typical Numbers • 5 convolutional layers, 3 layers in top neural network – 500,000 neurons • 50,000,000 parameters • ~ 1 week to train (GPUs) source: http://learning.eng.cam.ac.uk/pub/Public/Turner/Teaching/ml-lecture-3-slides.pdf features increasingly non-local

Slide 15

Slide 15 text

TRANSFER LEARNING + general information on edges & shapes labelled dataset pretrained neural network Tic-tac classifier: • Pretrained InceptionV3 network • GPU instance in Google Cloud

Slide 16

Slide 16 text

TRANSFER LEARNING PARAMATERS …

Slide 17

Slide 17 text

WHY GOOGLE CLOUD? (AND CLOUD ML) 0 350 700 1050 1400 1750 3 layers 4 layers CPU NVIDIA Tesla K80 GPUs as a service: s/epoch fail fast: (10x speed-up) cost efficient full modeling control flexible buy it: $4,349.99 use it: $0.783/h train it: $0.30

Slide 18

Slide 18 text

CLASSIFYING PILLS non-defective: true negative defective: true positive defective pills non-defective pills (the vast majority)

Slide 19

Slide 19 text

IMAGE DENOISING clear image noisy image

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

AUTOENCODER Source: Benjamin Irving encoder decoder noisy image reconstructed image compressed encoding

Slide 22

Slide 22 text

IMAGE DENOISING clear image noisy image denoising with autoencoder AUC = 0.99 AUC = 0.89 AUC = 0.91

Slide 23

Slide 23 text

NON-LOCAL MEANS replaces the value of a pixel by an average of a selection of other pixels values Source: scikit-image

Slide 24

Slide 24 text

IMAGE DENOISING clear image noisy image denoising with autoencoder denoising with non-local means AUC = 0.99 AUC = 0.89 AUC = 0.91 AUC = 0.97

Slide 25

Slide 25 text

# of test pill Probability FINAL RESULTS image with or without dust denoising classification 0.97

Slide 26

Slide 26 text

CONCLUSION Preprocessing improves classification results with transfer learning Cheap to train/deploy with Google Cloud Platform (and Cloud ML) Transfer learning saves time and training compute resources Pills taste better with Maple Syrup

Slide 27

Slide 27 text

THANK YOU www.reply.com

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

BACKUP SLIDES

Slide 30

Slide 30 text

CONVOLUTIONAL NEURAL NETWORK • emulate visual cortex • translationally invariant • exploit spatial correlations source: Wikipedia receptive field features increasingly non-local

Slide 31

Slide 31 text

Unlike “local mean” filters, which take the mean value of a group of pixels surrounding a target pixel to smooth the image Non-local means filtering take a means of all the pixels in the image, weighted by how similar these pixels are to the target pixel Reference NON-LOCAL MEANS

Slide 32

Slide 32 text

SUGGESTED DECISION WINDOW 120 pills/s count 7200 pills (1 minute) FPR: 0.2% TPR: 62% 4 broken/s 160 pills/minute detected 15 pills/minute expected chance for false alarm: < 10-10

Slide 33

Slide 33 text

CONVOLUTIONAL NEURAL NETWORK benchmarking different architectures 3 Layers 4 Layers trained on dusty and non-dusty images

Slide 34

Slide 34 text

AUTOENCODER FOR DENOISING Convolutional Neural Network Inception V3