WO2021004186A1 - 一种人脸采集方法、装置、系统、设备及介质 - Google Patents

一种人脸采集方法、装置、系统、设备及介质 Download PDF

Info

Publication number
WO2021004186A1
WO2021004186A1 PCT/CN2020/092992 CN2020092992W WO2021004186A1 WO 2021004186 A1 WO2021004186 A1 WO 2021004186A1 CN 2020092992 W CN2020092992 W CN 2020092992W WO 2021004186 A1 WO2021004186 A1 WO 2021004186A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
feature information
facial feature
video
target
Prior art date
Application number
PCT/CN2020/092992
Other languages
English (en)
French (fr)
Inventor
章华茂
赵婧
Original Assignee
成都市喜爱科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都市喜爱科技有限公司 filed Critical 成都市喜爱科技有限公司
Publication of WO2021004186A1 publication Critical patent/WO2021004186A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation

Definitions

  • This application relates to the field of electronic technology, and in particular to a face collection method, device, system, equipment and medium.
  • images randomly intercepted from a video may not necessarily characterize the main subject of the video, which is not convenient for subsequent search and retrieval of the video.
  • the embodiments of the present application provide a face collection method, device, system, equipment, and medium to solve at least part of the aforementioned technical problems.
  • the embodiment of the application provides a face collection method, including:
  • the face image corresponding to the facial feature information to be inspected is compared with the target The deflection angle of the face on the face image corresponding to the facial feature information to obtain the comparison result;
  • the comparison result it is determined whether to replace the face image corresponding to the target face feature information with the face image corresponding to the face feature information to be checked as the face collection result corresponding to the video image.
  • said performing face detection on image frames in the video includes any one or a combination of the following:
  • acquiring the facial feature information to be inspected in the image frame includes: acquiring position information of the face image in the image frame;
  • Retrieving the target facial feature information matching the facial feature information to be inspected includes: retrieving the target facial feature information matching the location information with the characterizing position.
  • acquiring the position information of the face image in the image frame includes:
  • the center coordinates of the face image are used as the position information, the vertex coordinates of the face image are used as the position information, or the coordinates of the edge extraction points of the face image are used as the position information.
  • the retrieval of the feature information of the target face whose characterization position matches the position information includes:
  • center coordinates of the face image as the position information, first obtain the center coordinates of each of the face images stored in the face feature database, and then search and search for each of the acquired center coordinates.
  • the distance of the center coordinates of the face image corresponding to the face feature information to be inspected meets the matching center coordinates required by the preset distance, and the matching center coordinates are used as the target face feature information.
  • the method further includes:
  • the face image corresponding to the facial feature information to be inspected and the facial feature information to be inspected are correspondingly stored. Check facial feature information.
  • comparing the face image corresponding to the facial feature information to be inspected and the deflection angle of the face on the face image corresponding to the target facial feature information includes:
  • the deflection angle of the face includes:
  • comparing the face image corresponding to the face feature information to be inspected and the deflection angle of the face on the face image corresponding to the target face feature information to obtain a comparison result including:
  • the way of comparing the face size includes:
  • the area of the human face is compared, the length or width of the human face is compared, and the area ratio of the human face in one frame of the video is compared.
  • the result image of face collection includes:
  • the comparison result indicates that the deflection angle of the face image corresponding to the facial feature information to be inspected minus the deflection angle of the face image corresponding to the target facial feature information is less than the preset angle difference Value, it is determined whether the face size of the face image corresponding to the face feature information to be checked is greater than the face size of the face image corresponding to the target face feature information;
  • the face image corresponding to the target face feature information is replaced with the face image corresponding to the face feature information to be inspected as the face collection result image corresponding to the video.
  • the result image of face collection includes:
  • the preset scoring rule is based on the deflection angle and the face size of the face image corresponding to the facial feature information to be inspected, and the scoring rule is used for scoring to obtain the facial feature information to be inspected.
  • the score to be checked for the face image is scored according to the deflection angle and the face size of the face image corresponding to the target face feature information using the scoring rule to obtain the target person
  • the target score of the face image corresponding to the facial feature information comparing the score to be checked with the target score as a comparison result;
  • the face image corresponding to the face feature information to be checked replaces the person corresponding to the target face feature information Face image, otherwise, no replacement is performed.
  • the embodiment of the present application provides a video shooting and output method, including:
  • the shooting device performs face detection on the image frames in the captured video, and searches and matches the existing face feature database according to the face feature information to be checked in the detected image frames;
  • the facial image corresponding to the facial feature information to be inspected is compared with the face corresponding to the target facial feature information The deflection angle of the face on the image, and according to the comparison result, determine the face collection result image;
  • the server receives the retrieval information, and according to the retrieval information, retrieves and matches the corresponding face collection result image in the face collection result image database, and generates a matching result;
  • the server outputs the information of the video corresponding to the matching result.
  • the server receives the retrieval information, and according to the retrieval information, searches for a matching corresponding face collection result image in a face collection result image database, and generating the matching result includes:
  • the server receives the search information from a user terminal or a third-party platform to perform a video search, where the search information includes facial feature search information and/or information that limits the search range;
  • the server After the server receives the retrieval information, it uses the face matching algorithm to find a face collection result image matching the retrieval information in the stored collection result image library.
  • the server outputting the information of the video corresponding to the matching result includes:
  • the server After the server obtains the matching result, according to the matching result and the corresponding relationship between the image and video of the collected result stored by the server, the target video corresponding to the matching result is found, and the target video is The information is pushed to the user for playback.
  • the server outputting the information of the video corresponding to the matching result further includes:
  • the matching result corresponds to storing the multiple videos, output the description information of the multiple videos to the user, so that the user can select the target video that he wants to play according to the description information;
  • the server After the server receives the selection instruction of the user to select the target video from the plurality of videos, it outputs the target video for playback according to the selection instruction, wherein the description information includes any one or more of the following A combination of: shooting time, video playback time, thumbnail, video quality score.
  • An embodiment of the present application provides a face collection device, including:
  • the detection module is configured to perform face detection on image frames in the video, and obtain facial feature information to be inspected in the image frames;
  • the matching module is configured to search and match the existing facial feature database corresponding to the video according to the facial feature information to be inspected in the image frame;
  • the comparison module is used to compare the person corresponding to the face feature information to be checked if the target face feature information that matches the face feature information to be checked is retrieved from the existing face feature database The face image and the deflection angle of the face on the face image corresponding to the target face feature information to obtain a comparison result;
  • the replacement module is used to determine, according to the comparison result, whether to replace the face image corresponding to the target facial feature information with the face image corresponding to the facial feature information to be checked, as the person corresponding to the video Face collection result image.
  • the embodiment of the present application provides a video shooting and output system, including:
  • the photographing device is used for face detection on the image frames in the captured video, and searching in the stored face feature database corresponding to the video according to the face feature information to be inspected in the detected image frames Matching; if the target facial feature information that matches the facial feature information to be inspected is retrieved, the facial image corresponding to the facial feature information to be inspected is compared with the target facial feature information The deflection angle of the face on the face image, and according to the comparison result, determine the face collection result image; upload the video and the face collection result image to the server and save it;
  • the server is configured to receive the retrieval information, retrieve the matching corresponding face collection result image according to the retrieval information, and generate a matching result; the server outputs the video information corresponding to the matching result.
  • An embodiment of the present application provides an electronic device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the following steps when the program is executed:
  • the face image corresponding to the facial feature information to be inspected is compared with the target The deflection angle of the face on the face image corresponding to the facial feature information to obtain the comparison result;
  • the comparison result it is determined whether to replace the face image corresponding to the target face feature information with the face image corresponding to the face feature information to be checked as the face collection result corresponding to the video image.
  • the embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:
  • the face image corresponding to the facial feature information to be inspected is compared with the target The deflection angle of the face on the face image corresponding to the facial feature information to obtain the comparison result;
  • the comparison result it is determined whether to replace the face image corresponding to the target face feature information with the face image corresponding to the face feature information to be checked as the face collection result corresponding to the video image.
  • Fig. 1 is a flowchart of a face collection method in an embodiment of the application
  • FIG. 2 is a schematic diagram of the rotation angle in an embodiment of the application.
  • Figure 3 is a schematic diagram of scores in an embodiment of the application.
  • FIG. 5 is a schematic structural diagram of a video shooting and output system in an embodiment of the application.
  • FIG. 6 is a schematic structural diagram of a face collection device in an embodiment of the application.
  • FIG. 7 is a schematic structural diagram of an electronic device in an embodiment of the application.
  • FIG. 8 is a schematic structural diagram of a storage medium in an embodiment of the application.
  • Fig. 1 shows a face collection method 100 according to an embodiment of the present application. As shown in Fig. 1, it includes:
  • Step S101 Perform face detection on an image frame in a video, and obtain facial feature information to be inspected in the image frame;
  • Step S102 searching and matching in the stored facial feature database corresponding to the video according to the facial feature information to be inspected in the image frame;
  • Step S103 If the target facial feature information matching the facial feature information to be checked is retrieved from the stored facial feature database, then the facial image corresponding to the facial feature information to be checked is compared with The deflection angle of the face on the face image corresponding to the target face feature information to obtain a comparison result;
  • Step S104 According to the comparison result, it is determined whether to replace the face image corresponding to the target face feature information with the face image corresponding to the face feature information to be checked as the face collection corresponding to the video The result image.
  • the shooting device for shooting video and performing face detection in this embodiment can be installed on amusement park equipment such as roller coasters, carousels, jumping machines, or large pendulums, or on vehicles such as racing cars or bicycles, or on On electronic devices such as mobile phones, computers or cameras.
  • the camera is integrated with a collection module with face detection function.
  • the photographing device is a sports camera, a camera, etc.
  • the face collection result image determined by the face collection method 100 can be used as the face cover of the video for the user to browse and find, or it can be stored corresponding to the video and used for video retrieval.
  • Step S101 Perform face detection on image frames in the video, and obtain facial feature information to be inspected in the image frames.
  • the face detection for the image frames in the video can be done while shooting while shooting the video; it can also be done after the video is shot, and then face detection is not done here. limit.
  • the face detection when the face detection is performed after the video is taken, it can be set to perform the face detection after a preset time period after the video is taken.
  • a time policy for face detection can be set. For example, face detection can be run in the background of an electronic device, and when the electronic device detects that its processor is in a relatively idle state, then Perform face detection. It is also possible to prompt the user who took the video when the video shooting is completed and ready to be stored, and the user manually selects whether he wants to save the video and conducts a test.
  • one or more face images may be detected on any frame of the video.
  • the form of the detected face image can be a rectangular frame to frame the person.
  • the image of the face either the human face is framed by the outline of the human face, or the human face is framed by the oval frame, and there is no limitation here.
  • the collected facial images in order to improve the quality and recognizability of the collected facial images, it is also set to perform quality analysis on the detected facial images to filter out the facial images whose quality does not meet the requirements, and only extract The face feature information of the face image that is not filtered out.
  • quality analysis There are many ways of quality analysis, the following three are listed as examples:
  • the first type is confidence analysis.
  • the confidence analysis is performed on each detected face image, and the face images whose confidence level does not meet the confidence level are filtered out.
  • the algorithm of confidence analysis can use any existing confidence algorithm.
  • the second type is size analysis.
  • the face size analysis is performed on the detected face images, and the face images whose face size does not meet the size requirement are filtered out to ensure that the size of the face image is large enough.
  • the size requirement may be that the area of the face is required to be greater than a preset value, or it may be that the area of the face in the frame of the video is required to be greater than the preset ratio.
  • the size of the rectangular frame may be used as the face size, and the area within the rectangular frame may be used as the face area.
  • the third type is exposure analysis.
  • the exposure of the detected face images is analyzed, and the face images whose exposure does not meet the exposure requirements are filtered out, that is, the face images that are too dark and too bright are eliminated.
  • it can be set to filter out face images with an exposure (grayscale value) less than 70 or greater than 160, and a face image with an exposure within a range of 70 to 160 can be used as the detected target face image.
  • the above-mentioned confidence level, the proportion of the area of the face on the video image, and the threshold of exposure are only exemplary, and those skilled in the art can set and adjust them according to actual needs.
  • the ways of performing quality analysis on face images are not limited to the above three, and multiple quality analysis ways can also be combined to collaboratively filter out poor-quality face images.
  • the facial feature information to be inspected of the face images of better quality in the image frame is obtained.
  • it can be set to discard the face image when the face image fails to pass any of the above analysis methods.
  • the parameters obtained by the above analysis method can also be weighted, and the weighted analysis results of each face image can be compared to select the face image.
  • the facial feature information to be inspected may include any one or a combination of the following: location information of the facial image, facial contour information, facial features information, facial hairstyle feature information, and so on.
  • Step S102 searching and matching are performed in the existing facial feature database corresponding to the video according to the facial feature information to be inspected in the image frame.
  • the detected face image that passed the quality analysis is stored, and the feature information of the face image is correspondingly stored to form a face feature database.
  • it is also set to store only one face image with matching facial feature information on the video image.
  • the facial feature information to be inspected is location information
  • only one face image set at the same position on the video image is stored, that is, only one optimal face image is stored corresponding to one location, where the same The location is the same or close to the location information.
  • the stored facial feature library in step S102 may include all facial images and facial feature information stored from the beginning of face detection on the video to the current stored.
  • the facial feature information to be inspected can be set to information such as facial contour and facial features.
  • the feature information of the face to be inspected can be set as location information, and the retrieval is performed through location matching to confirm whether a target face whose characterization location matches the location information is retrieved Characteristic information.
  • the center coordinates of the face image may be used as the position information, or the vertex coordinates of the face image may be used as the position information.
  • the position information the coordinates of the edge extraction point of the face image can also be used as the position information.
  • the method of acquiring the position information of the face image is different, and the corresponding method of searching and matching is also different.
  • the following is an example of where the position information is the center coordinates of the face image:
  • the preset distance requirement may be less than 80 pixels.
  • the center coordinates of the face image corresponding to the facial feature information to be inspected are (200, 450), and there are two existing face images, and the center coordinates are (600, 100) and (201, 448) respectively. .
  • the center coordinates (201, 448) and the center coordinates (200, 450) are separated by a distance of 2 to 3 pixels, and are less than 80 pixels, then (201, 448) is the matching center coordinates, and the corresponding face image is the target person The face image corresponding to the facial feature information.
  • the exact interval between the center coordinates (201, 448) and the center coordinates (200, 450) is Between 2 and 3 pixels.
  • the pixel interval can be rounded up. When the pixel interval after rounding is less than 80 pixels, it is determined that the corresponding face image meets the requirements and is the target face feature information corresponding to Face image.
  • the face image corresponding to the facial feature information to be inspected and the facial feature information to be inspected are correspondingly stored.
  • Check facial feature information For example, taking the face feature information to be inspected as the location information as an example, if no person whose location matches the location information of the face image corresponding to the face feature information to be inspected is not retrieved in the saved face image Face image, it can be considered that the face image corresponding to the face feature information to be inspected is not stored as the face image of the same person, so the face image corresponding to the face feature information to be inspected and the position are correspondingly stored information.
  • step S103 is executed.
  • Step S103 Comparing the face image corresponding to the facial feature information to be inspected and the deflection angle of the face on the facial image corresponding to the target facial feature information to obtain a comparison result.
  • the deflection angle of the human face There are many ways to compare the deflection angle of the human face, which can be to compare the center degree of the nose part on the human face.
  • the three-dimensional angle of the human face may be calculated for comparison, so as to improve the accuracy of the comparison. The following is an example of comparing the three-dimensional angle of a human face:
  • the three-dimensional yaw angle comparison can be achieved by calculating the pitch angle (pitch), yaw angle (yaw), and roll angle (roll).
  • pitch angle pitch
  • yaw yaw angle
  • roll roll angle
  • the angle of the face up or down can be characterized by pitch
  • the angle of left and right rotation of the face can be characterized by yaw
  • the angle of face swing can be characterized by roll.
  • Face recognition technology is used to identify the position of the organs on the face, and then the specific angle values of pitch, yaw and roll can be calculated by analyzing the position of each organ.
  • the specific calculation methods for the pitch, yaw, and roll of the face in the image can refer to the conventional methods in the prior art familiar to those skilled in the art. Repeat it again.
  • the method of comparing the deflection angle may be comparing the sum of pitch, yaw and roll; or comparing pitch, yaw and roll one by one;
  • the sum of the squares of the pitch, yaw, and roll of the face on the face image corresponding to the facial feature information to be checked may be calculated as the face image corresponding to the facial feature information to be checked Deflection angle, and calculate the square sum of pitch, yaw, and roll of the face on the face image corresponding to the target facial feature information as the deflection angle of the face image corresponding to the target facial feature information, and then Comparison.
  • the comparison result of the deflection angle is that the face image corresponding to the target facial feature information deflection is 40 more.
  • the comparison of other factors and the comparison of the deflection angle may also be introduced into the comparison result. For example, you can also introduce the face size for comparison, so as to make the comparison result more comprehensive.
  • the comparison result of the face size is that the area of the face image corresponding to the target facial feature information is 6% larger. It should be noted that when comparing the proportion of the area of the face in one frame of the video, it is necessary to ensure that the face image corresponding to the facial feature information to be checked and the face image corresponding to the target facial feature information are captured When the distance between the face of the person being photographed and the camera is approximately the same, otherwise, the accuracy of the face size comparison result will be affected due to the influence of the near and far.
  • step S104 is executed, and according to the comparison result, it is determined whether to replace the face image corresponding to the target facial feature information with the face image corresponding to the facial feature information to be checked, as The face collection result image corresponding to the video.
  • the face image corresponding to the target facial feature information is replaced with the face image corresponding to the facial feature information to be inspected, then the face image corresponding to the facial feature information to be inspected is used as the face corresponding to the video Collect the result image; if it is determined that the face image corresponding to the target facial feature information is not used to replace the face image corresponding to the target facial feature information, then the face image corresponding to the target facial feature information is used as the video corresponding The result image of face collection.
  • the first one only considers the comparison result of the deflection angle.
  • the comparison result characterizes: the deflection angle of the face image corresponding to the facial feature information to be inspected is smaller than the deflection angle of the face image corresponding to the target facial feature information, then the face corresponding to the facial feature information to be inspected is used The image replaces the face image corresponding to the target face feature information as the face collection result image corresponding to the video. Otherwise, the face image corresponding to the target face feature information is continuously used as the face collection result image corresponding to the video.
  • the comparison result characterizes: the deflection angle of the face image corresponding to the facial feature information to be inspected minus the deflection angle of the face image corresponding to the target facial feature information is less than the preset angle difference, then further judgment Whether the face size of the face image corresponding to the facial feature information to be checked is greater than the face size of the face image corresponding to the target facial feature information. If the judgment result is yes, the face image corresponding to the target facial feature information is replaced with the face image corresponding to the facial feature information to be inspected as the face collection result image corresponding to the video. If the comparison result does not meet the above-mentioned conditions, then the face collection result image is kept as the face image corresponding to the target facial feature information.
  • the preset angle difference is a positive number.
  • the calculated difference is zero or negative, which is less than the preset angle difference;
  • the calculated difference is also smaller than the preset angle difference. Therefore, when the calculated deflection angle difference is less than the preset angle difference, the face image corresponding to the face feature information to be inspected is more frontal than or close to the face image corresponding to the target face feature information.
  • the face image corresponding to the face feature information to be inspected replaces the face image corresponding to the target face feature information as the face collection result image.
  • the replaced face collection result image is the face image currently stored corresponding to the region represented by the location information of the video.
  • the third is the comparison result of the comprehensive deflection angle and the comparison result of the face size.
  • the scoring rule is used for scoring to obtain the face image to be inspected corresponding to the facial feature information to be inspected fraction.
  • the scoring rule is used for scoring to obtain the target score of the face image corresponding to the target facial feature information. Compare the test score with the target score as the comparison result. If the comparison result indicates that the score to be checked is greater than the target score, then the face image corresponding to the face feature information to be checked is used to replace the face image corresponding to the target face feature information, otherwise, no replacement is performed.
  • the set score is positively correlated with the face size and inversely correlated with the deflection angle. That is, when the face size is the same, the smaller the deflection angle is, the larger the score; when the deflection angle is the same, the larger the face size is, the larger the score is.
  • the score can be set equal to the face size minus the deflection angle, or equal to the face size divided by the deflection angle, etc., which is not limited here.
  • the method of determining whether to replace the face image corresponding to the target facial feature information with the face image corresponding to the facial feature information to be inspected is not limited to the above two methods according to the comparison result.
  • the scene requires settings.
  • the determined face collection result image can be used for the face cover of the video, and can also be used for uploading to the server corresponding to the video for video retrieval.
  • the embodiment of the present application also provides a video shooting and output method 400, as shown in FIG. 4, including:
  • Step S401 The camera performs face detection on the image frames in the captured video, and searches and matches the stored face feature database according to the facial feature information to be inspected in the detected image frames;
  • Step S402 If the target facial feature information that matches the facial feature information to be inspected is retrieved, then the facial image corresponding to the facial feature information to be inspected is compared with the target facial feature information. The deflection angle of the face on the face image of, and according to the comparison result, determine the face collection result image;
  • Step S403 upload the video and the face collection result image to the server correspondingly and save;
  • Step S404 The server receives the retrieval information, and searches the face collection result image database for matching corresponding face collection result images according to the retrieval information, and generates a matching result;
  • Step S405 The server outputs the video information corresponding to the matching result.
  • the system includes a server 501 and one or more photographing devices 502.
  • the server 501 may be a single server ( The main camera or independent server), multiple server groups or the cloud are not limited here.
  • the camera 502 and the server 501 can be connected via a wired or wireless network, and there is no limitation here. It can be understood that when the server 501 is the main camera, it is integrated with a functional module that provides server functions.
  • steps S401 to S403 have been described in detail before, and will not be repeated here.
  • Step S404 The server receives the search information, and searches the face collection result image database for matching corresponding face collection result images according to the search information, and generates a matching result.
  • the server may receive retrieval information from the user terminal or a third-party platform to perform video searches.
  • the retrieval information may include facial feature retrieval information (for example, face image or face description data) and/or information that limits the scope of retrieval (for example, gender, age, height, etc.).
  • the facial feature retrieval information can be an image that includes the face to be searched taken by the user using any image acquisition device (such as a mobile phone terminal, a tablet terminal, a camera, etc.), or it can be a user's saved image (such as the user's local storage or The cloud storage platform saves the image containing the face to be searched.
  • the facial feature retrieval information can also be a depth map containing facial information or an image with depth information.
  • the user can send the search information to the server by scanning the QR code to enter the instruction panel of the corresponding APP and sending the search information to the server, or the user can log in to the application to send the search information.
  • it can also be set on the server Before outputting the target video to the user, or before the server receives the retrieval information, the user will be authenticated to ensure that the user is not illegally interfering with the user.
  • the content of the retrieval information used as the basis of the search in this embodiment and the method of obtaining and sending them are not limited to the above list.
  • the server After the server receives the retrieval information, it uses the existing face matching algorithm to find a face collection result image that matches the retrieval information in the stored collection result image library.
  • the server first determines whether the retrieval information meets the preset requirements. For example, the server can make a quality judgment on whether the search information contains face information that can be searched.
  • the judgment criteria for the search information can include, but are not limited to, the size, definition, and relative position of the face information (such as front face or side face). ), whether there are hairstyles and accessories to block, etc.
  • the specific judgment process can be completed by selecting common image algorithms based on specific criteria, such as pattern recognition algorithms or image sharpness detection algorithms, etc., which will not be repeated here.
  • the server sends a message to the user to indicate that the retrieved information is unqualified.
  • the server when retrieving and matching facial feature information, the server further determines the output according to the retrieval result and matching rules.
  • the matching result (that is, the matched facial feature information).
  • the search result can have numerical matching index information, and the matching rule can be to analyze the search result and select the search result with the matching degree index greater than a matching threshold as the matching result, or select the matching index
  • the highest search result is used as the matching result, or alternatively, all the search results with the matching index of the search result with the highest matching degree within a preset difference are selected as the matching result.
  • the matching index can be obtained by using any existing method in the prior art to generate the matching score value of the face image, so it will not be repeated here.
  • the matching rule itself can be determined according to the characteristics of the retrieval result.
  • the server may judge the quality of the collection result image returned in the search result and provide a quality index.
  • the quality of the image of the face collection result can be judged based on parameters such as sharpness and brightness.
  • the matching rule can be set to select the matching index of the search result with the highest matching degree within a preset difference. All retrieval results within are used as matching results.
  • the quality index of the facial feature information is high, the matching rule can be set to select retrieval results with a matching index greater than a matching threshold as the matching result.
  • Step S405 The server outputs the video information corresponding to the matching result.
  • the server obtains the matching result, according to the matching result and the corresponding relationship between the captured image and the video stored by the server, the target video corresponding to the matching result is found, and the information of the target video is pushed to the user for playing.
  • the description information of the multiple videos is output to the user, so that the user can select the target video that he wants to play according to the description information.
  • the server may output the target video for playback according to the selection instruction after receiving the selection instruction of the user to select the target video from the multiple videos.
  • the description information may include any one or a combination of the following: shooting time, video playback duration, thumbnail or video quality score, etc.
  • the output form of the description information can be a list output or a page output, etc., and there is no restriction here.
  • steps S404 and S405 when the server is a server group, the steps of receiving retrieval information, matching and finding target facial feature information, outputting target video, storing video, and storing face library can all be scattered in different Server or cloud to execute, of course, it can also be executed on the same server or cloud, which can be set as needed, and there is no restriction here.
  • the embodiment of the present application also provides a face collection device, as shown in FIG. 6, including:
  • the detection module 601 is configured to perform face detection on image frames in the video, and obtain facial feature information to be inspected in the image frames;
  • the matching module 602 is configured to search and match the existing facial feature database corresponding to the video according to the facial feature information to be inspected in the image frame;
  • the comparison module 603 is configured to, if the target face feature information matching the face feature information to be checked is retrieved from the existing face feature database, then compare the face feature information corresponding to the face to be checked The face image and the deflection angle of the face on the face image corresponding to the target face feature information, to obtain a comparison result;
  • the replacement module 604 is configured to determine, according to the comparison result, whether to replace the face image corresponding to the target face feature information with the face image corresponding to the face feature information to be checked, as the video corresponding The result image of face collection.
  • the embodiment of the present application also provides a video shooting and output system, as shown in FIG. 5, including:
  • the photographing device 502 is configured to perform face detection on image frames in the captured video, and perform face detection in the stored face feature database corresponding to the video according to the facial feature information to be inspected in the detected image frames Retrieval and matching; if the target facial feature information that matches the facial feature information to be inspected is retrieved, then the facial image corresponding to the facial feature information to be inspected is compared with the target facial feature information The deflection angle of the face on the face image of, and determine the face collection result image according to the comparison result; upload the video and the face collection result image to the server and save it;
  • the server 501 is configured to receive the search information, search for a matching face collection result image corresponding to the matching result according to the search information, and generate a matching result; the server outputs information of the video corresponding to the matching result.
  • An embodiment of the present application also provides an electronic device, as shown in FIG. 7, including a memory 710, a processor 720, and a computer program 711 stored on the memory 710 and running on the processor 720, and the processor 720 executes
  • the computer program 711 implements the following steps:
  • the face image corresponding to the facial feature information to be inspected is compared with the target The deflection angle of the face on the face image corresponding to the facial feature information to obtain the comparison result;
  • the comparison result it is determined whether to replace the face image corresponding to the target face feature information with the face image corresponding to the face feature information to be checked as the face collection result corresponding to the video image.
  • the embodiment of the present application also provides a computer-readable storage medium 800, as shown in FIG. 8, a computer program 811 is stored thereon, and the computer program 811 is executed by a processor to implement the following steps:
  • the face image corresponding to the facial feature information to be inspected is compared with the target The deflection angle of the face on the face image corresponding to the facial feature information to obtain the comparison result;
  • the comparison result it is determined whether to replace the face image corresponding to the target face feature information with the face image corresponding to the face feature information to be checked as the face collection result corresponding to the video image.
  • the face collection method, device, system, equipment and medium in the embodiments of this application detect the face feature information to be inspected in the image frame of the video, and then retrieve whether the matching target face feature has been stored Information, if it exists, compare the face image corresponding to the face feature information to be checked and the deflection angle of the face on the face image corresponding to the target face feature information, and determine the face collection result image based on the comparison result to ensure
  • the image collected from the video is a face image with a relatively good deflection angle, so as to improve the efficiency and accuracy of the subsequent search or retrieval of the video based on the collected image.
  • the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
  • the embodiments of the present application provide a face collection method, device, system, equipment, and medium, which can solve the problem that the randomly captured images in the video in the prior art may not be able to characterize the main subject of the video, and it is not convenient to follow the video. Find and retrieve technical issues.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请提供了一种人脸采集方法、装置、系统、设备及介质,方法包括:对视频中的图像帧进行人脸检测,获取待检人脸特征信息;根据待检人脸特征信息,在视频对应的人脸特征库中进行检索匹配;如果检索到同待检人脸特征信息匹配的目标人脸特征信息,则比对待检人脸特征信息和目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;根据比对结果,确定是否用待检人脸特征信息对应的人脸图像替换目标人脸特征信息对应的人脸图像,以作为视频对应的人脸采集结果图像。本申请用于解决在从视频中随机截取采集的图像不一定能表征该视频的主要拍摄对象,不便于后续对视频的查找和检索的技术问题,实现提高查找及检索效率的技术效果。

Description

一种人脸采集方法、装置、系统、设备及介质
相关申请交叉引用
本申请要求于2019年07月11日提交中国专利局的申请号为201910625681.3、名称为“一种人脸采集方法、装置、系统、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种人脸采集方法、装置、系统、设备及介质。
背景技术
随着通信技术和多媒体技术的发展,视频在娱乐、社交和日常生活等领域的应用更趋于丰富。为了便于用户能快速识别或检索到需要的视频,往往会在视频中采集图片来作为视频的封面或作为检索视频的检索对象。
然而,从视频中随机截取的图像不一定能表征该视频的主要拍摄对象,不便于后续对视频的查找和检索。
发明内容
本申请实施例提供了一种人脸采集方法、装置、系统、设备及介质,用于解决至少部分前述技术问题。
本申请实施例提供了一种人脸采集方法,包括:
对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
可选地,所述对视频中的图像帧进行人脸检测,包括以下任意一种或多种的组合:
对检测出的人脸图像进行置信度分析,过滤掉置信度不满足置信度要求的人脸图像;或者,
对检测出的人脸图像进行人脸尺寸分析,过滤掉人脸尺寸不满足尺寸要求的人脸图像;或者,
对检测出的人脸图像进行曝光度分析,过滤掉曝光度不满足曝光要求的人脸图像。
可选地,获取所述图像帧中的待检人脸特征信息包括:获取所述图像帧中人脸图像的位置信息;
检索到同所述待检人脸特征信息匹配的目标人脸特征信息包括:检索到表征的位置与所述位置信息匹配的目标人脸特征信息。
可选地,获取所述图像帧中人脸图像的位置信息包括:
以所述人脸图像的中心坐标作为所述位置信息,以所述人脸图像的顶点坐标作为所述位置信息,或以所述人脸图像的边缘抽取点的坐标作为所述位置信息。
可选地,检索到表征的位置与所述位置信息匹配的目标人脸特征信息包括:
以所述人脸图像的中心坐标作为所述位置信息,先获取所述人脸特征库中已存的各所述人脸图像的中心坐标,再在获取的各所述中心坐标中检索与所述待检人脸特征信息对应的人脸图像的中心坐标的距离符合预设距离要求的匹配中心坐标,以所述匹配中心坐标作为所述目标人脸特征信息。
可选地,在根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存人脸特征库中进行检索匹配之后,还包括:
如果在已存的人脸特征库中没有检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则对应存储所述待检人脸特征信息对应的人脸图像和所述待检人脸特征信息。
可选地,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,包括:
获取所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的俯仰角、偏航角和翻滚角;
基于人脸的俯仰角、偏航角和翻滚角,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度。
可选地,基于人脸的俯仰角、偏航角和翻滚角,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,包括:
计算出所述待检人脸特征信息所对应的人脸图像上人脸的俯仰角、偏航角和翻滚角的平方和作为所述待检人脸特征信息所对应的人脸图像的偏转角度,并计算出所述目标人脸特征信息所对应的人脸图像上人脸的俯仰角、偏航角和翻滚角的平方和作为所述目标人脸特征信息所对应的人脸图像的偏转角度;
比对计算出的两个偏转角度。
可选地,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸 特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果,包括:
比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度和人脸尺寸,获得比对结果。
可选地,比对所述人脸尺寸的方式包括:
比对所述人脸的面积,比对所述人脸的长度或宽度,比对所述人脸在视频一帧图像上的面积占比。
可选地,根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像,包括:
如果所述比对结果表征所述待检人脸特征信息所对应的人脸图像的偏转角度减去所述目标人脸特征信息所对应的人脸图像的偏转角度的差值小于预设角度差值,则判断所述待检人脸特征信息所对应的人脸图像的人脸尺寸是否大于所述目标人脸特征信息所对应的人脸图像的人脸尺寸;
如果判断结果为是,则用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
可选地,根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像,包括:
预设打分规则,根据所述待检人脸特征信息所对应的所述人脸图像的偏转角度和人脸尺寸,采用所述打分规则进行打分,获得所述待检人脸特征信息所对应的所述人脸图像的待检分数,并根据所述目标人脸特征信息所对应的所述人脸图像的所述偏转角度和人脸尺寸,采用所述打分规则进行打分,获得所述目标人脸特征信息所对应的所述人脸图像的目标分数,比对所述待检分数和所述目标分数作为比对结果;
如果所述比对结果表征所述待检分数大于所述目标分数,则用所述待检人脸特征信息所对应的所述人脸图像替换所述目标人脸特征信息所对应的所述人脸图像,否则,不进行替换。
本申请实施例提供了一种视频拍摄及输出方法,包括:
拍摄装置对拍摄的视频中的图像帧进行人脸检测,并根据检测到的所述图像帧中的待检人脸特征信息,在已存的人脸特征库中进行检索匹配;
如果检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,并根据比对结果,确定人脸采集结果图像;
将所述视频和所述人脸采集结果图像对应上传至服务器并保存;
所述服务器接收到检索信息,根据所述检索信息,在人脸采集结果图像库中检索匹配对应的人脸采集结果图像,生成匹配结果;
所述服务器输出与所述匹配结果对应的视频的信息。
可选地,所述所述服务器接收到检索信息,根据所述检索信息,在人脸采集结果图像库中检索匹配对应的人脸采集结果图像,生成匹配结果包括:
所述服务器从用户端或第三方平台接收所述检索信息来进行视频搜索,其中所述检索信息包括人脸特征检索信息和/或限定检索范围的信息;
所述服务器接收到所述检索信息后,通过的人脸匹配算法,在存储的采集结果图像库中查找到与所述检索信息匹配的人脸采集结果图像。
可选地,所述服务器输出与所述匹配结果对应的视频的信息包括:
当所述服务器获得所述匹配结果后,根据所述匹配结果,和所述服务器存储的采集结果图像与视频的对应关系,查找到所述匹配结果对应的目标视频,并将所述目标视频的信息推送给用户进行播放。
可选地,所述服务器输出与所述匹配结果对应的视频的信息还包括:
如果所述匹配结果对应存储有所述多个视频,则输出所述多个视频的描述信息给所述用户,以使所述用户能根据描述信息选择想播放的目标视频;
所述服务器接收到所述用户在所述多个视频中选择目标视频的选择指令后,根据所述选择指令,输出所述目标视频进行播放,其中,所述描述信息包括以下任一种或多种的组合:拍摄时间、视频播放时长、缩略图、视频质量分数。
本申请实施例提供了一种人脸采集装置,包括:
检测模块,用于对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
匹配模块,用于根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
比对模块,用于如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
替换模块,用于根据所述比对结果,确定是否用待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
本申请实施例提供了一种视频拍摄及输出系统,包括:
拍摄装置,用于对拍摄的视频中的图像帧进行人脸检测,并根据检测到的图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;如果检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,并根据比对结果,确定人脸采集结果图像;将所述视频和所述人脸采集结果图像对应上传至服务器并保存;
服务器,用于接收到检索信息,根据所述检索信息,检索匹配对应的人脸采集结果图像,生成匹配结果;所述服务器输出与所述匹配结果对应的视频的信息。
本申请实施例提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:
对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:
对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1为本申请实施例中人脸采集方法的流程图;
图2为本申请实施例中旋转角度示意图;
图3为本申请实施例中分数示意图;
图4为本申请实施例中视频拍摄及输出方法的流程图;
图5为本申请实施例中视频拍摄及输出系统的结构示意图;
图6为本申请实施例中人脸采集装置的结构示意图;
图7为本申请实施例中电子设备的结构示意图;
图8为本申请实施例中存储介质的结构示意图。
具体实施方式
下面通过附图以及具体实施例对本申请技术方案做详细的说明,应当理解本申请实施例以及实施例中的具体特征是对本申请技术方案的详细的说明,而不是对本申请技术方案的限定,在不冲突的情况下,本申请实施例以及实施例中的技术特征可以相互组合。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应理解的是,本公开内容并不会由于如下参照附图的描述而只限于所描述的实施形式。在本文中,在可行的情况下,实施方式可以相互组合、不同实施方式之间的特征替换或借用、在一个实施方式中省略一个或多个特征。
图1示出了依据本申请一个实施例的一种人脸采集方法100,如图1所示,包括:
步骤S101,对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
步骤S102,根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
步骤S103,如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
步骤S104,根据所述比对结果,确定是否用待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
本实施例的拍摄视频和进行人脸检测的拍摄装置可以安装于过山车、旋转木马、跳楼机或大摆锤等游乐园设备上,也可以安装于赛车或自行车等交通工具上,还可以安装于手机、电脑或相机等电子设备上。该拍摄装置上集成有具有人脸检测功能的采集模块。可选地,拍摄装置为运动相机,摄像头等。
在某些实施例中,通过人脸采集方法100确定的人脸采集结果图像可以作为视频的人脸封面以便于用户浏览查找,也可以与视频对应存储后用于视频检索。
下面,结合图1详细介绍本申请某些实施例提供的人脸采集方法的具体 实施步骤:
步骤S101,对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息。
需要说明的是,对视频中的图像帧进行人脸检测,可以是在拍摄视频的过程中边拍摄边进行人脸检测;也可以是在拍摄完视频后,再进行人脸检测,在此不作限制。其中,当在拍摄完视频后再进行人脸检测时,可以设置在视频拍摄完成之后的预设时间段之后再进行人脸检测。此外,可选地,还可以设置进行人脸检测的时间的策略,例如,可以将人脸检测在电子设备的后台运行,当该电子设备检测到其处理器出于相对空闲的状态时,再执行人脸检测。也可以在视频拍摄完成并准备存储时,对拍摄的用户进行提示,由用户手动选择是否愿意保存该视频并进行检测。
还需要说明的是,视频的任一帧图像上可能会检测出一个或多个人脸图像,根据所采用的不同的人脸检测算法,检测出的人脸图像的形式可以为矩形边框框出人脸的图像,或者是以人脸轮廓为边框框出人类的图像,或者是以椭圆边框框出人脸的图像,在此不作限制。
在某些实施例中,为了提高采集的人脸图像的质量和可识别度,还设置对人脸检测到的人脸图像进行质量分析,以过滤掉质量不满足要求的人脸图像,只提取未被过滤掉的人脸图像的待检人脸特征信息。质量分析的方式可以有多种,下面列举三种为例:
第一种,置信度分析。
即对检测出的每个人脸图像均进行置信度分析,过滤掉其中置信度不满足置信度要求的人脸图像。其中,置信度分析的算法可以采用现有的任意置信度算法。
举例来讲,可以设置过滤掉置信度小于等于0.99的人脸图像,以置信度大于0.99的人脸图像作为检测到的目标人脸图像。
第二种,尺寸分析。
即对检测出的人脸图像进行人脸尺寸分析,过滤掉人脸尺寸不满足尺寸要求的人脸图像,以保证人脸图像的大小足够大。其中,该尺寸要求可以是要求人脸面积大于预设值,也可以是要求人脸在视频的该帧图像上的面积占比大于预设占比。
假设人脸检测出的人脸图像是矩形边框框出的人脸图像,可以该矩形边框的尺寸作为人脸尺寸,以该矩形边框内的区域面积作为人脸面积。
举例来讲,可以设置过滤掉人脸在视频图像上的面积占比小于等于0.8%的人脸图像,以面积占比大于0.8%的人脸图像作为检测到的目标人脸图像。
第三种,曝光度分析。
即对检测出的人脸图像进行曝光度分析,过滤掉曝光度不满足曝光要求的人脸图像,即剔除过暗和过亮的人脸图像。
举例来讲,可以设置过滤掉曝光度(灰度值)小于70或大于160的人脸图像,以曝光度满足70~160的范围的人脸图像作为检测到的目标人脸图像。
其中,上述的置信度,人脸在视频图像上的面积占比以及曝光度的阈值 仅为示例性的,本领域技术人员可以根据实际需要对其进行设置和调整。
当然,对人脸图像进行质量分析的方式不限于上述三种,并且还可以组合多种质量分析方式来协同过滤掉质量差的人脸图像。过滤掉质量差的人脸图像后,获取图像帧中质量较好的人脸图像的待检人脸特征信息。可选地,当组合采用多种质量分析方式来协同过滤掉质量差的人脸图像时,可以设置当人脸图像无法通过上述分析方式之中的任一时,即将该人脸图像丢弃。当通过质量分析的人脸图像想多较少时,也可以将上述分析方式得到的参数进行加权运算,并对各人脸图像的加权后分析结果进行比较,以对人脸图像进行选择。
在某些实施例中,待检人脸特征信息可以包括以下任一种或多种的组合:人脸图像的位置信息、人脸轮廓信息、人脸五官特征信息和人脸发型特征信息等。
步骤S102,根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配。
需要说明的是,在对视频进行人脸检测的过程中,会存储检测到的通过质量分析的人脸图像,并对应存储该人脸图像的特征信息,形成人脸特征库。可选地,为了避免同一人的人脸图像存储多次,还设置在视频图像上具有匹配的人脸特征信息的人脸图像仅存储一张。例如,假设待检人脸特征信息为位置信息,则设置在视频图像上所处相同位置的人脸图像仅存储一张,即一个位置仅对应存储一张最优人脸图像,其中,该相同位置为位置信息相同或接近的情况。上述对该相同位置为位置信息是否相同或接近的判断方法将在下文中得到详述。步骤S102中的已存的人脸特征库,可以包括从开始对该视频进行人脸检测起,至当前所存储的全部人脸图像和人脸特征信息。
在某些实施例中,在所述视频对应的已存的人脸特征库中进行检索匹配的方法较多,为了提高检索准确性,可以设置待检人脸特征信息为人脸轮廓及五官等信息,采用基于深度学习的人脸识别算法来进行检索。需要说明的是,本领域技术人员可以选择将上述人脸特征信息中的多种组合使用以进一步提高检索的准确性。
可选地,为了降低检索开销,提高检索效率,可以设置待检人脸特征信息为位置信息,通过位置匹配来进行检索,以确认是否检索到表征的位置与所述位置信息匹配的目标人脸特征信息。
在某些实施例中,检测到的人脸图像后,获取其位置信息的方式也可以有多种,例如,可以以人脸图像的中心坐标作为位置信息,也可以以人脸图像的顶点坐标作为位置信息,还可以以人脸图像的边缘抽取点的坐标作为位置信息。
人脸图像的位置信息的获取方式不同,对应的检索匹配的方式也不相同。下面以位置信息为所述人脸图像的中心坐标为例进行说明:
先获取人脸特征库中已存的各人脸图像的中心坐标,再在获取的各中心坐标中检索与待检人脸特征信息对应的人脸图像的中心坐标的距离符合预设距离要求的匹配中心坐标,以匹配中心坐标作为目标人脸特征信息。可选地, 该预设距离要求可以是小于80个像素。
举例来讲,待检人脸特征信息对应的人脸图像的中心坐标为(200,450),已存的人脸图像有两张,中心坐标分别为(600,100)和(201,448)。其中中心坐标(201,448)与中心坐标(200,450)间隔2~3个像素的距离,小于80个像素,则(201,448)为匹配中心坐标,其对应的人脸图像为目标人脸特征信息所对应的人脸图像。需要说明的是,根据图像坐标计算,中心坐标(201,448)与中心坐标(200,450)的准确间隔为
Figure PCTCN2020092992-appb-000001
介于2和3个像素之间。可选地,为了计算简便,可以对该像素间隔进行四舍五入取整,当取整后的像素间隔小于80个像素时,即判定对应的人脸图像满足要求,为目标人脸特征信息所对应的人脸图像。
如果在已存的人脸特征库中没有检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则对应存储所述待检人脸特征信息对应的人脸图像和所述待检人脸特征信息。举例来讲,以待检人脸特征信息为位置信息为例,如果在已存的人脸图像中没有检索到所处位置符合待检人脸特征信息所对应的人脸图像的位置信息的人脸图像,则可以认为没有存储与待检人脸特征信息所对应的人脸图像为同一人的人脸图像,故对应存储所述待检人脸特征信息所对应的人脸图像和所述位置信息。
如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则执行步骤S103。
步骤S103,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果。
比对人脸的偏转角度的方式较多,可以是比对人脸上鼻子部位在人脸上的居中度。可选地,还可以是计算出人脸的三维角度来进行比对,以提高比对精确度。下面以比对人脸的三维角度为例来进行说明:
三维的偏转角度比对可以通过计算俯仰角(pitch)、偏航角(yaw)、翻滚角(roll)来实现。如图2所示,人脸上仰或下俯的角度可以通过pitch来表征,人脸左右旋转的角度可以通过yaw来表征,人脸左右摇摆的角度可以通过roll来表征。采用人脸识别技术识别人脸上器官的位置,再通过分析各个器官的位置即可计算出pitch、yaw和roll的具体角度值。其中,对图像中人脸的俯仰角(pitch)、偏航角(yaw)、翻滚角(roll)的具体计算方法可以参考本领域技术人员所熟悉的现有技术中的常规方式,在此不再赘述。
在某些实施例中,计算出pitch、yaw和roll的具体角度值后,进行偏转角度比对的方式可以是比对pitch、yaw和roll的和值;或逐一比对pitch、yaw和roll;可选地,可以是计算出所述待检人脸特征信息所对应的人脸图像上人脸的pitch、yaw和roll的平方和作为所述待检人脸特征信息所对应的人脸图像的偏转角度,并计算出所述目标人脸特征信息所对应的人脸图像上人脸的pitch、yaw和roll的平方和作为所述目标人脸特征信息所对应的人脸图像的偏转角度,再比对。
举例来讲,假设待检人脸特征信息所对应的人脸图像的pitch为10度、yaw为8度、roll为11度;目标人脸特征信息所对应的人脸图像的pitch为6 度、yaw为15度、roll为8度,则计算出待检人脸特征信息所对应的人脸图像的偏转角度为10 2+8 2+11 2=285,目标人脸特征信息所对应的人脸图像的偏转角度为6 2+15 2+8 2=325。则偏转角度的比对结果为目标人脸特征信息所对应的人脸图像偏转多40。
在某些实施例中,为了使得比对结果更能全面的表征人脸图像的显示质量和状态,还可以在比对结果中引入其他因素的比对与偏转角度的比对相结合。例如,还可以引入人脸尺寸进行比对,从而使比对结果更全面化。
具体来讲,比对人脸尺寸的方式较多,可以是比对人脸的面积,或者比对人脸的长度或宽度,还可以是比对人脸在视频一帧图像上的面积占比。
举例来讲,假设待检人脸特征信息所对应的人脸图像在视频一帧图像上的面积占比为25%,目标人脸特征信息所对应的人脸图像在视频一帧图像上的面积占比为31%,则人脸尺寸的比对结果为目标人脸特征信息所对应的人脸图像的面积占比要大6%。需要说明的是,当比对人脸在视频一帧图像上的面积占比时,需要保证在拍摄待检人脸特征信息所对应的人脸图像与目标人脸特征信息所对应的人脸图像时,被拍摄者的面部与摄像头的距离大致相同,否则由于近大远小的影响会影响人脸尺寸比对结果的准确性。
获得比对结果后执行步骤S104,根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
即如果确定用待检人脸特征信息所对应的人脸图像替换目标人脸特征信息所对应的人脸图像,则以待检人脸特征信息所对应的人脸图像作为该视频对应的人脸采集结果图像;如果确定不用待检人脸特征信息所对应的人脸图像替换目标人脸特征信息所对应的人脸图像,则继续以目标人脸特征信息所对应的人脸图像作为该视频对应的人脸采集结果图像。
根据比对结果确定是否用待检人脸特征信息所对应的人脸图像替换目标人脸特征信息所对应的人脸图像的方式较多,可以根据需要设置,下面列举三种为例:
第一种,仅考虑偏转角度的比对结果。
如果比对结果表征:待检人脸特征信息所对应的人脸图像的偏转角度小于目标人脸特征信息所对应的人脸图像的偏转角度,则用待检人脸特征信息所对应的人脸图像替换目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。反之,则继续以目标人脸特征信息所对应的人脸图像作为该视频对应的人脸采集结果图像。
第二种,先考虑偏转角度的比对结果,再考虑人脸尺寸的比对结果。
如果比对结果表征:待检人脸特征信息所对应的人脸图像的偏转角度减去目标人脸特征信息所对应的人脸图像的偏转角度的差值小于预设角度差值,则进一步判断待检人脸特征信息所对应的人脸图像的人脸尺寸是否大于目标人脸特征信息所对应的人脸图像的人脸尺寸。如果判断结果为是,则用待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。如果比对结果不满足上 述条件,则保持人脸采集结果图像为目标人脸特征信息所对应的人脸图像。
在实施过程中,所述预设角度差值为正数。待检人脸特征信息所对应的人脸图像的偏转角度小于等于目标人脸特征信息所对应的人脸图像的偏转角度时,计算出的差值为零或负数,小于预设角度差值;待检人脸特征信息所对应的人脸图像的偏转角度略大于但接近目标人脸特征信息所对应的人脸图像的偏转角度时,计算出的差值也小于预设角度差值。故当计算出的偏转角度差值小于预设角度差值时,待检人脸特征信息所对应的人脸图像的正面程度更优于或接近于目标人脸特征信息所对应的人脸图像,在此基础上,如果待检人脸特征信息所对应的人脸图像的人脸尺寸还大于目标人脸特征信息所对应的人脸图像时,则以偏转角度和尺寸综合更优的待检人脸特征信息所对应的人脸图像替换目标人脸特征信息所对应的人脸图像作为人脸采集结果图像。以待检人脸特征信息为位置信息为例,替换后的人脸采集结果图像即该视频在该位置信息所表征的区域在当前所对应存储的人脸图像。
可以理解的是,本领域技术人员应当理解,上述考虑偏转角度的比对结果和考虑人脸尺寸的比对结果的顺序可以互换。
第三种,综合偏转角度的比对结果和人脸尺寸的比对结果。
即预设打分规则,根据待检人脸特征信息所对应的人脸图像的偏转角度和人脸尺寸,采用该打分规则进行打分,获得待检人脸特征信息所对应的人脸图像的待检分数。并根据目标人脸特征信息所对应的人脸图像的偏转角度和人脸尺寸,采用该打分规则进行打分,获得目标人脸特征信息所对应的人脸图像的目标分数。比对该待检分数和目标分数作为比对结果。如果比对结果表征待检分数大于目标分数则用待检人脸特征信息所对应的人脸图像替换目标人脸特征信息所对应的人脸图像,否则,不进行替换。
举例来讲,如图3所示,设置分数与人脸尺寸正相关,与偏转角度反相关。即在人脸尺寸相同时,偏转角度越小分数越大;在偏转角度相同时,人脸尺寸越大分数越大。例如,可以设置分数等于人脸尺寸减去偏转角度,或等于人脸尺寸除以偏转角度等,在此不作限制。
当然,在具体实施过程中,根据比对结果确定是否用待检人脸特征信息所对应的人脸图像替换目标人脸特征信息所对应的人脸图像的方式不限于上述两种,可以根据实际场景要求设置。
确定的人脸采集结果图像可以用于视频的人脸封面,也可以用于与视频对应上传至服务器,以供视频检索。本申请实施例还提供了一种视频拍摄及输出方法400,如图4所示,包括:
步骤S401,拍摄装置对拍摄的视频中的图像帧进行人脸检测,并根据检测到的所述图像帧中的待检人脸特征信息,在已存的人脸特征库中进行检索匹配;
步骤S402,如果检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,并根据比对结果,确定人脸采集结果图像;
步骤S403,将所述视频和所述人脸采集结果图像对应上传至服务器并保存;
步骤S404,所述服务器接收到检索信息,根据所述检索信息,在人脸采集结果图像库中检索匹配对应的人脸采集结果图像,生成匹配结果;
步骤S405,所述服务器输出与所述匹配结果对应的视频的信息。
在介绍本实施例提供的方法之前,先介绍其所应用于的系统,如图5所示,该系统包括服务器501,及一个或多个拍摄装置502,其中,服务器501可以为单台服务器(主拍摄装置或独立的服务器)、多台服务器组或云端,在此不作限制。拍摄装置502与服务器501之间可以通过有线或无线网络连接,在此也不作限制。可以理解的是,当服务器501为主拍摄装置时,其集成有提供服务器功能的功能模块。
其中,步骤S401~步骤S403在前已经进行详细介绍,在此不作累述。
步骤S404,所述服务器接收到检索信息,根据所述检索信息,在人脸采集结果图像库中检索匹配对应的人脸采集结果图像,生成匹配结果。
在某些实施例中,服务器可以从用户端或第三方平台接收检索信息来进行视频搜索。该检索信息可以包括人脸特征检索信息(例如,人脸图像或人脸描述数据)和/或限定检索范围的信息(例如,性别、年龄段或身高等)。该人脸特征检索信息可以为用户采用任何图像采集设备(例如手机终端、平板电脑终端、相机等)拍摄的包括需搜索的人脸的图像,也可以为用户已保存的(例如用户本地保存或云存储平台保存)包含待搜索人脸的图像。人脸特征检索信息还可以是包含人脸信息的深度图或具有深度信息的图像。用户向服务器发送检索信息的方式可以是通过扫描二维码进入对应APP的指令面板后,向服务器发送检索信息,也可以是用户登录应用来发送检索信息,为了提高安全性,还可以设置在服务器向用户输出目标视频之前,或者在服务器接收检索信息之前,会先对用户进行身份验证,以确保用户不是非法干扰用户。但本实施例的作为搜索依据的检索信息的内容及其获取和发送方式均不限于上述列举。
服务器接收到检索信息后,通过现有的人脸匹配算法,在存储的采集结果图像库中查找到与检索信息匹配的人脸采集结果图像。可选地,在一些实施例中,在接收到检索信息后,服务器首先对检索信息是否符合预设要求进行判断。例如,服务器可以对检索信息的是否包含可进行检索的人脸信息进行质量判断,对检索信息的判断标准可包括但不限于人脸信息的大小、清晰度、相对位置(例如正脸或侧脸),是否存在发型和饰物遮挡等等。具体的判断过程可以采用针对具体标准,选取常见的图像算法完成,例如模式识别算法或图像清晰度检测算法等等,此处不再赘述。当检索信息不符合预设要求时,服务器向用户端发送信息提示检索信息不合格。
由于检索信息可能存在多个匹配程度较为接近或匹配度较高的人脸特征信息,在一些实施例中,在检索匹配对应人脸特征信息时,服务器还进一步根据检索结果和匹配规则,确定输出的匹配结果(即匹配到的人脸特征信息)。例如,在检索之后,检索结果可以具有数值化的匹配度指数信息,匹配规则 可以是对检索结果进行分析,选取匹配度指数大于一个匹配阈值的检索结果作为匹配结果,也可以是选取匹配度指数最高检索结果作为匹配结果,又或者,选取同匹配度最高的检索结果的匹配度指数差距在一个预设差值内所有检索结果作为匹配结果。匹配度指数可以采用任何现有技术中已有的产生人脸图像匹配分数值的方式来获得,故此处不再赘述。在又一些实施例中,匹配规则本身可以根据检索结果的特征来确定。例如,服务器可以对检索结果中返回的采集结果图像的质量进行判断,给出一个质量指数。人脸采集结果图像的质量判断可以基于清晰度和亮度等参数来进行判断。当检索出的人脸采集结果图像的质量指数较低(例如低于一个预设值)时,匹配规则可以设定为选取同匹配度最高的检索结果的匹配度指数差距在一个预设差值内所有检索结果作为匹配结果,当人脸特征信息的质量指数较高时,匹配规则可以设定为选取匹配度指数大于一个匹配阈值的检索结果作为匹配结果。
本领域普通技术人员能够理解,上述规则仅仅是示意性的而非限定性的,具体的匹配规则可视具体情况进行选择,本申请不做限定。根据匹配规则确定输出的匹配结果,能够提高最终输出的匹配结果的准确度和数量上的合理性,优化用户体验,同时避免服务器输出较多低质量无意义的结果,降低系统性能。
步骤S405,所述服务器输出与所述匹配结果对应的视频的信息。
可选地,当服务器获得匹配结果后,根据匹配结果,和服务器存储的采集结果图像与视频的对应关系,查找到匹配结果对应的目标视频,并将该目标视频的信息推送给用户进行播放。
可选的,如果匹配结果对应存储有多个视频,则输出该多个视频的描述信息给用户,以使用户能根据描述信息选择想播放的目标视频。可选地,服务器可以在接收到用户在多个视频中选择目标视频的选择指令后,根据选择指令,输出目标视频进行播放。其中,该描述信息可以包括以下任一种或多种的组合:拍摄时间、视频播放时长、缩略图或视频质量分数等。该描述信息输出的形式可以是列表输出或分页输出等,在此均不作限制。
需要说明的是,在步骤S404和S405中,当服务器为服务器组时,接收检索信息、匹配查找目标人脸特征信息、输出目标视频、存储视频及存储人脸库等步骤均可以分散在不同的服务器或云端去执行,当然也可以在同一服务器或云端执行,可以根据需要设置,在此不作限制。
本申请实施例还提供了一种人脸采集装置,如图6所示,包括:
检测模块601,配置为对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
匹配模块602,配置为根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
比对模块603,配置为如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
替换模块604,配置为根据所述比对结果,确定是否用待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
本实施例中的模块的实施方式均在前已进行详细描述,为了说明书的简洁,在此不作累述。
本申请实施例还提供了一种视频拍摄及输出系统,如图5所示,包括:
拍摄装置502,配置为对拍摄的视频中的图像帧进行人脸检测,并根据检测到的图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;如果检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,并根据比对结果,确定人脸采集结果图像;将所述视频和所述人脸采集结果图像对应上传至服务器并保存;
服务器501,配置为接收到检索信息,根据所述检索信息,检索匹配对应的人脸采集结果图像,生成匹配结果;所述服务器输出与所述匹配结果对应的视频的信息。
本实施例中的系统在前已进行详细描述,为了说明书的简洁,在此不作累述。
本申请实施例还提供了一种电子设备,如图7所示,包括存储器710、处理器720及存储在存储器710上并可在处理器720上运行的计算机程序711,所述处理器720执行所述计算机程序711时实现以下步骤:
对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
本申请实施例还提供了一种计算机可读存储介质800,如图8所示,其上存储有计算机程序811,该计算机程序811被处理器执行时实现以下步骤:
对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图 像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
本申请实施例中的上述一个或多个技术方案,至少具有如下一种或多种技术效果:
本申请实施例中的人脸采集方法、装置、系统、设备及介质,检测视频中图像帧的待检人脸特征信息待检人脸特征信息,再检索是否已存储有匹配的目标人脸特征信息,如存在则比对待检人脸特征信息所对应的人脸图像和目标人脸特征信息所对应的人脸图像上人脸的偏转角度,根据比对结果确定人脸采集结果图像,从而保证了从视频中采集的图像是偏转角度相对较优的人脸图像,以提高后续根据采集图像来查找或检索视频的效率和准确度。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
工业实用性
本申请实施例提供了一种人脸采集方法、装置、系统、设备及介质,可以解决现有技术中视频中随机截取的图像不一定能表征该视频的主要拍摄对象,不便于后续对视频的查找和检索的技术问题。

Claims (20)

  1. 一种人脸采集方法,其特征在于,包括:
    对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
    根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
    如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
    根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
  2. 如权利要求1所述的方法,所述对视频中的图像帧进行人脸检测,包括以下任意一种或多种的组合:
    对检测出的人脸图像进行置信度分析,过滤掉置信度不满足置信度要求的人脸图像;或者,
    对检测出的人脸图像进行人脸尺寸分析,过滤掉人脸尺寸不满足尺寸要求的人脸图像;或者,
    对检测出的人脸图像进行曝光度分析,过滤掉曝光度不满足曝光要求的人脸图像。
  3. 如权利要求1或2所述的方法,获取所述图像帧中的待检人脸特征信息包括:获取所述图像帧中人脸图像的位置信息;
    检索到同所述待检人脸特征信息匹配的目标人脸特征信息包括:检索到表征的位置与所述位置信息匹配的目标人脸特征信息。
  4. 如权利要求3所述的方法,获取所述图像帧中人脸图像的位置信息包括:
    以所述人脸图像的中心坐标作为所述位置信息,以所述人脸图像的顶点坐标作为所述位置信息,或以所述人脸图像的边缘抽取点的坐标作为所述位 置信息。
  5. 如权利要求4所述的方法,检索到表征的位置与所述位置信息匹配的目标人脸特征信息包括:
    以所述人脸图像的中心坐标作为所述位置信息,先获取所述人脸特征库中已存的各所述人脸图像的中心坐标,再在获取的各所述中心坐标中检索与所述待检人脸特征信息对应的人脸图像的中心坐标的距离符合预设距离要求的匹配中心坐标,以所述匹配中心坐标作为所述目标人脸特征信息。
  6. 如权利要求1至5中任一项所述的方法,在根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存人脸特征库中进行检索匹配之后,还包括:
    如果在已存的人脸特征库中没有检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则对应存储所述待检人脸特征信息对应的人脸图像和所述待检人脸特征信息。
  7. 如权利要求1至6中任一项所述的方法,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,包括:
    获取所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的俯仰角、偏航角和翻滚角;
    基于人脸的俯仰角、偏航角和翻滚角,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度。
  8. 如权利要求7所述的方法,基于人脸的俯仰角、偏航角和翻滚角,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,包括:
    计算出所述待检人脸特征信息所对应的人脸图像上人脸的俯仰角、偏航角和翻滚角的平方和作为所述待检人脸特征信息所对应的人脸图像的偏转角度,并计算出所述目标人脸特征信息所对应的人脸图像上人脸的俯仰角、偏航角和翻滚角的平方和作为所述目标人脸特征信息所对应的人脸图像的偏转 角度;
    比对计算出的两个偏转角度。
  9. 如权利要求1至8中任一项所述的方法,比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果,包括:
    比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度和人脸尺寸,获得比对结果。
  10. 如权利要求9所述的方法,比对所述人脸尺寸的方式包括:
    比对所述人脸的面积,比对所述人脸的长度或宽度,比对所述人脸在视频一帧图像上的面积占比。
  11. 如权利要求9或10所述的方法,根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像,包括:
    如果所述比对结果表征所述待检人脸特征信息所对应的人脸图像的偏转角度减去所述目标人脸特征信息所对应的人脸图像的偏转角度的差值小于预设角度差值,则判断所述待检人脸特征信息所对应的人脸图像的人脸尺寸是否大于所述目标人脸特征信息所对应的人脸图像的人脸尺寸;
    如果判断结果为是,则用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
  12. 如权利要求9或10所述的方法,根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像,包括:
    预设打分规则,根据所述待检人脸特征信息所对应的所述人脸图像的偏转角度和人脸尺寸,采用所述打分规则进行打分,获得所述待检人脸特征信息所对应的所述人脸图像的待检分数,并根据所述目标人脸特征信息所对应的所述人脸图像的所述偏转角度和人脸尺寸,采用所述打分规则进行打分,获得所述目标人脸特征信息所对应的所述人脸图像的目标分数,比对所述待 检分数和所述目标分数作为比对结果;
    如果所述比对结果表征所述待检分数大于所述目标分数,则用所述待检人脸特征信息所对应的所述人脸图像替换所述目标人脸特征信息所对应的所述人脸图像,否则,不进行替换。
  13. 一种视频拍摄及输出方法,其特征在于,包括:
    拍摄装置对拍摄的视频中的图像帧进行人脸检测,并根据检测到的所述图像帧中的待检人脸特征信息,在已存的人脸特征库中进行检索匹配;
    如果检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,并根据比对结果,确定人脸采集结果图像;
    将所述视频和所述人脸采集结果图像对应上传至服务器并保存;
    所述服务器接收到检索信息,根据所述检索信息,在人脸采集结果图像库中检索匹配对应的人脸采集结果图像,生成匹配结果;
    所述服务器输出与所述匹配结果对应的视频的信息。
  14. 如权利要求13所述的方法,所述所述服务器接收到检索信息,根据所述检索信息,在人脸采集结果图像库中检索匹配对应的人脸采集结果图像,生成匹配结果包括:
    所述服务器从用户端或第三方平台接收所述检索信息来进行视频搜索,其中所述检索信息包括人脸特征检索信息和/或限定检索范围的信息;
    所述服务器接收到所述检索信息后,通过的人脸匹配算法,在存储的采集结果图像库中查找到与所述检索信息匹配的人脸采集结果图像。
  15. 如权利要求13或14所述的方法,所述服务器输出与所述匹配结果对应的视频的信息包括:
    当所述服务器获得所述匹配结果后,根据所述匹配结果,和所述服务器存储的采集结果图像与视频的对应关系,查找到所述匹配结果对应的目标视频,并将所述目标视频的信息推送给用户进行播放。
  16. 如权利要求15所述的方法,所述服务器输出与所述匹配结果对应的视频的信息还包括:
    如果所述匹配结果对应存储有所述多个视频,则输出所述多个视频的描述信息给所述用户,以使所述用户能根据描述信息选择想播放的目标视频;
    所述服务器接收到所述用户在所述多个视频中选择目标视频的选择指令后,根据所述选择指令,输出所述目标视频进行播放,其中,所述描述信息包括以下任一种或多种的组合:拍摄时间、视频播放时长、缩略图、视频质量分数。
  17. 一种人脸采集装置,其特征在于,包括:
    检测模块,用于对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
    匹配模块,用于根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
    比对模块,用于如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
    替换模块,用于根据所述比对结果,确定是否用待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
  18. 一种视频拍摄及输出系统,其特征在于,包括:
    拍摄装置,用于对拍摄的视频中的图像帧进行人脸检测,并根据检测到的图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;如果检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,并根据比对结果,确定人脸采集结果图像;将所述视频和所述人脸采集结果图像对应上传至服务器并保存;
    服务器,用于接收到检索信息,根据所述检索信息,检索匹配对应的人脸采集结果图像,生成匹配结果;所述服务器输出与所述匹配结果对应的视频的信息。
  19. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现以下步骤:
    对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
    根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
    如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
    根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现以下步骤:
    对视频中的图像帧进行人脸检测,并获取所述图像帧中的待检人脸特征信息;
    根据所述图像帧中的待检人脸特征信息,在所述视频对应的已存的人脸特征库中进行检索匹配;
    如果在已存的人脸特征库中检索到同所述待检人脸特征信息匹配的目标人脸特征信息,则比对所述待检人脸特征信息所对应的人脸图像和所述目标人脸特征信息所对应的人脸图像上人脸的偏转角度,获得比对结果;
    根据所述比对结果,确定是否用所述待检人脸特征信息所对应的人脸图像替换所述目标人脸特征信息所对应的人脸图像,以作为所述视频对应的人脸采集结果图像。
PCT/CN2020/092992 2019-07-11 2020-05-28 一种人脸采集方法、装置、系统、设备及介质 WO2021004186A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910625681.3A CN110458026A (zh) 2019-07-11 2019-07-11 一种人脸采集方法、装置、系统、设备及介质
CN201910625681.3 2019-07-11

Publications (1)

Publication Number Publication Date
WO2021004186A1 true WO2021004186A1 (zh) 2021-01-14

Family

ID=68482698

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092992 WO2021004186A1 (zh) 2019-07-11 2020-05-28 一种人脸采集方法、装置、系统、设备及介质

Country Status (2)

Country Link
CN (1) CN110458026A (zh)
WO (1) WO2021004186A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014980A (zh) * 2021-02-23 2021-06-22 北京字跳网络技术有限公司 远程控制方法、装置和电子设备
CN113095284A (zh) * 2021-04-30 2021-07-09 平安国际智慧城市科技股份有限公司 人脸选取方法、装置、设备及计算机可读存储介质
CN113409056A (zh) * 2021-06-30 2021-09-17 深圳市商汤科技有限公司 支付方法、装置、本地识别设备、人脸支付系统及设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458026A (zh) * 2019-07-11 2019-11-15 成都市喜爱科技有限公司 一种人脸采集方法、装置、系统、设备及介质
CN112069331B (zh) * 2020-08-31 2024-06-11 深圳市商汤科技有限公司 一种数据处理、检索方法、装置、设备及存储介质
CN112040278A (zh) * 2020-09-16 2020-12-04 成都市喜爱科技有限公司 视频处理方法、装置、拍摄终端、服务器及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855317A (zh) * 2012-08-31 2013-01-02 王晖 一种基于演示视频的多模式索引方法及系统
CN106021405A (zh) * 2016-05-12 2016-10-12 北京奇虎科技有限公司 生成相册封面的方法及装置
CN107977674A (zh) * 2017-11-21 2018-05-01 广东欧珀移动通信有限公司 图像处理方法、装置、移动终端及计算机可读存储介质
CN108171207A (zh) * 2018-01-17 2018-06-15 百度在线网络技术(北京)有限公司 基于视频序列的人脸识别方法和装置
CN110458026A (zh) * 2019-07-11 2019-11-15 成都市喜爱科技有限公司 一种人脸采集方法、装置、系统、设备及介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463117B (zh) * 2014-12-02 2018-07-03 苏州科达科技股份有限公司 一种基于视频方式的人脸识别样本采集方法及系统
CN108520493A (zh) * 2018-03-30 2018-09-11 广东欧珀移动通信有限公司 图像替换的处理方法、装置、存储介质及电子设备
CN108647651A (zh) * 2018-05-14 2018-10-12 深圳市科发智能技术有限公司 一种提高识别通过率的人脸识别方法、系统及装置
CN109559362B (zh) * 2018-11-23 2022-10-21 广东智媒云图科技股份有限公司 一种图像主体脸部替换方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855317A (zh) * 2012-08-31 2013-01-02 王晖 一种基于演示视频的多模式索引方法及系统
CN106021405A (zh) * 2016-05-12 2016-10-12 北京奇虎科技有限公司 生成相册封面的方法及装置
CN107977674A (zh) * 2017-11-21 2018-05-01 广东欧珀移动通信有限公司 图像处理方法、装置、移动终端及计算机可读存储介质
CN108171207A (zh) * 2018-01-17 2018-06-15 百度在线网络技术(北京)有限公司 基于视频序列的人脸识别方法和装置
CN110458026A (zh) * 2019-07-11 2019-11-15 成都市喜爱科技有限公司 一种人脸采集方法、装置、系统、设备及介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014980A (zh) * 2021-02-23 2021-06-22 北京字跳网络技术有限公司 远程控制方法、装置和电子设备
CN113014980B (zh) * 2021-02-23 2023-07-18 北京字跳网络技术有限公司 远程控制方法、装置和电子设备
CN113095284A (zh) * 2021-04-30 2021-07-09 平安国际智慧城市科技股份有限公司 人脸选取方法、装置、设备及计算机可读存储介质
CN113409056A (zh) * 2021-06-30 2021-09-17 深圳市商汤科技有限公司 支付方法、装置、本地识别设备、人脸支付系统及设备
CN113409056B (zh) * 2021-06-30 2022-11-08 深圳市商汤科技有限公司 支付方法、装置、本地识别设备、人脸支付系统及设备

Also Published As

Publication number Publication date
CN110458026A (zh) 2019-11-15

Similar Documents

Publication Publication Date Title
WO2021004186A1 (zh) 一种人脸采集方法、装置、系统、设备及介质
WO2020151489A1 (zh) 基于面部识别的活体检测的方法、电子设备和存储介质
CN105938552B (zh) 底图自动更新的人脸识别方法及装置
US9367756B2 (en) Selection of representative images
CN109284729B (zh) 基于视频获取人脸识别模型训练数据的方法、装置和介质
US10523894B2 (en) Automated selection of keeper images from a burst photo captured set
CN109284733B (zh) 一种基于yolo和多任务卷积神经网络的导购消极行为监控方法
CN109035246B (zh) 一种人脸的图像选择方法及装置
US9571726B2 (en) Generating attention information from photos
EP3028184B1 (en) Method and system for searching images
WO2017185630A1 (zh) 基于情绪识别的信息推荐方法、装置和电子设备
CN108875542B (zh) 一种人脸识别方法、装置、系统及计算机存储介质
WO2019033574A1 (zh) 电子装置、动态视频人脸识别的方法、系统及存储介质
US9626577B1 (en) Image selection and recognition processing from a video feed
CN107423306B (zh) 一种图像检索方法及装置
WO2017054442A1 (zh) 一种图像信息识别处理方法及装置、计算机存储介质
JP6351243B2 (ja) 画像処理装置、画像処理方法
WO2021143865A1 (zh) 定位方法及装置、电子设备、计算机可读存储介质
WO2015039575A1 (en) Method and system for performing image identification
CN109815823B (zh) 数据处理方法及相关产品
CN116071790A (zh) 掌静脉图像质量评估方法、装置、设备及存储介质
CN110751071A (zh) 人脸识别方法及装置、存储介质、计算设备
JP4708835B2 (ja) 顔検出装置、顔検出方法、及び顔検出プログラム
US9286707B1 (en) Removing transient objects to synthesize an unobstructed image
CN111476132A (zh) 视频场景识别方法、装置及电子设备、存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20837008

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20837008

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20837008

Country of ref document: EP

Kind code of ref document: A1