View
0
Download
0
Category
Preview:
Citation preview
Gender Classification REU 2017RACHEL TOWNER
UNCW
JULY 25
1
OUTLINE
•What was my project?
•Dataset
•Steps to get there:• Image Preprocessing
• Feature Extraction Techniques
•Experiment
•Onward and Upward
•References
2
IMAGE DATASET
Facial Recognition Gender
Classification
Race Classification
Age Estimation
3
MORPH-II•The academic release of the Craniofacial Morphology Database (MORPH-II) contains 55,134 unique mugshots from 13,617 subjects [1].
•16 – 77 years old
•Average of around 4 images per person • Ranges 1 – 53 images per person
•Unbalanced nature between race and gender
Total Images
Male 46,644
Female 8,490
Total 55,134
4
Image Preprocessing
5
MOTIVATION for PREPROCESSING
•Goal: Best classification/recognition rates
•Obstacle: difference in pose, scale, illumination, distractions (hair, clothes, etc.)
6
PREPROCESSING PIPELINE•Goal: minimize variability between images
7
IMPLEMENTATION•OpenCV package in python
•Function: cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
•Purpose: Convert Image pixels into grayscale
8
IMPLEMENTATION
•Function: detectMultiScale
•Purpose: Use of Haar-Like Features to Locate particular items in image (face, eyes)
[1]
9
IMPLEMENTATION
•Function: cv2.getRotationMatrix2D((cols / 2, rows / 2), angle, 1)
•Purpose: Generate transformation matrix• Output:
•Function: cv2.warpAffine(image, matrix, (cols, rows))
•Purpose: Transforms image by:
,M =
10
IMPLEMENTATION
•Function: Box generate by calculating intraocular distance• Width = (intraocular distance) X 2
• Height = (intraocular distance) X 2.35
•Crop:
11
Feature Extraction
12
Gaussian Blur
•Blurring image results in reduction of noise and extra detail
• Sharpened image for crisp edges
Original Sigma = 1 Sigma = 2 DoG Sharpened
13
Gabor Filter•Examines frequency and orientation of an image
•Useful in edge detection
14
Bio-Inspired Features•Technique that emulates how the human visual system represents visual data• Uses low-level and high-level representations of face: S1 and C1
•S1: Combinations of Gabor filters at different scales and orientations
•C1: Combines images and creates a stack of new images of varying sizes
15
Local Binary Patterns
•Feature vector obtained by dividing image into cells and comparing pixel in each cell to neighboring pixel
•Histograms are computed over each cell and concatenated into feature vector
•Observation: Image noise remains
16
Complete 2DPCA
17
PCA – 2DPCA•PCA is a classic data representation technique where the 2D image matrix is transformed into 1D image vectors. This results in a high dimensional vector space where it is difficult to calculate the covariance matrix accurately due to size [2], [3].
•2DPCA is based on the 2D image matrices and the covariance matrix can be constructed directly from image pixels. However, 2DPCA can only reduce dimension on one side
18
Complete 2DPCA•Complete 2DPCA uses two transformation matrices and can reduce an m x n image to a d1 x d2 feature matrix directly.
•Advantages: reduces computation time
19
Experiment
20
SET-UP
•Subset: • 1,000 images of unique individuals
• Male to Female ratio 3:1
• Black to White ratio 1:1
•Training: 700
•Testing: 300
21
PIPELINE
22
RESULTS
23
Accuracy (%)
Original 91.7
LBP 72.7
Gabor 86.3
Gaussian 91.2
BIF: Compressed 90.7
BIF: Each C1 90.3
Seconds
Original 131.22
LBP 167.86
Gabor 130.84
Gaussian 150.69
BIF: Compressed
307.48
BIF: Each C1 380.67
•Original image performed best
•BIF took longest due to largest feature vector
Conclusions
24
•C2DPCA could not be optimized by feature vectors with my methods
•Why did original image perform the best?• Feature extraction loses information from original image
•Why did LBP perform the worst?• Images has most noise
• Summarizes a lot of information
25
Useful Excess
Scale of Image Information
Onward and Upward
26
•Dr. Guinn method of majority vote for BIF images
•Spent a lot of time focusing on image preprocessing and different feature extraction techniques so I want to try different classification algorithms and dimension reduction methods for the future
•Use the feature extraction techniques without C2DPCA and see how that affects computation accuracy and speed
27
REFERENCES1. https://www.researchgate.net/figure/237049645_fig1_Fig-2-Haar-features-examples-for-face-
detection
2. Anbang Xu, Xin Jin, Yugang Jiang, and Ping Guo. Complete Two-Dimensional PCA for Face Recognition. Image Processing & Pattern Recognition Laboratory, Beijing Normal University, 2006.
3. Jian Yang, David Zhang, Alejandro Frangi, and Jing-Yu Yang. Two-Dimensional PCA: A New Approach to Appearance-Based Face Representation and Recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(1): 131-137, 2004
4. K. Ricanek and T. Tesafaye. Morph: a longitudinal image database of normal adult age-progression. In 7th International Conference on Automatic Face and Gesture Recognition (FGR06), pages 341-345, April 2006.
5. Ethan Meyers and Lior Wolf. Using Biologically Inspired Features for Face Processing. International Journal Computer Vision (76): 93-104, 2008.
28
Recommended