SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image CompressionMathankumar S
 
Introduction - Lattice-based Cryptography
Introduction - Lattice-based CryptographyIntroduction - Lattice-based Cryptography
Introduction - Lattice-based CryptographyAlexandre Augusto Giron
 
CYBERBULLYING DETECTION USING MACHINE LEARNING-1 (1).pdf
CYBERBULLYING DETECTION USING              MACHINE LEARNING-1 (1).pdfCYBERBULLYING DETECTION USING              MACHINE LEARNING-1 (1).pdf
CYBERBULLYING DETECTION USING MACHINE LEARNING-1 (1).pdfKumbidiGaming
 
Autoencoders
AutoencodersAutoencoders
AutoencodersCloudxLab
 
Automatic Number Plate Recognition (ANPR)
Automatic Number Plate Recognition (ANPR)Automatic Number Plate Recognition (ANPR)
Automatic Number Plate Recognition (ANPR)Vidyut Singhania
 
Lattice Cryptography
Lattice CryptographyLattice Cryptography
Lattice CryptographyPriyanka Aash
 
Image Restoration
Image RestorationImage Restoration
Image RestorationPoonam Seth
 
Introduction to Autoencoders
Introduction to AutoencodersIntroduction to Autoencoders
Introduction to AutoencodersYan Xu
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition pptSantosh Kumar
 
backpropagation in neural networks
backpropagation in neural networksbackpropagation in neural networks
backpropagation in neural networksAkash Goel
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler designMuhammad Haroon
 

What's hot (20)

Generative adversarial text to image synthesis
Generative adversarial text to image synthesisGenerative adversarial text to image synthesis
Generative adversarial text to image synthesis
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
Morphological operations
Morphological operationsMorphological operations
Morphological operations
 
Autoencoder
AutoencoderAutoencoder
Autoencoder
 
Introduction - Lattice-based Cryptography
Introduction - Lattice-based CryptographyIntroduction - Lattice-based Cryptography
Introduction - Lattice-based Cryptography
 
CYBERBULLYING DETECTION USING MACHINE LEARNING-1 (1).pdf
CYBERBULLYING DETECTION USING              MACHINE LEARNING-1 (1).pdfCYBERBULLYING DETECTION USING              MACHINE LEARNING-1 (1).pdf
CYBERBULLYING DETECTION USING MACHINE LEARNING-1 (1).pdf
 
Autoencoders
AutoencodersAutoencoders
Autoencoders
 
Automatic Number Plate Recognition (ANPR)
Automatic Number Plate Recognition (ANPR)Automatic Number Plate Recognition (ANPR)
Automatic Number Plate Recognition (ANPR)
 
Lattice Cryptography
Lattice CryptographyLattice Cryptography
Lattice Cryptography
 
Next word Prediction
Next word PredictionNext word Prediction
Next word Prediction
 
Multi Layer Network
Multi Layer NetworkMulti Layer Network
Multi Layer Network
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Introduction to Autoencoders
Introduction to AutoencodersIntroduction to Autoencoders
Introduction to Autoencoders
 
Deep Neural Networks (DNN)
Deep Neural Networks (DNN)Deep Neural Networks (DNN)
Deep Neural Networks (DNN)
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition ppt
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
Vector quantization
Vector quantizationVector quantization
Vector quantization
 
backpropagation in neural networks
backpropagation in neural networksbackpropagation in neural networks
backpropagation in neural networks
 
Pattern Recognition
Pattern RecognitionPattern Recognition
Pattern Recognition
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler design
 

Similar to Denoising autoencoder by Harish.R

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
 
Getting started with Machine Learning
Getting started with Machine LearningGetting started with Machine Learning
Getting started with Machine LearningGaurav Bhalotia
 

Similar to Denoising autoencoder by Harish.R (20)

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 🚀
 
Getting started with Machine Learning
Getting started with Machine LearningGetting started with Machine Learning
Getting started with Machine Learning
 

Recently uploaded

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 

Recently uploaded (20)

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 

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