SlideShare una empresa de Scribd logo
1 de 24
Denoising Autoencoder
Harish.R
1
Problem Statement
To extract features representation from Denoising
Autoencoder and try to enhance predictive accuracy
in recognizing handwritten digits from MNIST
dataset. The pipeline is following:
 Load, reshape, scale and add noise to data,
 Train DAE on merged training and testing data,
 Get neuron outputs from DAE as new features,
 Train classification algorithm on new features.
2
Motivation
3
 When we study different machine learning
architectures, encoding of data are not significant but
in auto encoders encoding and decoding has
significant rule this made me to work on
understanding and analyzing Autoencoder and
apply on my learning to de noise image
Introduction
 Autoencoders are part of neural network family. The algorithm is
fairly simple as AE require output to be the same as input, so that
we can classify them to unsupervised machine learning
algorithms. The AE compress input data to latent-space
representation and then reconstruct the output. We can divide
algorithm into two subsets:
 Encoder – compressing the input data to lower dimensional
representation sometimes called latent-space representation
 Decoder – decompressing the representation to reconstruct the
input as best as possible
4
Encoder-Decoder architecture
5
Encoder : compresses the input and produces the code.
Decoder: then reconstructs the input only using this
code.
Where Autoencoder is used
 AE are currently used in image or sound compressing and
dimensionality reduction. In specific cases they can provide more
interesting/efficient data projections or other dimensionality
reduction techniques. Moreover, the extension of AE, called
Denoising Autoencoders are used in representation learning,
which uses not only training but also testing data to engineer
features
6
Denoising Autoencoder
 While the main purpose of basic AE is to compress and reduce
dimensionality of data, DAE are used in another practical
application. Imagine a set of low quality images with some noise.
Is it possible to clear these images from noise using machine
learning algorithms.
 In the following example we will show how to clear handwritten
MNIST digits from Gaussian random noise.
7
Constructing of Denosing Autoencoder
To introduce Gaussian random noise we add following code:
 Noise factor controls the noisiness of images and we clip the
values to make sure that the elements of feature vector
representing image are between 0 and 1.
 We use basic neural network to encode 784 input features to 32
neurons with rectifier activation function and then decode it back
to 784 neurons outputting values in range thanks
to sigmoid activation function. The only difference is that the
training is done on noisy input samples:
8
 The results on test data are not satisfying, DAE reconstructed
digit 4 to a digit similar to 9(fourth image from left).
 We could vary around with epochs, batch size other parameters
trying to get better results. So use Convolution Neural Networks
which are successful in image processing area.
9
Convolutional Neural Networks
10
Constructing Convolutional Denoising Autoencoder
 Now, we will merge concept of Denoising Autoencoder with
Convolutional Neural Networks.
The input data for CNN will be represented by matrices, not
vectors as in a standard fully-connected neural network
 After this operation, the dimension of x_train and x_test arrays
is num_samples x 28 x 28 x 1. The last dimension (depth/channel)
is added just because convolutional layers in keras accept 3D
tensors.
11
 Then, we add noise to training and testing data in similar way as
in the previous basic DAE:
 We define CNN architecture with following function:
 The pooling layers in encoder are down sampling the input by
halve using operation.
12
 The up sampling layers in decoder reconstruct the input size.
Finally, the last convolutional layer with sigmoid activation
function outputs decoded image.
 We train the model using 40 epochs and batch size=128. We
have leaky rectifier is used to fix limitations of standard rectifier.
The standard rectifier sometimes causes a neuron unit to stay
zero and be never activated in the next gradient descent
iterations. The leaky rectifier solves that problem with the
activation function .
13
 The outputs of Convolutional Denoising Autoencoder on test data
are much better than previously:
14
Implementation
 We will extract features representation from Denoising
Autoencoder and try to enhance predictive accuracy in
recognizing handwritten digits from MNIST dataset. The pipeline
is following:
 Load, reshape, scale and add noise to data,
 Train DAE on merged training and testing data,
 Get neuron outputs from DAE as new features,
 Train classification algorithm on new features.
15
 We import libraries, load and preprocess data.
 Autoencoders belong to unsupervised machine learning
algorithms, in which we do not care about labels in the data and
we can use both training and testing data in Representation
Learning.
 Then, we define architecture of Denoising Autoencoder. Let’s
keep it simple and instead Convolutional Neural Networks, we
use deep network with 3 hidden layers, each containing 1024
neurons. We use rectifier as activation function and sigmoid in
output layer to produce pixel values in range .
16
 We train the Denoising Autoencoder with 40 epochs and
batch_size=128. The validation_data argument to monitor
validation loss is not provided, thus we may need to be careful not
to overfit the Autoencoder. On the other hand, if we are using
both training and testing data that are good representation of
population data, the chances of overfitting are smaller.
 Next step will be to extract features from pretrained Autoencoder.
As mentioned earlier, we are taking outputs of neurons located in
all hidden layers (encoder, bottleneck and decoder layers) as new
representation of the data.
17
 Note, that the noisy data was used only during Autoencoder
training to improve quality of representation. Clean version of
training and testing data is passed through the Autoencoder
network to produce new representations features
train and features test , respectively. These representations have
higher dimensionality 1024+1024+1024=3072 > 784 than training
data, allowing to encode more information. Moreover, the
Autoencoder automatically decided for us which features are
important, because it was trained with the goal to reconstruct the
input as best as possible.
 We use these representations in classification task of recognizing
handwritten digits. We can use new features in any classification
algorithm (random forests, support vector machines)
18
 There are ten possible classes to predict (digits from
0 to 9) and we produce one hot encoding for labels
with np_utils.to_categorical function.
 We train model with 20 epochs and
batch_size=128. Model Checkpoint callback is used
to monitor validation accuracy after each epoch and
save the model with best performance.
19
The Denoising Autoencoder fits nicely to the data:
20
21
22
 Just after first epoch our validation accuracy is
99.3%! Eventually, we end up with 99.71% accuracy,
in comparison to the same model architecture, but
with original features it is 99.5% accuracy. Obviously,
MNIST dataset used for presentation purposes is
relatively simple and in more complex cases the gain
could be higher.
23
Conclusions
 In this we constructed Denoising Autoencoders with
Convolutional Neural Networks and learned the purpose and
implementation of Representation Learning with Denoising
Autoencoders.
24

Más contenido relacionado

La actualidad más candente

Feed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descentFeed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descentMuhammad Rasel
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networksSi Haem
 
Image segmentation with deep learning
Image segmentation with deep learningImage segmentation with deep learning
Image segmentation with deep learningAntonio Rueda-Toicen
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsKasun Chinthaka Piyarathna
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning TutorialAmr Rashed
 
Support Vector Machines
Support Vector MachinesSupport Vector Machines
Support Vector Machinesnextlib
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Gaurav Mittal
 
An Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial IntelligenceAn Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial IntelligenceWasif Altaf
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersKarthika Ramachandran
 
Image Captioning Generator using Deep Machine Learning
Image Captioning Generator using Deep Machine LearningImage Captioning Generator using Deep Machine Learning
Image Captioning Generator using Deep Machine Learningijtsrd
 
Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Marina Santini
 
Overview of Convolutional Neural Networks
Overview of Convolutional Neural NetworksOverview of Convolutional Neural Networks
Overview of Convolutional Neural Networksananth
 
Mc Culloch Pitts Neuron
Mc Culloch Pitts NeuronMc Culloch Pitts Neuron
Mc Culloch Pitts NeuronShajun Nisha
 
Support Vector Machines- SVM
Support Vector Machines- SVMSupport Vector Machines- SVM
Support Vector Machines- SVMCarlo Carandang
 
Machine Learning presentation.
Machine Learning presentation.Machine Learning presentation.
Machine Learning presentation.butest
 
Point processing
Point processingPoint processing
Point processingpanupriyaa7
 

La actualidad más candente (20)

Feed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descentFeed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descent
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networks
 
Multi Layer Network
Multi Layer NetworkMulti Layer Network
Multi Layer Network
 
Image segmentation with deep learning
Image segmentation with deep learningImage segmentation with deep learning
Image segmentation with deep learning
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its Applications
 
Cnn
CnnCnn
Cnn
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning Tutorial
 
Support Vector Machines
Support Vector MachinesSupport Vector Machines
Support Vector Machines
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
 
An Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial IntelligenceAn Introduction to Image Processing and Artificial Intelligence
An Introduction to Image Processing and Artificial Intelligence
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
 
Image Captioning Generator using Deep Machine Learning
Image Captioning Generator using Deep Machine LearningImage Captioning Generator using Deep Machine Learning
Image Captioning Generator using Deep Machine Learning
 
Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?
 
Cnn
CnnCnn
Cnn
 
point operations in image processing
point operations in image processingpoint operations in image processing
point operations in image processing
 
Overview of Convolutional Neural Networks
Overview of Convolutional Neural NetworksOverview of Convolutional Neural Networks
Overview of Convolutional Neural Networks
 
Mc Culloch Pitts Neuron
Mc Culloch Pitts NeuronMc Culloch Pitts Neuron
Mc Culloch Pitts Neuron
 
Support Vector Machines- SVM
Support Vector Machines- SVMSupport Vector Machines- SVM
Support Vector Machines- SVM
 
Machine Learning presentation.
Machine Learning presentation.Machine Learning presentation.
Machine Learning presentation.
 
Point processing
Point processingPoint processing
Point processing
 

Similar a Denoising autoencoder by Harish.R

Digit recognition using neural network
Digit recognition using neural networkDigit recognition using neural network
Digit recognition using neural networkshachibattar
 
House price prediction
House price predictionHouse price prediction
House price predictionSabahBegum
 
Build a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowBuild a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowDebasisMohanty37
 
NeuralProcessingofGeneralPurposeApproximatePrograms
NeuralProcessingofGeneralPurposeApproximateProgramsNeuralProcessingofGeneralPurposeApproximatePrograms
NeuralProcessingofGeneralPurposeApproximateProgramsMohid Nabil
 
Towards neuralprocessingofgeneralpurposeapproximateprograms
Towards neuralprocessingofgeneralpurposeapproximateprogramsTowards neuralprocessingofgeneralpurposeapproximateprograms
Towards neuralprocessingofgeneralpurposeapproximateprogramsParidha Saxena
 
IRJET - Hand Gesture Recognition to Perform System Operations
IRJET -  	  Hand Gesture Recognition to Perform System OperationsIRJET -  	  Hand Gesture Recognition to Perform System Operations
IRJET - Hand Gesture Recognition to Perform System OperationsIRJET Journal
 
Deep Learning with Apache Spark: an Introduction
Deep Learning with Apache Spark: an IntroductionDeep Learning with Apache Spark: an Introduction
Deep Learning with Apache Spark: an IntroductionEmanuele Bezzi
 
Unsupervised Feature Learning
Unsupervised Feature LearningUnsupervised Feature Learning
Unsupervised Feature LearningAmgad Muhammad
 
Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117Ganesan Narayanasamy
 
Faster Training Algorithms in Neural Network Based Approach For Handwritten T...
Faster Training Algorithms in Neural Network Based Approach For Handwritten T...Faster Training Algorithms in Neural Network Based Approach For Handwritten T...
Faster Training Algorithms in Neural Network Based Approach For Handwritten T...CSCJournals
 
Presentation on BornoNet Research Paper and Python Basics
Presentation on BornoNet Research Paper and Python BasicsPresentation on BornoNet Research Paper and Python Basics
Presentation on BornoNet Research Paper and Python BasicsShibbir Ahmed
 
IMPROVEMENT IN IMAGE DENOISING OF HANDWRITTEN DIGITS USING AUTOENCODERS IN DE...
IMPROVEMENT IN IMAGE DENOISING OF HANDWRITTEN DIGITS USING AUTOENCODERS IN DE...IMPROVEMENT IN IMAGE DENOISING OF HANDWRITTEN DIGITS USING AUTOENCODERS IN DE...
IMPROVEMENT IN IMAGE DENOISING OF HANDWRITTEN DIGITS USING AUTOENCODERS IN DE...IRJET Journal
 
MachinaFiesta: A Vision into Machine Learning 🚀
MachinaFiesta: A Vision into Machine Learning 🚀MachinaFiesta: A Vision into Machine Learning 🚀
MachinaFiesta: A Vision into Machine Learning 🚀GDSCNiT
 

Similar a Denoising autoencoder by Harish.R (20)

Digit recognition using neural network
Digit recognition using neural networkDigit recognition using neural network
Digit recognition using neural network
 
House price prediction
House price predictionHouse price prediction
House price prediction
 
False colouring
False colouringFalse colouring
False colouring
 
Build a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flowBuild a simple image recognition system with tensor flow
Build a simple image recognition system with tensor flow
 
NeuralProcessingofGeneralPurposeApproximatePrograms
NeuralProcessingofGeneralPurposeApproximateProgramsNeuralProcessingofGeneralPurposeApproximatePrograms
NeuralProcessingofGeneralPurposeApproximatePrograms
 
Towards neuralprocessingofgeneralpurposeapproximateprograms
Towards neuralprocessingofgeneralpurposeapproximateprogramsTowards neuralprocessingofgeneralpurposeapproximateprograms
Towards neuralprocessingofgeneralpurposeapproximateprograms
 
UNIT-4.pdf
UNIT-4.pdfUNIT-4.pdf
UNIT-4.pdf
 
UNIT-4.pdf
UNIT-4.pdfUNIT-4.pdf
UNIT-4.pdf
 
UNIT-4.pptx
UNIT-4.pptxUNIT-4.pptx
UNIT-4.pptx
 
Som paper1.doc
Som paper1.docSom paper1.doc
Som paper1.doc
 
IRJET - Hand Gesture Recognition to Perform System Operations
IRJET -  	  Hand Gesture Recognition to Perform System OperationsIRJET -  	  Hand Gesture Recognition to Perform System Operations
IRJET - Hand Gesture Recognition to Perform System Operations
 
Assignment-1-NF.docx
Assignment-1-NF.docxAssignment-1-NF.docx
Assignment-1-NF.docx
 
Deep Learning with Apache Spark: an Introduction
Deep Learning with Apache Spark: an IntroductionDeep Learning with Apache Spark: an Introduction
Deep Learning with Apache Spark: an Introduction
 
Unsupervised Feature Learning
Unsupervised Feature LearningUnsupervised Feature Learning
Unsupervised Feature Learning
 
Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117Power ai tensorflowworkloadtutorial-20171117
Power ai tensorflowworkloadtutorial-20171117
 
Faster Training Algorithms in Neural Network Based Approach For Handwritten T...
Faster Training Algorithms in Neural Network Based Approach For Handwritten T...Faster Training Algorithms in Neural Network Based Approach For Handwritten T...
Faster Training Algorithms in Neural Network Based Approach For Handwritten T...
 
Deep learning-practical
Deep learning-practicalDeep learning-practical
Deep learning-practical
 
Presentation on BornoNet Research Paper and Python Basics
Presentation on BornoNet Research Paper and Python BasicsPresentation on BornoNet Research Paper and Python Basics
Presentation on BornoNet Research Paper and Python Basics
 
IMPROVEMENT IN IMAGE DENOISING OF HANDWRITTEN DIGITS USING AUTOENCODERS IN DE...
IMPROVEMENT IN IMAGE DENOISING OF HANDWRITTEN DIGITS USING AUTOENCODERS IN DE...IMPROVEMENT IN IMAGE DENOISING OF HANDWRITTEN DIGITS USING AUTOENCODERS IN DE...
IMPROVEMENT IN IMAGE DENOISING OF HANDWRITTEN DIGITS USING AUTOENCODERS IN DE...
 
MachinaFiesta: A Vision into Machine Learning 🚀
MachinaFiesta: A Vision into Machine Learning 🚀MachinaFiesta: A Vision into Machine Learning 🚀
MachinaFiesta: A Vision into Machine Learning 🚀
 

Último

『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSsandhya757531
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESkarthi keyan
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfisabel213075
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmDeepika Walanjkar
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodManicka Mamallan Andavar
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solidnamansinghjarodiya
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTSneha Padhiar
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfPaper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfNainaShrivastava14
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHSneha Padhiar
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
signals in triangulation .. ...Surveying
signals in triangulation .. ...Surveyingsignals in triangulation .. ...Surveying
signals in triangulation .. ...Surveyingsapna80328
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 

Último (20)

『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument method
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solid
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdfPaper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
signals in triangulation .. ...Surveying
signals in triangulation .. ...Surveyingsignals in triangulation .. ...Surveying
signals in triangulation .. ...Surveying
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 

Denoising autoencoder by Harish.R

  • 2. Problem Statement To extract features representation from Denoising Autoencoder and try to enhance predictive accuracy in recognizing handwritten digits from MNIST dataset. The pipeline is following:  Load, reshape, scale and add noise to data,  Train DAE on merged training and testing data,  Get neuron outputs from DAE as new features,  Train classification algorithm on new features. 2
  • 3. Motivation 3  When we study different machine learning architectures, encoding of data are not significant but in auto encoders encoding and decoding has significant rule this made me to work on understanding and analyzing Autoencoder and apply on my learning to de noise image
  • 4. Introduction  Autoencoders are part of neural network family. The algorithm is fairly simple as AE require output to be the same as input, so that we can classify them to unsupervised machine learning algorithms. The AE compress input data to latent-space representation and then reconstruct the output. We can divide algorithm into two subsets:  Encoder – compressing the input data to lower dimensional representation sometimes called latent-space representation  Decoder – decompressing the representation to reconstruct the input as best as possible 4
  • 5. Encoder-Decoder architecture 5 Encoder : compresses the input and produces the code. Decoder: then reconstructs the input only using this code.
  • 6. Where Autoencoder is used  AE are currently used in image or sound compressing and dimensionality reduction. In specific cases they can provide more interesting/efficient data projections or other dimensionality reduction techniques. Moreover, the extension of AE, called Denoising Autoencoders are used in representation learning, which uses not only training but also testing data to engineer features 6
  • 7. Denoising Autoencoder  While the main purpose of basic AE is to compress and reduce dimensionality of data, DAE are used in another practical application. Imagine a set of low quality images with some noise. Is it possible to clear these images from noise using machine learning algorithms.  In the following example we will show how to clear handwritten MNIST digits from Gaussian random noise. 7
  • 8. Constructing of Denosing Autoencoder To introduce Gaussian random noise we add following code:  Noise factor controls the noisiness of images and we clip the values to make sure that the elements of feature vector representing image are between 0 and 1.  We use basic neural network to encode 784 input features to 32 neurons with rectifier activation function and then decode it back to 784 neurons outputting values in range thanks to sigmoid activation function. The only difference is that the training is done on noisy input samples: 8
  • 9.  The results on test data are not satisfying, DAE reconstructed digit 4 to a digit similar to 9(fourth image from left).  We could vary around with epochs, batch size other parameters trying to get better results. So use Convolution Neural Networks which are successful in image processing area. 9
  • 11. Constructing Convolutional Denoising Autoencoder  Now, we will merge concept of Denoising Autoencoder with Convolutional Neural Networks. The input data for CNN will be represented by matrices, not vectors as in a standard fully-connected neural network  After this operation, the dimension of x_train and x_test arrays is num_samples x 28 x 28 x 1. The last dimension (depth/channel) is added just because convolutional layers in keras accept 3D tensors. 11
  • 12.  Then, we add noise to training and testing data in similar way as in the previous basic DAE:  We define CNN architecture with following function:  The pooling layers in encoder are down sampling the input by halve using operation. 12
  • 13.  The up sampling layers in decoder reconstruct the input size. Finally, the last convolutional layer with sigmoid activation function outputs decoded image.  We train the model using 40 epochs and batch size=128. We have leaky rectifier is used to fix limitations of standard rectifier. The standard rectifier sometimes causes a neuron unit to stay zero and be never activated in the next gradient descent iterations. The leaky rectifier solves that problem with the activation function . 13
  • 14.  The outputs of Convolutional Denoising Autoencoder on test data are much better than previously: 14
  • 15. Implementation  We will extract features representation from Denoising Autoencoder and try to enhance predictive accuracy in recognizing handwritten digits from MNIST dataset. The pipeline is following:  Load, reshape, scale and add noise to data,  Train DAE on merged training and testing data,  Get neuron outputs from DAE as new features,  Train classification algorithm on new features. 15
  • 16.  We import libraries, load and preprocess data.  Autoencoders belong to unsupervised machine learning algorithms, in which we do not care about labels in the data and we can use both training and testing data in Representation Learning.  Then, we define architecture of Denoising Autoencoder. Let’s keep it simple and instead Convolutional Neural Networks, we use deep network with 3 hidden layers, each containing 1024 neurons. We use rectifier as activation function and sigmoid in output layer to produce pixel values in range . 16
  • 17.  We train the Denoising Autoencoder with 40 epochs and batch_size=128. The validation_data argument to monitor validation loss is not provided, thus we may need to be careful not to overfit the Autoencoder. On the other hand, if we are using both training and testing data that are good representation of population data, the chances of overfitting are smaller.  Next step will be to extract features from pretrained Autoencoder. As mentioned earlier, we are taking outputs of neurons located in all hidden layers (encoder, bottleneck and decoder layers) as new representation of the data. 17
  • 18.  Note, that the noisy data was used only during Autoencoder training to improve quality of representation. Clean version of training and testing data is passed through the Autoencoder network to produce new representations features train and features test , respectively. These representations have higher dimensionality 1024+1024+1024=3072 > 784 than training data, allowing to encode more information. Moreover, the Autoencoder automatically decided for us which features are important, because it was trained with the goal to reconstruct the input as best as possible.  We use these representations in classification task of recognizing handwritten digits. We can use new features in any classification algorithm (random forests, support vector machines) 18
  • 19.  There are ten possible classes to predict (digits from 0 to 9) and we produce one hot encoding for labels with np_utils.to_categorical function.  We train model with 20 epochs and batch_size=128. Model Checkpoint callback is used to monitor validation accuracy after each epoch and save the model with best performance. 19
  • 20. The Denoising Autoencoder fits nicely to the data: 20
  • 21. 21
  • 22. 22
  • 23.  Just after first epoch our validation accuracy is 99.3%! Eventually, we end up with 99.71% accuracy, in comparison to the same model architecture, but with original features it is 99.5% accuracy. Obviously, MNIST dataset used for presentation purposes is relatively simple and in more complex cases the gain could be higher. 23
  • 24. Conclusions  In this we constructed Denoising Autoencoders with Convolutional Neural Networks and learned the purpose and implementation of Representation Learning with Denoising Autoencoders. 24