classification at 10hz: protecting high-power lasers with deep … · 2020. 5. 7. ·...
TRANSCRIPT
Classification at 10Hz: Protecting High-PowerLasers with Deep Learning
Jeffrey Kelling,René Gebhardt, Uwe Helbig, Stefan Bock,
Ulrich Schramm, Guido Juckeland
10th October 2017
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz Association
Where am I from?
outside of Dresden, Germany
Jürgen-M. Schulter http://dresden-luftfoto.de
major facilities @ HZDR:radiation source ELBEDresden high magnetic fieldlaboratorycenter for positron emissiontomographyion beam centerhigh-power laser-particleacceleration
about me:member of computationalscience groupbackground in statistical andtheoretical solid state physics
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 1/34
1 Motivation: Perils that high-power lasers face
2 Introduction: Our deep-learning problem
3 A feature-detection–based approach to detect critical states
4 Results: Generalization ability of trained GoogLeNet
5 Outlook: Future approaches
6 Summary and conclusions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 2/34
Motivation: Perils that high-power lasers face
1 Motivation: Perils that high-power lasers face
2 Introduction: Our deep-learning problem
3 A feature-detection–based approach to detect critical states
4 Results: Generalization ability of trained GoogLeNet
5 Outlook: Future approaches
6 Summary and conclusions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 3/34
High-Power Lasers @ HZDR
lasers DRACO and PENELOPE (under construction)up to 150TW and 1 PW beam power, respectivelyfemto-second pulses at 10Hz
applications:investigation of matter in high electric fieldsparticle acceleration...
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 4/34
Aging of Components and Damage Spreading
optical components age due to intense lightdamaged mirrors or lenses diffract light differently
added focal spots may hit other componentsdeposition of too much energy leads to accelerated aging
mirrors and lenses are expensive,non-linear crystals cost even more and are hard to replace
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 5/34
Cross Sections of Unfocussed Beams
the beam can be monitored by cameras behind partiallytransparent mirrorsafter failing of a mirror inhomogeneities in the form of distortedconcentric rings appeardiffraction maxima of these can damage other components
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 6/34
Cross Sections of Unfocussed Beams
the signaling patterns can be identified by humansrecognition and reaction must happen between consecutive pulsesat 10Hz, under 0.1 s
proof of concept for detecting visible signs of broken mirror
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 6/34
Introduction: Our deep-learning problem
1 Motivation: Perils that high-power lasers face
2 Introduction: Our deep-learning problem
3 A feature-detection–based approach to detect critical states
4 Results: Generalization ability of trained GoogLeNet
5 Outlook: Future approaches
6 Summary and conclusions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 7/34
Deep Learning
https://xkcd.com/1838/
key points to settle:what to classify / predict?data
quantitymust be representative ofthe problem
networksize / architechturetrainingability to generalize
( this is a cyle
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 8/34
The Data
problems:1 limited variety of training images—effectively one with features2 similar features may also appear during normal operation) whole-image classification not an option) unsupervised learning for anomaly-detection tricky because even
good images can contain “anomalies”
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 9/34
Training Image Classification with,like, Two Images
... for classification at 10Hz
Jeffrey Kelling,René Gebhardt, Uwe Helbig, Stefan Bock,
Ulrich Schramm, Guido Juckeland
10th October 2017
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz Association
The Network
input
Conv7x7+2(S)
MaxPool3x3+2(S)
LocalRespNorm
Conv1x1+1(V)
Conv3x3+1(S)
LocalRespNorm
MaxPool3x3+2(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
MaxPool3x3+2(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
AveragePool5x5+3(V)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
AveragePool5x5+3(V)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
MaxPool3x3+2(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
Conv1x1+1(S)
MaxPool3x3+1(S)
DepthConcat
Conv3x3+1(S)
Conv5x5+1(S)
Conv1x1+1(S)
AveragePool7x7+1(V)
FC
Conv1x1+1(S)
FC
FC
SoftmaxActivation
softmax0
Conv1x1+1(S)
FC
FC
SoftmaxActivation
softmax1
SoftmaxActivation
softmax2
decided on using GoogLeNet, because:no experience with network design at the timeGoogLeNet1 was proven to be able tolearn features in its lower layers and generalizedesign employs dropout layers to suppress over fitting
counter indications:only about 3 classespatterns not very complex
) smaller network may also do
1C. Szegedy, et al. In Computer Vision and Pattern Recognition (CVPR) (2015).
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 11/34
A feature-detection–based approach to detectcritical states
1 Motivation: Perils that high-power lasers face
2 Introduction: Our deep-learning problem
3 A feature-detection–based approach to detect critical states
4 Results: Generalization ability of trained GoogLeNet
5 Outlook: Future approaches
6 Summary and conclusions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 12/34
Segmentation and Object Localization
insufficient training data forimage segmentation
object localization using slidingwidow computationallyexpensivenot enough data to trainnetwork that proposescandidate regions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 13/34
Region Proposal by Feature Detection
apply band pass filter to detectlarge fluctuationspropose regions around peaks
0 100 200 300 400 500 600-20
-10
0
10
20
y-position [pixels]
inte
nsity
5σ - threshold
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 14/34
Candidate Regions for Classification
candidate regions:at least two separatepatches above 5� orbelow �5� in proximity
square regions (64⇥ 64px)centered around candidatescale down if candidate regionis largerkeep aspect ratio
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 15/34
Heuristics for Feature Classification
classes:true positive, false positive, false positive (edge)heuristics required to classify featureswe have an intuitive understanding of what eachclass looks likedeep-learning was developed for data-driven...
crafting of classifiers anddevelopment of heuristics
) the purpose is to register known pattern andtrigger safety states
human operator makes final decision aboutaction to takeacceptable features can be marked forignoring/monitoring
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 16/34
Interlude
Questions?
1 Motivation: Perils that high-power lasers face
2 Introduction: Our deep-learning problem
3 A feature-detection–based approach to detect critical states
4 Results: Generalization ability of trained GoogLeNet
5 Outlook: Future approaches
6 Summary and conclusions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 17/34
Implementation
for production we use C++... python is good for prototyping and data analysis ...
need reaction time below 100ms, high throughput not sufficient
Caffe2 comes with documented C++ APIprovides program for (multi-)GPU accelerated training,no custom code required for training
OpenCV3 for matrix operations, FFTs, image handlinginteroperable with Caffe
2Jia, Y. et al. arXiv preprint arXiv:1408.5093 (2014) / http://caffe.berkeleyvision.org/
3Bradski, G. Dr. Dobb’s Journal of Software Tools (2000) / http://opencv.org
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 18/34
Training: Data
⇠ 389 regions for training, ⇠ 89 for validationdrawn from all images
equivalent to simple augmentation, at best
no way to get actually independent test datafrom this
using a lower quality dataset for testing
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 19/34
Training: Protocol
K20 GPUs used for trainingstochastic gradient descend parameters:batch size 8initial learning rate 0.01learning rate annealing (�) 0.8
training samples randomly mirroredabout 2000 iterations (batches) to reach steady state(no further reduction in training loss)
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 20/34
Classification Performancethe code is a proof of concept and not optimized,so we do not keep below the 100ms mark, yet
filtering, feature-detection, preprocessing is on CPU, single-threadedinference can be offloaded to GPU by Caffe, using cuDNN
performance on i7-4930K @3.4GHz and GTX Titan Black(Kepler)
filtering (CPU) ⇠ 100msfeature detection (CPU) ⇠ 6msclassification per candidate (CPU) ⇠ 50msclassification per candidate (GPU) ⇠ 12ms
total, using GPU classification . 200ms
filtering and feature-detection can be parallelizedclassification can be batched
speeding up the filtering (FFTs) by ⇠ 3⇥ should suffice
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 21/34
Results: Generalization ability of trainedGoogLeNet
1 Motivation: Perils that high-power lasers face
2 Introduction: Our deep-learning problem
3 A feature-detection–based approach to detect critical states
4 Results: Generalization ability of trained GoogLeNet
5 Outlook: Future approaches
6 Summary and conclusions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 22/34
“Test Data”
data not seen during training nor validation
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 23/34
“Test Data”: Classification
true positive false positive false positive.edge
network trained to recognize oddly-shaped rings, as intended
no statistics given, due to the small amount of available data
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 24/34
Where it fails...
reserving region around one of three features for validation
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 25/34
Where it fails: Priorities
true positive false positive false positive.edge
network fails to choose classification “true positive” over “edge”or fails to recognize feature near edge
) reserving parts of small data sets for verification/testingeasily increases bias of the training set
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 26/34
Problem with the Training Set
0 1 000 2 000 3 000 4 000 5 000
10
�6
10
�5
10
�4
10
�3
10
�2
10
�1
10
0
iterations (batches)
loss
training lossvalidation loss
we know from the test set, there is no over fitting problem) validation set contains feature not represented in the training set
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 27/34
Outlook: Future approaches
1 Motivation: Perils that high-power lasers face
2 Introduction: Our deep-learning problem
3 A feature-detection–based approach to detect critical states
4 Results: Generalization ability of trained GoogLeNet
5 Outlook: Future approaches
6 Summary and conclusions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 28/34
Dust
A tailored solution does not apply to all cases ...
,... detected features barely coincide with dust speckles.Having been trained for broken mirrors before, the network only finds
the classes “false positive” or “edge” here.
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 29/34
Hierarchical Object Localization
object localization using hierarchicalsliding-window approach
classes:one feature, multiple features, no featurestart with large window,split if in class “multiple features”
label images with bounding boxes;label windows automaticallyget more data
different particle arrangementslower particle density, to be closer toreal-live events
smaller network for throughput, if possible) make prior feature-detection obsolete
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 30/34
Anomaly Detection
train (convolutional) autoencoder withminimal latent state
Julien Despois @ medium.com
difference between original and decodedimage could reveal features
training images must not contain anypossibly bad features
) challenging data-acquisition
may still use classifier as second stage) use learned anomaly detection in place of
feature-detection
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 31/34
Summary and conclusions
1 Motivation: Perils that high-power lasers face
2 Introduction: Our deep-learning problem
3 A feature-detection–based approach to detect critical states
4 Results: Generalization ability of trained GoogLeNet
5 Outlook: Future approaches
6 Summary and conclusions
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 32/34
Summary and Conclusions
development of safety feature for pulsed high-power lasersdetection of signs of damaged mirrors to avoid damage spreading
taking advantage of smoothness of beam under normal conditionsto quickly identify regions of interestdeep CNN GoogLeNet delivers reasonable classificationperformance even when trained with little data
still, more data required to reduce bias in datasetsto obtain more reliable and general classifier
problem looks like a candidate for anomaly detection(auto encoders, GAN, ...)
but, “good” data contains anomalies considered bad in other caseshowever, auto encoders may work for region proposal
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 33/34
End
Thank You.
Jeffrey Kelling, René Gebhardt, Uwe Helbig, Stefan Bock, Ulrich Schramm, Guido Juckeland | FWCC | http//www.hzdr.deMember of the Helmholtz AssociationPage 34/34