Face recognition method and device applied to underground coal mine
By extracting and matching face features in the face recognition system underground in the coal mine and generating multi-dimensional target tags, the problem of low recognition rate when the head posture deviation of the coal mine underground in the face recognition system is solved, and the meticulousness of safety monitoring capabilities and personnel behavior analysis is improved.
Patent Information
- Application Number
- CN202411816966.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-14
AI Technical Summary
The facial recognition system underground in the coal mine has a low recognition rate when the miner's head attitude deviates and cannot accurately identify the identity.
By obtaining the video streams underground in the coal mine for preprocessing, facial features are extracted, and the target face features are matched from the feature library, the mapping relationship between candidate tags and candidate face features is obtained, and a multi-dimensional target tag is generated, including the basic information of the personnel and the distribution information of the head rotation angle.
It improves the safety monitoring capabilities of underground personnel, can accurately identify personnel under different postures, provide more detailed personnel behavior analysis, and helps monitoring personnel better understand personnel's dynamic behavior.
Smart Images

Figure CN119625809A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical fields of image processing and face recognition, and in particular to a face recognition method and device used in underground coal mines. Background Art
[0002] As an important basic energy source in my country, coal is widely used in all walks of life and occupies an important position in the country's economic development and social stability. The particularity and complexity of the coal industry make it involve a wide range of areas and employ a large number of people, especially underground coal mine operations, which are subject to high safety risks. Due to the complex geological conditions of coal seams in my country, geological disasters such as large-scale coal seam spalling, gas explosions, and water inrush at the working face often occur during the mining process. These disasters are accidental and sudden, greatly threatening the lives of coal miners. Although the level of coal mine safety production has gradually improved in recent years, casualties still often occur during coal mining due to the complex underground environment of coal mines, especially the difficulty of underground personnel management and rescue work in coal mines.
[0003] With the continuous development of underground coal mine monitoring technology, video monitoring systems have gradually become one of the key technical means to ensure the safety of miners. However, due to the different installation positions and angles of cameras in underground environments, the facial posture of miners in monitoring videos may change significantly. This change affects the recognition rate of traditional two-dimensional face recognition technology, especially when the miner's head posture deviates, the traditional recognition system often cannot accurately identify his identity. Summary of the invention
[0004] The present disclosure provides a face recognition method and device for use in coal mines, so as to at least solve the problem in the related art that when the miner's head posture deviates, the traditional recognition system is often unable to accurately recognize his identity.
[0005] The first aspect of the present application proposes a face recognition method for use in coal mines, comprising: obtaining a video stream acquired by an image acquisition device located in the coal mine, and preprocessing the video stream to obtain a target image; determining whether there is a person in the target image, and in response to the presence of a person in the target image, extracting a to-be-matched face feature corresponding to the person; matching a target face feature corresponding to the to-be-matched face feature from a plurality of candidate face features in a feature library; acquiring a mapping relationship between a candidate label and a candidate face feature, and querying the mapping relationship based on the target face feature to obtain a target label, wherein the target label comprises a target person information label and a target discrete Gaussian distribution label, the target person information label being used to represent the basic information of the person, and the target discrete Gaussian distribution label being used to represent the probability value of the person's head rotation angle being within each preset rotation angle interval; and generating a face recognition result corresponding to the target image based on the target label.
[0006] According to one embodiment of the present application, a video stream is preprocessed to obtain a target image, including: extracting key frames from the video stream to obtain an initial image; sequentially performing HSV color space conversion processing, filtering processing, and image enhancement processing on the initial image to obtain a target image; wherein the image enhancement processing is implemented using a gamma transform based on particle swarm optimization combined with a fractional-order image enhancement algorithm.
[0007] According to one embodiment of the present application, it is determined whether there is a person on the target image, and in response to the presence of a person on the target image, facial features to be matched corresponding to the person are extracted, including: performing facial key point detection on the target image; in response to the facial key point detection result indicating that there is a person on the target image, capturing a facial region from the target image; and performing feature extraction on the facial region using a pre-trained image feature extraction network to obtain facial features to be matched.
[0008] According to an embodiment of the present application, a target facial feature corresponding to a facial feature to be matched is obtained by matching from multiple candidate facial features in a feature library, including: obtaining the similarity between the facial feature to be matched and each candidate facial feature; determining a maximum similarity from the similarities; judging whether the maximum similarity is greater than or equal to a preset similarity threshold; in response to the maximum similarity being greater than or equal to the preset similarity threshold, taking the candidate facial feature corresponding to the maximum similarity as the target facial feature.
[0009] According to an embodiment of the present application, the face recognition method applied in coal mines further includes: in response to the maximum similarity value being less than a preset similarity threshold value, determining that the matching of the face features to be matched fails.
[0010] According to one embodiment of the present application, after generating a face recognition result corresponding to a target image based on a target tag, it also includes: obtaining the acquisition time of the target image, and obtaining the underground area where the image acquisition device is located; and constructing the mine positioning information of the personnel based on the underground area, acquisition time and target tag.
[0011] According to one embodiment of the present application, a training method for an image feature extraction network includes: obtaining images corresponding to each employee at multiple angles as sample images; obtaining sample labels corresponding to each sample image, wherein the sample labels include sample personnel information labels and sample discrete Gaussian distribution labels, the sample personnel information labels are used to represent the basic information of the employee corresponding to the sample image, and the sample discrete Gaussian distribution labels are used to represent the probability value that the head rotation angle of the employee on the sample image is within each preset rotation angle interval; performing feature extraction on the sample images to obtain sample facial features corresponding to the sample images; constructing a training sample set based on the sample images, sample labels and sample facial features; training the initial image feature extraction network based on the training sample set, and obtaining the image feature extraction network obtained after the training is completed.
[0012] According to one embodiment of the present application, the face recognition method applied in coal mines also includes: storing sample facial features as candidate facial features in a feature library; using sample labels as candidate labels, matching the candidate labels with the candidate facial features one by one, and constructing a mapping relationship between the candidate labels and the candidate facial features.
[0013] According to one embodiment of the present application, an image feature extraction network includes an Inception structure block, which is used to extract multi-scale features of an input image, wherein: the Inception structure block is divided into three branches after the input layer, namely a first branch, a second branch and a third branch; the first branch includes a 3×3 convolutional layer and a 1×1 convolutional layer connected in sequence; the second branch includes a 1×1 convolutional layer, and is divided into two sub-branches after the 1×1 convolutional layer, one of which includes a 5×5 convolutional layer and a 1×1 convolutional layer connected in sequence, and the other sub-branch includes a 3×3 convolutional layer and a 1×1 convolutional layer connected in sequence; the third branch includes a 1×1 convolutional layer; the outputs of the first branch and the second branch are spliced with the output of the third branch after channel merging to obtain the output of the Inception structure block.
[0014] The second aspect of the present application proposes a face recognition device for use in coal mines, including: an acquisition module, used to acquire a video stream acquired by an image acquisition device located in the coal mine, and pre-process the video stream to obtain a target image; an extraction module, used to determine whether there is a person on the target image, and in response to the presence of a person on the target image, extract the face features to be matched corresponding to the person; a matching module, used to match the target face features corresponding to the face features to be matched from multiple candidate face features in a feature library; a query module, used to acquire a mapping relationship between candidate labels and candidate face features, and query the mapping relationship based on the target face features to obtain a target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label, the target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being in each preset rotation angle interval; a generation module, used to generate a face recognition result corresponding to the target image based on the target label.
[0015] According to one embodiment of the present application, the acquisition module is also used to: extract key frames from the video stream to obtain an initial image; perform HSV color space conversion processing, filtering processing and image enhancement processing on the initial image in sequence to obtain a target image; wherein the image enhancement processing is implemented by combining a gamma transform based on particle swarm optimization with a fractional-order image enhancement algorithm.
[0016] According to one embodiment of the present application, the extraction module is also used to: perform facial key point detection on the target image; in response to the facial key point detection result indicating that there is a person on the target image, cut out the facial area from the target image; and extract features of the facial area using a pre-trained image feature extraction network to obtain facial features to be matched.
[0017] According to one embodiment of the present application, the matching module is also used to: obtain the similarity between the facial feature to be matched and each candidate facial feature; determine the maximum similarity from the similarities; determine whether the maximum similarity is greater than or equal to a preset similarity threshold; in response to the maximum similarity being greater than or equal to the preset similarity threshold, use the candidate facial feature corresponding to the maximum similarity as the target facial feature.
[0018] According to an embodiment of the present application, the matching module is further used to: in response to the maximum similarity value being less than a preset similarity threshold value, determine that the matching of the facial features to be matched fails.
[0019] According to one embodiment of the present application, the generation module is also used to: obtain the acquisition time of the target image, and obtain the underground area where the image acquisition device is located; and construct the mine positioning information of the personnel based on the underground area, acquisition time and target label.
[0020] According to one embodiment of the present application, a face recognition device used in coal mines also includes a network training module, which is used to: obtain images corresponding to each employee at multiple angles as sample images; obtain sample labels corresponding to each sample image, wherein the sample labels include sample personnel information labels and sample discrete Gaussian distribution labels, the sample personnel information labels are used to represent the basic information of the employee corresponding to the sample image, and the sample discrete Gaussian distribution labels are used to represent the probability value that the head rotation angle of the employee on the sample image is within each preset rotation angle interval; perform feature extraction on the sample image to obtain sample face features corresponding to the sample image; construct a training sample set based on the sample image, the sample labels and the sample face features; train the initial image feature extraction network based on the training sample set, and obtain the image feature extraction network obtained after the training is completed.
[0021] According to one embodiment of the present application, a face recognition device used in coal mines also includes a mapping generation module, which is used to: store sample facial features as candidate facial features in a feature library; use sample labels as candidate labels, match candidate labels with candidate facial features one by one, and construct a mapping relationship between candidate labels and candidate facial features.
[0022] According to one embodiment of the present application, an image feature extraction network includes an Inception structure block, which is used to extract multi-scale features of an input image, wherein: the Inception structure block is divided into three branches after the input layer, namely a first branch, a second branch and a third branch; the first branch includes a 3×3 convolutional layer and a 1×1 convolutional layer connected in sequence; the second branch includes a 1×1 convolutional layer, and is divided into two sub-branches after the 1×1 convolutional layer, one of which includes a 5×5 convolutional layer and a 1×1 convolutional layer connected in sequence, and the other sub-branch includes a 3×3 convolutional layer and a 1×1 convolutional layer connected in sequence; the third branch includes a 1×1 convolutional layer; the outputs of the first branch and the second branch are spliced with the output of the third branch after channel merging to obtain the output of the Inception structure block.
[0023] The third aspect embodiment of the present application proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the face recognition method applied in coal mines as described in the first aspect embodiment of the present application.
[0024] The fourth aspect embodiment of the present application proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to implement the face recognition method applied in coal mines as described in the first aspect embodiment of the present application.
[0025] The fifth aspect embodiment of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the face recognition method applied in coal mines as described in the first aspect embodiment of the present application.
[0026] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: by acquiring and preprocessing the video stream underground in a coal mine, the present application can effectively detect the persons in the video and extract the corresponding facial features; by matching the target facial features from the feature library, it can realize rapid identification and confirmation of different persons, and effectively improve the safety monitoring capability of underground personnel; by acquiring the target discrete Gaussian distribution label of the person, the change of the rotation angle of the person's head is taken into account, and the person in different postures can be effectively identified; the target label includes not only the basic information of the target person, but also the distribution information of the head rotation angle. This multi-dimensional label system makes facial recognition not only stay at the simple identity recognition level, but also can further provide more detailed personnel behavior analysis, helping monitoring personnel to better understand the dynamic behavior of the person.
[0027] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0029] Figure 1 It is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine, shown in an embodiment of the present application.
[0030] Figure 2 It is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine, shown in an embodiment of the present application.
[0031] Figure 3 It is a schematic diagram of an embodiment of the present application showing a gamma transform based on particle swarm optimization combined with a fractional-order image enhancement algorithm for image enhancement.
[0032] Figure 4 It is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine, shown in an embodiment of the present application.
[0033] Figure 5 It is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine, shown in an embodiment of the present application.
[0034] Figure 6 It is a structural diagram of the Inception structural block shown in one embodiment of the present application.
[0035] Figure 7 It is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine, shown in an embodiment of the present application.
[0036] Figure 8 This is a schematic diagram of a face recognition device used in a coal mine, shown in an embodiment of the present application.
[0037] Fig. 9 It is a schematic diagram of an electronic device shown in one embodiment of the present application. DETAILED DESCRIPTION
[0038] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0039] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of laws and regulations.
[0040] Most of the existing underground face recognition technologies rely on two-dimensional image information and fail to fully consider the complexity of head posture changes. In special environments such as underground, due to insufficient light, narrow space, and the possibility of large angle changes in human head posture, existing underground face recognition technologies lack effective adaptation mechanisms for the arbitrariness and randomness of head posture.
[0041] In addition, existing underground face recognition technologies are mostly based on two-dimensional image information, which is limited by the use environment of three-dimensional acquisition equipment. Since head posture has a high degree of freedom and continuity, a slight change in posture may cause significant changes in facial features, making the recognition task more complicated and difficult. If there is a lack of special processing or modeling mechanism for head posture changes, the recognition rate of existing face recognition methods in multi-posture scenarios will drop significantly, and may even fail to meet real-time and high-precision requirements.
[0042] In order to solve the above problems, Figure 1 is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine shown in the present application, such as Figure 1 As shown, the face recognition method applied in coal mines includes the following steps:
[0043] S101, obtaining a video stream acquired by an image acquisition device located underground in a coal mine, and preprocessing the video stream to acquire a target image.
[0044] Optionally, the video stream may be acquired in real time by an image acquisition device located underground in the coal mine.
[0045] Optionally, the video stream may be obtained by local import, and the video stream is acquired by an image acquisition device located underground in the coal mine.
[0046] Among them, key frames are extracted from the video stream to obtain multiple target images.
[0047] Among them, the image acquisition devices are mainly distributed in the coal mine tunnels and some coal mine working faces. Each image acquisition device has its corresponding IP address and work area division mark, and the work area of the image acquisition device can be used as a reference for underground personnel.
[0048] Optionally, the image acquisition device may adopt a complementary metal oxide semiconductor camera (CMOS) type camera. The CMOS type camera generates current or voltage signals through the photoelectric effect without the need for an external circuit, so it has the characteristics of small size, low energy consumption and fast imaging speed.
[0049] Optionally, a light emitting diode (LED) is used as an external light source for the image acquisition device for illumination.
[0050] S102, determining whether there is a person on the target image, and in response to a person being present on the target image, extracting a to-be-matched facial feature corresponding to the person.
[0051] It is not difficult to understand that the video stream does not necessarily capture people at every moment. People will only appear in the video stream when they pass by the image acquisition device. Therefore, after extracting key frames from the video stream to obtain multiple target images, it is still necessary to determine whether there are people in the target image (which can be achieved through face detection technology).
[0052] If there is a person in the target image, the facial region of the person is captured, and features of the facial region are extracted to obtain the corresponding facial features to be matched of the person.
[0053] S103, obtaining a target facial feature corresponding to the facial feature to be matched from a plurality of candidate facial features in the feature library.
[0054] Among them, the feature library can be generated in advance, and the feature library includes the features corresponding to each employee of the mine at multiple angles, and the features corresponding to each employee of the mine at multiple angles are used as candidate facial features.
[0055] After the facial features to be matched are determined as described above, the facial features to be matched are matched with a plurality of candidate facial features in the feature library (generally, the matching can be performed by similarity calculation), and the successfully matched candidate facial features are used as target facial features.
[0056] S104, obtaining a mapping relationship between candidate labels and candidate facial features, and querying the mapping relationship based on the target facial features to obtain a target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label, the target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being within each preset rotation angle interval.
[0057] A mapping relationship between candidate labels and candidate facial features is generated in advance, and after the target facial features are determined, the mapping relationship is queried to obtain the target label.
[0058] Among them, the target label includes the target person information label and the target discrete Gaussian distribution label.
[0059] The target person information tag is used to indicate the basic information of the person, such as name, gender, employee ID, position, etc.
[0060] The target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being in each preset rotation angle interval. For example, five preset rotation angle intervals (that is, they can be understood as discretized angle intervals) can be set, namely (0–36°), (36°-72°), (72°-108°), (108°-144°), and (144°-180°). The target discrete Gaussian distribution label can be represented as {0.05, 0.1, 0.7, 0.1, 0.05}, indicating that the probability values of the person's head rotation angle being in the above five preset rotation angle intervals (0–36°), (36°-72°), (72°-108°), (108°-144°), and (144°-180°) are 0.05, 0.1, 0.7, 0.1, and 0.05, respectively.
[0061] S105: Generate a face recognition result corresponding to the target image based on the target tag.
[0062] The target tag includes both the basic information of the person and the probability value of the person's head rotation angle being within each preset rotation angle interval. In the present application, the face recognition result corresponding to the target image is generated based on the target tag.
[0063] For example, the face recognition result corresponding to the target image can be expressed as: Zhang San, male, 12121, coal miner, {0.05, 0.1, 0.7, 0.1, 0.05}, indicating that the person in the target image is Zhang San, male, employee number 12121, and position is coal miner. When the target image is acquired, the probability values of Zhang San's head rotation angle in the five preset rotation angle intervals of (0–36°), (36°-72°), (72°-108°), (108°-144°), and (144°-180°) are 0.05, 0.1, 0.7, 0.1, and 0.05, respectively (that is, the maximum probability of Zhang San facing the image acquisition device at an angle within 72°-108°).
[0064] The embodiment of the present application proposes a face recognition method applied in coal mines, including: obtaining a video stream acquired by an image acquisition device located in the coal mine, and preprocessing the video stream to obtain a target image; judging whether there is a person on the target image, and in response to the presence of a person on the target image, extracting the face features to be matched corresponding to the person; matching the target face features corresponding to the face features to be matched from multiple candidate face features in the feature library; obtaining the mapping relationship between the candidate label and the candidate face feature, and querying the mapping relationship based on the target face feature to obtain the target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label, the target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being in each preset rotation angle interval; generating the face recognition result corresponding to the target image based on the target label. The present application can effectively detect the person in the video and extract the corresponding face features by acquiring the video stream in the coal mine and preprocessing it. By matching the target facial features from the feature library, it is possible to quickly identify and confirm different personnel, effectively improving the safety monitoring capabilities of underground personnel; by obtaining the target discrete Gaussian distribution label of the personnel, the changes in the rotation angle of the personnel's head are taken into account, and effective identification of personnel in different postures can be performed; the target label includes not only the basic information of the target personnel, but also the distribution information of the head rotation angle. This multi-dimensional labeling system enables face recognition to not only stay at the simple identity recognition level, but also further provide more detailed personnel behavior analysis, helping monitoring personnel to better understand the dynamic behavior of personnel.
[0065] Figure 2 is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine shown in the present application, such as Figure 2 As shown, the face recognition method applied in coal mines includes the following steps:
[0066] S201, obtaining a video stream acquired by an image acquisition device located underground in a coal mine, extracting key frames from the video stream, and obtaining an initial image.
[0067] S202, performing HSV color space conversion processing, filtering processing and image enhancement processing on the initial image in sequence to obtain a target image.
[0068] First, the HSV color space conversion process is performed on the initial image, and the color space format of the initial image is converted from RGB to HSV color space, that is, the image is described using the three dimensions of hue, saturation and brightness.
[0069] Secondly, the median filtering method is used to remove the noise of the initial image.
[0070] Finally, the image enhancement processing is implemented by combining the gamma transform based on particle swarm optimization with the fractional-order image enhancement algorithm. By utilizing the nonlinear characteristics of the gamma function transformation, the adaptive enhancement of the brightness areas of different regions is realized, and then the image after the illumination enhancement is processed by the fractional-order operator to enhance the detail features. The image processing of the fractional-order operator can enhance the high-frequency components of the image, highlight the image texture features, and retain the smooth areas in the image, which can better balance the contradiction between enhancing the image detail texture and introducing noise.
[0071] Figure 3 This is a schematic diagram of image enhancement based on a gamma transform combined with a fractional-order image enhancement algorithm based on particle swarm optimization shown in the present application, such as Figure 3 As shown in FIG. 1 , the gamma transform combined with fractional-order image enhancement algorithm based on particle swarm optimization includes the following steps:
[0072] 1. Setting of particle swarm parameters, including swarm size m, particle position x i and particle velocity v i , inertia weight ω, learning factor c i , evaluation function fitness, etc.
[0073] 2. Perform gamma transform and fractional order image enhancement on the input underground mine image, with image enhancement gamma function γ∈(0,3) and fractional order parameter v∈(0,1.5).
[0074] 3. Calculate the probability distribution of each pixel in the image, the gradient at each pixel, and the pixel average of the image.
[0075] 4. According to the results in step 3, calculate the entropy value S, average gradient H and variance D of the image, and finally calculate the fitness of the particle after each iteration according to the formula.
[0076] 5. After each iteration, the particle’s fitness fitness[i] can be obtained, and then it is compared with the current individual extreme value Pbest(i). If it is greater than the individual extreme value, the individual value is updated, otherwise it is discarded.
[0077] 6. After each iteration, the iteration stop judgment should be made. If the iteration condition is not met, the parameter value is updated again and the algorithm returns to step 3. Otherwise, the optimization is stopped.
[0078] 7. Use the optimal gamma and fractional order parameters gbest(γ,v) to output the enhanced image.
[0079] Among them, each particle can be measured from the perspectives of position and velocity at time t, and its particle position is represented by x t =(xt1, xt2, ... x m) and speed vt =(vt1, vt2, ..v m ). Each particle iteration will search for the optimal value, and evaluate the fitness of the iteration result of each particle. After each iteration, all individuals are compared to obtain the best individual optimal value pbest; the best individual value from the beginning of the iteration to the current iteration is called the global optimal value gbest. The process of particle iteration is the process in which the individual optimal value continuously replaces the global optimal value. When the individual optimal value reaches the current optimal value, the individual optimal value will replace the global optimal value; when the individual optimal value is not the current optimal value, the individual optimal value will be discarded. The particles continue to iterate until the iteration conditions are met. This technology can improve the quality of images and provide high-quality data for neural network models.
[0080] S203, performing facial key point detection on the target image.
[0081] Optionally, a facial key point detection algorithm may be employed.
[0082] S204: In response to the facial key point detection result indicating that a person exists in the target image, a facial region is captured from the target image.
[0083] S205, extracting features from the face area using a pre-trained image feature extraction network to obtain face features to be matched.
[0084] S206, obtaining the similarity between the facial feature to be matched and each candidate facial feature.
[0085] Assuming that there are 1000 candidate facial features in the feature library, 1000 similarities can be obtained here.
[0086] S207, determining a maximum similarity value from the similarities.
[0087] Assuming that 1000 similarities are obtained above, the maximum similarity value is determined from the 1000 similarities.
[0088] S208: Determine whether the maximum similarity value is greater than or equal to a preset similarity threshold.
[0089] A preset similarity threshold is set in advance, and the preset similarity threshold is used as a criterion for judging the maximum similarity value.
[0090] S209: In response to the maximum similarity value being greater than or equal to a preset similarity threshold, taking the candidate facial feature corresponding to the maximum similarity value as the target facial feature.
[0091] S210: In response to the maximum similarity value being less than a preset similarity threshold, determining that the matching of the facial features to be matched fails.
[0092] S211, obtaining a mapping relationship between candidate labels and candidate facial features, and querying the mapping relationship based on the target facial features to obtain a target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label, the target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being within each preset rotation angle interval.
[0093] S212: Generate a face recognition result corresponding to the target image based on the target tag.
[0094] Regarding the specific implementation of steps S211 to S212, reference may be made to the specific introduction of the relevant parts in the above embodiments, which will not be elaborated here.
[0095] The embodiment of the present application can effectively detect people in the video and extract corresponding facial features by acquiring and preprocessing the video stream underground in a coal mine; by matching the target facial features from a feature library, it can realize rapid identification and confirmation of different people, and effectively improve the safety monitoring capability of underground personnel; by acquiring the target discrete Gaussian distribution label of the person, the change of the rotation angle of the person's head is taken into account, and the person in different postures can be effectively identified; the target label includes not only the basic information of the target person, but also the distribution information of the head rotation angle. This multi-dimensional label system makes facial recognition not only stay at the simple identity recognition level, but also can further provide more detailed personnel behavior analysis, helping monitoring personnel to better understand the dynamic behavior of the person.
[0096] Figure 4 is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine shown in the present application, such as Figure 4 As shown, the face recognition method applied in coal mines includes the following steps:
[0097] S401, obtaining a video stream acquired by an image acquisition device located underground in a coal mine, and preprocessing the video stream to acquire a target image.
[0098] S402, determining whether there is a person on the target image, and in response to a person being present on the target image, extracting a to-be-matched facial feature corresponding to the person.
[0099] S403, obtaining a target facial feature corresponding to the facial feature to be matched from a plurality of candidate facial features in the feature library.
[0100] S404, obtaining a mapping relationship between candidate labels and candidate facial features, and querying the mapping relationship based on the target facial features to obtain a target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label, the target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being within each preset rotation angle interval.
[0101] S405: Generate a face recognition result corresponding to the target image based on the target tag.
[0102] Regarding the specific implementation of steps S401 to S405, reference may be made to the specific introduction of the relevant parts in the above embodiments, which will not be elaborated here.
[0103] S406, obtaining the acquisition time of the target image, and obtaining the underground area where the image acquisition device is located.
[0104] Exemplarily, the acquisition time of target image 1 is 8:00:00 on January 20, 2024.
[0105] Exemplarily, the image acquisition device for acquiring the target image 1 is located in area A underground.
[0106] S407, constructing the mine positioning information of the personnel based on the underground area, collection time and target tag.
[0107] Exemplarily, the face recognition result corresponding to the target image, that is, the target label can be expressed as: Zhang San, male, 12121, coal miner, {0.05, 0.1, 0.7, 0.1, 0.05}, indicating that the person in the target image is Zhang San, male, employee number 12121, and position is coal miner. When the target image is acquired, the probability values of Zhang San's head rotation angle in five preset rotation angle intervals, namely (0–36°), (36°-72°), (72°-108°), (108°-144°), and (144°-180°), are 0.05, 0.1, 0.7, 0.1, and 0.05, respectively (that is, it means that Zhang San has the maximum probability of facing the image acquisition device at an angle within 72°-108°).
[0108] In summary, the mine positioning information of personnel is constructed based on the underground area, acquisition time and target label. That is, the mine positioning information can be understood as that at 8:00:00 on January 20, 2024, employee Zhang San (male, employee number 12121, position as coal miner) was active in area A of the underground area. When the target image is acquired, the probability values of Zhang San's head rotation angle in the five preset rotation angle intervals of (0–36°), (36°-72°), (72°-108°), (108°-144°), and (144°-180°) are 0.05, 0.1, 0.7, 0.1 and 0.05 respectively (that is, Zhang San has the highest probability of facing the image acquisition device at an angle within 72°-108°).
[0109] The embodiment of the present application can effectively detect people in the video and extract corresponding facial features by acquiring and preprocessing the video stream underground in a coal mine; by matching the target facial features from a feature library, it can realize rapid identification and confirmation of different people, and effectively improve the safety monitoring capability of underground personnel; by accurately acquiring the image acquisition time and the underground area where the image acquisition device is located, combined with the target label information, it can realize high-precision positioning of personnel in the mine, and the position of personnel is not only related to time, but also closely related to the specific underground area, which helps to realize accurate tracking of personnel; when an emergency occurs (such as an accident in a mine), the position of the relevant personnel can be quickly locked through the mine positioning information of the personnel, which can not only help mine management personnel find the position of trapped personnel in time, but also trace the activity trajectory of personnel after the incident, and provide important data for subsequent investigations.
[0110] Figure 5 is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine shown in the present application, such as Figure 5 As shown, the face recognition method applied in coal mines includes the following steps:
[0111] S501, obtaining images corresponding to each employee at multiple angles as sample images.
[0112] Optionally, images corresponding to each employee at multiple angles can be acquired through an image acquisition device located underground in the coal mine.
[0113] Optionally, images corresponding to each employee at multiple angles can be uploaded by allowing the employees to take photos voluntarily.
[0114] S502, obtaining a sample label corresponding to each sample image, wherein the sample label includes a sample personnel information label and a sample discrete Gaussian distribution label, the sample personnel information label is used to represent the basic information of the employee corresponding to the sample image, and the sample discrete Gaussian distribution label is used to represent the probability value that the head rotation angle of the employee on the sample image is within each preset rotation angle interval.
[0115] Among them, the sample personnel information label is used to represent the basic information of the employee corresponding to the sample image, such as name, gender, age, employee ID, position and other information, which can be obtained through manual annotation.
[0116] Among them, considering the need to achieve multi-pose face recognition, the face photos of the same person in different poses can be abstracted into a set of discrete Gaussian distribution labels. Discrete Gaussian distribution labels refer to discretizing the continuous pose angle space and using Gaussian distribution to assign a label to each discrete angle. The uniqueness and continuity of this method come from the properties of Gaussian distribution and the continuity of angles. First, Gaussian distribution is a continuous probability distribution function with a bell-shaped curve shape. This means that in the discretized angle space, each discrete angle will be assigned a non-zero probability value by Gaussian distribution, while adjacent discrete angles will have relatively high probability values. Therefore, discrete Gaussian distribution Secondly, the uniqueness of discrete Gaussian distribution labels comes from the peak of Gaussian distribution. The peak of Gaussian distribution corresponds to the maximum value of probability density function, that is, it corresponds to the uniqueness of labels in discrete angle space. Since Gaussian distribution is a smooth curve, the label corresponding to its peak will also maintain its uniqueness after discretization. Labels are continuous between continuous angles, and values between two labels can be obtained by interpolation or probability density function. Therefore, the discrete Gaussian distribution label can reflect the uniqueness and continuity of any posture angle, because the discretized angle space is continuous under the influence of the probability distribution function, and each discrete angle has a unique Gaussian distribution label. This method can be used in practical applications to model and process continuous posture angles.
[0117] Among them, obtaining a sample discrete Gaussian distribution label of a sample image includes the following steps:
[0118] 1. Determine the range of posture angles: First, determine the range in which you want to discretize the posture angles of the image. After many experiments, we decided to use the range of 0-180°.
[0119] 2. Select the discretization level: Determine how many levels the posture angle will be discretized into. Generally speaking, the more levels, the finer the discretization granularity. After many experiments, it is determined to use 5-level discretization.
[0120] Exemplarily, the posture angle range is 0° to 180°, and it is discretized into 5 intervals. The angle range of each interval is: (0°-36°), (36°-72°), (72°-108°), (108°-144°), (144°-180°); the corresponding interval center points are: 18°, 54°, 90°, 126°, 162°.
[0121] 3. Create discrete Gaussian distribution labels: Use the Gaussian distribution function to assign a label to each discrete angle. The probability density formula of the Gaussian distribution function can be used to calculate the probability value of each discrete angle. First, calculate the Gaussian distribution function parameters to determine the mean and standard deviation of the Gaussian distribution function. The mean can be set to the center value of the discretization range, and the standard deviation can be adjusted according to the discretization range and discretization level to control the shape of the distribution. Secondly, bring each discrete angle into the probability density formula of the Gaussian distribution function and calculate its corresponding probability value. Finally, normalize the calculated probability values to ensure that their sum is 1.
[0122] For example, suppose a sample image has an actual annotated head rotation angle of 50° (the angle we want to calculate), suppose the standard deviation of the Gaussian distribution function is set to 15°, and suppose the mean is the center point of each interval (18°, 54°, 90°, 126°, 162°).
[0123] Among them, the Gaussian distribution function is expressed as:
[0124]
[0125] In the above formula, x is the angle we want to calculate (taking 50° as an example), μ represents the mean, that is, the center point of each interval (18°, 54°, 90°, 126°, 162°), and σ represents the standard deviation (taking 15° as an example).
[0126] Substituting the above parameters into the Gaussian distribution function, we obtain the probability values of five angle intervals: P(50°|18°), P(50°|54°), P(50°|90°), P(50°|126°), and P(50°|162°). The obtained probability values are normalized to ensure that their sum is 1.
[0127] 4. The calculated discrete Gaussian distribution label is used as the sample discrete Gaussian distribution label of the sample image.
[0128] S503, extracting features from the sample image to obtain sample face features corresponding to the sample image.
[0129] S504, constructing a training sample set based on the sample images, sample labels and sample facial features.
[0130] Each sample includes a sample image, a sample label and a sample face feature.
[0131] S505, training the initial image feature extraction network based on the training sample set, and obtaining the image feature extraction network obtained after the training.
[0132] The image feature extraction network includes an Inception structure block, which is used to extract multi-scale features of the input image. The present application improves the Inception structure block. The structure of the improved Inception structure block is as follows: Figure 6 As shown:
[0133] The Inception structure block is divided into three branches after the input layer, namely the first branch, the second branch and the third branch; the first branch includes a 3×3 convolution layer and a 1×1 convolution layer connected in sequence; the second branch includes a 1×1 convolution layer, and is divided into two sub-branches after the 1×1 convolution layer, one of which includes a 5×5 convolution layer and a 1×1 convolution layer connected in sequence, and the other sub-branch includes a 3×3 convolution layer and a 1×1 convolution layer connected in sequence; the third branch includes a 1×1 convolution layer; the outputs of the first branch and the second branch are concatenated with the output of the third branch after channel merging to obtain the output of the Inception structure block.
[0134] Among them, the Inception block is the basic convolution block. Its network structure is expanded in terms of network width, splitting the traditional convolution kernel into convolution kernels of different sizes, and using 1×1 convolution kernels to adjust feature channels. The Inception block can split a single-sized convolution kernel into convolution kernels of different sizes, allowing the network to more fully extract image features with less computing resource overhead.
[0135] Among them, the parameters of the improved Inception structure block are significantly reduced compared to the original structure block, which enables the image feature extraction network to extract image features more efficiently while reducing the cost of computing resources, thus achieving efficient face recognition.
[0136] Optionally, when training the initial image feature extraction network, some parameters in the initial image feature extraction network may be selectively locked, and then other parameters may be fine-tuned for training. This is mainly to enable the image feature extraction network to learn the facial features of the same person at different angles.
[0137] S506: Store the sample facial features as candidate facial features in a feature library.
[0138] That is, the feature library includes facial features corresponding to sample images of each employee at multiple angles.
[0139] S507, taking the sample label as a candidate label, matching the candidate label with the candidate facial features one by one, and constructing a mapping relationship between the candidate label and the candidate facial features.
[0140] In the above training sample set, there is a one-to-one correspondence between sample labels and sample facial features. Here, the sample facial features are used as candidate facial features, and the sample labels are used as candidate labels. With reference to the training sample set, the candidate labels are matched one by one with the candidate facial features to construct a mapping relationship between the candidate labels and the candidate facial features.
[0141] S508, obtaining a video stream acquired by an image acquisition device located underground in the coal mine, and preprocessing the video stream to acquire a target image.
[0142] S509: Detect facial key points on the target image.
[0143] S510: In response to the facial key point detection result indicating that a person exists in the target image, a facial region is captured from the target image.
[0144] S511, extracting features from the face area using a pre-trained image feature extraction network to obtain face features to be matched.
[0145] S512, matching a plurality of candidate facial features in the feature library to obtain a target facial feature corresponding to the facial feature to be matched.
[0146] S513, obtaining the mapping relationship between the candidate label and the candidate facial features, and querying the mapping relationship based on the target facial features to obtain the target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label, the target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being within each preset rotation angle interval.
[0147] S514: Generate a face recognition result corresponding to the target image based on the target tag.
[0148] Regarding the specific implementation of steps S508 to S514, reference may be made to the specific introduction of the relevant parts in the above embodiments, which will not be elaborated here.
[0149] The embodiments of the present application introduce in detail the process of constructing a feature library, the process of training an image feature extraction network, and the process of establishing a mapping relationship between candidate labels and candidate facial features, so as to facilitate the subsequent matching of target facial features from the feature library, thereby enabling rapid identification and confirmation of different personnel, and effectively improving the safety monitoring capability of underground personnel. In addition, when establishing sample labels, the present application takes into account changes in the rotation angle of a person's head, and can effectively identify personnel in different postures. Finally, the target label of the target image is identified, which includes not only the basic information of the target person, but also the distribution information of the head rotation angle. This multi-dimensional labeling system enables face recognition to not only stay at the simple identity recognition level, but also provide more detailed personnel behavior analysis, helping monitoring personnel to better understand the dynamic behavior of personnel.
[0150] Figure 7 is a schematic diagram of an exemplary implementation of a face recognition method applied in a coal mine shown in the present application, such as Figure 7 As shown, the face recognition method applied in coal mines includes the following steps:
[0151] The video stream acquired by the image acquisition device in the coal mine is obtained, and the key frame is extracted from the video stream to obtain the initial image. The initial image is sequentially processed by HSV color space conversion, filtering and image enhancement to obtain the target image.
[0152] Perform facial key point detection on the target image. If the facial key point detection result indicates that there is a person on the target image, cut out the face area from the target image, and extract the features of the face area through the pre-trained image feature extraction network to obtain the face features to be matched. If the facial key point detection result indicates that there is no person on the target image, obtain the next target image.
[0153] After the facial features to be matched are determined as described above, the facial features to be matched are matched with a plurality of candidate facial features in the feature library, and the successfully matched candidate facial features are used as target facial features.
[0154] If the matching is unsuccessful, it is determined that the matching of the to-be-matched facial features corresponding to the target image fails.
[0155] The mapping relationship between the candidate label and the candidate facial features is obtained, and the mapping relationship is queried based on the target facial features to obtain the target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label. The target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being within each preset rotation angle interval.
[0156] Generate face recognition results corresponding to the target image based on the target label.
[0157] The embodiment of the present application can effectively detect people in the video and extract corresponding facial features by acquiring and preprocessing the video stream of the coal mine. By matching the target facial features from the feature library, it can realize the rapid identification and confirmation of different people, effectively improving the safety monitoring capability of underground personnel; by acquiring the target discrete Gaussian distribution label of the personnel, taking into account the change of the rotation angle of the head of the personnel, it can effectively identify the personnel in different postures; the target label includes not only the basic information of the target personnel, but also the distribution information of the head rotation angle. This multi-dimensional label system makes face recognition not only stay at the simple identity recognition level, but also further provide more detailed personnel behavior analysis, helping monitoring personnel to better understand the dynamic behavior of personnel.
[0158] Figure 8 is a schematic diagram of a face recognition device used in coal mines shown in the present application, such as Figure 8 As shown, the face recognition device 800 used in coal mines includes an acquisition module 801, an extraction module 802, a matching module 803, a query module 804 and a generation module 805, wherein:
[0159] The acquisition module 801 is used to acquire the video stream acquired by the image acquisition device located in the coal mine, and pre-process the video stream to obtain the target image.
[0160] The extraction module 802 is used to determine whether there is a person on the target image, and in response to the presence of a person on the target image, extract the to-be-matched facial features corresponding to the person.
[0161] The matching module 803 is used to match the target facial features corresponding to the facial features to be matched from the multiple candidate facial features in the feature library.
[0162] The query module 804 is used to obtain the mapping relationship between the candidate label and the candidate facial features, and query the mapping relationship based on the target facial features to obtain the target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label. The target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the person's head rotation angle being within each preset rotation angle interval.
[0163] The generating module 805 is used to generate a face recognition result corresponding to the target image based on the target tag.
[0164] This device can effectively detect people in the video and extract corresponding facial features by acquiring and preprocessing the video stream of the coal mine. By matching the target facial features from the feature library, it can realize the rapid identification and confirmation of different people, effectively improving the safety monitoring capability of underground personnel; by acquiring the target discrete Gaussian distribution label of the person, taking into account the change of the person's head rotation angle, it can effectively identify the person in different postures; the target label includes not only the basic information of the target person, but also the distribution information of the head rotation angle. This multi-dimensional label system makes face recognition not only stay at the simple identity recognition level, but also further provide more detailed personnel behavior analysis, helping monitoring personnel to better understand the dynamic behavior of personnel.
[0165] Furthermore, the acquisition module 801 is also used to: extract key frames from the video stream to obtain an initial image; perform HSV color space conversion processing, filtering processing and image enhancement processing on the initial image in sequence to obtain a target image; wherein the image enhancement processing is implemented by combining a gamma transform based on particle swarm optimization with a fractional-order image enhancement algorithm.
[0166] Furthermore, the extraction module 802 is also used to: perform facial key point detection on the target image; in response to the facial key point detection result indicating that there is a person on the target image, cut out the facial area from the target image; and perform feature extraction on the facial area through a pre-trained image feature extraction network to obtain facial features to be matched.
[0167] Furthermore, the matching module 803 is also used to: obtain the similarity between the facial feature to be matched and each candidate facial feature; determine the maximum similarity from the similarities; determine whether the maximum similarity is greater than or equal to a preset similarity threshold; in response to the maximum similarity being greater than or equal to the preset similarity threshold, use the candidate facial feature corresponding to the maximum similarity as the target facial feature.
[0168] Furthermore, the matching module 803 is further configured to: in response to the maximum similarity being less than a preset similarity threshold, determine that the matching of the facial features to be matched fails.
[0169] Furthermore, the generation module 805 is also used to: obtain the acquisition time of the target image, and obtain the underground area where the image acquisition device is located; and construct the mine positioning information of the personnel based on the underground area, the acquisition time and the target tag.
[0170] Furthermore, the face recognition device 800 used in coal mines also includes a network training module, which is used to: obtain images corresponding to each employee at multiple angles as sample images; obtain sample labels corresponding to each sample image, wherein the sample labels include sample personnel information labels and sample discrete Gaussian distribution labels, the sample personnel information labels are used to represent the basic information of the employee corresponding to the sample image, and the sample discrete Gaussian distribution labels are used to represent the probability value that the head rotation angle of the employee on the sample image is within each preset rotation angle interval; perform feature extraction on the sample image to obtain sample face features corresponding to the sample image; construct a training sample set based on the sample image, the sample labels and the sample face features; train the initial image feature extraction network based on the training sample set, and obtain the image feature extraction network obtained after the training is completed.
[0171] Furthermore, the face recognition device 800 used in coal mines also includes a mapping generation module, which is used to: store sample facial features as candidate facial features in a feature library; use sample labels as candidate labels, match candidate labels with candidate facial features one by one, and construct a mapping relationship between candidate labels and candidate facial features.
[0172] Furthermore, the image feature extraction network includes an Inception structure block, which is used to extract multi-scale features of an input image, wherein: the Inception structure block is divided into three branches after the input layer, namely, a first branch, a second branch, and a third branch; the first branch includes a 3×3 convolution layer and a 1×1 convolution layer connected in sequence; the second branch includes a 1×1 convolution layer, and is divided into two sub-branches after the 1×1 convolution layer, one of which includes a 5×5 convolution layer and a 1×1 convolution layer connected in sequence, and the other sub-branch includes a 3×3 convolution layer and a 1×1 convolution layer connected in sequence; the third branch includes a 1×1 convolution layer; the outputs of the first branch and the second branch are spliced with the output of the third branch after channel merging to obtain the output of the Inception structure block.
[0173] In order to implement the above embodiment, the present application embodiment also proposes an electronic device 900, such as Fig. 9 As shown, the electronic device 900 includes: a processor 901 and a memory 902 that is communicatively connected to the processor, the memory 902 stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor 901 to implement the face recognition method applied in coal mines as shown in the above embodiment.
[0174] In order to implement the above-mentioned embodiments, the embodiments of the present application also propose a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to implement the face recognition method applied in coal mines as shown in the above-mentioned embodiments.
[0175] In order to implement the above embodiments, the embodiments of the present application also propose a computer program product, including a computer program, which, when executed by a processor, implements the face recognition method applied in coal mines as shown in the above embodiments.
[0176] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0177] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0178] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0179] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A face recognition method used in coal mines, characterized in that: include: Acquire a video stream acquired by an image acquisition device located underground in a coal mine, and pre-process the video stream to obtain a target image; Determine whether there is a person on the target image, and in response to the presence of a person on the target image, extract the facial features to be matched corresponding to the person; Matching a target facial feature corresponding to the facial feature to be matched from a plurality of candidate facial features in the feature library; Acquire a mapping relationship between a candidate label and a candidate facial feature, and query the mapping relationship based on the target facial feature to obtain a target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label, the target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the head rotation angle of the person being in each preset rotation angle interval; Generate a face recognition result corresponding to the target image based on the target tag.
2. The method according to claim 1, characterized in that The preprocessing of the video stream to obtain a target image includes: Extracting key frames from the video stream to obtain an initial image; The initial image is sequentially subjected to HSV color space conversion processing, filtering processing and image enhancement processing to obtain the target image; The image enhancement process is implemented by combining a gamma transform based on particle swarm optimization with a fractional-order image enhancement algorithm.
3. The method according to claim 2, characterized in that The step of determining whether a person exists in the target image and, in response to a person existing in the target image, extracting a to-be-matched facial feature corresponding to the person, comprises: Performing facial key point detection on the target image; In response to the facial key point detection result indicating that a person exists in the target image, intercepting a facial region from the target image; The face features to be matched are obtained by extracting features from the face area using a pre-trained image feature extraction network.
4. The method according to claim 3, characterized in that The step of obtaining a target facial feature corresponding to the facial feature to be matched from a plurality of candidate facial features in the feature library includes: Obtaining the similarity between the to-be-matched facial feature and each of the candidate facial features; Determining a similarity maximum from the similarities; Determine whether the maximum similarity value is greater than or equal to a preset similarity threshold; In response to the maximum similarity value being greater than or equal to the preset similarity threshold, the candidate facial feature corresponding to the maximum similarity value is used as the target facial feature.
5. The method according to claim 4, characterized in that The method further comprises: In response to the maximum similarity value being less than the preset similarity threshold, it is determined that the matching of the facial features to be matched fails.
6. The method according to claim 5, characterized in that After generating the face recognition result corresponding to the target image based on the target tag, the method further includes: Acquiring the acquisition time of the target image, and acquiring the underground area where the image acquisition device is located; The mine location information of the person is constructed based on the underground area, the acquisition time and the target tag.
7. The method according to claim 3, characterized in that The training method of the image feature extraction network comprises: Obtain images corresponding to each employee at multiple angles as sample images; Obtaining a sample label corresponding to each of the sample images, wherein the sample label includes a sample personnel information label and a sample discrete Gaussian distribution label, the sample personnel information label is used to represent basic information of the employee corresponding to the sample image, and the sample discrete Gaussian distribution label is used to represent the probability value that the head rotation angle of the employee on the sample image is within each preset rotation angle interval; Extracting features from the sample image to obtain sample face features corresponding to the sample image; Constructing a training sample set based on the sample images, the sample labels and the sample facial features; The initial image feature extraction network is trained based on the training sample set, and the image feature extraction network obtained after the training is obtained.
8. The method according to claim 7, characterized in that The method further comprises: storing the sample facial features as candidate facial features in the feature library; The sample labels are used as candidate labels, and the candidate labels are matched one by one with the candidate facial features to construct a mapping relationship between the candidate labels and the candidate facial features.
9. The method according to claim 8, characterized in that The image feature extraction network includes an Inception structure block, which is used to extract multi-scale features of the input image, wherein: The Inception structure block is divided into three branches after the input layer, namely the first branch, the second branch and the third branch; The first branch includes a 3×3 convolutional layer and a 1×1 convolutional layer connected in sequence; The second branch includes a 1×1 convolutional layer, and is divided into two sub-branches after the 1×1 convolutional layer, wherein one sub-branch includes a 5×5 convolutional layer and a 1×1 convolutional layer connected in sequence, and the other sub-branch includes a 3×3 convolutional layer and a 1×1 convolutional layer connected in sequence; The third branch includes a 1×1 convolutional layer; The outputs of the first branch and the second branch are concatenated with the output of the third branch after channel merging to obtain the output of the Inception structure block.
10. A face recognition device used in coal mines, characterized in that: include: An acquisition module is used to acquire a video stream acquired by an image acquisition device located underground in a coal mine, and pre-process the video stream to obtain a target image; An extraction module, used for determining whether there is a person on the target image, and in response to the presence of a person on the target image, extracting a to-be-matched facial feature corresponding to the person; A matching module, used for matching a plurality of candidate facial features in a feature library to obtain a target facial feature corresponding to the facial feature to be matched; A query module, used to obtain a mapping relationship between a candidate label and a candidate facial feature, and query the mapping relationship based on the target facial feature to obtain a target label, wherein the target label includes a target person information label and a target discrete Gaussian distribution label, the target person information label is used to represent the basic information of the person, and the target discrete Gaussian distribution label is used to represent the probability value of the head rotation angle of the person being in each preset rotation angle interval; A generation module is used to generate a face recognition result corresponding to the target image based on the target label.
Citation Information
Cited By
Face recognition method and device, equipment and storage medium
CN120260102A