Low-illumination face detection method, device, computer equipment and storage medium

Through the combination of recursive adversarial generation network and target detection network, the problem of low-light face detection accuracy is solved, and efficient face detection under different lighting conditions is achieved to adapt to face pictures of different scales.

CN114663951BActive Publication Date: 2025-08-01SHENZHEN SUNWIN INTELLIGENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210315012.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2025-08-01
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

The prior art face detection accuracy of low illumination conditions is low, and it is unable to adapt to different degrees of low illumination light. The traditional methods rely on manual threshold setting and parameter adjustment, resulting in unstable detection effect.

Method used

The method of combining recursive adversarial generation network and object detection network is adopted to construct the face detection model through training sample sets, the recursive adversarial generation network is used to improve the lighting intensity, and features are extracted in combination with Bi-LSTM and UNet++ networks, and finally the face target frame detection is detected through the object detection network.

Benefits of technology

It realizes high-accurate low-illumination face detection without threshold adjustment, which can adapt to different degrees of low-illumination light and take into account face pictures of different sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114663951B_ABST
    Figure CN114663951B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention disclose a low-light face detection method, apparatus, computer equipment, and storage medium. The method comprises: acquiring an image to be detected; converting the image to be detected to obtain a converted image; inputting the converted image into a face detection model to perform face detection to obtain a detection result; and outputting the detection result; wherein the face detection model is obtained by training a model composed of a recursive adversarial generative network and a target detection network using a plurality of groups of image pairs consisting of low-light face images and normal-light face images as sample sets. By implementing the method of the embodiments of the present invention, it is possible to perform ultra-low-light face detection without threshold adjustment, and face detection can be performed for different degrees of low-light illumination with high accuracy, and face images of different sizes can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a face detection method, and more specifically to a low-illumination face detection method, device, computer device, and storage medium. Background Art

[0002] With the development of the intelligent society, face recognition technology has been applied in many scenarios, such as the access control system of residential communities, the turnstile entrances of railway stations, and the security systems of exhibitions. Through face recognition technology, people not only enjoy the convenience it brings, but also have their safety guaranteed. For example, in a public place like a railway station, compared with the traditional manual method, using face recognition to pass through the turnstile can greatly improve the passing efficiency.

[0003] Face detection is an important part of face recognition technology. When performing face detection, it is generally done by taking pictures for detection. The pictures will be affected by the illumination. For some pictures with relatively low illumination, if face detection is directly carried out, the detection accuracy will be greatly reduced. There are the following five ways to deal with it. The first is to use the OTSU segmentation algorithm's adaptive algorithm in low illumination conditions to achieve the adaptability of image acquisition in low illumination environments, and verify it through the Adaboost classification detector of low illumination face images before and after processing. In this algorithm, the OTSU algorithm needs to set a threshold for semantic segmentation, and it does not have good compatibility with different degrees of low illumination, and the effect is poor. Secondly, Adaboost is a weak classifier, and the recognition effect often deteriorates due to data imbalance. The second is to preprocess the face video image and finally perform face recognition through feature fusion modeling based on the Adaboost face detection algorithm. This algorithm preprocesses face pictures based on traditional machine learning models and adjusts parameters manually. At the same time, the parameter threshold of the Adaboost face detection algorithm is set, and the detection effect is not accurate enough. The third is to design the impact of illumination changes on face recognition from preprocessing, feature extraction, and memory classifier. The coarse-grained zoning algorithm is used to divide the continuous contrast value range interval in combination with illumination change information, and the LNMCP face features are extracted. By introducing the fuzzy membership function and calculating the weights, the human recognition rate is identified. However, this algorithm divides and extracts face features based on a dynamic threshold for non-linearity, and there is a step of manual parameter setting, making the algorithm model not robust enough and unable to adapt well to abnormal light and the reflection of different parts of the face. The fourth is to set a mask for the interference area, determine the number of pixels in the interference area, and compare its gray value with the threshold to find the pixel points exceeding the threshold. Then, judge whether the number of pixel points with gray values exceeding the threshold in the image is compared with the number of pixel points in the interference area. If it is greater than the number of pixel points in the interference area, the pixel points with gray values exceeding the threshold in the image are masked with the set mask template to change the gray value of the pixel points. However, this method relies too much on the method of manually selecting threshold parameters for anti-reflection processing, does not have good compatibility with different directions and degrees of reflection, and only deals with glasses reflection without considering other illumination effects such as skin diffuse reflection of other lights, making the algorithm effect not robust enough. The fifth is to preprocess the gray value of pixel points, adjust the threshold of the image, and perform unweighted fusion by calculating the neighborhood matrix of the image pixel points. Based on the center line symmetry, the gray value of the pixel points in the white spot area is modified and replaced, and finally the mean normalization is performed on the set of modified image pixel points for face output. However, this patent adjusts the illumination intensity area based on the threshold and cannot adapt to the influence of different illumination conditions. The algorithm's anti-reflection effect is not stable enough, and the recognition effect often deteriorates due to inaccurate setting of the threshold.

[0004] Therefore, it is necessary to design a new method to achieve ultra-low illuminance face detection without threshold adjustment, which can detect faces under different degrees of low illuminance light, with high accuracy, and can also detect face images of different scales. Summary of the Invention

[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a low illuminance face detection method, device, computer device and storage medium.

[0006] To achieve the above purpose, the present invention adopts the following technical solutions: The low illuminance face detection method includes:

[0007] Obtain an image to be detected;

[0008] Convert the image to be detected to obtain a converted image;

[0009] Input the converted image into a face detection model for face detection to obtain a detection result;

[0010] Output the detection result;

[0011] Among them, the face detection model is obtained by training a model composed of a recursive adversarial generation network and an object detection network with several pairs of images composed of low illuminance face images and normal illuminance face images as a sample set.

[0012] Its further technical solution is: The face detection model is obtained by training a model composed of a recursive adversarial generation network and an object detection network with several pairs of images composed of low illuminance face images and normal illuminance face images as a sample set, including:

[0013] Obtain several pairs of images composed of low illuminance face images and normal illuminance face images to obtain a sample set;

[0014] Input the sample set into the recursive adversarial generation network for processing to obtain a processing result;

[0015] Input the processing result into the object detection network for detecting the face target box to obtain a target box detection result;

[0016] Adjust the parameters of the recursive adversarial generation network and the object detection network according to the processing result, the target box detection result and the corresponding loss function, and when the loss value calculated by the corresponding loss function tends to converge, determine the recursive adversarial generation network and the object detection network as the face detection model.

[0017] Its further technical solution is: inputting the sample set into a recursive adversarial generation network for processing to obtain a processing result, including:

[0018] Inputting the low-illumination face images of the sample set into the ResNeXt block and the SE-Residual block in the recursive adversarial generation network for processing to obtain a first processing result;

[0019] Inputting the low-illumination face images of the sample set into the three-layer dilated convolutional layer in the recursive adversarial generation network for processing to obtain a second processing result;

[0020] Performing concatenation processing on the first processing result and the second processing result to obtain a concatenated result;

[0021] Performing Laplacian convolution on the concatenated result to obtain edge information;

[0022] Inputting the edge information into the Bi-LSTM recurrent neural network in the recursive adversarial generation network to obtain an extraction result;

[0023] Processing the extraction result through the deformable convolutional layer and the Mish function in the recursive adversarial generation network to obtain the low-illumination information features of the face picture;

[0024] Performing upsampling on the low-illumination information features of the face picture to obtain an upsampling result;

[0025] Performing direct splicing of the original features on the upsampling result and the low-illumination information features of the face picture to obtain a splicing result;

[0026] Inputting the splicing result into the UNet++ network of the recursive adversarial generation network to obtain extraction features;

[0027] Generating a processing result according to the extraction features and the concatenated result.

[0028] Its further technical solution is: inputting the splicing result into the UNet++ network of the recursive adversarial generation network to obtain extraction features, including:

[0029] Inputting the splicing result into the UNet++ network of the recursive adversarial generation network, and using the penultimate layer, the third-to-last layer, and the fourth-to-last layer of the upsampling in the UNet++ network to process the splicing result to obtain extraction features.

[0030] Its further technical solution is: generating a processing result according to the extraction features and the concatenated result, including:

[0031] Performing upsampling on the extraction features to obtain a sampling result;

[0032] Directly splice the original features of the sampling result and the feature layer of the concatenation result to obtain a processing result.

[0033] A further technical solution thereof is: inputting the processing result into a target detection network to detect a face target box, so as to obtain a target box detection result, including:

[0034] Input the processing result into the third Resblock_body of Darknet in the target detection network to detect the face target box, so as to obtain the target box detection result.

[0035] A further technical solution thereof is: on the basis of the feature extraction network layer of the target detection network, add a branch to increase the output head of the target detection network, and add the output head of the target detection network to the transfomer and convolutional layers.

[0036] The present invention also provides a low-light face detection device, including:

[0037] An image acquisition unit for acquiring an image to be detected;

[0038] A conversion unit for converting the image to be detected to obtain a converted picture;

[0039] A detection unit for inputting the converted picture into a face detection model to perform face detection to obtain a detection result;

[0040] An output unit for outputting the detection result;

[0041] It further includes: a model generation unit for training a model composed of a recursive adversarial generation network and a target detection network with several groups of image pairs composed of low-light face images and normal-light face images as a sample set to obtain a face detection model.

[0042] The present invention also provides a computer device, the computer device includes a memory and a processor, a computer program is stored on the memory, and when the processor executes the computer program, the above method is implemented.

[0043] The present invention also provides a storage medium, the storage medium stores a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0044] The beneficial effects of the present invention compared with the prior art are as follows: By performing face detection on the acquired image to be detected, during the face detection process, for images with insufficient illumination, a recursive adversarial generation network is used to enhance the illumination intensity, and then a target detection network is used for face detection, realizing ultra-low illumination face detection without threshold adjustment, being able to perform face detection for different degrees of low illumination light, with high accuracy, and a transformer is set in the target detection network to be able to detect face images of different scales.

[0045] The following further describes the present invention in conjunction with the accompanying drawings and specific embodiments. Description of the Drawings

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1 It is a schematic diagram of the application scenario of the low-illumination face detection method provided by the embodiment of the present invention;

[0048] Figure 2 It is a schematic flowchart of the low-illumination face detection method provided by the embodiment of the present invention;

[0049] Figure 3 It is a schematic sub-flowchart of the low-illumination face detection method provided by the embodiment of the present invention;

[0050] Figure 4 It is a schematic sub-flowchart of the low-illumination face detection method provided by the embodiment of the present invention;

[0051] Figure 5 It is a schematic sub-flowchart of the low-illumination face detection method provided by the embodiment of the present invention;

[0052] Figure 6 It is a schematic block diagram of the low-illumination face detection device provided by the embodiment of the present invention;

[0053] Figure 7 It is a schematic block diagram of the computer device provided by the embodiment of the present invention. Detailed Embodiments

[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0055] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0056] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0057] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0058] See also Figure 1 and Figure 2 , Figure 1 Schematic diagram of an application scenario of the low-light face detection method provided by an embodiment of the present invention. Figure 2 A schematic flow chart of a low-light face detection method provided in an embodiment of the present invention. The low-light face detection method is applied to a server. The server exchanges data with a camera and a terminal, captures an image to be detected through the camera, and inputs the image to be detected into a face detection model for face detection. The face detection model repeatedly enhances the light intensity of the face image in low-light areas in a more detailed manner based on a recursive adversarial generative network, generates a face image with enhanced light, and then performs face detection on the image. The detection result is output to the terminal for display, thereby realizing ultra-low-light face detection without threshold adjustment. Face detection can be performed for different degrees of low-light illumination with high accuracy, and can take into account face images of different sizes for detection.

[0059] Figure 2 FIG. 1 is a flow chart of a low-light face detection method according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S140.

[0060] S110: Acquire an image to be detected.

[0061] In this embodiment, the image to be detected refers to the image data of a human face collected by an optical camera. Specifically, the collected picture is data of three RGB channels.

[0062] S120. Convert the image to be detected to obtain a converted picture.

[0063] In this embodiment, the converted picture refers to converting the collected image to be detected into HSV picture data.

[0064] Specifically, convert the data of the three RGB channels into HSV picture data through conversion. The three HSV channels respectively represent hue, saturation, and brightness, increasing the sensitivity of the image to the light intensity.

[0065] S130. Input the converted picture into a face detection model for face detection to obtain a detection result.

[0066] In this embodiment, the detection result means that if there is a human face in the image to be detected, it includes the position information of the face target box, etc.; if there is no human face in the image to be detected, the detection result is that there is no human face.

[0067] Among them, the face detection model is obtained by training a model composed of a recursive adversarial generation network and an object detection network with several pairs of images composed of low-illumination human face images and normal-illumination human face images as a sample set.

[0068] In this embodiment, the recursive adversarial generation network refers to a recursive generative adversarial network formed based on Bi-LSTM; the object detection network refers to a model formed by combining Multi-head-Transformer YOLOv5 with more heads of transformer content.

[0069] The recursive generative adversarial network formed based on Bi-LSTM can continuously improve the light intensity of low-illumination images and effectively enhance the illumination of the details of low-illumination human face images. It can effectively adaptively increase the light intensity of low-illumination images without the need for manual traditional image algorithms to manually set parameters to increase the light intensity of human faces. Based on Multi-head-Transformer YOLOv5 combined with more heads of transformer, it takes into account the detection of human face pictures of different scales.

[0070] In one embodiment, please refer to Figure 3 , the above step S130 may include steps S131 to S134.

[0071] S131. Obtain several pairs of images consisting of low-illumination face images and normal-illumination face images to obtain a sample set.

[0072] In this embodiment, based on an optical camera, ultra-low-illumination face picture data is collected, and pictures of the RGB three channels are collected. A pair of low-illumination face pictures and matching face pictures with normal light intensity are collected and converted into pictures of the HSV channel, thereby forming a pair of images consisting of a low-illumination face image of the HSV channel and a normal-illumination face image of the HSV channel. The sample set is a set of several pairs of images consisting of a low-illumination face image of the HSV channel and a normal-illumination face image of the HSV channel.

[0073] S132. Input the sample set into a recursive adversarial generation network for processing to obtain a processing result.

[0074] In this embodiment, the processing result refers to a feature map formed after the recursive adversarial generation network performs fill-light processing.

[0075] In one embodiment, please refer to Figure 4 , the above step S132 may include steps S132a to S132j.

[0076] S132a. Input the low-illumination face images of the sample set into the ResNeXt block and SE-Residual block in the recursive adversarial generation network for processing to obtain a first processing result.

[0077] In this embodiment, the first processing result refers to an image formed after inputting the low-illumination face images of the sample set into the ResNeXt block and SE-Residual block in the recursive adversarial generation network for processing.

[0078] S132b. Input the low-illumination face images of the sample set into the three-layer dilated convolutional layer in the recursive adversarial generation network for processing to obtain a second processing result.

[0079] In this embodiment, the second processing result refers to an image formed after inputting the low-illumination face images of the sample set into the three-layer dilated convolutional layer in the recursive adversarial generation network for processing.

[0080] Specifically, the recursive adversarial generation network has two input ends, namely I and At the initialization, both inputs are the low-illumination face images of the sample set; the input to I passes through the ResNeXt block 3 times and then through the SE-Residual block 2 times to obtain the first processing result I1; for Input to three dilated convolutional layers with different dilation rates of 4, 3, and 2 respectively to obtain the second processing result

[0081] S132c. Concatenate the first processing result and the second processing result to obtain a concatenated result.

[0082] In this embodiment, the concatenated result refers to an image formed by concatenating the first processing result and the second processing result.

[0083] Specifically, concatenate the output first processing result I1 and the second processing result of the two branches to obtain a concatenated result I concate .

[0084] S132d. Perform Laplacian convolution on the concatenated result to obtain edge information.

[0085] In this embodiment, the edge information refers to the information of the illumination edge in the image.

[0086] Specifically, perform Laplacian convolution on the concatenated result I concate Here, in order to better extract the information of the illumination edge in the image, edge information I laplacian is obtained.

[0087] S132e. Input the edge information into the Bi-LSTM recurrent neural network in the recursive adversarial generation network to obtain an extraction result.

[0088] In this embodiment, the extraction result refers to the low-illumination information of the image.

[0089] Specifically, input the edge information I laplacian into the Bi-LSTM recurrent neural network to continuously extract the low-illumination information, and obtain an extraction result I lstm , so as to be friendly to inputs with different illumination intensities and continuously optimize the predicted result of illumination enhancement.

[0090] S132f. Process the extraction result through the deformable convolutional layer and the Mish function in the recursive adversarial generation network to obtain the low-illumination information feature of the face picture.

[0091] In this embodiment, the low-illumination information feature of the face picture refers to the feature corresponding to the low-illumination information of the picture formed by processing the extraction result through the deformable convolutional layer and the Mish function in the recursive adversarial generation network.

[0092] Specifically, the output extraction result I lstm passes through the deformable convolution and the Mish function to obtain the low-illumination information feature I of the face picture face-dark .

[0093] S132g. Upsample the low-light information feature of the face image to obtain an upsampling result.

[0094] In this embodiment, the upsampling result refers to the feature formed by upsampling the low-light information feature of the face image.

[0095] Specifically, based on the low-light information feature I of the face image face-dark perform upsampling to obtain an upsampling result I unsample .

[0096] S132h. Directly splice the original features of the upsampling result and the low-light information feature of the face image to obtain a splicing result.

[0097] In this embodiment, the splicing result refers to the feature formed by directly splicing and combining the original features of the upsampling result and the low-light information feature of the face image.

[0098] Specifically, directly splice the low-light information feature of the face image with the upsampling result I unsample to perform direct splicing of the original features and obtain a splicing result I ru .

[0099] S132i. Input the splicing result into the UNet++ network of the recursive adversarial generation network to obtain an extracted feature.

[0100] In this embodiment, the extracted feature refers to the feature formed by the UNet++ network processing the splicing result at the second-to-last, third-to-last, and fourth-to-last layers of upsampling.

[0101] Specifically, input the splicing result into the UNet++ network of the recursive adversarial generation network, and use the second-to-last, third-to-last, and fourth-to-last layers of upsampling of the UNet++ network to process the splicing result to obtain an extracted feature.

[0102] Input the splicing result I ru into the UNet++ network to obtain an output image R with enhanced illumination removed face-enhance , where the output features of the second-to-last, third-to-last, and fourth-to-last layers of the features of the UNet++ network upsampling are the extracted features respectively

[0103] S132j. Generate a processing result according to the extracted feature and the concatenation result.

[0104] In one embodiment, please refer to Figure 4 , the above step S132j may include steps S132j1 to S132j2.

[0105] S132j1. Upsample the extracted features to obtain a sampling result.

[0106] In this embodiment, the sampling result refers to the result formed by upsampling the extracted features.

[0107] S132j2. Directly splice the original features of the sampling result and the feature layer of the concatenated result to obtain a processing result.

[0108] Specifically, the extracted features output by the recursive adversarial generation network After upsampling respectively, they are directly spliced and merged with the feature layer of the above concatenated result I concate to form a processing result F yolo , which is used as the input of the target detection model network.

[0109] In this embodiment, when training the recursive adversarial generation network, based on the R output by recursive call face-enhance The features will also act as the input in this network In this way, it iterates in a loop, and the initial input is the low-light face image in the sample set.

[0110] During training, the recursive adversarial generation network is used to generate the features of face pictures under normal light and the features of face pictures under low light, and based on these features, face targets are extracted, which can adapt to the influence of different degrees of illumination on face detection.

[0111] S133. Input the processing result into the target detection network to detect the face target box to obtain the target box detection result.

[0112] In this embodiment, the target box detection result refers to the detection results such as the position of the face target box.

[0113] Specifically, input the processing result into the third Resblock_body of Darknet in the target detection network to detect the face target box to obtain the target box detection result.

[0114] Specifically, based on the output head, the continued fintune multi-head mode is adopted, that is, an additional branch is added to the neck of the target detection network on the original extracted feature network layer, so as to increase the output head of the target detection network. At the same time, the output head of the target detection network is added to the modes of transfomer and convolution to increase the detection accuracy of the target detection network for multi-scale targets. The recursive adversarial generation network and the target detection network are trained simultaneously during the training process, and the input features of the target detection network come from the recursive adversarial generation network Perform the integration of two networks.

[0115] In this embodiment, the loss function of the recursive adversarial generation network includes a pixel loss function, a perceptual loss function, and an adversarial loss function. Among them, the pixel loss function is the sum of the MSE loss function and the SSIM loss function, specifically: The perceptual loss function is The adversarial loss function is: Among them, R in the formula represents a face image under normal illumination, and in the formula represents the corresponding generated face image under enhanced illumination. The loss function of the recursive adversarial generation network, that is, the overall loss function, is Loss total = τ1Loss pixel + τ2Loss perceptual + τ3Loss adversarial , where μ1 = 0.3, μ2Loss feature = 0.1, μ3Loss adversarial = 0.2.

[0116] The loss function of the object detection network is the same as that of yolov3, mainly including: center coordinate error; width and height coordinate error; confidence error; classification error.

[0117] S134. Adjust the parameters of the recursive adversarial generation network and the object detection network according to the processing result, the object box detection result, and the corresponding loss function. When the loss value calculated by the corresponding loss function tends to converge, determine that the recursive adversarial generation network and the object detection network are face detection models.

[0118] In this embodiment, calculate the loss value according to the processing result, the object box detection result, and the corresponding loss function. According to whether the loss value tends to converge, when it does not tend to converge, adjust the parameters of the recursive adversarial generation network and the object detection network and retrain until the loss value converges and the model training converges, and then form a face detection model with the final recursive adversarial generation network and the object detection network.

[0119] During the training process, use the recursive adversarial generation network to generate face image features under normal illumination and face image features under low illumination, and extract face targets based on these features, which can adapt to the influence of different degrees of illumination on face detection. The face detection model in this embodiment is trained based on a multi-task model, which increases the training difficulty of the face detection model. Therefore, it is necessary to reduce the learning rate and increase the batch Size to prevent the occurrence of gradient explosion in the face detection model. At the same time, based on the multi-task model for low-light face detection increases the supervision information of the model, and the prediction effect of the model is better.

[0120] S140. Output the detection result.

[0121] The face detection model of this embodiment can well adapt to the influence of light intensity with different intensities and directions, and there is no need to manually set parameters to perform enhanced lighting operations on pictures. Based on the recursive adversarial generation network, the face detection model can more carefully enhance the lighting intensity of the face pictures in the low-light areas repeatedly. At the same time, the mechanism of adding more heads of transformers is added during the face detection process to better detect the target boxes of faces with different scales and sizes.

[0122] For the above low-light face detection method, by performing face detection on the acquired image to be detected, during the face detection process, for the images with insufficient illuminance, the recursive adversarial generation network is used to enhance the lighting intensity, and then the object detection network is used for face detection, realizing ultra-low-light face detection without threshold adjustment, and can perform face detection for different degrees of low-light illumination, with high accuracy. And a transformer is set in the object detection network, which can take into account face pictures with different scales and sizes for detection.

[0123] Figure 6 It is a schematic block diagram of a low-light face detection device 300 provided by an embodiment of the present invention. As Figure 6 shown, corresponding to the above low-light face detection method, the present invention also provides a low-light face detection device 300. The low-light face detection device 300 includes units for executing the above low-light face detection method, and this device can be configured in a server. Specifically, please refer to Figure 6 , the low-light face detection device 300 includes an image acquisition unit 301, a conversion unit 302, a detection unit 303, and an output unit 304.

[0124] The image acquisition unit 301 is used to acquire the image to be detected; the conversion unit 302 is used to convert the image to be detected to obtain a converted picture; the detection unit 303 is used to input the converted picture into a face detection model for face detection to obtain a detection result; the output unit 304 is used to output the detection result.

[0125] In one embodiment, the low-light face detection device 300 further includes a model generation unit, which is used to train a model composed of a recursive adversarial generation network and an object detection network with several groups of image pairs composed of low-light face images and normal-light face images as a sample set to obtain a face detection model.

[0126] In one embodiment, the model generation unit includes a sample set acquisition subunit, a processing subunit, a target box detection subunit, and an adjustment subunit.

[0127] A sample set acquisition subunit is configured to acquire several pairs of images composed of low-illumination face images and normal-illumination face images to obtain a sample set; a processing subunit is configured to input the sample set into a recursive adversarial generation network for processing to obtain a processing result; a target box detection subunit is configured to input the processing result into a target detection network to detect a face target box to obtain a target box detection result; an adjustment subunit is configured to adjust the parameters of the recursive adversarial generation network and the target detection network according to the processing result, the target box detection result and a corresponding loss function, and when the loss value calculated by the corresponding loss function tends to converge, determine that the recursive adversarial generation network and the target detection network are face detection models.

[0128] In one embodiment, the processing subunit includes a first processing module, a second processing module, a concatenation module, a convolution module, a recursive module, a low-illumination feature generation module, an upsampling module, a splicing module, a feature extraction module, and a third processing module.

[0129] The first processing module is configured to input the low-illumination face images of the sample set into a ResNeXt block and an SE-Residual block in the recursive adversarial generation network for processing to obtain a first processing result; the second processing module is configured to input the low-illumination face images of the sample set into three dilated convolutional layers in the recursive adversarial generation network for processing to obtain a second processing result; the concatenation module is configured to perform concatenation processing on the first processing result and the second processing result to obtain a concatenated result; the convolution module is configured to perform Laplacian convolution on the concatenated result to obtain edge information; the recursive module is configured to input the edge information into a Bi-LSTM recurrent neural network in the recursive adversarial generation network to obtain an extraction result; the low-illumination feature generation module is configured to process the extraction result through a deformable convolutional layer and a Mish function in the recursive adversarial generation network to obtain low-illumination information features of a face picture; the upsampling module is configured to perform upsampling on the low-illumination information features of the face picture to obtain an upsampling result; the splicing module is configured to directly splice the original features of the upsampling result and the low-illumination information features of the face picture to obtain a spliced result; the feature extraction module is configured to input the spliced result into a UNet++ network of the recursive adversarial generation network to obtain extracted features; the third processing module is configured to generate a processing result according to the extracted features and the concatenated result.

[0130] In one embodiment, the feature extraction module is configured to input the spliced result into a UNet++ network of the recursive adversarial generation network, and use the penultimate layer, the third-to-last layer, and the fourth-to-last layer of the upsampling in the UNet++ network to process the spliced result to obtain extracted features.

[0131] In one embodiment, the third processing module includes an upsampling sub-module and a feature splicing sub-module.

[0132] The upsampling sub-module is configured to perform upsampling on the extracted features to obtain a sampling result; the feature splicing sub-module is configured to directly splice the original features of the sampling result and the feature layer of the concatenated result to obtain a processing result.

[0133] In one embodiment, the target box detection sub-unit is configured to input the processing result into the third Resblock_body of Darknet of the target detection network to detect a face target box, so as to obtain a target box detection result.

[0134] It should be noted that those skilled in the art can clearly understand that the specific implementation processes of the above low-light face detection device 300 and each unit can refer to the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and brevity of description, they will not be elaborated here.

[0135] The above low-light face detection device 300 can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 7 shown.

[0136] Please refer to Figure 7 , Figure 7 which is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 may be a server. Among them, the server may be an independent server or a server cluster composed of multiple servers.

[0137] Referring to Figure 7 , the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501. Among them, the memory may include a non-volatile storage medium 503 and an internal memory 504.

[0138] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can be made to execute a low-light face detection method.

[0139] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.

[0140] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can be made to execute a low-light face detection method.

[0141] The network interface 505 is used for network communication with other devices. Those skilled in the art can understand that Figure 7 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device 500 to which the solution of this application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0142] Among them, the processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:

[0143] Obtain the image to be detected; convert the image to be detected to obtain a converted picture; input the converted picture into a face detection model for face detection to obtain a detection result; output the detection result;

[0144] Among them, the face detection model is obtained by training a model composed of a recursive adversarial generation network and an object detection network with several pairs of images composed of low-illumination face images and normal-illumination face images as a sample set.

[0145] In an embodiment, when the processor 502 implements the step of obtaining the face detection model by training a model composed of a recursive adversarial generation network and an object detection network with several pairs of images composed of low-illumination face images and normal-illumination face images as a sample set, the following steps are specifically implemented:

[0146] Obtain several pairs of images composed of low-illumination face images and normal-illumination face images to obtain a sample set; input the sample set into the recursive adversarial generation network for processing to obtain a processing result; input the processing result into the object detection network for detecting the face target box to obtain a target box detection result; adjust the parameters of the recursive adversarial generation network and the object detection network according to the processing result, the target box detection result and the corresponding loss function, and when the loss value calculated by the corresponding loss function tends to converge, determine the recursive adversarial generation network and the object detection network as the face detection model.

[0147] In an embodiment, when the processor 502 implements the step of inputting the sample set into the recursive adversarial generation network for processing to obtain a processing result, the following steps are specifically implemented:

[0148] Input the low - illumination face images of the sample set into the ResNeXt block and SE - Residual block in the recursive adversarial generation network for processing to obtain the first processing result; input the low - illumination face images of the sample set into the three - layer dilated convolutional layer in the recursive adversarial generation network for processing to obtain the second processing result; concatenate the first processing result and the second processing result to obtain a concatenated result; perform Laplacian convolution on the concatenated result to obtain edge information; input the edge information into the Bi - LSTM recurrent neural network in the recursive adversarial generation network to obtain an extraction result; process the extraction result through the deformable convolutional layer and Mish function in the recursive adversarial generation network to obtain the low - illumination information features of the face picture; upsample the low - illumination information features of the face picture to obtain an upsampling result; directly splice the original features of the upsampling result and the low - illumination information features of the face picture to obtain a splicing result; input the splicing result into the UNet++ network of the recursive adversarial generation network to obtain extraction features; generate a processing result according to the extraction features and the concatenated result.

[0149] In one embodiment, when the processor 502 implements the step of inputting the splicing result into the UNet++ network in the recursive adversarial generation network to obtain extraction features, the specific implementation steps are as follows:

[0150] Input the splicing result into the UNet++ network of the recursive adversarial generation network, and use the penultimate, the third - last, and the fourth - last layers of the upsampling in the UNet++ network to process the splicing result to obtain extraction features.

[0151] In one embodiment, when the processor 502 implements the step of generating a processing result according to the extraction features and the concatenated result, the specific implementation steps are as follows:

[0152] Upsample the extraction features to obtain a sampling result; directly splice the original features of the sampling result and the feature layer of the concatenated result to obtain a processing result.

[0153] In one embodiment, when the processor 502 implements the step of inputting the processing result into the target detection network to detect the face target box to obtain the target box detection result, the specific implementation steps are as follows:

[0154] Input the processing result into the third Resblock_body of Darknet in the target detection network to detect the face target box to obtain the target box detection result.

[0155] Among them, on the basis of the feature extraction network layer of the target detection network, a branch is added to increase the output head of the target detection network, and the output head of the target detection network is added to the transformer and convolutional layers.

[0156] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0157] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0158] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps:

[0159] Obtain an image to be detected; perform conversion on the image to be detected to obtain a converted image; input the converted image into a face detection model for face detection to obtain a detection result; output the detection result;

[0160] Among them, the face detection model is obtained by training a model composed of a recursive adversarial generation network and a target detection network with several pairs of images composed of low-illumination face images and normal-illumination face images as a sample set.

[0161] In an embodiment, when the processor executes the computer program to implement the step of obtaining a face detection model by training a model composed of a recursive adversarial generation network and a target detection network with several pairs of images composed of low-illumination face images and normal-illumination face images as a sample set, the following steps are specifically implemented:

[0162] Obtain several pairs of images consisting of low - illumination face images and normal - illumination face images to obtain a sample set; input the sample set into a recursive adversarial generation network for processing to obtain a processing result; input the processing result into a target detection network for face target box detection to obtain a target box detection result; adjust the parameters of the recursive adversarial generation network and the target detection network according to the processing result, the target box detection result and the corresponding loss function, and when the loss value calculated by the corresponding loss function tends to converge, determine the recursive adversarial generation network and the target detection network as a face detection model.

[0163] In one embodiment, when the processor executes the computer program to implement the step of inputting the sample set into the recursive adversarial generation network for processing to obtain a processing result, the specific implementation is as follows:

[0164] Input the low - illumination face images of the sample set into the ResNeXt block and the SE - Residual block in the recursive adversarial generation network for processing to obtain a first processing result; input the low - illumination face images of the sample set into the three - layer dilated convolutional layer in the recursive adversarial generation network for processing to obtain a second processing result; concatenate the first processing result and the second processing result to obtain a concatenated result; perform Laplacian convolution on the concatenated result to obtain edge information; input the edge information into the Bi - LSTM recurrent neural network in the recursive adversarial generation network to obtain an extraction result; process the extraction result through the deformable convolutional layer and the Mish function in the recursive adversarial generation network to obtain the low - illumination information feature of the face picture; upsample the low - illumination information feature of the face picture to obtain an upsampling result; directly splice the original features of the upsampling result and the low - illumination information feature of the face picture to obtain a splicing result; input the splicing result into the UNet++ network of the recursive adversarial generation network to obtain an extraction feature; generate a processing result according to the extraction feature and the concatenated result.

[0165] In one embodiment, when the processor executes the computer program to implement the step of inputting the splicing result into the UNet++ network in the recursive adversarial generation network to obtain an extraction feature, the specific implementation is as follows:

[0166] Input the splicing result into the UNet++ network of the recursive adversarial generation network, and use the second - last layer, the third - last layer, and the fourth - last layer of the upsampling in the UNet++ network to process the splicing result to obtain an extraction feature.

[0167] In one embodiment, when the processor executes the computer program to implement the step of generating a processing result according to the extracted features and the concatenation result, the following steps are specifically implemented:

[0168] Upsample the extracted features to obtain a sampling result; directly splice the original features of the sampling result and the feature layer of the concatenation result to obtain a processing result.

[0169] In one embodiment, when the processor executes the computer program to implement the step of inputting the processing result into a target detection network to detect a face target box to obtain a target box detection result, the following steps are specifically implemented:

[0170] Input the processing result into the third Resblock_body of Darknet in the target detection network to detect a face target box to obtain a target box detection result.

[0171] Among them, based on the feature extraction network layer of the target detection network, a branch is added to increase the output head of the target detection network, and the output head of the target detection network is added to the transfomer and convolutional layers.

[0172] The storage medium can be various computer-readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc that can store program codes.

[0173] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0174] In several embodiments provided by the present invention, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0175] The steps in the method of the embodiments of the present invention can be adjusted in sequence, combined, and deleted according to actual needs. The units in the device of the embodiments of the present invention can be combined, divided, and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0176] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present invention.

[0177] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A low-light face detection method, characterized in that, Including: Obtain the image to be detected; Convert the image to be detected to obtain a converted picture; Input the converted picture into a face detection model for face detection to obtain a detection result; Output the detection result; Wherein, the face detection model is obtained by training a model composed of a recursive adversarial generation network and an object detection network with several pairs of images composed of low-illumination face images and normal-illumination face images as a sample set; Including: Obtain several pairs of images composed of low-illumination face images and normal-illumination face images to obtain a sample set; Input the sample set into the recursive adversarial generation network for processing to obtain a processing result; Input the low-illumination face images of the sample set into the ResNeXt block and SE-Residual block in the recursive adversarial generation network for processing to obtain a first processing result; Input the low-illumination face images of the sample set into the three-layer dilated convolutional layer in the recursive adversarial generation network for processing to obtain a second processing result; Concatenate the first processing result and the second processing result to obtain a concatenated result; Perform Laplacian convolution on the concatenated result to obtain edge information; Input the edge information into the Bi-LSTM recurrent neural network in the recursive adversarial generation network to obtain an extraction result; Process the extraction result through the deformable convolutional layer and Mish function in the recursive adversarial generation network to obtain the low-illumination information feature of the face picture; Upsample the low-illumination information feature of the face picture to obtain an upsampling result; Directly splice the upsampling result with the original features of the low-illumination information feature of the face picture to obtain a splicing result; Input the splicing result into the UNet++ network of the recursive adversarial generation network to obtain an extracted feature; Generate a processing result according to the extracted feature and the concatenated result; Input the processing result into the object detection network for detecting the face target box to obtain a target box detection result; Adjust the parameters of the recursive adversarial generation network and the object detection network according to the processing result, the target box detection result and the corresponding loss function, and when the loss value calculated by the corresponding loss function tends to converge, determine the recursive adversarial generation network and the object detection network as the face detection model.

2. The low-light face detection method according to claim 1, wherein The step of inputting the splicing result into the UNet++ network in the recursive adversarial generation network to obtain an extracted feature includes: Input the splicing result into the UNet++ network in the recursive adversarial generation network, and use the penultimate layer, the third-to-last layer and the fourth-to-last layer of the upsampling in the UNet++ network to process the splicing result to obtain an extracted feature.

3. The low-light face detection method according to claim 2, wherein The step of generating a processing result according to the extracted feature and the concatenated result includes: Upsample the extracted feature to obtain a sampling result; Directly splice the sampling result with the feature layer of the concatenated result to obtain a processing result.

4. The low-light face detection method according to claim 1, characterized in that, The step of inputting the processing result into the object detection network for detecting the face target box to obtain a target box detection result includes: Input the processing result into the third Resblock_body of Darknet in the target detection network to detect the face target box, so as to obtain the target box detection result.

5. The low-light face detection method according to claim 4, wherein On the basis of the feature extraction network layer of the target detection network, a branch is added to increase the output head of the target detection network, and the output head of the target detection network is added to the transfomer and convolutional layers.

6. Low-light face detection device, characterized in that, Including: An image acquisition unit for acquiring an image to be detected; A conversion unit for converting the image to be detected to obtain a converted picture; A detection unit for inputting the converted picture into a face detection model for face detection to obtain a detection result; An output unit for outputting the detection result; It further includes: a model generation unit for training a model composed of a recursive adversarial generation network and a target detection network with several groups of image pairs composed of low-illumination face images and normal-illumination face images as a sample set to obtain a face detection model; The model generation unit includes a sample set acquisition subunit, a processing subunit, a target box detection subunit, and an adjustment subunit; The sample set acquisition subunit is used to acquire several groups of image pairs composed of low-illumination face images and normal-illumination face images to obtain a sample set; the processing subunit is used to input the sample set into the recursive adversarial generation network for processing to obtain a processing result; the target box detection subunit is used to input the processing result into the target detection network for face target box detection to obtain a target box detection result; the adjustment subunit is used to adjust the parameters of the recursive adversarial generation network and the target detection network according to the processing result, the target box detection result and the corresponding loss function, and when the loss value calculated by the corresponding loss function tends to converge, determine the recursive adversarial generation network and the target detection network as the face detection model; The processing subunit includes a first processing module, a second processing module, a series connection module, a convolutional module, a recursive module, a low-illumination feature generation module, an upsampling module, a splicing module, a feature extraction module, and a third processing module; The first processing module is configured to input the low-illumination face images of the sample set into the ResNeXt block and the SE-Residual block in the recursive adversarial generation network to obtain a first processing result; the second processing module is configured to input the low-illumination face images of the sample set into the three-layer dilated convolutional layer in the recursive adversarial generation network to obtain a second processing result; the concatenation module is configured to perform concatenation processing on the first processing result and the second processing result to obtain a concatenated result; the convolutional module is configured to perform Laplacian convolution on the concatenated result to obtain edge information; the recursive module is configured to input the edge information into the Bi-LSTM recurrent neural network in the recursive adversarial generation network to obtain an extraction result; the low-illumination feature generation module is configured to process the extraction result through the deformable convolutional layer and the Mish function in the recursive adversarial generation network to obtain the low-illumination information feature of the face picture; the upsampling module is configured to perform upsampling on the low-illumination information feature of the face picture to obtain an upsampled result; the splicing module is configured to directly splice the original features of the upsampled result and the low-illumination information feature of the face picture to obtain a spliced result; the feature extraction module is configured to input the spliced result into the UNet++ network of the recursive adversarial generation network to obtain an extracted feature; the third processing module is configured to generate a processing result according to the extracted feature and the concatenated result.

7. A computer device, characterized in that, The computer device includes a memory and a processor, and a computer program is stored on the memory. When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.