35
MACHINE LEARNING IN IMAGE PROCESSING PARINYA SANGUANSAT

Machine learning in image processing

Embed Size (px)

Citation preview

Page 1: Machine learning in image processing

MACHINE LEARNING I N

IMAGE PROCESSING

PA R I N YA S A N G U A N S AT

Page 2: Machine learning in image processing

Asst. Parinya Sanguansat, Ph.D.Computer Engineering,Panyapiwat Institute of Management

Page 3: Machine learning in image processing

MACHINE LEARNING (WITH MATLAB)

Page 4: Machine learning in image processing

CONTENTS

• Introduction

• Feature Extraction

• Machine Learning approaches

– Image to image

– Image to non-image

• Applications

– Face Recognition

– Face Hallucination

– Object Detection

– Augmented Reality

• Tools

Page 5: Machine learning in image processing

INTRODUCTION

• Classification

• Regression

MachineDataClassLabel

MachineData Data

Discrete

Continues

Page 6: Machine learning in image processing

CLASSIFICATION VS

REGRESSION

Classification Regression

Page 7: Machine learning in image processing

INTRODUCTION

• Supervised Learning

• Unsupervised Learning

MachineTraining Data

learning Training Target

learningTest Data classify Test Target

MachineTraining Data

learningTest Data cluster DataCluster

Page 8: Machine learning in image processing

SUPERVISED VS

UNSUPERVISED

Supervised Unsupervised

Page 9: Machine learning in image processing

FEATURE EXTRACTION• Normal data

• Image data

A1 A2 A3 A4 A5 A6

O1 1 2 1 1 2 3

O2 1 4 2 5 3 1

O3 2 1 5 2 1 3

O4 3 2 4 5 2 4

O1O2

O3

Page 10: Machine learning in image processing

VECTORIZATION

O1O2

O3

O1 O2 O3

PROBLEMS:

• High-Dimensional feature vector

• Very large memory

• Very long processing time

• Singularity problem

• Small Sample Size problem

Page 11: Machine learning in image processing

SCALE INVARIANT FEATURE TRANSFORM (SIFT)

• To detect and describe local features in an images, wildly used in image search,

object recognition, video tracking, gesture recognition, etc.

• Speeded Up Robust Features (SURF)

Page 12: Machine learning in image processing

EIGENVECTOR

https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors

𝐴𝑣 = 𝜆𝑣

Page 13: Machine learning in image processing

BAG OF (VISUAL) WORDS

Page 14: Machine learning in image processing

OTHER FEATURE EXTRACTIONS

• Color

• Texture

• Shape

• Statistic

Page 15: Machine learning in image processing

ALIGNMENT

http://www.csc.kth.se/~vahidk/face_ert.html

Page 16: Machine learning in image processing

CLASSIFIERS

• K-NN

• Neural network

• SVM

• CNN

Page 17: Machine learning in image processing

MACHINE LEARNING

APPROACHES

Page 18: Machine learning in image processing

IMAGE TO NON-IMAGE

Machine LearningImage Information

Object detection and tracking

Image recognition and classification

Page 19: Machine learning in image processing

IMAGE TO IMAGE

Machine LearningImage Image

Image retrieval

Image enhancement

Extrapolated art (http://extrapolated-art.com/)

Page 20: Machine learning in image processing

NEURAL ARTIST STYLE

https://medium.com/@genekogan/machine-learning-for-artists-e93d20fdb097#.kf92ef5u8

http://www.kdnuggets.com/2015/09/deep-learning-art-style.html

Page 21: Machine learning in image processing

APPLICATIONS

Page 22: Machine learning in image processing

FACE RECOGNITION

PreprocessingFace imageFeature

ExtractionClassifier Label

Page 23: Machine learning in image processing

PCA

Crop &Resize

m

n

Vectorize

mn

M

M

1

1( )( )

MT

k k

kM

CCovariance matrix

Dimension = mn x mn

( ), 1,2,3, ,T

i i dy = x max( )d MPC

Scalar

Page 24: Machine learning in image processing

2DPCA

Crop &Resize

m

n

VectorizeM

1

1( ) ( )

MT

k k

kM

G A A A AImage covariance matrix

Dimension = n x n

, 1,2,3, ,i i i dY = Ax max( )d nPCV

Vector

Page 25: Machine learning in image processing

IMAGE COVARIANCE MATRIX

• Optimization Problem: Maximize the trace of covariance matrix (Sx)

( ) { [( )( ) ]}T

xtr tr E E E S Y Y Y Y

( ) { [( )( ) ]}

{ [( ) ( ) ]}

{ [ ( ) ( ) ]}

{ [( ) ( )] }

{ }

T

x

T T

T T

T T

T

tr tr E E E

tr E E E

tr E E E

tr E E E

tr

S Y Y Y Y

A A XX A A

X A A A A X

X A A A A X

X GX

Y = AX

( ) ( )tr XY tr YX

1

1( ) ( )

MT

k k

kM

G A A A A

Page 26: Machine learning in image processing

FACE HALLUCINATION

Hallucinating

INPUT

OUTPUT

Page 27: Machine learning in image processing

INPUT

Baseline BaselineProposed Proposed

Page 28: Machine learning in image processing

CCTV SAMPLES

• Asian on Asian database

• European on Asian database

Page 29: Machine learning in image processing

OBJECT DETECTION

• Viola Jones method

Positive samples

Negative samples

Cascade Classifier(Adaboost)

Page 30: Machine learning in image processing

AUGMENTED REALITY

matchFeatures

estimateGeometricTransform + imwarp

detectSURFFeatures

Create Marker

Page 31: Machine learning in image processing

TOOLS

Page 32: Machine learning in image processing

OPENCV

• http://opencv.org/

Page 33: Machine learning in image processing

MATLAB

• http://www.mathworks.com/products/matlab/

Page 34: Machine learning in image processing

ALTERNATIVE TO MATLAB

• Opensource Mostly compatible

Different Syntax

PythonBrowser-based

Page 35: Machine learning in image processing

OCRhttps://code.google.com/p/tesseract-ocr/downloads/list