Access control system and method based on face recognition technology
Through the access control system based on facial recognition technology, automatic, fast and accurate user identity recognition and access control are achieved, solving the problems of easy card loss, manual input and low recognition accuracy in traditional access control systems, and improving the system security and user experience.
Patent Information
- Application Number
- CN202411627254.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-11-14
AI Technical Summary
Traditional access control systems have problems such as cards being easily lost or stolen, users having to manually enter passwords, low recognition accuracy, slow response speed, and poor anti-interference capabilities.
The access control system based on face recognition technology includes image acquisition, preprocessing, recognition and linkage units. The image acquisition unit automatically captures facial images, the image preprocessing unit calculates brightness components and cumulative histograms, the face recognition unit extracts and recognizes features, and the access control linkage unit controls the access control equipment.
It improves the security and convenience of the access control system, simplifies user operations, increases recognition speed and accuracy, enhances the stability and response speed of the system in complex environments, and avoids the safety hazards of traditional methods.
Smart Images

Figure CN119360490B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of access control management, and in particular to an access control system and method based on face recognition technology. Background Art
[0002] Users need to carry access cards or key cards, which may lead to forgetting or losing the cards, causing inconvenience; users also need to remember passwords and manually enter them every time they enter or exit, which can easily affect the user experience due to memory errors, input errors or external factors (such as dirty keyboards or inconvenient input methods); and if the access card is lost or stolen, it may be used by others to enter restricted areas. Even traditional card systems often lack sufficient anti-counterfeiting measures and are easily copied or forged.
[0003] Traditional systems perform poorly when faced with image changes, especially changes in lighting, perspective, and scale. In these cases, manually designed features may not be able to effectively extract target information, resulting in decreased detection accuracy. In addition, due to the lack of intelligent linkage functions, traditional systems are usually unable to respond quickly based on identity verification results, and the process of controlling access control and unlocking may also be relatively slow, affecting the user experience. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the above-mentioned prior art and provide an access control system and method based on face recognition technology.
[0005] The technical solution adopted to solve the above technical problems is: an access control system based on face recognition technology, including an access control linkage unit, and also including:
[0006] An image acquisition unit 1 is configured to acquire facial images of a user to be identified based on a camera according to a preset sampling period to obtain a facial image sequence of the user to be identified, and transmit the facial image sequence of the user to be identified to an image preprocessing unit 2;
[0007] An image preprocessing unit 2 receives the facial image sequence of the user to be identified transmitted by the image acquisition unit, performs a preprocessing operation on the facial image sequence of the user to be identified to obtain a standard facial image sequence, and transmits the standard facial image sequence to the facial recognition unit 3 and the facial recording unit 5;
[0008] The face recognition unit 3 receives the standard face image sequence transmitted by the image preprocessing unit 2, and performs face recognition on the standard face image sequence to obtain the identity tag of the user to be identified, and transmits the identity tag of the user to be identified to the access control linkage unit 4.
[0009] The face recording unit 5 receives the standard face image sequence transmitted by the image pre-processing unit 2 and records the face features of the standard face image sequence into a pre-built face feature list.
[0010] Preferably, the access control linkage unit 4 receives the identity tag of the user to be identified transmitted by the face recognition unit 3, and controls the access control equipment in the monitoring area to perform corresponding control operations based on the identity tag of the user to be identified.
[0011] Preferably, preprocessing the facial image of the user to be identified to obtain a standard facial image includes:
[0012] The brightness components of the L channels of the face image and the preset reference image are extracted respectively, and the histogram of the brightness component of the L channel is calculated. The calculation formula of the histogram of the brightness component of the L channel is as follows:
[0013]
[0014] Among them, H LK (u) represents the percentage of the total pixels in the brightness histogram with brightness value u, w and h represent the width and height of the face image and the reference image, and L R (j,i) represents the brightness value at position (j,i) in the reference image;
[0015] Based on the histogram of the brightness component of the L channel, a cumulative histogram corresponding to the histogram of the brightness component of the L channel is calculated. The calculation formula of the cumulative histogram is as follows:
[0016]
[0017] in, Represents the value of the brightness histogram at brightness value u, H LK (i) represents the percentage of the brightness histogram value at brightness value i in the total pixels.
[0018] Preferably, preprocessing the facial image of the user to be identified to obtain a standard facial image further comprises:
[0019] Comparing the brightness values of each pixel in the reference image and the face image to obtain a corresponding brightness transformation relationship between the two, and establishing a mapping function between the brightness value and the cumulative histogram based on the corresponding brightness transformation relationship;
[0020] The facial image is adjusted at each identical brightness value based on a mapping function of the brightness value and the cumulative histogram, so that the facial image has the same cumulative histogram as the reference image, thereby obtaining a standard facial image.
[0021] Preferably, performing face recognition on the standard face image sequence to obtain an identity tag of the user to be identified includes:
[0022] determining whether a face exists in a standard face image in the standard face image sequence based on a trained target detection model, and if a face exists, calculating the area of a face frame of the standard face image in the standard face image sequence;
[0023] The standard face image with the largest face frame area is used as the image to be recognized, and the image to be recognized is cropped to obtain a target face image;
[0024] Feature point detection is performed on the target facial image to obtain coordinates of five key points of the face, an affine transformation matrix of the face is calculated based on the coordinates of the five key points of the face, and the target facial image is aligned based on the affine transformation matrix to obtain an aligned target facial image.
[0025] Preferably, performing face recognition on the standard face image sequence to obtain an identity tag of the user to be identified further includes:
[0026] Performing feature extraction on the aligned target facial image to obtain a facial feature vector, and encoding the facial feature vector;
[0027] Traverse the pre-entered facial feature list, calculate the similarity score between the current facial feature vector and each facial feature vector in the facial feature list, select the facial feature vector with the highest score, return its index in the facial feature list, and use the index in the facial feature list to identify the identity tag of the user to be identified.
[0028] Preferably, the target detection model includes a backbone network, a feature aggregation module and a detection module, wherein the backbone network is used to extract the overall feature map of the standard face image and to evenly split the overall feature map into two feature maps along the channel dimension. and The two feature maps and Input to the feature aggregation module, the feature aggregation module includes a global attention unit, a local attention unit and a fusion unit, the global attention unit is used to extract the long-range relationship of each pixel in space, the local attention unit is used to extract the local features of the region of interest in the spatial dimension of a given feature map, the fusion unit includes two 1×1 convolutional layers and a heavy parameter block, the outputs of the global attention unit and the local attention unit are fused by element-by-element addition, and finally the features are expanded into a one-dimensional sequence, the detection module is used to detect the feature aggregation module to obtain the face target detection result, where.
[0029] Preferably, the expression of the global attention unit is as follows:
[0030]
[0031] Among them, Att G represents the global attention operator, represents matrix multiplication, represents the Softmax activation function, pwConv represents a 1×1 point-by-point convolutional layer, MLP represents a multi-layer perceptron, G sa represents global spatial attention, and Transpos represents the transposition operation.
[0032] Preferably, the expression of the local attention unit is as follows:
[0033]
[0034] Among them, Att L represents the local attention operator, ⊙ represents the matrix element-by-element multiplication, σ represents the Sigmoid activation function, F C Represents three stacked 1×1 convolutional layers and a 3×3 depthwise separable convolutional layer.
[0035] The technical solution adopted to solve the above technical problems is: an access control method based on face recognition technology, which is applicable to the access control system based on face recognition technology, including.
[0036] The beneficial effects of the present invention are as follows: (1) The present invention effectively improves the security and convenience of the access control system through the linkage of the face image acquisition unit, the image preprocessing unit and the face recognition unit. The image acquisition unit automatically acquires the facial image of the user to be identified based on a preset period, and quickly identifies the image through the face recognition unit to obtain the user's identity tag. This process not only improves the recognition speed, but also avoids the manual operation of traditional card swiping, password input and other methods, and simplifies the user's entry and exit process; (2) The present invention is combined with the access control linkage unit, and the system can immediately control the access control device to unlock the door after confirming the user's identity, which greatly improves the system response speed and user experience. In addition, face recognition avoids the security risks that may be caused by traditional methods such as losing or forgetting access control cards and passwords; (3) The image preprocessing unit of the present invention adopts a number of advanced image processing technologies, such as histogram calculation of brightness components, Means such as cumulative histogram mapping make the collected images more standardized. Through this preprocessing operation, the image can overcome the interference of external factors such as lighting and angle, so that the final standard face image is more in line with the requirements of the face recognition system. These image processing technologies enable the system to maintain high accuracy in different environments, especially adapt to complex lighting conditions, and improve the stability of the system in practical applications. The face recognition unit uses target detection model, key point detection, and affine transformation matrix to accurately align and extract features of the target face image, ensuring image standardization and recognition accuracy. The system also uses feature vector encoding and similarity calculation technology to quickly identify the user's identity by comparing with the preset face feature list entered. This process significantly improves the recognition accuracy and can effectively avoid misidentification caused by changes in external conditions, further enhancing the security of the access control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the system architecture of the overall system in an embodiment of the present invention;
[0038] Figure 2 The figure is a flowchart of the steps of the overall method in one embodiment of the present invention.
[0039] Figure numerals: 1. Image acquisition unit; 2. Image preprocessing unit; 3. Face recognition unit; 4. Access control linkage unit; 5. Face entry unit. DETAILED DESCRIPTION
[0040] Example 1, as Figure 1 As shown, the access control system based on face recognition technology proposed by the present invention includes an access control linkage unit and also includes:
[0041] An image acquisition unit is configured to acquire facial images of the user to be identified based on the camera according to a preset sampling period to obtain a facial image sequence of the user to be identified, and transmit the facial image sequence of the user to be identified to the image preprocessing unit;
[0042] An image preprocessing unit receives the facial image sequence of the user to be identified transmitted by the image acquisition unit, performs preprocessing operations on the facial image sequence of the user to be identified to obtain a standard facial image sequence, and transmits the standard facial image sequence to the facial recognition unit and the facial recording unit;
[0043] A face recognition unit receives the standard face image sequence transmitted by the image preprocessing unit, performs face recognition on the standard face image sequence to obtain an identity tag of the user to be identified, and transmits the identity tag of the user to be identified to the access control linkage unit;
[0044] The face recording unit receives the standard face image sequence transmitted by the image preprocessing unit and records the face features of the standard face image sequence into a pre-built face feature list.
[0045] In this invention, the "sampling period" in the image acquisition unit refers to the frequency at which the camera captures images within a certain time interval. The length of this period affects the real-time and accuracy of facial recognition. The access control linkage unit is responsible for interfacing with the system's access control hardware (such as door locks and access card readers). When a legitimate user is identified, it controls the door lock to unlock or perform other corresponding operations. If an illegal or unauthorized user is identified, it will refuse to unlock the door.
[0046] In an optional embodiment, the access control linkage unit receives the identity tag of the user to be identified transmitted by the face recognition unit, and controls the access control equipment in the monitoring area to perform corresponding control operations based on the identity tag of the user to be identified.
[0047] It should be noted that access control equipment includes but is not limited to door locks, access card readers, etc.
[0048] In the second embodiment, the access control system based on face recognition technology proposed by the present invention further includes, compared with the first embodiment, performing a preprocessing operation on the face image of the user to be identified to obtain a standard face image, including:
[0049] The brightness components of the L channels of the face image and the preset reference image are extracted respectively, and the histogram of the brightness component of the L channel is calculated. The calculation formula of the histogram of the brightness component of the L channel is as follows:
[0050]
[0051] Among them, H LK (u) represents the percentage of the total pixels in the brightness histogram with brightness value u, w and h represent the width and height of the face image and the reference image, and L R (j,i) represents the brightness value at position (j,i) in the reference image;
[0052] Based on the histogram of the brightness component of the L channel, the cumulative histogram corresponding to the histogram of the brightness component of the L channel is calculated. The calculation formula of the cumulative histogram is as follows:
[0053]
[0054] in, Represents the value of the brightness histogram at brightness value u, H LK (i) represents the percentage of the brightness histogram value at brightness value i in the total pixels.
[0055] In this embodiment, the L channel refers to the channel that represents brightness (light and dark) in the color space. Usually, the L channel corresponds to "brightness" information, while other channels (such as the A channel and the B channel) usually represent chromaticity information. Common color spaces include the Lab color space, where L represents brightness (Luminance) and A and B represent chromaticity (Chrominance); the brightness histogram is used to represent the pixel distribution of different brightness values in the image. It shows the number of pixels of each brightness value in the image, or the frequency distribution of the brightness values; the cumulative histogram is an extension of the brightness histogram. It represents the cumulative pixel percentage from the minimum brightness value to the current brightness value. The cumulative histogram can reflect the overall distribution of image brightness and is used for brightness equalization, contrast enhancement, and other processing.
[0056] In an optional embodiment, preprocessing the facial image of the user to be identified to obtain a standard facial image further includes:
[0057] Compare the brightness values of each pixel in the reference image and the face image to obtain the corresponding brightness transformation relationship between the two, and establish a mapping function between the brightness value and the cumulative histogram based on the corresponding brightness transformation relationship;
[0058] A mapping function based on brightness value and cumulative histogram adjusts the face image at each identical brightness value so that the face image has the same cumulative histogram as the reference image, thereby obtaining a standard face image.
[0059] It should be noted that the mapping function is a mathematical relationship or algorithm that defines how to match the brightness distribution of the reference image with the brightness value of the target image. Here, the mapping function adjusts the brightness distribution of the target image based on the cumulative histogram of the reference image and the cumulative histogram of the target image.
[0060] In an optional embodiment, performing face recognition on a standard face image sequence to obtain an identity tag of a user to be identified includes:
[0061] Based on the trained object detection model, determine whether there is a face in the standard face image in the standard face image sequence. If there is a face, calculate the area of the face frame of the standard face image in the standard face image sequence;
[0062] The standard face image with the largest face frame area is used as the image to be recognized, and the image to be recognized is cropped to obtain the target face image;
[0063] Feature point detection is performed on the target face image to obtain the coordinates of the five key points of the face, the affine transformation matrix of the face is calculated based on the coordinates of the five key points of the face, and the target face image is aligned based on the affine transformation matrix to obtain an aligned target face image.
[0064] In an optional embodiment, performing face recognition on a standard face image sequence to obtain an identity tag of a user to be identified further includes:
[0065] Perform feature extraction on the aligned target face image to obtain a face feature vector, and encode the face feature vector;
[0066] Traverse the pre-entered facial feature list, calculate the similarity score between the current facial feature vector and each facial feature vector in the facial feature list, select the facial feature vector with the highest score, and return its index in the facial feature list. Based on the index in the facial feature list, it is used to identify the identity label of the user to be identified.
[0067] In an optional embodiment, the target detection model includes a backbone network, a feature aggregation module and a detection module. The backbone network is used to extract the overall feature map of the standard face image and split the overall feature map into two feature maps along the channel dimension. and The two feature maps and Input to the feature aggregation module, the feature aggregation module includes a global attention unit, a local attention unit and a fusion unit. The global attention unit is used to extract the long-range relationship of each pixel in space, and the local attention unit is used to extract the local features of the region of interest in the spatial dimension of a given feature map. The fusion unit includes two 1×1 convolutional layers and a heavy parameter block. The outputs of the global attention unit and the local attention unit are fused by element-by-element addition. Finally, the features are expanded into a one-dimensional sequence. The detection module is used to detect the feature aggregation module to obtain the face target detection result.
[0068] It should be noted that the backbone network is a neural network used to extract features from the original input image. In object detection tasks, the backbone network is typically a pre-trained convolutional neural network (CNN) such as ResNet, VGG, or EfficientNet. Its purpose is to extract low-level and high-level features (such as edges, textures, and shapes) from the input image. In this example, the backbone network is used to extract the overall feature map of a standard face image; the feature map is a high-dimensional representation of the image extracted by the backbone network; the channel dimension refers to the depth dimension of the feature map; and the feature aggregation module is a module used to integrate information from different feature sources.
[0069] In an optional embodiment, the expression of the global attention unit is as follows:
[0070]
[0071] Among them, Att G represents the global attention operator, represents matrix multiplication, represents the Softmax activation function, pwConv represents a 1×1 point-by-point convolutional layer, MLP represents a multi-layer perceptron, G sa represents global spatial attention, and Transpos represents the transposition operation.
[0072] In an optional embodiment, the expression of the local attention unit is as follows:
[0073]
[0074] Among them, Att L represents the local attention operator, ⊙ represents the matrix element-by-element multiplication, σ represents the Sigmoid activation function, F C Represents three stacked 1×1 convolutional layers and a 3×3 depthwise separable convolutional layer.
[0075] Example 3, as Figure 2 As shown, the access control method based on face recognition technology proposed by the present invention is applicable to the access control system based on face recognition technology, including:
[0076] S1. Collecting facial images of the user to be identified based on the camera according to a preset sampling period to obtain a facial image sequence of the user to be identified;
[0077] S2. Preprocessing the facial image sequence of the user to be identified to obtain a standard facial image sequence;
[0078] S3. Performing facial recognition on the standard facial image sequence to obtain an identity tag of the user to be identified, and entering facial features of the standard facial image sequence into a pre-built facial feature list;
[0079] S4. Controlling access control equipment within the monitoring area to perform corresponding control operations based on the identity tag of the user to be identified.
[0080] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. An access control system based on face recognition technology, comprising an access control linkage unit (4), characterized in that: An image acquisition unit (1), the image acquisition unit (1) being used to acquire facial images of a user to be identified based on a camera according to a preset sampling period to obtain a facial image sequence of the user to be identified, and transmit the facial image sequence of the user to be identified to an image preprocessing unit (2); An image preprocessing unit (2), which receives the facial image sequence of the user to be identified transmitted by the image acquisition unit (1), performs a preprocessing operation on the facial image sequence of the user to be identified to obtain a standard facial image sequence, and transmits the standard facial image sequence to the facial recognition unit (3) and the facial recording unit (5); A face recognition unit (3), the face recognition unit (3) receives the standard face image sequence transmitted by the image pre-processing unit (2), performs face recognition on the standard face image sequence to obtain an identity tag of the user to be identified, and transmits the identity tag of the user to be identified to the access control linkage unit (4); A face recording unit (5), the face recording unit (5) receives the standard face image sequence transmitted by the image pre-processing unit (2), and records the face features of the standard face image sequence into a pre-built face feature list; The step of performing face recognition on the standard face image sequence to obtain an identity tag of the user to be identified includes: Determining whether a face exists in a standard face image in the standard face image sequence based on a trained target detection model; The target detection model includes a backbone network, a feature aggregation module and a detection module. The backbone network is used to extract the overall feature map of the standard face image and split the overall feature map into two feature maps along the channel dimension. and , the two feature maps and Input to the feature aggregation module, which includes a global attention unit, a local attention unit and a fusion unit. The global attention unit is used to extract the long-range relationship of each pixel in space, and the local attention unit is used to extract the local features of the region of interest in the spatial dimension of a given feature map. The fusion unit includes two 1×1 convolutional layers and a heavy parameter block. The outputs of the global attention unit and the local attention unit are fused by element-by-element addition, and finally the features are expanded into a one-dimensional sequence. The detection module is used to detect the feature aggregation module to obtain the face target detection result.
2. The access control system based on face recognition technology according to claim 1 is characterized in that: The access control linkage unit (4) receives the identity tag of the user to be identified transmitted by the face recognition unit (3), and controls the access control equipment in the monitoring area to perform corresponding control operations based on the identity tag of the user to be identified.
3. The access control system based on face recognition technology according to claim 1 is characterized in that: Performing a preprocessing operation on the facial image of the user to be identified to obtain a standard facial image, including: The brightness components of the L channels of the face image and the preset reference image are extracted respectively, and the histogram of the brightness component of the L channel is calculated. The calculation formula of the histogram of the brightness component of the L channel is as follows: ; in, Indicates that the brightness value is The percentage of the brightness histogram value in the total pixels, and represents the width and height of the face image and the reference image, and , Indicates the position in the reference image is Brightness value; Based on the histogram of the brightness component of the L channel, a cumulative histogram corresponding to the histogram of the brightness component of the L channel is calculated. The calculation formula of the cumulative histogram is as follows: ; in, Indicates that the brightness value is The values of the brightness histogram, Indicates that the brightness value is The percentage of the brightness histogram value at the total pixels.
4. The access control system based on face recognition technology according to claim 3 is characterized in that: Preprocessing the facial image of the user to be identified to obtain a standard facial image also includes: Comparing the brightness values of each pixel in the reference image and the face image to obtain a corresponding brightness transformation relationship between the two, and establishing a mapping function between the brightness value and the cumulative histogram based on the corresponding brightness transformation relationship; The facial image is adjusted at each identical brightness value based on a mapping function of the brightness value and the cumulative histogram, so that the facial image has the same cumulative histogram as the reference image, thereby obtaining a standard facial image.
5. The access control system based on face recognition technology according to claim 1 is characterized in that: Performing face recognition on the standard face image sequence to obtain an identity tag of the user to be identified, further comprising: If a face exists in the standard face image in the standard face image sequence, calculating the area of the face frame of the standard face image in the standard face image sequence; The standard face image with the largest face frame area is used as the image to be recognized, and the image to be recognized is cropped to obtain a target face image; Feature point detection is performed on the target facial image to obtain coordinates of five key points of the face, an affine transformation matrix of the face is calculated based on the coordinates of the five key points of the face, and the target facial image is aligned based on the affine transformation matrix to obtain an aligned target facial image.
6. The access control system based on face recognition technology according to claim 5, characterized in that: Performing face recognition on the standard face image sequence to obtain an identity tag of the user to be identified, further comprising: Performing feature extraction on the aligned target facial image to obtain a facial feature vector, and encoding the facial feature vector; Traverse the pre-entered facial feature list, calculate the similarity score between the current facial feature vector and each facial feature vector in the facial feature list, select the facial feature vector with the highest score, return its index in the facial feature list, and use the index in the facial feature list to identify the identity tag of the user to be identified.
7. The access control system based on face recognition technology according to claim 6, characterized in that: The expression of the global attention unit is as follows: ; in, represents the global attention operator, represents matrix multiplication, represents the Softmax activation function, represents a 1×1 point-by-point convolutional layer, represents a multilayer perceptron, represents global spatial attention, Represents a transpose operation.
8. The access control system based on face recognition technology according to claim 7, characterized in that: The expression of the local attention unit is as follows: ; in, represents the local attention operator, represents matrix element-wise multiplication, represents the Sigmoid activation function, Represents three stacked 1×1 convolutional layers and a 3×3 depthwise separable convolutional layer.
9. An access control method based on face recognition technology, which is applicable to the access control system based on face recognition technology according to any one of claims 1 to 8, characterized in that: include: Collecting facial images of the user to be identified based on the camera according to a preset sampling period to obtain a facial image sequence of the user to be identified; Performing a preprocessing operation on the facial image sequence of the user to be identified to obtain a standard facial image sequence; Performing face recognition on the standard face image sequence to obtain an identity tag of the user to be identified, and entering the facial features of the standard face image sequence into a pre-built facial feature list; Based on the identity tag of the user to be identified, the access control equipment in the monitoring area is controlled to perform corresponding control operations.
Citation Information
Patent Citations
Community access control system based on face recognition
CN103258191A
Illumination normalization method for processing face images
CN103295010A
An image recognition method and apparatus
CN109543524A
Tablet surface defect detection method based on deep learning image semantic segmentation and automatic processing device thereof
CN113129288A