Face recognition method, device, electronic device and storage medium

By extracting and identifying face images in video surveillance, determining target categories and performing corresponding operations, the problems of low search efficiency and high labor cost in the prior art are solved, and efficient and accurate target personnel identification and tracking are achieved.

CN112418063BActive Publication Date: 2025-02-14BEIJING SOFTONG INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011303690.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-19
Publication Date
2025-02-14
Estimated Expiration
2040-11-19

AI Technical Summary

Technical Problem

The prior art is inefficient and labor-intensive when finding target personnel in video surveillance, and is prone to errors.

Method used

By extracting the to-processed face image from the key video frame in the target video and recognizing it with the to-compare face image under at least two categories pre-stored in the image library, it is determined to belong to the to-processed face image. Target category, and then perform the corresponding operation.

Benefits of technology

It realizes automatic identification of target users and performs corresponding operations, improves search efficiency and accuracy, and saves a lot of labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112418063B_ABST
    Figure CN112418063B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a face recognition method, device, electronic device and storage medium, the method comprising: obtaining key video frames in a target video, and extracting at least one face image to be processed in the key video frames; for each face image to be processed, performing recognition processing on the current face image to be processed and face images to be compared in at least two categories pre-stored in an image library, and determining the target category to which the current face image to be processed belongs; based on the target category to which each face image to be processed belongs, performing operations corresponding to the target category. The technical solution of the embodiment of the present invention solves the technical problems that manual review of videos is prone to errors, inefficient and consumes a lot of manpower, realizes automatic identification of target users and execution of corresponding operations, thereby improving search efficiency and accuracy, and saving a lot of manpower.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of biometric recognition technology, and in particular to a face recognition method, device, electronic device and storage medium. Background Art

[0002] Currently, theft cases and / or missing elderly people that occur in the community rely on existing technologies to track the trajectory of the target person, usually by manually checking video surveillance to view the content captured by the camera to find the target person.

[0003] However, manually reviewing video surveillance requires a lot of time to review surveillance video materials, and there are technical problems such as low tracking efficiency and high labor costs. Summary of the invention

[0004] The present invention provides a face recognition method, device, electronic equipment and storage medium to achieve the technical effect of improving search efficiency and accuracy and reducing labor costs.

[0005] In a first aspect, an embodiment of the present invention provides a face recognition method, comprising:

[0006] Acquire a key video frame in a target video, and extract at least one face image to be processed in the key video frame;

[0007] For each face image to be processed, performing recognition processing on the face image to be processed and face images to be compared under at least two categories pre-stored in the image library to determine the target category to which the face image to be processed belongs;

[0008] Based on the target category to which each to-be-processed face image belongs, an operation corresponding to the target category is performed; the operation corresponding to the target category includes an operation of recording a motion trajectory and / or an operation of sending an alarm message.

[0009] In a second aspect, an embodiment of the present invention further provides a face recognition device, comprising:

[0010] A face image extraction module, used to obtain a key video frame in a target video and extract at least one face image to be processed in the key video frame;

[0011] A target category determination module is used to identify and process the current face image to be processed with face images to be compared under at least two categories pre-stored in the image library for each face image to be processed, and determine the target category to which the current face image to be processed belongs;

[0012] The operation execution module is used to execute the operation corresponding to the target category based on the target category to which each face image to be processed belongs; the operation corresponding to the target category includes recording the motion trajectory operation and / or sending the alarm information operation.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the face recognition method as described in any one of the embodiments of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute a face recognition method as described in any one of the embodiments of the present invention.

[0018] The technical solution of the embodiment of the present invention extracts the face image to be processed from the key video frame in the target video, and identifies and processes the face image to be processed with the face images to be compared in at least two categories pre-stored in the image library to determine the target category to which the face image to be processed belongs, and then executes the operation corresponding to the target category. This solves the technical problems of easy errors, low efficiency and large manpower consumption when manually reviewing videos, realizes automatic identification of target users and execution of corresponding operations, thereby improving search efficiency and accuracy, and saving a lot of manpower. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A schematic diagram of a face recognition method flow chart provided in Embodiment 1 of the present invention;

[0021] Figure 2 A schematic diagram of the structure of a face recognition device provided in Embodiment 2 of the present invention;

[0022] Figure 3 A schematic diagram of the structure of a face recognition system provided by Embodiment 2 of the present invention;

[0023] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0025] Embodiment 1

[0026] Figure 1 This is a flow chart of a face recognition method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where corresponding operations are performed based on face recognition results. The method can be performed by a face recognition device, which can be implemented in the form of software and / or hardware.

[0027] In order to more clearly introduce the technical solution of this embodiment, the application scenario is briefly introduced first. At present, when special groups such as children and the elderly are lost, the appearance time and location of the lost person can be determined by manually checking the community surveillance video. In addition, by checking the community surveillance video, it is possible to find out whether there are criminals wanted by the relevant departments in the video. Therefore, the face recognition method of this embodiment can be applied to video surveillance software, for example, in the form of a plug-in. When the user triggers the face recognition plug-in, the movement trajectory of the target person can be generated, and information related to the target person can be provided.

[0028] like Figure 1 The method of this embodiment specifically includes the following steps:

[0029] S110: Acquire key video frames in the target video, and extract at least one to-be-processed face image in the key video frames.

[0030] The target video is a video shot by a camera. The video may be a video that needs to be used for subsequent personnel search and finding, and is composed of multiple video frames. The key video frame may be a video frame containing a face image in the target video, or a video frame containing different face images. The face image to be processed is a face image extracted from the key video frame, which can be used for subsequent face recognition. Since a key video frame may contain multiple people, each key video frame may contain one or more face images to be processed.

[0031] Specifically, a video frame containing a face image can be determined as a key video frame in the target video. According to the face image acquisition technology, at least one face image in the key video frame can be extracted and used as a face image to be processed for subsequent recognition and other operations.

[0032] The face images contained in the target video may be continuous. If the person in a certain video is in a nearly static state, then after determining that each video frame in this video is a key video frame, it is necessary to extract the face images separately for subsequent recognition. However, the face image information in these key video frames is the same, so there is redundancy in the information in the key video frames. In order to reduce redundant information and reduce the amount of calculation for face image extraction, the difference between the current video frame and the previous key video frame can be determined to determine whether to determine the current video frame as a key video frame.

[0033] Optionally, the method for determining the key video frame may be to obtain each video frame in the target video; for each video frame, when it is detected that the video frame similarity value between the current video frame and the previous key video frame is lower than a preset video frame similarity threshold, the current video frame is used as the key video frame.

[0034] Among them, the similarity value can be determined by a similarity detection method, such as cosine similarity, Pearson correlation coefficient and other methods. The preset video frame similarity threshold is a pre-set threshold used to determine whether the current video frame can be determined as a key video frame. The larger the threshold, the fewer key video frames are determined, but the accuracy will be reduced. The smaller the threshold, the more key video frames are determined and the higher the accuracy, but the possibility of redundant information increases and the amount of calculation increases.

[0035] Specifically, each video frame in the target video is obtained, and the first video frame containing a face image is used as the first key video frame, and the subsequent video frames containing faces are used as the video frames to be determined. Each video frame to be determined is tested for similarity with the previous key video frame of the video frame to be determined. If the similarity is greater than a preset video frame similarity threshold, the video frame to be determined is used as the key video frame; if the similarity is less than the preset video frame similarity threshold, the next video frame to be determined is tested until all the video frames to be determined are tested.

[0036] Exemplarily, the video frames to be determined after the key video frame A are B and C respectively, the preset video frame similarity threshold is x, the similarity between the key video frame A and the video frame to be determined B is y, if y≥x, the video frame to be determined B is determined as the next key video frame, and the video frame to be determined C is detected for similarity with the key video frame B; if y<x, the video frame to be determined C is detected for similarity with the key video frame A.

[0037] S120: for each facial image to be processed, perform recognition processing on the current facial image to be processed and facial images to be compared in at least two categories pre-stored in the image library to determine the target category to which the current facial image to be processed belongs.

[0038] The image library is a pre-established face database for face image recognition, and the image library includes at least two categories of face images. The target category is the category to which the face image to be processed belongs.

[0039] Specifically, each face image to be processed is identified and matched with the face images in each category stored in the image library. The specific face image recognition method may be a face feature point recognition algorithm, a neural network recognition algorithm, etc. Furthermore, a threshold may be set. When the similarity exceeds the threshold, it is determined that the match is successful, and the category is used as the target category of the face image to be processed.

[0040] It should be noted that since the same face image may exist in different categories of face images, for example, face image A belongs to both category B and category C, each face image to be processed may belong to multiple target categories. If the face image to be processed does not exist in the face images of all categories in the image library, then the face image to be processed does not belong to the target category.

[0041] Optionally, the at least two categories pre-stored in the image library include an alarm category and a track recording category.

[0042] Among them, the alarm category in the image library includes facial images of lawbreakers and criminals uploaded by relevant departments, and the record trajectory category in the image library may include facial images registered by community residents.

[0043] In order to determine the target category to which the face image to be processed belongs, the following steps can be used:

[0044] Step 1: Obtain the current face image to be processed, and compare the current face image to be processed with the face images to be compared stored under the alarm category and the face images to be compared stored under the record trajectory category to obtain the image similarity value between the current face image to be processed and each face image to be compared.

[0045] Specifically, the current face image to be processed is obtained, and the current face image to be processed is compared with the face images to be compared stored in the alarm category and the face images to be compared stored in the track record category. The image similarity values ​​between the face image to be processed and each face image to be compared can be determined in a one-to-one comparison or a one-to-many comparison.

[0046] Step 2: When it is detected that there is a target image similarity value higher than a preset image similarity threshold, a target image to be compared corresponding to the target image similarity value is determined, and the target category to which the target image to be compared belongs is determined.

[0047] The preset image similarity threshold is a threshold used to compare two face images. If the similarity exceeds the threshold, it can be determined that the two face images are of the same person. Otherwise, the two people and two images are of two different people.

[0048] Specifically, when it is detected that the image similarity value between the face image to be processed and the face image to be compared is higher than the target image similarity value of the preset image similarity threshold, the similarity value is used as the target image similarity value, and it can be determined that the face image to be processed and the face image to be compared are the same person as the corresponding person. Therefore, the face image to be compared corresponding to the target image similarity value can be used as the target image to be compared, and the category to which the target image to be compared belongs is determined as the target category to which the face image to be processed belongs.

[0049] S130: Based on the target category to which each face image to be processed belongs, perform an operation corresponding to the target category.

[0050] The operations corresponding to the target categories include operations of recording motion tracks and / or sending alarm information.

[0051] Optionally, if the target category is an alarm category, you can perform the following operations:

[0052] The current position corresponding to the face image to be processed is recorded in the pre-registered associated information corresponding to the face image to be processed.

[0053] The associated information includes the identity identifier and motion trajectory information corresponding to the face image to be processed. The identity identifier may be a resident ID number, and the motion trajectory information may be trajectory information obtained by connecting the face images to be processed collected from each target video shot by different cameras according to time information and location information.

[0054] Specifically, the camera shooting position information corresponding to the target video to which the facial image to be processed belongs can be recorded as the current position in the pre-registered associated information corresponding to the facial image to be processed, so as to facilitate trajectory tracking and monitoring of the person corresponding to the facial image to be processed.

[0055] Based on the face image to be processed, the target image to be compared corresponding to the face image to be processed and the associated information, an alarm message is generated and sent to the target terminal device, and the motion trajectory information in the associated information is updated in the target terminal device.

[0056] The alarm information is used to indicate the presence of criminals, and may include the identity identifier corresponding to the face image to be processed and the movement trajectory information, etc. The target terminal device may be a mobile terminal of a community security personnel, or a fixed terminal in a community security department, etc.

[0057] Specifically, when the target category to which the facial image to be processed belongs is an alarm category, an alarm message corresponding to the facial image is generated and sent to the target terminal device to prompt the community security personnel to alarm and track. In addition, the associated information corresponding to the facial image to be processed can be sent to the target terminal device, and the motion trajectory information in the associated information can be updated to facilitate tracking of the motion trajectory of the offender. If the alarm message is generated based on the facial information of the offender and the motion trajectory is reported, when the facial information of the offender appears within the shooting range of the next camera in the community, the corresponding alarm message can be generated and the motion trajectory information can be continuously updated to facilitate the security personnel or relevant personnel to continuously track the offender.

[0058] Optionally, if the target category is a track recording category, you can perform the following operations:

[0059] The current position corresponding to the face image to be processed is recorded in the pre-registered associated information corresponding to the face image to be processed.

[0060] The recorded trajectory category may be the category to which the facial images of the missing persons collected and uploaded by the community belong. The associated information includes the name, identity identifier, movement trajectory formed based on each current position, and emergency contact information corresponding to the facial image to be processed.

[0061] Specifically, the trajectory information obtained by connecting the facial images to be processed collected from various target videos shot by different cameras according to time information and position information can be used as the motion trajectory information corresponding to the facial images to be processed. The current position record corresponding to the facial images to be processed can be recorded in the motion trajectory information of the associated information to update the motion trajectory information, so as to facilitate the tracking of the lost person.

[0062] When establishing an image library, facial images and corresponding associated information under at least two categories should be established in the image library. The specific steps include:

[0063] Collect the facial images of each user, and record the associated information corresponding to each facial image, use the facial image as the facial image to be compared, and store the facial image to be compared and the corresponding associated information in the record track category in the image library.

[0064] The associated information includes name, identity identification and emergency contact information.

[0065] Specifically, the information of all residents in the community can be registered in advance, and the registration content includes the collected facial images of each user, and records the associated information corresponding to each facial image, and the associated information can be name, resident ID number, emergency contact person and emergency contact information, etc. Then, the facial images of all residents in the community are used as facial images to be compared, and the facial images to be compared and the corresponding associated information are stored in the record track category in the image library, so that when a resident is lost, the missing person can be identified and the associated information can be retrieved.

[0066] Acquire the pre-retrieved face image, and store the face image as the face to be compared under the alarm category in the image library.

[0067] Specifically, the face image retrieved in advance can be a face image of a criminal uploaded by a relevant department. The face image is stored in the alarm category in the image library so that an alarm message can be generated when a criminal face image is identified.

[0068] Based on the above embodiment, a specific method for triggering face recognition may be to retrieve the motion trajectory corresponding to the target user according to the face image and / or identity identification of the target user when receiving the motion trajectory information of the target user.

[0069] Among them, the target users are users whose movement trajectories need to be investigated, and they can be lost persons or criminals, etc.

[0070] Specifically, when it is necessary to retrieve the movement trajectory information of a lost person or a person who has committed a crime, the face image and / or ID number of the person may be input to determine the target user, and the face image collected during registration may be retrieved from the image library under the category of recorded trajectory according to the face image of the target user, or according to the ID number, and the movement trajectory information corresponding to the target user may be further retrieved. In order to more clearly reflect the movement trajectory of the target user, the movement trajectory information may be displayed on a map.

[0071] The technical solution of this embodiment, by extracting the face image to be processed from the key video frame in the target video, and identifying and processing the face image to be processed with the face images to be compared in at least two categories pre-stored in the image library, so as to determine the target category to which the face image to be processed belongs, and then executing the operation corresponding to the target category, solves the technical problems of easy errors, low efficiency and large manpower consumption when manually reviewing videos, realizes automatic identification of target users and execution of corresponding operations, thereby improving search efficiency and accuracy, and saving a lot of manpower.

[0072] Embodiment 2

[0073] Figure 2 This is a structural diagram of a face recognition device provided in Embodiment 2 of the present invention. The device includes: a face image extraction module 210, a target category determination module 220 and an operation execution module 230.

[0074] Among them, the face image extraction module 210 is used to obtain the key video frames in the target video and extract at least one face image to be processed in the key video frames; the target category determination module 220 is used to identify and process the current face image to be processed and the face images to be compared in at least two categories pre-stored in the image library for each face image to be processed, and determine the target category to which the current face image to be processed belongs; the operation execution module 230 is used to execute the operation corresponding to the target category based on the target category to which each face image to be processed belongs; the operation corresponding to the target category includes the operation of recording motion trajectory and / or the operation of sending alarm information.

[0075] Optionally, the face image extraction module 210 is also used to obtain each video frame in the target video; for each video frame, when it is detected that the video frame similarity value between the current video frame and the previous key video frame is lower than a preset video frame similarity threshold, the current video frame is used as the key video frame.

[0076] Optionally, at least two categories include an alarm category and a recording trajectory category. The target category determination module 220 is also used to obtain the current facial image to be processed, and compare the current facial image to be processed with the facial images to be compared stored under the alarm category and the facial images to be compared under the recording trajectory category, so as to obtain the image similarity value between the current facial image to be processed and each facial image to be compared; when a target image similarity value higher than a preset image similarity threshold is detected, a target image to be compared corresponding to the target image similarity value is determined, and the target category to which the target image to be compared belongs is determined.

[0077] Optionally, the target category includes an alarm category, and the operation execution module 230 is also used to record the current position corresponding to the facial image to be processed into the pre-registered associated information corresponding to the facial image to be processed if the target category corresponding to the facial image to be processed is the alarm category; the associated information includes the identity identifier and motion trajectory information corresponding to the facial image to be processed; based on the facial image to be processed, the target image to be compared corresponding to the facial image to be processed and the associated information, generate alarm information and send it to the target terminal device, and update the motion trajectory information in the associated information in the target terminal device.

[0078] Optionally, the target category includes a recording trajectory category, and the operation execution module 230 is also used to record the current position corresponding to the facial image to be processed into the pre-registered associated information corresponding to the facial image to be processed if the target category corresponding to the facial image to be processed is the recording trajectory category; the associated information includes the name, identity identifier, motion trajectory formed based on each current position and emergency contact information corresponding to the facial image to be processed.

[0079] Optionally, the device further comprises:

[0080] The association information establishment module is used to establish face images of at least two categories in the image library and corresponding association information.

[0081] The associated information establishment module is also used to collect facial images of each user and record the associated information corresponding to each facial image, use the facial image as the facial image to be compared, and store the facial image to be compared and the corresponding associated information in the record track category in the image library; the associated information includes name, identity identification and emergency contact information; obtain the pre-retrieved facial image, and store the facial image as the face to be compared in the alarm category in the image library.

[0082] Optionally, the device further comprises:

[0083] The motion trajectory retrieval module is used to retrieve the motion trajectory corresponding to the target user according to the face image and / or identity identifier of the target user when the motion trajectory information of the target user is received.

[0084] Figure 3 This is a structural schematic diagram of a face recognition system provided in Embodiment 2 of the present invention, the system comprising: a visual learning engine system and a community personnel trajectory monitoring system.

[0085] Among them, the visual learning engine system is used for photo monitoring, video monitoring warning and trajectory analysis of target users. The historical thief management in the community personnel trajectory monitoring system is used to manage historical thieves, archive historical thief records, query historical thief information and search for photo face recognition; community resident information management is used for resident information registration, photo face recognition search and elderly information query; intelligent analysis is used to perform face recognition based on cameras in the community and monitor the elderly and historical thieves; community trajectory monitoring events may include: early warning event trajectory query, used to query the trajectory of the elderly and historical thieves; early warning event settlement, used to perform information related processing after the trajectory query of the elderly and historical thieves; task scheduling information, used for real-time trajectory update, etc.; early warning information statistics, used to count and store the records of trajectory query of the elderly and historical thieves.

[0086] The face recognition system can register the information of all residents in the community, including photos, names, ID numbers, mobile phone numbers, etc. Then, through face recognition and comparing the latest photos with the photos in the historical registration information, the historical registration information of the residents can be determined, and the registration files of the same resident can be classified and integrated. For key focus objects such as the elderly with a history of Alzheimer's disease, special attention will be paid and photo monitoring will be carried out. It is also possible to register the information of thieves caught by the relevant departments, including photos, names, ID numbers, mobile phone numbers, etc. Then, through face recognition and comparing the latest photos with the photos in the historical registration information, the historical registration information of the thief can be determined, and the registration files of the same offender can be classified and integrated, and the historical registration information of the offender can be displayed, which is conducive to the relevant departments to identify stubborn elements who repeatedly violate the law.

[0087] In addition, the face recognition system can collect images and capture facial image information through all cameras in the community, including cameras at the entrance and exit of the community, smart access control, cameras in the garage, etc. In the case of theft, the face can be captured by the camera, and the face information in the face database of the historical thief information can be compared to verify the identity, and the whereabouts and time can be recorded to provide detailed evidence and clues to solve the case for relevant staff. In the case of the elderly going missing, the face can be captured by the camera, and the face information in the face database of the community resident information can be compared to verify the identity, and the whereabouts and time can be recorded to provide the whereabouts of the missing person to their family and relevant staff.

[0088] The technical solution of this embodiment, by extracting the face image to be processed from the key video frame in the target video, and identifying and processing the face image to be processed with the face images to be compared in at least two categories pre-stored in the image library, so as to determine the target category to which the face image to be processed belongs, and then executing the operation corresponding to the target category, solves the technical problems of easy errors, low efficiency and large manpower consumption when manually reviewing videos, realizes automatic identification of target users and execution of corresponding operations, thereby improving search efficiency and accuracy and saving a lot of manpower.

[0089] The face recognition device provided in the embodiment of the present invention can execute the face recognition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0090] It is worth noting that the various units and modules included in the above-mentioned face recognition device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0091] Embodiment 3

[0092] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Figure 4 A block diagram of an exemplary electronic device 40 suitable for implementing exemplary embodiments of the present invention is shown. Figure 4 The electronic device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0093] like Figure 4 As shown, the electronic device 40 is in the form of a general computing device. The components of the electronic device 40 may include but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 connecting different system components (including the system memory 402 and the processing unit 401).

[0094] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0095] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.

[0096] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0097] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.

[0098] The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboards, pointing devices, displays 410, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 40, and / or may communicate with any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 411. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 412. As shown, the network adapter 412 communicates with other modules of the electronic device 40 via the bus 403. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0099] The processing unit 401 executes various functional applications and data processing by running the programs stored in the system memory 402, such as implementing the face recognition method provided in the embodiment of the present invention.

[0100] Embodiment 4

[0101] Embodiment 4 of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to perform a face recognition method when executed by a computer processor, the method comprising:

[0102] Acquire key video frames in the target video, and extract at least one face image to be processed in the key video frames;

[0103] For each face image to be processed, the current face image to be processed is identified with face images to be compared in at least two categories pre-stored in the image library to determine the target category to which the current face image to be processed belongs;

[0104] Based on the target category to which each face image to be processed belongs, an operation corresponding to the target category is performed; the operation corresponding to the target category includes an operation of recording a motion trajectory and / or an operation of sending an alarm message.

[0105] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0106] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0107] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0108] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0109] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A face recognition method, characterized in that: include: Acquire key video frames in a target video, and extract at least one face image to be processed in the key video frames; wherein the target video is a video for person search and finding; For each face image to be processed, performing recognition processing on the face image to be processed and face images to be compared under at least two categories pre-stored in the image library to determine the target category to which the face image to be processed belongs; Based on the target category to which each face image to be processed belongs, an operation corresponding to the target category is performed; the operation corresponding to the target category includes an operation of recording a motion trajectory and an operation of sending an alarm message; wherein the alarm message is information used to prompt the existence of a person who violates a law or crime, including an identity identifier and motion trajectory information corresponding to the face image to be processed; the motion trajectory information is trajectory information obtained by connecting the face images to be processed collected from each target video shot by different cameras according to time information and position information; When receiving the motion track information of the target user to be searched, according to the face image and / or identity identification of the target user, the motion track corresponding to the target user is retrieved, including: inputting the face image and / or resident ID number of the target user to determine the target user, according to the face image of the target user, or according to the resident ID number, retrieving the face image collected during registration from the image library under the record track category, retrieving the motion track information corresponding to the target user, and displaying the motion track information on the map; wherein the target user is the user who needs to conduct a motion track survey; The step of performing an operation corresponding to a target category based on the target category to which each face image to be processed belongs includes: If the target category corresponding to the facial image to be processed is an alarm category, the current position corresponding to the facial image to be processed is recorded in the pre-registered associated information corresponding to the facial image to be processed; based on the facial image to be processed, the target image to be compared corresponding to the facial image to be processed and the associated information, an alarm message is generated and sent to the target terminal device, and the motion trajectory information in the associated information is updated in the target terminal device; the associated information includes an identity identifier and motion trajectory information corresponding to the facial image to be processed.

2. The method according to claim 1, characterized in that The step of obtaining a key video frame in a target video includes: Get each video frame in the target video; For each video frame, when it is detected that the video frame similarity value between the current video frame and the previous key video frame is lower than a preset video frame similarity threshold, the current video frame is used as the key video frame.

3. The method according to claim 1, characterized in that The at least two categories include an alarm category and a recording trajectory category. For each face image to be processed, the current face image to be processed is identified with face images to be compared under at least two categories pre-stored in an image library to determine the target category to which the current face image to be processed belongs, including: Acquire the current face image to be processed, and compare the current face image to be processed with the face images to be compared stored under the alarm category and the face images to be compared stored under the record trajectory category, to obtain image similarity values ​​between the current face image to be processed and each face image to be compared; When it is detected that there is a target image similarity value higher than a preset image similarity threshold, a target image to be compared corresponding to the target image similarity value is determined, and a target category to which the target image to be compared belongs is determined.

4. The method according to claim 1, characterized in that: The target category includes a track record category, and the operation corresponding to the target category is performed based on the target category to which each face image to be processed belongs, and further includes: If the target category corresponding to the facial image to be processed is a trajectory recording category, the current position corresponding to the facial image to be processed is recorded in the pre-registered associated information corresponding to the facial image to be processed; the associated information includes the name, identity identifier, motion trajectory formed based on each current position and emergency contact information corresponding to the facial image to be processed.

5. The method according to claim 1, characterized in that: Also includes: Establishing at least two categories of face images and corresponding association information in the image library; The step of establishing at least two categories of facial images and corresponding associated information in the image library includes: Collecting facial images of each user, and recording associated information corresponding to each facial image, using the facial image as a facial image to be compared, and storing the facial image to be compared and the corresponding associated information in a record track category in the image library; the associated information includes name, identity identifier, and emergency contact information; A pre-retrieved face image is obtained, and the face image is stored as a face to be compared under an alarm category in the image library.

6. A face recognition device, characterized in that: include: A face image extraction module, used to obtain a key video frame in a target video and extract at least one face image to be processed in the key video frame; wherein the target video is a video for person search and finding; A target category determination module is used to identify and process the current face image to be processed with face images to be compared under at least two categories pre-stored in the image library for each face image to be processed, and determine the target category to which the current face image to be processed belongs; An operation execution module, for executing operations corresponding to the target categories to which each to-be-processed facial image belongs; the operations corresponding to the target categories include operations for recording motion trajectories and sending alarm information; wherein the alarm information is information used to indicate the existence of criminals, including an identity identifier and motion trajectory information corresponding to the to-be-processed facial image; the motion trajectory information is trajectory information obtained by connecting the to-be-processed facial images collected from various target videos shot by different cameras according to time information and position information; A motion trajectory retrieval module is used to retrieve the motion trajectory corresponding to the target user according to the face image and / or identity identifier of the target user when the motion trajectory information of the target user is received; wherein the target user is the user for whom the motion trajectory investigation is required; The motion track retrieval module is specifically used to input the face image and / or resident ID number of the target user to determine the target user, retrieve the face image collected during registration from the image library under the record track category according to the face image of the target user or the resident ID number, retrieve the motion track information corresponding to the target user, and display the motion track information on the map; The operation execution module is specifically used to record the current position corresponding to the facial image to be processed into the pre-registered associated information corresponding to the facial image to be processed if the target category corresponding to the facial image to be processed is an alarm category; based on the facial image to be processed, the target image to be compared corresponding to the facial image to be processed and the associated information, generate alarm information and send it to the target terminal device, and update the motion trajectory information in the associated information in the target terminal device; the associated information includes the identity identifier and motion trajectory information corresponding to the facial image to be processed.

7. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the face recognition method as described in any one of claims 1-5.

8. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the face recognition method as described in any one of claims 1 to 5 when executed by a computer processor.

Citation Information

Patent Citations

  • Information processing method, device and system based on image analysis, and storage medium

    CN108345854A

  • Information pushing method and device

    CN108446390A

  • Face recognition access control management system suitable for smart community

    CN109410401A