CN117115887A - Face recognition method and device under specific behaviors - Google Patents

Face recognition method and device under specific behaviors Download PDF

Info

Publication number
CN117115887A
CN117115887A CN202311063795.6A CN202311063795A CN117115887A CN 117115887 A CN117115887 A CN 117115887A CN 202311063795 A CN202311063795 A CN 202311063795A CN 117115887 A CN117115887 A CN 117115887A
Authority
CN
China
Prior art keywords
face
photo
picture
quality
detection
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202311063795.6A
Other languages
Chinese (zh)
Inventor
杨帆
曹赛男
王琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaoshi Technology Jiangsu Co ltd
Original Assignee
Xiaoshi Technology Jiangsu Co ltd
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 Xiaoshi Technology Jiangsu Co ltd filed Critical Xiaoshi Technology Jiangsu Co ltd
Priority to CN202311063795.6A priority Critical patent/CN117115887A/en
Publication of CN117115887A publication Critical patent/CN117115887A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • 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/172Classification, e.g. identification
    • 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/20Movements or behaviour, e.g. gesture recognition

Abstract

The application discloses a face recognition method under specific behaviors, and belongs to the technical field of face recognition. The application discloses a face recognition method under specific behaviors, which is characterized in that a method for realizing face recognition under specific behaviors based on a computer vision technology is described, a process for realizing specific behavior analysis based on the computer vision technology is described first, then a face recognition process is added in the process, the two processes are combined, finally, a behavior analysis result is output, and a face recognition result is synchronously output.

Description

Face recognition method and device under specific behaviors
Technical Field
The application relates to the technical field of face recognition, in particular to a face recognition method under specific behaviors.
Background
Specific behavior analysis based on computer vision technology, such as detection of unworn helmets, running detection, phone call detection, smoking detection, etc., has been widely used in the industry. Meanwhile, the face detection and face recognition are realized based on a computer vision technology, and the method is widely applied in the industry.
In certain business scenarios it is desirable to be able to identify the specific person who is taking place after detecting an abnormal behaviour, e.g. detecting that a helmet is not being worn, running, making a call, smoking a cigarette. The application provides a method for realizing face recognition under specific behaviors based on a computer vision technology, such as face recognition under running behaviors, face recognition under the behaviors without wearing a safety helmet, and the like.
Disclosure of Invention
The application provides a face recognition method under specific behaviors, which can solve the problem of difficulty in face recognition under specific behaviors. The technical proposal is as follows:
in one aspect, a method for face recognition under specific behaviors is provided, the method is applicable to an analysis system, and the method comprises the following steps:
obtaining an output result of the SDK algorithm, wherein the output result comprises a human body position and a human body photo under specific behaviors;
cutting the human body photo to obtain an initial human face photo;
performing face detection on the initial face photo to obtain a face detection result;
responding to the face detection result to display that a face exists, and carrying out face quality detection;
responding to the face quality detection result to meet the preset quality requirement, and judging whether the initial face photo is a stored picture or not;
in response to the initial face photograph being a stored picture, comparing the initial face photograph with the stored picture in quality;
and storing the picture with higher quality in the comparison result as the optimal face picture.
Optionally, the method further comprises:
and responding to the face detection result to display that no face exists, and ending the current flow.
Optionally, the responding to the face detection result shows that a face exists, and the face quality detection includes:
responding to the face detection result to display that a face exists, and acquiring a maximum face picture from the face detection result;
and detecting the face quality of the maximum face picture.
Optionally, the content of the face quality detection at least includes contrast, brightness, resolution and face angle.
Optionally, the method further comprises:
and storing the initial face photo in response to the initial face photo not being the stored picture.
Optionally, before the obtaining the output result of the SDK algorithm, the method further includes:
responding to the analysis system to start executing tasks, taking out video frames from a video frame queue, and performing frame extraction processing on the video frames;
converting the YUV picture corresponding to the video frame into a corresponding BGR picture;
sending the BGR picture into an algorithm SDK detection;
and under the SDK analysis of the algorithm, obtaining an output result of the SDK algorithm, and storing the optimal face photo under the video frame.
Optionally, the output result further includes a tracking ID, and the method further includes:
judging whether an alarm condition is met or not again according to an output result of the algorithm SDK, wherein the alarm condition comprises alarm frequency limitation, alarm detection interval, detection region time threshold and detection region sensitivity;
judging whether the ID tracking ID disappears or not, wherein the ID tracking ID is used for indicating the unique tracking ID of the pedestrian;
when the ID tracking ID disappears, judging whether a behavior alarm is generated for the ID tracking ID;
if the action alarm is generated, judging whether the analysis system stores the face photo or not in the process of the ID tracking ID;
if the face photo is stored, comparing the face photo with the face database photo, storing the successfully compared result information and personnel information, and pushing a behavior alarm event to an external system.
Optionally, the frame extraction frequency is a custom configuration.
In another aspect, there is provided a face recognition device for a specific behavior, the device being adapted for use in an analysis system, the device comprising:
the result acquisition module is used for acquiring an output result of the SDK algorithm, wherein the output result comprises a human body position and a human body photo under specific behaviors;
the photo cutting module is used for cutting the human body photo to obtain an initial human face photo;
the face detection module is used for carrying out face detection on the initial face photo to obtain a face detection result;
the quality detection module is used for responding to the face detection result to display that a face exists and detecting the quality of the face;
the picture detection module is used for responding to the face quality detection result to meet the preset quality requirement and judging whether the initial face picture is a stored picture or not;
the quality comparison module is used for responding to the initial face photo as a stored picture and comparing the quality of the initial face photo with the stored picture;
and the picture storage module is used for storing pictures with higher quality in the comparison result as the optimal face pictures.
The application has the beneficial effects that:
the application discloses a face recognition method under specific behaviors, which is characterized in that a method for realizing face recognition under specific behaviors based on a computer vision technology is described, a process for realizing specific behavior analysis based on the computer vision technology is described first, then a face recognition process is added in the process, the two processes are combined, finally, a behavior analysis result is output, and a face recognition result is synchronously output.
Drawings
Fig. 1 is a schematic flow diagram of a face recognition method according to a specific behavior according to an exemplary embodiment of the present application;
fig. 2 is a schematic flow diagram of a face recognition method according to another exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
References herein to "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Referring to fig. 1, a flow chart corresponding to a face recognition method under a specific behavior according to an exemplary embodiment of the present application is shown.
In one aspect, a method for face recognition under specific behaviors is provided, the method is applicable to an analysis system, and the method comprises the following steps:
step 101, obtaining an output result of the SDK algorithm, wherein the output result comprises a human body position and a human body photo under specific behaviors.
As shown in fig. 1, at the beginning of execution, the overall method first obtains the output result of an algorithm SDK, which is a development tool set developed by some software development engineers for a specific platform, hardware platform, operating system, software framework, etc. to apply to application software development.
Step 102, clipping the human body photo to obtain an initial human face photo.
Step 103, performing face detection on the initial face photo to obtain a face detection result.
And 104, responding to the face detection result to display that the face exists, and performing face quality detection.
Meanwhile, when the face detection result shows that no face exists, the current flow is ended.
In one possible implementation, in response to a face detection result, displaying that a face exists, acquiring a maximum face picture from the face detection result, and performing face quality detection on the maximum face picture.
Optionally, the content of the face quality detection at least includes contrast, brightness, resolution, size and face angle, but is not limited thereto, as shown in fig. 1, and the face quality detection is performed for a plurality of condition screening, firstly, whether the face size meets the requirement of 64×64, and secondly, detecting the face quality and/or the face angle, and then performing the next step of judgment.
For step 104, detection may be performed according to various content of the face quality detection, or step 104 may be completed by a preset comprehensive detection manner, for example, the face quality detection result is an output result of the face detection SDK, the result is a score, the specific manner of face quality detection is that the face quality score output by the face detection SDK is compared with a threshold score preset in advance, and then the preset quality requirement in step 105 is the threshold score of the advance threshold.
And step 105, judging whether the initial face photo is a stored photo or not in response to the face quality detection result meeting the preset quality requirement.
In one example, the preset quality requirements are set according to the parameters to be detected, respectively, and in another example, a threshold score for integrated detection is set, as shown in step 104.
And step 106, in response to the initial face photo being the stored picture, comparing the quality of the initial face photo with that of the stored picture.
And meanwhile, when the initial face photo is not a stored picture, storing the initial face photo.
And step 107, storing the picture with higher quality in the comparison result as the optimal face picture.
In one possible implementation form, the output result further includes a tracking ID, when the quality, angle, and the like of the face meet the requirements, whether the face photo is stored for the tracking ID is judged, if the face photo is not stored, the face photo is stored, if the face photo is stored, the quality of the current face photo is compared with the quality of the stored face photo, if the quality of the current face photo is higher, the stored face photo is replaced by the current face photo.
Optionally, before the output result of the SDK algorithm is obtained, as shown in fig. 2, the following is included.
Responding to the analysis system to start executing tasks, taking out video frames from the video frame queue, and performing frame extraction processing on the video frames, wherein the frame extraction frequency is in a self-defined configuration, for example, 1 second of 6 frames; converting the YUV picture corresponding to the video frame into a corresponding BGR picture; sending the BGR picture into an algorithm SDK for detection and analysis by using the algorithm; and under the SDK analysis of the algorithm, obtaining an output result of the SDK algorithm, and storing the optimal face photo under the video frame. In addition, the algorithm SDK can be used for outputting the human body position of the person and the tracking ID of the person, and storing the optimal face photo in the process.
In the case where the output result further includes the trace ID, the following method is also included.
Judging whether an output result of the algorithm SDK meets an alarm condition again, wherein the alarm condition comprises alarm frequency limitation, alarm detection interval, detection region time threshold and detection region sensitivity; judging whether the ID tracking ID disappears or not, wherein the ID tracking ID is used for indicating the unique tracking ID of the pedestrian; when the ID tracking ID disappears, judging whether a behavior alarm is generated for the ID tracking ID; if the action alarm is generated, judging whether the analysis system stores the face photo or not in the process of the ID tracking ID; if the face photo is stored, comparing the face photo with the face database photo, storing the successfully compared result information and personnel information, and pushing a behavior alarm event to an external system.
The application discloses a face recognition method under specific behaviors, which is characterized in that a method for realizing face recognition under specific behaviors based on a computer vision technology is described, a process for realizing specific behavior analysis based on the computer vision technology is described first, then a face recognition process is added in the process, the two processes are combined, finally, a behavior analysis result is output, and a face recognition result is synchronously output.
The foregoing is illustrative of the present application and is not to be construed as limiting thereof, but rather as various modifications, equivalent arrangements, improvements, etc., which fall within the spirit and principles of the present application.

Claims (9)

1. A method for face recognition under a specific behavior, the method being suitable for an analysis system, the method comprising:
obtaining an output result of the SDK algorithm, wherein the output result comprises a human body position and a human body photo under specific behaviors;
cutting the human body photo to obtain an initial human face photo;
performing face detection on the initial face photo to obtain a face detection result;
responding to the face detection result to display that a face exists, and carrying out face quality detection;
responding to the face quality detection result to meet the preset quality requirement, and judging whether the initial face photo is a stored picture or not;
in response to the initial face photograph being a stored picture, comparing the initial face photograph with the stored picture in quality;
and storing the picture with higher quality in the comparison result as the optimal face picture.
2. The method according to claim 1, wherein the method further comprises:
and responding to the face detection result to display that no face exists, and ending the current flow.
3. The method of claim 1, wherein the detecting the quality of the face in response to the face detection result indicating the presence of the face comprises:
responding to the face detection result to display that a face exists, and acquiring a maximum face picture from the face detection result;
and detecting the face quality of the maximum face picture.
4. A method according to claim 1 or 3, wherein the content of the face quality detection comprises at least contrast, brightness, resolution and face angle.
5. The method according to claim 1, wherein the method further comprises:
and storing the initial face photo in response to the initial face photo not being the stored picture.
6. The method according to any one of claims 1 to 5, further comprising, before the obtaining the output result of the SDK algorithm:
responding to the analysis system to start executing tasks, taking out video frames from a video frame queue, and performing frame extraction processing on the video frames;
converting the YUV picture corresponding to the video frame into a corresponding BGR picture;
sending the BGR picture into an algorithm SDK detection;
and under the SDK analysis of the algorithm, obtaining an output result of the SDK algorithm, and storing the optimal face photo under the video frame.
7. The method of claim 6, wherein the output result further comprises a tracking ID, the method further comprising:
judging whether an alarm condition is met or not again according to an output result of the algorithm SDK, wherein the alarm condition comprises alarm frequency limitation, alarm detection interval, detection region time threshold and detection region sensitivity;
judging whether the ID tracking ID disappears or not, wherein the ID tracking ID is used for indicating the unique tracking ID of the pedestrian;
when the ID tracking ID disappears, judging whether a behavior alarm is generated for the ID tracking ID;
if the action alarm is generated, judging whether the analysis system stores the face photo or not in the process of the ID tracking ID;
if the face photo is stored, comparing the face photo with the face database photo, storing the successfully compared result information and personnel information, and pushing a behavior alarm event to an external system.
8. The method of claim 6, wherein the frame rate is custom configured.
9. A face recognition device for a specific behavior, the device being adapted for use in an analysis system, the device comprising:
the result acquisition module is used for acquiring an output result of the SDK algorithm, wherein the output result comprises a human body position and a human body photo under specific behaviors;
the photo cutting module is used for cutting the human body photo to obtain an initial human face photo;
the face detection module is used for carrying out face detection on the initial face photo to obtain a face detection result;
the quality detection module is used for responding to the face detection result to display that a face exists and detecting the quality of the face;
the picture detection module is used for responding to the face quality detection result to meet the preset quality requirement and judging whether the initial face picture is a stored picture or not;
the quality comparison module is used for responding to the initial face photo as a stored picture and comparing the quality of the initial face photo with the stored picture;
and the picture storage module is used for storing pictures with higher quality in the comparison result as the optimal face pictures.
CN202311063795.6A 2023-08-22 2023-08-22 Face recognition method and device under specific behaviors Pending CN117115887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311063795.6A CN117115887A (en) 2023-08-22 2023-08-22 Face recognition method and device under specific behaviors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311063795.6A CN117115887A (en) 2023-08-22 2023-08-22 Face recognition method and device under specific behaviors

Publications (1)

Publication Number Publication Date
CN117115887A true CN117115887A (en) 2023-11-24

Family

ID=88804980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311063795.6A Pending CN117115887A (en) 2023-08-22 2023-08-22 Face recognition method and device under specific behaviors

Country Status (1)

Country Link
CN (1) CN117115887A (en)

Similar Documents

Publication Publication Date Title
KR20220125716A (en) Event detection methods, devices, electronic devices, storage media and program products
US7224834B2 (en) Computer system for relieving fatigue
US11176944B2 (en) Transcription summary presentation
WO2017133589A1 (en) Safety monitoring method and device for terminal user
CN111563396A (en) Method and device for online identifying abnormal behavior, electronic equipment and readable storage medium
CN112381002B (en) Human body risk posture recognition method and system
WO2018233637A1 (en) Video processing method and apparatus, electronic device, and storage medium
CN110992502A (en) Face recognition attendance checking method and system and readable storage medium
CN110855934A (en) Fatigue driving identification method, device and system, vehicle-mounted terminal and server
US20140355828A1 (en) Setting apparatus, setting method, and storage medium
KR101350882B1 (en) Server for analysing video
CN113963162A (en) Helmet wearing identification method and device, computer equipment and storage medium
CN113552989A (en) Screen recording method and device and electronic equipment
CN112419639A (en) Video information acquisition method and device
CN117115887A (en) Face recognition method and device under specific behaviors
JP2007114885A (en) Classification method and device by similarity of image
CN111325058B (en) Driving behavior detection method, device, system and storage medium
US20140003670A1 (en) Vehicle surroundings monitoring device
KR20130094488A (en) System and method for monitoring emergency motion based image
CN112580543B (en) Behavior recognition method, system and device
CN112307920B (en) High-risk worker behavior early warning device and method
CN114387557A (en) Deep learning-based method and system for detecting smoking and calling of gas station
CN113486802A (en) Method and device for providing eye protection mode, storage medium and mobile device
CN112818838A (en) Expression recognition method and device and electronic equipment
CN112419638B (en) Method and device for acquiring alarm video

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination