SlideShare a Scribd company logo
12
Most read
14
Most read
17
Most read
Presented by: Sujit Pal, Elsevier Labs
November 19-20 2016
Transfer Learning and Fine Tuning for Cross
Domain Image Classification with Keras
Demystifying Deep Learning and Artificial Intelligence
Accel.AI
| 2
• Work at Elsevier Labs
• Background in Search
• Path into Machine Learning
 Started on Natural Language Processing (NLP) to enhance search.
 Started on Machine Learning (ML) to help with NLP tasks.
• Currently working on Image Search and Classification using Deep
Learning and traditional techniques.
• Have applied similar ideas using Caffe pre-trained models to classify
corpus of images from medical journals.
About Me
| 3
• Use Deep Convolutional Neural Networks (DCNN) trained on
IMAGENET to predict image classes for a completely different
domain.
Problem Description
Photo credits: IMAGENET collage from The Morning Paper; DR Images from Kaggle Diabetic Retinopathy Detection Challlenge
| 4
• 35,126 color images of the retina.
• Labels: No DR, Mild, Moderate, Severe or
Proliferative DR.
• Detecting DR is hard; done by trained
clinicians.
• DR identified by presence of lesions on
retina associated with vascular
abnormality caused by the disease.
• Winning entry had 0.86 Kappa score
(measures agreement of predictions with
labels); good as human performance.
• We randomly sample 1,000 images from
dataset, 200 for each class.
Dataset Description
Photo credits: DR Images from Kaggle Diabetic Retinopathy Detection Challlenge
| 5
• Convolution is just a matrix operation.
• Enhances certain features of image.
• Popular approach to image feature generation.
Convolutions as Feature Generators
Right Sobel
Bottom Sobel
| 6
DCNN Architecture
• Each layer initialized with random filter weights.
• Alternating layers of convolution and pooling.
• Filters (depth) increase from left to right.
• Multiple filters combined at each pooling layer.
• Terminated by one or more fully connected layers.
• Filter weights updated by back-propagation during training.
| 7
Keras Pre-trained Models
• Keras - modular, minimalistic, high level Python library for building
neural networks.
• Runs on top of Theano and Tensorflow.
• Keras Applications (Model Zoo) contains following pre-trained
models:
• Xception
• VGG-16
• VGG-19
• ResNet50
• InceptionV3
• We will use VGG-16 for our talk.
| 8
Keras VGG-16 Model
| 9
Keras VGG-16 Model
| 10
Transfer Learning
• Pre-trained model has learned to pick out features from images that
are useful in distinguishing one image (class) from another.
• Initial layer filters encode edges and color, while later layer filters
encode texture and shape.
• Cheaper to “transfer” that learning to new classification scenario
than retrain a classifier from scratch.
Photo Credit: Keras Blog Post “How Convolutional Networks see the world”
| 11
Transfer Learning
• Remove the Fully Connected
(Bottleneck layer) from pre-trained
VGG16 model.
• Run images from DR Dataset
through this truncated network to
produce (semantic) image vectors.
• Use these vectors to train another
classifier to predict the labels in
training set.
• Prediction
• Image needs to be preprocessed
into image vector through
truncated pre-trained VGG16
model.
• Prediction made with second
classifier against image vector.
| 12
Transfer Learning
| 13
Transfer Learning
• Train a classifier (any classifier) using the image vectors.
• Accuracy: 0.36, Cohen’s Kappa: 0.51
• Position 79-80 on Public Leaderboard (Nov 9 2016).
| 14
Transfer Learning
• Single layer Neural Network gives better results.
• Accuracy: 0.67, Cohen’s Kappa: 0.75
• Position 25-26 on Public Leaderboard (Nov 9 2016).
| 15
Fine Tuning
• Remove bottleneck (classifier)
layer from pre-trained network.
• Freeze all weights except the last
(few) convolutional layers.
• Attach our own classifier to the
bottom.
• Train the resulting classifier with
very low learning rate.
• Computationally more expensive
than Transfer Learning but still
cheaper than training network
from scratch.
• More robust model.
| 16
Fine Tuning
• Accuracy: 0.62, Cohen’s Kappa: 0.74
• Position 26-27 on Public Leaderboard (Nov 9 2016)
| 17
Fine Tuning
• Improvement – update weights of top classifier using learned
weights from Transfer Learning classifier.
• Fewer Epochs needed for convergence.
• Accuracy: 0.63, Cohen’s Kappa: 0.72
• Position 32-33 on Public Leaderboard (Nov 9 2016)
| 18
• Code for this talk - https://github.com/sujitpal/fttl-with-keras
• My Email Address: sujit.pal@elsevier.com
Code and Contact Info
| 19
Thank you

More Related Content

PPTX
Transfer Learning and Fine-tuning Deep Neural Networks
PPTX
CNN Tutorial
PPTX
Optimization in Deep Learning
PDF
Introduction to Generative Adversarial Networks (GANs)
PPTX
Introduction to Keras
PPTX
Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...
PPTX
An overview of gradient descent optimization algorithms
Transfer Learning and Fine-tuning Deep Neural Networks
CNN Tutorial
Optimization in Deep Learning
Introduction to Generative Adversarial Networks (GANs)
Introduction to Keras
Deep Learning Tutorial | Deep Learning TensorFlow | Deep Learning With Neural...
An overview of gradient descent optimization algorithms

What's hot (20)

PPTX
Convolutional Neural Network and Its Applications
ODP
Simple Introduction to AutoEncoder
PPTX
Autoencoders in Deep Learning
PDF
Autoencoders
PPTX
Deep learning
PDF
Yurii Pashchenko: Zero-shot learning capabilities of CLIP model from OpenAI
PDF
PDF
Machine Learning: Introduction to Neural Networks
PPTX
Support vector machines (svm)
PDF
Transfer Learning
PPTX
Convolution Neural Network (CNN)
PDF
Generative adversarial networks
PPTX
HML: Historical View and Trends of Deep Learning
PPTX
Feedforward neural network
PPTX
Introduction to CNN
PPTX
Introduction to Transformer Model
PDF
Convolutional Neural Network Models - Deep Learning
PDF
Convolutional Neural Networks (CNN)
PDF
MobileNet - PR044
PPTX
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
Convolutional Neural Network and Its Applications
Simple Introduction to AutoEncoder
Autoencoders in Deep Learning
Autoencoders
Deep learning
Yurii Pashchenko: Zero-shot learning capabilities of CLIP model from OpenAI
Machine Learning: Introduction to Neural Networks
Support vector machines (svm)
Transfer Learning
Convolution Neural Network (CNN)
Generative adversarial networks
HML: Historical View and Trends of Deep Learning
Feedforward neural network
Introduction to CNN
Introduction to Transformer Model
Convolutional Neural Network Models - Deep Learning
Convolutional Neural Networks (CNN)
MobileNet - PR044
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
Ad

Similar to Transfer Learning and Fine Tuning for Cross Domain Image Classification with Keras (20)

PPTX
Deep learning with keras
PPTX
Convolutional neural networks 이론과 응용
PPTX
Wits presentation 6_28072015
PPTX
FINAL_Team_4.pptx
PPTX
Image Segmentation Using Deep Learning : A survey
PDF
NVIDIA 深度學習教育機構 (DLI): Medical image segmentation using digits
PDF
Towards better analysis of deep convolutional neural networks
PPTX
Computer vision-nit-silchar-hackathon
PPTX
Mnist soln
PPTX
Introduction to Convolutional Neural Networks (CNNs).pptx
PPTX
adlkchiuabcndjhvkajnfdkjhcfatgcbajkbcyudfctauygb
PPTX
YU CS Summer 2021 Project | TensorFlow Street Image Classification and Object...
PDF
Introduction to deep learning
PDF
PDF
Deep learning for image video processing
PPTX
Basic Introduction to Convolutional Neural Network.pptx
PPTX
Machine learning project
PPTX
CNN, Deep Learning ResNet_30_Slide_Presentation.pptx
PPT
lec6a.ppt
Deep learning with keras
Convolutional neural networks 이론과 응용
Wits presentation 6_28072015
FINAL_Team_4.pptx
Image Segmentation Using Deep Learning : A survey
NVIDIA 深度學習教育機構 (DLI): Medical image segmentation using digits
Towards better analysis of deep convolutional neural networks
Computer vision-nit-silchar-hackathon
Mnist soln
Introduction to Convolutional Neural Networks (CNNs).pptx
adlkchiuabcndjhvkajnfdkjhcfatgcbajkbcyudfctauygb
YU CS Summer 2021 Project | TensorFlow Street Image Classification and Object...
Introduction to deep learning
Deep learning for image video processing
Basic Introduction to Convolutional Neural Network.pptx
Machine learning project
CNN, Deep Learning ResNet_30_Slide_Presentation.pptx
lec6a.ppt
Ad

More from Sujit Pal (20)

PPTX
Supporting Concept Search using a Clinical Healthcare Knowledge Graph
PPTX
Google AI Hackathon: LLM based Evaluator for RAG
PPTX
Building Learning to Rank (LTR) search reranking models using Large Language ...
PPTX
Cheap Trick for Question Answering
PPTX
Searching Across Images and Test
PPTX
Learning a Joint Embedding Representation for Image Search using Self-supervi...
PPTX
The power of community: training a Transformer Language Model on a shoestring
PPTX
Backprop Visualization
PPTX
Accelerating NLP with Dask and Saturn Cloud
PPTX
Accelerating NLP with Dask on Saturn Cloud: A case study with CORD-19
PPTX
Leslie Smith's Papers discussion for DL Journal Club
PPTX
Using Graph and Transformer Embeddings for Vector Based Retrieval
PPTX
Transformer Mods for Document Length Inputs
PPTX
Question Answering as Search - the Anserini Pipeline and Other Stories
PPTX
Building Named Entity Recognition Models Efficiently using NERDS
PPTX
Graph Techniques for Natural Language Processing
PPTX
Learning to Rank Presentation (v2) at LexisNexis Search Guild
PPTX
Search summit-2018-ltr-presentation
PPTX
Search summit-2018-content-engineering-slides
PPTX
SoDA v2 - Named Entity Recognition from streaming text
Supporting Concept Search using a Clinical Healthcare Knowledge Graph
Google AI Hackathon: LLM based Evaluator for RAG
Building Learning to Rank (LTR) search reranking models using Large Language ...
Cheap Trick for Question Answering
Searching Across Images and Test
Learning a Joint Embedding Representation for Image Search using Self-supervi...
The power of community: training a Transformer Language Model on a shoestring
Backprop Visualization
Accelerating NLP with Dask and Saturn Cloud
Accelerating NLP with Dask on Saturn Cloud: A case study with CORD-19
Leslie Smith's Papers discussion for DL Journal Club
Using Graph and Transformer Embeddings for Vector Based Retrieval
Transformer Mods for Document Length Inputs
Question Answering as Search - the Anserini Pipeline and Other Stories
Building Named Entity Recognition Models Efficiently using NERDS
Graph Techniques for Natural Language Processing
Learning to Rank Presentation (v2) at LexisNexis Search Guild
Search summit-2018-ltr-presentation
Search summit-2018-content-engineering-slides
SoDA v2 - Named Entity Recognition from streaming text

Recently uploaded (20)

PPTX
UNIT 4 Total Quality Management .pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
composite construction of structures.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
web development for engineering and engineering
PDF
Digital Logic Computer Design lecture notes
PPTX
Construction Project Organization Group 2.pptx
PPTX
Sustainable Sites - Green Building Construction
UNIT 4 Total Quality Management .pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
bas. eng. economics group 4 presentation 1.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
composite construction of structures.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
CH1 Production IntroductoryConcepts.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
web development for engineering and engineering
Digital Logic Computer Design lecture notes
Construction Project Organization Group 2.pptx
Sustainable Sites - Green Building Construction

Transfer Learning and Fine Tuning for Cross Domain Image Classification with Keras

  • 1. Presented by: Sujit Pal, Elsevier Labs November 19-20 2016 Transfer Learning and Fine Tuning for Cross Domain Image Classification with Keras Demystifying Deep Learning and Artificial Intelligence Accel.AI
  • 2. | 2 • Work at Elsevier Labs • Background in Search • Path into Machine Learning  Started on Natural Language Processing (NLP) to enhance search.  Started on Machine Learning (ML) to help with NLP tasks. • Currently working on Image Search and Classification using Deep Learning and traditional techniques. • Have applied similar ideas using Caffe pre-trained models to classify corpus of images from medical journals. About Me
  • 3. | 3 • Use Deep Convolutional Neural Networks (DCNN) trained on IMAGENET to predict image classes for a completely different domain. Problem Description Photo credits: IMAGENET collage from The Morning Paper; DR Images from Kaggle Diabetic Retinopathy Detection Challlenge
  • 4. | 4 • 35,126 color images of the retina. • Labels: No DR, Mild, Moderate, Severe or Proliferative DR. • Detecting DR is hard; done by trained clinicians. • DR identified by presence of lesions on retina associated with vascular abnormality caused by the disease. • Winning entry had 0.86 Kappa score (measures agreement of predictions with labels); good as human performance. • We randomly sample 1,000 images from dataset, 200 for each class. Dataset Description Photo credits: DR Images from Kaggle Diabetic Retinopathy Detection Challlenge
  • 5. | 5 • Convolution is just a matrix operation. • Enhances certain features of image. • Popular approach to image feature generation. Convolutions as Feature Generators Right Sobel Bottom Sobel
  • 6. | 6 DCNN Architecture • Each layer initialized with random filter weights. • Alternating layers of convolution and pooling. • Filters (depth) increase from left to right. • Multiple filters combined at each pooling layer. • Terminated by one or more fully connected layers. • Filter weights updated by back-propagation during training.
  • 7. | 7 Keras Pre-trained Models • Keras - modular, minimalistic, high level Python library for building neural networks. • Runs on top of Theano and Tensorflow. • Keras Applications (Model Zoo) contains following pre-trained models: • Xception • VGG-16 • VGG-19 • ResNet50 • InceptionV3 • We will use VGG-16 for our talk.
  • 10. | 10 Transfer Learning • Pre-trained model has learned to pick out features from images that are useful in distinguishing one image (class) from another. • Initial layer filters encode edges and color, while later layer filters encode texture and shape. • Cheaper to “transfer” that learning to new classification scenario than retrain a classifier from scratch. Photo Credit: Keras Blog Post “How Convolutional Networks see the world”
  • 11. | 11 Transfer Learning • Remove the Fully Connected (Bottleneck layer) from pre-trained VGG16 model. • Run images from DR Dataset through this truncated network to produce (semantic) image vectors. • Use these vectors to train another classifier to predict the labels in training set. • Prediction • Image needs to be preprocessed into image vector through truncated pre-trained VGG16 model. • Prediction made with second classifier against image vector.
  • 13. | 13 Transfer Learning • Train a classifier (any classifier) using the image vectors. • Accuracy: 0.36, Cohen’s Kappa: 0.51 • Position 79-80 on Public Leaderboard (Nov 9 2016).
  • 14. | 14 Transfer Learning • Single layer Neural Network gives better results. • Accuracy: 0.67, Cohen’s Kappa: 0.75 • Position 25-26 on Public Leaderboard (Nov 9 2016).
  • 15. | 15 Fine Tuning • Remove bottleneck (classifier) layer from pre-trained network. • Freeze all weights except the last (few) convolutional layers. • Attach our own classifier to the bottom. • Train the resulting classifier with very low learning rate. • Computationally more expensive than Transfer Learning but still cheaper than training network from scratch. • More robust model.
  • 16. | 16 Fine Tuning • Accuracy: 0.62, Cohen’s Kappa: 0.74 • Position 26-27 on Public Leaderboard (Nov 9 2016)
  • 17. | 17 Fine Tuning • Improvement – update weights of top classifier using learned weights from Transfer Learning classifier. • Fewer Epochs needed for convergence. • Accuracy: 0.63, Cohen’s Kappa: 0.72 • Position 32-33 on Public Leaderboard (Nov 9 2016)
  • 18. | 18 • Code for this talk - https://github.com/sujitpal/fttl-with-keras • My Email Address: sujit.pal@elsevier.com Code and Contact Info