SlideShare a Scribd company logo
1 of 25
Download to read offline
我们毕业啦其实是答辩的标题地方
multi-label learning library
&
multi-label scene classification
Lxinyuelxy
JiangNan University
CONTANTS
• Introduction
• mllearn library
• scene classification
• summary
IntroductionIntroduction Traditional classification
f1( ) = "cat"
f3( ) = "{sunset, sea, boat}"
f2( ) = "0"
• Binary classification
• multi-class classification
• multi-label classification
Introduction
Sunset Trees Mounts Sea Desert Grassland
Yes No No Yes No No
What is multi-label classification ?
Introduction The data format in multi-label classification
X Y
X(1) 0
X(2) 1
X(3) 0
X(4) 1
X(5) 0
X ?
X Y1 Y2 Y3 Y4 Y5
X(1) 0 1 1 1 0
X(2) 1 0 1 0 0
X(3) 0 0 0 1 1
X(4) 0 1 1 0 0
X(5) 1 0 0 0 1
X ? ? ? ? ?
Sing-lable Multi-label
•Problem Transformation •Algorithm Adaptation
Introduction Strategies for solving a multi-Label classification
Transformed
Dataset
multi-label
Dataset
tradition algs adapted algs tradition algs
multi-label
Dataset
Introduction Metrics of multi-Label classification
• Subset Accuracy
• Hamming Loss
predict real
{sunset, sea} {sunest, sea,
trees}
×
{trees, sunset} {trees, sunset} √
Label space
predict real
mllearn library
mllearn library Implemented algorithms
• Multi-Label k-Nearest Neighbor
• Ranking Support Vector Machine
• Multi-Lanel Decision Tree
• Collective Multi-Label
Classifier
• Subset Accuracy
• Hamming Loss
• Accuracyexam
• Precision
• Recall
• Fβ
exam
mllearn • Bianary Relevance
• Classifier Chains
• Calibrated Lable Ranking
• Random k-Labelsets
metrics
algs
problem
transform
algs
adaptation
https://github.com/Lxinyuelxy/multi-label-learn
Introduction The data format for multi-label classificationmllearn library
>>> type(X)
<type 'numpy.ndarray'>
>>> X_train.shape
(n_samples, n_features)
>>> type(y)
<type 'numpy.ndarray'>
>>> y.shape
(n_samples, n_labels)
• Data Format
X1
1, X1
2, ......, X1
n_features
X2
1, X2
2, ......, X2
n_features
X3
1, X3
2, ......, X3
n_features
Xm
1, Xm
2, ......, Xm
n_features
......
......
......
......
1, 0, 0, 1, 0
0, 1, 1, 1, 0
1, 0, 0, 0, 1
1, 0, 1, 1, 0,
......
......
......
Introduction Installation & Example Usagemllearn library
from mllearn.problem_transform import BinaryRelevance
#from sklearn.svm import SVC
#classif = BinaryRelevance(SVC(kernel='linear'))
classif = BinaryRelevance()
classif.fit(X_train, y_train)
y_pred = classif.predict(X_test)
from mllearn.metrics import subset_acc
acc = subset_acc(y_test, y_pred)
pip install mllearn
• Installation
• Example Usage
Introduction The Datasets for testmllearn library
Multi-label Scene Classification
The datasetscene classify
Label Set #Images Label Set #Images Label Set #Images
desert 340 desert+
sunset
21 sunset+trees 28
mounts 268 desert+trees 20 desert+mounts
+sunset
1
sea 341 mounts+sea 38 desert+
sunset+trees
3
sunset 216 mountains+
sunset
19 mounts+sea+
trees
6
trees 378 mountains+
trees
106 mounts+
sunset+trees
1
desert+
mounts
19 sea+sunset 172 sea+sunset+
trees
4
desert+sea 5 sea+trees 14 Total 2000
http://lamda.nju.edu.cn/(X(1)S(10cedth11swjtqtcqjmwei1g))/Default.aspx?Page=dat
a_MIMLimage&NS=&AspxAutoDetectCookieSupport=1
Introduction How to choose a feature extractor ?scene classify
Algorithms
Binary
Relevance
Classifier
Cahins
Calibrated
Label
Ranking
Random k-
Labelsets
MLKNN Implemented
Hamming
Loss
0.113573 0.115803 0.107581 0.097826 0.097408 0.19650
Subset
Accuracy
0.496656 0.6112 0.492475 0.610368 0.568562 0.28500
Introduction How to choose a feature extractor ?scene classify
mllearn
library
Traditional
feature
extraction
method
[X1, X2, ..., Xd]
feature
extraction
daisy hog
Hamming loss 0.251 0.18950
Subset
Accuracy
0.3275 0.44
Solution 1: Data Augmentationscene classify
Solution 1: CNN binary classifyscene classify
trees
sunset
sea
mounts
desert
Hamming
Loss
Subset
Accuracy
CNN 0.11975 0.575
https://github.com/Lxinyuelxy/multi-label-scene-classification
Model Size Top-1
Accuracy
Parameters Feature
Shape
VGG16 528 MB 0.715 138,357,54
4
(1, 7, 7,
512)
VGG19 549 MB 0.727 143,667,24
0
(1, 7, 7,
512)
Inception
V3
92 MB 0.788 23,851,784 (1, 5, 5,
2048)
ResNet50 99 MB 0.759 25,636,712 (1, 1, 1,
2048)
Inception
ResNetV2 215 MB 0.804 55,873,736 (1, 8, 8,
1536)
Solution 2: RestNet50 + mllearnscene classify
mllearn
library
ResNet50
model
[X1, X2, ..., X2048]
https://github.com/Lxinyuelxy/multi-label-scene-classification
Result comparingscene classify
0.7625
0.058
multi-label scene classify appscene classify
The process of multi-label scene classificationsummery
feature
extractor
data
multi-label
algorithm model
unseen
instance
show output
upload image
train predict application
the workload distributionsummary
THANKS

More Related Content

Similar to Graduation project based on multi-label learning

Gradient Boosted Regression Trees in Scikit Learn by Gilles Louppe & Peter Pr...
Gradient Boosted Regression Trees in Scikit Learn by Gilles Louppe & Peter Pr...Gradient Boosted Regression Trees in Scikit Learn by Gilles Louppe & Peter Pr...
Gradient Boosted Regression Trees in Scikit Learn by Gilles Louppe & Peter Pr...PyData
 
Deep Learning for AI (2)
Deep Learning for AI (2)Deep Learning for AI (2)
Deep Learning for AI (2)Dongheon Lee
 
Machine learning for_finance
Machine learning for_financeMachine learning for_finance
Machine learning for_financeStefan Duprey
 
Assignment 5.1.pdf
Assignment 5.1.pdfAssignment 5.1.pdf
Assignment 5.1.pdfdash41
 
Gradient Boosted Regression Trees in scikit-learn
Gradient Boosted Regression Trees in scikit-learnGradient Boosted Regression Trees in scikit-learn
Gradient Boosted Regression Trees in scikit-learnDataRobot
 
Research overview Oct. 2018
Research overview Oct. 2018Research overview Oct. 2018
Research overview Oct. 2018XavierDevroey
 
Supervised Prediction of Graph Summaries
Supervised Prediction of Graph SummariesSupervised Prediction of Graph Summaries
Supervised Prediction of Graph SummariesDaniil Mirylenka
 
An Introduction into Anomaly Detection Using CUSUM
An Introduction into Anomaly Detection Using CUSUMAn Introduction into Anomaly Detection Using CUSUM
An Introduction into Anomaly Detection Using CUSUMDominik Dahlem
 
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017StampedeCon
 
Geo exploration simplified with Elastic Maps
Geo exploration simplified with Elastic MapsGeo exploration simplified with Elastic Maps
Geo exploration simplified with Elastic MapsElasticsearch
 
MLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningMLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningCharles Deledalle
 
Huong dan cu the svm
Huong dan cu the svmHuong dan cu the svm
Huong dan cu the svmtaikhoan262
 
Cloudera - A Taste of random decision forests
Cloudera - A Taste of random decision forestsCloudera - A Taste of random decision forests
Cloudera - A Taste of random decision forestsDataconomy Media
 
Afsar ml applied_svm
Afsar ml applied_svmAfsar ml applied_svm
Afsar ml applied_svmUmmeHaniAsif
 
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017StampedeCon
 
(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305Amazon Web Services
 
Serving predictive models with Redis
Serving predictive models with RedisServing predictive models with Redis
Serving predictive models with RedisTague Griffith
 
Cluster analysis
Cluster analysisCluster analysis
Cluster analysisAcad
 

Similar to Graduation project based on multi-label learning (20)

Gradient Boosted Regression Trees in Scikit Learn by Gilles Louppe & Peter Pr...
Gradient Boosted Regression Trees in Scikit Learn by Gilles Louppe & Peter Pr...Gradient Boosted Regression Trees in Scikit Learn by Gilles Louppe & Peter Pr...
Gradient Boosted Regression Trees in Scikit Learn by Gilles Louppe & Peter Pr...
 
Deep Learning for AI (2)
Deep Learning for AI (2)Deep Learning for AI (2)
Deep Learning for AI (2)
 
Machine learning for_finance
Machine learning for_financeMachine learning for_finance
Machine learning for_finance
 
Assignment 5.1.pdf
Assignment 5.1.pdfAssignment 5.1.pdf
Assignment 5.1.pdf
 
Gradient Boosted Regression Trees in scikit-learn
Gradient Boosted Regression Trees in scikit-learnGradient Boosted Regression Trees in scikit-learn
Gradient Boosted Regression Trees in scikit-learn
 
Research overview Oct. 2018
Research overview Oct. 2018Research overview Oct. 2018
Research overview Oct. 2018
 
"Let us talk about output features! by Florence d’Alché-Buc, LTCI & Full Prof...
"Let us talk about output features! by Florence d’Alché-Buc, LTCI & Full Prof..."Let us talk about output features! by Florence d’Alché-Buc, LTCI & Full Prof...
"Let us talk about output features! by Florence d’Alché-Buc, LTCI & Full Prof...
 
Supervised Prediction of Graph Summaries
Supervised Prediction of Graph SummariesSupervised Prediction of Graph Summaries
Supervised Prediction of Graph Summaries
 
An Introduction into Anomaly Detection Using CUSUM
An Introduction into Anomaly Detection Using CUSUMAn Introduction into Anomaly Detection Using CUSUM
An Introduction into Anomaly Detection Using CUSUM
 
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
 
Geo exploration simplified with Elastic Maps
Geo exploration simplified with Elastic MapsGeo exploration simplified with Elastic Maps
Geo exploration simplified with Elastic Maps
 
MLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningMLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, Captioning
 
Guide
GuideGuide
Guide
 
Huong dan cu the svm
Huong dan cu the svmHuong dan cu the svm
Huong dan cu the svm
 
Cloudera - A Taste of random decision forests
Cloudera - A Taste of random decision forestsCloudera - A Taste of random decision forests
Cloudera - A Taste of random decision forests
 
Afsar ml applied_svm
Afsar ml applied_svmAfsar ml applied_svm
Afsar ml applied_svm
 
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
End-to-end Big Data Projects with Python - StampedeCon Big Data Conference 2017
 
(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305(CMP305) Deep Learning on AWS Made EasyCmp305
(CMP305) Deep Learning on AWS Made EasyCmp305
 
Serving predictive models with Redis
Serving predictive models with RedisServing predictive models with Redis
Serving predictive models with Redis
 
Cluster analysis
Cluster analysisCluster analysis
Cluster analysis
 

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Graduation project based on multi-label learning

  • 2. CONTANTS • Introduction • mllearn library • scene classification • summary
  • 3. IntroductionIntroduction Traditional classification f1( ) = "cat" f3( ) = "{sunset, sea, boat}" f2( ) = "0" • Binary classification • multi-class classification • multi-label classification
  • 4. Introduction Sunset Trees Mounts Sea Desert Grassland Yes No No Yes No No What is multi-label classification ?
  • 5. Introduction The data format in multi-label classification X Y X(1) 0 X(2) 1 X(3) 0 X(4) 1 X(5) 0 X ? X Y1 Y2 Y3 Y4 Y5 X(1) 0 1 1 1 0 X(2) 1 0 1 0 0 X(3) 0 0 0 1 1 X(4) 0 1 1 0 0 X(5) 1 0 0 0 1 X ? ? ? ? ? Sing-lable Multi-label
  • 6. •Problem Transformation •Algorithm Adaptation Introduction Strategies for solving a multi-Label classification Transformed Dataset multi-label Dataset tradition algs adapted algs tradition algs multi-label Dataset
  • 7. Introduction Metrics of multi-Label classification • Subset Accuracy • Hamming Loss predict real {sunset, sea} {sunest, sea, trees} × {trees, sunset} {trees, sunset} √ Label space predict real
  • 9. mllearn library Implemented algorithms • Multi-Label k-Nearest Neighbor • Ranking Support Vector Machine • Multi-Lanel Decision Tree • Collective Multi-Label Classifier • Subset Accuracy • Hamming Loss • Accuracyexam • Precision • Recall • Fβ exam mllearn • Bianary Relevance • Classifier Chains • Calibrated Lable Ranking • Random k-Labelsets metrics algs problem transform algs adaptation https://github.com/Lxinyuelxy/multi-label-learn
  • 10. Introduction The data format for multi-label classificationmllearn library >>> type(X) <type 'numpy.ndarray'> >>> X_train.shape (n_samples, n_features) >>> type(y) <type 'numpy.ndarray'> >>> y.shape (n_samples, n_labels) • Data Format X1 1, X1 2, ......, X1 n_features X2 1, X2 2, ......, X2 n_features X3 1, X3 2, ......, X3 n_features Xm 1, Xm 2, ......, Xm n_features ...... ...... ...... ...... 1, 0, 0, 1, 0 0, 1, 1, 1, 0 1, 0, 0, 0, 1 1, 0, 1, 1, 0, ...... ...... ......
  • 11. Introduction Installation & Example Usagemllearn library from mllearn.problem_transform import BinaryRelevance #from sklearn.svm import SVC #classif = BinaryRelevance(SVC(kernel='linear')) classif = BinaryRelevance() classif.fit(X_train, y_train) y_pred = classif.predict(X_test) from mllearn.metrics import subset_acc acc = subset_acc(y_test, y_pred) pip install mllearn • Installation • Example Usage
  • 12. Introduction The Datasets for testmllearn library
  • 14. The datasetscene classify Label Set #Images Label Set #Images Label Set #Images desert 340 desert+ sunset 21 sunset+trees 28 mounts 268 desert+trees 20 desert+mounts +sunset 1 sea 341 mounts+sea 38 desert+ sunset+trees 3 sunset 216 mountains+ sunset 19 mounts+sea+ trees 6 trees 378 mountains+ trees 106 mounts+ sunset+trees 1 desert+ mounts 19 sea+sunset 172 sea+sunset+ trees 4 desert+sea 5 sea+trees 14 Total 2000 http://lamda.nju.edu.cn/(X(1)S(10cedth11swjtqtcqjmwei1g))/Default.aspx?Page=dat a_MIMLimage&NS=&AspxAutoDetectCookieSupport=1
  • 15. Introduction How to choose a feature extractor ?scene classify Algorithms Binary Relevance Classifier Cahins Calibrated Label Ranking Random k- Labelsets MLKNN Implemented Hamming Loss 0.113573 0.115803 0.107581 0.097826 0.097408 0.19650 Subset Accuracy 0.496656 0.6112 0.492475 0.610368 0.568562 0.28500
  • 16. Introduction How to choose a feature extractor ?scene classify mllearn library Traditional feature extraction method [X1, X2, ..., Xd] feature extraction daisy hog Hamming loss 0.251 0.18950 Subset Accuracy 0.3275 0.44
  • 17. Solution 1: Data Augmentationscene classify
  • 18. Solution 1: CNN binary classifyscene classify trees sunset sea mounts desert Hamming Loss Subset Accuracy CNN 0.11975 0.575 https://github.com/Lxinyuelxy/multi-label-scene-classification
  • 19. Model Size Top-1 Accuracy Parameters Feature Shape VGG16 528 MB 0.715 138,357,54 4 (1, 7, 7, 512) VGG19 549 MB 0.727 143,667,24 0 (1, 7, 7, 512) Inception V3 92 MB 0.788 23,851,784 (1, 5, 5, 2048) ResNet50 99 MB 0.759 25,636,712 (1, 1, 1, 2048) Inception ResNetV2 215 MB 0.804 55,873,736 (1, 8, 8, 1536) Solution 2: RestNet50 + mllearnscene classify mllearn library ResNet50 model [X1, X2, ..., X2048] https://github.com/Lxinyuelxy/multi-label-scene-classification
  • 21. multi-label scene classify appscene classify
  • 22.
  • 23. The process of multi-label scene classificationsummery feature extractor data multi-label algorithm model unseen instance show output upload image train predict application