A method for generating a visible light image of a human face and a related device

By fusing the infrared brightness map with the visible light chromaticity map, a target face visible light map with normal brightness is solved, and the accuracy of the recognition system is improved.

CN112258592BActive Publication Date: 2024-11-01SHENZHEN JIESHUN SCI & TECH IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010978666.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-17
Publication Date
2024-11-01
Estimated Expiration
2040-09-17

AI Technical Summary

Technical Problem

In the case of abnormal lighting, it is difficult for the face recognition system to obtain clear visible light maps, resulting in a decrease in recognition effect.

Method used

By obtaining infrared and visible light maps, the infrared brightness map and visible light chromaticity map are generated respectively, and the target generation model is used to fuse them to generate target chromaticity maps to supplement the lighting information to form a target face visible light map with normal brightness.

Benefits of technology

In the case of abnormal brightness, the facial recognition system's ability to extract key point information is improved and the recognition effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112258592B_ABST
    Figure CN112258592B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method for generating a visible light image of a face and a related device. The method enables the visible light image of a face obtained under abnormal brightness conditions to more easily extract key point information, thereby improving the recognition effect. The method of the embodiment of the present application includes: obtaining an infrared image and a visible light image of the same face in an abnormal lighting scene; generating an infrared brightness image and a visible light chromaticity image respectively according to the infrared image and the visible light image; generating a target chromaticity image through a target generation model from the infrared brightness image and the visible light chromaticity image, so that the generated target chromaticity image contains the chromaticity of the visible light chromaticity image and the content features of the infrared brightness image; generating a target visible light image according to the infrared brightness image and the target chromaticity image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing, and in particular to a method for generating a visible light image of a face and a related device. Background Art

[0002] As people's security awareness increases, face recognition systems are widely used in various scenarios in people's lives, such as attendance, company entrances and exits, security monitoring, etc.

[0003] The basic way for a face recognition system to perform face recognition is to obtain a face image to be recognized on site, extract key point data of the face image to be recognized, and compare the face image to be recognized with a face image library through the key point data. The current main face recognition method is to obtain a visible light image of the face to be recognized, extract key point data of the visible light image, and compare the key point data with the visible light image library of the face in the system.

[0004] However, in the case of abnormal lighting (backlight, backlight or strong light), the imaging effect of the visible light image of the face is poor. It is very difficult for the face recognition system to collect key point data for such visible light images with abnormal brightness, resulting in a decrease in recognition effect. Summary of the invention

[0005] The embodiments of the present application provide a method for generating a visible light image of a human face and a related device, which makes it easy to obtain an image of a human face wearing a mask.

[0006] A first aspect of an embodiment of the present application provides a method for generating a visible light image of a face, comprising:

[0007] Obtain infrared and visible light images of the same face in abnormal lighting scenarios;

[0008] Generate an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively;

[0009] The infrared brightness map and the visible light chromaticity map are used to generate a target chromaticity map through a target generation model, so that the generated target chromaticity map contains the chromaticity of the visible light chromaticity map and the content characteristics of the infrared brightness map;

[0010] A target visible light map is generated according to the infrared brightness map and the target chromaticity map.

[0011] Optionally, before obtaining the face infrared image and the abnormal face visible light image with abnormal brightness, the generating method further includes:

[0012] Acquire an initial sample set, wherein each group of initial samples in the initial sample set includes a training infrared image and a training visible light image of a target face in an abnormal lighting scene;

[0013] Generate a training infrared brightness image and a training visible light chromaticity image according to the training infrared image and the training visible light image respectively;

[0014] Marking the training infrared brightness image and the training visible light chromaticity image as a group of target samples to obtain a target sample set;

[0015] Training the target sample set and updating an initial generation model and an initial discrimination model through an adversarial network model, wherein the adversarial network model includes the initial generation model and the initial discrimination model, and the initial generation model and the initial discrimination model are models established based on a neural network;

[0016] When the adversarial network model training is completed, the updated initial generation model is determined as the target generation model.

[0017] Optionally, the training of the target sample set by using the adversarial network model and updating the initial generation model and the initial discrimination model includes:

[0018] Selecting a group of target samples from the target sample set;

[0019] Inputting the target sample into an initial generation model;

[0020] Obtaining a style transfer map generated by the initial generation model and according to the target sample, wherein the style transfer map includes content features of the training infrared brightness map and style features of the training visible light chromaticity map;

[0021] Inputting the style transfer map and the training visible light chromaticity map into an initial discriminant model;

[0022] Generate discriminant data through the initial discriminant model, and the discriminant data is used to calculate the total loss value of the initial generation model;

[0023] Updating parameters of the initial discriminant model according to the style transfer map and the training visible light chromaticity map;

[0024] Calculating a total loss value according to the style transfer map, the training visible light chromaticity map and the discrimination data;

[0025] Generate an input frequency value, wherein the input frequency value represents the number of times the real sample is input into the initial generation model;

[0026] Determine whether the total loss value is less than a preset value. If not, update the parameters of the initial generation model according to the total loss value, re-input the generation model sample into the initial generation model after the updated parameters, and re-execute the steps of calculating the total loss value and determining whether the total loss value is less than the preset value;

[0027] If so, determine whether the input number value is equal to 1. If so, confirm that the training of the adversarial network model is completed.

[0028] Optionally, after determining whether the input number value is equal to 1, the generating method further includes:

[0029] If not, the parameters of the initial generation model are updated according to the total loss value, another set of target samples are selected, and the steps of calculating the total loss value and determining whether the total loss value is less than the preset value are re-executed.

[0030] Optionally, updating the parameters of the initial discriminant model according to the style transfer map and the training visible light chromaticity map includes:

[0031] Performing a logistic regression judgment on the style transfer map and the training visible light chromaticity map;

[0032] If it is determined that the style transfer map is true, then the parameters of the initial discriminant model are updated using the training visible light chromaticity map;

[0033] If the style transfer map is determined to be false, the style transfer map is used to update the parameters of the initial discriminant model.

[0034] Optionally, calculating the total loss value according to the style transfer map, the training visible light chromaticity map and the discrimination data includes:

[0035] Calculating a first loss value between the style transfer map and the training visible light chromaticity map;

[0036] Calculating a second loss value;

[0037] Calculate a third loss value according to the discrimination data;

[0038] A weight calculation is performed according to the first loss value, the second loss value and the third loss value to obtain a total loss value.

[0039] Optionally, it is characterized in that the generating an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively comprises:

[0040] Separating the visible light image into a visible light chromaticity image through a chromaticity channel of a color space;

[0041] The infrared image is separated into an infrared brightness image through a brightness channel of a color space.

[0042] Optionally, generating a target visible light image according to the infrared brightness image and the target chromaticity image includes:

[0043] Inputting the infrared brightness image into the brightness channel;

[0044] Inputting the target chromaticity map into the chromaticity channel;

[0045] The brightness channel and the chrominance channel are fused to generate a visible light map of the target face.

[0046] A second aspect of an embodiment of the present application provides a device for generating a visible light image of a face, comprising:

[0047] A first acquisition unit is used to acquire an infrared image and a visible light image of the same face in an abnormal lighting scene;

[0048] A first generating unit, configured to generate an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively;

[0049] A second generating unit, configured to generate a target chromaticity diagram from the infrared brightness diagram and the visible light chromaticity diagram through a target generation model, so that the generated target chromaticity diagram includes the chromaticity of the visible light chromaticity diagram and the content features of the infrared brightness diagram;

[0050] The third generating unit is used to generate a target visible light image according to the infrared brightness image and the target chromaticity image.

[0051] Optionally, the device further comprises:

[0052] A second acquisition unit is used to acquire an initial sample set, wherein each group of initial samples in the initial sample set includes a training infrared image and a training visible light image of a target face in an abnormal lighting scene;

[0053] a fourth generating unit, configured to generate a training infrared brightness image and a training visible light chromaticity image respectively according to the training infrared image and the training visible light image;

[0054] A third acquisition unit, configured to mark the training infrared brightness image and the training visible light chromaticity image as a group of target samples to obtain a target sample set;

[0055] A training unit, used for training the target sample set and updating an initial generation model and an initial discrimination model through an adversarial network model, wherein the adversarial network model includes the initial generation model and the initial discrimination model, and the initial generation model and the initial discrimination model are models established based on a neural network;

[0056] The first determination unit is used to determine the updated initial generation model as the target generation model when the training of the adversarial network model is completed.

[0057] Optionally, the training unit includes:

[0058] A selection module, used for selecting a group of target samples from the target sample set;

[0059] A first input module, used to input the target sample into an initial generation model;

[0060] A fourth acquisition module, used for acquiring a style transfer map generated by the initial generation model and according to the target sample, wherein the style transfer map includes content features of the training infrared brightness map and style features of the training visible light chromaticity map;

[0061] A second input module, used to input the style transfer map and the training visible light chromaticity map into an initial discriminant model;

[0062] A fifth generation module, used to generate discriminant data through the initial discriminant model, wherein the discriminant data is used to calculate the total loss value of the initial generation model;

[0063] A first updating module, configured to update the parameters of the initial discriminant model according to the style transfer map and the training visible light chromaticity map;

[0064] A calculation module, used for calculating a total loss value according to the style transfer map, the training visible light chromaticity map and the discrimination data;

[0065] A sixth generation module, used for the input number value to represent the number of times the real sample is input into the initial generation model;

[0066] A first judgment module, used to judge whether the total loss value is less than a preset value;

[0067] A second updating module is used for updating the parameters of the initial generation model according to the total loss value when the first judgment module confirms that the total loss value is not less than the preset value, re-inputting the generation model sample into the initial generation model after the updated parameters, and re-executing the steps of calculating the total loss value and judging whether the total loss value is less than the preset value;

[0068] A second judgment module, used for judging whether the input times value is equal to 1 when the first judgment module determines that the total loss value is less than a preset value;

[0069] The second determination module is used to confirm that the training of the adversarial network model is completed when the second judgment module confirms that the input number value is equal to 1.

[0070] Optionally, the generating device further includes:

[0071] The third updating module is used to update the parameters of the initial generation model according to the total loss value when the second judgment module confirms that the input number value is not equal to 1, select another group of training samples, and re-execute the steps of calculating the total loss value and judging whether the total loss value is less than a preset value.

[0072] Optionally, the first updating module is specifically:

[0073] Performing a logistic regression judgment on the style transfer map and the training visible light chromaticity map;

[0074] If it is determined that the style transfer map is true, then the parameters of the initial discriminant model are updated using the training visible light chromaticity map;

[0075] If the style transfer map is determined to be false, the style transfer map is used to update the parameters of the initial discriminant model.

[0076] Optionally, the calculation module is specifically:

[0077] Calculating a first loss value between the style transfer map and the training visible light chromaticity map;

[0078] Calculating a second loss value;

[0079] Calculate a third loss value according to the discrimination data;

[0080] A weight calculation is performed according to the first loss value, the second loss value and the third loss value to obtain a total loss value.

[0081] Optionally, the first generating unit includes:

[0082] A seventh generating module, used for separating the visible light image into a visible light chromaticity image through a chromaticity channel of a color space;

[0083] The eighth generating module is used to separate the infrared image into an infrared brightness image through a brightness channel of a color space.

[0084] Optionally, the third generating unit includes:

[0085] A third input module, used for inputting the infrared brightness image into the brightness channel;

[0086] A fourth input module, used for inputting the target chromaticity diagram into the chromaticity channel;

[0087] A synthesis module is used to fuse the brightness channel with the chrominance channel to generate a visible light image of the target face.

[0088] A third aspect of an embodiment of the present application provides a device for generating a visible light image of a face, comprising:

[0089] Processor, memory, input and output unit, bus;

[0090] The processor is connected to the memory, the input and output unit, and the bus;

[0091] The processor specifically performs the following operations:

[0092] Obtain infrared and visible light images of the same face in abnormal lighting scenarios;

[0093] Generate an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively;

[0094] The infrared brightness map and the visible light chromaticity map are used to generate a target chromaticity map through a target generation model, so that the generated target chromaticity map contains the chromaticity of the visible light chromaticity map and the content characteristics of the infrared brightness map;

[0095] A target visible light map is generated according to the infrared brightness map and the target chromaticity map.

[0096] Optionally, the processor is also used to perform operations of any optional scheme in the first aspect.

[0097] A computer-readable storage medium stores a program, and when the program is executed on a computer, the program executes the aforementioned first aspect and any optional method of the first aspect.

[0098] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0099] In the present invention, the visible light image and infrared image with abnormal brightness are processed into visible light chromaticity image and infrared brightness image, and the infrared brightness image is made to learn the chromaticity information of the visible light chromaticity image through the target generation model to generate a normal target chromaticity image, and then the target chromaticity image and the infrared brightness image are fused into a target face visible light image with normal brightness. Under the condition of abnormal brightness, the acquired abnormal image is converted into a normal image with brightness, so that the acquired face visible light image under the condition of abnormal brightness can more simply extract key point information, so that the recognition effect is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] Figure 1 This is a schematic diagram of an embodiment of a method for generating a visible light image of a face in an embodiment of the present application;

[0101] Figure 2-1 and Figure 2-2 This is a flow chart of another embodiment of the method for generating a visible light image of a face in an embodiment of the present application;

[0102] Figure 3This is a schematic diagram of the structure of an embodiment of a device for generating a visible light image of a face in an embodiment of the present application;

[0103] Figure 4 This is a schematic structural diagram of another embodiment of a device for generating a visible light image of a face in an embodiment of the present application;

[0104] Figure 5 This is a schematic diagram of the structure of another embodiment of the device for generating a visible light image of a face in an embodiment of the present application. DETAILED DESCRIPTION

[0105] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the protection scope of the present invention.

[0106] The embodiment of the present application provides a method for generating a visible light image of a face and a related device. The method enables the visible light image of a face acquired under abnormal brightness conditions to more easily extract key point information, thereby improving the recognition effect.

[0107] In this embodiment, the method for generating a visible light image of a face can be implemented in a system, a server, or a terminal, and is not specifically limited. For the convenience of description, the embodiment of the present application uses a server as an execution subject for example description.

[0108] See also Figure 1 In one embodiment of the present application, a method for generating a visible light image of a face includes:

[0109] 101. The server obtains an infrared image and a visible light image of the same face in an abnormal lighting scene;

[0110] The server obtains an infrared image and a visible light image of the same face in an abnormal lighting scene, with the purpose of processing the infrared image to obtain information about the visible light image, so that the generated final image can be used for face recognition. Optionally, in this embodiment, only when the obtained visible light image is an image with abnormal lighting (the server cannot recognize the key point features of the image), it is necessary to further obtain the infrared image for style transfer.

[0111] The infrared image and the visible light image are important processing materials of this embodiment, and can be obtained through instruments with shooting functions such as cameras, which are not limited here.

[0112] The infrared image is a frontal infrared image. Loss will not affect the infrared image whether it is under abnormal or normal lighting conditions.

[0113] The visible light image is a frontal visible light image. Under abnormal lighting conditions, the key point information of the obtained visible light image is covered, resulting in the instrument being unable to recognize the visible light image.

[0114] The visible light image of abnormal lighting may be a visible light image in a backlit environment, a visible light image in a backlit environment, or a visible light image in a strong environment, which is not limited here.

[0115] 102. The server generates an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively;

[0116] The server separates the infrared image into an infrared chromaticity image, and separates the visible light image into a visible light chromaticity image. The specific separation method is to separate the brightness and chromaticity of the infrared image and the visible light image, separate the infrared image into an infrared chromaticity image and an infrared brightness image, and separate the visible light image into a visible light chromaticity image and a visible light brightness image. In this embodiment, only the infrared brightness image and the visible light chromaticity image are needed for corresponding synthesis, and the infrared chromaticity image and the visible light brightness image are not needed.

[0117] The brightness in this embodiment refers to the grayscale value, which refers to the remaining part of the image after removing the light; chromaticity refers to color information, which is used to describe the influence of color and saturation and is used to specify the color of a pixel. For example, the images in this embodiment are mainly photos, and there are chromaticity diagrams and brightness diagrams in the photos. The brightness diagram can be understood as a black and white photo, which only contains brightness and lacks color information (chromaticity). When the black and white photo is added with chromaticity, it becomes a color photo. Light mainly affects the chromaticity of the color photo, but not the brightness. Therefore, in strong light, backlight, and backlight conditions, the infrared image will not be affected. The brightness in the infrared image is greater than the chromaticity.

[0118] 103. The server generates a target chromaticity map by using a target generation model to generate the target chromaticity map from the infrared brightness map and the visible light chromaticity map, so that the generated target chromaticity map includes the chromaticity of the visible light chromaticity map and the content features of the infrared brightness map;

[0119] The server inputs the infrared brightness image and the visible light chromaticity image into the target generation model. The target generation model is a style transfer network model that has been trained and can enable the infrared brightness image to learn the lighting information of the visible light chromaticity image, increase the chromaticity of the infrared brightness image, and generate a target chromaticity image with normal lighting.

[0120] Face recognition technology generally uses visible light images of faces to identify people. However, when the lighting conditions are abnormal, such as strong light conditions, the key points that can be identified in the obtained visible light image are covered, resulting in poor recognition results. When using infrared images for face recognition, key point information will be missing, and the recognition effect is not as good as that of visible light images. This embodiment combines the characteristics of infrared images and visible light images, separates the visible light image into a visible light brightness image and a visible light chromaticity image, uses the visible light chromaticity image, and allows the infrared brightness image to learn the visible light chromaticity image. By allowing the infrared brightness image to learn the lighting information of the visible light chromaticity image, the problem of insufficient information caused by strong light, backlight and backlight is eliminated, and key point information is also supplemented.

[0121] In the embodiment of the present application, the infrared image and the visible light image are input into the target generation model. In the specific implementation, the target model can be a model of the neural network architecture based on the VGG-19 backbone network, the purpose of which is to integrate the illumination information of the visible light chromaticity map into the infrared brightness map, thereby generating a target chromaticity map. For example: the server separates the infrared image into an infrared chromaticity map, and separates the visible light image into a visible light chromaticity map. The infrared brightness map and the visible light chromaticity map with rich illumination information are input into the target generation model to generate a target chromaticity map with the illumination information of the visible light chromaticity map.

[0122] 104. The server generates a target visible light image according to the infrared brightness image and the target chromaticity image.

[0123] The server combines the target chromaticity map with the infrared brightness map to synthesize a usable color photo. After normal processing, the target chromaticity map is consistent with the infrared brightness map in content. Figure 1 Therefore, a color image can be obtained by synthesis, and the color image can be used in the face recognition system.

[0124] When a visible light image of a human face in backlighting is obtained, an infrared image is also obtained at the same time. The visible light image and the infrared image are separated to obtain the corresponding visible light chromaticity image and infrared brightness image. The visible light chromaticity image and the infrared brightness image are then input into the trained target generation model. The target generation model generates a target chromaticity image containing key point information and lighting information. Finally, the target chromaticity image and the infrared brightness image are fused to generate a usable visible light image of the human face.

[0125] Only by obtaining visible light images and infrared images under abnormal lighting conditions can the visible light image of the face target be obtained, so that the instrument can also recognize images and perform face recognition under abnormal lighting conditions. This method makes it easier to extract key point information from the visible light image of the face obtained under abnormal brightness, thereby improving the recognition effect.

[0126] The method for generating a visible light image of a face in the above embodiment needs to rely on a target production model to generate a target chromaticity image with illumination information. Optionally, before executing the above embodiment, a model training is performed to obtain the above target generation model. The following is an explanation of the process including the model training process and the process of generating a visible light image of a face.

[0127] Referring to FIG. 2 , another embodiment of the method for generating a visible light image of a face in the embodiment of the present application includes:

[0128] 201. The server obtains an initial sample set, where each group of initial samples in the initial sample set includes a training infrared image and a training visible light image of a target face in an abnormal lighting scene;

[0129] The server obtains an initial sample set including multiple groups of initial samples, the initial sample set including training infrared images and training visible light images. The above types of images of the same face and the same scene constitute a group of initial samples.

[0130] The training infrared images and training visible light images include those taken under backlight conditions and those taken under normal conditions. The purpose is to allow the generation model to obtain training samples from more scenarios and enhance robustness.

[0131] The initial sample can be extracted in a variety of ways, such as by taking a camera, by taking a camera, or by decoding a video, which is not limited here. Optionally, in this embodiment, the initial sample is obtained by using a camera of a camera.

[0132] The purpose of obtaining the above samples is to obtain a training basis for model training. After obtaining, all images in the training samples need to be preprocessed to adjust the size and dimensions of the images to reach uniform specifications before proceeding to the next step of processing.

[0133] 202. The server generates a training infrared brightness image and a training visible light chromaticity image respectively according to the training infrared image and the training visible light image;

[0134] The server performs YUV color space separation on the training infrared image and the training visible light image, and separates the training infrared image and the training visible light image through the chromaticity channel (Y channel) and the brightness channel (UV channel) seen in the YUV color to obtain a training infrared brightness image, a training infrared chromaticity image, a training visible light chromaticity image, and a training visible light brightness image.

[0135] Optionally, in this embodiment, the infrared image needs to be converted into a color space (i.e., the infrared image is converted into a visible light image), the infrared image and the visible light image need to be converted into representation spaces with separated brightness Y and UV channels respectively (i.e., the Y channel and the UV channel are separated), and the Y channel of the infrared image is learned from the UV channel of the visible light image, that is, the chromaticity information corresponding to the visible light image is learned.

[0136] In this embodiment, the training samples required include training infrared brightness images and training visible light chromaticity images, and only these two types of images need to be extracted.

[0137] 203. Mark the training infrared brightness image and the training visible light chromaticity image as a group of target samples to obtain a target sample set;

[0138] In this embodiment, the training samples required include training infrared brightness images and training visible light chromaticity images, and only these two types of images need to be extracted.

[0139] The server sets the corresponding training infrared brightness image and the training visible light chromaticity image as a group of target samples, and all target samples become the target sample set.

[0140] 204. The server selects a group of target samples from the target sample set;

[0141] The server selects a set of target samples, which need to be put into the adversarial network model for training. The target samples will not be put into the trained sample pile until the training is completed.

[0142] 205. The server inputs the target sample into an initial generation model;

[0143] The server inputs the training infrared brightness map and the training visible light chromaticity map into the initial generation model, and the initial generation model allows the training infrared brightness map to learn the chromaticity information of the training visible light chromaticity map.

[0144] In this embodiment, the initial generation model is based on a fully convolutional network, which is a fully convolutional neural network model with an hourglass shape. The middle part of the network adopts a residual network structure unit, which makes the convergence speed of the network more stable; the concentrated convolution layer of the initial generation model is connected to the BatchNorm layer and the Relu activation layer.

[0145] Optionally, in this embodiment, the initial generation model is composed of a general convolution layer, a residual network unit, and a deconvolution, and a BatchNorm layer and a ReLu layer are introduced. The purpose of the initial generation model is to perform style transfer between the training infrared brightness image and the training visible light chromaticity image. Through the above structure, this embodiment enables the training infrared brightness image to better learn the brightness characteristics of the training visible light chromaticity image.

[0146] The purpose of a general convolutional layer is to extract network features; the purpose of a residual network unit is to prevent the gradient from vanishing as the network deepens; the purpose of deconvolution is to decode features and increase the output features. In the image semantic segmentation task, deconvolution is used to convert features into visual output features; the visual task of this embodiment is to convert a light image into a visible light image, which is similar to the image semantic segmentation task. BatchNorm is a standard normalization layer for the network, which normalizes the features; the ReLu layer is a network activation layer, which enables nonlinear activation between feature layers.

[0147] 206. The server obtains a style transfer map generated by the initial generation model and according to the target sample, wherein the style transfer map includes content features of the training infrared brightness map and style features of the training visible light chromaticity map;

[0148] The initial generation model generates a style transfer map after inputting the training infrared brightness map and the training visible light chromaticity map.

[0149] The initial generation model will generate the first generation of intermediate images (style transfer images) based on the target samples (training infrared brightness images and training visible light chromaticity images). During the training process, the intermediate images are the basis for network loss comparison, and the convergence of the training process will be reflected through the intermediate images.

[0150] Each generation of style transfer maps will update the model through the use of the model, and then generate the next generation of style transfer maps.

[0151] 207. The server inputs the style transfer map and the training visible light chromaticity map into an initial discriminant model;

[0152] The server inputs the generated image and the real image (the style transfer map and the training visible light chromaticity map) into the initial discriminant model. The initial discriminant network determines whether the generated image is true (logistic regression judgment) and generates corresponding operations based on the judgment result.

[0153] In this embodiment, the discriminant network is composed of a resnet18 network structure.

[0154] The initial generative network model and the initial discriminative network model form an adversarial model. The initial generative model needs to make the generated style transfer map close to the real photo in order to reach the level of being used, but the initial discriminative network needs to judge that the generated style transfer map is false, so that the generative model continuously updates parameters and continues to train samples. The adversarial network model composed of the two makes the parameters of the generative model gradually complete.

[0155] 208. The server generates discriminant data through the initial discriminant model, and the discriminant data is used to calculate the total loss value of the initial generation model;

[0156] The server discriminates the input style transfer map and the training visible light chromaticity map and generates discriminant data. The discriminant data is a part of updating the parameters of the initial generation model and is the main parameter. The discriminant data includes the data generated according to the style transfer map and the data generated according to the training visible light chromaticity map, as well as the discriminant value generated by the initial discriminant network according to the two.

[0157] 209. The server performs a logistic regression judgment on the style transfer map and the training visible light chromaticity map;

[0158] The discriminant network will generate a list value for the generated style transfer map. The probability value refers to the probability that the style transfer map is a real picture. When the probability reaches 50%, the discriminant network cannot confirm the authenticity of the generated picture. Fifty percent is generally used as the default value.

[0159] After the server determines whether the probability value is greater than a preset value, a preset update judgment is made. In this embodiment, if the style transfer image is judged to be true, step 210 is executed, and if the style transfer image is judged to be false, step 211 is executed.

[0160] 210. If it is determined that the style transfer map is true, the server uses the training visible light chromaticity map to update the parameters of the initial discriminant model;

[0161] When the server determines that the style transfer image is true, that is, the discriminant network makes an error, the real image (training visible light chromaticity diagram) is used to update the initial discriminant model so that the initial discriminant network has a higher discriminant effect to distinguish the generated image from the real image.

[0162] 211. If it is determined that the style transfer map is false, the server uses the style transfer map to update the parameters of the initial discriminant model;

[0163] When the server determines that the style transfer image is false, that is, the discriminant network makes a correct judgment, the generated image (style transfer map) is used to update the initial discriminant model so that the initial discriminant network has a lower discriminant effect to distinguish the generated image from the real image.

[0164] 212. The server calculates a first loss value between the style transfer map and the training visible light chromaticity map;

[0165] The server calculates the loss value between the style transfer map and the training visible light chromaticity map. In this embodiment, the mean square style transfer map and the training visible light chromaticity map error loss are calculated pixel by pixel.

[0166] 213. The server calculates a second loss value;

[0167] The server calculates the total variation loss value (the second loss value) based on the style transfer map.

[0168] Optionally, in this embodiment, in order to improve the comprehensive performance of the adversarial network model, a representative loss function is selected, and a total variation model is added to introduce a Total Variation (TV) loss function with an order. Here, the total variation of the continuous domain becomes the following formula (1):

[0169]

[0170] This formula uses the TV total variation denoising model as the loss value, the purpose of which is to remove the noise information of the infrared image so that the model has a certain robustness to noise.

[0171] TV is a commonly used regularization term. In the process of color information restoration, a little noise on the image may have a very large impact on the restoration result. Some regularization terms are added to the optimization problem model to maintain the smoothness of the image; in extreme cases, snapshots often have some noise.

[0172] I is the pixel value, i,j is the pixel value of this formula (R vβ ) can be described as each pixel (I i,j ) and the next pixel horizontally (I i,j+1 ) plus the square of the difference between the vertical pixels (I i+1,j ) square of the difference; then take the β / 2 root. β can control the clarity of the image. β>1, the image is smoother, β is set to 3, the test effect is better. In this embodiment, β is set to 3 here.

[0173] Considering that this embodiment solves the problem of poor visible light imaging under backlight or strong light conditions, and under abnormal lighting conditions, there is a certain amount of noise in both the infrared image and the visible light image, this model is introduced as the loss function so that the final model has a certain adaptability to noise, that is, the robustness to noise is improved.

[0174] 214. The server calculates a third loss value according to the discrimination data;

[0175] The server calculates the discriminant data to calculate the adversarial loss value (third loss value), and the adversarial loss value is the loss value calculated by the data generated by the discriminant network.

[0176] 215. The server performs weight calculation according to the first loss value, the second loss value, and the third loss value, so as to obtain a total loss value;

[0177] The final total loss function is defined as follows:

[0178] L=λcre L cre +λ adv L adv +λ tv L TV (2)

[0179] Where L cre is the pixel-level semantic loss, and a multi-residual network structure is used to extract more accurate pixel-level information. cre is the weight corresponding to the pixel-level semantic loss; L adv To combat the loss, this loss can better learn the spatial transformation distribution of infrared scenes and visible light scenes, λ adv is the adversarial loss weight; L TV is the total variation denoising loss, which can learn the underlying features more clearly and avoid the blurring effect. tv is the total variation denoising loss weight.

[0180] 216. The server generates an input times value, where the input times value indicates the number of times the training infrared brightness image is input into the initial generation model;

[0181] The server generates an input count value, which represents the target sample currently being trained. It repeats the number of times the initial generation model is trained. After each group of target samples is trained and the next group of target samples is reselected, the generation input count will be reset.

[0182] 217. The server determines whether the total loss value is less than a preset value; if not, execute step 218; if yes, execute step 219;

[0183] The server determines whether the total loss value has reached the preset value, that is, the preset target expectation. In the actual training process, this step is used as a judgment on whether the initial generation model has converged based on the current sample. If the training of the target sample makes the initial generation model converge (the total loss value is less than the preset value), it proves that the training of this group of target samples can be ended and then proceed to the next step. If the initial model does not converge (the total loss value is greater than or equal to the preset value), it means that this target sample needs to be trained again (re-enter the initial generation model and retrain).

[0184] 218. When the total loss value is not less than the preset value, the server updates the parameters of the initial generation model according to the total loss value, re-inputs the generation model sample into the initial generation model after the updated parameters, and re-executes the steps of calculating the total loss value and determining whether the total loss value is less than the preset value;

[0185] If the initial generation model does not converge (the total loss value is greater than or equal to the preset value), the parameters of the initial generation model need to be updated according to the total loss value, and the next step is to execute step 205, re-input the target sample of the current training, and repeat the training process.

[0186] 219. When the total loss value is less than the preset value, the server determines whether the input times value is equal to 1; if so, execute step 220; if not, execute step 221;

[0187] The server determines whether to end training based on the input times corresponding to the target samples for training. When a group of target samples are input into the initial generation model for the first time (the input times are 1), the total loss value is less than the preset value (the initial model reaches convergence), which means that the training process converges and the training ends to obtain a trained adversarial network model.

[0188] 220. When the input number value is equal to 1, the server confirms that the training of the adversarial network model is completed;

[0189] After the server confirms that the current target sample is input into the initial generation model for the first time (the input number value is 1), the total loss value is less than the preset value (the initial model reaches convergence), confirming that the training of the adversarial network model is completed, and exiting the loop.

[0190] 221. When the input number value is not equal to 1, the server updates the parameters of the initial generation model according to the total loss value, selects another group of target samples, and re-executes the steps of calculating the total loss value and determining whether the total loss value is less than a preset value;

[0191] When the input number value is not equal to 1, it means that the expected training goal has not been achieved. The server needs to update the parameters of the initial model, reselect a set of target samples, and re-execute the steps of calculating the total loss value and determining whether the total loss value is less than the preset value.

[0192] 222. When the adversarial network model training is completed, the server determines that the initial generation model is a target generation model;

[0193] After the server confirms that the training of the adversarial network model is completed, the initial generation model can be determined as the target generation model as the production model of the target visible light image.

[0194] 223. The server obtains an infrared image and a visible light image of the same face in an abnormal lighting scene;

[0195] Step 224 in this embodiment is similar to step 101 in the above embodiment and will not be described again here.

[0196] 224. Separate the visible light image into a visible light chromaticity image through a chromaticity channel of a color space;

[0197] The server separates the visible light map into a visible light chromaticity map and a visible light brightness map. In this embodiment, only the visible light chromaticity map is needed, and the visible light brightness map is not needed.

[0198] 225. The server separates the infrared image into an infrared brightness image through a brightness channel of a color space;

[0199] The server separates the infrared image into an infrared chromaticity image and an infrared brightness image. In this embodiment, only the infrared brightness image is needed, and the infrared chromaticity image is not needed.

[0200] 226. The server generates a target chromaticity map by using a target generation model to generate the target chromaticity map from the infrared brightness map and the visible light chromaticity map, so that the generated target chromaticity map includes the chromaticity of the visible light chromaticity map and the content features of the infrared brightness map;

[0201] Step 227 in this embodiment is similar to step 103 in the above embodiment and will not be described again here.

[0202] 227. The server inputs the infrared brightness image into the brightness channel;

[0203] The server inputs the infrared brightness image into the brightness channel in order to merge it with the target chromaticity image into a usable visible light image of the face.

[0204] 228. The server inputs the target chromaticity map into the chromaticity channel;

[0205] The server inputs the target chromaticity into the chromaticity channel in order to fuse it with the infrared brightness image into a usable visible light image of the face.

[0206] 229. The server fuses the brightness channel with the chrominance channel to generate a visible light image of the target face.

[0207] The server fuses the brightness channel and the chromaticity channel so that the target chromaticity map and the infrared brightness map can be fused into a target face visible light map. The target face visible light map has key point features similar to the real visible light map and can be used.

[0208] When a visible light image of a human face in backlighting is obtained, an infrared image is also obtained at the same time. The visible light image and the infrared image are separated to obtain the corresponding visible light chromaticity image and infrared brightness image. The visible light chromaticity image and the infrared brightness image are then input into the trained target generation model. The target generation model generates a target chromaticity image containing key point information and lighting information. Finally, the target chromaticity image and the infrared brightness image are fused to generate a usable visible light image of the human face.

[0209] Only by obtaining visible light images and infrared images under abnormal lighting conditions can the visible light image of the face target be obtained, so that the instrument can also recognize images and perform face recognition under abnormal lighting conditions. This method makes it easier to extract key point information from the visible light image of the face obtained under abnormal brightness, thereby improving the recognition effect.

[0210] Secondly, if the initial generation model is trained in advance, in the actual process of generating the target face visible light image, it is only necessary to input the infrared brightness image and the visible light chromaticity image into the target generation model to quickly generate the target face visible light image, rather than generating it through the initial generation network model. Using the target generation model will get the target face visible light image faster.

[0211] The above describes the method for generating a visible light image of a face in an embodiment of the present application. The following describes in detail the device for generating a visible light image of a face in an embodiment of the present application in conjunction with the accompanying drawings:

[0212] See also Figure 3 In one embodiment of the present application, a device for generating a visible light image of a face includes:

[0213] The first acquisition unit 301 is used to acquire an infrared image and a visible light image of the same face in an abnormal lighting scene;

[0214] A first generating unit 302, configured to generate an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively;

[0215] The second generating unit 303 is used to generate a target chromaticity diagram by using the target generation model to generate the target chromaticity diagram from the infrared brightness diagram and the visible light chromaticity diagram, so that the generated target chromaticity diagram includes the chromaticity of the visible light chromaticity diagram and the content characteristics of the infrared brightness diagram;

[0216] The third generating unit 304 is configured to generate a target visible light image according to the infrared brightness image and the target chromaticity image.

[0217] In this embodiment, the functions of each unit of the device for generating a visible light image of a face are the same as those described above. Figure 1 The steps in the illustrated embodiments correspond to each other and will not be described again here.

[0218] After the first acquisition unit 301 acquires the infrared image and the visible light image of the same face in the abnormal lighting scene, it needs to process the infrared image and the visible light image. The first generation unit 302 generates an infrared brightness image and a visible light chromaticity image from the infrared image and the visible light image, respectively. The third generation unit 304 inputs the infrared brightness image and the visible light chromaticity image into the trained target generation network, and obtains the target chromaticity image. The third generation unit 304 fuses the infrared brightness image and the target chromaticity image into a visible light image of the target face.

[0219] See also Figure 4 Another embodiment of the device for generating a visible light image of a face in the embodiment of the present application includes:

[0220] The second acquisition unit 401 is used to acquire an initial sample set, wherein each group of initial samples in the initial sample set includes a training infrared image and a training visible light image of a target face in an abnormal lighting scene;

[0221] A fourth generating unit 402 is used to generate a training infrared brightness image and a training visible light chromaticity image according to the training infrared image and the training visible light image respectively;

[0222] A third acquisition unit 403 is used to mark the training infrared brightness image and the training visible light chromaticity image as a group of target samples to obtain a target sample set;

[0223] A training unit 404 is used to train the target sample set and update the initial generation model and the initial discrimination model through an adversarial network model, wherein the adversarial network model includes the initial generation model and the initial discrimination model, and the initial generation model and the initial discrimination model are models established based on a neural network;

[0224] In this embodiment, the training unit 404 includes a selection module 4041, a first input module 4042, a fourth acquisition module 4043, a second input module 4044, a fifth generation module 4045, a first update module 4046, a calculation module 4047, a sixth generation module 4048, a first judgment module 4049, a second update module 40410, a second judgment module 40411, a second determination module 40412, and a second update module 40413.

[0225] A selection module 4041 is used to select a group of target samples from the target sample set;

[0226] A first input module 4042, used to input the target sample into an initial generation model;

[0227] A fourth acquisition module 4043 is used to acquire a style transfer map generated by the initial generation model and according to the target sample, wherein the style transfer map includes content features of the training infrared brightness map and style features of the training visible light chromaticity map;

[0228] A second input module 4044 is used to input the style transfer map and the training visible light chromaticity map into an initial discriminant model;

[0229] A fifth generation module 4045 is used to generate discriminant data through the initial discriminant model, and the discriminant data is used to calculate the total loss value of the initial generation model;

[0230] A first updating module 4046, configured to update the parameters of the initial discriminant model according to the style transfer map and the training visible light chromaticity map;

[0231] In this embodiment, the first updating module 4046 is specifically:

[0232] Performing a logistic regression judgment on the style transfer map and the training visible light chromaticity map;

[0233] If it is determined that the style transfer map is true, then the parameters of the initial discriminant model are updated using the training visible light chromaticity map;

[0234] If the style transfer map is determined to be false, the style transfer map is used to update the parameters of the initial discriminant model.

[0235] A calculation module 4047, configured to calculate a total loss value according to the training visible light chromaticity diagram, the style feature diagram and the discrimination data;

[0236] In this embodiment, the calculation module 4047 is specifically:

[0237] Calculating a first loss value between the style transfer map and the training visible light chromaticity map;

[0238] Calculating a second loss value;

[0239] Calculate a third loss value according to the discrimination data;

[0240] A weight calculation is performed according to the first loss value, the second loss value and the third loss value to obtain a total loss value.

[0241] A sixth generation module 4048 is used to generate an input frequency value, wherein the input frequency value indicates the number of times the training infrared brightness image is input into the initial generation model;

[0242] The first judgment module 4049 is used to judge whether the total loss value is less than a preset value;

[0243] The second updating module 40410 is used for updating the parameters of the initial generation model according to the total loss value when the first judging module 4049 confirms that the total loss value is not less than the preset value, re-inputting the generation model sample into the initial generation model after the updated parameters, and re-executing the steps of calculating the total loss value and judging whether the total loss value is less than the preset value;

[0244] The second judgment module 40411 is used to judge whether the input times value is equal to 1 when the first judgment module 4049 determines that the total loss value is less than a preset value;

[0245] A second determination module 40412 is configured to confirm that the training of the adversarial network model is completed when the second judgment module 40411 confirms that the input number value is equal to 1;

[0246] The second updating module 40413 is used to update the parameters of the initial generation model according to the total loss value, select another set of training samples, and re-execute the steps of calculating the total loss value and determining whether the total loss value is less than a preset value when the second judging module 40411 confirms that the input number value is not equal to 1;

[0247] A first determining unit 405 is used to determine the initial generation model as a target generation model when the adversarial network model training is completed;

[0248] A first acquisition unit 406 is used to acquire an infrared image and a visible light image of the same face in an abnormal lighting scene;

[0249] A first generating unit 407, configured to generate an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively;

[0250] In this embodiment, the first generating unit 407 includes a sixth generating module 4071 and a seventh generating module 4072 .

[0251] A seventh generating module 4071, configured to separate the visible light image into a visible light chromaticity image through a chromaticity channel of a color space;

[0252] An eighth generating module 4072, configured to separate the infrared image into an infrared brightness image through a brightness channel of a color space;

[0253] A second generating unit 408 is configured to generate a target chromaticity diagram from the infrared brightness diagram and the visible light chromaticity diagram through a target generation model, so that the generated target chromaticity diagram includes the chromaticity of the visible light chromaticity diagram and the content features of the infrared brightness diagram;

[0254] A third generating unit 409 is used to generate a target visible light image according to the infrared brightness image and the target chromaticity image;

[0255] In this embodiment, the third generating unit 409 includes a first input module 4091 , a second input module 4092 , and a synthesis module 4093 .

[0256] A first input module 4091, used to input the infrared brightness image into the brightness channel;

[0257] A second input module 4092, used to input the target chromaticity map into the chromaticity channel;

[0258] The synthesis module 4093 is used to fuse the brightness channel with the chrominance channel to generate a visible light image of the target face.

[0259] The server in the embodiment of the present application is described in detail below. Figure 5 , another embodiment of the generating device in the embodiment of the present application includes:

[0260] Processor 501, memory 502, input and output unit 503, bus 504;

[0261] The processor 501 is connected to the memory 502, the input and output unit 503 and the bus 504;

[0262] The processor 501 specifically performs the following operations:

[0263] Obtain infrared and visible light images of the same face in abnormal lighting scenarios;

[0264] Generate an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively;

[0265] The infrared brightness map and the visible light chromaticity map are used to generate a target chromaticity map through a target generation model, so that the generated target chromaticity map contains the chromaticity of the visible light chromaticity map and the content characteristics of the infrared brightness map;

[0266] A target visible light map is generated according to the infrared brightness map and the target chromaticity map.

[0267] In this embodiment, the function of the processor 501 is the same as that of the aforementioned Figure 1 The steps in the embodiment shown in FIG. 2 correspond to each other and are not described in detail here.

[0268] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0269] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

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

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

[0272] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A method for generating a visible light image of a face, characterized in that: include: Obtain infrared and visible light images of the same face in abnormal lighting scenarios; Generate an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively; The infrared brightness image and the visible light chromaticity image are used to generate a target chromaticity image through a target generation model, so that the generated target chromaticity image includes the chromaticity of the visible light chromaticity image and the content characteristics of the infrared brightness image, and the target generation model is a style transfer network model, and the style transfer network model is used to make the infrared brightness image learn the illumination information of the visible light chromaticity image, so that the infrared brightness image increases the chromaticity and generates a target chromaticity image with normal illumination; A target visible light map is generated according to the infrared brightness map and the target chromaticity map.

2. The generation method according to claim 1, characterized in that: Before obtaining the infrared image and the visible light image of the same face in the abnormal lighting scene, the generation method further includes: Acquire an initial sample set, wherein each group of initial samples in the initial sample set includes a training infrared image and a training visible light image of a target face in an abnormal lighting scene; Generate a training infrared brightness image and a training visible light chromaticity image according to the training infrared image and the training visible light image respectively; Marking the training infrared brightness image and the training visible light chromaticity image as a group of target samples to obtain a target sample set; Training the target sample set and updating an initial generation model and an initial discrimination model through an adversarial network model, wherein the adversarial network model includes the initial generation model and the initial discrimination model, and the initial generation model and the initial discrimination model are models established based on a neural network; When the adversarial network model training is completed, the updated initial generation model is determined as the target generation model.

3. The generation method according to claim 2, characterized in that: The method of training the target sample set and updating the initial generation model and the initial discrimination model by using the adversarial network model includes: Selecting a group of target samples from the target sample set; Inputting the target sample into an initial generation model; Obtaining a style transfer map generated by the initial generation model and according to the target sample, wherein the style transfer map includes content features of the training infrared brightness map and style features of the training visible light chromaticity map; Inputting the style transfer map and the training visible light chromaticity map into an initial discriminant model; Generate discriminant data through the initial discriminant model, and the discriminant data is used to calculate the total loss value of the initial generation model; Updating parameters of the initial discriminant model according to the style transfer map and the training visible light chromaticity map; Calculating a total loss value according to the style transfer map, the training visible light chromaticity map and the discrimination data; Generate an input frequency value, wherein the input frequency value represents the number of times the training infrared brightness image is input into the initial generation model; Determine whether the total loss value is less than a preset value. If not, update the parameters of the initial generation model according to the total loss value, re-input the generation model sample into the initial generation model after the updated parameters, and re-execute the steps of calculating the total loss value and determining whether the total loss value is less than the preset value; If so, determine whether the input number value is equal to 1. If so, confirm that the training of the adversarial network model is completed.

4. The generation method according to claim 3, characterized in that: After determining whether the input times value is equal to 1, the generating method further includes: If not, the parameters of the initial generation model are updated according to the total loss value, another set of target samples are selected, and the steps of calculating the total loss value and determining whether the total loss value is less than the preset value are re-executed.

5. The generation method according to claim 3, characterized in that: The updating of the parameters of the initial discriminant model according to the style transfer map and the training visible light chromaticity map includes: Performing a logistic regression judgment on the style transfer map and the training visible light chromaticity map; If it is determined that the style transfer map is true, then the parameters of the initial discriminant model are updated using the training visible light chromaticity map; If the style transfer map is determined to be false, the style transfer map is used to update the parameters of the initial discriminant model.

6. The generation method according to claim 3, characterized in that: The calculating the total loss value according to the style transfer map, the training visible light chromaticity map and the discrimination data includes: Calculating a first loss value between the style transfer map and the training visible light chromaticity map; Calculating a second loss value; Calculate a third loss value according to the discrimination data; A weight calculation is performed according to the first loss value, the second loss value and the third loss value to obtain a total loss value.

7. The generation method according to any one of claims 1 to 6, characterized in that: The step of generating an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively comprises: Separating the visible light image into a visible light chromaticity image through a chromaticity channel of a color space; The infrared image is separated into an infrared brightness image through a brightness channel of a color space.

8. The generation method according to claim 7, characterized in that: The step of generating a target visible light image according to the infrared brightness image and the target chromaticity image comprises: Inputting the infrared brightness image into the brightness channel; Inputting the target chromaticity map into the chromaticity channel; The brightness channel and the chrominance channel are fused to generate a visible light map of the target face.

9. A device for generating a visible light image of a face, characterized in that: include: A first acquisition unit is used to acquire an infrared image and a visible light image of the same face in an abnormal lighting scene; A first generating unit, configured to generate an infrared brightness image and a visible light chromaticity image according to the infrared image and the visible light image respectively; A second generating unit is configured to generate a target chromaticity map by using a target generating model to generate a target chromaticity map from the infrared brightness map and the visible light chromaticity map, so that the generated target chromaticity map includes the chromaticity of the visible light chromaticity map and the content features of the infrared brightness map, wherein the target generating model is a style transfer network model, and the style transfer network model is used to learn the illumination information of the visible light chromaticity map from the infrared brightness map, so that the infrared brightness map increases the chromaticity and generates a target chromaticity map with normal illumination; The third generating unit is used to generate a target visible light image according to the infrared brightness image and the target chromaticity image.

10. The device according to claim 9, characterized in that The device also includes: A second acquisition unit is used to acquire an initial sample set, wherein each group of initial samples in the initial sample set includes a training infrared image and a training visible light image of a target face in an abnormal lighting scene; a fourth generating unit, configured to generate a training infrared brightness image and a training visible light chromaticity image respectively according to the training infrared image and the training visible light image; A third acquisition unit, configured to mark the training infrared brightness image and the training visible light chromaticity image as a group of target samples to obtain a target sample set; A training unit, used for training the target sample set and updating an initial generation model and an initial discrimination model through an adversarial network model, wherein the adversarial network model includes the initial generation model and the initial discrimination model, and the initial generation model and the initial discrimination model are models established based on a neural network; The first determination unit is used to determine the updated initial generation model as the target generation model when the training of the adversarial network model is completed.