SlideShare a Scribd company logo
1 of 12
Download to read offline
Author:
Ioan Cristian Schuszter
Supervisor:
Lector Dr. Cosmin Bonchiș
Timișoara, 2016
West University of Timișoara
Faculty of Mathematics and Computer Science
Department of Computer Science
1. Problem statement
2. Application architecture
3. Database structure
4. Classifier creation workflow
5. Case study and results
6. Conclusions and future improvements
Table of Contents
Problem statement
• Machine learning – highly experimental, difficult to use without
much domain knowledge
• General-purpose image classification workflow, allowing users to
build models and publish them for usage from any device.
• Main features:
• Data acquisition, data cleaning, parameter tuning, feature extraction,
classifier creation, basic statistics and publishing.
• Case study: classification of traffic signs
Application architecture
• Three components that can be decoupled from
each-other at any level.
1. A Python image classification library.
• API for all the major functionalities
• Sqlite database, OpenCV, NumPy and scikit-learn
• Only part that’s not replaceable, forming the base
of the stack.
2. Flask server
• Exposes API for interaction with the “imclas” library in the application.
• Uses Flask microframework to provide a REST service
• Split into several modules in order to allow easy extension:
• Mod_collections
• Mod_models
• Mod_root
• Could be replaced with any other WSGI-compliant server.
Application architecture (2)
3. AngularJS web application
• Single page application
• Communicates with Flask middleware
• Provides UI access to components of the library
• Can be replaced by any kind of app
that can access the web, like mobile apps.
Application architecture (3)
• Several entities were
needed to persist classifiers
• Images stored as paths
instead of blobs for access
speed.
• Classifiers also stored as
filesystem paths, serialized
in “.model” files.
Database structure
• Based on work done by Csurka et al., Xerox Research Center, 2004
1. Data acquisition using Bing Image Search API, possibility to do manual clean-up after
download.
2. Feature extraction.
• Computer Vision – OpenCV Python bindings used.
• Bag-of-features model from text analytics.
• SIFT algorithm used for keypoint and feature extraction.
Classifier creation workflow (1)
3. Feature clustering using K-means classifier
• Can be tuned from the UI, by specifying number of clusters
• Benefits from multiple cores / processors, takes a lot of time.
• Each image is represented then as a normalized histogram with k bins.
4. Classifier creation
• SVM classifier type, used with chi-squared kernel, saved in the db
together with some statistics and serialized (cPickle Python library).
• Train-test data ratio and other parameters sent from the UI
Classifier creation workflow (2)
• Original study done on 5 categories: bikes, planes, faces, cars
and backgrounds, very accurate results (~98%).
• Our study done on 6 different types of traffic signs.
Case study and results
• Original study: 1000 clusters, 0.5 train-test split, chi-squared
kernel. (Csurka et al. 2004)
• Our study: 100 clusters and 0.8 train-test split. Chi-squared kernel
as in the original. Total signs: 909 images, 725 train, 184 test
• Accuracy of ~70%, confusion matrix in previous slide.
• Binary experiment also done, 92% accuracy (no left turn signs,
stop signs), 50 clusters.
Case study and results (2)
• Easy-to-use and extensible framework.
• Take position and color into account for
classifier.
• K-means takes a long time, cluster computing
could help.
• Mobile app that uses camera to access
published models.
Thank you!
Conclusions and
improvements

More Related Content

Similar to Bachelor-Thesis

Rapid object detection using boosted cascade of simple features
Rapid object detection using boosted  cascade of simple featuresRapid object detection using boosted  cascade of simple features
Rapid object detection using boosted cascade of simple features
Hirantha Pradeep
 
TechnicalBackgroundOverview
TechnicalBackgroundOverviewTechnicalBackgroundOverview
TechnicalBackgroundOverview
Motaz El-Saban
 
MS Word file resumes16869r.doc.doc
MS Word file resumes16869r.doc.docMS Word file resumes16869r.doc.doc
MS Word file resumes16869r.doc.doc
butest
 

Similar to Bachelor-Thesis (20)

Legion - AI Runtime Platform
Legion -  AI Runtime PlatformLegion -  AI Runtime Platform
Legion - AI Runtime Platform
 
Rapid object detection using boosted cascade of simple features
Rapid object detection using boosted  cascade of simple featuresRapid object detection using boosted  cascade of simple features
Rapid object detection using boosted cascade of simple features
 
C19013010 the tutorial to build shared ai services session 1
C19013010  the tutorial to build shared ai services session 1C19013010  the tutorial to build shared ai services session 1
C19013010 the tutorial to build shared ai services session 1
 
AISF19 - Unleash Computer Vision at the Edge
AISF19 - Unleash Computer Vision at the EdgeAISF19 - Unleash Computer Vision at the Edge
AISF19 - Unleash Computer Vision at the Edge
 
Combining Machine Learning frameworks with Apache Spark
Combining Machine Learning frameworks with Apache SparkCombining Machine Learning frameworks with Apache Spark
Combining Machine Learning frameworks with Apache Spark
 
TechnicalBackgroundOverview
TechnicalBackgroundOverviewTechnicalBackgroundOverview
TechnicalBackgroundOverview
 
Deep learning with keras
Deep learning with kerasDeep learning with keras
Deep learning with keras
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
 
MS Word file resumes16869r.doc.doc
MS Word file resumes16869r.doc.docMS Word file resumes16869r.doc.doc
MS Word file resumes16869r.doc.doc
 
Resume - NarasimhaReddy
Resume - NarasimhaReddyResume - NarasimhaReddy
Resume - NarasimhaReddy
 
Developing Digital Twins
Developing Digital TwinsDeveloping Digital Twins
Developing Digital Twins
 
Spark Technology Center IBM
Spark Technology Center IBMSpark Technology Center IBM
Spark Technology Center IBM
 
Strata parallel m-ml-ops_sept_2017
Strata parallel m-ml-ops_sept_2017Strata parallel m-ml-ops_sept_2017
Strata parallel m-ml-ops_sept_2017
 
resume
resumeresume
resume
 
Python ml
Python mlPython ml
Python ml
 
Machine Learning Platform Life-Cycle Management
Machine Learning Platform Life-Cycle ManagementMachine Learning Platform Life-Cycle Management
Machine Learning Platform Life-Cycle Management
 
opnet
opnetopnet
opnet
 
Deep Learning with CNTK
Deep Learning with CNTKDeep Learning with CNTK
Deep Learning with CNTK
 
The Data Science Process - Do we need it and how to apply?
The Data Science Process - Do we need it and how to apply?The Data Science Process - Do we need it and how to apply?
The Data Science Process - Do we need it and how to apply?
 
01 foundations
01 foundations01 foundations
01 foundations
 

Bachelor-Thesis

  • 1. Author: Ioan Cristian Schuszter Supervisor: Lector Dr. Cosmin Bonchiș Timișoara, 2016 West University of Timișoara Faculty of Mathematics and Computer Science Department of Computer Science
  • 2. 1. Problem statement 2. Application architecture 3. Database structure 4. Classifier creation workflow 5. Case study and results 6. Conclusions and future improvements Table of Contents
  • 3. Problem statement • Machine learning – highly experimental, difficult to use without much domain knowledge • General-purpose image classification workflow, allowing users to build models and publish them for usage from any device. • Main features: • Data acquisition, data cleaning, parameter tuning, feature extraction, classifier creation, basic statistics and publishing. • Case study: classification of traffic signs
  • 4. Application architecture • Three components that can be decoupled from each-other at any level. 1. A Python image classification library. • API for all the major functionalities • Sqlite database, OpenCV, NumPy and scikit-learn • Only part that’s not replaceable, forming the base of the stack.
  • 5. 2. Flask server • Exposes API for interaction with the “imclas” library in the application. • Uses Flask microframework to provide a REST service • Split into several modules in order to allow easy extension: • Mod_collections • Mod_models • Mod_root • Could be replaced with any other WSGI-compliant server. Application architecture (2)
  • 6. 3. AngularJS web application • Single page application • Communicates with Flask middleware • Provides UI access to components of the library • Can be replaced by any kind of app that can access the web, like mobile apps. Application architecture (3)
  • 7. • Several entities were needed to persist classifiers • Images stored as paths instead of blobs for access speed. • Classifiers also stored as filesystem paths, serialized in “.model” files. Database structure
  • 8. • Based on work done by Csurka et al., Xerox Research Center, 2004 1. Data acquisition using Bing Image Search API, possibility to do manual clean-up after download. 2. Feature extraction. • Computer Vision – OpenCV Python bindings used. • Bag-of-features model from text analytics. • SIFT algorithm used for keypoint and feature extraction. Classifier creation workflow (1)
  • 9. 3. Feature clustering using K-means classifier • Can be tuned from the UI, by specifying number of clusters • Benefits from multiple cores / processors, takes a lot of time. • Each image is represented then as a normalized histogram with k bins. 4. Classifier creation • SVM classifier type, used with chi-squared kernel, saved in the db together with some statistics and serialized (cPickle Python library). • Train-test data ratio and other parameters sent from the UI Classifier creation workflow (2)
  • 10. • Original study done on 5 categories: bikes, planes, faces, cars and backgrounds, very accurate results (~98%). • Our study done on 6 different types of traffic signs. Case study and results
  • 11. • Original study: 1000 clusters, 0.5 train-test split, chi-squared kernel. (Csurka et al. 2004) • Our study: 100 clusters and 0.8 train-test split. Chi-squared kernel as in the original. Total signs: 909 images, 725 train, 184 test • Accuracy of ~70%, confusion matrix in previous slide. • Binary experiment also done, 92% accuracy (no left turn signs, stop signs), 50 clusters. Case study and results (2)
  • 12. • Easy-to-use and extensible framework. • Take position and color into account for classifier. • K-means takes a long time, cluster computing could help. • Mobile app that uses camera to access published models. Thank you! Conclusions and improvements