IP Library › Granted Patent US 10,635,946
Granted Patent B2
US 10,635,946 · App. 16/337,938 · Granted Apr 28, 2020

Eyeglass positioning method, apparatus and storage medium

Inventor: Lei Dai (Guangdong, CN)
Assignee: PING AN TECHNOLOGY (SHENZHEN) CO., LTD.
G06K9/6267G06K9/00228G06K9/00281G06K9/6256G06K9/6262
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,635,946
App. No.
16/337,938
Granted
Apr 28, 2020
Kind
B2
Abstract

The present application provides an eyeglass positioning method. The method includes: acquiring a real-time image shot by a shooting apparatus, and extracting a real-time face image from the real-time image using a face recognition algorithm; recognizing whether the real-time face image includes eyeglasses using a predetermined first classifier, and outputting a recognition result; and positioning the eyeglasses in the real-time face image using a predetermined second classifier and outputting a positioning result when the recognition result is that the real-time face image includes the eyeglasses. The present application also provides an electronic apparatus and a computer readable storage medium. The present application adopts two classifiers to detect images in eyeglass regions in the face images, thereby enhancing precision and accuracy of eyeglass detection.

Claims (38)

1. An eyeglass positioning method, applied to an electronic apparatus and comprising:

acquiring a real-time image shot by a shooting apparatus, and extracting a real-time face image from the real-time image using a face recognition algorithm;

recognizing whether the real-time face image comprises eyeglasses using a predetermined first classifier, and outputting a recognition result; and

positioning the eyeglasses in the real-time face image using a predetermined second classifier and outputting a positioning result when the recognition result is that the real-time face image comprises the eyeglasses, wherein an acquiring process of the predetermined second classifier is as follows:

pretreating a plurality of sample pictures with eyeglasses, and marking a preset quantity of marking points in a position of the eyeglasses in each of the pretreated sample pictures;

combining the preset quantity of marking points that represent the position of the eyeglasses in each sample picture into a vector; and aligning the vectors of all other sample pictures with a reference vector by taking the vector in one sample picture as the reference vector to obtain a first average model about the position of the eyeglasses;

conducting dimensionality reduction treatment on the first average model about the position of the eyeglasses to obtain a second average model about the position of the eyeglasses; and

extracting a plurality of local features of each marking point from the second average model, and taking the second average model about the position of the eyeglasses and the local features of each marking point as the second classifier.

2. The eyeglass positioning method of claim 1 , wherein a training process of the predetermined first classifier is as follows:

respectively preparing sample pictures with eyeglasses and sample pictures without eyeglasses, and classifying and marking each sample picture according to whether the sample picture comprises the eyeglasses;

dividing the classified and marked sample pictures into a first proportion of training sets and a second proportion of verifying sets;

training a convolutional neural network using the training sets to obtain the first classifier; and

verifying an accuracy rate of the trained first classifier by the verifying sets; ending the training if the accuracy rate is greater than or equal to a preset accuracy rate; or increasing the quantity of the sample pictures and re-executing the training process if the accuracy rate is less than the preset accuracy rate.

3. The eyeglass positioning method of claim 2 , wherein a step of pretreating each sample picture comprises:

converting each sample picture into a gray image; reading a pixel value of each pixel point in each gray image; dividing the pixel value by 255; and standardizing the pixel value of each pixel point in each gray image.

4. A non-transitory computer readable storage medium, the computer readable storage medium comprising an eyeglass positioning program, and the eyeglass positioning program realizing, when executed by the processor, to implement all steps of the eyeglass positioning method of claim 3 .

5. A non-transitory computer readable storage medium, the computer readable storage medium comprising an eyeglass positioning program, and the eyeglass positioning program realizing, when executed by the processor, to implement all steps of the eyeglass positioning method of claim 2 .

6. The eyeglass positioning method of claim 1 , wherein the face recognition algorithm is a geometrical feature-based method, a local feature analysis method, a feature face method, an elastic model-based method or a neural network method.

7. A non-transitory computer readable storage medium, the computer readable storage medium comprising an eyeglass positioning program, and the eyeglass positioning program realizing, when executed by the processor, to implement all steps of the eyeglass positioning method of claim 6 .

8. A non-transitory computer readable storage medium, the computer readable storage medium comprising an eyeglass positioning program, and the eyeglass positioning program realizing, when executed by the processor, to implement all steps of the eyeglass positioning method of claim 1 .

9. An electronic apparatus, the electronic apparatus comprising: a memory and a processor, wherein the memory stores an eyeglass positioning program and the eyeglass positioning program realizes, when executed by the processor, the following steps of:

acquiring a real-time image shot by a shooting apparatus, and extracting a real-time face image from the real-time image using a face recognition algorithm;

recognizing whether the real-time face image comprises eyeglasses using a predetermined first classifier, and outputting a recognition result; and

positioning the eyeglasses in the real-time face image using a predetermined second classifier and outputting a positioning result when the recognition result is that the real-time face image comprises the eyeglasses, wherein an acquiring process of the predetermined second classifier is as follows:

pretreating a plurality of sample pictures with eyeglasses, and marking a preset quantity of marking points in a position of the eyeglasses in each of the pretreated sample pictures;

combining the preset quantity of marking points that represent the position of the eyeglasses in each sample picture into a vector; and aligning the vectors of all other sample pictures with a reference vector by taking the vector in one sample picture as the reference vector to obtain a first average model about the position of the eyeglasses;

conducting dimensionality reduction treatment on the first average model about the position of the eyeglasses to obtain a second average model about the position of the eyeglasses; and

extracting a plurality of local features of each marking point from the second average model, and taking the second average model about the position of the eyeglasses and the local features of each marking point as the second classifier.

10. The electronic apparatus of claim 9 , wherein a training process of the predetermined first classifier is as follows:

respectively preparing sample pictures with eyeglasses and sample pictures without eyeglasses, and classifying and marking each sample picture according to whether the sample picture comprises the eyeglasses;

dividing the classified and marked sample pictures into a first proportion of training sets and a second proportion of verifying sets;

training a convolutional neural network using the training sets to obtain the first classifier; and

verifying an accuracy rate of the trained first classifier by the verifying sets; ending the training if the accuracy rate is greater than or equal to a preset accuracy rate; or increasing the quantity of the sample pictures and re-executing the training process if the accuracy rate is less than the preset accuracy rate.

11. The electronic apparatus of claim 10 , wherein a step of picture pretreatment for each sample picture comprises:

converting each sample picture into a gray image;

reading a pixel value of each pixel point in each gray image;

dividing the pixel value by 255; and

standardizing the pixel value of each pixel point in each gray image.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 1, 2019
From: DAI, LEI
To: PING AN TECHNOLOGY (SHENZHEN) CO., LTD.
Reel/Frame 048749/0128 →
Priority Claims (1)
CN 2017 1 0915085 · Sep 30, 2017 · national
Continuity (1)
Related Publication 20190362193A1 · Nov 28, 2019