SlideShare a Scribd company logo
1 of 41
BRAIN TUMOR DETECTION
Using Deep Convolutional Neural
Network
Why CNN??
The Convolutional Neural Network (CNN or
ConvNet) is a subtype of Neural Networks that
is mainly used for applications in image and
speech recognition.
Its built-in convolutional layer reduces the high
dimensionality of images without losing its
information. That is why CNNs are especially
suited for this use case.
How?? (Logic)
● What is brain tumor?
How??(Continued…)
Steps involved:
● Preprocessing:
○ Image resize
○ Augmentation
○ Normalisation
● Model building using keras and python
● Train/Test Split
● Classification
How??(Flow)
VGG Net
● It is a classical CNN architecture developed to increase the depth of CNN’s to
increase the models performance.
● VGG stands for Visual Geometry Group is a deep CNN model with multiple
layers,has about 16 or 19 layers.
● It is a convolutional neural network model proposed by A. Zisserman and K.
Simonyan from the University of Oxford
● The VGG16 model achieves almost 92.7% top-5 test accuracy in
ImageNet.(ImageNet is a dataset consisting of more than 14 million images
belonging to nearly 1000 classes.
VGG Architecture:
● It has 16 layers(13 are convolutional layers
and 3 fully connected layers).
● Input: takes an image input size of 224 by
224.
● Convolutional Layers: uses a 3 by 3 filter
and a stride size of 1 and it is followed by
RELU unit which is rectified linear unit
activation function.
● Hidden Layers: all the hidden layers in
VGG use RELU.
● Fully Connected Layers: There are 3 fully
connected layers,the first two have 4096
channels each, and the third has 1000
channels, 1 for each class.
● There are a few convolution layers in this architecture
followed by a pooling layer that reduces the height and the
width (reducing volume).
● VGG16 focuses on 3x3 filter convolution layers with stride 1
and always utilizes the same padding and MaxPool layer of a
2x2 filter with stride 2.
● If we look at the number of filters that we can use, around 64
filters are available that we can double to about 128 and then
to 256 filters. In the last layers, we can use 512 filters.
VGG 19:
● VGG19 model (also VGGNet-19) is the same as
the VGG16 except that it has 19 layers.
● The “16” and “19” stand for the number of weight
layers in the model (convolutional layers).
● This means that VGG19 has three more
convolutional layers than VGG16.
VGG 16 vs VGG 19
VGG 16 VGG 19
● 16 Layers ● 19 Layers
● Has less Weight. ● Has more Weight
● The size of the “VGG-16” network in
terms of fully connected nodes is 533
MB
● The size of the “VGG-16” network in
terms of fully connected nodes is 574 MB
Advantage of VGG 19 over VGG 16
● The main advantage of VGG19 over VGG16 is that it has more layers, which enables it to learn more
complex representations of the data.
● VGG19 is more accurate than VGG16
In Conclusion:
● VGG16 and VGG19 are both convolutional neural networks developed by the Visual Geometry Group (VGG)
at the University of Oxford, both are trained for image classification tasks.
● The main difference between them is the number of layers, VGG16 is a 16-layer CNN, while VGG19 is a 19-
layer CNN,
● VGG19 is more accurate than VGG16
DATA
AUGMENTATION
Artificially increasing the training
set by creating modified copies of
a dataset using existing data.
Includes making minor changes
to the dataset or using deep
learning to generate new data
points.
AUGMENTED DATA
It is driven from original data with
some minor changes to increase the
size and diversity of the training
set.
It is generated artificially without
using the original dataset. It often
uses DNNs (Deep Neural
Networks) and GANs (Generative
Adversarial Networks) to
generate synthetic data.
SYNTHETIC DATA
WHY SHOULD WE USE DATA AUGMENTATION ??
➢ To prevent models from overfitting.
➢ The initial training set is too small.
➢ To improve the model accuracy.
➢ To Reduce the operational cost of labeling and cleaning the raw dataset.
➢ Increases generalization ability of the models.
➢ Helps to resolve class imbalance issues in classification.
LIMITATIONS OF DATA AUGMENTATION
➢ The biases in the original dataset persist in the augmented data.
➢ Quality assurance for data augmentation is expensive.
➢ Research and development are required to build a system with advanced
applications. For example, generating high-resolution images using
GANs can be challenging.
➢ Finding an effective data augmentation approach can be challenging.
DATA AUGMENTATION
TECHNIQUES
AUDIO DATA
AUGMENTATION
➢ Noise injection: add
gaussian or random noise
➢ Shifting: shift audio left (fast
forward) or right with
random seconds.
➢ Changing the speed:
stretches times series by a
fixed rate.
➢ Changing the pitch:
randomly change the pitch of
the audio.
TEXT DATA
AUGMENTATION
➢ Word or sentence shuffling
➢ Word replacement
➢ Syntax-tree manipulation
➢ Random word insertion
➢ Random word deletion
IMAGE AUGMENTATION
➢ Geometric transformations : randomly flip, crop, rotate, stretch,
and zoom images.
➢ Color space transformations : randomly change RGB color
channels, contrast, saturation and brightness.
➢ Kernel filters: randomly change the sharpness or blurring of the
image.
➢ Random erasing: delete some part of the initial image.
➢ Mixing images: blending and mixing multiple images.
ADVANCED TECHNIQUES
Adversarial Training
based Augmentation
The objective is to transform the
images to deceive a deep-learning
model.
The method learns to generate
masks which when applied to the
input image, generated different
augmented images.
GAN based
Augmentation Synthesize images for data
augmentation
Generator is to generate fake
images from the latent space and
the goal of the discriminator is to
distinguish the synthetic fake
images from the real images
Neural Style Transfer
based Augmentation Deep Neural Networks are
trained to extract the content(high
level features) from one image
and style(low level features) from
another image and compose the
augmented image using the
extracted content and style.
Data Augmentation
in Medical field
Points to remember
➢ Image quality
➢ Tumor location and size
➢ Class imbalance
➢ Validation and evaluation
IMPLEMENTATION
1. Import Libraries
➢ Tensorflow
➢ Keras
➢ Sklearn
➢ Numpy
➢ Matplotlib
2. Data Preparation and Preprocessing
➢ Convert the image to grayscale, and blur it slightly
➢ Threshold the image, then perform a series of erosions and dilations to
remove any small regions of noise
➢ Crop new image out of the original image using the four extreme points
(left, right, top, bottom)
Data Augmentation
DATA SUMMARY
3. Load the data
➢ Read the image.
➢ Crop the part of the image representing only the brain.
➢ Resize the image
➢ Apply normalization because we want pixel values to be scaled to the
range 0-1.
➢ Append the image to X and its label to y
➢ Shuffle X and y
Sample images plot
4. Split the data
Split X and y into training, validation (development) and validation sets.
➢ 70% of the data for training.
➢ 15% of the data for validation.
➢ 15% of the data for testing.
5. Build the model
➢ Load the VGG16 model, pretrained on ImageNet
➢ Freeze the layers in the base model so that they are not trainable
➢ Create a new model that includes the VGG16 base model and additional layers for
classification
Model Summary
Compile the model
6. Train the model
Epoch Details
7. Evaluate the best model on training data
➢ Load the model
➢ Calculate the loss and accuracy of the model
Loss Accuracy
The model at the 9th iteration has validation accuracy of 97%
Dataset Link: https://www.kaggle.com/code/mdmosarrofhossen/brain-tumor-detection-accuracy-100-val-acc-
100/input
Code : https://github.com/arunbh-rdwaj/Project
References:

More Related Content

What's hot

Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Universitat Politècnica de Catalunya
 

What's hot (20)

Application of-image-segmentation-in-brain-tumor-detection
Application of-image-segmentation-in-brain-tumor-detectionApplication of-image-segmentation-in-brain-tumor-detection
Application of-image-segmentation-in-brain-tumor-detection
 
Image classification with Deep Neural Networks
Image classification with Deep Neural NetworksImage classification with Deep Neural Networks
Image classification with Deep Neural Networks
 
MULTI-CLASSIFICATION OF BRAIN TUMOR IMAGES USING DEEP NEURAL NETWORK
MULTI-CLASSIFICATION OF BRAIN TUMOR IMAGES USING DEEP NEURAL NETWORKMULTI-CLASSIFICATION OF BRAIN TUMOR IMAGES USING DEEP NEURAL NETWORK
MULTI-CLASSIFICATION OF BRAIN TUMOR IMAGES USING DEEP NEURAL NETWORK
 
Brain Tumor Detection using CNN
Brain Tumor Detection using CNNBrain Tumor Detection using CNN
Brain Tumor Detection using CNN
 
Brain Tumor Segmentation in MRI Images
Brain Tumor Segmentation in MRI ImagesBrain Tumor Segmentation in MRI Images
Brain Tumor Segmentation in MRI Images
 
BRAIN TUMOR MRI IMAGE SEGMENTATION AND DETECTION IN IMAGE PROCESSING
BRAIN TUMOR MRI IMAGE SEGMENTATION AND DETECTION IN IMAGE PROCESSINGBRAIN TUMOR MRI IMAGE SEGMENTATION AND DETECTION IN IMAGE PROCESSING
BRAIN TUMOR MRI IMAGE SEGMENTATION AND DETECTION IN IMAGE PROCESSING
 
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
Skin Lesion Detection from Dermoscopic Images using Convolutional Neural Netw...
 
Image classification using CNN
Image classification using CNNImage classification using CNN
Image classification using CNN
 
Image classification using cnn
Image classification using cnnImage classification using cnn
Image classification using cnn
 
Machine Learning - Convolutional Neural Network
Machine Learning - Convolutional Neural NetworkMachine Learning - Convolutional Neural Network
Machine Learning - Convolutional Neural Network
 
deep learning applications in medical image analysis brain tumor
deep learning applications in medical image analysis brain tumordeep learning applications in medical image analysis brain tumor
deep learning applications in medical image analysis brain tumor
 
Brain tumor detection by scanning MRI images (using filtering techniques)
Brain tumor detection by scanning MRI images (using filtering techniques)Brain tumor detection by scanning MRI images (using filtering techniques)
Brain tumor detection by scanning MRI images (using filtering techniques)
 
GANs Presentation.pptx
GANs Presentation.pptxGANs Presentation.pptx
GANs Presentation.pptx
 
Ghaziabad, India - Early Detection of Various Types of Skin Cancer Using Deep...
Ghaziabad, India - Early Detection of Various Types of Skin Cancer Using Deep...Ghaziabad, India - Early Detection of Various Types of Skin Cancer Using Deep...
Ghaziabad, India - Early Detection of Various Types of Skin Cancer Using Deep...
 
Deep learning for medical imaging
Deep learning for medical imagingDeep learning for medical imaging
Deep learning for medical imaging
 
Neural Network Based Brain Tumor Detection using MR Images
Neural Network Based Brain Tumor Detection using MR ImagesNeural Network Based Brain Tumor Detection using MR Images
Neural Network Based Brain Tumor Detection using MR Images
 
U-Net (1).pptx
U-Net (1).pptxU-Net (1).pptx
U-Net (1).pptx
 
Image classification using convolutional neural network
Image classification using convolutional neural networkImage classification using convolutional neural network
Image classification using convolutional neural network
 
Final ppt
Final pptFinal ppt
Final ppt
 
Report (1)
Report (1)Report (1)
Report (1)
 

Similar to Brain Tumour Detection.pptx

NMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptxNMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptx
LEGENDARYTECHNICAL
 
NMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptxNMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptx
LEGENDARYTECHNICAL
 
PR-330: How To Train Your ViT? Data, Augmentation, and Regularization in Visi...
PR-330: How To Train Your ViT? Data, Augmentation, and Regularization in Visi...PR-330: How To Train Your ViT? Data, Augmentation, and Regularization in Visi...
PR-330: How To Train Your ViT? Data, Augmentation, and Regularization in Visi...
Jinwon Lee
 

Similar to Brain Tumour Detection.pptx (20)

Decomposing image generation into layout priction and conditional synthesis
Decomposing image generation into layout priction and conditional synthesisDecomposing image generation into layout priction and conditional synthesis
Decomposing image generation into layout priction and conditional synthesis
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
Ai based glaucoma detection using deep learning
Ai based glaucoma detection using deep learningAi based glaucoma detection using deep learning
Ai based glaucoma detection using deep learning
 
NMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptxNMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptx
 
Image colorization
Image colorizationImage colorization
Image colorization
 
Image colorization
Image colorizationImage colorization
Image colorization
 
DigitRecognition.pptx
DigitRecognition.pptxDigitRecognition.pptx
DigitRecognition.pptx
 
Accelerating stochastic gradient descent using adaptive mini batch size3
Accelerating stochastic gradient descent using adaptive mini batch size3Accelerating stochastic gradient descent using adaptive mini batch size3
Accelerating stochastic gradient descent using adaptive mini batch size3
 
Waste Classification System using Convolutional Neural Networks.pptx
Waste Classification System using Convolutional Neural Networks.pptxWaste Classification System using Convolutional Neural Networks.pptx
Waste Classification System using Convolutional Neural Networks.pptx
 
NMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptxNMO IE-2 Activity Presentation.pptx
NMO IE-2 Activity Presentation.pptx
 
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
 
Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation
 
artificial neural network
artificial neural networkartificial neural network
artificial neural network
 
Image Classification using deep learning
Image Classification using deep learning Image Classification using deep learning
Image Classification using deep learning
 
Finding the best solution for Image Processing
Finding the best solution for Image ProcessingFinding the best solution for Image Processing
Finding the best solution for Image Processing
 
PR-330: How To Train Your ViT? Data, Augmentation, and Regularization in Visi...
PR-330: How To Train Your ViT? Data, Augmentation, and Regularization in Visi...PR-330: How To Train Your ViT? Data, Augmentation, and Regularization in Visi...
PR-330: How To Train Your ViT? Data, Augmentation, and Regularization in Visi...
 
KaoNet: Face Recognition and Generation App using Deep Learning
KaoNet: Face Recognition and Generation App using Deep LearningKaoNet: Face Recognition and Generation App using Deep Learning
KaoNet: Face Recognition and Generation App using Deep Learning
 
Semantic Segmentation on Satellite Imagery
Semantic Segmentation on Satellite ImagerySemantic Segmentation on Satellite Imagery
Semantic Segmentation on Satellite Imagery
 
Computer Vision.pptx
Computer Vision.pptxComputer Vision.pptx
Computer Vision.pptx
 
Deep learning for image video processing
Deep learning for image video processingDeep learning for image video processing
Deep learning for image video processing
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

Brain Tumour Detection.pptx

  • 1. BRAIN TUMOR DETECTION Using Deep Convolutional Neural Network
  • 2. Why CNN?? The Convolutional Neural Network (CNN or ConvNet) is a subtype of Neural Networks that is mainly used for applications in image and speech recognition. Its built-in convolutional layer reduces the high dimensionality of images without losing its information. That is why CNNs are especially suited for this use case.
  • 3. How?? (Logic) ● What is brain tumor?
  • 4. How??(Continued…) Steps involved: ● Preprocessing: ○ Image resize ○ Augmentation ○ Normalisation ● Model building using keras and python ● Train/Test Split ● Classification
  • 6. VGG Net ● It is a classical CNN architecture developed to increase the depth of CNN’s to increase the models performance. ● VGG stands for Visual Geometry Group is a deep CNN model with multiple layers,has about 16 or 19 layers. ● It is a convolutional neural network model proposed by A. Zisserman and K. Simonyan from the University of Oxford ● The VGG16 model achieves almost 92.7% top-5 test accuracy in ImageNet.(ImageNet is a dataset consisting of more than 14 million images belonging to nearly 1000 classes.
  • 7. VGG Architecture: ● It has 16 layers(13 are convolutional layers and 3 fully connected layers). ● Input: takes an image input size of 224 by 224. ● Convolutional Layers: uses a 3 by 3 filter and a stride size of 1 and it is followed by RELU unit which is rectified linear unit activation function. ● Hidden Layers: all the hidden layers in VGG use RELU. ● Fully Connected Layers: There are 3 fully connected layers,the first two have 4096 channels each, and the third has 1000 channels, 1 for each class.
  • 8. ● There are a few convolution layers in this architecture followed by a pooling layer that reduces the height and the width (reducing volume). ● VGG16 focuses on 3x3 filter convolution layers with stride 1 and always utilizes the same padding and MaxPool layer of a 2x2 filter with stride 2. ● If we look at the number of filters that we can use, around 64 filters are available that we can double to about 128 and then to 256 filters. In the last layers, we can use 512 filters.
  • 9. VGG 19: ● VGG19 model (also VGGNet-19) is the same as the VGG16 except that it has 19 layers. ● The “16” and “19” stand for the number of weight layers in the model (convolutional layers). ● This means that VGG19 has three more convolutional layers than VGG16.
  • 10. VGG 16 vs VGG 19 VGG 16 VGG 19 ● 16 Layers ● 19 Layers ● Has less Weight. ● Has more Weight ● The size of the “VGG-16” network in terms of fully connected nodes is 533 MB ● The size of the “VGG-16” network in terms of fully connected nodes is 574 MB
  • 11. Advantage of VGG 19 over VGG 16 ● The main advantage of VGG19 over VGG16 is that it has more layers, which enables it to learn more complex representations of the data. ● VGG19 is more accurate than VGG16 In Conclusion: ● VGG16 and VGG19 are both convolutional neural networks developed by the Visual Geometry Group (VGG) at the University of Oxford, both are trained for image classification tasks. ● The main difference between them is the number of layers, VGG16 is a 16-layer CNN, while VGG19 is a 19- layer CNN, ● VGG19 is more accurate than VGG16
  • 12. DATA AUGMENTATION Artificially increasing the training set by creating modified copies of a dataset using existing data. Includes making minor changes to the dataset or using deep learning to generate new data points.
  • 13. AUGMENTED DATA It is driven from original data with some minor changes to increase the size and diversity of the training set. It is generated artificially without using the original dataset. It often uses DNNs (Deep Neural Networks) and GANs (Generative Adversarial Networks) to generate synthetic data. SYNTHETIC DATA
  • 14. WHY SHOULD WE USE DATA AUGMENTATION ?? ➢ To prevent models from overfitting. ➢ The initial training set is too small. ➢ To improve the model accuracy. ➢ To Reduce the operational cost of labeling and cleaning the raw dataset. ➢ Increases generalization ability of the models. ➢ Helps to resolve class imbalance issues in classification.
  • 15. LIMITATIONS OF DATA AUGMENTATION ➢ The biases in the original dataset persist in the augmented data. ➢ Quality assurance for data augmentation is expensive. ➢ Research and development are required to build a system with advanced applications. For example, generating high-resolution images using GANs can be challenging. ➢ Finding an effective data augmentation approach can be challenging.
  • 17. AUDIO DATA AUGMENTATION ➢ Noise injection: add gaussian or random noise ➢ Shifting: shift audio left (fast forward) or right with random seconds. ➢ Changing the speed: stretches times series by a fixed rate. ➢ Changing the pitch: randomly change the pitch of the audio.
  • 18. TEXT DATA AUGMENTATION ➢ Word or sentence shuffling ➢ Word replacement ➢ Syntax-tree manipulation ➢ Random word insertion ➢ Random word deletion
  • 19. IMAGE AUGMENTATION ➢ Geometric transformations : randomly flip, crop, rotate, stretch, and zoom images. ➢ Color space transformations : randomly change RGB color channels, contrast, saturation and brightness. ➢ Kernel filters: randomly change the sharpness or blurring of the image. ➢ Random erasing: delete some part of the initial image. ➢ Mixing images: blending and mixing multiple images.
  • 21. Adversarial Training based Augmentation The objective is to transform the images to deceive a deep-learning model. The method learns to generate masks which when applied to the input image, generated different augmented images.
  • 22. GAN based Augmentation Synthesize images for data augmentation Generator is to generate fake images from the latent space and the goal of the discriminator is to distinguish the synthetic fake images from the real images
  • 23. Neural Style Transfer based Augmentation Deep Neural Networks are trained to extract the content(high level features) from one image and style(low level features) from another image and compose the augmented image using the extracted content and style.
  • 24. Data Augmentation in Medical field Points to remember ➢ Image quality ➢ Tumor location and size ➢ Class imbalance ➢ Validation and evaluation
  • 26. 1. Import Libraries ➢ Tensorflow ➢ Keras ➢ Sklearn ➢ Numpy ➢ Matplotlib
  • 27. 2. Data Preparation and Preprocessing ➢ Convert the image to grayscale, and blur it slightly ➢ Threshold the image, then perform a series of erosions and dilations to remove any small regions of noise ➢ Crop new image out of the original image using the four extreme points (left, right, top, bottom)
  • 28.
  • 30. 3. Load the data ➢ Read the image. ➢ Crop the part of the image representing only the brain. ➢ Resize the image ➢ Apply normalization because we want pixel values to be scaled to the range 0-1. ➢ Append the image to X and its label to y ➢ Shuffle X and y
  • 32.
  • 33. 4. Split the data Split X and y into training, validation (development) and validation sets. ➢ 70% of the data for training. ➢ 15% of the data for validation. ➢ 15% of the data for testing.
  • 34. 5. Build the model ➢ Load the VGG16 model, pretrained on ImageNet ➢ Freeze the layers in the base model so that they are not trainable ➢ Create a new model that includes the VGG16 base model and additional layers for classification
  • 37. 6. Train the model
  • 39. 7. Evaluate the best model on training data ➢ Load the model ➢ Calculate the loss and accuracy of the model
  • 40. Loss Accuracy The model at the 9th iteration has validation accuracy of 97%