Access control system and method based on face recognition technology
By using face recognition technology in the access control system, the existing system's problems of reduced detection accuracy and lack of intelligent control when images change are solved, achieving higher security and convenience.
Patent Information
- Application Number
- CN202411627254.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The existing access control system has reduced detection accuracy when facing image changes and lacks linkage intelligent functions, resulting in poor user experience and safety risks.
An access control system based on human face recognition technology, including image acquisition units, image pre -processing units, and face recognition units. The identity label and control the access control equipment are generated through human face image collection, pre -processing and recognition.
It improves the security and convenience of the access control system, simplifies the process of user access, enhances the system response speed and user experience, and effectively avoids the hidden dangers of traditional cards or passwords.
Smart Images

Figure CN119360490A_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 need to remember passwords and need to enter them manually 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 image lighting, perspective, and scale. In these cases, manually designed features may not be able to effectively extract target information, resulting in reduced detection accuracy. In addition, due to the lack of intelligent linkage functions, traditional systems are usually unable to respond quickly based on identity authentication results, and the process of controlling access control and unlocking may also be relatively slow, affecting 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, the image acquisition unit 1 is used 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 2;
[0007] An image preprocessing unit 2, which 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 preprocessing 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, and 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 includes:
[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 of 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] Determine whether a face exists in the standard face image in the standard face image sequence based on the trained target detection model, and if a face exists, calculate the area of the face frame of the standard face image in the standard face image sequence;
[0023] Taking the standard face image with the largest face frame area as the image to be identified, and cropping the image to be identified to obtain the target face image;
[0024] Feature point detection is performed on the target face 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 face image is aligned based on the affine transformation matrix to obtain an aligned target face image.
[0025] Preferably, performing face recognition on the standard face image sequence to obtain an identity tag of the user to be identified also includes:
[0026] Extracting features from the aligned target face image to obtain a face feature vector, and encoding the face 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-wise convolutional layer, MLP represents a multi-layer perceptron, G sa represents the 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, and 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 methods such as swiping cards and entering passwords, thereby simplifying 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 safety hazards 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, Cumulative histogram mapping and other means make the collected images have a higher degree of standardization. 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, improve the stability of the system in practical applications, and use the face recognition unit to accurately align and extract features of the target face image through target detection model, key point detection, and affine transformation matrix to ensure 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 A schematic flow chart of the steps of an overall method in an 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] Embodiment 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, the image acquisition unit is used 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, which 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 entry 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 the present invention, the "sampling period" in the image acquisition unit refers to the frequency at which the camera takes images within a certain time interval. The length of this period will affect the real-time and accuracy of face recognition; the access control linkage unit is responsible for linking with the system's access control hardware (such as door locks, access control card readers, etc.). When a legitimate user is identified, it will control the door lock to unlock or perform other corresponding operations. If an illegal user or unauthorized user is identified, it will refuse to unlock.
[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 control card readers, etc.
[0048] Embodiment 2, the access control system based on face recognition technology proposed by the present invention, compared with embodiment 1, this embodiment further includes: 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 A channel and B channel) usually represent chromaticity information. Common color spaces include Lab color space, where L represents brightness (Luminance), 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 value; the cumulative histogram is an extension of the brightness histogram, which 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 same 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 according to 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 target detection model, determine whether there is a face in the standard face image in the standard face image sequence, and 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 identified, and the image to be identified is cropped to obtain the target face image;
[0063] Feature point detection is performed on the target face image to obtain the coordinates of 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] Extract features from 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, 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.
[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 the overall feature map is evenly split 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. 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 the object detection task, the backbone network is usually a pre-trained convolutional neural network (CNN), such as ResNet, VGG, EfficientNet, etc. Its purpose is to extract low-level and high-level features (such as edges, textures, shapes, etc.) in the input image. In this example, the backbone network is used to extract the overall feature map of the 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; 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-wise convolutional layer, MLP represents a multi-layer perceptron, G sa represents the 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, and F C Represents three stacked 1×1 convolutional layers and a 3×3 depthwise separable convolutional layer.
[0075] Embodiment three, 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 face recognition on the standard face image sequence to obtain the identity tag of the user to be identified, and entering the face features of the standard face image sequence into a pre-built face feature list;
[0079] S4. 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.
[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, and various changes can be made within the knowledge scope of technicians in the relevant technical field without departing from the purpose 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 transmitting the facial image sequence of the user to be identified to an image preprocessing unit (2); An image preprocessing unit (2), the image preprocessing unit (2) receiving the facial image sequence of the user to be identified transmitted by the image acquisition unit (1), performing a preprocessing operation on the facial image sequence of the user to be identified to obtain a standard facial image sequence, and transmitting 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 preprocessing unit (2), performs face recognition on the standard face image sequence to obtain an identity tag of a user to be identified, and transmits the identity tag of the user to be identified to a door access linkage unit (4); A face recording unit (5) receives the standard face image sequence transmitted by the image preprocessing unit (2), and records the face features of the standard face image sequence into a pre-constructed face feature list.
2. The access control system based on face recognition technology according to claim 1 is characterized in that: The door control linkage unit (4) receives the identity tag of the user to be identified transmitted by the face recognition unit (3), and controls the door 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: The facial image of the user to be identified is preprocessed 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: 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; 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, and the calculation formula of the cumulative histogram is as follows: 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.
4. The access control system based on face recognition technology according to claim 3 is characterized in that: The method further comprises: performing a preprocessing operation on the face image of the user to be identified to obtain a standard face image; 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 of 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 a user to be identified includes: Determine whether a face exists in the standard face image in the standard face image sequence based on the trained target detection model, and if a face exists, calculate the area of the face frame of the standard face image in the standard face image sequence; Taking the standard face image with the largest face frame area as the image to be identified, and cropping the image to be identified to obtain the target face image; Feature point detection is performed on the target face 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 face image is aligned based on the affine transformation matrix to obtain an aligned target face image.
6. The access control system based on face recognition technology according to claim 5 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: Extracting features from the aligned target face image to obtain a face feature vector, and encoding the face 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 5 is characterized in that: 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 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.
8. The access control system based on face recognition technology according to claim 7 is characterized in that: The expression of the global attention unit is as follows: Among them, Att G represents the global attention operator, represents matrix multiplication, represents the Softmax activation function, pwConv represents a 1×1 point-wise convolutional layer, MLP represents a multi-layer perceptron, G sa represents the global spatial attention and Transpos represents the transposition operation.
9. The access control system based on face recognition technology according to claim 8, characterized in that: The expression of the local attention unit is as follows: Among them, Att L represents the local attention operator, ⊙ represents the matrix element-by-element multiplication, σ represents the Sigmoid activation function, and F C Represents three stacked 1×1 convolutional layers and a 3×3 depthwise separable convolutional layer.
10. 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 9, 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; Preprocessing 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 face features of the standard face image sequence into a pre-constructed face 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
Target detection model training method and device
CN110751185A
Tablet surface defect detection method based on deep learning image semantic segmentation and automatic processing device thereof
CN113129288A