Introducing Deep Learning With MATLAB

1y ago
76 Views
6 Downloads
5.35 MB
15 Pages
Last View : Today
Last Download : 3m ago
Upload by : Shaun Edmunds
Transcription

IntroducingDeep Learningwith MATLAB

What is Deep Learning?Deep learning is a type of machine learning in which a model learns toperform classification tasks directly from images, text, or sound. Deeplearning is usually implemented using a neural network architecture. Theterm “deep” refers to the number of layers in the network—the more layers,the deeper the network. Traditional neural networks contain only 2 or 3layers, while deep networks can have hundreds.

Deep Learning ApplicationsHere are just a few examples of deep learning at work:BIBLIOTECA A self-driving vehicle slows down as it approaches apedestrian crosswalk. An ATM rejects a counterfeit bank note.LIBRARY A smartphone app gives an instant translation of a foreignstreet sign.Deep learning is especially well-suited to identificationapplications such as face recognition, text translation,voice recognition, and advanced driver assistance systems,including, lane classification and traffic sign recognition.123CANCEL456CLEAR789ENTER0Introducing Deep Learning with MATLAB3

What Makes Deep Learning State-of-the-Art?In a word, accuracy. Advanced tools and techniques havedramatically improved deep learning algorithms—to the pointwhere they can outperform humans at classifying images, winagainst the world’s best GO player, or enable a voice-controlledassistant like Amazon Echo and Google Home to find anddownload that new song you like.UCLA researchers built an advanced microscope that yieldsa high-dimensional data set used to train a deep learningnetwork to identify cancer cells in tissue samples.Introducing Deep Learning with MATLAB4

What Makes Deep Learning State-of-the-Art?continuedThree technology enablers make this degree ofaccuracy possible:Easy access to massive sets of labeled dataData sets such as ImageNet and PASCAL VoC are freelyavailable, and are useful for training on many different typesof objects.Increased computing powerHigh-performance GPUs accelerate the training of the massiveamounts of data needed for deep learning, reducing trainingtime from weeks to hours.Pretrained models built by expertsModels such as AlexNet can be retrained to perform newrecognition tasks using a technique called transfer learning.While AlexNet was trained on 1.3 million high-resolutionimages to recognize 1000 different objects, accurate transferlearning can be achieved with much smaller datasets.Introducing Deep Learning with MATLAB5

Inside a Deep Neural NetworkA deep neural network combines multiple nonlinear processinglayers, using simple elements operating in parallel and inspired bybiological nervous systems. It consists of an input layer, severalhidden layers, and an output layer. The layers are interconnectedvia nodes, or neurons, with each hidden layer using the output ofthe previous layer as its input.Introducing Deep Learning with MATLAB6

How A Deep Neural Network LearnsLet’s say we have a set of images where each image containsone of four different categories of object, and we want the deeplearning network to automatically recognize which object is ineach image. We label the images in order to have training datafor the network.Using this training data, the network can then start to understandthe object’s specific features and associate them with thecorresponding category.Each layer in the network takes in data from the previouslayer, transforms it, and passes it on. The network increases thecomplexity and detail of what it is learning from layer to layer.Notice that the network learns directly from the data—we have noinfluence over what features are being learned.FILTERSINPUTOUTPUTIntroducing Deep Learning with MATLAB7

About Convolutional Neural NetworksA convolutional neural network (CNN, or ConvNet) is one of themost popular algorithms for deep learning with images and video.Convolution puts the input images through a set of convolutionalfilters, each of which activates certain features from the images.Like other neural networks, a CNN is composed of an input layer,an output layer, and many hidden layers in between.Pooling simplifies the output by performing nonlineardownsampling, reducing the number of parameters that thenetwork needs to learn about.Feature Detection LayersThese layers perform one of three types of operations on the data:convolution, pooling, or rectified linear unit (ReLU).Rectified linear unit (ReLU) allows for faster and more effectivetraining by mapping negative values to zero and maintainingpositive values.These three operations are repeated over tens or hundreds oflayers, with each layer learning to detect different INPUTCONVOLUTION CONVOLUTION RELURELUPOOLINGPOOLINGCONVOLUTIONCONVOLUTION RELURELUFEATUREFEATURE CATIONIntroducing Deep Learning with MATLAB8

About Convolutional Neural Networks continuedClassification LayersAfter feature detection, the architecture of a CNN shifts toclassification.There is no exact formula for selecting layers. The bestapproach is to try a few and see how well they work—or to use a pretrained network.The next-to-last layer is a fully connected layer (FC) that outputsa vector of K dimensions where K is the number of classes thatthe network will be able to predict. This vector contains theprobabilities for each class of any image being classified.The final layer of the CNN architecture uses a softmax functionto provide the classification PUTCONVOLUTION CONVOLUTION RELURELUPOOLINGPOOLINGCONVOLUTIONCONVOLUTION RELURELUFEATUREFEATURE CATIONExplore the architecture of a CNNIntroducing Deep Learning with MATLAB9

What is the Difference Between Deep Learningand Machine Learning?Deep learning is a subtype of machine learning. With machinelearning, you manually extract the relevant features of an image.With deep learning, you feed the raw images directly into a deepneural network that learns the features automatically.CONVOLUTIONAL NEURAL NETWORK (CNN)Deep learning often requires hundreds of thousands or millions ofimages for the best results. It’s also computationally intensive andrequires a high-performance GPU.Machine LearningDeep Learning Good results with smalldata sets Quick to train a model— Requires very large data sets— Need to try differentfeatures and classifiers toachieve best results— Accuracy plateaus Learns features andclassifiers automatically— Computationally intensive Accuracy is unlimitedEND-TO-END LEARNINGFEATURE LEARNING AND CLASSIFICATIONIntroducing Deep Learning with MATLAB10

Getting Started with Deep LearningIf you’re new to deep learning, a quick and easy way to get startedis to use an existing network, such as AlexNet, a CNN trainedon more than a million images. AlexNet is most commonly usedfor image classification. It can classify images into 1000 differentcategories, including keyboards, computer mice, pencils, and otheroffice equipment, as well as various breeds of dogs, cats, horses,and other animals.AlexNet was first published in 2012, and has become awell-known model in the research community.Learn more about pretrained networksIntroducing Deep Learning with MATLAB11

An Example Using AlexNetYou can use AlexNet to classify objects in any image. In thisexample, we’ll use it to classify objects in an image from awebcam installed on a desktop. In addition to MATLAB , we’ll beusing the following: Neural Network Toolbox Support package for using webcams in MATLAB Support package for using AlexNetAfter loading AlexNet we connect to the webcam and capturea live image.camera webcam; % Connect to the camerannet alexnet;Next, we resize the image to 227x227 pixels, the size requiredby AlexNet.picture imresize(picture,[227,227]);% Resize the pictureAlexNet can now classify our image.label classify(nnet, picture);% Classify the pictureimage(picture);% Show the picturetitle(char(label)); % Show the label% Load the neural netpicture camera.snapshot;% Take a pictureWatch how-to video: Deep Learning in 11 Lines of MATLAB CodeIntroducing Deep Learning with MATLAB12

Retraining an Existing NetworkIn the previous example, we used the network straight out of thebox. We didn’t modify it in any way because AlexNet was trainedon images similar to the ones we wanted to classify.To use AlexNet for objects not trained in the original network, wecan retrain it through transfer learning. Transfer learning is anapproach that applies knowledge of one type of problem to adifferent but related problem. In this case, we simply trim off thelast 3 layers of the network and retrain them with our own images.If transfer learning doesn’t suit your application, you mayneed to train your own network from scratch. This methodproduces the most accurate results, but it generally requireshundreds of thousands of labeled images and considerablecomputational resources.Get started with transfer learningIntroducing Deep Learning with MATLAB13

Computational Resources for Deep LearningTraining a deep learning model can take hours, days, or weeks,depending on the size of the data and the amount of processingpower you have available. Selecting a computational resource is acritical consideration when you set up your workflow.Using a GPU reduces network training time from days to hours.You can use a GPU in MATLAB without doing any additionalprogramming. We recommend an NVidia 3.0 compute-capableGPU. Multiple GPUs can speed up processing even more.Currently, there are three computation options: CPU-based, GPUbased, and cloud-based.Cloud-based GPU computation means that you don’t have to buyand set up the hardware yourself. The MATLAB code you write forusing a local GPU can be extended to use cloud resources withjust a few settings changes.CPU-based computation is the simplest and most readily availableoption. The example described in the previous section works ona CPU, but we recommend using CPU-based computation only forsimple examples using a pretrained network.Learn more about deep learning with big data on GPUsIntroducing Deep Learning with MATLAB14

More Deep Learning ResourcesIntroduction to Deep LearningDeep Learning: Top 7 Ways to Get Started with MATLABDeep Learning with MATLAB: Quick-Start VideosStart Deep Learning Faster Using Transfer LearningTransfer Learning Using AlexNetIntroduction to Convolutional Neural NetworksCreate a Simple Deep Learning Network for ClassificationDeep Learning for Computer Vision with MATLABCancer Diagnostics with Deep Learning and Photonic Time Stretch 2017 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarks for a list of additional trademarks.Other product or brand names may be trademarks or registered trademarks of their respective holders.80789v00

Deep Learning: Top 7 Ways to Get Started with MATLAB Deep Learning with MATLAB: Quick-Start Videos Start Deep Learning Faster Using Transfer Learning Transfer Learning Using AlexNet Introduction to Convolutional Neural Networks Create a Simple Deep Learning Network for Classification Deep Learning for Computer Vision with MATLAB

Related Documents:

MATLAB tutorial . School of Engineering . Brown University . To prepare for HW1, do sections 1-11.6 – you can do the rest later as needed . 1. What is MATLAB 2. Starting MATLAB 3. Basic MATLAB windows 4. Using the MATLAB command window 5. MATLAB help 6. MATLAB ‘Live Scripts’ (for algebra, plotting, calculus, and solving differential .

19 MATLAB Excel Add-in Hadoop MATLAB Compiler Standalone Application MATLAB deployment targets MATLAB Compiler enables sharing MATLAB programs without integration programming MATLAB Compiler SDK provides implementation and platform flexibility for software developers MATLAB Production Server provides the most efficient development path for secure and scalable web and enterprise applications

MATLAB tutorial . School of Engineering . Brown University . To prepare for HW1, do sections 1-11.6 – you can do the rest later as needed . 1. What is MATLAB 2. Starting MATLAB 3. Basic MATLAB windows 4. Using the MATLAB command window 5. MATLAB help 6. MATLAB ‘Live Scripts’ (for

3. MATLAB script files 4. MATLAB arrays 5. MATLAB two‐dimensional and three‐dimensional plots 6. MATLAB used‐defined functions I 7. MATLAB relational operators, conditional statements, and selection structures I 8. MATLAB relational operators, conditional statements, and selection structures II 9. MATLAB loops 10. Summary

foundation of basic MATLAB applications in engineering problem solving, the book provides opportunities to explore advanced topics in application of MATLAB as a tool. An introduction to MATLAB basics is presented in Chapter 1. Chapter 1 also presents MATLAB commands. MATLAB is considered as the software of choice. MATLAB can be used .

I. Introduction to Programming Using MATLAB Chapter 1: Introduction to MATLAB 1.1 Getting into MATLAB 1.2 The MATLAB Desktop Environment 1.3 Variables and Assignment Statements 1.4 Expressions 1.5 Characters and Encoding 1.6 Vectors and Matrices Chapter 2: Introduction to MATLAB Programming 2.1 Algorithms 2.2 MATLAB Scripts 2.3 Input and Output

Compiler MATLAB Production Server Standalone Application MATLAB Compiler SDK Apps Files Custom Toolbox Python With MATLAB Users With People Who Do Not Have MATLAB.lib/.dll .exe . Pricing Risk Analytics Portfolio Optimization MATLAB Production Server MATLAB CompilerSDK Web Application

6 Introduction to Linguistic Field Methods :, We have also attempted to address the lack of a comprehensive textbook that p.resents the rudiments of field methodology in all of the major areas of linguistic inquiry. Though a number of books and articles dealing with various aspects offield work already exist esee for example Payne 1951, Longacre 1964, Samarin 1967, Brewster 1982, and other .