Machine learning Pattern recognition. Classification/Clustering GW Chapter 12 (some concepts) Textures

Similar documents
Pattern recognition. Classification/Clustering GW Chapter 12 (some concepts) Textures

Pattern recognition. Classification/Clustering GW Chapter 12 (some concepts) Textures

Region-based Segmentation

Wavelet Applications. Texture analysis&synthesis. Gloria Menegaz 1

Digital Image Processing. Lecture # 15 Image Segmentation & Texture

Lecture 6: Multimedia Information Retrieval Dr. Jian Zhang

Classification. Vladimir Curic. Centre for Image Analysis Swedish University of Agricultural Sciences Uppsala University

Practical Image and Video Processing Using MATLAB

Digital Image Processing

Content Based Image Retrieval

CSSE463: Image Recognition Day 21

Classification. Vladimir Curic. Centre for Image Analysis Swedish University of Agricultural Sciences Uppsala University

Feature extraction. Bi-Histogram Binarization Entropy. What is texture Texture primitives. Filter banks 2D Fourier Transform Wavlet maxima points

Wavelet-based Texture Segmentation: Two Case Studies

Lecture 11: Classification

Histograms. h(r k ) = n k. p(r k )= n k /NM. Histogram: number of times intensity level rk appears in the image

Segmentation Computer Vision Spring 2018, Lecture 27

Machine Learning : Clustering, Self-Organizing Maps

A Statistical Approach to Culture Colors Distribution in Video Sensors Angela D Angelo, Jean-Luc Dugelay

CIE L*a*b* color model

Idea. Found boundaries between regions (edges) Didn t return the actual region

Color Image Segmentation

Texture. Texture is a description of the spatial arrangement of color or intensities in an image or a selected region of an image.

Motion Estimation and Optical Flow Tracking

COSC160: Detection and Classification. Jeremy Bolton, PhD Assistant Teaching Professor

INF 4300 Classification III Anne Solberg The agenda today:

Extraction of Color and Texture Features of an Image

Texture. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors

ECG782: Multidimensional Digital Signal Processing

Texture Image Segmentation using FCM

Feature Extraction from Wavelet Coefficients for Pattern Recognition Tasks. Rajat Aggarwal Chandu Sharvani Koteru Gopinath

Classifying Images with Visual/Textual Cues. By Steven Kappes and Yan Cao

Introduction to Artificial Intelligence

EE 701 ROBOT VISION. Segmentation

Content-based Image and Video Retrieval. Image Segmentation

CCITC Shervan Fekri-Ershad Department of Computer Science and Engineering Shiraz University Shiraz, Fars, Iran

Textural Features for Image Database Retrieval

CoE4TN4 Image Processing

An Introduction to Content Based Image Retrieval

Boundary descriptors. Representation REPRESENTATION & DESCRIPTION. Descriptors. Moore boundary tracking

CHAPTER 2 TEXTURE CLASSIFICATION METHODS GRAY LEVEL CO-OCCURRENCE MATRIX AND TEXTURE UNIT

Chapter 11 Representation & Description

Chapter 3 Image Registration. Chapter 3 Image Registration

ELEC Dr Reji Mathew Electrical Engineering UNSW

Spectral Classification

Unsupervised Learning

Using Machine Learning for Classification of Cancer Cells

Lecture: k-means & mean-shift clustering

Lecture: k-means & mean-shift clustering

Texture Segmentation by Windowed Projection

MRT based Adaptive Transform Coder with Classified Vector Quantization (MATC-CVQ)

human vision: grouping k-means clustering graph-theoretic clustering Hough transform line fitting RANSAC

Methods for Intelligent Systems

Random spatial sampling and majority voting based image thresholding

Texture Classification by Combining Local Binary Pattern Features and a Self-Organizing Map

Image processing & Computer vision Xử lí ảnh và thị giác máy tính

Pattern Recognition. Kjell Elenius. Speech, Music and Hearing KTH. March 29, 2007 Speech recognition

Segmentation by Clustering. Segmentation by Clustering Reading: Chapter 14 (skip 14.5) General ideas

Segmentation by Clustering Reading: Chapter 14 (skip 14.5)

Texture Analysis of Painted Strokes 1) Martin Lettner, Paul Kammerer, Robert Sablatnig

A Review on Plant Disease Detection using Image Processing

Automatic Colorization of Grayscale Images

Neural Network based textural labeling of images in multimedia applications

Evaluation of texture features for image segmentation

TEXTURE. Plan for today. Segmentation problems. What is segmentation? INF 4300 Digital Image Analysis. Why texture, and what is it?

COMPUTER AND ROBOT VISION

Texture classification using fuzzy uncertainty texture spectrum

Clustering CS 550: Machine Learning

SD 372 Pattern Recognition

VC 11/12 T14 Visual Feature Extraction

Color Content Based Image Classification

Discriminate Analysis

COMPARISION OF NORMAL Vs HERNIATED CERVICAL IMAGES USING GRAY LEVEL TEXTURE FEATURES

A Texture Extraction Technique for. Cloth Pattern Identification

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Recognition: Face Recognition. Linda Shapiro EE/CSE 576

Application of fuzzy set theory in image analysis. Nataša Sladoje Centre for Image Analysis

Analysis of Image and Video Using Color, Texture and Shape Features for Object Identification

CHAPTER 4 SEGMENTATION

Color Local Texture Features Based Face Recognition

Texture Based Image Segmentation and analysis of medical image

Aggregated Color Descriptors for Land Use Classification

Nonparametric Clustering of High Dimensional Data

Olmo S. Zavala Romero. Clustering Hierarchical Distance Group Dist. K-means. Center of Atmospheric Sciences, UNAM.

EE 584 MACHINE VISION

Robust PDF Table Locator

Figure (5) Kohonen Self-Organized Map

Remote Sensing & Photogrammetry W4. Beata Hejmanowska Building C4, room 212, phone:

CHAPTER 3 FEATURE EXTRACTION

ECE 176 Digital Image Processing Handout #14 Pamela Cosman 4/29/05 TEXTURE ANALYSIS

Gene Clustering & Classification

ECEN 447 Digital Image Processing

Schedule for Rest of Semester

Cell Clustering Using Shape and Cell Context. Descriptor

One image is worth 1,000 words

Color-Texture Segmentation of Medical Images Based on Local Contrast Information

Abdollah Homaifar (PhD) Duke Energy Eminent Professor Department of Electrical and Computer Engineering North Carolina A&T State University

Robust Shape Retrieval Using Maximum Likelihood Theory

Cluster Analysis. Angela Montanari and Laura Anderlucci

Chapter 4 - Image. Digital Libraries and Content Management

Transcription:

Machine learning Pattern recognition Classification/Clustering GW Chapter 12 (some concepts) Textures

Patterns and pattern classes Pattern: arrangement of descriptors Descriptors: features Patten class: family of patterns that share common properties denoted by ω 1, ω 2, ω 3,, ω n Pattern recognition: assigning patterns to the respective classes Patterns are represented by vectors of descriptors called feature vectors FV=[x 1,x 2,,x n ] T The nature of the features depends on the problem 2

Patterns and pattern classes Task: distinguish flowers based on the length and width of petals 3

Feature selection problem Identify the features that lead to the maximum separability among classes Features vary both within and between classes. Classes are separable if instances of the same classes have features that are more similar among them then to the features of objects belonging to different classes. In this case, a boundary can be identified in the feature space separating objects belonging to different classes Goal of feature selection: minimize variability within classes and maximize separation among classes 4

Choose the good features! 5

Color 6

Number of ears 7

Choice of the features First statistical moments could be used as features Implies the use of a neighborhood which limits the resolution Typical for region-based processing Texture features 8

PR based on decision theoretic methods Based on the use of a discriminant function Let x be a FV and ω 1, ω 2, ω 3,, ω n be n pattern classes. The basic problem consists in finding n decision functions d i (x) with the property that if pattern x belongs to the class ω i then d i ( x) > d j ( x) i, j =1,..., n i j The decision boundary separating ω i from ω j is given by the values of x for which d i ( x) = d j ( x) 9

PR based on decision theoretic methods Common practice consists in identifying decision boundaries by the single function d i, j ( x) = d i ( x) d j ( x) Thus d ij ( x) > 0 For objects belonging to ωi d ij ( x) < 0 For objects belonging to ωj 10

Classification Problem statement Given a set of classes {ω i, i=1,...,n} and a set of observations {x i,k, k=1,...m}, determine the most probable class, given the observations. This is the class that maximizes the conditional probability: w = max winner k P( w x i k ) 11

Clustering and Classification Clustering Putting together (aggregating) feature vectors based on a minimum distance criterion Self-contained: no need to refer to other images or data samples Classification Identification of the class a given feature vector belongs to based on a minimum distance criterion and based on a set of available examples Uses a reference database of example images that identify the different classes Hypothesis: the classes (textures) are separated in the feature space 12

Condition: Separability in the Feature Space Bi-dimensional feature space (FV of size 2) FV(1) Multi-dimensional feature space FV(1) FV(2) FV(3) Clustering: building the clusters FV(2) Classification: identification of the cluster (built on some examples) which best represents the vector according to the chosen distance measure 13

Types of object recognition algorithms Measuring the distance among a class and a vector Each class (set of vectors) is represented by the mean (m) vector and the vector of the variances (s) of its components Þ the training set is used to build m and s The distance is taken between the test vector and the m vector of each class The test vector is assigned to the class to which it is closest Euclidean classifier Weighted Euclidean classifier Example: k-means clustering Measuring the distance among vectors One vector belongs to the training set and the other is the one we are testing Example: knn classification 14

knn Given a vector v of the test set Take the distance between the vector v and ALL the vectors of the training set (while calculating) keep the k smallest distances and keep track of the class they correspond to Assign v to the class which is most represented in the set of the k smallest distances 0.1 0.57 0.9 1.2 2.5 2.77 3.14 0.1 6.10 7.9 8.4 2.3 k=3 FV for class 1 FV for class 2 FV for class 3 v v is assigned to class 1 15

Confusion matrix textures 1 2 3 4 5 6 7 8 9 10 % correct 1 841 0 0 0 0 0 0 0 0 0 100.00% 2 0 840 1 0 0 0 0 0 0 0 99.88% 3 2 0 839 0 0 0 0 0 0 0 99.76% 4 0 0 0 841 0 0 0 0 0 0 100.00% 5 0 0 88 0 753 0 0 0 0 0 89.54% 6 0 0 134 0 0 707 0 0 0 0 84.07% 7 0 66 284 0 0 0 491 0 0 0 58.38% 8 0 0 58 0 0 0 0 783 0 0 93.10% 9 0 0 71 0 0 0 0 0 770 0 91.56% 10 0 4 4 0 0 0 0 0 0 833 99.05% Average recognition rate 91.53% 16

K-Means Clustering 1. Partition the data points into K clusters randomly. Find the centroids of each cluster. 2. For each data point: Calculate the distance from the data point to each cluster. Assign the data point to the closest cluster. 3. Recompute the centroid of each cluster. 4. Repeat steps 2 and 3 until there is no further change in the assignment of data points (or in the centroids). 17

K-Means Clustering 18

K-Means Clustering 19

K-Means Clustering 20

K-Means Clustering 21

K-Means Clustering 22

K-Means Clustering 23

K-Means Clustering 24

K-Means Clustering 25

K-Means Clustering Example Duda et al. 26

K-Means Clustering RGB vector K-means clustering minimizes i clusters % & ' j elements of i'th cluster x j µ i 2 ( ) * 27

Clustering Example D. Comaniciu and P. Meer, Robust Analysis of Feature Spaces: Color Image Segmentation, 1997. 28

K-Means Clustering Example Original K=5 K=11 29

K-means, only color is used in segmentation, four clusters (out of 20) are shown here. 30

K-means, color and position is used in segmentation, four clusters (out of 20) are shown here. Each vector is (R,G,B,x,y). 31

K-Means Clustering: Axis Scaling Features of different types may have different scales. For example, pixel coordinates on a 100x100 image vs. RGB color values in the range [0,1]. Problem: Features with larger scales dominate clustering. Solution: Scale the features. 32

33

Texture recognition

Image pyramids: concept Low-pass High-pass 35

Image pyramids 36

Image pyramid: feature extraction 37

Image pyramid: feature extraction subband 3 subband 2 subband 1 Texture features are claculated over the blocks and gathered into feature vectors. 38

Building the FV approximation d 1 d 2 d 3 scale 1 scale 2 39

scale 1 Building the FV elements of FV 1 of texture 1 elements of FV 2 of texture 1 approximation d 1 d 2 d 3 FV 1 FV 2 scale 2 40

Feature extraction Step 2: extract features to form feature vectors subimages Intensity image Transformation For each sub-image For each subband Calculate the local energy (variance) Fill the corresponding position in the FV One FV for each sub-image Þ Collect the local energy of each sub-image in the different subbands in a vector Classification/Clustering algorithm The FVs contain some statistical parameters evaluated on the subband images estimates of local variances histograms 41

Texture features No agreed reference definition Texture is property of areas Involves spatial distributions of grey levels A region is perceived as a texture if the number of primitives in the field of view is sufficiently high Invariance to translations Macroscopic visual attributes uniformity, roughness, coarseness, regularity, directionality, frequency [Rao- 96] Sliding window paradigm 42

Texture analysis Texture segmentation Spatial localization of the different textures that are present in an image Does not imply texture recognition (classification) The textures do not need to be structurally different Apparent edges Do not correspond to a discontinuity in the luminance function Texture segmentation Texture segregation 43

Texture analysis Texture classification (recognition) Hypothesis: textures pertaining to the same class have the same visual appearance the same perceptual features Identification of the class the considered texture belongs to within a given set of classes Implies texture recognition The classification of different textures within a composite image results in a segmentation map 44

Texture classification Method Describe the texture by some features which are related to its appearance Texture class ω k Descriptors Feature Vectors (FV) x i,k Define a distance measure for FV Choose a classification rule Recipe for comparing FV and choose the winner class Assign the considered texture sample to the class which is the closest in the feature space 45

Exemple: texture classes ω 1 ω 2 ω 3 ω 4 46

FV extraction Step 1: create independent texture instances Training set Test set 47

Co-occurrence matrix A co-occurrence matrix, also referred to as a co-occurrence distribution, is defined over an image to be the distribution of cooccurring values at a given offset. Mathematically, a co-occurrence matrix C k,l [i,j] is defined over an NxM image I, parameterized by an offset (k,l), as: gray level values C kl, [, i j] N M = ååí p= 1 q= 1 î ì1, if I( p, q) = i and I( p+ k, q+ l) = j 0, otherwise The co-occurrence matrix depends on (k,l), so we can define as many as we want 48

Feature extraction Step 2: extract features to form feature vectors features feature vector mean energy (variance) of luminance energy of chromatic channels edge map One FV for each sub-image Classification algorithm 49

Feature vector distance Step 3: definition of a distance measure for feature vectors Euclidean distance ( ) = ( x 1 x 2 ) 2 + ( y 1 y 2 ) 2 + + ( z 1 z 2 ) 2 d v 1, v 2 v 1 = { x 1, y 1,, z 1 } v 2 = x 2, y 2,, z 2 { } y y 1 Distance in the feature space y 2 x 1 x 2 x 50

Classification steps Step 4: Classification Phase 1: Training The classification algorithm is provided with many examples of each texture class in order to build clusters in the feature space which are representative of each class Examples are sets of FV for each texture class Clusters are formed by aggregating vectors according to their distance Phase 2: Testing The algorithm is fed with an example of texture ω i (vector x i,k ) and determines which class it belongs to as the one to which it is closest in the feature space 51

Classification Sample Feature extraction Training set Build the reference cluster Test set Classification core 52

Application to image segmentation Orange p >0.3 Brown p > 0.1 Bleu p >0.6 Green p >0.3

Application to image segmentation

Conclusions No golden rule exists for clustering/classification Major issues: Feature selection Definition of a metric for measuring distances Definition of a representative training set Choice of the classification/clustering strategy Possible solution: classifier fusion Consider a set of different classifiers and combine their results 55