SlideShare a Scribd company logo
1 of 25
Learning Feature Representations with K-means
M.Koray Parkın
korayparkin[a]gmail.com
Feature Learning For Image Classification
Agenda:
I. Summary and Goal of Study
II. Learning Feature Rep. with K-means
a) i- K-means training routine (initializing & preprocessing)
b) ii- Bag of Words Method
c) iii- Comparison to Sparse Feature Learning
III. Discussion
Source paper: Learning Feature Representations with K-means
Adam Coates and Andrew Y. Ng
Stanford University, Stanford CA 94306, USA / 2012
Unlabeled images
Feature representation
Data: Unlabeled Images
Unsupervised training
algorithm
Feature Representation
I. Summary and Goal of Study
1 2
3
4
5
6
Image ID C-1 C-2 C-3 C-4 C-5 .N
1 w1 w2 w3 w4 w5 W6
2 .. .. .. .. .. ..
3 .. .. .. .. .. ..
4 .. .. .. .. .. ..
5 .. .. .. .. .. ..
6 .. .. .. .. ... ..
How many C-1 members
Image 1 have?
How many clusters
we have in total
Feature representation
Vocabulary
Supervised learning
Applications in which the training data comprises examples of the input vectors along with their
corresponding target vectors are known as supervised learning problems.
Classification(Naive Bayes, Decision tree learning algorithm)
Unsupervised learning
In other pattern recognition problems, the training data consists of a set of input vectors x without any
corresponding target values. The goal in such unsupervised learning problems may be to discover
groups of similar examples within the data, where it is called clustering
Clustering(K-mean,hierarchical clustering)
Pattern Recognition and Machine Learning (Bishop, 2006)
Feature representation
Vocabulary
K-means
Spherical K-means
The idea is to set the center of the cluster such
that it makes both uniform and minimal the
angle between components.
The points should have consistent spacing
between each other.
It prevents the clusters being to large or to
small
Input images (28*28) Patches 4*4
I. Summary and Goal of Study
1
2
3
4
.
.
.
n
1 2 3 4 . . . m Image ID Patch n,m
1 1,1
2,1
3,1
.
.
2 1,1
2,1
3,1
.
.
. .
. .
4*4 column
Pixel values
Apply
Clustering
Final patch
clusters
Image ID C-1 C-2 C-3 C-4 C-5 .N
1 w1 w2 w3 w4 w5 W
6
2 .. .. .. .. .. ..
3 .. .. .. .. .. ..
4 .. .. .. .. .. ..
5 .. .. .. .. .. ..
6 .. .. .. .. ... ..
Feature Learning For Image Classification
Agenda:
I. Summary and Goal of Study
II. Learning Feature Rep. with K-means
a) i- K-means training routine (initializing & preprocessing)
b) ii- Bag of Words Method
c) iii- Comparison to Sparse Feature Learning
III. Discussion
1- Extract patches from unlabeled training images
Each patch has dimension w-by-w and has d channels (d=3 for color images)
Each w-by-w patch can be represented as a vector in RN of pixel values, N = w · w · d
2- Apply a pre-processing stage to the patches
1-Normalization:
2-Whitening (decorrelation )
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2- Apply a pre-processing stage to the patches
1-Normalization:
- For each patch, subtract out the mean of the
intensities and divide by the standard deviation
- It is useful to normalize the brightness and contrast
of the patches
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2- Apply a pre-processing stage to the patches
2-Whitening (decorrelation )
- We need this because the high correlation
between nearby pixels even if brightness and
contrast normalization
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2-Whitening (decorrelation )
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2-Whitening (decorrelation )
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2-Whitening (decorrelation )
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2-Whitening (decorrelation )
Raw 2D data
U1 and u2 are eigen vectors and Sigma is covariance
matrix
λ1,λ2 are corresponding eigen values
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2-Whitening (decorrelation ) U1 and u2 are eigen vectors and Sigma is covariance
matrix
λ1,λ2 are corresponding eigen values
Length of the projection of x
onto the vector u1
We can represent x in (u1,u2)
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2-Whitening (decorrelation )
We can represent x in (u1,u2)
This is the training set rotated into
u1 u2 basis
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2-Whitening (decorrelation )
This data now has covariance equal to the identity matrix I
II. Learning Feature Rep. with K-means
i- K-means training routine (initializing & preprocessing)
2-Whitening (decorrelation )
This data now has covariance equal to the identity matrix I
Whitened Data PointsRaw Data Points
Feature Learning For Image Classification
Agenda:
I. Summary and Goal of Study
II. Learning Feature Rep. with K-means
a) i- K-means training routine (initializing & preprocessing)
b) ii- Bag of Words Method
c) iii- Comparison to Sparse Feature Learning
III. Discussion
II. Learning Feature Rep. with K-means
ii- Bag of Words Method - 1
•First, take a bunch of images, extract features, and build up a “dictionary” or “visual
vocabulary” – a list of common features
•Given a new image, extract features and build a histogram – for each feature, find the
closest visual word in the dictionary
II. Learning Feature Rep. with K-means
ii- Bag of Words Method - 2
histogram
Dictionary
II. Learning Feature Rep. with K-means
ii- Bag of Words Method - 3
Feature Learning For Image Classification
Agenda:
I. Summary and Goal of Study
II. Learning Feature Rep. with K-means
a) i- K-means training routine (initializing & preprocessing)
b) ii- Bag of Words Method
c) iii- Comparison to Sparse Feature Learning
III. Discussion
Centroid 1
Centroid 2
Centroid 3
K-means
Represent as:
Represent as:
Basis f1
Sparse coding
Basis f2
Basis f3
II. Learning Feature Rep. with K-means
iii- Comparison to Sparse Feature Learning
Whenever using k-means to get a dictionary, if you replace it
with sparse coding it’ll often work better.
III. References
http://ufldl.stanford.edu/wiki/index.php/Whitening#Introduction
http://ufldl.stanford.edu/tutorial/unsupervised/PCAWhitening/
http://www.mathworks.com/help/images/ref/decorrstretch.html
http://www.mathworks.com/help/images/enhance-color-separation-using-decorrelation-stretching.html
https://www.physicsforums.com/threads/what-is-the-difference-between-whitening-and-pca.635358/
http://deeplearning.stanford.edu/wiki/index.php/Exercise:PCA_and_Whitening
Source paper: Learning Feature Representations with K-means
Adam Coates and Andrew Y. Ng
Stanford University, Stanford CA 94306, USA / 2012

More Related Content

What's hot

Review of Diverse Techniques Used for Effective Fractal Image Compression
Review of Diverse Techniques Used for Effective Fractal Image CompressionReview of Diverse Techniques Used for Effective Fractal Image Compression
Review of Diverse Techniques Used for Effective Fractal Image CompressionIRJET Journal
 
Proposed algorithm for image classification using regression-based pre-proces...
Proposed algorithm for image classification using regression-based pre-proces...Proposed algorithm for image classification using regression-based pre-proces...
Proposed algorithm for image classification using regression-based pre-proces...IJECEIAES
 
Image Retrieval Using VLAD with Multiple Features
Image Retrieval Using VLAD with Multiple FeaturesImage Retrieval Using VLAD with Multiple Features
Image Retrieval Using VLAD with Multiple Featurescsandit
 
TARGET DETECTION AND CLASSIFICATION IMPROVEMENTS USING CONTRAST ENHANCED 16-B...
TARGET DETECTION AND CLASSIFICATION IMPROVEMENTS USING CONTRAST ENHANCED 16-B...TARGET DETECTION AND CLASSIFICATION IMPROVEMENTS USING CONTRAST ENHANCED 16-B...
TARGET DETECTION AND CLASSIFICATION IMPROVEMENTS USING CONTRAST ENHANCED 16-B...sipij
 
A Framework for Curved Videotext Detection and Extraction
A Framework for Curved Videotext Detection and ExtractionA Framework for Curved Videotext Detection and Extraction
A Framework for Curved Videotext Detection and ExtractionIJERA Editor
 
An improved image compression algorithm based on daubechies wavelets with ar...
An improved image compression algorithm based on daubechies  wavelets with ar...An improved image compression algorithm based on daubechies  wavelets with ar...
An improved image compression algorithm based on daubechies wavelets with ar...Alexander Decker
 
Colorization of Greyscale Images Using Kekre’s Biorthogonal Color Spaces and ...
Colorization of Greyscale Images Using Kekre’s Biorthogonal Color Spaces and ...Colorization of Greyscale Images Using Kekre’s Biorthogonal Color Spaces and ...
Colorization of Greyscale Images Using Kekre’s Biorthogonal Color Spaces and ...Waqas Tariq
 
Ijarcet vol-2-issue-7-2319-2322
Ijarcet vol-2-issue-7-2319-2322Ijarcet vol-2-issue-7-2319-2322
Ijarcet vol-2-issue-7-2319-2322Editor IJARCET
 
Content Based Video Retrieval in Transformed Domain using Fractional Coeffici...
Content Based Video Retrieval in Transformed Domain using Fractional Coeffici...Content Based Video Retrieval in Transformed Domain using Fractional Coeffici...
Content Based Video Retrieval in Transformed Domain using Fractional Coeffici...CSCJournals
 
Image analysis using python
Image analysis using pythonImage analysis using python
Image analysis using pythonJerlyn Manohar
 
IRJET - Handwritten Bangla Digit Recognition using Capsule Network
IRJET -  	  Handwritten Bangla Digit Recognition using Capsule NetworkIRJET -  	  Handwritten Bangla Digit Recognition using Capsule Network
IRJET - Handwritten Bangla Digit Recognition using Capsule NetworkIRJET Journal
 

What's hot (14)

Review of Diverse Techniques Used for Effective Fractal Image Compression
Review of Diverse Techniques Used for Effective Fractal Image CompressionReview of Diverse Techniques Used for Effective Fractal Image Compression
Review of Diverse Techniques Used for Effective Fractal Image Compression
 
H045064549
H045064549H045064549
H045064549
 
Proposed algorithm for image classification using regression-based pre-proces...
Proposed algorithm for image classification using regression-based pre-proces...Proposed algorithm for image classification using regression-based pre-proces...
Proposed algorithm for image classification using regression-based pre-proces...
 
C044021013
C044021013C044021013
C044021013
 
Image Retrieval Using VLAD with Multiple Features
Image Retrieval Using VLAD with Multiple FeaturesImage Retrieval Using VLAD with Multiple Features
Image Retrieval Using VLAD with Multiple Features
 
TARGET DETECTION AND CLASSIFICATION IMPROVEMENTS USING CONTRAST ENHANCED 16-B...
TARGET DETECTION AND CLASSIFICATION IMPROVEMENTS USING CONTRAST ENHANCED 16-B...TARGET DETECTION AND CLASSIFICATION IMPROVEMENTS USING CONTRAST ENHANCED 16-B...
TARGET DETECTION AND CLASSIFICATION IMPROVEMENTS USING CONTRAST ENHANCED 16-B...
 
A Framework for Curved Videotext Detection and Extraction
A Framework for Curved Videotext Detection and ExtractionA Framework for Curved Videotext Detection and Extraction
A Framework for Curved Videotext Detection and Extraction
 
An improved image compression algorithm based on daubechies wavelets with ar...
An improved image compression algorithm based on daubechies  wavelets with ar...An improved image compression algorithm based on daubechies  wavelets with ar...
An improved image compression algorithm based on daubechies wavelets with ar...
 
Colorization of Greyscale Images Using Kekre’s Biorthogonal Color Spaces and ...
Colorization of Greyscale Images Using Kekre’s Biorthogonal Color Spaces and ...Colorization of Greyscale Images Using Kekre’s Biorthogonal Color Spaces and ...
Colorization of Greyscale Images Using Kekre’s Biorthogonal Color Spaces and ...
 
Ijarcet vol-2-issue-7-2319-2322
Ijarcet vol-2-issue-7-2319-2322Ijarcet vol-2-issue-7-2319-2322
Ijarcet vol-2-issue-7-2319-2322
 
Content Based Video Retrieval in Transformed Domain using Fractional Coeffici...
Content Based Video Retrieval in Transformed Domain using Fractional Coeffici...Content Based Video Retrieval in Transformed Domain using Fractional Coeffici...
Content Based Video Retrieval in Transformed Domain using Fractional Coeffici...
 
Image analysis using python
Image analysis using pythonImage analysis using python
Image analysis using python
 
.doc
.doc.doc
.doc
 
IRJET - Handwritten Bangla Digit Recognition using Capsule Network
IRJET -  	  Handwritten Bangla Digit Recognition using Capsule NetworkIRJET -  	  Handwritten Bangla Digit Recognition using Capsule Network
IRJET - Handwritten Bangla Digit Recognition using Capsule Network
 

Similar to Learning Feature Representations with K-means

Learning with Relative Attributes
Learning with Relative AttributesLearning with Relative Attributes
Learning with Relative AttributesVikas Jain
 
Image Classification using Deep Learning
Image Classification using Deep LearningImage Classification using Deep Learning
Image Classification using Deep LearningIRJET Journal
 
Digital Image Processing - Course Description
Digital Image Processing - Course DescriptionDigital Image Processing - Course Description
Digital Image Processing - Course DescriptionAnto Kumar
 
Week2- Deep Learning Intuition.pptx
Week2- Deep Learning Intuition.pptxWeek2- Deep Learning Intuition.pptx
Week2- Deep Learning Intuition.pptxfahmi324663
 
Mayank Raj - 4th Year Project on CBIR (Content Based Image Retrieval)
Mayank Raj - 4th Year Project on CBIR (Content Based Image Retrieval)Mayank Raj - 4th Year Project on CBIR (Content Based Image Retrieval)
Mayank Raj - 4th Year Project on CBIR (Content Based Image Retrieval)mayankraj86
 
Multi-target prediction problem setting selection
Multi-target prediction problem setting selectionMulti-target prediction problem setting selection
Multi-target prediction problem setting selectionssuser7f1cc7
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfssuserb4d806
 
Deep learning in Computer Vision
Deep learning in Computer VisionDeep learning in Computer Vision
Deep learning in Computer VisionDavid Dao
 
A Hybrid Approach for Content Based Image Retrieval System
A Hybrid Approach for Content Based Image Retrieval SystemA Hybrid Approach for Content Based Image Retrieval System
A Hybrid Approach for Content Based Image Retrieval SystemIOSR Journals
 
Automated Image Captioning – Model Based on CNN – GRU Architecture
Automated Image Captioning – Model Based on CNN – GRU ArchitectureAutomated Image Captioning – Model Based on CNN – GRU Architecture
Automated Image Captioning – Model Based on CNN – GRU ArchitectureIRJET Journal
 
Ug 205-image-retrieval-using-re-ranking-algorithm-11
Ug 205-image-retrieval-using-re-ranking-algorithm-11Ug 205-image-retrieval-using-re-ranking-algorithm-11
Ug 205-image-retrieval-using-re-ranking-algorithm-11Ijcem Journal
 
IMAGE SEGMENTATION AND ITS TECHNIQUES
IMAGE SEGMENTATION AND ITS TECHNIQUESIMAGE SEGMENTATION AND ITS TECHNIQUES
IMAGE SEGMENTATION AND ITS TECHNIQUESIRJET Journal
 
Review : Rethinking Pre-training and Self-training
Review : Rethinking Pre-training and Self-trainingReview : Rethinking Pre-training and Self-training
Review : Rethinking Pre-training and Self-trainingDongmin Choi
 
Introduction_image_processing_and_applications_.pptx
Introduction_image_processing_and_applications_.pptxIntroduction_image_processing_and_applications_.pptx
Introduction_image_processing_and_applications_.pptxVINOTHRAJR1
 
Comparison on PCA ICA and LDA in Face Recognition
Comparison on PCA ICA and LDA in Face RecognitionComparison on PCA ICA and LDA in Face Recognition
Comparison on PCA ICA and LDA in Face Recognitionijdmtaiir
 
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 featuresHirantha Pradeep
 
Attention-based Models (DLAI D8L 2017 UPC Deep Learning for Artificial Intell...
Attention-based Models (DLAI D8L 2017 UPC Deep Learning for Artificial Intell...Attention-based Models (DLAI D8L 2017 UPC Deep Learning for Artificial Intell...
Attention-based Models (DLAI D8L 2017 UPC Deep Learning for Artificial Intell...Universitat Politècnica de Catalunya
 

Similar to Learning Feature Representations with K-means (20)

Learning with Relative Attributes
Learning with Relative AttributesLearning with Relative Attributes
Learning with Relative Attributes
 
Image Classification using Deep Learning
Image Classification using Deep LearningImage Classification using Deep Learning
Image Classification using Deep Learning
 
Digital Image Processing - Course Description
Digital Image Processing - Course DescriptionDigital Image Processing - Course Description
Digital Image Processing - Course Description
 
Week2- Deep Learning Intuition.pptx
Week2- Deep Learning Intuition.pptxWeek2- Deep Learning Intuition.pptx
Week2- Deep Learning Intuition.pptx
 
Mayank Raj - 4th Year Project on CBIR (Content Based Image Retrieval)
Mayank Raj - 4th Year Project on CBIR (Content Based Image Retrieval)Mayank Raj - 4th Year Project on CBIR (Content Based Image Retrieval)
Mayank Raj - 4th Year Project on CBIR (Content Based Image Retrieval)
 
Multi-target prediction problem setting selection
Multi-target prediction problem setting selectionMulti-target prediction problem setting selection
Multi-target prediction problem setting selection
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
 
Deep learning in Computer Vision
Deep learning in Computer VisionDeep learning in Computer Vision
Deep learning in Computer Vision
 
A Hybrid Approach for Content Based Image Retrieval System
A Hybrid Approach for Content Based Image Retrieval SystemA Hybrid Approach for Content Based Image Retrieval System
A Hybrid Approach for Content Based Image Retrieval System
 
Relative attributes
Relative attributesRelative attributes
Relative attributes
 
Automated Image Captioning – Model Based on CNN – GRU Architecture
Automated Image Captioning – Model Based on CNN – GRU ArchitectureAutomated Image Captioning – Model Based on CNN – GRU Architecture
Automated Image Captioning – Model Based on CNN – GRU Architecture
 
Ug 205-image-retrieval-using-re-ranking-algorithm-11
Ug 205-image-retrieval-using-re-ranking-algorithm-11Ug 205-image-retrieval-using-re-ranking-algorithm-11
Ug 205-image-retrieval-using-re-ranking-algorithm-11
 
Depth estimation using deep learning
Depth estimation using deep learningDepth estimation using deep learning
Depth estimation using deep learning
 
IMAGE SEGMENTATION AND ITS TECHNIQUES
IMAGE SEGMENTATION AND ITS TECHNIQUESIMAGE SEGMENTATION AND ITS TECHNIQUES
IMAGE SEGMENTATION AND ITS TECHNIQUES
 
Review : Rethinking Pre-training and Self-training
Review : Rethinking Pre-training and Self-trainingReview : Rethinking Pre-training and Self-training
Review : Rethinking Pre-training and Self-training
 
Introduction_image_processing_and_applications_.pptx
Introduction_image_processing_and_applications_.pptxIntroduction_image_processing_and_applications_.pptx
Introduction_image_processing_and_applications_.pptx
 
Comparison on PCA ICA and LDA in Face Recognition
Comparison on PCA ICA and LDA in Face RecognitionComparison on PCA ICA and LDA in Face Recognition
Comparison on PCA ICA and LDA in Face Recognition
 
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
 
Attention-based Models (DLAI D8L 2017 UPC Deep Learning for Artificial Intell...
Attention-based Models (DLAI D8L 2017 UPC Deep Learning for Artificial Intell...Attention-based Models (DLAI D8L 2017 UPC Deep Learning for Artificial Intell...
Attention-based Models (DLAI D8L 2017 UPC Deep Learning for Artificial Intell...
 
Machine_Learning_Co__
Machine_Learning_Co__Machine_Learning_Co__
Machine_Learning_Co__
 

Recently uploaded

Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsJoseMangaJr1
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...amitlee9823
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Pooja Nehwal
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...amitlee9823
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...amitlee9823
 

Recently uploaded (20)

Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 

Learning Feature Representations with K-means

  • 1. Learning Feature Representations with K-means M.Koray Parkın korayparkin[a]gmail.com
  • 2. Feature Learning For Image Classification Agenda: I. Summary and Goal of Study II. Learning Feature Rep. with K-means a) i- K-means training routine (initializing & preprocessing) b) ii- Bag of Words Method c) iii- Comparison to Sparse Feature Learning III. Discussion Source paper: Learning Feature Representations with K-means Adam Coates and Andrew Y. Ng Stanford University, Stanford CA 94306, USA / 2012
  • 3. Unlabeled images Feature representation Data: Unlabeled Images Unsupervised training algorithm Feature Representation I. Summary and Goal of Study 1 2 3 4 5 6 Image ID C-1 C-2 C-3 C-4 C-5 .N 1 w1 w2 w3 w4 w5 W6 2 .. .. .. .. .. .. 3 .. .. .. .. .. .. 4 .. .. .. .. .. .. 5 .. .. .. .. .. .. 6 .. .. .. .. ... .. How many C-1 members Image 1 have? How many clusters we have in total
  • 4. Feature representation Vocabulary Supervised learning Applications in which the training data comprises examples of the input vectors along with their corresponding target vectors are known as supervised learning problems. Classification(Naive Bayes, Decision tree learning algorithm) Unsupervised learning In other pattern recognition problems, the training data consists of a set of input vectors x without any corresponding target values. The goal in such unsupervised learning problems may be to discover groups of similar examples within the data, where it is called clustering Clustering(K-mean,hierarchical clustering) Pattern Recognition and Machine Learning (Bishop, 2006)
  • 5. Feature representation Vocabulary K-means Spherical K-means The idea is to set the center of the cluster such that it makes both uniform and minimal the angle between components. The points should have consistent spacing between each other. It prevents the clusters being to large or to small
  • 6. Input images (28*28) Patches 4*4 I. Summary and Goal of Study 1 2 3 4 . . . n 1 2 3 4 . . . m Image ID Patch n,m 1 1,1 2,1 3,1 . . 2 1,1 2,1 3,1 . . . . . . 4*4 column Pixel values Apply Clustering Final patch clusters Image ID C-1 C-2 C-3 C-4 C-5 .N 1 w1 w2 w3 w4 w5 W 6 2 .. .. .. .. .. .. 3 .. .. .. .. .. .. 4 .. .. .. .. .. .. 5 .. .. .. .. .. .. 6 .. .. .. .. ... ..
  • 7. Feature Learning For Image Classification Agenda: I. Summary and Goal of Study II. Learning Feature Rep. with K-means a) i- K-means training routine (initializing & preprocessing) b) ii- Bag of Words Method c) iii- Comparison to Sparse Feature Learning III. Discussion
  • 8. 1- Extract patches from unlabeled training images Each patch has dimension w-by-w and has d channels (d=3 for color images) Each w-by-w patch can be represented as a vector in RN of pixel values, N = w · w · d 2- Apply a pre-processing stage to the patches 1-Normalization: 2-Whitening (decorrelation ) II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing)
  • 9. 2- Apply a pre-processing stage to the patches 1-Normalization: - For each patch, subtract out the mean of the intensities and divide by the standard deviation - It is useful to normalize the brightness and contrast of the patches II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing)
  • 10. 2- Apply a pre-processing stage to the patches 2-Whitening (decorrelation ) - We need this because the high correlation between nearby pixels even if brightness and contrast normalization II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing)
  • 11. II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing) 2-Whitening (decorrelation )
  • 12. II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing) 2-Whitening (decorrelation )
  • 13. II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing) 2-Whitening (decorrelation )
  • 14. II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing) 2-Whitening (decorrelation ) Raw 2D data U1 and u2 are eigen vectors and Sigma is covariance matrix λ1,λ2 are corresponding eigen values
  • 15. II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing) 2-Whitening (decorrelation ) U1 and u2 are eigen vectors and Sigma is covariance matrix λ1,λ2 are corresponding eigen values Length of the projection of x onto the vector u1 We can represent x in (u1,u2)
  • 16. II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing) 2-Whitening (decorrelation ) We can represent x in (u1,u2) This is the training set rotated into u1 u2 basis
  • 17. II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing) 2-Whitening (decorrelation ) This data now has covariance equal to the identity matrix I
  • 18. II. Learning Feature Rep. with K-means i- K-means training routine (initializing & preprocessing) 2-Whitening (decorrelation ) This data now has covariance equal to the identity matrix I Whitened Data PointsRaw Data Points
  • 19. Feature Learning For Image Classification Agenda: I. Summary and Goal of Study II. Learning Feature Rep. with K-means a) i- K-means training routine (initializing & preprocessing) b) ii- Bag of Words Method c) iii- Comparison to Sparse Feature Learning III. Discussion
  • 20. II. Learning Feature Rep. with K-means ii- Bag of Words Method - 1 •First, take a bunch of images, extract features, and build up a “dictionary” or “visual vocabulary” – a list of common features •Given a new image, extract features and build a histogram – for each feature, find the closest visual word in the dictionary
  • 21. II. Learning Feature Rep. with K-means ii- Bag of Words Method - 2
  • 22. histogram Dictionary II. Learning Feature Rep. with K-means ii- Bag of Words Method - 3
  • 23. Feature Learning For Image Classification Agenda: I. Summary and Goal of Study II. Learning Feature Rep. with K-means a) i- K-means training routine (initializing & preprocessing) b) ii- Bag of Words Method c) iii- Comparison to Sparse Feature Learning III. Discussion
  • 24. Centroid 1 Centroid 2 Centroid 3 K-means Represent as: Represent as: Basis f1 Sparse coding Basis f2 Basis f3 II. Learning Feature Rep. with K-means iii- Comparison to Sparse Feature Learning Whenever using k-means to get a dictionary, if you replace it with sparse coding it’ll often work better.

Editor's Notes

  1. https://www.physicsforums.com/threads/what-is-the-difference-between-whitening-and-pca.635358/ http://deeplearning.stanford.edu/wiki/index.php/Exercise:PCA_and_Whitening the raw input is redundant, since adjacent pixel values are highly correlated. The goal of whitening is to make the input less redundant; more formally, our desiderata are that our learning algorithms sees a training input where (i) the features are less correlated with each other, and (ii) the features all have the same variance. http://ufldl.stanford.edu/tutorial/unsupervised/PCAWhitening/
  2. http://www.mathworks.com/help/images/ref/decorrstretch.html http://www.mathworks.com/help/images/enhance-color-separation-using-decorrelation-stretching.html
  3. http://ufldl.stanford.edu/wiki/index.php/Whitening#Introduction http://ufldl.stanford.edu/tutorial/unsupervised/PCAWhitening/