A face recognition data processing system for public security practical scenarios

By designing a facial recognition data processing system for real-world public security scenarios, and by evaluating the impact of lighting in real time and optimizing the algorithm, the system solves the problem of recognition accuracy caused by lighting and target movement during outdoor activities, and achieves efficient recognition under complex conditions.

CN118522059BActive Publication Date: 2024-11-05HUNAN POLICE ACAD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410986979.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-05
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

Traditional facial recognition methods for security of large-scale outdoor events struggle to cope with complex and ever-changing lighting conditions and target movement, leading to decreased recognition accuracy and impacting safety and order.

Method used

Design a face recognition data processing system for public security combat scenarios, including a scene data acquisition module, an algorithm optimization module, a face acquisition and recognition module, and an alarm and notification module. By acquiring light data in real time to evaluate the impact of light, the face recognition algorithm is optimized to improve its adaptability to changes in lighting.

Benefits of technology

It effectively improves the accuracy of outdoor facial recognition, ensuring accurate identification even under complex lighting and target movement conditions, thereby enhancing the safety and order of security sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118522059B_ABST
    Figure CN118522059B_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, and discloses a face recognition data processing system for public security actual combat scenes, which is used to solve the problem that light changes and recognition targets are not stationary when face recognition is required in large outdoor activity scenes. The system comprises a scene data acquisition module, an algorithm optimization module, a face acquisition and recognition module, and an alarm and notification module, which acquires light data of the scene environment, evaluates the influence of the current light on face recognition according to the light data, and judges the algorithm optimization according to the evaluated influence. According to the judgment result of the scene data acquisition module, the face recognition algorithm is optimized to improve its adaptability to light changes, and the optimized face recognition algorithm is used to perform face data acquisition and face recognition, and alarm and notification are performed according to the face recognition result, thereby effectively improving the accuracy of outdoor face recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and more specifically to a face recognition data processing system for public security actual combat scenarios. Background Art

[0002] Face recognition technology is a cutting-edge technology for identity authentication or identification based on face images. It fully draws on advanced theories and methods in the fields of computer vision and pattern recognition. Through precise processing and in-depth analysis of face images, it realizes automatic recognition and verification of individual faces. This technology is widely used in many fields, including but not limited to security monitoring, access control, payment authentication, social networks, healthcare, and public security operations.

[0003] However, traditional face recognition methods in large-scale outdoor event security scenarios usually simply obtain face images and perform identity authentication based on the recognized facial features. Actual scenarios often face complex and changeable lighting conditions and target movement. Traditional methods are difficult to maintain high accuracy, which may affect the safety and order of the event site.

[0004] In view of the above problems, the present invention proposes a solution. Summary of the invention

[0005] In order to overcome the above-mentioned defects of the prior art, the present invention provides a face recognition data processing system for public security actual combat scenarios to solve the problems existing in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A face recognition data processing system for public security actual combat scenarios includes a scene data acquisition module, an algorithm optimization module, a face acquisition and recognition module, and an alarm and notification module. The modules are connected by signals. The data processing steps between the modules are as follows:

[0008] The scene data acquisition module is used to collect the light data of the scene environment, evaluate the influence of the current light on face recognition based on the light data, and make judgments on algorithm optimization based on the evaluated influence;

[0009] An algorithm optimization module is used to optimize the face recognition algorithm to improve its adaptability to lighting changes according to the judgment results of the scene data acquisition module, and transmit the optimized face recognition algorithm to the face acquisition and recognition module;

[0010] The face collection and recognition module is used to receive the optimized face recognition algorithm transmitted by the algorithm optimization module, and perform face data collection and face recognition, and transmit the face recognition results to the alarm and notification module;

[0011] The alarm and notification module is used to receive the face recognition results transmitted by the face collection and recognition module, and to issue alarms and notifications based on the face recognition results.

[0012] Preferably, the step of evaluating the influence of current light on face recognition according to light data is:

[0013] The scene environment image is collected in real time by a camera device, and the brightness change rate of the light is calculated according to the collected scene environment image;

[0014] The collected scene environment image is evenly divided into n parts, recorded as sub-environment images, and the light uniformity of the current scene environment image is calculated by the K-means clustering method;

[0015] The light change influence coefficient is calculated based on the brightness change rate and light uniformity, and its calculation formula is: ,in Expressed as the light change influence coefficient, Expressed as the brightness change rate, Expressed as light uniformity;

[0016] Set a detection time period, randomly select m people at the beginning and end of the detection time period to collect face images, calculate the degree of expression change based on the collected face images, and average the degree of expression change of each person to get the average degree of expression change. Calculate the expression change influence coefficient based on the average degree of expression change, and its calculation formula is: ,in It is expressed as the expression change influence coefficient;

[0017] The threshold segmentation method is used to identify the number of light colors in the scene environment image collected in real time, and the color influence coefficient is calculated based on the number of colors. The calculation formula is: ,in Expressed as the color influence coefficient, It means identifying the number of colors in the image;

[0018] The face recognition impact index is calculated based on the light change impact coefficient, expression change impact coefficient and color impact coefficient. The calculation formula is: ,in It is represented by the face recognition impact index, Expressed as the light change influence coefficient, Expressed as the expression change influence coefficient, It is expressed as the color influence coefficient, and a1, a2, and a3 are the weight coefficients of the light change influence coefficient, the expression change influence coefficient, and the color influence coefficient.

[0019] Preferably, the step of judging the algorithm optimization based on the evaluated influence is to compare the face recognition influence index with a preset threshold. If the face recognition influence index is less than the preset threshold, it is determined that the current environment has little influence on face recognition and no face recognition algorithm optimization is required. If the face recognition influence index is greater than the preset threshold, it is determined that the current environment has a large influence on face recognition and the face recognition algorithm is optimized.

[0020] Preferably, the step of calculating the brightness change rate of light according to the collected scene environment image is:

[0021] Obtain continuous image frames, convert the image frames into grayscale images, and calculate the average brightness of each frame;

[0022] Calculate the average brightness change between the current frame and the previous frame. The calculation formula is: ,in Expressed as the average brightness change, Represents the average brightness of the current frame image, It is represented by the average brightness of the previous frame image;

[0023] The brightness change rate is calculated by the ratio of the average brightness change to the brightness of the previous frame. The calculation formula is: ,in Expressed as the brightness change rate, Expressed as the average brightness change, It is expressed as the average brightness of the previous frame.

[0024] Preferably, the step of calculating the light uniformity of the current scene environment image by the K-means clustering method is:

[0025] Step 1: Calculate the average brightness value of each sub-environment image to obtain n brightness feature data points as a data set;

[0026] Step 2: Use the elbow method to determine the number of clusters K;

[0027] Step 3: Randomly select K data points from the data set as the initial cluster centers of clustering, use Euclidean distance to calculate the distance between each data point and each initial cluster center point, and assign the data point to the cluster to which the nearest cluster center belongs, and traverse all data points to obtain the initial cluster clusters;

[0028] Step 4: For each initial cluster, calculate the mean of all data points in the cluster and use the mean as the new cluster center;

[0029] Step 5: Repeat steps 3 and 4 until the cluster center no longer changes, and obtain the final cluster and the final cluster center;

[0030] Step 6: Calculate the compactness of the final cluster. The calculation formula is: ,in It is expressed as compactness, K is the number of clusters, is the jth cluster, represents the i-th data point in the cluster, is the final cluster center of the jth cluster;

[0031] Step 7: Calculate the dispersion of the final cluster. The calculation formula is: ,in Expressed as dispersion, Represented as the number of data points in the jth cluster, is the final cluster center of the jth cluster, Expressed as the overall mean of all data points;

[0032] Step 8: Calculate the light uniformity based on the dispersion and compactness of the final clusters. The calculation formula is: ,in Expressed as light uniformity, Expressed as dispersion, Expressed as compactness, is a constant value.

[0033] Preferably, the step of calculating the degree of expression change based on the collected facial image is:

[0034] Convert the collected photos into grayscale images and perform preprocessing;

[0035] The face image collected at the beginning of the detection period is used as the reference photo, and the face image collected at the end of the detection period is used as the photo to be tested;

[0036] The degree of expression change is calculated based on the brightness values ​​of the reference photo and the photo to be tested. The calculation formula is: ,in It is expressed as the degree of expression change. Expressed as the total number of pixels in the photo, and are the brightness values ​​of the i-th pixel in the reference photo and the photo to be tested, respectively.

[0037] Preferably, the step of identifying the number of light colors in the scene environment image collected in real time by using a threshold segmentation method is:

[0038] Convert the color image to grayscale image and select a threshold value for image segmentation;

[0039] Segment the grayscale image into light area and background area according to the selected threshold;

[0040] Count the number of segmented light areas and estimate the number of light colors on the stage.

[0041] Preferably, the steps of optimizing the face recognition algorithm are:

[0042] Adding illumination normalization processing to the face recognition algorithm, the processing expression is: ,in Represented as the normalized image at position The pixel value of Expressed as the average gray value of the image, Expressed as the standard deviation of the gray value of the image, Represented as the original image at position The pixel value of

[0043] The grayscale value distribution of the image is adjusted by histogram equalization to enhance the contrast of the image. The expression is: ,in Represented as the equalized value of the gray value v, It is expressed as the number of pixels with gray value i, and N is the total number of pixels in the image;

[0044] Add images under different lighting conditions during model training to enhance the model's robustness to light changes, randomly crop and scale images, and perform light compensation on detected images during face recognition.

[0045] Technical effects and advantages of the present invention:

[0046] Collect light data of the scene environment, evaluate the impact of current light on face recognition based on the light data, and judge the algorithm optimization based on the evaluated impact. According to the judgment results of the scene data collection module, optimize the face recognition algorithm to improve its adaptability to lighting changes. Use the optimized face recognition algorithm to collect face data and face recognition, and issue alarms and notifications based on the face recognition results, which effectively improves the accuracy of outdoor face recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is the overall flow chart of the present invention.

[0048] Figure 2 This is a flow chart of the system modules of the present invention. DETAILED DESCRIPTION

[0049] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. In addition, the forms of the various structures recorded in the following embodiments are merely illustrative. The two-factor authentication method based on user information and mobile terminal verification code involved in the present invention is not limited to the various structures recorded in the following embodiments. All other implementations obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0050] The present invention provides a face recognition data processing system for public security actual combat scenarios, such as Figure 2 As shown, it includes scene data acquisition module, algorithm optimization module, face acquisition and recognition module and alarm and notification module. The modules are connected by signals. The data processing steps between the modules are as follows:

[0051] The scene data acquisition module is used to collect the light data of the scene environment, evaluate the influence of the current light on face recognition based on the light data, and make judgments on algorithm optimization based on the evaluated influence;

[0052] In this embodiment, it should be specifically explained that the step of evaluating the influence of the current light on face recognition according to the light data is as follows:

[0053] The scene environment image is collected in real time by a camera device, and the brightness change rate of the light is calculated according to the collected scene environment image;

[0054] The collected scene environment image is evenly divided into n parts, recorded as sub-environment images, and the light uniformity of the current scene environment image is calculated by the K-means clustering method, where K-means clustering is a commonly used unsupervised learning algorithm, which is used to divide the data set into K clusters, so that the similarity between data points within a cluster is as large as possible, while the similarity between data points between clusters is as small as possible;

[0055] The light change influence coefficient is calculated based on the brightness change rate and light uniformity, and its calculation formula is: ,in Expressed as the light change influence coefficient, It is expressed as the brightness change rate. The larger the brightness change rate, the more drastic the light change is, and the greater the impact on face recognition. It is expressed as light uniformity. The greater the light uniformity, the more uniform the light distribution is, and the less impact it has on face recognition.

[0056] Set the detection time period, randomly select m people to collect face images at the beginning and end of the detection time period, calculate the degree of expression change based on the collected face images, and calculate the average degree of expression change of each person to get the average degree of expression change. The calculation formula is: ,in Expressed as the average degree of expression change, It represents the degree of expression change of the rth person. The expression change influence coefficient is calculated according to the average expression change degree. The calculation formula is: ,in It is expressed as the expression change influence coefficient;

[0057] The threshold segmentation method is used to identify the number of light colors in the scene environment image collected in real time, and the color influence coefficient is calculated based on the number of colors. The calculation formula is: ,in Expressed as the color influence coefficient, Indicated as identifying the number of colors in an image, the threshold segmentation method is a commonly used image segmentation method, which is based on comparing the grayscale value of image pixels with a preset threshold value to segment the image into different regions. This method is usually used to separate the target object from the background in an image, or to divide the image into different components for subsequent analysis and processing;

[0058] The face recognition impact index is calculated based on the light change impact coefficient, expression change impact coefficient and color impact coefficient. The calculation formula is: ,in It is represented by the face recognition impact index, It is expressed as the light change influence coefficient. The influence of light condition changes on face recognition is positively correlated. When the light change influence coefficient increases, it means that the light condition changes are more significant or complex, which may lead to a decrease in the performance of the face recognition system. Therefore, the face recognition influence index will also increase accordingly. It is expressed as the expression change influence coefficient, which indicates the degree of influence of expression change on face recognition. When the expression changes greatly, it may cause the facial features to change, making it difficult for the face recognition system to accurately recognize the user. Suppose in a face recognition system, a user's expression changes greatly, such as from a normal expression to a laughing expression. This expression change may cause a significant change in the key features of the face image, making it difficult for the face recognition system to accurately recognize the user. It is expressed as the color influence coefficient. The change of color may affect the quality of the image and the performance of the facial features, thereby affecting the performance of the face recognition system. Assume that in a face recognition system, the color of the image is affected by strong light, resulting in low color saturation and unstable hue of the image. In this case, the face recognition system may be greatly affected and the recognition accuracy may decrease. a1, a2, and a3 are expressed as the weight coefficients of the light change influence coefficient, the expression change influence coefficient, and the color influence coefficient. In this embodiment, the specific values ​​of a1, a2, and a3 are not specifically calculated.

[0059] Lighting conditions in outdoor activities change with time and weather. Changes in light intensity can cause overexposure or underexposure of faces in images. Changes in light intensity can affect the contrast and clarity of faces in images, making feature extraction difficult. Changes in light and dark contrast can also cause loss or distortion of facial features, reducing the accuracy of face recognition. Light sources from different directions can produce different shadows and highlight areas on the face. Changes in the direction of the light source can change the shadow and brightness distribution of facial features, affecting the extraction and matching of feature points. Shadows from different directions can cause large differences in features of the same person under different lighting conditions, reducing the recognition rate. Changes in color temperature and spectrum can change the color features of the face, making color feature extraction and matching difficult. Especially in multi-light environment, differences in color temperature of different light sources can lead to inconsistent facial color distribution, affecting recognition results.

[0060] In large-scale events, the recognition target may have a variety of expression changes, such as smiling, frowning, opening the mouth, etc. Expression changes will cause the movement of facial muscles and deformation of facial features, causing the position and shape of feature points to change. Especially under exaggerated expressions, the changes in feature points will be very obvious, affecting the accuracy of feature matching; light changes and expression changes often exist at the same time and overlap with each other. In large-scale outdoor events, this combination puts higher requirements on face recognition. The simultaneous effects of light changes and expression changes will make facial features more complex, making feature extraction and matching more difficult.

[0061] In this embodiment, it should be specifically explained that the step of judging the algorithm optimization based on the evaluated influence is to compare the face recognition influence index with the preset threshold. If the face recognition influence index is less than the preset threshold, it is determined that the current environment has little impact on face recognition and no face recognition algorithm optimization is required. If the face recognition influence index is greater than the preset threshold, it is determined that the current environment has a large impact on face recognition and the face recognition algorithm is optimized.

[0062] In this embodiment, it should be specifically explained that the step of calculating the brightness change rate of light according to the collected scene environment image is:

[0063] Get continuous image frames, such as the current frame and the previous frame ;

[0064] Convert the image to grayscale to reduce the interference of color information and focus on brightness changes;

[0065] Calculate the average brightness of each frame of image, and the calculation formula is: , ,in Represents the average brightness of the current frame image, It is represented by the average brightness of the previous frame image. Represented as an image Pixels in Gray value, M and N are the number of rows and columns of the image respectively;

[0066] Calculate the average brightness change between the current frame and the previous frame. The calculation formula is: ,in Expressed as the average brightness change, Represents the average brightness of the current frame image, It is represented by the average brightness of the previous frame image;

[0067] The brightness change rate is calculated by the ratio of the average brightness change to the brightness of the previous frame. The calculation formula is: ,in Expressed as the brightness change rate, Expressed as the average brightness change, It is expressed as the average brightness of the previous frame.

[0068] In this embodiment, it should be specifically explained that the steps of calculating the light uniformity of the current scene environment image by the K-means clustering method are:

[0069] Step 1: Calculate the average brightness value of each sub-environment image to obtain n brightness feature data points as a data set;

[0070] Step 2: Use the elbow method to determine the cluster number K. The elbow method is a common technique for determining the optimal cluster number in a clustering algorithm. It selects a suitable cluster number by calculating cluster quality indicators (usually the total cohesion or total variance of the clusters) under different cluster numbers and observing their changing trends. The K-means clustering algorithm is used to cluster the n brightness feature data points, and K data points are randomly selected in the data set as initial cluster centers.

[0071] Step 3: Randomly select K data points from the data set as the initial cluster centers of the cluster, and use the Euclidean distance to calculate the distance between each data point and each initial cluster center point. For example, calculate the data point and the initial cluster centers The distance between them is calculated by ,in Represented as data points and the initial cluster centers The distance between two points is calculated, and the data point is assigned to the cluster to which the nearest cluster center belongs. All data points are traversed to obtain the initial cluster. The Euclidean distance is one of the most commonly used distance measurement methods between two points. It calculates the straight-line distance between two points in space. The Euclidean distance is suitable for various application scenarios, including cluster analysis, image processing, and machine learning.

[0072] Step 4: For each initial cluster, calculate the mean of all data points in the cluster and use the mean as the new cluster center. The calculation formula is: ,in is represented as the new cluster center of the jth cluster, represents the i-th data point in the cluster, Represented as the number of data points in the jth cluster;

[0073] Step 5: Repeat steps 3 and 4 until the cluster center no longer changes, and obtain the final cluster and the final cluster center;

[0074] Step 6: Calculate the compactness of the final cluster. The calculation formula is: ,in It is expressed as compactness, K is the number of clusters, is the jth cluster, represents the i-th data point in the cluster, is the final cluster center of the jth cluster, and the compactness is used to measure the similarity of the data points within each cluster;

[0075] Step 7: Calculate the dispersion of the final cluster. The calculation formula is: ,in Expressed as dispersion, Represented as the number of data points in the jth cluster, is the final cluster center of the jth cluster, Expressed as the overall mean of all data points, the dispersion is used to measure the differences between different cluster centers.

[0076] Step 8: Calculate the light uniformity based on the dispersion and compactness of the final clusters. The calculation formula is: ,in Expressed as light uniformity, Expressed as dispersion, Expressed as compactness, is a constant value. In order to prevent the denominator from being zero and causing calculation problems, usually, the value of this constant is a very small positive number. Value .

[0077] In this embodiment, it should be specifically explained that the step of calculating the average brightness value for each sub-environment image is to convert the light image into a grayscale image for subsequent processing, traverse each pixel point of the sub-light image, calculate the sum of the brightness values ​​of all pixels, and divide the sum of the brightness values ​​by the number of pixels to obtain the average brightness value.

[0078] In this embodiment, it should be specifically explained that the step of calculating the degree of expression change based on the collected face image is:

[0079] Convert the collected photos into grayscale images and perform necessary preprocessing (such as resizing, cropping, etc.);

[0080] The face image collected at the beginning of the detection period is used as the reference photo, and the face image collected at the end of the detection period is used as the photo to be tested;

[0081] The degree of expression change is calculated based on the brightness values ​​of the reference photo and the photo to be tested. The calculation formula is: ,in It is expressed as the degree of expression change. Expressed as the total number of pixels in the photo, and are the brightness values ​​of the i-th pixel in the reference photo and the photo to be tested respectively. Extraction of the brightness value of the i-th pixel in the photo is a prior art, and the specific steps thereof are not described in detail in this embodiment.

[0082] In this embodiment, it should be specifically explained that the step of identifying the number of light colors in the image by using the threshold segmentation method for the scene environment image collected in real time is:

[0083] Convert color images to grayscale to simplify processing;

[0084] Select an appropriate threshold value based on the distribution of light brightness. This threshold value can be determined through histogram analysis, experiments, or based on prior knowledge of color characteristics.

[0085] The grayscale image is divided into two regions according to the selected threshold, one is the region above the threshold, representing the light part, and the other is the region below the threshold, representing the background or other objects;

[0086] Perform morphological processing on the segmented light regions, such as connected region analysis and contour detection, so as to accurately calculate the number of light rays;

[0087] Estimates the number of light colors on the stage based on the number of light areas detected.

[0088] An algorithm optimization module is used to optimize the face recognition algorithm to improve its adaptability to lighting changes according to the judgment results of the scene data acquisition module, and transmit the optimized face recognition algorithm to the face acquisition and recognition module;

[0089] In this embodiment, it should be specifically explained that the steps of optimizing the face recognition algorithm are:

[0090] Adding illumination normalization processing to the face recognition algorithm, illumination normalization means adjusting the brightness and contrast of the image so that the images under different illumination conditions have similar brightness and contrast. The processing expression is: ,in Represented as the normalized image at position The pixel value of Expressed as the average gray value of the image, Expressed as the standard deviation of the gray value of the image, Represented as the original image at position The pixel value of

[0091] The histogram equalization is used to adjust the gray value distribution of the image and enhance the contrast of the image, thereby improving the visibility of facial features. The expression is: ,in Represented as the equalized value of the gray value v, It is expressed as the number of pixels with gray value i, N is the total number of pixels in the image. The histogram equalization is an image processing technology used to enhance the contrast of the image. Its principle is to adjust the gray value distribution of the image so that the gray value of the image is evenly distributed in the entire gray range. This processing method can enhance the details of the image, making the image visually clearer and with higher contrast;

[0092] In the model training, images under different lighting conditions are added to enhance the model's robustness to light changes. Random cropping and scaling of images are performed to enhance the model's adaptability to faces of different sizes and positions. Robustness refers to the ability of a system or algorithm to maintain its expected functions and performance in the face of various adverse conditions or changes. In the context of face recognition, robustness specifically refers to the ability of an algorithm to accurately recognize faces under a variety of complex conditions, such as different lighting conditions, different shooting angles, partial occlusion, different expression changes, and different environmental backgrounds.

[0093] During the face recognition process, light compensation is performed on the detected image to reduce the impact of light changes on the recognition results.

[0094] The face collection and recognition module is used to receive the optimized face recognition algorithm transmitted by the algorithm optimization module, and perform face data collection and face recognition, and transmit the face recognition results to the alarm and notification module;

[0095] In this embodiment, it should be specifically explained that the steps of face data collection and face recognition are:

[0096] Use a camera or other imaging device to collect facial images. During the image collection process, factors such as lighting conditions, shooting angle, and distance need to be considered to ensure image quality as much as possible;

[0097] Perform illumination normalization and histogram equalization on the collected images to reduce the impact of illumination changes;

[0098] Use a convolutional neural network (CNN) or other feature extraction algorithms to extract features from the preprocessed image. The convolutional neural network is a deep learning model that is particularly suitable for processing and analyzing visual data. The convolutional neural network extracts local features of the image through convolution operations and can effectively capture the spatial structure information in the image. Convolutional neural networks perform well in computer vision tasks such as image classification, object detection, and face recognition.

[0099] The Euclidean distance between the feature vectors of the image to be identified and all images in the database is calculated, and the face identity is determined based on the result of the Euclidean distance using the k-nearest neighbor algorithm. After using the convolutional neural network to extract the face feature vector, the Euclidean distance between the feature vector of the image to be identified and the feature vectors of all images in the database is calculated to measure the similarity between the image to be identified and each image in the database.

[0100] In this embodiment, it should be specifically explained that the step of calculating the Euclidean distance between the image to be identified and all image feature vectors in the database is:

[0101] Extract feature vectors from the image to be identified and all images in the database. For example, the feature vector of the image to be identified is , the database image feature vector is , where i represents the i-th database image;

[0102] Calculate the Euclidean distance between the feature vector of the image to be identified and each feature vector of the image in the database. The calculation formula is: ;

[0103] The Euclidean distance with the smallest distance is screened out as the minimum distance, and the screened minimum distance is compared with the threshold. If the minimum distance is less than the threshold, the verification target face recognition is determined to have passed; if the minimum distance is greater than the threshold, the verification target face recognition is determined to have failed.

[0104] The alarm and notification module is used to receive the face recognition results transmitted by the face collection and recognition module, and to issue alarms and notifications based on the face recognition results;

[0105] In this embodiment, it needs to be specifically explained that the alarm and notification based on the face recognition result is that if the face recognition result is passed, a verification pass message is sent to the relevant staff; if the face recognition result is failed, a verification fail message is sent to the relevant staff, and an alarm message is issued to the security department.

[0106] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0107] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A face recognition data processing system for public security practical scenarios, characterized in that: It includes scene data acquisition module, algorithm optimization module, face acquisition and recognition module, and alarm and notification module. The modules are connected by signals. The data processing steps between the modules are as follows: The scene data acquisition module is used to collect the light data of the scene environment, evaluate the influence of the current light on face recognition based on the light data, and make judgments on algorithm optimization based on the evaluated influence; An algorithm optimization module is used to optimize the face recognition algorithm to improve its adaptability to lighting changes according to the judgment results of the scene data acquisition module, and transmit the optimized face recognition algorithm to the face acquisition and recognition module; The face collection and recognition module is used to receive the optimized face recognition algorithm transmitted by the algorithm optimization module, and perform face data collection and face recognition, and transmit the face recognition results to the alarm and notification module; The alarm and notification module is used to receive the face recognition results transmitted by the face collection and recognition module, and to issue alarms and notifications based on the face recognition results; The step of evaluating the influence of current light on face recognition according to light data is as follows: The scene environment image is collected in real time by a camera device, and the brightness change rate of the light is calculated according to the collected scene environment image; The collected scene environment image is evenly divided into n parts, recorded as sub-environment images, and the light uniformity of the current scene environment image is calculated by the K-means clustering method; The light change influence coefficient is calculated based on the brightness change rate and light uniformity, and its calculation formula is: CE is the light change influence coefficient, R light It is expressed as the rate of change of brightness, and U is expressed as the uniformity of light; Set a detection time period, randomly select m people at the beginning and end of the detection time period to collect face images, calculate the degree of expression change based on the collected face images, and average the degree of expression change of each person to get the average degree of expression change. Calculate the expression change influence coefficient based on the average degree of expression change, and its calculation formula is: Where EC is the expression change influence coefficient, E 均 It is expressed as the average degree of expression change; The threshold segmentation method is used to identify the number of light colors in the scene environment image collected in real time, and the color influence coefficient is calculated based on the number of colors. The calculation formula is: Where CL is the color influence coefficient, NUM C It means identifying the number of colors in the image; The face recognition impact index is calculated based on the light change impact coefficient, expression change impact coefficient and color impact coefficient. The calculation formula is FR=a1×CE+a2×EC+a3×CL, where FR represents the face recognition impact index, CE represents the light change impact coefficient, EC represents the expression change impact coefficient, CL represents the color impact coefficient, and a1, a2, and a3 represent the weight coefficients of the light change impact coefficient, expression change impact coefficient, and color impact coefficient.

2. According to claim 1, a face recognition data processing system for public security practical scenarios is characterized by: The step of judging the algorithm optimization based on the evaluated influence is to compare the face recognition influence index with the preset threshold. If the face recognition influence index is less than the preset threshold, it is determined that the current environment has little influence on face recognition and no face recognition algorithm optimization is required. If the face recognition influence index is greater than the preset threshold, it is determined that the current environment has a large influence on face recognition and the face recognition algorithm is optimized.

3. The face recognition data processing system for public security practical scenarios according to claim 1 is characterized by: The step of calculating the brightness change rate of light according to the collected scene environment image is as follows: Obtain continuous image frames, convert the image frames into grayscale images, and calculate the average brightness of each frame; Calculate the average brightness change between the current frame and the previous frame. The calculation formula is ΔI avg =I avg (t)-I avg (t-1), where ΔI avg Expressed as the average brightness change, I avg (t) represents the average brightness of the current frame image, I avg (t-1) represents the average brightness of the previous frame; The brightness change rate is calculated by the ratio of the average brightness change to the brightness of the previous frame. The calculation formula is: Where R light Expressed as the rate of change of brightness, ΔI avg Expressed as the average brightness change, I avg (t-1) represents the average brightness of the previous frame image.

4. The face recognition data processing system for public security practical scenarios according to claim 1 is characterized by: The steps of calculating the light uniformity of the current scene environment image by the K-means clustering method are as follows: Step 1: Calculate the average brightness value of each sub-environment image to obtain n brightness feature data points as a data set; Step 2: Use the elbow method to determine the number of clusters K; Step 3: Randomly select K data points from the data set as the initial cluster centers of clustering, use Euclidean distance to calculate the distance between each data point and each initial cluster center point, and assign the data point to the cluster to which the nearest cluster center belongs, and traverse all data points to obtain the initial cluster clusters; Step 4: For each initial cluster, calculate the mean of all data points in the cluster and use the mean as the new cluster center; Step 5: Repeat steps 3 and 4 until the cluster center no longer changes, and obtain the final cluster and the final cluster center; Step 6: Calculate the compactness of the final cluster. The calculation formula is: Where WCV represents the compactness, K is the number of clusters, C j is the jth cluster, x i represents the i-th data point in the cluster, c" j is the final cluster center of the jth cluster; Step 7: Calculate the dispersion of the final cluster. The calculation formula is: Where BCV is the dispersion, |S j | represents the number of data points in the jth cluster, c” j is the final cluster center of the jth cluster, and μ represents the overall mean of all data points; Step 8: Calculate the light uniformity based on the dispersion and compactness of the final clusters. The calculation formula is: Among them, U represents the uniformity of light, BCV represents the dispersion, WCV represents the compactness, and ε is a constant value.

5. The face recognition data processing system for public security practical scenarios according to claim 1 is characterized by: The step of calculating the degree of expression change based on the collected face image is as follows: Convert the collected photos into grayscale images and perform preprocessing; The face image collected at the beginning of the detection period is used as the reference photo, and the face image collected at the end of the detection period is used as the photo to be tested; The degree of expression change is calculated based on the brightness values ​​of the reference photo and the photo to be tested. The calculation formula is: Where E represents the degree of expression change, N represents the total number of pixels in the photo, I1(i) and I2(i) are the brightness values ​​of the i-th pixel in the reference photo and the test photo, respectively.

6. The face recognition data processing system for public security practical scenarios according to claim 1 is characterized by: The step of identifying the number of light colors in the scene environment image collected in real time by using the threshold segmentation method is as follows: Convert the color image to grayscale image and select a threshold value for image segmentation; Segment the grayscale image into light area and background area according to the selected threshold; Count the number of segmented light areas and estimate the number of light colors on the stage.

7. The face recognition data processing system for public security practical scenarios according to claim 1 is characterized by: The steps of optimizing the face recognition algorithm are: Adding illumination normalization processing to the face recognition algorithm, the processing expression is: Among them I norm (x, y) represents the pixel value of the normalized image at position (x, y), μ represents the average gray value of the image, σ represents the standard deviation of the gray value of the image, and I(x, y) represents the pixel value of the original image at position (x, y); The grayscale value distribution of the image is adjusted by histogram equalization to enhance the contrast of the image. The expression is: Where H(v) represents the equalized value of gray value v, h(i) represents the number of pixels with gray value i, and N is the total number of pixels in the image; Add images under different lighting conditions during model training to enhance the model's robustness to light changes, randomly crop and scale images, and perform light compensation on detected images during face recognition.