CPC G06V 40/172 (2022.01) [G06V 10/22 (2022.01); G06V 10/82 (2022.01); G06V 40/168 (2022.01)] | 12 Claims |
1. A method for recognizing masked faces, comprising:
obtaining a face image to be recognized;
detecting whether the face image to be recognized has a mask;
extracting feature vectors of a whole face in the face image to be recognized when the face image to be recognized does not have a mask;
comparing the feature vectors of the whole face with face images in a first database, and outputting a face recognition result;
extracting feature vectors of an upper half face in the face image to be recognized when the face image to be recognized has a mask;
comparing the feature vectors of the upper half face with face images in a second database, and outputting the face recognition result, wherein the second database is obtained by amplifying the face images in the first database, a step of amplifying the face images in the first database to obtain the second database comprises:
reading each of the face images in the first database;
performing face detection on each of the face images;
calculating a compensation coefficient for deviations based on an unselected face part of each of the face images after the face detection;
correcting a face detection range of each of the face images according to the compensation coefficient for deviations;
isolating an upper half of each of the face images according to the face detection range to obtain an upper half face image;
storing the upper half face image to the second database.
|