Face recognition method and system for working environment under mine

By using a method that combines the first-level deep residual network and the second-level deep residual network in the underground working environment to detect facial key points and optimize the recognition system, the problem of insufficient detection rate and accuracy is solved, and a better Efficient face recognition effect.

CN118736637APending Publication Date: 2024-10-01SHENZHEN ZHONGFUNENG ELECTRIC EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410331815.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-22
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The detection rate and accuracy of face recognition in underground mine working environments are insufficient. The pre-prepared multi-scale prediction frames used in the existing technology cannot be dynamically adjusted. When the depth of the CNN network is increased, the classification performance does not improve and the over-fitting problem is difficult to solve.

Method used

The first-level deep residual network and the second-level deep residual network are combined to detect the key points of the face through the face detection network for posture correction, and use the loss function to optimize the face recognition system and dynamically adjust the prediction frame to improve the detection rate. Use resnet30 and retinaface to replace networks such as YOLOv7, and add convolutional layers to improve classification performance.

Benefits of technology

Significantly improves the detection rate and accuracy of face recognition in the mine working environment, solving the problem of insufficient detection rate and accuracy in the existing technology. By dynamically adjusting the prediction frame and adding convolution layers, feature extraction is improved. and classification performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736637A_ABST
    Figure CN118736637A_ABST
Patent Text Reader

Abstract

The invention provides a face recognition method and system for an under-mine working environment. The method comprises the following steps: constructing a face recognition system of a face image; detecting a human face in the to-be-trained image by using the first-level deep residual network to obtain a first detected human face; detecting human face key points in the first detection human face by using the human face detection network, and correcting a human face posture in the to-be-trained image by using the human face key points to obtain a corrected human face image; detecting and correcting a human face in the human face image by using a secondary deep residual network to obtain a second detected human face; and inputting the second detected face into the loss function, optimizing the face recognition system by using the loss function based on the second detected face to obtain an optimized face recognition system, querying a personnel identifier corresponding to the to-be-recognized image by using the optimized face recognition system, and taking the personnel identifier as a face recognition result in the under-mine working environment. According to the method provided by the embodiment of the invention, the face recognition detection rate and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of face recognition technology, and in particular to a face recognition method and system for an underground mine working environment. Background Art

[0002] By collecting image data from surveillance cameras at the mining site and combining it with a neural network-based face recognition algorithm, we can recognize faces at the mining site. This way, we can detect people’s identity information, so that we can quickly locate people when we subsequently detect whether they are wearing helmets or entering restricted areas.

[0003] At present, face recognition is achieved through target detection technology. Common target detection technologies include YOLOv7, YOLOv6, YOLOv5, etc. This method predicts face areas at different scales through multi-scale prediction. Since only the pre-prepared prediction frames of multiple scales are used to predict the face area, but there is a lack of correction and adjustment of these prediction frames, these pre-prepared prediction frames of different scales cannot be dynamically adjusted, resulting in insufficient detection rate of face detection. Secondly, some solutions use CNN networks for face recognition. When the number of layers of the deep learning network is deeper, the expression ability will be stronger in theory. However, after the CNN network reaches a certain depth, further deepening will not improve the classification performance, but will cause the network to converge more slowly and the accuracy will also decrease. Even if the data set is increased and the problem of overfitting is solved, the classification performance and accuracy will not improve. Therefore, the detection rate and accuracy of face recognition in the underground mine working environment are insufficient. Summary of the invention

[0004] The main purpose of the present invention is to provide a face recognition method and system for an underground mine working environment, aiming to solve the problem of insufficient detection rate and accuracy of face recognition in an underground mine working environment in the prior art.

[0005] To achieve the above object, the present invention provides a face recognition method in an underground mine working environment, the method comprising:

[0006] Collecting facial images in an underground working environment, dividing the facial images into images to be trained and images to be recognized, and constructing a face recognition system for the facial images, wherein the face recognition system includes a first-level deep residual network, a face detection network, a second-level deep residual network and a loss function;

[0007] Detecting a face in the to-be-trained image using the first-level deep residual network to obtain a first detected face;

[0008] Using the face detection network to detect facial key points in the first detected face, and using the facial key points to correct the facial posture in the to-be-trained image to obtain a corrected facial image;

[0009] Detecting a face in the corrected face image using the secondary deep residual network to obtain a second detected face;

[0010] After the second detected face is input into the loss function, the face recognition system is optimized using the loss function based on the second detected face to obtain an optimized face recognition system, the optimized face recognition system is used to query the personnel identification corresponding to the image to be identified, and the personnel identification is used as the face recognition result in the underground mine working environment.

[0011] Optionally, the face recognition system for constructing the face image includes:

[0012] Using the first-level deep residual network as the backbone network of the face detection network;

[0013] Connecting the face detection network with the secondary deep residual network;

[0014] The loss function is added at the end of the secondary deep residual network to complete the construction of the face recognition system for the face image.

[0015] Optionally, the detecting a face in the to-be-trained image using the first-level deep residual network to obtain a first detected face includes:

[0016] Performing image preprocessing on the image to be trained using the first stage in the first-level deep residual network to obtain a preprocessed training image;

[0017] The second stage in the first-level deep residual network is used to detect faces in the preprocessed training image to obtain first detected faces.

[0018] Optionally, performing image preprocessing on the image to be trained by using the first stage in the first-level deep residual network to obtain a preprocessed training image includes:

[0019] The first phase includes:

[0020] The image to be trained is preprocessed using the following formula to obtain a preprocessed training image:

[0021] x1=Pooling(Conv0(x0))

[0022] Among them, x1 represents the preprocessed training image, x0 represents the image to be trained, Conv0 represents the size of the convolution layer, and Pooling represents the pooling layer.

[0023] Optionally, the detecting facial key points in the first detected face by using the face detection network includes:

[0024] Detecting effective features in the first detected face using a feature pyramid in the face detection network;

[0025] The effective features are converted into facial key points using a context module in the face detection network.

[0026] Optionally, the using the optimized face recognition system to query the person identification corresponding to the image to be recognized includes:

[0027] Constructing a face index library in the underground mine working environment;

[0028] The optimized face recognition system is used to query the face index library for a person identification corresponding to the image to be recognized.

[0029] Optionally, the using the optimized face recognition system to query the face index library for a person identification corresponding to the image to be recognized includes:

[0030] Outputting actual facial features corresponding to the image to be recognized using the optimized face recognition system;

[0031] Matching the target facial features corresponding to the actual facial features in the facial index library;

[0032] Using the cosine similarity between the actual facial features and the target facial features, querying the target person features corresponding to the image to be identified from the face index library;

[0033] The person information corresponding to the target person feature in the face index library is used as the person identification.

[0034] Optionally, a face recognition system for an underground mine working environment is provided, characterized in that the system comprises:

[0035] A system construction module is used to collect face images in an underground mine working environment, divide the face images into images to be trained and images to be recognized, and construct a face recognition system for the face images, wherein the face recognition system includes a first-level deep residual network, a face detection network, a second-level deep residual network and a loss function;

[0036] A first face detection module, configured to detect a face in the image to be trained using the first-level deep residual network to obtain a first detected face;

[0037] A posture correction module, used for detecting facial key points in the first detected face using the face detection network, and correcting the facial posture in the image to be trained using the facial key points to obtain a corrected face image;

[0038] A second face detection module, configured to detect a face in the rectified face image using the secondary deep residual network to obtain a second detected face;

[0039] An identification query module is used to input the second detected face into the loss function, optimize the face recognition system based on the second detected face using the loss function to obtain an optimized face recognition system, use the optimized face recognition system to query the personnel identification corresponding to the image to be identified, and use the personnel identification as the face recognition result in the underground mine working environment.

[0040] Optionally, the present invention provides an electronic device, characterized in that the electronic device comprises:

[0041] at least one processor; and,

[0042] a memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the face recognition system for an underground mine working environment as described.

[0044] Optionally, the present invention provides a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, it implements a face recognition system for an underground mine working environment as described above.

[0045] The present invention provides a face recognition method and system for an underground mine working environment. An embodiment of the present invention divides the face image into an image to be trained and an image to be recognized, so as to use a part of the collected image samples as training data for a face recognition system, and a part of the collected image samples as recognition of actual data of the face recognition system. Furthermore, an embodiment of the present invention constructs a face recognition system for the face image, so as to replace a CNN network with resnet30, and replace networks such as YOLOv7, YOLOv6, and YOLOv5 with retinaface, so as to solve the problem of insufficient detection rate and accuracy of face recognition in an underground mine working environment. Furthermore, an embodiment of the present invention detects faces in the pre-processed training image by using the second stage in the first-level deep residual network, so as to improve the classification performance and accuracy of face recognition by using the deep convolutional layers in the deep residual network resnet30. An embodiment of the present invention uses The effective features in the first detected face are detected by using the feature pyramid in the face detection network, so as to enhance the feature extraction by using different feature resolutions. Furthermore, the embodiment of the present invention converts the effective features into face key points by using the context module in the face detection network, so as to introduce convolution layers with larger convolution kernel sizes, such as 5×5 and 7×7 convolution kernels, to increase the receptive field, thereby introducing more context information. Furthermore, the embodiment of the present invention corrects the face posture in the image to be trained by using the face key points, so as to be able to dynamically adjust the pre-prepared prediction frames of different scales, thereby improving the detection rate of face detection. Furthermore, the embodiment of the present invention detects the face in the pre-processed corrected image by using the second stage in the secondary deep residual network, so as to improve the classification performance and accuracy by using the convolution layer added in the improved resnet101 network of the resnet30 network. Therefore, the face recognition method for an underground working environment proposed in the embodiment of the present invention can solve the problem of insufficient detection rate and accuracy of face recognition in an underground working environment in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 It is a flow chart of a face recognition method in an underground mine working environment provided by an embodiment of the present invention;

[0048] Figure 2 is a module schematic diagram of a face recognition system for an underground mine working environment provided by an embodiment of the present invention;

[0049] Figure 3 It is a schematic diagram of the internal structure of an electronic device of a face recognition method in an underground mine working environment provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The face recognition method for an underground mine working environment provided by an embodiment of the present invention is applied to a monitoring system. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" in the specification and claims of the present application and the above-mentioned drawings and any variations thereof are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0052] See also Figure 1 FIG. 1 is a flow chart of a face recognition method for an underground mine working environment provided by an embodiment of the present invention. Figure 1 The face recognition methods for underground mine working environments described in the paper include:

[0053] S1. Collect facial images in an underground working environment, divide the facial images into images to be trained and images to be recognized, and construct a face recognition system for the facial images, wherein the face recognition system includes a first-level deep residual network, a face detection network, a second-level deep residual network and a loss function.

[0054] The embodiment of the present invention divides the face image into images to be trained and images to be recognized, so that part of the collected image samples is used as training data for the face recognition system, and part is used as recognition of actual data of the face recognition system.

[0055] Furthermore, the embodiment of the present invention constructs a face recognition system for the face image to replace the CNN network with resnet30 and replace the YOLOv7, YOLOv6, YOLOv5 and other networks with retinaface, so as to solve the problem of insufficient detection rate and accuracy of face recognition in underground mining working environments.

[0056] Among them, the first-level deep residual network refers to the resnet30 network, the face detection network refers to the retinaface network, the second-level deep residual network refers to the resnet101 network, and the loss function refers to the arcface loss function.

[0057] In one embodiment of the present invention, the face recognition system for constructing the face image includes: using the first-level deep residual network as the backbone network of the face detection network; connecting the face detection network with the second-level deep residual network; and adding the loss function at the end of the second-level deep residual network to complete the construction of the face recognition system for the face image.

[0058] S2. Detect a face in the image to be trained using the first-level deep residual network to obtain a first detected face.

[0059] In the embodiment of the present invention, the second stage in the first-level deep residual network includes four dotted areas, namely, four convolutional layer combinations Conv consisting of multiple bottlenecks. 4 , while Conv 3 It represents the remaining three dotted areas except the first dotted area. It should be noted that when the resnet30 network is changed to the resnet101 network, 17 bottlenecks are added to the third dotted area, and each bottleneck is a combination of three convolutional layers.

[0060] In one embodiment of the present invention, the use of the first-level deep residual network to detect faces in the image to be trained to obtain a first detected face includes: using the first stage in the first-level deep residual network to perform image preprocessing on the image to be trained to obtain a preprocessed training image; and using the second stage in the first-level deep residual network to detect faces in the preprocessed training image to obtain a first detected face.

[0061] In another embodiment of the present invention, the first stage of the first-level deep residual network is used to perform image preprocessing on the image to be trained to obtain a preprocessed training image, including: the first stage includes: using the following formula to perform image preprocessing on the image to be trained to obtain a preprocessed training image:

[0062] x1=Pooling(Conv0(x0))

[0063] Among them, x1 represents the preprocessed training image, x0 represents the image to be trained, Conv0 represents the size of the convolution layer, and Pooling represents the pooling layer.

[0064] Furthermore, the embodiment of the present invention detects faces in the preprocessed training image by utilizing the second stage in the first-level deep residual network, so as to improve the classification performance and accuracy of face recognition by utilizing the deep convolutional layers in the deep residual network resnet30.

[0065] In another embodiment of the present invention, the use of the second stage in the first-level deep residual network to detect faces in the preprocessed training image to obtain a first detected face includes: using the remaining three convolutional layer combinations, the average pooling layer and the fully connected layer in the second stage except the first convolutional layer combination to detect faces in the preprocessed training image to obtain a first detected face.

[0066] S3. Detect facial key points in the first detected face using the face detection network, and correct the facial posture in the image to be trained using the facial key points to obtain a corrected face image.

[0067] In one embodiment of the present invention, the use of the face detection network to detect facial key points in the first detected face includes: using the feature pyramid in the face detection network to detect effective features in the first detected face; and using the context module in the face detection network to convert the effective features into facial key points.

[0068] The embodiment of the present invention detects effective features in the first detected face by utilizing the feature pyramid in the face detection network, so as to enhance feature extraction by utilizing different feature resolutions.

[0069] Furthermore, an embodiment of the present invention converts the effective features into facial key points by utilizing the context module in the face detection network, so as to introduce a convolution layer with a larger convolution kernel size, such as 5×5 and 7×7 convolution kernels, to increase the receptive field, thereby introducing more context information.

[0070] In one embodiment of the present invention, the converting the effective features into face key points by using the context module in the face detection network includes: the context module includes: converting the effective features into face key points by using the following formula:

[0071]

[0072]

[0073]

[0074] Among them, output1, output2 and output3 represent face key points, concat represents the concatenation symbol, out1, out2 and out3 represent valid features, represents a convolutional layer of size 3*3, C=(24, 105, 105), represents a convolutional layer of size 3*3, C=(128, 105, 105), represents a convolutional layer of size 3*3, C=(24, 33, 33), represents a convolutional layer of size 3*3, C=(128, 33, 33), represents a convolutional layer of size 3*3, C=(24, 27, 27), It represents a convolutional layer of size 3*3 and C=(128, 27, 27).

[0075] Furthermore, the embodiment of the present invention uses the facial key points to correct the facial posture in the image to be trained, so as to dynamically adjust the pre-prepared prediction frames of different scales, thereby improving the detection rate of face detection.

[0076] In one embodiment of the present invention, the method of using the facial key points to correct the facial posture in the image to be trained to obtain a corrected facial image includes: using the facial key points to calculate the face probability in each priori frame in the image to be trained; adjusting the prior frame based on the face probability to obtain an analysis frame; and using the image area corresponding to the analysis frame in the image to be trained as the corrected facial image.

[0077] S4. Detect a face in the corrected face image using the secondary deep residual network to obtain a second detected face.

[0078] In one embodiment of the present invention, the use of the secondary deep residual network to detect the face in the corrected face image to obtain a second detected face includes: using the first stage in the secondary deep residual network to perform image preprocessing on the corrected face image to obtain a preprocessed corrected image; and using the second stage in the secondary deep residual network to detect the face in the preprocessed corrected image to obtain a second detected face.

[0079] In one embodiment of the present invention, the principle of using the first stage in the second-level deep residual network to perform image preprocessing on the corrected face image to obtain the preprocessed corrected image is similar to the principle of using the first stage in the first-level deep residual network to perform image preprocessing on the image to be trained to obtain the preprocessed training image, and will not be further elaborated here.

[0080] Furthermore, the embodiment of the present invention detects faces in the preprocessed rectified image by utilizing the second stage in the secondary deep residual network, so as to improve classification performance and accuracy by utilizing the convolutional layers added in the improved resnet101 network of the resnet30 network.

[0081] S5. After inputting the second detected face into the loss function, based on the second detected face, the face recognition system is optimized using the loss function to obtain an optimized face recognition system, the optimized face recognition system is used to query the personnel identification corresponding to the image to be recognized, and the personnel identification is used as the face recognition result in the underground mine working environment.

[0082] In one embodiment of the present invention, the face recognition system is optimized based on the second detected face using the loss function to obtain an optimized face recognition system, including: the loss function includes: normalizing the features and weights in the second detected face respectively to obtain normalized features and normalized weights; calculating the angle between the normalized features and the normalized weights; after adding the angle interval of the angle, calculating the category probability corresponding to the second detected face using the following formula:

[0083] P = softmax(s*cos(θ+m))

[0084] Wherein, P represents the category probability corresponding to the second detected face, softmax represents the activation function, s represents the scale factor, m represents the angle interval, and θ represents the angle;

[0085] The cross entropy loss corresponding to the second detected face is calculated using the category probability; the cross entropy loss is used as the loss value of the loss function; based on the loss value, the parameters in the face recognition system are optimized to obtain the optimized face recognition system.

[0086] In one embodiment of the present invention, the use of the optimized face recognition system to query the personnel identification corresponding to the image to be identified includes: constructing a face index library in the underground mining working environment; and using the optimized face recognition system to query the personnel identification corresponding to the image to be identified in the face index library.

[0087] Optionally, the process of constructing the face index library in the underground mine working environment is achieved by using the faiss space index to create an index space for all face features in the underground mine working environment.

[0088] In another embodiment of the present invention, the use of the optimized face recognition system to query the face index library for the person identification corresponding to the image to be identified includes: using the optimized face recognition system to output the actual face features corresponding to the image to be identified; matching the target face features corresponding to the actual face features in the face index library; using the cosine similarity between the actual face features and the target face features to query the target person features corresponding to the image to be identified from the face index library; and using the person information corresponding to the target person features in the face index library as the person identification.

[0089] Optionally, the process of matching the target facial features corresponding to the actual facial features in the facial index library and using the cosine similarity between the actual facial features and the target facial features to query the target person features corresponding to the image to be identified from the facial index library is: searching the facial features extracted by detection in the index space, giving the topK results, and then further comparing the cosine similarity based on the topK results to obtain the ID of the operator with the highest similarity.

[0090] It can be seen that the embodiment of the present invention divides the face image into images to be trained and images to be recognized, so as to use part of the collected image samples as training data for the face recognition system, and part of them as recognition of actual data of the face recognition system. Furthermore, the embodiment of the present invention constructs a face recognition system for the face image, so as to replace the CNN network with resnet30, and replace the YOLOv7, YOLOv6, YOLOv5 and other networks with retinaface, so as to solve the problem of insufficient detection rate and accuracy of face recognition in the underground working environment. Furthermore, the embodiment of the present invention detects the face in the pre-processed training image by using the second stage in the first-level deep residual network, so as to improve the classification performance and accuracy of face recognition by using the deep convolutional layers in the deep residual network resnet30. The embodiment of the present invention uses the face detection network The feature pyramid in the first detection face is used to detect effective features in the first detection face, so as to use different feature resolutions to enhance feature extraction. Further, the embodiment of the present invention converts the effective features into face key points by using the context module in the face detection network, so as to introduce convolution layers with larger convolution kernel sizes, such as 5×5 and 7×7 convolution kernels, to increase the receptive field, thereby introducing more context information. Further, the embodiment of the present invention corrects the face posture in the image to be trained by using the face key points, so as to be able to dynamically adjust the pre-prepared prediction frames of different scales, thereby improving the detection rate of face detection. Further, the embodiment of the present invention detects the face in the pre-processed corrected image by using the second stage in the secondary deep residual network, so as to use the convolution layer added in the improved resnet101 network of the resnet30 network to improve the classification performance and accuracy. Therefore, the face recognition method for an underground working environment proposed in the embodiment of the present invention can solve the problem of insufficient detection rate and accuracy of face recognition in an underground working environment in the prior art.

[0091] like Figure 2 Shown is a functional module diagram of the face recognition system for an underground mine working environment of the present invention.

[0092] The face recognition system 200 for an underground mine working environment of the present invention can be installed in an electronic device. According to the functions to be implemented, the face recognition system for an underground mine working environment can include a system construction module 201, a first face detection module 202, a posture correction module 203, a second face detection module 204 and an identification query module 205. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and is stored in the memory of the electronic device.

[0093] In the embodiment of the present invention, the functions of each module / unit are as follows:

[0094] The system construction module 201 is used to collect face images in an underground working environment, divide the face images into images to be trained and images to be recognized, and construct a face recognition system for the face images, wherein the face recognition system includes a first-level deep residual network, a face detection network, a second-level deep residual network and a loss function;

[0095] The first face detection module 202 is used to detect the face in the to-be-trained image using the first-level deep residual network to obtain a first detected face;

[0096] The posture correction module 203 is used to detect the facial key points in the first detected face using the face detection network, and correct the facial posture in the to-be-trained image using the facial key points to obtain a corrected face image;

[0097] The second face detection module 204 is used to detect the face in the rectified face image using the secondary deep residual network to obtain a second detected face;

[0098] The identification query module 205 is used to input the second detected face into the loss function, and then optimize the face recognition system based on the second detected face using the loss function to obtain an optimized face recognition system, use the optimized face recognition system to query the personnel identification corresponding to the image to be identified, and use the personnel identification as the face recognition result in the underground mining working environment.

[0099] In detail, the modules in the face recognition system 200 for the underground working environment of the embodiment of the present invention are used in the same manner as described above. Figure 1 The face recognition method for the underground mine working environment described in the invention has the same technical means and can produce the same technical effects, so it will not be repeated here.

[0100] like Figure 3 The figure is a schematic diagram of the structure of an electronic device for realizing a face recognition method in an underground mine working environment according to the present invention.

[0101] The electronic device may include a processor 30, a memory 31, a communication bus 32 and a communication interface 33, and may also include a computer program stored in the memory 31 and executable on the processor 30, such as a face recognition program for an underground mine working environment.

[0102] In some embodiments, the processor 30 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 30 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes programs or modules stored in the memory 31 (for example, executing a face recognition program for an underground mine working environment, etc.), and calls data stored in the memory 31 to execute various functions of the electronic device and process data.

[0103] The memory 31 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 31 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 31 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 31 may also include both an internal storage unit of the electronic device and an external storage device. The memory 31 may not only be used to store application software and various types of data installed in the electronic device, such as the code of the database configuration connection program, but also be used to temporarily store data that has been output or is to be output.

[0104] The communication bus 32 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 31 and at least one processor 30, etc.

[0105] The communication interface 33 is used for the above Figure 3Communication with other devices, including network interface and user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0106] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0107] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 30 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0108] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.

[0109] The database configuration connection program stored in the memory 31 in the electronic device is a combination of multiple computer programs. When running in the processor 30, it can achieve:

[0110] Collecting facial images in an underground working environment, dividing the facial images into images to be trained and images to be recognized, and constructing a face recognition system for the facial images, wherein the face recognition system includes a first-level deep residual network, a face detection network, a second-level deep residual network and a loss function;

[0111] Detecting a face in the to-be-trained image using the first-level deep residual network to obtain a first detected face;

[0112] Using the face detection network to detect facial key points in the first detected face, and using the facial key points to correct the facial posture in the to-be-trained image to obtain a corrected facial image;

[0113] Detecting a face in the corrected face image using the secondary deep residual network to obtain a second detected face;

[0114] After the second detected face is input into the loss function, the face recognition system is optimized using the loss function based on the second detected face to obtain an optimized face recognition system, the optimized face recognition system is used to query the personnel identification corresponding to the image to be identified, and the personnel identification is used as the face recognition result in the underground mine working environment.

[0115] Specifically, the specific implementation method of the processor 30 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0116] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0117] The present invention further provides a storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0118] Collecting facial images in an underground working environment, dividing the facial images into images to be trained and images to be recognized, and constructing a face recognition system for the facial images, wherein the face recognition system includes a first-level deep residual network, a face detection network, a second-level deep residual network and a loss function;

[0119] Detecting a face in the to-be-trained image using the first-level deep residual network to obtain a first detected face;

[0120] Using the face detection network to detect facial key points in the first detected face, and using the facial key points to correct the facial posture in the to-be-trained image to obtain a corrected facial image;

[0121] Detecting a face in the corrected face image using the secondary deep residual network to obtain a second detected face;

[0122] After the second detected face is input into the loss function, the face recognition system is optimized using the loss function based on the second detected face to obtain an optimized face recognition system, the optimized face recognition system is used to query the personnel identification corresponding to the image to be identified, and the personnel identification is used as the face recognition result in the underground mine working environment.

[0123] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0124] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0125] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0126] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0127] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0128] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0129] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A face recognition method for an underground mine working environment, characterized in that: The method comprises: Collecting facial images in an underground working environment, dividing the facial images into images to be trained and images to be recognized, and constructing a face recognition system for the facial images, wherein the face recognition system includes a first-level deep residual network, a face detection network, a second-level deep residual network and a loss function; Detecting a face in the to-be-trained image using the first-level deep residual network to obtain a first detected face; Using the face detection network to detect facial key points in the first detected face, and using the facial key points to correct the facial posture in the to-be-trained image to obtain a corrected face image; Detecting a face in the corrected face image using the secondary deep residual network to obtain a second detected face; After the second detected face is input into the loss function, the face recognition system is optimized using the loss function based on the second detected face to obtain an optimized face recognition system, the optimized face recognition system is used to query the personnel identification corresponding to the image to be identified, and the personnel identification is used as the face recognition result in the underground mine working environment.

2. The method according to claim 1, characterized in that The face recognition system for constructing the face image comprises: Using the first-level deep residual network as the backbone network of the face detection network; Connecting the face detection network with the secondary deep residual network; The loss function is added at the end of the secondary deep residual network to complete the construction of the face recognition system for the face image.

3. The method according to claim 1, characterized in that: The step of using the first-level deep residual network to detect a face in the image to be trained to obtain a first detected face includes: Using the first stage in the first-level deep residual network to perform image preprocessing on the image to be trained, to obtain a preprocessed training image; The second stage in the first-level deep residual network is used to detect faces in the preprocessed training image to obtain first detected faces.

4. The method according to claim 3, characterized in that: The step of performing image preprocessing on the image to be trained by using the first stage in the first-level deep residual network to obtain a preprocessed training image includes: The first phase includes: The image to be trained is preprocessed using the following formula to obtain a preprocessed training image: x1=Pooling(Conv0(x0)) Among them, x1 represents the preprocessed training image, x0 represents the image to be trained, Conv0 represents the size of the convolution layer, and Pooling represents the pooling layer.

5. The method according to claim 1, characterized in that: The step of using the face detection network to detect facial key points in the first detected face includes: Detecting effective features in the first detected face using a feature pyramid in the face detection network; The effective features are converted into facial key points using a context module in the face detection network.

6. The method according to claim 1, characterized in that The using the optimized face recognition system to query the person identification corresponding to the image to be recognized includes: Constructing a face index library in the underground mine working environment; The optimized face recognition system is used to query the face index library for a person identification corresponding to the image to be recognized.

7. The method according to claim 6, characterized in that The step of using the optimized face recognition system to query the face index library for a person identification corresponding to the image to be recognized includes: Outputting actual facial features corresponding to the image to be recognized using the optimized face recognition system; Matching the target facial features corresponding to the actual facial features in the facial index library; Using the cosine similarity between the actual facial features and the target facial features, querying the target person features corresponding to the image to be identified from the face index library; The person information corresponding to the target person feature in the face index library is used as the person identification.

8. A face recognition system for an underground mine working environment, characterized in that: The system comprises: A system construction module is used to collect face images in an underground mine working environment, divide the face images into images to be trained and images to be recognized, and construct a face recognition system for the face images, wherein the face recognition system includes a first-level deep residual network, a face detection network, a second-level deep residual network and a loss function; A first face detection module, configured to detect a face in the image to be trained using the first-level deep residual network to obtain a first detected face; A posture correction module, used for detecting facial key points in the first detected face using the face detection network, and correcting the facial posture in the image to be trained using the facial key points to obtain a corrected face image; A second face detection module, configured to detect a face in the rectified face image using the secondary deep residual network to obtain a second detected face; An identification query module is used to input the second detected face into the loss function, optimize the face recognition system based on the second detected face using the loss function to obtain an optimized face recognition system, use the optimized face recognition system to query the personnel identification corresponding to the image to be identified, and use the personnel identification as the face recognition result in the underground mining working environment.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the face recognition method for an underground mine working environment as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a face recognition method for an underground mine working environment as described in any one of claims 1 to 7 is implemented.