machine learning group - practical examples

Post on 04-Jul-2015

81 Views

Category:

Education

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presented at our machine learning group.

TRANSCRIPT

Machine learning groupPractical examples

Scope

We have covered some basic theory in our machine learning group but only a few of us have applied any of the tools.

The next few weeks we are presenting some practical examples.

2

Practical examples

1. Numberplate recognition - Method

- Code

2. Face recognition - Method

- Code

Material from the book - Mastering OpenCV with practical computer vision examples, was used for this presentation.

Content

3

1. Numberplate recognition Method

SVM and Neural Networks

1. Plate detection- Segmentation- Feature extraction - Classification- Results

2. Plate recognition- Segmentation- Feature extraction - Classification- Results

Examples

4

Examples

5

1. Plate detection- Segmentation- Feature extraction - Classification- Results

Examples

6

Sobel filter Threshold operation Close morphologic operation

Possible detected plates marked in red (features images)

Mask of one filled area Detected plates after the SVM classifier

Examples

7

2. Plate recognition- Segmentation (OCR segmentation)- Feature extraction - Classification- Results

Examples

8

Examples

9

1. Numberplate recognition Code

Examples

10

2. Face recognition Method

Eigenfaces or Fisherfaces

1. Face detection2. Face preprocessing3. Training a machine-learning algorithm from collected faces4. Face recognition

Examples

11

Examples

2000 – Slow and Unreliable face detection2001 – Viola and Jones invented Haar-based cascade classifiers for object Detection. Big improvement especialy for real time application.2002 – Improved buy Lienhard and Maydt.2006 – LBP features by Ahonen Hadrd (Faster than Haar based features)

LBP similar to Haar but uses histograms of pixel intensity comparisons.

12

Examples

Viola and Jones

1. Grey scale image – intensity values from 0 to 255.2. The feature value is calculated as the sum of the pixel intensities in the light rectangle(s) minus the sum of the pixels in the dark rectangle(s)3. These adjacent blocks are known as ’features’.The value of the feature is then used in a filter to determine if that feature is present in the original image4. To make summing the intensity of the pixels in a given rectangle less computationally expensive and improve the speed, the integral image gets calculated (finding the area under a curve by adding together small rectangular areas) at every point.5. Learning. When there is no correlation between the feature identify-ing a face and it not being one, and vice versa it would be rejected.

13

Type of cascade classifier XML filename – OpenCV v2.4

Face detector (default) haarcascade_frontalface_default.xmlFace detector (fast Haar) haarcascade_frontalface_alt2.xmlFace detector (fast LBP) lbpcascade_frontalface.xmlProfile (side-looking) face detector haarcascade_profileface.xmlEye detector (separate for left and right) haarcascade_lefteye_2splits.xmlMouth detector haarcascade_mcs_mouth.xmlNose detector haarcascade_mcs_nose.xmlWhole person detector haarcascade_fullbody.xml

Examples

14

Examples

Geometrical transformation and cropping

Separate histogram equalization for left and right sides

Smoothingbilateral filter

Elliptical mask

15

Examples

Eigen Faces

Fisher Faces

16

Examples

2. Face recognition Code

Thank you

Name (email@csir.co.za)

top related