SlideShare a Scribd company logo
3
Most read
4
Most read
14
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

What's hot (20)

PDF
Transfer Learning: An overview
jins0618
 
PPTX
Transfer learning-presentation
Bushra Jbawi
 
PPTX
Automated Machine Learning (Auto ML)
Hayim Makabee
 
PPTX
U-Net (1).pptx
Changjin Lee
 
PPTX
Deep learning with keras
MOHITKUMAR1379
 
PPTX
Semi-Supervised Learning
Lukas Tencer
 
PDF
Introduction to Generative Adversarial Networks (GANs)
Appsilon Data Science
 
PPTX
Google net
Brian Kim
 
PDF
Training Neural Networks
Databricks
 
PPTX
Introduction to CNN
Shuai Zhang
 
PPTX
Self supervised learning
哲东 郑
 
PPTX
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Simplilearn
 
PDF
Hands on machine learning with scikit-learn and tensor flow by ahmed yousry
Ahmed Yousry
 
PDF
Transfer Learning -- The Next Frontier for Machine Learning
Sebastian Ruder
 
PPT
Classification using back propagation algorithm
KIRAN R
 
PDF
1D Convolutional Neural Networks for Time Series Modeling - Nathan Janos, Jef...
PyData
 
PPTX
Deep Neural Networks (DNN)
Sir Syed University of Engineering & Technology
 
PPT
K mean-clustering
Afzaal Subhani
 
Transfer Learning: An overview
jins0618
 
Transfer learning-presentation
Bushra Jbawi
 
Automated Machine Learning (Auto ML)
Hayim Makabee
 
U-Net (1).pptx
Changjin Lee
 
Deep learning with keras
MOHITKUMAR1379
 
Semi-Supervised Learning
Lukas Tencer
 
Introduction to Generative Adversarial Networks (GANs)
Appsilon Data Science
 
Google net
Brian Kim
 
Training Neural Networks
Databricks
 
Introduction to CNN
Shuai Zhang
 
Self supervised learning
哲东 郑
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Simplilearn
 
Hands on machine learning with scikit-learn and tensor flow by ahmed yousry
Ahmed Yousry
 
Transfer Learning -- The Next Frontier for Machine Learning
Sebastian Ruder
 
Classification using back propagation algorithm
KIRAN R
 
1D Convolutional Neural Networks for Time Series Modeling - Nathan Janos, Jef...
PyData
 
K mean-clustering
Afzaal Subhani
 

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

PPTX
Deep Neural Networks for Computer Vision
Alex Conway
 
PPTX
Keras on tensorflow in R & Python
Longhow Lam
 
PDF
Deep Learning for Computer Vision - ExecutiveML
Alex Conway
 
PPTX
Obscenity Detection in Images
Anil Kumar Gupta
 
PPTX
Deep Learning for Computer Vision - PyconDE 2017
Alex Conway
 
PDF
Image Classification (20230411)
FEG
 
PDF
3_Transfer_Learning.pdf
FEG
 
PPTX
PyConZA'17 Deep Learning for Computer Vision
Alex Conway
 
PPTX
Convolutional Neural Networks for Computer vision Applications
Alex Conway
 
PPTX
Image classification using convolutional neural network
KIRAN R
 
PPTX
Learn about Tensorflow for Deep Learning now! Part 1
Tyrone Systems
 
PDF
2_Image Classification.pdf
FEG
 
PDF
NVIDIA 深度學習教育機構 (DLI): Approaches to object detection
NVIDIA Taiwan
 
PDF
Image Classification with Deep Learning | DevFest + GDay, George Town, Mala...
Virot "Ta" Chiraphadhanakul
 
PDF
dfdshofdifhdifhdfhgfoighfgofgfgfgfgdfdfdfdf
nguyenhoangy207
 
PDF
Eye deep
sveitser
 
PPTX
2019 05 11 Chicago Codecamp - Deep Learning for everyone? Challenge Accepted!
Bruno Capuano
 
PPTX
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
resming1
 
PDF
PyDresden 20170824 - Deep Learning for Computer Vision
Alex Conway
 
Deep Neural Networks for Computer Vision
Alex Conway
 
Keras on tensorflow in R & Python
Longhow Lam
 
Deep Learning for Computer Vision - ExecutiveML
Alex Conway
 
Obscenity Detection in Images
Anil Kumar Gupta
 
Deep Learning for Computer Vision - PyconDE 2017
Alex Conway
 
Image Classification (20230411)
FEG
 
3_Transfer_Learning.pdf
FEG
 
PyConZA'17 Deep Learning for Computer Vision
Alex Conway
 
Convolutional Neural Networks for Computer vision Applications
Alex Conway
 
Image classification using convolutional neural network
KIRAN R
 
Learn about Tensorflow for Deep Learning now! Part 1
Tyrone Systems
 
2_Image Classification.pdf
FEG
 
NVIDIA 深度學習教育機構 (DLI): Approaches to object detection
NVIDIA Taiwan
 
Image Classification with Deep Learning | DevFest + GDay, George Town, Mala...
Virot "Ta" Chiraphadhanakul
 
dfdshofdifhdifhdfhgfoighfgofgfgfgfgdfdfdfdf
nguyenhoangy207
 
Eye deep
sveitser
 
2019 05 11 Chicago Codecamp - Deep Learning for everyone? Challenge Accepted!
Bruno Capuano
 
Deep Learning for Image Processing on 16 June 2025 MITS.pptx
resming1
 
PyDresden 20170824 - Deep Learning for Computer Vision
Alex Conway
 
Ad

More from Sujit Pal (20)

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

Recently uploaded (20)

PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 

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: [email protected] Code and Contact Info