A face recognition method, device, equipment and storage medium
Patent Information
- Application Number
- CN202310707430.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-06-14
AI Technical Summary
但目前识别算法开始出现瓶颈,算法的开发需要大量的时间与资金成本,并且硬件的算力未得到提升,使得人体距离设备较远时面部识别准确率会下降
[0047]本申请提供的一种面部识别方法、装置、设备及存储介质,基于目标识别对象的入画位置从预先存储的移动轨迹集合中确定目标识别对象面部识别点的移动轨迹,可以预测出目标识别对象的面部在环境画面中的大致位置即面部识别区域,从而可以直接从面部区域中进行头部定位和面部识别,无需对整个环境画面进行处理,能够对目标识别对象面部进行快速定位,并且基于面部识别点的移动轨迹确定画面中的面部图像,在目标识别对象从远处向摄像头移动的过程中即可进行面部识别,无需等待其停止运动后再识别,能够进一步部识别速度并实现远距离识别。
Smart Images

Figure CN116824667B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a facial recognition method, apparatus, device, and storage medium. Background Technology
[0002] With the development of smart homes, smart door locks have ushered in a new recognition technology—3D structured light facial recognition technology. This technology is maturing and will become the mainstream technology for future smart door locks. Through superior camera control and recognition optimization methods, improved recognition performance can be achieved at a relatively low R&D cost.
[0003] Currently, 3D structured light recognition technology adds the depth parameter to 2D recognition technology, which undoubtedly places a huge demand on sensors, algorithms, and hardware computing power. However, the recognition algorithm is beginning to encounter bottlenecks. The development of the algorithm requires a lot of time and money, and the computing power of the hardware has not been improved, causing the accuracy of facial recognition to decrease when the human body is far away from the device. Summary of the Invention
[0004] This application provides a facial recognition method, apparatus, device, and storage medium, which can improve facial recognition speed and achieve long-distance recognition. The technical solution is as follows:
[0005] On one hand, embodiments of this application provide a facial recognition method, the method comprising:
[0006] In response to the detection of a target object, the camera begins to capture images of the surrounding environment.
[0007] Based on the entry position of the target object in the environmental image, the current movement trajectory is determined from the movement trajectory set, wherein the movement trajectory refers to the trajectory of the position change of the facial recognition point in the environmental image;
[0008] Based on the current movement trajectory, the facial recognition region of the environmental image is determined, and head localization is performed in the facial recognition region to obtain the facial image to be recognized;
[0009] Feature recognition is performed on the facial image to be identified to obtain the facial recognition result.
[0010] Optionally, before starting to capture environmental images via the camera in response to detecting a target object, the method includes:
[0011] The head localization algorithm is used to locate the head in the continuous environmental images of the historical face recognition process, so as to obtain the movement trajectory data of the face recognition point and the face coverage area data in each historical face recognition process.
[0012] The system sends the movement trajectory data and the facial coverage area data to the backend server. The backend server is used to input the movement trajectory data into a first learning algorithm to obtain the movement trajectory set, and to input the facial coverage area data into a second learning algorithm to obtain the starting point area set.
[0013] Receive and store the set of movement trajectories and the set of starting point regions sent by the backend server.
[0014] Optionally, before determining the current movement trajectory from the set of movement trajectories based on the entry position of the target object in the environmental scene, the method further includes:
[0015] The area to be captured in the environment is determined based on the set of starting point areas.
[0016] The head is located in the frame area using a head localization algorithm to determine the position of the head entering the frame.
[0017] Optionally, determining the facial recognition region of the environmental image based on the current movement trajectory, and performing head localization within the facial recognition region to obtain the facial image to be recognized, includes:
[0018] The facial recognition region of the environment is determined based on the current movement trajectory, and head localization is performed based on the facial recognition region;
[0019] In response to the presence of a head in the facial recognition area, the image of the face to be recognized is obtained based on the head localization result;
[0020] In response to the fact that the face recognition region does not contain a head, the head is located from other regions of the environmental image, and the face image to be recognized is obtained based on the head location result.
[0021] The method further includes:
[0022] In response to the fact that the face recognition area does not contain a head, the actual movement trajectory is recorded based on the environmental image and sent to the backend server. The backend server is used to update the movement trajectory set based on the actual movement trajectory.
[0023] Optionally, before performing feature recognition on the facial image to be recognized to obtain the facial recognition result, the method further includes:
[0024] For each movement trajectory in the set of movement trajectories, a motion comparison image is synthesized by combining the information collection images of the registered object. The motion comparison image is a facial image of the registered object when it moves relative to the camera.
[0025] The step of performing feature recognition on the facial image to be recognized to obtain the facial recognition result includes:
[0026] The facial features of the image to be identified and the motion comparison image corresponding to the current movement trajectory are compared to obtain the facial recognition result.
[0027] Optionally, the camera is connected to a camera motion structure;
[0028] After determining the current movement trajectory from the set of movement trajectories based on the entry position of the target object in the environmental image, the method further includes:
[0029] The initial orientation of the target object relative to the camera is determined based on the position where it enters the frame;
[0030] The camera's shooting angle is adjusted to the initial position using the camera motion structure.
[0031] The camera motion structure controls the camera to move along the direction indicated by the current movement trajectory to capture the environmental images.
[0032] Optionally, the method further includes:
[0033] The infrared emitting device is controlled to focus along the direction of movement indicated by the current movement trajectory, and the infrared density emitted by the infrared emitting device in the focusing direction is higher than the infrared density in other directions.
[0034] On the other hand, embodiments of this application provide a facial recognition device, the device comprising:
[0035] The acquisition module is used to start acquiring environmental images through the camera in response to the detection of a target object;
[0036] The determination module is used to determine the current movement trajectory from the movement trajectory set based on the entry position of the target recognition object in the environmental image, wherein the movement trajectory refers to the trajectory of the position change of the facial recognition point in the environmental image;
[0037] The acquisition module is used to determine the facial recognition region of the environmental image based on the current movement trajectory, and to perform head localization in the facial recognition region to acquire the facial image to be recognized;
[0038] The recognition module is used to perform feature recognition on the facial image to be recognized and obtain the facial recognition result.
[0039] On the other hand, embodiments of this application provide an electronic device, which includes a processor and a memory; the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a facial recognition method as described above.
[0040] On the other hand, this application embodiment provides a smart door lock, which is equipped with a camera, and the smart door lock is used for:
[0041] In response to the detection of a target object, the camera begins to capture images of the surrounding environment.
[0042] Based on the entry position of the target object in the environmental image, the current movement trajectory is determined from the movement trajectory set, wherein the movement trajectory refers to the trajectory of the position change of the facial recognition point in the environmental image;
[0043] Based on the current movement trajectory, the facial recognition region of the environmental image is determined, and head localization is performed in the facial recognition region to obtain the facial image to be recognized;
[0044] Feature recognition is performed on the facial image to be identified to obtain the facial recognition result.
[0045] On the other hand, embodiments of this application provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement a method for determining the reasonable production capacity of an oil reservoir as described above.
[0046] The technical solution provided in this application includes at least the following beneficial effects:
[0047] This application provides a facial recognition method, apparatus, device, and storage medium. Based on the entry position of the target object into the frame, the movement trajectory of the facial recognition points of the target object is determined from a pre-stored set of movement trajectories. This can predict the approximate position of the target object's face in the environmental image, i.e., the facial recognition area. Thus, head localization and facial recognition can be performed directly from the facial area without processing the entire environmental image. This enables rapid localization of the target object's face and determines the facial image in the image based on the movement trajectory of the facial recognition points. Facial recognition can be performed while the target object is moving towards the camera from a distance, without waiting for it to stop moving. This further improves recognition speed and enables long-distance recognition. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below.
[0049] Figure 1 This is a flowchart of a facial recognition method provided in an exemplary embodiment of this application;
[0050] Figure 2 This is a flowchart of a facial recognition method provided in another exemplary embodiment of this application;
[0051] Figure 3 This is a flowchart of a facial recognition method provided in another exemplary embodiment of this application;
[0052] Figure 4 This is a flowchart of a facial recognition method provided in another exemplary embodiment;
[0053] Figure 5 This is a structural block diagram of a facial recognition device provided in an exemplary embodiment of this application;
[0054] Figure 6 This is a structural block diagram of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0056] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0057] If the application documents contain similar descriptions such as "first, second, third", the following explanation shall be added: In the following description, the terms "first, second, third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0059] To address the problems existing in related technologies, this application provides a facial recognition method applied to an electronic device, such as a mobile terminal, computer, or smart home appliance. In some embodiments, the electronic device can be a smart door lock equipped with a camera. The smart door lock, in response to detecting a target object, begins capturing environmental images through the camera. Based on the target object's position within the environmental image, a current movement trajectory is determined from a set of movement trajectories, where the movement trajectory refers to the trajectory of the facial recognition point's position change within the environmental image. A facial recognition region is determined based on the current movement trajectory, and head localization is performed within this region to acquire a facial image to be recognized. Feature recognition is then performed on the facial image to obtain the facial recognition result.
[0060] The facial recognition method provided in this application can achieve its functions by having the processor of an electronic device call program code. The program code can be stored in a computer storage medium.
[0061] Please refer to Figure 1 The diagram illustrates a flowchart of a face recognition method provided in an exemplary embodiment of this application. The method includes the following steps:
[0062] Step 101: In response to the detection of the target object, the camera begins to capture environmental images.
[0063] The target object is a biological entity of a preset type. For example, the target object may include human beings, animals, etc.
[0064] In one possible implementation, the electronic device can detect the presence of a target object in the vicinity using an infrared detection device. In response to the detection that the temperature and / or shape of an object matches preset conditions, the presence of a target object is determined, and the camera is activated to begin capturing environmental images.
[0065] Optionally, since the target object usually moves towards the electronic device from a distance and does not always remain facing the camera, the electronic device may not be able to obtain the recognition result immediately based on a single environmental image capture. Therefore, the electronic device captures environmental images at a preset frequency, such as once every 0.5 seconds, until it obtains a facial recognition result based on a certain environmental image.
[0066] Step 102: Based on the position of the target object entering the frame in the environmental image, determine the current movement trajectory from the movement trajectory set, where the movement trajectory refers to the trajectory of the position change of the facial recognition point in the environmental image.
[0067] The entry position refers to the initial position of the target object when it enters the ambient frame from outside the frame; that is, the starting position when the target object moves within the ambient frame. For example, a user might enter the ambient frame from the right side of the screen or from the upper left corner.
[0068] In one possible real-time approach, the electronic device stores a set of movement trajectories of registered objects, containing all possible movement trajectories of the registered objects. The electronic device can determine the current movement trajectory of the target object based on its entry position into the frame. The current movement trajectory can be a single trajectory or multiple trajectories, all sharing the common feature that the trajectory's starting point corresponds to its entry position into the frame.
[0069] Step 103: Determine the facial recognition area of the environment based on the current movement trajectory, and perform head localization in the facial recognition area to obtain the facial image to be recognized.
[0070] Electronic devices can determine the facial recognition region based on the current movement trajectory. For example, if the target object is a human body, the electronic device can determine the approximate position of the human head in the environmental image based on the current movement trajectory, and then determine the facial recognition region in the environmental image frame when performing facial recognition. The head localization algorithm is then used to accurately locate the face in the facial recognition region to obtain the facial image to be recognized.
[0071] Compared to processing the entire environment to obtain a facial image, the method in this application embodiment can narrow the scope of head localization, and obtain a facial image by processing a small part of the image, thereby achieving rapid head localization and greatly improving facial recognition efficiency.
[0072] Optionally, the electronic device can define the area where the head is located along the entire current movement trajectory as the facial recognition area. Alternatively, the electronic device can determine the location of the target object's head in each frame of the environmental image based on the target object's movement speed, the acquisition time of the environmental image, and the current movement trajectory, thereby further narrowing down the facial recognition area.
[0073] Step 104: Perform feature recognition on the facial image to be recognized to obtain the facial recognition result.
[0074] Electronic devices store facial images of registered individuals, which can be compared with the facial images of target individuals to determine whether the target individual is a registered individual.
[0075] For illustrative purposes, the electronic device is a smart door lock. The smart door lock performs feature recognition on the facial image to be identified, obtaining a facial recognition result. If the target object is a registered object, the smart door lock immediately unlocks and stops collecting environmental images and facial recognition; if the target object is not a registered object, the door lock remains closed; if it is currently impossible to determine whether the target object is a registered object, it continues to collect environmental images and perform facial recognition.
[0076] By determining the facial recognition region from the environmental image based on the target's movement trajectory, and then locating the head within that region, smart locks can achieve both rapid image processing and prediction of the target's position, enabling facial recognition during its movement. This improves facial recognition speed and the efficiency of unlocking smart locks.
[0077] In summary, the facial recognition method provided in this application determines the movement trajectory of the facial recognition points of the target object from a pre-stored set of movement trajectories based on the target object's entry position in the frame. This method can predict the approximate position of the target object's face in the environmental image, i.e., the facial recognition area. Thus, head localization and facial recognition can be performed directly from the facial area without processing the entire environmental image. This method enables rapid localization of the target object's face and determines the facial image in the image based on the movement trajectory of the facial recognition points. Facial recognition can be performed while the target object is moving towards the camera from a distance, without waiting for it to stop moving. This further improves recognition speed and enables long-distance recognition.
[0078] Please refer to Figure 2 The diagram illustrates a flowchart of a facial recognition method provided in another exemplary embodiment of this application. The method includes the following steps:
[0079] Step 201: Use a head localization algorithm to perform head localization on the continuous environmental images of the historical face recognition process, and obtain the movement trajectory data of the face recognition point and the face coverage area data in each historical face recognition process.
[0080] In one possible implementation, during the first n facial recognition attempts, since the electronic device cannot store the movement trajectory, it can wait for the target object to stop moving before performing facial recognition. Simultaneously, it saves the environmental images from each facial recognition process and directly performs head localization to record the position of the facial recognition point in each environmental image. This allows it to obtain the movement trajectory data of the facial recognition point and the facial coverage area data based on continuous environmental images. The electronic device then uses this data as samples to train a learning network.
[0081] Optionally, during the subsequent head localization and facial recognition process based on the current movement trajectory, the electronic device can update the movement trajectory data and facial coverage area data based on the facial recognition results, and then update the network parameters.
[0082] Step 202: Send the movement trajectory data and facial coverage area data to the backend server.
[0083] The electronic device uploads the collected data to the backend server, where it performs model training and generates sets of movement trajectories and starting point regions. Figure 3 As shown.
[0084] The server inputs the movement trajectory data into a first learning algorithm to obtain the movement trajectory set, and inputs the facial coverage area data into a second learning algorithm to obtain the starting point region set. Illustratively, the second learning algorithm is a Long Short-Term Memory (LSTM) network algorithm. The server inputs the facial coverage area data into the trained LSTM algorithm to obtain the starting point region set corresponding to the logged-in user, i.e., the screen area where the entry position may be located.
[0085] Step 203: Receive and store the set of movement trajectories and the set of starting point areas sent by the backend server.
[0086] After the backend server generates a set of movement trajectories and a set of starting point regions, it sends these sets to the corresponding electronic devices, which then receive and store them. The electronic devices can use the set of starting point regions to quickly locate the entry point and the set of movement trajectories to quickly acquire facial images.
[0087] Optionally, when the electronic device is a computer or other device with sufficient computing power, the above model training process can be executed directly on the local electronic device without the need for a backend server.
[0088] Step 204: In response to the detection of the target object, the camera begins to capture environmental images.
[0089] The specific implementation of step 204 can be referred to step 101 above, and will not be repeated here in the embodiments of this application.
[0090] Step 205: Determine the area to be included in the scene based on the set of starting point areas.
[0091] Step 206: Use a head localization algorithm to locate the head in the frame area and determine the position of the head in the frame.
[0092] In one possible implementation, the electronic device determines the screen area in the set of starting areas as the frame area.
[0093] To illustrate, after the electronic device turns on the camera, it captures the environmental scene, captures the first environmental scene frame, and performs head localization on the in-scene area. If the head of the target object is located, the location of the facial recognition point is determined as the in-scene position. If the head of the target object is not recognized, the electronic device continues to perform head localization on the in-scene area in the next environmental scene frame until the head of the target object is recognized.
[0094] Step 207: Based on the entry position of the target object in the environmental image, determine the current movement trajectory from the movement trajectory set, where the movement trajectory refers to the trajectory of the position change of the facial recognition point in the environmental image.
[0095] The specific implementation of step 207 can be referred to step 102 above, and will not be repeated here in the embodiments of this application.
[0096] Step 208: Determine the facial recognition area of the environment based on the current movement trajectory, and perform head localization in the facial recognition area to obtain the facial image to be recognized.
[0097] In one possible implementation, step 208 specifically includes the following steps:
[0098] Step 208a: Determine the facial recognition region of the environment based on the current movement trajectory, and perform head localization based on the facial recognition region.
[0099] Electronic devices can determine the facial recognition region based on the current movement trajectory. For example, if the target object is a human body, the electronic device can determine the approximate position of the human head in the environmental image based on the current movement trajectory, and then determine the facial recognition region in the environmental image frame when performing facial recognition. The head localization algorithm is then used to accurately locate the face in the facial recognition region to obtain the facial image to be recognized.
[0100] Step 208b: In response to the presence of a head in the face recognition region, obtain the face image to be recognized based on the head localization result.
[0101] In step 208c, in response to the fact that the face recognition region does not contain a head, head localization is performed from other regions of the environment image, and the face image to be recognized is obtained based on the head localization result.
[0102] If the electronic device recognizes the head of the target object in the facial recognition area, it means that the target object is moving toward the camera according to the current movement trajectory, and the electronic device can quickly locate and acquire facial images.
[0103] If the electronic device fails to recognize a head in the facial recognition area, it indicates that the target object has deviated from its current movement trajectory. The electronic device then needs to process other areas of the environmental image to obtain the facial image.
[0104] If the target object does not move according to the predicted current movement trajectory, the electronic device can record its actual movement trajectory and report it to the server to update the movement trajectory set. The method provided in this application embodiment also includes the following steps:
[0105] Since the face recognition area does not include the head, the actual movement trajectory is recorded based on the environmental image and sent to the backend server. The backend server is used to update the movement trajectory set based on the actual movement trajectory.
[0106] Optionally, if the target object deviates from its current movement trajectory, the electronic device continues to acquire environmental images and perform head localization and facial recognition. Based on the head localization results, the movement trajectory of its facial recognition points in the environmental image is determined and uploaded to the backend server.
[0107] Step 209: Perform feature recognition on the facial image to be recognized to obtain the facial recognition result.
[0108] In one possible implementation, the electronic device pre-synthesizes the motion trajectories of registered facial recognition points with the registered facial information to create a comparison frame of the motion entering the frame, and begins facial recognition after the target object enters the frame. Prior to step 209, the method provided in this application embodiment further includes the following steps:
[0109] For each movement trajectory in the set of movement trajectories, a motion comparison image is synthesized by combining the information collected images of the registered objects. The motion comparison image is the facial image of the registered objects when they move relative to the camera.
[0110] In a schematic representation, the set of movement trajectories contains three movement trajectories. The electronic device synthesizes these trajectories with one or more facial images taken during user registration, simulating the user's facial state during movement to obtain three sets of motion comparison images. This solves the problem of inaccurate recognition results caused by the target object tilting its head down or turning its head to the side, leading to discrepancies between the facial features and the registered facial features. Facial recognition can be performed during movement, eliminating the need to wait for the target object to move in front of the camera and stop, thus improving facial recognition speed. When the electronic device is a smart door lock, the door opening speed is correspondingly improved.
[0111] Step 209 specifically includes the following steps:
[0112] Step 209a: Compare facial features between the facial image to be recognized and the motion comparison image corresponding to the current movement trajectory to obtain the facial recognition result.
[0113] Indicatively, the electronic device compares the facial features of the currently acquired face image to be identified with a set of motion comparison images that follow the current movement trajectory. If the recognition results of the motion comparison images and the face image to be identified are consistent, then the target object is determined to be a registered object.
[0114] In this embodiment, a comparison frame of the subject's movement is synthesized by combining the motion trajectory set of registered facial recognition points with the registered facial information. Facial recognition begins after the target subject enters the frame, thus solving the problem of inaccurate recognition results caused by discrepancies between the registered facial features and the actual facial features due to the target subject moving (such as tilting or turning its head). Furthermore, facial recognition can be performed during the movement of the target subject without waiting for it to move in front of the camera and stop, improving the speed of facial recognition.
[0115] Please refer to Figure 4 The diagram illustrates a flowchart of a facial recognition method provided in another exemplary embodiment of this application. The method includes the following steps:
[0116] Step 401: In response to the detection of the target object, the camera begins to capture environmental images.
[0117] Step 402: Based on the position of the target object entering the frame in the environmental image, determine the current movement trajectory from the set of movement trajectories.
[0118] The specific implementation of steps 401 to 402 can be referred to steps 101 to 102 above, and will not be repeated here in the embodiments of this application.
[0119] Step 403: Determine the initial orientation of the target object relative to the camera based on the position of entry into the frame.
[0120] Step 404: Adjust the camera's shooting angle to the initial position using the camera motion structure.
[0121] In one possible implementation, the camera of the electronic device is connected to a camera motion structure. The electronic device can adjust the shooting angle of the camera through the camera motion structure. By adding a camera motion structure, the camera can rotate within a certain angle range, allowing the camera to be aimed at the head of the target object for environmental image capture, thereby obtaining a more complete facial image.
[0122] Once the entry and exit points are determined, the electronic device will rotate the camera to face the location of the target object, i.e., the initial orientation.
[0123] Step 405: Control the camera to move along the direction indicated by the current movement trajectory to capture environmental images through the camera motion structure.
[0124] Before the target object stops moving, its position relative to the camera changes. The electronic device controls the camera to move and capture images based on the direction of movement indicated by the movement trajectory, thereby realizing motion detection of the target object, obtaining higher quality facial data, and improving the accuracy of facial recognition.
[0125] Step 406: Control the infrared emitting device to focus along the direction of movement indicated by the current movement trajectory. The infrared density emitted by the infrared emitting device in the focusing direction is higher than the infrared density in other directions.
[0126] In one possible implementation, the camera is also equipped with an infrared emitter for infrared recognition. While controlling the camera's movement and shooting based on the current trajectory, the electronic device can simultaneously control the focusing direction of the infrared emitter, allowing for more precise and targeted projection of infrared light onto the face of the target object.
[0127] By using mobile imaging and targeted infrared projection, high-quality facial image data can be acquired, while also increasing the detection distance and improving detection speed.
[0128] Step 407: Determine the facial recognition region of the environment based on the current movement trajectory, and perform head localization in the facial recognition region to obtain the facial image to be recognized.
[0129] Step 408: Perform feature recognition on the facial image to be recognized to obtain the facial recognition result.
[0130] The specific implementation of steps 407 to 408 can be referred to steps 103 to 104 above, and will not be repeated here in the embodiments of this application.
[0131] In this embodiment, by adding a camera motion structure and targeted infrared projection, the camera is aligned with the moving target object and a denser infrared beam is projected onto the face of the target object, thereby obtaining a higher quality facial image. This improves recognition accuracy, increases detection distance, and advances the detection start time, thus increasing detection speed.
[0132] Figure 5 This is a structural block diagram of a smart door lock management device provided in an exemplary embodiment of this application. The device includes the following structure:
[0133] The acquisition module 501 is used to start acquiring environmental images through the camera in response to the detection of a target object;
[0134] The determination module 502 is used to determine the current movement trajectory from the movement trajectory set based on the entry position of the target recognition object in the environmental image, wherein the movement trajectory refers to the trajectory of the position change of the facial recognition point in the environmental image;
[0135] The acquisition module 503 is used to determine the facial recognition region of the environmental image based on the current movement trajectory, and to perform head localization in the facial recognition region to acquire the facial image to be recognized.
[0136] The recognition module 504 is used to perform feature recognition on the facial image to be recognized and obtain facial recognition results.
[0137] Optionally, the device further includes:
[0138] The positioning module is used to locate the head in the continuous environmental images of the historical facial recognition process using a head positioning algorithm, so as to obtain the movement trajectory data of the facial recognition point and the facial coverage area data in each historical facial recognition process.
[0139] The sending module is used to send the movement trajectory data and the face coverage area data to the backend server. The backend server is used to input the movement trajectory data into a first learning algorithm to obtain the movement trajectory set, and input the face coverage area data into a second learning algorithm to obtain the starting point area set.
[0140] The receiving module is used to receive and store the set of movement trajectories and the set of starting point areas sent by the backend server.
[0141] Optionally, the determining module 502 is further configured to:
[0142] The area to be captured in the environment is determined based on the set of starting point areas.
[0143] The head is located in the frame area using a head localization algorithm to determine the position of the head entering the frame.
[0144] Optionally, the acquisition module 503 is further configured to:
[0145] The facial recognition region of the environment is determined based on the current movement trajectory, and head localization is performed based on the facial recognition region;
[0146] In response to the presence of a head in the facial recognition area, the image of the face to be recognized is obtained based on the head localization result;
[0147] In response to the fact that the face recognition region does not contain a head, the head is located from other regions of the environmental image, and the face image to be recognized is obtained based on the head location result.
[0148] The sending module is also used for:
[0149] In response to the fact that the face recognition area does not contain a head, the actual movement trajectory is recorded based on the environmental image and sent to the backend server. The backend server is used to update the movement trajectory set based on the actual movement trajectory.
[0150] Optionally, the device further includes:
[0151] The synthesis module is used to synthesize motion comparison images by combining information acquisition images of registered objects with each motion trajectory in the set of motion trajectories. The motion comparison images are facial images of the registered objects when they move relative to the camera.
[0152] The identification module 504 is further used for:
[0153] The facial features of the image to be identified and the motion comparison image corresponding to the current movement trajectory are compared to obtain the facial recognition result.
[0154] Optionally, the camera is connected to a camera motion structure;
[0155] The determining module 502 is further configured to determine the initial orientation of the target object relative to the camera based on the entry position;
[0156] The acquisition module 501 is also used to adjust the shooting angle of the camera to the initial position through the camera motion structure; and to control the camera to move along the movement direction indicated by the current movement trajectory to acquire the environmental image through the camera motion structure.
[0157] Optionally, the device further includes:
[0158] The control module is used to control the infrared emitting device to focus along the movement direction indicated by the current movement trajectory, wherein the infrared density emitted by the infrared emitting device in the focusing direction is higher than the infrared density in other directions.
[0159] This application provides an electronic device; Figure 6 This is a schematic diagram of the composition structure of the electronic device provided in the embodiments of this application, such as... Figure 6As shown, the electronic device 600 includes: a processor 601, at least one communication bus 602, a user interface 603, at least one external communication interface 604, and a memory 605. The communication bus 602 is configured to enable communication between these components. The user interface 603 may include a display screen, and the external communication interface 604 may include standard wired and wireless interfaces. The processor 601 is configured to execute a program stored in the memory for a facial recognition method, to implement the steps of the facial recognition method provided in the above embodiment.
[0160] This application provides a smart door lock.
[0161] It should be noted that the descriptions of the storage medium, electronic device, and smart lock embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0162] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement a facial recognition method as described in the above embodiments.
[0163] This application also provides a computer program product that runs on the processor of a computer device, causing the computer device to perform a facial recognition method as described in the above embodiments.
[0164] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0165] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, object, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, object, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, object, or apparatus that includes that element.
[0166] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0167] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0168] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0169] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0170] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a controller to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0171] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A facial recognition method, characterized in that, The method includes: In response to the detection of a target object, the camera begins to capture images of the surrounding environment. Based on the entry position of the target object in the environmental image, the current movement trajectory is determined from the movement trajectory set, wherein the movement trajectory refers to the trajectory of the position change of the facial recognition point in the environmental image; Based on the current movement trajectory, the facial recognition region of the environmental image is determined, and head localization is performed in the facial recognition region to obtain the facial image to be recognized; The facial image to be identified is subjected to feature recognition to obtain the facial recognition result; Before performing feature recognition on the facial image to be recognized to obtain the facial recognition result, the method further includes: For each movement trajectory in the set of movement trajectories, a motion comparison image is synthesized by combining the information collection images of the registered object. The motion comparison image is a facial image of the registered object when it moves relative to the camera. The step of performing feature recognition on the facial image to be recognized to obtain the facial recognition result includes: The facial features of the image to be identified and the motion comparison image corresponding to the current movement trajectory are compared to obtain the facial recognition result.
2. The method according to claim 1, characterized in that, Before the camera begins capturing environmental images in response to the detection of a target object, the method includes: The head localization algorithm is used to locate the head in the continuous environmental images of the historical face recognition process, so as to obtain the movement trajectory data of the face recognition point and the face coverage area data in each historical face recognition process. The system sends the movement trajectory data and the facial coverage area data to the backend server. The backend server is used to input the movement trajectory data into a first learning algorithm to obtain the movement trajectory set, and to input the facial coverage area data into a second learning algorithm to obtain the starting point area set. Receive and store the set of movement trajectories and the set of starting point regions sent by the backend server.
3. The method according to claim 2, characterized in that, Before determining the current movement trajectory from the movement trajectory set based on the entry position of the target object in the environmental image, the method further includes: The area to be captured in the environment is determined based on the set of starting point areas. The head is located in the frame area using a head localization algorithm to determine the position of the head entering the frame.
4. The method according to claim 2, characterized in that, The step of determining the facial recognition region of the environmental image based on the current movement trajectory, and performing head localization within the facial recognition region to obtain the facial image to be recognized includes: The facial recognition region of the environment is determined based on the current movement trajectory, and head localization is performed based on the facial recognition region; In response to the presence of a head in the facial recognition area, the image of the face to be recognized is obtained based on the head localization result; In response to the fact that the face recognition area does not contain a head, the head is located from other areas of the environment image, and the face image to be recognized is obtained based on the head location result. The method further includes: In response to the fact that the face recognition area does not contain a head, the system records the actual movement trajectory based on the environmental image and sends the actual movement trajectory to the backend server. The backend server is used to update the movement trajectory set based on the actual movement trajectory.
5. The method according to any one of claims 1 to 4, characterized in that, The camera is connected to the camera motion structure; After determining the current movement trajectory from the set of movement trajectories based on the entry position of the target object in the environmental image, the method further includes: The initial orientation of the target object relative to the camera is determined based on the position where it enters the frame; The camera's shooting angle is adjusted to the initial position using the camera motion structure. The camera motion structure controls the camera to move along the direction indicated by the current movement trajectory to capture the environmental images.
6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The infrared emitting device is controlled to focus along the direction of movement indicated by the current movement trajectory, and the infrared density emitted by the infrared emitting device in the focusing direction is higher than the infrared density in other directions.
7. A facial recognition device, characterized in that, The device includes: The acquisition module is used to start acquiring environmental images through the camera in response to the detection of a target object; The determination module is used to determine the current movement trajectory from the movement trajectory set based on the entry position of the target recognition object in the environmental image, wherein the movement trajectory refers to the trajectory of the position change of the facial recognition point in the environmental image; The acquisition module is used to determine the facial recognition region of the environmental image based on the current movement trajectory, and to perform head localization in the facial recognition region to acquire the facial image to be recognized; The recognition module is used to perform feature recognition on the facial image to be recognized and obtain facial recognition results; The device further includes: The synthesis module is used to synthesize motion comparison images by combining information acquisition images of registered objects with each motion trajectory in the set of motion trajectories. The motion comparison images are facial images of the registered objects when they move relative to the camera. The recognition module is further configured to: perform facial feature comparison between the facial image to be recognized and the motion comparison image corresponding to the current movement trajectory, and obtain the facial recognition result.
8. An electronic device, characterized in that, The electronic device includes a processor and a memory; the memory stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by the processor to implement a facial recognition method as described in any one of claims 1 to 6.
9. A smart door lock, characterized in that, The smart lock is equipped with a camera and is used to perform the facial recognition method as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement a facial recognition method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Automatic-tracking and automatic-zooming method for acquiring iris images
CN101520838A
Face recognition method and device, computer equipment and storage medium
CN111523414A
Target positioning method and system based on multi-source data fusion and storage medium
CN114119755A