Face archiving methods, devices, electronic devices, and storage media
By dividing face capture event data into two categories and archiving them separately, the problem of low face image archiving rate under scene constraints is solved, and efficient archiving of face images in different scenes is achieved.
Patent Information
- Application Number
- CN202111678104.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2041-12-31
AI Technical Summary
Due to scene limitations, the facial images captured by video surveillance are not clear enough, resulting in a low archiving rate of facial images, especially when the images are obscured by vehicle windows, where the archiving rate of captured facial images is extremely low.
The face capture event data to be archived is divided into first face capture event data and second face capture event data, and then archived separately. The first archiving is carried out without scene restrictions, while the second archiving is carried out with scene restrictions. Structured facial feature data is used for comparison and threshold judgment to ensure that the data is archived in the corresponding archive.
It improves the archiving rate of facial images under scene constraints, ensuring that facial images in different scenes can be effectively archived, thus improving the accuracy and efficiency of archiving.
Smart Images

Figure CN114445882B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data archiving, and more particularly to a method, apparatus, electronic device, and storage medium for facial archiving. Background Technology
[0002] With the development of image processing technology, a large amount of image data is needed to support various image processing scenarios. Image data is obtained by capturing images of different scenes through camera equipment, such as capturing images of faces and vehicles. To facilitate image data management, image data is structured and archived, with image data for different objects being archived and managed. With the rapid development of visual intelligence technology, the rapid and accurate identification of personnel captured by intelligent devices is crucial to meeting business needs. Accurate archiving of faces captured in video becomes an important source of clues for relevant personnel when performing their work. Currently, video surveillance images are limited by various scenarios, resulting in less clear captured facial images. For example, the most typical scenario is that facial images captured while driving are obstructed by vehicle glass. In such cases, the archiving rate of captured facial images becomes very low, resulting in only a small number of accurate facial images being usable in the corresponding archives. Summary of the Invention
[0003] This invention provides a face archiving method. By dividing the face shooting event data to be archived into first face shooting event data and second face shooting event data, and performing first archiving and second archiving on the first face shooting event data and the second face shooting event data, the first face archive can archive first face shooting event data and second face shooting event data that meet the conditions, and the second face archive can archive second face shooting event data that meet the conditions, which can improve the archiving rate of face images under scene constraints.
[0004] In a first aspect, embodiments of the present invention provide a face archiving method, the method comprising:
[0005] Acquire face capture event data to be archived. The face capture event data includes first face capture event data captured in a non-preset scene and second face capture event data captured in a preset scene. The face capture event data to be archived has structured face feature data.
[0006] A first archiving operation is performed on the face shooting event data to be archived based on the structured face feature data. The first archiving operation is used to archive the first face shooting event data and the second shooting first face shooting event data.
[0007] If the first archiving operation fails, a second archiving operation is performed on the second face shooting event data based on the structured face feature data under the preset scene archiving conditions. The second archiving operation is only used to archive the second face shooting event data.
[0008] Optionally, the first archiving operation on the face capture event data to be archived based on the structured face feature data includes:
[0009] The structured facial feature data is compared with the first facial cover feature data in the preset first facial archive to obtain the first comparison score between the facial shooting event data to be archived and the first facial cover feature data.
[0010] If the first comparison score is greater than or equal to the first preset threshold, the face capture event data to be archived will be archived into the first face file.
[0011] Optionally, the face archiving method further includes:
[0012] If the first comparison score is greater than or equal to the second preset threshold, then the structured face information is used to determine whether the face shooting event data to be archived is the first face shooting event data, and the second preset threshold is greater than the first preset threshold.
[0013] If the face capture event data to be archived is the first face capture event data, then determine whether the quality score of the face capture event data to be archived is greater than or equal to the quality score of the first face cover feature data;
[0014] If the quality score of the face capture event data to be archived is greater than or equal to the quality score of the first face cover feature data, then the face capture event data to be archived replaces the first face cover feature data.
[0015] Optionally, if the first archiving operation fails, a second archiving operation is performed on the second face capture event data based on the structured face feature data under preset scene archiving conditions, including:
[0016] If the first archiving operation fails, then determine whether the face shooting event data to be archived is the second face shooting event data based on the structured face information.
[0017] If the face shooting event data to be archived is the second face shooting event data, then under the preset scene archiving conditions, the structured face information is compared with the cover of the second face shooting event data to obtain the second comparison score of the face shooting event data to be archived and the feature data of the second face cover.
[0018] If the second comparison score is greater than or equal to the preset third preset threshold, then the face capture event data to be archived is archived into the second face file.
[0019] Optionally, the structured facial information of the second facial capture event data further includes binding information between a first scene and a face, and the second facial profile includes binding information between a second scene and a face. The preset scene archiving condition is that the binding information between the first scene and the face corresponds to the binding information between the second scene and the face in the second facial profile. The step of comparing the structured facial information with the cover of the second facial capture event data under the preset archiving condition of the second facial profile includes:
[0020] Under the condition that the binding information of the first scene and the face corresponds to the binding information of the second scene and the face, the structured face information is compared with the cover of the second face shooting event data.
[0021] Optionally, the second archiving operation on the face capture event data to be archived based on the structured face information further includes:
[0022] The N second face shooting event data with the highest first comparison score with the first face cover feature data in the first face file are selected as the second face cover feature data of the second face file.
[0023] Optionally, the second archiving operation on the archived event based on the structured face information further includes:
[0024] When the second face cover feature data of the second face file changes, determine whether the capacity of the second face shooting event data in the second face file has reached the preset capacity;
[0025] If the data capacity of the second face capture event in the second face file does not reach the preset capacity, the third preset threshold will be lowered.
[0026] If the second face image capture event data capacity in the second face profile has reached the preset capacity, then the third preset threshold is adjusted upwards or maintained.
[0027] Secondly, embodiments of the present invention provide a face archiving device, the device comprising:
[0028] The acquisition module is used to acquire face shooting event data to be archived. The face shooting event data includes first face shooting event data captured in a non-preset scene and second face shooting event data captured in a preset scene. The face shooting event data to be archived has structured face feature data.
[0029] The first archiving module is used to perform a first archiving operation on the face shooting event data to be archived based on the structured face feature data. The first archiving operation is used to archive the first face shooting event data and the second shooting first face shooting event data.
[0030] The second archiving module is used to perform a second archiving operation on the second face shooting event data based on the structured face feature data under preset scene archiving conditions if the first archiving operation fails. The second archiving operation is only used to archive the second face shooting event data.
[0031] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the face archiving method provided in embodiments of the present invention.
[0032] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the face archiving method provided in the embodiments of the present invention.
[0033] In this embodiment of the invention, face capture event data to be archived is obtained. The face capture event data includes first face capture event data captured in a non-preset scene and second face capture event data captured in a preset scene. The first face capture event data and the second face capture event data have structured facial feature data. A first archiving operation is performed on the face capture event data to be archived based on the structured facial feature data. The first archiving operation is used to archive the first face capture event data and the second face capture event data. If the first archiving operation fails, a second archiving operation is performed on the second face capture event data based on the structured facial feature data under preset scene archiving conditions. The second archiving operation is only used to archive the second face capture event data. By dividing the face capture event data to be archived into first face capture event data and second face capture event data, and performing first archiving and second archiving on the first face capture event data and the second face capture event data, the first face archive can archive first face capture event data and second face capture event data that meet the conditions, and the second face archive can archive second face capture event data that meet the conditions. This can improve the archiving rate of face images under scene constraints. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart of a face archiving method provided in an embodiment of the present invention;
[0036] Figure 2 This is a flowchart of a method for updating the cover of a first face profile provided in an embodiment of the present invention;
[0037] Figure 3 This is a flowchart of a method for updating the cover of a second facial profile provided in an embodiment of the present invention;
[0038] Figure 4 This is a schematic diagram of the structure of a face archiving device provided in an embodiment of the present invention;
[0039] Figure 5 This is a schematic diagram of the structure of a first archiving module provided in an embodiment of the present invention;
[0040] Figure 6This is a schematic diagram of another first archiving module provided in an embodiment of the present invention;
[0041] Figure 7 This is a schematic diagram of the structure of a second archiving module provided in an embodiment of the present invention;
[0042] Figure 8 This is a schematic diagram of another second archiving module provided in an embodiment of the present invention;
[0043] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] Please see Figure 1 , Figure 1 This is a flowchart of a face archiving method provided in an embodiment of the present invention, such as... Figure 1 As shown, the face archiving method includes the following steps:
[0046] 101. Obtain the face capture event data to be archived.
[0047] In this embodiment of the invention, the face capture event data includes first face capture event data captured in a non-preset scene and second face capture event data captured in a preset scene, and the face capture event data to be archived has structured face feature data.
[0048] The aforementioned face capture event data to be archived includes first face capture event data and second face capture event data with structured face information. This structured face information can be obtained by using image structuring techniques on video files or captured photos. The structured face information includes face target attributes and face feature values. The face target attributes include face attributes and scene attributes. The face feature values are feature values obtained after feature extraction from face images; these face feature values can also be called face feature vectors.
[0049] It should be noted that the above-mentioned archiving involves entering known static personnel data into a database. For example, known personnel identity information is entered into a personnel identity database, and known permanent resident information is entered into a permanent resident database. In the database, each person corresponds to one file, and each file corresponds to N file covers. The static personnel data is compared with the file covers. If the comparison is successful, the static personnel data is archived; if the comparison fails, the static personnel data is discarded.
[0050] The aforementioned first face capture event data can be understood as events where faces are simply captured and archived. For example, the capture device only captures faces for archiving. This first face capture event data can also be understood as archiving events unaffected by preset scene factors. The aforementioned second face capture event data can be understood as events where faces are captured and archived under preset scenes. For example, the capture device captures faces inside a vehicle and archives these faces. Because of the windshield between the faces inside the vehicle and the capture device, there is some interference during feature extraction, resulting in larger errors when extracting facial target attributes and facial feature values. Due to the influence of facial feature values in the second face capture event data, the archiving rate of the second face capture event data is relatively low.
[0051] In this embodiment of the invention, each person in the archive corresponds to two files, namely, each person corresponds to a first face file and a second face file. The first face file can be used to archive first face shooting event data and second face shooting event data, and the second face file can be used only to archive second face shooting event data.
[0052] 102. Perform the first archiving operation on the face shooting event data to be archived based on the structured face information.
[0053] In this embodiment of the invention, a first archiving operation is used to archive the first face capture event data and the second face capture event data. The first archiving operation includes archiving the face capture event data to be archived into a first face profile, and discarding the face capture event data to be archived. If the first archiving operation is successful, the face capture event data to be archived is archived into the first face profile; if the first archiving operation fails, the face capture event data to be archived is discarded or a second archiving operation is performed.
[0054] Furthermore, the aforementioned structured face information includes face target attributes and face feature values. The structured face information corresponding to the first face capture event data may include the first face target attributes and the first face feature values. The structured face information corresponding to the aforementioned second face capture event data may include the second face target attributes and the second face feature values. The aforementioned first face file includes first face cover feature data, and the aforementioned first face cover feature data may include M first cover face feature values.
[0055] In this embodiment of the invention, the structured facial information can be compared with the first facial cover feature data to obtain a first comparison score between the facial shooting event data to be archived and the first facial cover feature data. If the first comparison score is greater than or equal to a preset first threshold, the facial shooting event data to be archived is archived into the first facial archive. More specifically, during the first archiving operation, the first facial feature value of the first facial shooting event data or the second facial feature value of the second facial shooting event data is compared with the M first cover facial feature values to obtain a first comparison score between the facial shooting event data to be archived and the first facial cover feature data. When the first comparison score is compared with a preset first threshold, it is determined whether the first comparison score is greater than or equal to the preset first threshold. If the first comparison score is greater than or equal to the preset first threshold, it indicates that the facial shooting event data to be archived meets the archiving conditions of the first facial archive, and the facial shooting event data to be archived can be archived into the first facial archive. It should be noted that the aforementioned face capture event data to be archived can be either first face capture event data or second face capture event data. When the first comparison score corresponding to the second face capture event data is greater than or equal to a preset first threshold, it indicates that the aforementioned second face capture event data meets the archiving conditions of the first face archive and can also be archived in the aforementioned first face archive. The aforementioned first comparison score can be the similarity between the first face feature value or the second face feature value and the first cover face feature value.
[0056] In this embodiment of the invention, the first face capture event data and the second face capture event data with a first comparison score greater than or equal to a preset first preset threshold can be archived into the first face file, so that the first face file can archive higher quality first face capture event data and second face capture event data.
[0057] 103. If the first archiving operation fails, then under the preset scene archiving conditions, perform a second archiving operation on the second face shooting event data based on the structured face feature data.
[0058] In this embodiment of the invention, the second archiving operation only archives the face capture event data to be archived into the second face archive and discards the face capture event data to be archived. The second face archive is used to archive the second face capture event data. If the first archiving operation fails, it indicates that the facial feature values in the face capture event data to be archived are significantly different from the cover facial feature values corresponding to the first face cover feature data of the first face archive. This is mainly reflected in two aspects: one is that the quality of the face image in the first face capture event data is not high, and the extracted features do not meet the conditions of the first face archive; the other is that the quality of the face image in the second face capture event data is not high due to scene influences, and the extracted features do not meet the conditions of the first face archive. Considering the scene influences, the images in the second face capture event data also have usage value in the corresponding scene, therefore, they are not suitable for direct discarding.
[0059] Furthermore, the aforementioned structured face information includes face target attributes and face feature values. The structured face information corresponding to the aforementioned second face shooting event data may include second face target attributes and second face feature values. The aforementioned second face file includes a cover of the second face shooting event data. The cover of the aforementioned second face shooting event data may include N second cover face feature values.
[0060] The aforementioned facial target attributes include facial attributes and scene attributes. The scene attributes can be no scene, no-impact scene, or influential scene. Specifically, the scene attributes in the first facial capture event data can be no scene or no-impact scene, while the scene attributes in the second facial capture event data can be influential scene. "No scene" can be understood as the captured face not being in a preset scene. "No-impact scene" can be understood as the captured face being in a preset scene, but this preset scene does not affect the feature extraction quality of the captured facial image. "Influential scene" can be understood as the captured face being in a preset scene, but this preset scene affects the feature extraction quality of the captured facial image. Furthermore, "influential scene" can be understood as the scene having influencing factors, and the feature extraction quality of the facial image captured by the capture device is reduced due to these influencing factors. These influencing factors can be factors such as strong winds, sandstorms, glass obstruction, and fog.
[0061] In this embodiment of the invention, if the first archiving operation fails, the structured face information is used to determine whether the face shooting event data to be archived is the second face shooting event data. If the structured face information determines that the face shooting event data to be archived is the second face shooting event data, the structured face information is compared with the cover of the second face shooting event data under a preset scene archiving condition to obtain a second comparison score between the face shooting event data to be archived and the first face cover feature data. If the second comparison score is greater than or equal to a preset third preset threshold, the face shooting event data to be archived is archived into the second face file.
[0062] More specifically, after the first archiving operation fails, the scene attribute in the face target attribute of the face capture event data to be archived is used to determine whether the face capture event data to be archived is the second face capture event data. If the face capture event data to be archived is the second face capture event data, the second archiving operation is performed; if the face capture event data to be archived is the first face capture event data, it is discarded directly. During the second archiving operation, the second face feature value of the second face capture event data is compared with the aforementioned N second cover face feature values to obtain the second comparison score between the face capture event data to be archived and the aforementioned first face cover feature data. When the aforementioned second comparison score is compared with a preset third preset threshold, it is determined whether the aforementioned second comparison score is greater than or equal to the preset third preset threshold. If the aforementioned second comparison score is greater than or equal to the preset third preset threshold, it means that the face capture event data to be archived meets the archiving conditions of the second face archive, and the face capture event data to be archived can be archived into the aforementioned second face archive. It should be noted that the aforementioned face capture event data to be archived is the second face capture event data. Before the aforementioned second archiving operation, the first face capture event data is discarded. The aforementioned second comparison score can be understood as the similarity between the aforementioned second face feature value and the aforementioned second cover face feature value.
[0063] In this embodiment of the invention, the first preset threshold is greater than the third preset threshold. The first face capture event data and the second face capture event data whose second comparison score is greater than or equal to the preset third preset threshold can be archived into the second face file. This allows the first face file to archive higher quality first face capture event data and second face capture event data, and the second face file to archive second face capture event data that meets the required quality, thereby improving the face archiving events in various scenarios.
[0064] In this embodiment of the invention, face capture event data to be archived is obtained. The face capture event data includes first face capture event data captured in a non-preset scene and second face capture event data captured in a preset scene. The first face capture event data and the second face capture event data have structured facial feature data. A first archiving operation is performed on the face capture event data to be archived based on the structured facial feature data. The first archiving operation is used to archive the first face capture event data and the second face capture event data. If the first archiving operation fails, a second archiving operation is performed on the second face capture event data based on the structured facial feature data under preset scene archiving conditions. The second archiving operation is only used to archive the second face capture event data. By dividing the face capture event data to be archived into first face capture event data and second face capture event data, and performing first archiving and second archiving on the first face capture event data and the second face capture event data, the first face archive can archive first face capture event data and second face capture event data that meet the conditions, and the second face archive can archive second face capture event data that meet the conditions. This can improve the archiving rate of face images under scene constraints.
[0065] Optionally, in this embodiment of the invention, the cover of the first face profile can be updated based on the first face capture event data from a successful first archiving operation. Please refer to [link to relevant documentation]. Figure 2 , Figure 2 This is a flowchart of a method for updating the cover of a first face profile provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the specific steps include:
[0066] 200. After the first archiving operation is successful, determine whether the first comparison score between the face shooting event data to be archived and the first face cover feature data is greater than or equal to the preset second preset threshold.
[0067] In this embodiment of the invention, if the first comparison score is greater than or equal to a preset second preset threshold, the process proceeds to step 201; if the first comparison score is less than the preset second preset threshold, the process ends. The second preset threshold is greater than the first preset threshold. If the first comparison score is greater than or equal to the preset second preset threshold, it indicates that the quality of the face capture event data to be archived is very close to that of the first face cover feature data, and it can be used as a candidate for the first face cover feature data.
[0068] 201. Determine whether the face capture event data to be archived is the first face capture event data based on the structured face information.
[0069] In this embodiment of the invention, the structured face information includes face target attributes and face feature values. The face target attributes include face attributes and scene attributes. The scene attributes can be no scene, no-impact scene, or influential scene. Specifically, the scene attributes in the first face capture event data can be no scene or no-impact scene; the scene attributes in the second face capture event data can be influential scene. "No scene" can be understood as the captured face not being in a preset scene, and "no-impact scene" can be understood as the captured face being in a preset scene, but this preset scene does not affect the feature extraction quality of the captured face image. By determining the scene attributes in the face capture event data to be archived, it can be determined whether the face capture event data to be archived is the first face capture event data.
[0070] Furthermore, if the face capture event data to be archived is the first face capture event data, then it means that the face capture event data to be archived can be used as a candidate for the first face cover feature data, and proceed to step 202. If the face capture event data to be archived is not the second face capture event data, then the process ends.
[0071] 202. Determine whether the quality score of the face capture event data to be archived is greater than or equal to the quality score of the first face cover feature data.
[0072] In this embodiment of the invention, the face capture event data to be archived also includes a first face capture event data image. Obtaining the first face cover feature data also includes obtaining the corresponding first cover face image, and each first cover face image has a corresponding quality score. Specifically, the image quality of the first face capture event data image is evaluated using an image quality assessment model, and the quality score of the first face capture event data image is used as the quality component of the face capture event data to be archived. The quality score of the first face capture event data image is compared with the quality score of the first cover face image. If the quality score of the first face capture event data image is greater than the quality score of the first cover face image, it means that the face capture event data to be archived can be used as the first face cover feature data of the first face archive, and proceed to step 203; if the quality score of the first face capture event data image is less than the quality score of the first cover face image, it means that the face capture event data to be archived is not suitable as the first face cover feature data of the first face archive, and the process ends.
[0073] 203. Replace the first face cover feature data with the face shooting event data to be archived.
[0074] In this embodiment of the invention, the face feature value in the structured information of the face shooting event data to be archived is replaced with the first cover face feature value corresponding to the first cover face image with the lowest quality score in the first face cover feature data. The face feature value is then associated with the quality score of the corresponding first face shooting event data image to establish a corresponding index relationship.
[0075] In this embodiment of the invention, the cover of the first face profile is updated with higher quality face capture event data to be archived. Under the condition that the first preset threshold remains unchanged, the first face profile can be archived with higher quality first face capture event data and second face capture event data.
[0076] Optionally, in this embodiment of the invention, the structured face information of the second face shooting event data includes a second face target attribute. The second face target attribute includes face attributes, scene attributes, and binding information between a first scene and a face. The second face file includes binding information between a second scene and a face. The preset scene archiving condition is that the binding information between the scene and the face corresponds to that in the second face file.
[0077] The binding information between the above-mentioned scene and face can be understood as the binding information between face attributes and scene attributes. Specifically, it can be understood as a preset scene having a strong binding relationship with a specific person, such as a vehicle having a strong binding relationship with the driver. In this case, the binding information between the scene and face can be the association information between the license plate number and the face of the person who owns the vehicle.
[0078] To further explain, when the face capture event data to be archived is the second face capture event data, and the second face capture event data is a face vehicle event, that is, the face of the driver inside the vehicle is captured, the binding information of the second scene and the face in the second face file is the vehicle's license plate number and the face of the person belonging to the vehicle. The binding information of the first scene and the face is the vehicle's license plate number and the face of the driver. Only when the license plate number and the face of the driver in the face capture event data to be archived are the same as the license plate number and the face of the person belonging to the vehicle in the second face file, will the structured face in the face capture event data to be archived be compared with the cover of the second face capture event data. Otherwise, it will be discarded to ensure the accuracy of the second face capture event data archived in the second face file.
[0079] Optionally, in this embodiment of the invention, when establishing the second face profile, the N second face shooting event data with the highest first comparison score with the first face cover feature data in the first face profile can be selected as the second face shooting event data cover of the second face profile.
[0080] Optionally, in this embodiment of the invention, the cover of the second facial profile can be updated; please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a flowchart of a method for updating the cover of a second facial profile provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the specific steps include:
[0081] 300. After the first archiving operation is successful, determine the size of the first comparison score corresponding to the face capture event data to be archived and the size of the N second face capture event data with the highest first comparison score in the current first face archive.
[0082] In this embodiment of the invention, if at least one of the N second face capture event data has a first comparison score that is less than the first comparison score of the face capture event data to be archived, then proceed to step 301; if the first comparison scores of all N second face capture event data are greater than the first comparison score of the face capture event data to be archived, then the process ends.
[0083] 301. Replace the cover of the second face capture event data in the second face archive with the second face capture event data corresponding to the face capture event data to be archived.
[0084] In this embodiment of the invention, the second face feature value in the structured information of the face shooting event data to be archived is used to replace the second cover face feature value corresponding to the second face shooting event data cover with the lowest first comparison score among N second face shooting event data covers. The second face feature value is then associated with the first comparison score of the corresponding second face shooting event data to establish a corresponding index relationship.
[0085] It should be noted that the second face profile does not include the second face capture event data corresponding to the cover of the second face capture event data.
[0086] 302. When the cover of the second face capture event data in the second face file changes, determine whether the capacity of the second face capture event data in the second face file has reached the preset capacity.
[0087] In this embodiment of the invention, when the cover of the second face image capture event data in the second face profile changes, it indicates that a higher-quality cover has been used for updating the data. Using a higher-quality cover reduces the archiving rate of the second face image capture event data, thus lowering the overall archiving rate of the second face profile. If the capacity is insufficient, this reduced archiving rate results in a smaller number of archived second face image capture event data entries. Conversely, if the capacity of the second face image capture event data in the second face profile meets the required conditions, it indicates that the number of second face image capture event data entries in the second face profile is sufficient, allowing for improvements in the quality of the second face image capture event data within the second face profile.
[0088] 303. If the capacity of the second face capture event data in the second face file does not reach the preset capacity, the third preset threshold will be lowered.
[0089] In this embodiment of the invention, lowering the third preset threshold can allow more second face capture event data to be archived, thereby expanding the amount of second face capture event data in the second face archive.
[0090] 304. If the capacity of the second face capture event data in the second face file has reached the preset capacity, then the third preset threshold is adjusted upward or maintained.
[0091] In this embodiment of the invention, increasing the third preset threshold can improve the archiving quality of the second face capture event data in the second face archive; at the same time, after the second face archive adopts a higher quality cover for the second face capture event data, maintaining the third preset threshold can also improve the archiving quality of the second face capture event data in the second face archive.
[0092] In this embodiment of the invention, second face shooting event data suitable for use as the cover of second face shooting event data in the second face archive can be selected from the first face archive, thereby improving the quality of the second face shooting event data in the second face archive.
[0093] In one possible embodiment, after the first face cover feature data of the first face file is changed, all second face shooting event data in the first face file are compared with the changed first face cover feature data to obtain a first comparison score between the second face shooting event data and the first face cover feature data. Then, the N second face shooting event data with the highest first comparison score are determined again, and the second face shooting event data cover of the second face file is updated based on the N highest second face shooting event data.
[0094] In one possible embodiment, during the second archiving operation, the second facial feature value in the second face capture event data can be further extracted to obtain a third facial feature value. Similarly, when creating or updating the cover of the second face capture event data in the second face archive, the second facial feature value in the second face capture event data corresponding to the cover can be further extracted to obtain the corresponding second cover facial feature value. The feature extraction in the second archiving operation and the feature extraction during the creation or updating of the cover of the second face capture event data in the second face archive use the same feature extraction algorithm. In this embodiment of the invention, by extracting features from the second facial feature value of the second face capture event data during the second archiving operation, and also extracting features from the second facial feature value during the creation or updating of the cover of the second face capture event data, the implicit features of the second face capture event data can be further increased, making the second face capture event data in the second face archive more distinguishable from the first face capture event data in the first face archive, without altering the second face capture event data in the first face archive.
[0095] It should be noted that the face archiving method provided in this embodiment of the invention can be applied to devices such as smartphones, computers, and servers that are capable of data archiving.
[0096] Optional, please see Figure 4 , Figure 4 This is a structural schematic diagram of a face archiving device provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the device includes:
[0097] The acquisition module 401 is used to acquire face shooting event data to be archived. The face shooting event data includes first face shooting event data captured in a non-preset scene and second face shooting event data captured in a preset scene. The face shooting event data to be archived has structured face feature data.
[0098] The first archiving module 402 is used to perform a first archiving operation on the face shooting event data to be archived based on the structured face feature data. The first archiving operation is used to archive the first face shooting event data and the second face shooting event data.
[0099] The second archiving module 403 is used to perform a second archiving operation on the second face shooting event data based on the structured face feature data under preset scene archiving conditions if the first archiving operation fails. The second archiving operation is only used to archive the second face shooting event data.
[0100] Optional, such as Figure 5 As shown, the first archiving module 402 includes:
[0101] The first comparison unit 4021 is used to compare the structured face feature data with the first face cover feature data in the preset first face file to obtain the first comparison score between the face shooting event data to be archived and the first face cover feature data.
[0102] The first archiving unit 4022 is used to archive the face shooting event data to be archived into the first face file if the first comparison score is greater than or equal to the first preset threshold.
[0103] Optional, such as Figure 6 As shown, the first archiving module 402 further includes:
[0104] The first judgment unit 4023 is used to determine whether the face shooting event data to be archived is the first face shooting event data based on the structured face information if the first comparison score is greater than or equal to a preset second preset threshold. The second preset threshold is greater than the first preset threshold.
[0105] The second judgment unit 4024 is used to determine whether the quality score of the face shooting event data to be archived is greater than or equal to the quality score of the first face cover feature data if the face shooting event data to be archived is the first face shooting event data.
[0106] The replacement unit 4025 is used to replace the first face cover feature data with the face shooting event data to be archived if the quality score of the face shooting event data to be archived is greater than or equal to the quality score of the first face cover feature data.
[0107] Optional, such as Figure 7 As shown, the second archiving module 403 includes:
[0108] The third judgment unit 4031 is used to determine whether the face shooting event data to be archived is the second face shooting event data based on the structured face information if the first archiving operation fails.
[0109] The second comparison unit 4032 is used to compare the structured face information with the cover of the second face shooting event data under a preset scene archiving condition if the face shooting event data to be archived is the second face shooting event data, and obtain the second comparison score of the face shooting event data to be archived and the second face cover feature data.
[0110] The second archiving unit 4033 is used to archive the face shooting event data to be archived into the second face file if the second comparison score is greater than or equal to a preset third preset threshold.
[0111] Optionally, the structured face information of the second face capture event data also includes binding information between the first scene and the face, and the second face file includes binding information between the second scene and the face. The preset scene archiving condition is that the binding information between the first scene and the face corresponds to the binding information between the second scene and the face in the second face file. The second comparison unit 4032 is also used to compare the structured face information with the cover of the second face capture event data under the condition that the binding information between the first scene and the face corresponds to the binding information between the second scene and the face.
[0112] Optionally, the second archiving module 403 is further configured to select the N second face shooting event data with the highest first comparison score with the first face cover feature data in the first face file as the second face cover feature data of the second face file.
[0113] Optional, such as Figure 8 As shown, the second archiving module 403 further includes:
[0114] The fourth judgment unit 4034 is used to determine whether the capacity of the second face shooting event data in the second face file has reached the preset capacity when the second face cover feature data of the second face file changes.
[0115] The first adjustment unit 4035 is used to lower the third preset threshold if the capacity of the second face shooting event data in the second face file does not reach the preset capacity.
[0116] The second adjustment unit 4036 adjusts or maintains the third preset threshold if the capacity of the second face shooting event data in the second face file has reached the preset capacity.
[0117] It should be noted that the face archiving device provided in this embodiment of the invention can be applied to devices such as smartphones, computers, and servers that can perform data archiving and analysis.
[0118] The face archiving device provided in this embodiment of the invention can implement all the processes implemented by the face archiving method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0119] See Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 9 As shown, it includes: a memory 902, a processor 901, and a computer program for a face archiving method stored in the memory 902 and executable on the processor 901, wherein:
[0120] The processor 901 is used to call the computer program stored in the memory 902 and execute the following steps:
[0121] Acquire face capture event data to be archived. The face capture event data includes first face capture event data captured in a non-preset scene and second face capture event data captured in a preset scene. The face capture event data to be archived has structured face feature data.
[0122] A first archiving operation is performed on the face shooting event data to be archived based on the structured face feature data. The first archiving operation is used to archive the first face shooting event data and the second shooting first face shooting event data.
[0123] If the first archiving operation fails, a second archiving operation is performed on the second face shooting event data based on the structured face feature data under the preset scene archiving conditions. The second archiving operation is only used to archive the second face shooting event data.
[0124] Optionally, the first archiving operation performed by the processor 901 on the face capture event data to be archived based on the structured face feature data includes:
[0125] The structured facial feature data is compared with the first facial cover feature data in the preset first facial archive to obtain the first comparison score between the facial shooting event data to be archived and the first facial cover feature data.
[0126] If the first comparison score is greater than or equal to the first preset threshold, the face capture event data to be archived will be archived into the first face file.
[0127] Optionally, the face archiving method executed by processor 901 further includes:
[0128] If the first comparison score is greater than or equal to the second preset threshold, then the structured face information is used to determine whether the face shooting event data to be archived is the first face shooting event data, and the second preset threshold is greater than the first preset threshold.
[0129] If the face capture event data to be archived is the first face capture event data, then determine whether the quality score of the face capture event data to be archived is greater than or equal to the quality score of the first face cover feature data;
[0130] If the quality score of the face capture event data to be archived is greater than or equal to the quality score of the first face cover feature data, then the face capture event data to be archived replaces the first face cover feature data.
[0131] Optionally, if the first archiving operation performed by the processor 901 fails, a second archiving operation is performed on the second face capture event data based on the structured face feature data under preset scene archiving conditions, including:
[0132] If the first archiving operation fails, then determine whether the face shooting event data to be archived is the second face shooting event data based on the structured face information.
[0133] If the face shooting event data to be archived is the second face shooting event data, then under the preset scene archiving conditions, the structured face information is compared with the cover of the second face shooting event data to obtain the second comparison score of the face shooting event data to be archived and the feature data of the second face cover.
[0134] If the second comparison score is greater than or equal to the preset third preset threshold, then the face capture event data to be archived is archived into the second face file.
[0135] Optionally, the structured face information of the second face capture event data further includes binding information between a first scene and a face, and the second face profile includes binding information between a second scene and a face. The preset scene archiving condition is that the binding information between the first scene and the face corresponds to the binding information between the second scene and the face in the second face profile. The step of comparing the structured face information with the cover of the second face capture event data under the preset archiving condition of the second face profile, executed by the processor 901, includes:
[0136] Under the condition that the binding information of the first scene and the face corresponds to the binding information of the second scene and the face, the structured face information is compared with the cover of the second face shooting event data.
[0137] Optionally, the second archiving operation performed by the processor 901 on the face capture event data to be archived based on the structured face information further includes:
[0138] The N second face shooting event data with the highest first comparison score with the first face cover feature data in the first face file are selected as the second face cover feature data of the second face file.
[0139] Optionally, the second archiving operation performed by the processor 901 on the archived event based on the structured face information further includes:
[0140] When the second face cover feature data of the second face file changes, determine whether the capacity of the second face shooting event data in the second face file has reached the preset capacity;
[0141] If the data capacity of the second face capture event in the second face file does not reach the preset capacity, the third preset threshold will be lowered.
[0142] If the second face image capture event data capacity in the second face profile has reached the preset capacity, then the third preset threshold is adjusted upwards or maintained.
[0143] It should be noted that the electronic device provided in the embodiments of the present invention can be applied to devices such as smartphones, computers, and servers that can perform data archiving.
[0144] The electronic device provided in this embodiment of the invention can implement all the processes of the face archiving method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0145] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the face archiving method or the application-side face archiving method provided in this invention, and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0146] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0147] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A face archiving method, characterized by, The method comprises the following steps: obtaining face shooting event data to be archived, the face shooting event data comprising first face shooting event data shot in a non-pre-set scene and second face shooting event data shot in a pre-set scene, the face shooting event data to be archived having structured face feature data; performing a first archiving operation on the face shooting event data to be archived according to the structured face feature data, the first archiving operation being used for archiving the first face shooting event data and the second face shooting event data; if the first archiving operation is unsuccessful, performing a second archiving operation on the second face shooting event data according to the structured face feature data under a pre-set scene archiving condition, the second archiving operation being used for archiving only the second face shooting event data; if the first archiving operation is unsuccessful, judging whether the face shooting event data to be archived is second face shooting event data according to the structured face feature data; if the face shooting event data to be archived is judged to be second face shooting event data according to the structured face feature data, comparing the structured face feature data with a second face cover feature data of the second face shooting event data under a pre-set scene archiving condition to obtain a second comparison score of the face shooting event data to be archived and the second face cover feature data; if the second comparison score is greater than or equal to a pre-set third threshold value, archiving the face shooting event data to be archived into a second face archive. the first archiving operation on the face shooting event data to be archived according to the structured face feature data comprises:
2. The face archiving method of claim 1, wherein, comparing the structured face feature data with first face cover feature data in a pre-set first face archive to obtain a first comparison score of the face shooting event data to be archived and the first face cover feature data; if the first comparison score is greater than or equal to a first pre-set threshold value, archiving the face shooting event data to be archived into the first face archive. The face archiving method further comprises:
3. The face archiving method of claim 2, wherein, if the first comparison score is greater than or equal to a pre-set second pre-set threshold value, judging whether the face shooting event data to be archived is first face shooting event data according to the structured face feature data, the second pre-set threshold value being greater than the first pre-set threshold value; if the face shooting event data to be archived is first face shooting event data, judging whether a quality score of the face shooting event data to be archived is greater than or equal to a quality score of the first face cover feature data; if the quality score of the face shooting event data to be archived is greater than or equal to the quality score of the first face cover feature data, replacing the first face cover feature data with the face shooting event data to be archived. 4. The face archiving method of claim 1, wherein, The structured face feature data of the second face shooting event data further comprises binding information of a first scene and a face, the second face archive comprises binding information of a second scene and a face, the preset scene archiving condition is that the binding information of the first scene and the face corresponds to the binding information of the second scene and the face in the second face archive, and the comparison between the structured face feature data and the second face shooting event data cover is performed under the preset scene archiving condition, comprising: The comparison between the structured face feature data and the second face shooting event data cover is performed under the condition that the binding information of the first scene and the face corresponds to the binding information of the second scene and the face.
5. The face archiving method of claim 2 or 3, wherein, The second archiving operation of the face shooting event data to be archived according to the structured face feature data further comprises: Selecting N second face shooting event data with the highest first comparison value of the first face cover feature data in the first face archive as the second face cover feature data of the second face archive.
6. The face archiving method of claim 5, wherein, The second archiving operation of the face shooting event data to be archived according to the structured face feature data further comprises: When the second face cover feature data of the second face archive changes, it is judged whether the second face shooting event data capacity in the second face archive reaches a preset capacity; If the second face shooting event data capacity in the second face archive does not reach the preset capacity, the third preset threshold is adjusted downward; If the second face shooting event data capacity in the second face archive has reached the preset capacity, the third preset threshold is adjusted upward or kept.
7. A face archiving apparatus characterized by comprising: The device comprises: The acquisition module is configured to acquire face shooting event data to be archived, wherein the face shooting event data comprises first face shooting event data shot in a non-pre-set scene and second face shooting event data shot in a pre-set scene, and the face shooting event data to be archived has structured face feature data; The first archiving module is configured to perform a first archiving operation on the face shooting event data to be archived according to the structured face feature data, and the first archiving operation is used for archiving the first face shooting event data and the second face shooting event data; The second archiving module is configured to perform a second archiving operation on the second face shooting event data according to the structured face feature data under a preset scene archiving condition if the first archiving operation is unsuccessful, and the second archiving operation is used for archiving only the second face shooting event data; The second archiving module is configured to perform a second archiving operation on the second face shooting event data according to the structured face feature data under a preset scene archiving condition if the first archiving operation is unsuccessful, and specifically configured to: If the first archiving operation is unsuccessful, it is judged whether the face shooting event data to be archived is second face shooting event data according to the structured face feature data; If the structured face feature data judges the face shooting event data to be archived as second face shooting event data, the structured face feature data is compared with a second face cover feature data under a preset scene archiving condition, and a second comparison score of the face shooting event data to be archived and the second face cover feature data is obtained. If the second comparison score is greater than or equal to a third preset threshold, the face shooting event data to be archived is archived into a second face archive.
8. An electronic device, comprising: Comprise: A memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the face archiving method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps in the face archiving method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Face picture archive processing method and device
CN112446362A