Abnormal face file recognition method, device, electronic device and storage medium
By using the space -time information and similarity analysis of position images in the identification of abnormal face files, the problem of low accuracy in the existing technology has been solved, and higher identification accuracy and lower misjudgment rate have The quality of security monitoring.
Patent Information
- Application Number
- CN202210319963.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-03-29
AI Technical Summary
The accuracy of abnormal face files recognition in the prior art is not high, mainly because the judgment conditions are too simple and the abnormality analysis is not performed using the image content of the face image, resulting in a small range of people's activities and a high misjudgment rate.
By obtaining multiple position images in the file to be identified, it is based on the shooting time and position coordinates of these images to determine whether it is a suspected abnormal file. Determine whether it is an abnormal face file.
Through the dual judgment of time and space conditions and similarity conditions, the probability of misjudgment is reduced, the accuracy of facial file recognition of abnormal people is improved, thereby improving the quality of security monitoring.
Smart Images

Figure CN114898420B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a method, device, electronic device and storage medium for identifying abnormal face files. Background Art
[0002] With the continuous development of society, people's requirements for public safety are also increasing. In the field of security, related technologies often cluster the collected facial data, and gather the face, whole body and other images of the same person together to form a person-based file. The file generally contains multiple images and information such as the acquisition time and location of each image. Through the file, a person's movement trajectory and foothold can be restored, thereby achieving effective tracking and monitoring.
[0003] However, due to the problem of errors in portrait recognition in portrait clustering, non-real face images such as billboard faces and advertising model faces are clustered into the archive. In order to solve the above problems, the existing technology performs quantity judgment, proportion judgment and spatiotemporal information judgment on each person's archive, wherein the quantity judgment is to judge whether the number of face images in the archive exceeds the quantity threshold, the proportion judgment is to judge whether the proportion of the number of face images in the archive in the total number of face images exceeds the proportion threshold, and the spatiotemporal information judgment is to judge whether the spatiotemporal information of any two face images in the archive meets the abnormal conditions. If one of the above judgment conditions is met, the archive is judged as an abnormal archive. However, the judgment conditions in the existing technology are too simple, and the image content in the face image is not used for abnormality analysis. When the activity range of the person is small, the number, proportion, spatiotemporal information, etc. of the face image are very close to the non-real face image, which is easy to produce wrong judgments, resulting in low accuracy of abnormal face archive recognition in the existing technology.
[0004] With respect to the technical problem of low accuracy in the recognition of abnormal facial profiles in the prior art, no effective solution has been proposed so far. Summary of the invention
[0005] In this embodiment, a method, device, electronic device and storage medium are provided to solve the problem of low accuracy of abnormal face file recognition in related technologies.
[0006] In a first aspect, a method for identifying abnormal face files is provided in this embodiment, and the method comprises:
[0007] Acquire a file to be identified, wherein the file to be identified includes a plurality of location images, and the plurality of location images include shooting time and location coordinates;
[0008] Based on the shooting time and position coordinates of at least two of the position images in the file to be identified, determining whether the file to be identified is a suspected abnormal file;
[0009] If the file to be identified is a suspected abnormal file, the similarity between at least two groups of position images in the suspected abnormal file is obtained, and based on the similarity, it is determined whether the suspected abnormal file is an abnormal face file.
[0010] In some embodiments, judging whether the file to be identified is a suspected abnormal file based on the shooting time and position coordinates of at least two position images in the file to be identified includes:
[0011] Acquire the moving speed of the object to be identified based on the shooting time of at least two of the position images and the corresponding position coordinates;
[0012] The moving speed is compared with a speed threshold, and if the moving speed exceeds the speed threshold, the file to be identified is determined to be a suspected abnormal file.
[0013] In some embodiments, judging whether the file to be identified is a suspected abnormal file based on the shooting time and position coordinates of at least two position images in the file to be identified includes:
[0014] Obtaining the number of location images in the to-be-identified file;
[0015] comparing the number of the position images to a number threshold;
[0016] If the number of the location images is greater than the number threshold, whether the file to be identified is a suspected abnormal file is determined based on the shooting time and location coordinates of at least two of the location images.
[0017] In some embodiments, before obtaining the similarity between at least two groups of position images in the suspected abnormality file, the method further includes:
[0018] Acquire a plurality of position images within a first preset time period and a second preset time period respectively;
[0019] The plurality of position images are divided into a first image group and a second image group based on acquisition time.
[0020] In some embodiments, before obtaining the similarity between at least two groups of position images in the suspected abnormality file, the method further includes:
[0021] Acquire a plurality of location images at a first preset location and a second preset location respectively;
[0022] The plurality of position images are divided into a first image group and a second image group based on the acquisition location.
[0023] In some embodiments, obtaining the similarity between at least two groups of position images in the suspected abnormal file, and judging whether the suspected abnormal file is an abnormal face file based on the similarity includes:
[0024] Obtaining a first average characteristic value of the first image group, and obtaining a second average characteristic value of the second image group;
[0025] Obtaining a similarity based on the first average eigenvalue and the second average eigenvalue;
[0026] The similarity is compared with a similarity threshold, and if it exceeds the similarity threshold, the suspected abnormal file is an abnormal face file.
[0027] In some embodiments, before obtaining the to-be-identified file, the process further includes:
[0028] Cluster multiple location images to obtain multiple face files.
[0029] In a second aspect, in this embodiment, a device for identifying abnormal face files is provided, comprising:
[0030] An acquisition module, used for acquiring a file to be identified, wherein the file to be identified includes a plurality of location images, and the plurality of location images include shooting time and location coordinates;
[0031] A first judgment module, used to judge whether the file to be identified is a suspected abnormal file based on the shooting time and position coordinates of at least two position images in the file to be identified;
[0032] The second judgment module is used for obtaining the similarity between at least two groups of position images in the suspected abnormal file if the file to be identified is a suspected abnormal file, and judging whether the suspected abnormal file is an abnormal face file based on the similarity.
[0033] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the abnormal facial profile recognition method described in the first aspect is implemented.
[0034] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the abnormal face profile recognition method described in the first aspect is implemented.
[0035] Compared with the related art, the abnormal face file recognition method, device, electronic device and storage medium provided in this embodiment obtain a file to be recognized, wherein the file to be recognized includes multiple position images, and the multiple position images include shooting time and position coordinates; based on the shooting time and position coordinates of at least two of the position images in the file to be recognized, it is judged whether the file to be recognized is a suspected abnormal file; if the file to be recognized is a suspected abnormal file, the similarity between at least two groups of position images in the suspected abnormal file is obtained, and based on the similarity, it is judged whether the suspected abnormal file is an abnormal face file. The file to be recognized is judged under dual conditions of time and space conditions and similarity conditions, and the position image is analyzed through image content information, which solves the technical problem of low accuracy of abnormal face file recognition, reduces the probability of misjudgment, improves the accuracy of abnormal face file recognition, and thus improves the quality of security monitoring.
[0036] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0038] Figure 1 It is a hardware structure block diagram of a terminal of an abnormal face file recognition method according to an embodiment of the present invention;
[0039] Figure 2 It is a flowchart of an abnormal face file recognition method according to an embodiment of the present invention;
[0040] Figure 3 It is a structural block diagram of an abnormal face file recognition device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0042] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0043] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the abnormal face file recognition method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0044] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the abnormal face archive recognition method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0045] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0046] For example, due to the possibility of misidentification in the existing portrait clustering technology, non-real face images are clustered into the archive. These non-real face images have no analytical significance for monitoring and will reduce the recognition effect. At the same time, since the position of non-real face images is generally fixed, they are easily captured repeatedly, resulting in too many images in the archive, which puts great pressure on the computing performance and storage space of the entire clustering system.
[0047] In the prior art, it is generally judged whether the archive contains non-real face images by the number, proportion, spatiotemporal information, etc. of the images in the archive. However, when the activity range of the captured object is small, a large number of captured images will also be generated, and their number, proportion, and spatiotemporal information are very close to those of non-real face images. Therefore, judging only by the number, proportion, spatiotemporal information, etc. is likely to result in erroneous judgment results. Based on this, the present invention provides an abnormal face archive recognition method to solve the problems in the prior art.
[0048] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of an abnormal face file recognition method according to an embodiment of the present invention. In this embodiment, the abnormal face file recognition method includes:
[0049] S202: Acquire a file to be identified, where the file to be identified includes a plurality of location images, and the plurality of location images include shooting time and location coordinates.
[0050] Exemplarily, a file to be identified is obtained, wherein the file to be identified is a pre-established file corresponding to each object to be identified, and each position image in the file to be identified includes the capture time and position coordinates for subsequent spatiotemporal analysis.
[0051] Specifically, the file to be identified in this embodiment may also include image features of each position image. In the subsequent identification process, the image features of the position image can be directly obtained from the memory without the need for real-time image feature extraction. Furthermore, the file to be identified may also include overall fused image features, which can be used as the average features of the file to be identified, so as to directly compare the image features of the acquired position image with the fused image features, without the need to compare them one by one with all the position images in the file to be identified.
[0052] S204: Based on the shooting time and position coordinates of at least two position images in the file to be identified, determine whether the file to be identified is a suspected abnormal file.
[0053] Exemplarily, each location image in the file to be identified contains the corresponding shooting time and location coordinates. At least two location images in the file to be identified are randomly obtained, and based on the shooting time and location coordinates of the location images, it is determined whether there is an abnormality in the spatiotemporal information of the object to be identified in the location images. If there is an abnormality, the file to be identified is determined as a suspected abnormal file.
[0054] In one specific embodiment, if the difference in the position coordinates of the object to be identified within a short period of time is too large, it indicates that there is an abnormality in the movement trajectory of the object to be identified, and the file to be identified can be determined as a suspected abnormal file; in another specific embodiment, if the time span during which the object to be identified is in a smaller position range is too long, it indicates that the captured object to be identified may be a stationary billboard, etc., and the file to be identified can be determined as a suspected abnormal file.
[0055] S206: If the file to be identified is a suspected abnormal file, the similarity between at least two groups of position images in the suspected abnormal file is obtained, and based on the similarity, it is determined whether the suspected abnormal file is an abnormal face file.
[0056] Exemplarily, if the file to be identified is determined to be a suspected abnormal file, at least two groups of position images in the suspected abnormal file are randomly obtained, and the similarity between the position images is calculated, and whether the suspected abnormal file is an abnormal face file is further determined by similarity judgment. Among them, each group of position images can be a single position image or multiple position images. Specifically, the image features of the position images are obtained, and the similarity between the image features of the position images is calculated, and whether the suspected abnormal file is an abnormal face file is further determined by whether the similarity reaches a threshold condition.
[0057] It should be noted that the similarity in this embodiment refers to the numerical value of the degree of approximation between position images. Since the degree of deviation between position images can also be used to infer the degree of approximation between position images, the solution of judging whether a suspected abnormal file is an abnormal face file by the degree of deviation between position images is also within the scope of protection of this embodiment.
[0058] This embodiment obtains a file to be identified, which includes multiple position images, and the multiple position images include shooting time and position coordinates; based on the shooting time and position coordinates of at least two position images in the file to be identified, it is judged whether the file to be identified is a suspected abnormal file; if the file to be identified is a suspected abnormal file, the similarity between at least two groups of position images in the suspected abnormal file is obtained, and based on the similarity, it is judged whether the suspected abnormal file is an abnormal face file. The file to be identified is judged under dual conditions of time and space conditions and similarity conditions, and the position images are analyzed through image content information, which solves the technical problem of low accuracy in abnormal face file identification, reduces the probability of misjudgment, improves the accuracy of abnormal face file identification, and thus improves the quality of security monitoring.
[0059] In another embodiment, based on the shooting time and position coordinates of at least two position images in the file to be identified, determining whether the file to be identified is a suspected abnormal file includes:
[0060] Step 1: Obtain the moving speed of the object to be identified based on the shooting time and corresponding position coordinates of at least two position images;
[0061] Step 2: Compare the moving speed with the speed threshold. If it exceeds the speed threshold, the file to be identified is determined to be a suspected abnormal file.
[0062] Exemplarily, the shooting time and position coordinates of at least two position images are obtained, and the moving speed of the object to be identified is determined by the shooting time and the position coordinates. The moving speed can be the coordinate change per unit time, such as the change in the longitude and latitude coordinates per unit time, or the moving distance per unit time, such as the change in the physical distance actually moved per unit time. The moving speed is compared with a preset speed threshold. If the moving speed exceeds the speed threshold, the file to be identified is determined to be a suspected abnormal file. It can be understood that within a preset time range, the movement speed of the object to be identified or the moving speed through a vehicle has a certain upper limit, so the position of the object to be identified should be within a certain range of variation. If it exceeds this range, it indicates that there is a high probability that there is a non-real object in the objects to be identified in the two position images, and at this time, there may be a position image containing a non-real object in the file to be identified.
[0063] It is understandable that since non-real objects are usually static objects such as faces on billboards, and in practice, billboards and the like are usually placed in a certain amount, they will be captured repeatedly in multiple places. When two objects to be identified that are too far apart are captured within a certain time range, since the objects to be identified generally cannot pass through these two places within a short period of time, the objects to be identified are likely to be non-real objects. Based on this, the moving speed can be used to determine whether the object to be identified is a non-real object.
[0064] In one specific embodiment, the shooting time and position coordinates of all position images in the to-be-identified file are obtained, and the moving speed of the to-be-identified object is calculated. Specifically, the position images are sorted according to the shooting time, and two position images in the sequence are randomly obtained, as well as the longitude and latitude coordinates (X1, Y1), (X2, Y2) and shooting times T1, T2 corresponding to the two position images. The calculation formula for the distance of the to-be-identified object is:
[0065] D=Radius*arccos(sin(X1)*sin(X2)+cos(X1)*cos(X2)*cos(Y1-Y2))
[0066] Where Radius is the radius of the earth. In another specific embodiment, the distance of the object to be identified can be calculated by the haversine formula. After obtaining the distance of the object to be identified during the shooting time period, the moving speed of the object to be identified is further calculated:
[0067]
[0068] If the moving speed is greater than the speed threshold, the file to be identified is determined to be a suspected abnormal file.
[0069] Optionally, the spatiotemporal analysis method in the present invention is not limited to the analysis by moving speed in this embodiment, and other spatiotemporal analysis methods are also within the protection scope of the present invention. For example, if position images of the same object at different locations are captured at the same time point, it indicates that the object is likely to be a non-real object.
[0070] This embodiment obtains the moving speed of the object to be identified based on the shooting time of at least two position images and the corresponding position coordinates; compares the moving speed with the speed threshold, and if it exceeds the speed threshold, determines that the file to be identified is a suspected abnormal file. The moving speed of the object to be identified is determined by the shooting time and position coordinates of the position image, and whether the file to be identified is a suspected abnormal file is determined by the moving speed. The calculation method is simple and does not require complex spatiotemporal information analysis, thereby reducing the calculation cost of abnormal face file recognition, and more intuitively reflects the position change mode of the object to be identified, thereby improving the recognition efficiency.
[0071] In another embodiment, based on the shooting time and position coordinates of at least two position images in the file to be identified, determining whether the file to be identified is a suspected abnormal file includes:
[0072] Step 1: Obtain the number of location images in the archive to be identified;
[0073] Step 2: Compare the number of location images with the number threshold;
[0074] Step 3: If the number of location images is greater than the number threshold, determine whether the file to be identified is a suspected abnormal file based on the shooting time and location coordinates of at least two location images.
[0075] Exemplarily, the location images in the file to be identified are counted, the number of location images is obtained and compared with a preset number threshold. If the number of location images is greater than the number threshold, it is further determined whether the file to be identified is a suspected abnormal file through spatiotemporal information; if the number of location images is less than the number threshold, it is determined that the file to be identified is a suspected abnormal file.
[0076] It is understandable that since non-real objects such as billboards and advertising models are generally in an absolutely static state and are placed in large quantities in multiple locations, a large number of repeated position images will be captured. However, real human objects are generally in a state of motion, or a mixed state of a short static state and a dynamic state. There are very few absolutely static states, so fewer position images are captured. Based on this, by performing a threshold judgment on the number of position images of the files to be identified, it can be determined that there may be files to be identified that are non-real objects.
[0077] This embodiment obtains the number of position images in the file to be identified; compares the number of position images with the number threshold; if the number of position images is greater than the number threshold, it is determined whether the file to be identified is a suspected abnormal file based on the shooting time and position coordinates of at least two position images. By making a threshold judgment on the number of position images in the file to be identified, a preliminary screening of the files to be identified is achieved to quickly filter out files to be identified that may be abnormal, thereby narrowing the analysis scope for the subsequent identification process, eliminating the need to perform spatiotemporal analysis on all files to be identified, and reducing the computational cost of abnormal face file identification, thereby improving identification efficiency.
[0078] In another embodiment, before obtaining the similarity between at least two groups of position images in the suspected abnormality file, the method further includes:
[0079] Step 1: Acquire a plurality of position images within a first preset time period and a second preset time period respectively;
[0080] Step 2: Divide the plurality of position images into a first image group and a second image group based on the acquisition time.
[0081] Exemplarily, a first preset time period and a second preset time period are set respectively, and a plurality of position images within the first preset time period and the second preset time period are acquired, and further divided into a first image group and a second image group according to the acquired preset time period. The first preset time period and the second preset time period can be set based on actual needs.
[0082] It is understandable that by performing a similarity comparison between the first image group and the second image group, the influence of accidental events in the individual image comparison on the result can be reduced. The more position images there are in the first image group and the second image group, the lower the probability of error in the recognition result, but the higher the computational cost. In practical applications, it can be set based on specific needs.
[0083] Specifically, the first preset time period may be the same as or different from the second preset time period. Preferably, the first preset time period is the same as the second preset time period to reduce the influence of light, weather, etc. in different time periods on the imaging effect of the position image. In one specific embodiment, a stratified sampling method is adopted to randomly obtain a preset number of position images every hour, and the position images obtained by each layer of sampling are divided into a first image group and a second image group. In the subsequent recognition process, the average feature value of the first image group and the average feature value of the second image group are calculated respectively, and then the similarity between the first image group and the second image group is calculated.
[0084] In another embodiment, before obtaining the similarity between at least two groups of position images in the suspected abnormality file, the method further includes:
[0085] Step 1: Acquire a plurality of location images at a first preset location and a second preset location respectively;
[0086] Step 2: Divide the plurality of location images into a first image group and a second image group based on the acquisition location.
[0087] Exemplarily, a first preset location and a second preset location are set respectively, and multiple location images of the first preset location and the second preset location are acquired, and then divided into a first image group and a second image group according to the acquired preset locations. The first preset location and the second preset location can be set based on actual needs. It can be understood that by performing a similarity comparison between the first image group and the second image group, the influence of accidental events in the individual image comparison on the result can be reduced.
[0088] Specifically, the first preset location may be the same as or different from the second preset location. Preferably, the first preset location is the same as the second preset location to reduce the impact of different shooting conditions on the location image. In one specific embodiment, a preset number of location images of each capture location are randomly acquired, and the acquired location images are divided into a first image group and a second image group. In the subsequent recognition process, the average feature value of the first image group and the average feature value of the second image group are calculated respectively, and then the similarity between the first image group and the second image group is calculated.
[0089] It can be understood that the methods of establishing the first image group and the second image group in the above two embodiments are only examples, and the methods of establishing the first image group and the second image group in the present invention are not limited thereto. For example, a preset number of position images in the suspected abnormality file are obtained by random sampling and divided into the first image group and the second image group.
[0090] In another embodiment, obtaining the similarity between at least two groups of position images in the suspected abnormal file, and judging whether the suspected abnormal file is an abnormal face file based on the similarity includes:
[0091] Step 1: obtaining a first average characteristic value of a first image group, and obtaining a second average characteristic value of a second image group;
[0092] Step 2: Obtain similarity based on the first average eigenvalue and the second average eigenvalue;
[0093] Step 3: Compare the similarity with the similarity threshold. If it exceeds the similarity threshold, the suspected abnormal file is an abnormal face file.
[0094] Exemplarily, a first average eigenvalue of the first image group and a second average eigenvalue of the second image group are obtained respectively. The first average eigenvalue and the second average eigenvalue are calculated for similarity to obtain the similarity between the first image group and the second image group, and the similarity is compared with a preset similarity threshold. If the similarity exceeds the similarity threshold, it indicates that the suspected abnormal file is an abnormal face file. It can be understood that since non-real objects are generally static and identical objects, their similarity is very high. Based on this, the higher the similarity, the higher the possibility that the object to be identified in the position image is a non-real object. By judging the threshold of the similarity, it can be determined whether the suspected abnormal file contains a position image of a non-real object.
[0095] In one specific embodiment, the image features of each image in the image group are obtained and averaged to obtain the average eigenvalue of the image group. In another specific embodiment, all images in the image group are taken as input in the order of shooting time, and the overall image features of the image group are directly obtained as the average eigenvalue. The average eigenvalue of the image group may be an eigenvalue matrix.
[0096] Optionally, the randomly sampled location images may also be divided into more than two image groups, and the similarities between any two image groups may be counted and summarized to obtain the total similarity between the multiple image groups, and whether the suspected abnormal file is an abnormal face file may be determined based on the total similarity.
[0097] This embodiment obtains the first average eigenvalue of the first image group and the second average eigenvalue of the second image group; obtains the similarity based on the first average eigenvalue and the second average eigenvalue; compares the similarity with the similarity threshold, and if the similarity threshold is exceeded, the suspected abnormal file is an abnormal face file. By obtaining the first average eigenvalue of the first image group and the second average eigenvalue of the second image group, and then calculating the similarity and performing a similarity threshold judgment to determine whether the suspected abnormal file is an abnormal face file, the influence of accidental events in a single image comparison on the result is reduced, and the accuracy of abnormal face file recognition is improved.
[0098] In another embodiment, the similarity is cosine similarity.
[0099] Exemplarily, the similarity includes but is not limited to cosine similarity, wherein cosine similarity refers to the similarity between vectors evaluated by the cosine value of the angle between two vectors.
[0100] In one specific embodiment, after obtaining the first average eigenvalue M of the first image group and the second average eigenvalue N of the second image group, the cosine similarity between the first image group and the second image group is calculated:
[0101]
[0102] Wherein, M·N represents the dot product of the first average eigenvalue M and the second average eigenvalue N, and ||M||*||N|| represents the L2 norm multiplication of the first average eigenvalue M and the second average eigenvalue N, wherein the L2 norm is the square root of the sum of the square values of all elements in the vector. The value range of cosine similarity is [-1, 1]. The larger the value, the greater the similarity between the first image group and the second image group. After obtaining the cosine similarity, the cosine similarity is compared with the pre-set similarity threshold. If the pre-similarity exceeds the similarity threshold, the suspected abnormal file is determined as an abnormal face file.
[0103] It can be understood that the cosine similarity in this embodiment is only used as an example, and the similarity in the present invention may also be other similarities such as distance similarity, etc. Specifically, the distance similarity between the first image group and the second image group is determined by the L1 norm.
[0104] In another embodiment, before obtaining the to-be-identified file, the method further includes:
[0105] Cluster multiple location images to obtain multiple face files.
[0106] Exemplarily, after acquiring multiple position images, a face file corresponding to each object to be identified is established through a clustering algorithm.
[0107] Specifically, the archive to be identified is a set of location images corresponding to each category of the object to be identified, which is formed by clustering. In one specific embodiment, the trajectory data of the object to be identified within a preset time range and a preset space range is obtained, for example, the trajectory (A1, A2, A3, A4, A5) generated by the object to be identified within a certain area on the same day, and each trajectory point includes a location image and corresponding shooting time, location coordinates and other information. According to the time sequence of the trajectory points, the location image of the object to be identified is respectively compared with the previously saved archives for similarity. For example, the image features of the location image of the trajectory point A1 are obtained, and the similarity is calculated with the image features of all saved archives. If the similarity between the image features of the location image of the trajectory point A1 and the image features of the A archive meets the preset threshold condition, the trajectory point A1 is incorporated into the A archive; if the similarity between the image features of the location image of the trajectory point A1 and the image features of all archives does not meet the threshold condition, a new archive B is created, and the trajectory point A1 is incorporated into the archive B. Repeat the above process until all trajectory points of all objects to be identified are incorporated into the archive.
[0108] It can be understood that since all objects to be identified correspond to one or more archives, all subsequent identification steps can be operated based on the fused image features of the location images in the archives, rather than on separate images, which greatly reduces the computational cost.
[0109] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0110] In this embodiment, an abnormal face profile recognition device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0111] Figure 3 FIG. 1 is a structural block diagram of an abnormal face file recognition device according to an embodiment of the present invention. Figure 3 As shown, the device comprises:
[0112] The acquisition module 10 is used to acquire the file to be identified, the file to be identified includes a plurality of location images, and the plurality of location images include shooting time and location coordinates;
[0113] A first judgment module 20, for judging whether the file to be identified is a suspected abnormal file based on the shooting time and position coordinates of at least two position images in the file to be identified;
[0114] The first judgment module 20 is further used to obtain the moving speed of the object to be identified based on the shooting time of at least two position images and the corresponding position coordinates;
[0115] Compare the moving speed with the speed threshold, and if it exceeds the speed threshold, determine that the file to be identified is a suspected abnormal file;
[0116] The first determination module 20 is further used to obtain the number of location images in the file to be identified;
[0117] comparing the number of position images to a number threshold;
[0118] If the number of location images is greater than the number threshold, determining whether the file to be identified is a suspected abnormal file based on the shooting time and location coordinates of at least two location images;
[0119] The second judgment module 30 is used for obtaining the similarity between at least two groups of position images in the suspected abnormal file if the file to be identified is a suspected abnormal file, and judging whether the suspected abnormal file is an abnormal face file based on the similarity;
[0120] The second judgment module 30 is further used to obtain a first average characteristic value of the first image group and to obtain a second average characteristic value of the second image group;
[0121] Obtaining a similarity based on the first average eigenvalue and the second average eigenvalue;
[0122] The similarity is compared with the similarity threshold. If the similarity threshold is exceeded, the suspected abnormal file is an abnormal face file;
[0123] The abnormal face file recognition device also includes a first establishment module;
[0124] A first establishing module, used to obtain a plurality of position images within a first preset time period and a second preset time period respectively;
[0125] dividing the plurality of position images into a first image group and a second image group;
[0126] The abnormal face file recognition device also includes a second establishment module;
[0127] A second establishing module is used to obtain a plurality of location images at the first preset location and the second preset location respectively;
[0128] dividing the plurality of position images into a first image group and a second image group;
[0129] The abnormal face profile recognition module also includes a clustering module;
[0130] The clustering module is used to cluster multiple location images to obtain multiple face files.
[0131] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0132] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0133] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0134] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0135] S1, obtaining a file to be identified, the file to be identified includes multiple location images, and the multiple location images include shooting time and location coordinates;
[0136] S2, judging whether the file to be identified is a suspected abnormal file based on the shooting time and position coordinates of at least two position images in the file to be identified;
[0137] S3, if the file to be identified is a suspected abnormal file, the similarity between at least two groups of position images in the suspected abnormal file is obtained, and based on the similarity, it is determined whether the suspected abnormal file is an abnormal face file.
[0138] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0139] In addition, in combination with the abnormal face file recognition method provided in the above embodiment, a storage medium can also be provided in this embodiment to implement the abnormal face file recognition method. The storage medium stores a computer program; when the computer program is executed by the processor, any abnormal face file recognition method in the above embodiment is implemented.
[0140] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0141] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0142] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0143] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A method for identifying abnormal face files, characterized in that: The method comprises: Acquire a file to be identified, wherein the file to be identified includes a plurality of location images, and the plurality of location images include shooting time and location coordinates; Based on the shooting time and position coordinates of at least two of the position images in the file to be identified, determining whether the file to be identified is a suspected abnormal file; If the file to be identified is a suspected abnormal file, then the similarity between at least two groups of the position images in the suspected abnormal file is obtained, and based on the similarity, it is determined whether the suspected abnormal file is an abnormal face file; the abnormal face file is a file composed of face images of non-real objects; Acquiring the similarity between at least two groups of position images in the suspected abnormality file comprises: randomly acquiring at least two groups of position images in the suspected abnormality file, and calculating the similarity between the at least two groups of position images; The determining whether the file to be identified is a suspected abnormal file based on the shooting time and the position coordinates of at least two position images in the file to be identified comprises: Acquire the moving speed of the object to be identified based on the shooting time of at least two of the position images and the corresponding position coordinates; The moving speed is compared with a speed threshold, and if the moving speed exceeds the speed threshold, the file to be identified is determined to be a suspected abnormal file.
2. The abnormal face file recognition method according to claim 1, characterized in that: Before obtaining the similarity between at least two groups of position images in the suspected abnormality file, the method further includes: Acquire a plurality of position images within a first preset time period and a second preset time period respectively; The plurality of position images are divided into a first image group and a second image group based on acquisition time.
3. The abnormal face file recognition method according to claim 1, characterized in that: Before obtaining the similarity between at least two groups of position images in the suspected abnormality file, the method further includes: Acquire a plurality of location images at a first preset location and a second preset location respectively; The plurality of position images are divided into a first image group and a second image group based on the acquisition location.
4. The abnormal face file recognition method according to claim 2 or 3, characterized in that: The obtaining of the similarity between at least two groups of position images in the suspected abnormal file, and judging whether the suspected abnormal file is an abnormal face file based on the similarity comprises: Obtaining a first average characteristic value of the first image group, and obtaining a second average characteristic value of the second image group; Obtaining a similarity based on the first average eigenvalue and the second average eigenvalue; The similarity is compared with a similarity threshold, and if it exceeds the similarity threshold, the suspected abnormal file is an abnormal face file.
5. The abnormal face file recognition method according to claim 4, characterized in that: The step of obtaining the to-be-identified file also includes: Cluster multiple location images to obtain multiple face files.
6. An abnormal face file recognition device, characterized in that: include: An acquisition module, used for acquiring a file to be identified, wherein the file to be identified includes a plurality of location images, and the plurality of location images include shooting time and location coordinates; A first judgment module, used to judge whether the file to be identified is a suspected abnormal file based on the shooting time and position coordinates of at least two position images in the file to be identified; A second judgment module is used for obtaining the similarity between at least two groups of position images in the suspected abnormal file if the file to be identified is a suspected abnormal file, and judging whether the suspected abnormal file is an abnormal face file based on the similarity; The abnormal face file is a file consisting of face images of non-real objects; Acquiring the similarity between at least two groups of position images in the suspected abnormality file comprises: randomly acquiring at least two groups of position images in the suspected abnormality file, and calculating the similarity between the at least two groups of position images; The determining whether the file to be identified is a suspected abnormal file based on the shooting time and the position coordinates of at least two position images in the file to be identified comprises: Acquire the moving speed of the object to be identified based on the shooting time of at least two of the position images and the corresponding position coordinates; The moving speed is compared with a speed threshold, and if the moving speed exceeds the speed threshold, the file to be identified is determined to be a suspected abnormal file.
7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the abnormal face profile recognition method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the abnormal face profile recognition method described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Archives management method, device and electronic device for urban security monitoring
CN109145844A
Face image filtering method, electronic equipment and computer readable storage medium
CN113255621A