All Projects → sujitpal → Fttl With Keras

sujitpal / Fttl With Keras

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

Projects that are alternatives of or similar to Fttl With Keras

Ctpn
Detecting Text in Natural Image with Connectionist Text Proposal Network (ECCV'16)
Stars: ✭ 1,220 (+1444.3%)
Mutual labels:  jupyter-notebook
Logistic regression
This is the code for "Logistic Regression" By Siraj Raval on Youtube
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Textrank Keyword Extraction
Keyword extraction using TextRank algorithm after pre-processing the text with lemmatization, filtering unwanted parts-of-speech and other techniques.
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Covid 19 jhu data web scrap and cleaning
This repository contains data and code used to get and clean data from https://github.com/CSSEGISandData/COVID-19 and https://www.worldometers.info/coronavirus/
Stars: ✭ 80 (+1.27%)
Mutual labels:  jupyter-notebook
Chi course 2019
ACM SIGCHI 2019 Course on Bayesian Methods for Interaction
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Soccernet Code
SoccerNet: A Scalable Dataset for Action Spotting in Soccer Videos
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Sms Tools
Sound analysis/synthesis tools for music applications
Stars: ✭ 1,215 (+1437.97%)
Mutual labels:  jupyter-notebook
Pandas Head To Tail
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Pose Estimation tutorials
Tools and tutorials of pose estimation and deep learning
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Symbolic Musical Datasets
🎹 symbolic musical datasets
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Ai Pizza
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Microsoft Ai Curriculum
Microsoft AI Curriculum Hungary
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Autoarima Time Series Blog
This is the code notebook for the blog post on using Python and Auto ARIMA
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Adventures In Tensorflow Lite
This repository contains notebooks that show the usage of TensorFlow Lite for quantizing deep neural networks.
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Ds Ga 1011 Fall2017
DS-GA-1011 Natural Language Processing with Representation Learning
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
1806
18.06 course at MIT
Stars: ✭ 1,219 (+1443.04%)
Mutual labels:  jupyter-notebook
Mathy
Tools for using computer algebra systems to solve math problems step-by-step with reinforcement learning
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Computational Neuroscience Uw
Python scripts that supplement the Coursera Computational Neuroscience course by the University of Washington
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Pragmaticai
[Book-2019] Pragmatic AI: An Introduction to Cloud-based Machine Learning
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook
Phormatics
Using A.I. and computer vision to build a virtual personal fitness trainer. (Most Startup-Viable Hack - HackNYU2018)
Stars: ✭ 79 (+0%)
Mutual labels:  jupyter-notebook

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

Supporting code for my talk at Accel.AI Demystifying Deep Learning and AI event on November 19-20 2016 at Oakland CA.

Slides are here

Abstract:

I describe how a Deep Convolutional Network (DCNN) trained on the ImageNet dataset can be used to classify images in a completely different domain. The intuition that the training process teaches the DCNN to extract good features from images is explored with visualizations. Transfer Learning freezes the bottom layers of the DCNN to extract image vectors from a training set in a different domain, which can then be used to train a new classifier for this domain. Fine tuning involves training the pre-trained network further for the target domain. Both approaches are demonstrated using a VGG-16 network pre-trained on ImageNet to classify medical images into 5 categories. Code examples are provided using Keras.

Dataset

Dataset used comes from Diabetic Retinopathy Detection competition on Kaggle. Dataset is a set of 35,126 of digital color fundus photographs of the retina. The code here uses a sample of 1,000 images sampled from this dataset, 200 per each of the 5 Diabetes Retinopathy images (No DR, Mild DR, Moderate DR, Severe DR and Proliferative DR). See the data/README.md for details.

VGG-16 Model

Results

Transfer Learning

Transfer Learning + Logistic Regression

Result (based on Cohen's Kappa score) places this entry at position 79-80 on public leaderboard (as of Nov 9 2016).

Accuracy: 0.36333, Cohen's Kappa Score: 0.51096

Confusion Matrix:
[[15 19 17  9  0]
 [20 24 10  5  1]
 [12 13 13 12 10]
 [ 7  4 11 24 14]
 [ 4  2 11 10 33]]

Classification Report:
             precision    recall  f1-score   support

          0       0.26      0.25      0.25        60
          1       0.39      0.40      0.39        60
          2       0.21      0.22      0.21        60
          3       0.40      0.40      0.40        60
          4       0.57      0.55      0.56        60

avg / total       0.36      0.36      0.36       300

Transfer Learning + 1 layer MLP

Result (based on Cohen's Kappa score) places this entry at position 25-26 on public leaderboard (as of Nov 9 2016).

Final Model (DL#1)

Accuracy: 0.66667, Cohen's Kappa Score: 0.74558

Confusion Matrix:
[[40  6  8  0  0]
 [ 5 46 12  2  0]
 [ 7  5 46  4  2]
 [ 5  5  8 31 11]
 [ 2  3  6  9 37]]

Classification Report:
             precision    recall  f1-score   support

          1       0.68      0.74      0.71        54
          2       0.71      0.71      0.71        65
          3       0.57      0.72      0.64        64
          4       0.67      0.52      0.58        60
          5       0.74      0.65      0.69        57

avg / total       0.67      0.67      0.67       300

Transfer Learning + 2 layer MLP

Results in lower performance than 1 layer MLP. Other tuning was to increase batch size, use Adadelta optimizer with lower learning rate. Network is slower because of additional layer and slightly worse in performance than 1 layer.

Final Model (DL#2)

Accuracy: 0.63333, Cohen's Kappa Score: 0.70822

Confusion Matrix:
[[36 11  4  1  2]
 [13 45  4  1  2]
 [ 5 15 35  5  4]
 [ 5  8  6 31 10]
 [ 4  1  3  6 43]]

Classification Report:
             precision    recall  f1-score   support

          1       0.57      0.67      0.62        54
          2       0.56      0.69      0.62        65
          3       0.67      0.55      0.60        64
          4       0.70      0.52      0.60        60
          5       0.70      0.75      0.73        57

avg / total       0.64      0.63      0.63       300

Fine Tuning

Fine Tuning with Random Weights for FC

Result (based on Cohen's Kappa score) places this entry at position 26-27 on public leaderboard (as of Nov 9 2016).

Final Model (FT#1)

Accuracy: 0.61667, Cohen's Kappa Score: 0.74487

Confusion Matrix:
[[32  7 10  4  1]
 [13 37 11  4  0]
 [ 7  3 45  6  3]
 [ 1  4  8 32 15]
 [ 0  3  3 12 39]]

Classification Report:
             precision    recall  f1-score   support

          0       0.60      0.59      0.60        54
          1       0.69      0.57      0.62        65
          2       0.58      0.70      0.64        64
          3       0.55      0.53      0.54        60
          4       0.67      0.68      0.68        57

avg / total       0.62      0.62      0.62       300

Fine Tuning with Learned Weights for FC

Result (based on Cohen's Kappa score) places this entry at position 32-33 on public leaderboard (as of Nov 9 2016).

Final Model (FT#2)

Accuracy: 0.63000, Cohen's Kappa Score: 0.72214

Confusion Matrix:
[[34 11  6  2  1]
 [ 5 49  8  3  0]
 [ 6 12 40  5  1]
 [ 3  9 10 30  8]
 [ 1  3  7 10 36]]

Classification Report:
             precision    recall  f1-score   support

          0       0.69      0.63      0.66        54
          1       0.58      0.75      0.66        65
          2       0.56      0.62      0.59        64
          3       0.60      0.50      0.55        60
          4       0.78      0.63      0.70        57

avg / total       0.64      0.63      0.63       300

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].