Dog Emotion Prediction Based On Transfer Learning
Team: Tree New Bee
Wei Shan, Jeff Zhuo, Xi Du, Tianrui Ye, Yuewei Wang
Introduction
Introduction
Angry
Happy
Relaxed
Sad
Introduction
Introduction(Background - Transfer Learning)
Image Credit: Prof. Li
Task we want to accomplish
Task already accomplished
Introduction(Background - Transfer Learning)
Works cited: Dr. Andrew Ng, https://www.youtube.com/watch?v=yofjFQddwHE
Image Credit: Prof. Li
Introduction(Background - Transfer Learning)
Image Credit: Prof. Li
Introduction(Background - Transfer Learning)
Image Credit: Prof. Li
Introduction(Background - Transfer Learning)
Q: Model trained by big dataset?
Image Credit: https://www.analyticssteps.com/blogs/how-transfer-learning-done-neural-networks-and-convolutional-neural-networks
Introduction(Background - Transfer Learning)
Q: Model trained by big dataset?
A: Pre-trained Model!
Image Credit: https://www.analyticssteps.com/blogs/how-transfer-learning-done-neural-networks-and-convolutional-neural-networks
Introduction(Background - Transfer Learning)
Q: Model trained by big dataset?
A: Pre-trained Model!
Q: How to transfer knowledge?
Image Credit: https://www.analyticssteps.com/blogs/how-transfer-learning-done-neural-networks-and-convolutional-neural-networks
Introduction(Background - Transfer Learning)
Q: Model trained by big dataset?
A: Pre-trained Model!
Q: How to transfer knowledge?
Image Credit: https://www.analyticssteps.com/blogs/how-transfer-learning-done-neural-networks-and-convolutional-neural-networks
Introduction(Background - Transfer Learning)
Q: Model trained by big dataset?
A: Pre-trained Model!
Q: How to transfer knowledge?
A: Freeze convolutional layers’ parameters!
Image Credit: https://www.analyticssteps.com/blogs/how-transfer-learning-done-neural-networks-and-convolutional-neural-networks
Introduction(Background - Transfer Learning)
Q: Model trained by big dataset?
A: Pre-trained Model!
Q: How to transfer knowledge?
A: Freeze convolutional layers’ parameters!
Image Credit: https://www.analyticssteps.com/blogs/how-transfer-learning-done-neural-networks-and-convolutional-neural-networks
Review of Literature
Review of Literature: Image-based Sentiment Analysis
Review of Literature: Pre-trained Models
Review of Literature: Transfer Learning
Methodology (Pre-trained Model Selection)
Methodology (Pre-trained Model Selection)
More conv …
Methodology (Pre-trained Model Selection)
More conv …
Parameters Freezed
Methodology (Pre-trained Model Selection)
More conv …
fc 4
Parameters Freezed
Methodology (Pre-trained Model Selection)
More conv …
fc 4
Parameters Freezed
Result (Pre-trained Model Selection)
Model | ResNet18 | ResNet50 | VGG16 | AlexNet | MobileNet | GoogLeNet |
Training Accuracy | 44% | 54% | 58% | 47% | 51% | 46% |
Result (Pre-trained Model Selection)
Model | ResNet18 | ResNet50 | VGG16 | AlexNet | MobileNet | GoogLeNet |
Training Accuracy | 44% | 54% | 58% | 47% | 51% | 46% |
Result (Pre-trained Model Selection)
Model | ResNet18 | ResNet50 | VGG16 | AlexNet | MobileNet | GoogLeNet |
Training Accuracy | 44% | 54% | 58% | 47% | 51% | 46% |
Image Credit: http://jaree.its.ac.id/index.php/jaree/article/view/191
Result (Pre-trained Model Selection)
Model | ResNet18 | ResNet50 | VGG16 | AlexNet | MobileNet | GoogLeNet |
Training Accuracy | 44% | 54% | 58% | 47% | 51% | 46% |
Image Credit: http://jaree.its.ac.id/index.php/jaree/article/view/191
Methodology
Methodology
Methodology (Classifier Modification)
Parameters Freezed
fc 4
Methodology (Classifier Modification)
Parameters Freezed
Methodology (Classifier Modification)
Bayes Classifier (LDA/ QDA)
Parameters Freezed
Methodology (Classifier Modification)
KNN
Parameters Freezed
Methodology (Classifier Modification)
SVM
Parameters Freezed
Methodology (Classifier Modification)
Random Forest
Parameters Freezed
Result (Classifier Modification)
Model | FC | LDA | QDA | KNN | SVM | Random Forest |
Training Accuracy | 54% | 79% | 82% | 48% | 79% | 61% |
Result (Classifier Modification)
Model | FC | LDA | QDA | KNN | SVM | Random Forest |
Training Accuracy | 54% | 79% | 82% | 48% | 79% | 61% |
Testing Accuracy | 53% | 31% | 35% | 20% | 59% | 27% |
Methodology
Methodology (Multi Task Learning)
Image Credit: I made them
Input 1
Task 1
Input 2
Task 2
Single Task Learning
Input 1
Task 1
Input 2
Task 2
Multi Task Learning
Conv
Layers
FC
Layers
Conv
Layers
FC
Layers
Methodology (Multi Task Learning)
Image Credit: I made them
Works Cited: Y. Zhang and Q. Yang, "A Survey on Multi-Task Learning,"
Input 1
Task 1
Input 2
Task 2
Single Task Learning
Input 1
Task 1
Input 2
Task 2
Multi Task Learning
Conv
Layers
FC
Layers
Conv
Layers
FC
Layers
Methodology (Multi Task Learning)
Image Credit: I made them
Input 1
Task 1
Input 2
Task 2
Conv
Layers
FC
Layers
Methodology (Multi Task Learning)
Image Credit: I made them
Task 2
Conv
Layers
FC
Layers
Positive
Positive
Negative
Negative
Input 2
Methodology (Multi Task Learning)
Image Credit: I made them
Conv
Layers
FC
Layers
Relaxed
Happy
Sad
Angry
Positive
Positive
Negative
Negative
Methodology (Multi Task Learning)
Image Credit: I made them
ResNet50
(pre-trained model)
FC
Layers
Relaxed
Happy
Sad
Angry
Positive
Positive
Negative
Negative
Methodology (Multi Task Learning)
Image Credit: I made them
ResNet50
(pre-trained model)
FC
Layers
Relaxed
Happy
Sad
Angry
Positive
Positive
Negative
Negative
……
2048
……
Result (Multi Task Learning)
Methodology
Methodology (Fine-Tuning)
Big Idea: Low-Level features are general and High-level features are more specific.
Figure 1: Hierarchy of Features in CNNs
Methodology (Fine-Tuning)
ResNet50
Image Credit: ResNet50 Architecture
Train
Freeze
FC 4
Methodology (Fine-Tuning)
ResNet50
Image Credit: ResNet50 Architecture
Train
Freeze
Train
Freeze
FC 4
Jason Yosinski, Jeff Clune, Yoshua Bengio, & Hod Lipson. (2014). How transferable are features in deep neural networks?
Results (Fine-Tuning)
Method | Training on FC Layer | Training on FC + Stage 4 | Accuracy Increase |
Training Accuracy | 54.5% | 63.8% | 9.3% |
Test Accuracy | 53.3% | 57.6% | 4.3% |
Accuracy Difference | -1.2% | -6.2% | |
Methodology
Methodology (Unsupervised Domain Adaptation)
What is Domain Adaptation
Why Domain Adaptation useful
Methodology (Unsupervised Domain Adaptation)
Methodology (Unsupervised Domain Adaptation)
Results(Unsupervised Domain Adaptation)
ResNet50 Accuracy
Training Accuracy: 62.8%
Testing Accuracy: 53%
Training Accuracy Increase: 9.8%
Conclusion