Construction site face recognition system and low-quality image recognition optimization method suitable for general CPU
By optimizing the image preprocessing, detection, and feature extraction processes of the construction site facial recognition system, the problems of slow recognition speed and poor image quality on ordinary CPUs at construction sites have been solved, achieving efficient and secure identity recognition and rapid registration, and adapting to the characteristics of low-quality images at construction sites.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIAN NEW DISTRICT DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2026-04-10
- Publication Date
- 2026-05-29
AI Technical Summary
Construction site facial recognition systems run slowly on ordinary CPUs, produce poor image quality, pose a risk of cheating, and have high personnel turnover, making it difficult for existing technologies to balance recognition accuracy and operational efficiency.
The construction site face recognition system, adapted to ordinary CPUs, includes a data processing module, a face detection module, a silent liveness detection module, a face alignment module, a simplified quantization module, and a vector database. Through image preprocessing, face detection, liveness detection, alignment, and feature extraction optimization, combined with lightweight neural networks and quantization technology, it is adapted to the characteristics of low-quality images on construction sites.
While ensuring recognition accuracy and anti-cheating capabilities, it improves operational efficiency, meets the high-efficiency use needs of construction site attendance and access control, and reduces application and promotion costs.
Smart Images

Figure CN122116091A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of facial recognition technology, specifically to a construction site facial recognition system adapted to ordinary CPUs and a method for optimizing low-quality image recognition. Background Technology
[0002] With the advancement of smart construction site development, facial recognition technology, due to its contactless, efficient, and convenient characteristics, is widely used in scenarios such as worker attendance and access control. However, construction site scenarios present several unique challenges: First, equipment resources are limited. Commonly used facial recognition devices on construction sites are mostly ordinary CPU computers, lacking high-performance graphics cards. Existing facial recognition models are large in size and run slowly on ordinary CPUs, making it difficult to meet real-time attendance requirements. Second, image quality is poor. The lighting environment on construction sites is complex, with issues such as overexposure, underexposure, and backlighting. Furthermore, workers often wear safety helmets, causing facial occlusion and non-standard postures, resulting in low-quality facial images. Third, the risk of cheating is high. Some workers may use photos, printed documents, or other spoofs to cheat on attendance, requiring a reliable liveness detection mechanism. Fourth, there is high personnel turnover. Construction site workers frequently join and leave, requiring the system to support rapid registration and updating of identity information.
[0003] In existing technologies, preprocessing, face detection, and pose correction steps related to face recognition have been widely reported, and YuNet and ResNet50 networks are also widely used due to their respective advantages. For example, some technologies use YuNet for face detection and ResNet50 for facial feature extraction, but they are not specifically optimized for the computing power limitations of ordinary CPUs in construction sites; other technologies optimize the model to be slimmer and adaptable to low-computing devices, but they do not take into account the low-quality image characteristics of construction site scenarios and actual usage needs, resulting in a difficulty in achieving both recognition accuracy and operational efficiency.
[0004] In addition, existing technologies do not take into account the needs of liveness detection and personnel management in the special environment of construction sites. Liveness detection requires additional hardware such as thermal imagers and depth cameras, or the use of interactive methods such as blinking and opening mouth. The former increases costs, while the latter reduces passage efficiency and has problems such as low recognition accuracy, insufficient cheating prevention, and poor adaptability.
[0005] Therefore, there is an urgent need for a recognition solution specifically designed for ordinary CPUs on construction sites, while also adapting to the characteristics of low-quality facial images on construction sites. This solution should improve operational efficiency and meet the actual needs of smart construction sites, while ensuring recognition accuracy and anti-cheating capabilities. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a construction site face recognition system and a low-quality image recognition optimization method adapted to ordinary CPUs, so as to solve the problems of low recognition rate of low-quality face images on construction sites, difficulty in model deployment, and long search time.
[0007] The technical solution of this invention is: a construction site face recognition system adapted to ordinary CPUs, used for attendance and access control scenarios on construction sites. It is deployed on an ordinary CPU and performs inference and data processing operations based on the ONNX runtime inference engine. It includes: Data processing module: used to receive the input raw image and preprocess the raw image. The preprocessing includes quality assessment, illumination correction and normalization scaling, which is used to adapt to the face detection module. Face detection module: Connected to the data processing module, it is obtained by pruning the YuNet network built into OpenCV. It is used to receive the image after preprocessing by the data processing module, perform face detection and obtain the face bounding box and the coordinates of key facial organs. It is also used to calibrate the coordinates of key facial organs and calculate the transformation matrix used to define the relationship between face pose and position transformation based on the calibrated coordinates of key facial organs. Silent liveness detection module: It is a lightweight neural network model. This lightweight neural network model is trained and optimized with construction site scene samples. It shares the OpenCV tool library with the face detection module and the quantization module. It is used to receive the face bounding box output by the face detection module, and after expanding the face bounding box, it performs inference scoring on the face region to exclude fake face images and obtain valid face images. Face alignment module: Connected to the face detection module and the silent liveness detection module, it receives the valid face image filtered by the silent liveness detection module, constructs an affine transformation relationship based on the transformation matrix output by the face detection module, and corrects the valid face image into a standard valid face image with uniform pose and size; it is also used to perform image flipping, stitching, normalization and data dimension adjustment on the standard valid face image to obtain a preprocessed face image adapted to the input format of the simplified quantization module; Simplified quantization module: Obtained by simplifying and quantizing the Resnet50 network, it is used to receive the preprocessed face image after the face alignment module and extract the face feature vector of the preprocessed face image; Feature post-processing module: Connected to the quantization module, it performs mean calculation and L2 norm normalization on the face feature vector output by the quantization module to obtain the final face feature vector; Vector database: Used to store the final face feature vectors processed by the feature post-processing module.
[0008] The aforementioned construction site face recognition system adapted to ordinary CPUs includes a data processing module that integrates a BRISQUE scoring unit, a Retinex illumination correction unit, and a standardization processing unit. The BRISQUE scoring unit calculates the no-reference quality score of the original image, sets a low-quality threshold adapted to the characteristics of low-quality construction site images, and determines whether the original image has overexposure and / or underexposure defects based on the low-quality threshold. The Retinex illumination correction unit, connected to the BRISQUE scoring unit, performs multi-scale Gaussian filtering illumination correction on the original image when the no-reference quality score is higher than the low-quality threshold, eliminating overexposure and / or underexposure problems. The standardization processing unit, connected to the BRISQUE scoring unit and the Retinex illumination correction unit, performs standardized scaling on the input image while maintaining its aspect ratio.
[0009] The aforementioned construction site face recognition system adapted to ordinary CPUs involves the following steps: YuNet network pruning involves removing large-scale branch heads and corresponding weights from the YuNet network while preserving its dynamic input characteristics; ResNet50 network simplification involves automatically simplifying the network structure using the onnxslim tool, eliminating redundant nodes, and integrating scattered computational steps to optimize the network structure for compatibility with the onnxruntime inference engine; and quantization involves using the onnxruntime tool to convert the simplified ResNet50 network from fp32 format to int8 format, and using real worker face samples from the construction site as calibration data.
[0010] The aforementioned construction site face recognition system adapted to ordinary CPUs uses the Milvus vector database. The face feature vectors stored in this vector database are organized into a search index according to the project, work group, and worker levels to support rapid retrieval and matching of face feature vectors.
[0011] A method for optimizing low-quality image recognition in a construction site face recognition system adapted to ordinary CPUs includes the following steps: S1. Image preprocessing: The data processing module performs quality assessment, illumination correction, and normalized scaling on the received raw image to obtain a processed image with uniform specifications; S2. Face Detection: Input the processed image into the face detection module to obtain the face bounding box and coordinates of key facial organs; perform face bounding box consistency calibration on the coordinates of key facial organs to obtain calibrated coordinates of key facial organs; calculate the transformation matrix used to define the face space transformation relationship based on the calibrated coordinates of key facial organs. S3. Liveness and Non-Face Detection Filtering: The face bounding box obtained in step S2 is input into the silent liveness detection module. First, the silent liveness detection module expands the coordinates of the face bounding box, crops the face sub-image containing background information, and performs spoofing scoring. A spoofing threshold is set. If the score is higher than the spoofing threshold, it is judged as a spoofing and excluded. Then, OpenCV is used to convert the face sub-image into a YCrCb chromaticity histogram, calculate the gray level distribution of the Cr component, and exclude portrait and anime-style non-realistic face images through voting method to obtain the final valid face image. S4. Face Alignment: Based on step S3, the face alignment module obtains the coordinates of key facial organs and the transformation matrix corresponding to the final effective face image from the face detection module; the face alignment module constructs an affine transformation relationship based on the transformation matrix to correct the effective face image, resulting in a standard effective face image with uniform pose and size. S5. Feature Extraction: The face alignment module flips, stitches, normalizes, and adjusts the dimensions of the standard effective face image from step S4, and then inputs it into the simplification and quantization module to extract the face feature vector; the feature post-processing module then calculates the mean and normalizes the extracted face feature vector using the L2 norm to obtain the final face feature vector. S6. Feature storage and matching: If the received original image is a background image for construction site personnel registration, the final face feature vector obtained in step S5 is stored in the vector database. If the received original image is an attendance query image, the face feature vector with the highest similarity to the final face feature vector is searched in the vector database and a matching score is calculated. When the matching score is higher than the set matching threshold, the identity matching is determined to be successful and the identity recognition is completed.
[0012] The aforementioned method for optimizing low-quality image recognition in a construction site face recognition system adapted to a common CPU includes the image preprocessing described in step S1, which comprises: (1) The data processing module receives the original image and converts it into BGR format. It then uses the BRISQUE scoring unit to calculate the no-reference quality score of the input image. (2) The data processing module sets the low quality threshold without reference quality score to 37.5. If it is higher than the low quality threshold, it is determined that the image has overexposure and / or underexposure problems, and then enters the Retinex illumination correction unit to perform Retinex algorithm correction. (3) The data processing module performs aspect ratio-preserving normalized scaling on the original image with no reference quality score not higher than the low quality threshold and the image after correction by the Retinex illumination correction unit, and adapts different resolutions according to the business scenario: if it is to be stored in the vector database, the resolution after scaling is 960×960 pixels; if it is to query attendance, the resolution after scaling is 1024×1024 pixels.
[0013] The aforementioned low-quality image recognition optimization method for a construction site face recognition system adapted to ordinary CPUs, specifically the process of obtaining the coordinates of key facial organs in step S2, is as follows: (1) Input the image after standardization and scaling in step S1 into the face detection module and set the confidence threshold of the face detection module to 0.65; The face detection module outputs a 15-element array containing the coordinates of the face bounding box, the coordinates of the left and right eyes, the coordinates of the tip of the nose, the coordinates of the left and right corners of the mouth and the corresponding confidence scores. Sort the arrays in ascending order of the x-coordinate of the face bounding box coordinates and filter out the 15-element arrays with confidence scores lower than 0.65, and retain the valid data groups. (2) Based on step (1), the actual size of the face bounding box on the original image is restored by scaling ratio, and the coordinates of the key facial organs are converted into relative coordinates within the corresponding face bounding box. The accurate calibration of the key facial organ coordinates and the face bounding box is completed, and the calibrated key facial organ coordinates are obtained.
[0014] The aforementioned low-quality image recognition optimization method for a construction site face recognition system adapted to ordinary CPUs, wherein the specific process of step S3, liveness and non-face detection filtering, is as follows: (1) The silent liveness detection module retrieves the face bounding box output in step S2, expands the face bounding box by 112 pixels in each direction, and stops expanding if it reaches the image boundary during the expansion process; the expanded face sub-image is cropped from the image based on the expanded face bounding box; if the expanded face sub-image is not square, the short side of the expanded face sub-image is filled by symmetrical filling to ensure that the expanded face sub-image is square and forms a detection array; (2) The silent liveness detection module performs inference on the detection array and outputs the probability of fake face and the probability of stylized face; if the probability of fake face and the probability of stylized face are both greater than 0.98, the corresponding face information is removed from the detection array. (3) The silent liveness detection module performs color space conversion on the facial region in the detection array retained in step (2), mapping it from the RGB color space to the YCrCb color space, and calculates the grayscale histogram of the Cr channel separately; the grayscale levels of the grayscale histogram are sorted in descending order by the number of pixels, and the top three grayscale levels are selected for voting: if the grayscale level is in the image grayscale level range of 80-120, it is counted as 1 vote; when the number of votes is greater than or equal to 2, the corresponding face is determined to be a non-real human face skin color, and its corresponding face information is removed from the detection array; wherein, the color conversion formula from RGB to YCrCb is: ; In the formula, Y is the luminance component, which only represents the brightness of the image and is independent of color. It is obtained by weighting RGB values. R is the pixel value of the Red channel. B is the pixel value of the Blue channel. G is the pixel value of the Green channel. Cr is the red difference component, which is the difference between the red channel and the luminance. Cb is the blue difference component, which is the difference between the blue channel and the luminance. The value of delta is adapted to the data bit depth: delta=128 for 8-bit bit depth, delta=32768 for 16-bit bit depth, and delta=0.5 for float type.
[0015] The aforementioned low-quality image recognition optimization method for a construction site face recognition system adapted to ordinary CPUs, wherein the specific process of feature extraction in step S5 is as follows: (1) Set the fixed input size of the simplified quantization module to 112×112 pixels and the number of input batches to 2, and output two sets of 512-dimensional face features; (2) The standard effective face image of 112×112 pixels is horizontally flipped by the face alignment module to obtain the flipped face image. The standard effective face image and the flipped face image are stitched together to obtain the stitched image. The stitched image is normalized in the range of [-1, 1] and the data dimension arrangement is adjusted. Then it is input into the simplification and quantization module to extract the face feature vector. (3) The feature post-processing module adds the two sets of 512-dimensional face features output by the quantization module and calculates the average value to obtain the denoised face features; then the feature post-processing module calculates the L2 norm normalization of the denoised face features to obtain a single final face feature vector; repeat the above operation until the feature vector extraction of all standard valid face images is completed.
[0016] The aforementioned method for optimizing low-quality image recognition in a construction site face recognition system adapted to ordinary CPUs is as follows: In step S6, the vector database is indexed according to the hierarchy of construction site projects, work groups, and workers; when querying attendance, the search scope is first limited according to projects and work groups; the judgment of finding the face feature vector with the highest similarity to the final face feature vector in the vector database is based on the inner product; the matching threshold is 0.3, and when the matching score is ≥0.3, the identity is determined to be successfully matched, and when the matching score is <0.3, it is determined to be not in the database.
[0017] Compared with existing technologies, this invention can effectively adapt to the low computing power of ordinary CPUs on construction sites, solve practical problems such as overexposure, underexposure, fake cheating, and interference from non-real faces in construction site facial images, and does not require the deployment of high-performance computing hardware. It can achieve fast and accurate facial recognition based on the existing attendance and access control systems configured on construction sites, and can realize the rapid registration and updating of identity information, significantly reducing application and promotion costs.
[0018] The face detection module of this invention is obtained by pruning the YuNet network built into OpenCV, and the ResNet50 model is simplified and quantized. Combined with the inference engine, the model can be deployed in a lightweight manner. Without affecting the core detection and feature extraction functions of the model, the model structure can be simplified and the computing power consumption can be reduced, making the model more compatible with the inference capabilities of ordinary CPUs. This ensures that the system can stably output face bounding boxes and key organ coordinates, meeting the usage requirements of subsequent face processing procedures.
[0019] During image preprocessing, image quality assessment determines whether illumination correction should be initiated. This accurately identifies and improves overexposure and underexposure issues in face images, avoids invalid image processing operations, improves preprocessing efficiency, and ensures stable and reliable image quality, providing a high-quality image foundation for subsequent face detection.
[0020] The silent liveness detection module shares the OpenCV tool library with the YuNet model and the simplified ResNet50 model quantized with int8. It has been specifically trained and optimized for construction site scenarios, making it compatible with the inference computing power of ordinary CPUs. This enables fast liveness detection and accurate spoofing, eliminating the need for additional dedicated liveness detection hardware. At the same time, the lightweight silent liveness model and the shared OpenCV tool library do not significantly increase the burden on ordinary CPUs. Furthermore, it can effectively identify spoofing behaviors such as photos and screen captures, preventing non-human attendance cheating and ensuring the authenticity of construction site attendance data, thus providing strong support for smart construction site construction.
[0021] By setting appropriate image resolutions for different business scenarios, setting face detection confidence filtering rules, and performing coordinate calibration and restoration processing on the detection results, accurate face detection can be achieved, adapting to diverse business needs on construction sites, providing accurate basis for face cropping and alignment, and ensuring stable execution of the system process.
[0022] During the liveness detection process, the face region is expanded and filled to form a standard facial sub-image. Combined with model detection and color space feature analysis, dual discrimination is achieved, which can effectively eliminate interference from fake and non-real faces, prevent various cheating behaviors, and improve the security and reliability of the face recognition system.
[0023] In the face cropping and alignment process, an affine matrix is calculated based on the coordinates of key facial organs. The face is then uniformly corrected to a standard position and scaled to a fixed size to achieve face alignment standardization. This eliminates the impact of pose and angle differences on recognition and ensures the accuracy of subsequent feature extraction and identity matching.
[0024] By flipping and stitching the face image, normalizing it, and then inputting it into the simplification and quantization module, the face feature vector is extracted. Then, the face feature vector result is subjected to mean denoising and norm normalization, which can improve the stability and robustness of the feature extraction vector and reduce noise interference. The output standardized feature vector can provide reliable support for identity matching, while speeding up the feature extraction speed and adapting to low computing power operating environment.
[0025] In the feature storage and matching process, the face database is dynamically updated based on the vector database, and the identity determination is completed by inner product similarity calculation. This can adapt to the use scenario of high personnel mobility on construction sites, improve the recognition response speed, stably realize the rapid confirmation of worker identity, and meet the efficient use needs of construction site attendance and access control.
[0026] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0027] Figure 1 This is a logic block diagram of the present invention; Figure 2 This is a diagram illustrating the pruning process in a YuNet network. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Example 1: A construction site face recognition system adapted to a common CPU, such as... Figure 1 As shown, this system, used for attendance and access control at a construction site, is deployed on a regular CPU and performs inference and data processing operations based on the ONNX runtime inference engine. A regular CPU refers to the central processing unit used in home and office computers; compared to server CPUs, regular CPUs prioritize single-threaded performance and response speed. The system consists of a data processing module, a face detection module, a silent liveness detection module, a face alignment module, a quantization module, and a vector database. The data processing module receives the input raw image and preprocesses it. It includes a BRISQUE scoring unit, a Retinex illumination correction unit, and a standardization processing unit. The BRISQUE scoring unit calculates the no-reference quality score of the raw image and sets a low-quality threshold suitable for the characteristics of low-quality construction site images. This low-quality threshold determines whether the raw image has overexposure, underexposure, or other low-quality defects. The Retinex illumination correction unit, connected to the BRISQUE scoring unit, performs multi-scale Gaussian filtering illumination correction on the raw image when its no-reference quality score exceeds the low-quality threshold, eliminating overexposure and underexposure issues. The standardization processing unit, connected to the BRISQUE scoring unit and the Retinex illumination correction unit, performs standardized scaling on the input image while maintaining its aspect ratio, ensuring image standardization and compatibility with the face detection module.
[0030] Face detection module: Connected to the data processing module, it is obtained by pruning the YuNet network built into OpenCV. It is used to receive the image preprocessed by the data processing module, perform face detection and obtain the face bounding box and the coordinates of key facial organs. It is also used to calibrate the coordinates of key facial organs and calculate the transformation matrix used to define the relationship between face pose and position transformation based on the calibrated coordinates of key facial organs.
[0031] The face detection module uses the lightweight YuNet face detection network built into OpenCV. This module is lightweight and efficient, and can be adapted to the running requirements of ordinary CPUs on construction sites.
[0032] The original YuNet face detection network supports small, medium, and large-scale face detection. However, considering the practical application scenario of face recognition at construction sites, the large-scale face detection function has no practical value and would increase computational consumption and reduce inference speed. Therefore, this invention prunes and optimizes the original YuNet face detection network by removing the large-scale detection branch heads and their corresponding weight parameters.
[0033] This invention performs pruning and optimization operations on the original YuNet face detection network, based on the ONNX format model and implemented using the ONNX toolchain, such as... Figure 2As shown, the process is performed on the ONNX format model exported from the original YuNet face detection network (hereinafter referred to as the original YuNet ONNX format model). The specific steps are as follows: (1) Node localization: The Netron lightweight cross-platform model visualization tool (hereinafter referred to as the Netron tool) is used. The Netron tool has lightweight characteristics and is only used for viewing and locating model nodes. It does not participate in model modification operations and can adapt to the usage requirements of system pre-optimization. After importing the original YuNet ONNX format model, the Netron tool automatically displays all nodes and branch structures inside the model in a graphical form, intuitively presenting the node names and relationships corresponding to the small, medium and large scale branches, and realizing the accurate localization of the large scale branch nodes to be removed. (2) Automatic Pruning: Automated pruning is implemented using Python programming language in conjunction with the official ONNX library. The specific process is as follows: The original YuNet ONNX model is loaded by calling the official ONNX library and the core computational graph structure of the model is read; all nodes in the computational graph are traversed through the code, and the large-scale branch nodes located by the Netron tool are used as the matching criteria. The successfully matched nodes are marked and added to the list to be deleted; after the traversal is completed, all nodes in the list to be deleted are removed at once through the official ONNX library interface, and useless weights associated with the above nodes are cleaned up simultaneously to generate the pruned YuNet ONNX format model. After pruning is completed, the model can be opened again through the Netron tool to verify whether the large-scale branches have been completely removed, ensuring that the core detection function of the pruned YuNet ONNX format model remains unchanged.
[0034] The tools used in the above pruning and optimization process are all lightweight and easy to deploy. Netron is small in size and easy to install, while the Python environment and ONNX official libraries are standard tools for AI model optimization. Their installation and deployment on the on-site computer will not consume excessive hardware resources and are compatible with the toolchains used in subsequent model export and quantization processes. All pruning and optimization operations are completed before system deployment and operation, and the execution process does not consume the on-site CPU's inference computing power.
[0035] Silent Liveness Detection Module: This is a lightweight neural network model trained and optimized using construction site scene samples. It shares the OpenCV toolkit with the face detection module and the quantization module. It receives the face bounding boxes output by the face detection module, expands the bounding boxes, and performs inference scoring on the face region to exclude spoofed face images and obtain valid face images. Specifically, this lightweight neural network model adopts the MobileNetV2 network architecture, which consists of a sequentially connected network input layer, an initial convolutional layer, stacked inverse residual blocks, and a bottle... The network consists of a neck projection layer, a global average pooling layer, and a fully connected output layer. The network input layer receives the face region image after expanding the bounding box, performs preliminary feature extraction through an initial convolutional layer, and then inputs it into a stacked inverse residual block. The stacked inverse residual block employs a three-segment structure of "1×1 channel expansion - 3×3 depthwise convolution - 1×1 linear projection" to extract shallow facial texture features (such as skin texture and fine facial wrinkles). The bottleneck projection layer reduces feature information loss to improve prosthetic recognition accuracy. The global average pooling layer compresses feature dimensions and reduces computational cost. Finally, the fully connected output layer outputs probability scores in the 0-1 range.
[0036] Face alignment module: Connected to the face detection module and the silent liveness detection module, it receives the valid face image filtered by the silent liveness detection module, constructs an affine transformation relationship based on the transformation matrix output by the face detection module, and corrects the valid face image into a standard valid face image with uniform pose and size; it is also used to perform image flipping, stitching, normalization and data dimension adjustment on the standard valid face image to obtain a preprocessed face image adapted to the input format of the simplified quantization module; Simplified quantization module: Obtained by simplifying and quantizing the Resnet50 network, it is used to receive the preprocessed face image after the face alignment module and extract the face feature vector of the preprocessed face image; The Resnet50 network simplification is achieved by using the onnxslim tool to automatically simplify the network structure, eliminate redundant nodes, integrate scattered computation steps, and optimize the network structure to adapt to the onnxruntime inference engine. Specifically, based on the ONNX format model and using the ONNX toolchain, the following steps were performed: After exporting the original ResNet50 network's ONNX model, a batch of random face images simulating real-world construction site attendance scenarios (covering different lighting, poses, and occlusion conditions) were selected. These images were preprocessed to a 112×112 size and then input into the ResNet50 ONNX model. The ONNX runtime inference engine generated a complete computational graph of the model, clearly showing the entire computational process, data flow, and initializers of the ResNet50 ONNX model from image input to feature output. The ONNXSlim tool was then used to automatically simplify this entire computational process, detecting and deleting redundant nodes and corresponding initializers that did not participate in actual feature extraction. Scattered computational steps were merged, and the ResNet50 network structure was optimized to adapt to the acceleration logic of the ONNX runtime inference engine, ultimately resulting in a smaller, less computationally intensive, simplified ResNet50 model.
[0037] The quantization process involves using the `onnxruntime` tool to perform static quantization on a simplified ResNet50 model. This converts the simplified ResNet50 model from fp32 format to int8 format, further compressing its size and reducing memory usage and CPU consumption. To avoid accuracy deviations during quantization, a batch of real worker face photos from construction sites are selected as calibration samples (covering common construction site scenarios and consistent with actual attendance photos). A `CalibrationDataReader` data reading tool is written to import the calibration samples into the `quantize_static` function of `onnxruntime`. This allows the model to learn the facial features of real workers during quantization, correcting accuracy deviations. After quantization, the simplified ResNet50 model is saved in int8 format for subsequent facial feature vector extraction steps.
[0038] Feature post-processing module: Connected to the quantization module, it performs mean calculation and L2 norm normalization on the face feature vector output by the quantization module to obtain the final face feature vector; Vector Database: Used to store facial feature vectors extracted by the quantization module. The vector database adopts the Milvus vector database, and the facial feature vectors stored in the vector database are indexed by project, work group, and worker level to support fast retrieval and matching of facial feature vectors.
[0039] A method for optimizing low-quality image recognition in a construction site face recognition system adapted to ordinary CPUs includes the following steps: S1. Image preprocessing: The data processing module performs quality assessment, illumination correction, and normalized scaling on the received raw image to obtain a processed image with uniform specifications; S2. Face Detection: Input the processed image into the face detection module to obtain the face bounding box and coordinates of key facial organs; perform face bounding box consistency calibration on the coordinates of key facial organs to obtain calibrated coordinates of key facial organs; calculate the transformation matrix used to define the face space transformation relationship based on the calibrated coordinates of key facial organs. S3. Liveness and Non-Face Detection Filtering: The face bounding box obtained in step S2 is input into the silent liveness detection module. First, the silent liveness detection module expands the upper, lower, left, and right coordinates of the face bounding box, and crops the face sub-image containing background information. Then, a spoofing score is performed, and a spoofing threshold is set. If the score is higher than the spoofing threshold, it is judged as a spoofing and excluded. Then, OpenCV is used to convert the face sub-image into a YCrCb chromaticity histogram, calculate the gray level distribution of the Cr component, and exclude portrait and anime-style non-realistic face images through a voting method to obtain the final valid face image. S4. Face Alignment: Based on step S3, the face alignment module obtains the coordinates of key facial organs and the transformation matrix corresponding to the final effective face image from the face detection module; the face alignment module constructs an affine transformation relationship based on the transformation matrix to correct the effective face image, resulting in a standard effective face image with uniform pose and size. S5. Feature Extraction: The face alignment module flips, stitches, normalizes, and adjusts the dimensions of the standard effective face image from step S4, and then inputs it into the simplification and quantization module to extract the face feature vector; the feature post-processing module then calculates the mean and normalizes the extracted face feature vector using the L2 norm to obtain the final face feature vector. S6. Feature storage and matching: If the received original image is a background image for construction site personnel registration, the final face feature vector obtained in step S5 is stored in the vector database. If the received original image is an attendance query image, the face feature vector with the highest similarity to the final face feature vector is searched in the vector database and a matching score is calculated. When the matching score is higher than the set matching threshold, the identity matching is determined to be successful and the identity recognition is completed.
[0040] The image preprocessing described in step S1 includes: (1) The data processing module receives the original image and converts it into BGR format. It then uses the BRISQUE scoring unit to calculate the no-reference quality score of the input image. (2) The data processing module sets the low quality threshold of no reference quality score to 37.5: If the no reference quality score of the original image is higher than this low quality threshold, it is determined that the image has overexposure / underexposure problems, and enters the Retinex illumination correction unit to perform Retinex algorithm correction; During Retinex algorithm correction, the image is processed by Gaussian filtering with standard deviations of 15, 100 and 250 to obtain the incident component, and the single-scale Retinex result is calculated based on the incident component. Then, the arithmetic mean of the single-scale Retinex results of the three scales is taken to restore the natural color and facial detail features of the image. (3) The data processing module performs standardized scaling that maintains the aspect ratio on the original image with no reference quality score not higher than the low quality threshold, as well as the image after correction by the Retinex illumination correction unit, and adapts different resolutions according to the business scenario: if it is used to store in the vector database, the scaled resolution is 960×960 pixels; if it is used for attendance query, the scaled resolution is 1024×1024 pixels.
[0041] The specific process for obtaining the coordinates of key facial organs in step S2 is as follows: (1) Input the image after standardization and scaling in step S1 into the face detection module and set the confidence threshold of the face detection module to 0.65. The face detection module outputs a 15-element array containing the face bounding box coordinates, left and right eye coordinates, nose tip coordinates, left and right mouth corner coordinates and corresponding confidence scores (the 15 elements are 4 elements for face bounding box coordinates, 2 elements for left eye coordinates, 2 elements for right eye coordinates, 2 elements for nose tip coordinates, 2 elements for left mouth corner coordinates, 2 elements for right mouth corner coordinates, and 1 element for confidence score). Sort the arrays in ascending order of the x-coordinate of the face bounding box coordinates and filter out the 15-element arrays with confidence scores lower than 0.65, and retain the valid data groups. (2) Based on step (1), the actual size of the face bounding box on the original image is restored by scaling ratio, and the coordinates of the key facial organs are converted into relative coordinates within the corresponding face bounding box. The accurate calibration of the key facial organ coordinates and the face bounding box is completed, and the calibrated key facial organ coordinates are obtained.
[0042] The specific process of step S3, liveness and non-face detection filtering, is as follows: (1) The silent liveness detection module retrieves the face bounding box output in step S2, expands the face bounding box by 112 pixels in each direction, and stops expanding if it reaches the image boundary during the expansion process; the expanded face sub-image is cropped from the image based on the expanded face bounding box; if the expanded face sub-image is not square, the short side of the expanded face sub-image is filled by symmetrical filling to ensure that the expanded face sub-image is square and forms a detection array; (2) The silent liveness detection module performs inference on the detection array and outputs the probability of fake face and the probability of stylized face; if the probability of fake face and the probability of stylized face are both greater than 0.98, the corresponding face information is removed from the detection array. (3) The silent liveness detection module performs color space conversion on the facial region in the detection array retained in step (2), mapping it from the RGB color space to the YCrCb color space, and calculates the grayscale histogram of the Cr channel separately; the grayscale levels of the grayscale histogram are sorted in descending order by the number of pixels, and the top three grayscale levels are selected for voting: if the grayscale level is in the image grayscale level range of 80-120, it is counted as 1 vote; when the number of votes is greater than or equal to 2, the corresponding face is determined to be a non-real human face skin color, and its corresponding face information is removed from the detection array; wherein, the color conversion formula from RGB to YCrCb is: ; In the formula, Y is the luminance component, which only represents the brightness of the image and is independent of color. It is obtained by weighting RGB values. R is the pixel value of the Red channel. B is the pixel value of the Blue channel. G is the pixel value of the Green channel. Cr is the red difference component, which is the difference between the red channel and the luminance. Cb is the blue difference component, which is the difference between the blue channel and the luminance. The value of delta is adapted to the data bit depth: delta=128 for 8-bit bit depth, delta=32768 for 16-bit bit depth, and delta=0.5 for float type.
[0043] The specific process of face alignment described in step S4 is as follows: The face alignment module obtains the coordinates of key facial organs and the transformation matrix corresponding to the final effective face image from the face detection module; the face alignment module constructs an affine transformation relationship based on the transformation matrix, aligns the key facial parts to the standard reference position through the affine matrix, and simultaneously scales the aligned face image to a fixed resolution of 112×112 to obtain a standard effective face image with uniform posture and size. The specific process of feature extraction described in step S5 is as follows: (1) Set the fixed input size of the simplified quantization module to 112×112 pixels and the number of input batches to 2, and output two sets of 512-dimensional face features; (2) The standard effective face image of 112×112 pixels is horizontally flipped by the face alignment module to obtain the flipped face image. The standard effective face image and the flipped face image are stitched together to obtain the stitched image. The stitched image is normalized in the range of [-1, 1] and the data dimension arrangement is adjusted. Then it is input into the simplification and quantization module to extract the face feature vector. (3) The feature post-processing module adds the two sets of 512-dimensional face feature vectors output by the quantization module and calculates the average value to obtain the denoised face feature vector; then the feature post-processing module calculates the L2 norm normalization of the denoised face feature vector to obtain a single final face feature vector; repeat the above operation until the final face feature vector extraction of all standard valid face images is completed.
[0044] In step S6, the vector database is indexed according to the hierarchy of construction site projects, work groups, and workers. When querying attendance, the search scope is first limited according to the project and work group. The judgment of finding the face feature vector with the highest similarity to the final face feature vector in the vector database is based on the inner product. The matching threshold is 0.3. When the matching score is ≥0.3, the identity is determined to be successfully matched. When the matching score is <0.3, it is determined to be not in the database.
[0045] The vector database used is the Milvus vector database, and it is divided into a dynamic face database construction stage and a vector search and identity matching stage. The specific process is as follows: Dynamic face database construction phase (1) Configure the HNSW graph indexing algorithm parameters in the Milvus vector database, set the maximum number of node connections M=16, and the neighbor candidate set size efConstruction=200 during index construction to optimize vector retrieval efficiency; (2) Create a face database set in the Milvus vector database, and design a data structure schema based on the business characteristics of smart construction sites. Construct a three-level retrieval hierarchy of project, team, and worker, and configure a dedicated index structure for each level to narrow the retrieval scope and improve the speed of vector search. The specific field definitions of the data structure schema are shown in Table 1. Table 1. Face Database Data Structure ; (3) When adding a new worker, the final face feature vector output in step S5, along with metadata information such as project, work group, and worker, is inserted into the vector database to dynamically complete the construction and update of the face database, adapting to the needs of scenarios with high worker mobility on construction sites.
[0046] Vector search and identity matching stage (1) For the attendance query image to be matched, submit the multiple final face feature vectors output in step S5 through the Milvus batch query interface for retrieval. First, limit the retrieval range according to project_id and team_id, and then use the inner product as the vector similarity metric to calculate the Top1 most similar face feature vector in the face database for each final face feature vector. Since the final face feature vector has been normalized by L2 norm, the value range of the inner product similarity score is [0,1]. (2) Determine the worker's identity based on the preset face matching threshold (0.3): If the inner product similarity score is ≥0.3, the worker's face is determined to be in the database and identity matching is completed. The worker's relevant information is output and attendance registration or access control is completed. If the inner product similarity score is <0.3, the worker is determined not to be in the database and a message is displayed indicating that the worker is not registered or the identity does not match.
[0047] Example 2: To further verify the effectiveness of the present invention, the following comparative experiments were conducted, with ArcSoft Face Recognition ARM PRO (v5.0), Baidu Face Recognition Offline SDK (v7.1), and the present invention as the subjects.
[0048] The test metrics are explained below: (1) Face detection rate: The proportion of faces detected by the algorithm in an image out of all faces in the image. It is used to measure the accuracy of the face detection algorithm.
[0049] (2) Top-1 recognition rate: The probability that a correctly identified face appears first in the face search results. It is used to measure the recall rate of face recognition algorithms.
[0050] (3) Throughput: The number of complete business requests processed by the system per second.
[0051] (4) Average response time: the arithmetic mean of the response times of all requests.
[0052] (5) CPU utilization: the average utilization of all CPUs in the system.
[0053] The test environment is as follows: Operating system: Ubuntu 18.04.6 LTS; Hardware architecture: ARM64; Number of CPU cores: 32; Memory size: 64G; Disk size: 300G.
[0054] 1. The test comparison results are as follows: Table 2 Face Detection Rate ; Table 3 Top-1 Recognition Rate ; Table 4 Performance Indicators .
[0055] 2. The test results for the same low-quality image under different algorithm services are as follows: Of the six faces detected, ArcSoft ARM PRO (v5.0) only detected three, while Baidu Face Recognition Offline SDK (v7.1) and this invention both detected six faces. However, Baidu Face Recognition Offline SDK (v7.1) had one face incorrectly identified, while this invention correctly identified all six faces. The specific statistics are as follows: Table 5. Comparison of recognition methods for the same low-quality image. .
[0056] 3. The face recognition results in long-distance scenarios are as follows: Among 10 faces, ArcSoft Face Recognition ARM PRO (v5.0) only detected 3 faces, while Baidu Face Recognition Offline SDK (v7.1) and this invention both detected 10 faces. However, Baidu Face Recognition Offline SDK (v7.1) only correctly identified 5 faces, while this invention correctly identified 9 faces. Table 6 Comparison of Face Recognition Results in Long-Distance Scenarios .
[0057] The above experiments further demonstrate that this invention optimizes existing construction site facial recognition systems, making the entire system suitable for the low-computing-power scenarios of ordinary CPUs on construction sites. Based on this optimized system, combined with low-quality image recognition optimization methods, it solves the technical problems of poor facial image quality, spoofing, low recognition efficiency, and high hardware costs on construction sites. Through specific embodiments, this invention can achieve fast and accurate facial recognition in construction site attendance and access control scenarios, and has the advantages of convenient operation, low deployment cost, and adaptability to the needs of construction site personnel management and hardware environment, providing strong support for the construction of smart construction sites.
[0058] The above description is merely a preferred embodiment of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments without departing from the technical solution of the present invention and based on the technical essence of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. A facial recognition system for construction sites adapted to ordinary CPUs, used for attendance and access control scenarios on construction sites, characterized in that, It is deployed on a regular CPU and performs inference and data processing operations based on the ONNX runtime inference engine, including: Data processing module: used to receive the input raw image and preprocess the raw image. The preprocessing includes quality assessment, illumination correction and normalization scaling, which is used to adapt to the face detection module. Face detection module: Connected to the data processing module, it is obtained by pruning the YuNet network built into OpenCV. It is used to receive the image after preprocessing by the data processing module, perform face detection and obtain the face bounding box and the coordinates of key facial organs. It is also used to calibrate the coordinates of key facial organs and calculate the transformation matrix used to define the relationship between face pose and position transformation based on the calibrated coordinates of key facial organs. Silent liveness detection module: It is a lightweight neural network model. This lightweight neural network model is trained and optimized with construction site scene samples. It shares the OpenCV tool library with the face detection module and the quantization module. It is used to receive the face bounding box output by the face detection module, and after expanding the face bounding box, it performs inference scoring on the face region to exclude fake face images and obtain valid face images. Face alignment module: Connected to the face detection module and the silent liveness detection module, it receives the valid face image filtered by the silent liveness detection module, constructs an affine transformation relationship based on the transformation matrix output by the face detection module, and corrects the valid face image into a standard valid face image with uniform pose and size; it is also used to perform image flipping, stitching, normalization and data dimension adjustment on the standard valid face image to obtain a preprocessed face image adapted to the input format of the simplified quantization module; Simplified quantization module: Obtained by simplifying and quantizing the Resnet50 network, it is used to receive the preprocessed face image after the face alignment module and extract the face feature vector of the preprocessed face image; Feature post-processing module: Connected to the quantization module, it performs mean calculation and L2 norm normalization on the face feature vector output by the quantization module to obtain the final face feature vector; Vector database: Used to store the final face feature vectors processed by the feature post-processing module.
2. The construction site face recognition system adapted to a common CPU according to claim 1, characterized in that: The data processing module incorporates a BRISQUE scoring unit, a Retinex illumination correction unit, and a standardization processing unit. The BRISQUE scoring unit calculates the no-reference quality score of the original image, sets a low-quality threshold adapted to the characteristics of low-quality construction site images, and determines whether the original image has overexposure and / or underexposure defects based on the low-quality threshold. The Retinex illumination correction unit is connected to the BRISQUE scoring unit and performs multi-scale Gaussian filtering illumination correction on the original image when the no-reference quality score is higher than the low-quality threshold to eliminate overexposure and / or underexposure problems. The standardization processing unit is connected to the BRISQUE scoring unit and the Retinex illumination correction unit and performs standardized scaling on the input image while maintaining the aspect ratio.
3. The construction site face recognition system adapted to a common CPU according to claim 2, characterized in that: The YuNet network pruning involves removing large-scale branch heads and corresponding weights from the YuNet network while preserving its dynamic input characteristics. The ResNet50 network simplification involves automatically simplifying the network structure using the onnxslim tool, eliminating redundant nodes, integrating scattered computational steps, and optimizing the network structure to adapt to the onnxruntime inference engine. The quantization involves using the onnxruntime tool to convert the simplified ResNet50 network from fp32 format to int8 format, and using real worker face samples from construction sites as calibration data.
4. The construction site face recognition system adapted to a common CPU according to claim 3, characterized in that: The vector database uses the Milvus vector database, which stores facial feature vectors and constructs a retrieval index according to the project, work group, and worker levels to support fast retrieval and matching of facial feature vectors.
5. A method for optimizing low-quality image recognition in a construction site face recognition system adapted to a common CPU, as described in claim 4, characterized in that: Includes the following steps: S1. Image preprocessing: The data processing module performs quality assessment, illumination correction, and normalized scaling on the received raw image to obtain a processed image with uniform specifications; S2. Face Detection: Input the processed image into the face detection module to obtain the face bounding box and coordinates of key facial organs; perform face bounding box consistency calibration on the coordinates of key facial organs to obtain calibrated coordinates of key facial organs; calculate the transformation matrix used to define the face space transformation relationship based on the calibrated coordinates of key facial organs. S3. Liveness and Non-Face Detection Filtering: The face bounding box obtained in step S2 is input into the silent liveness detection module. First, the silent liveness detection module expands the coordinates of the face bounding box, crops the face sub-image containing background information, and performs spoofing scoring. A spoofing threshold is set. If the score is higher than the spoofing threshold, it is judged as a spoofing and excluded. Then, OpenCV is used to convert the face sub-image into a YCrCb chromaticity histogram, calculate the gray level distribution of the Cr component, and exclude portrait and anime-style non-real face images through voting method to obtain the final valid face image. S4. Face Alignment: Based on step S3, the face alignment module obtains the coordinates of key facial organs and the transformation matrix corresponding to the final effective face image from the face detection module; the face alignment module constructs an affine transformation relationship based on the transformation matrix to correct the effective face image, resulting in a standard effective face image with uniform pose and size. S5. Feature Extraction: The face alignment module flips, stitches, normalizes, and adjusts the dimensions of the standard effective face image from step S4, and then inputs it into the simplification and quantization module to extract the face feature vector; the feature post-processing module then calculates the mean and normalizes the extracted face feature vector using the L2 norm to obtain the final face feature vector. S6. Feature storage and matching: If the received original image is a background image for construction site personnel registration, the final face feature vector obtained in step S5 is stored in the vector database. If the received original image is an attendance query image, the face feature vector with the highest similarity to the final face feature vector is searched in the vector database and a matching score is calculated. When the matching score is higher than the set matching threshold, the identity matching is determined to be successful and the identity recognition is completed.
6. The method for optimizing low-quality image recognition in a construction site face recognition system adapted to a common CPU, as described in claim 5, is characterized in that... The image preprocessing described in step S1 includes: (1) The data processing module receives the original image and converts it into BGR format. It then uses the BRISQUE scoring unit to calculate the no-reference quality score of the input image. (2) The data processing module sets the low quality threshold without reference quality score to 37.
5. If it is higher than the low quality threshold, it is determined that the image has overexposure and / or underexposure problems, and then enters the Retinex illumination correction unit to perform Retinex algorithm correction. (3) The data processing module performs aspect ratio-preserving normalized scaling on the original image with no reference quality score not higher than the low quality threshold and the image after correction by the Retinex illumination correction unit, and adapts different resolutions according to the business scenario: if it is to be stored in the vector database, the resolution after scaling is 960×960 pixels; if it is to query attendance, the resolution after scaling is 1024×1024 pixels.
7. The method for optimizing low-quality image recognition in a construction site face recognition system adapted to a common CPU, as described in claim 6, is characterized in that... The specific process for obtaining the coordinates of key facial organs in step S2 is as follows: (1) Input the image after standardization and scaling in step S1 into the face detection module and set the confidence threshold of the face detection module to 0.65; The face detection module outputs a 15-element array containing the coordinates of the face bounding box, the coordinates of the left and right eyes, the coordinates of the tip of the nose, the coordinates of the left and right corners of the mouth and the corresponding confidence scores. Sort the arrays in ascending order of the x-coordinate of the face bounding box coordinates and filter out the 15-element arrays with confidence scores lower than 0.65, and retain the valid data groups. (2) Based on step (1), the actual size of the face bounding box on the original image is restored by scaling ratio, and the coordinates of the key facial organs are converted into relative coordinates within the corresponding face bounding box. The accurate calibration of the key facial organ coordinates and the face bounding box is completed, and the calibrated key facial organ coordinates are obtained.
8. The method for optimizing low-quality image recognition in a construction site face recognition system adapted to a common CPU, as described in claim 7, is characterized in that... The specific process of liveness and non-face detection filtering in step S3 is as follows: (1) The silent liveness detection module retrieves the face bounding box output in step S2 and expands the face bounding box by 112 pixels in all directions. If the expansion reaches the image boundary during the expansion process, the expansion stops. The expanded face sub-image is cropped from the image based on the expanded face bounding box. If the expanded face sub-image is not a square, the short side of the expanded face sub-image is filled by symmetrical filling to ensure that the expanded face sub-image is a square and forms a detection array. (2) The silent liveness detection module performs inference on the detection array and outputs the probability of fake face and the probability of stylized face; if the probability of fake face and the probability of stylized face are both greater than 0.98, the corresponding face information is removed from the detection array. (3) The silent liveness detection module performs color space conversion on the facial region in the detection array retained in step (2), mapping it from the RGB color space to the YCrCb color space, and calculates the grayscale histogram of the Cr channel separately; the grayscale levels of the grayscale histogram are sorted in descending order by the number of pixels, and the top three grayscale levels are selected for voting: if the grayscale level is in the image grayscale level range of 80-120, it is counted as 1 vote; when the number of votes is greater than or equal to 2, the corresponding face is determined to be a non-real human face skin color, and its corresponding face information is removed from the detection array; wherein, the color conversion formula from RGB to YCrCb is: ; In the formula, Y is the luminance component, which only represents the brightness of the image and is independent of color. It is obtained by weighting RGB values; R is the pixel value of the Red channel; B is the pixel value of the Blue channel; G is the pixel value of the Green channel; Cr is the red difference component; Cb is the blue difference component; the value of delta is adapted to the data bit depth: delta=128 for 8-bit depth, delta=32768 for 16-bit depth, and delta=0.5 for float type.
9. The method for optimizing low-quality image recognition in a construction site face recognition system adapted to a common CPU, as described in claim 8, is characterized in that... The specific process of feature extraction in step S5 is as follows: (1) Set the fixed input size of the simplified quantization module to 112×112 pixels and the number of input batches to 2, and output two sets of 512-dimensional face features; (2) The standard effective face image of 112×112 pixels is horizontally flipped by the face alignment module to obtain the flipped face image. The standard effective face image and the flipped face image are stitched together to obtain the stitched image. The stitched image is normalized in the range of [-1, 1] and the data dimension arrangement is adjusted. Then it is input into the simplification and quantization module to extract the face feature vector. (3) The feature post-processing module adds the two sets of 512-dimensional face features output by the quantization module and calculates the average value to obtain the denoised face features; then the feature post-processing module calculates the L2 norm normalization of the denoised face features to obtain a single final face feature vector; repeat the above operation until the feature vector extraction of all standard valid face images is completed.
10. The method for optimizing low-quality image recognition in a construction site face recognition system adapted to a common CPU, as described in claim 9, is characterized in that: In step S6, the vector database is indexed according to the hierarchy of construction site projects, work groups, and workers. When querying attendance, the search scope is first limited according to the project and work group. The judgment of finding the face feature vector with the highest similarity to the final face feature vector in the vector database is based on the inner product. The matching threshold is 0.
3. When the matching score is ≥0.3, the identity is determined to be successfully matched. When the matching score is <0.3, it is determined to be not in the database.