A method, system and device for optimizing skin color of ID card based on image perception

By building a semantic analysis model to decompose the image into color and color level layers, and then making fine adjustments and fusion, the problem of poor ID photo optimization in the existing technology is solved, and efficient and intuitive ID photo image optimization is achieved.

CN119579476BActive Publication Date: 2025-09-09GUANGZHOU PIXEL SOLUTIONS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411591057.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-09-09
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

Existing ID photo optimization methods cannot meet actual needs, resulting in poor image optimization effects, inability to achieve fine and natural color adjustments, and insufficient contrast and clarity.

Method used

By building a semantic analysis model, the deep semantic information of the image is extracted, and the image is decomposed into color layers and color level layers. The layers are adjusted separately and then fused to generate an ID photo image that meets the clarity and brightness requirements.

Benefits of technology

It realizes automatic optimization of image adjustment, ensures color accuracy and overall visual effect, improves efficiency, makes the adjustment process more intuitive and easy to control, and meets the actual optimization needs of ID photos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579476B_ABST
    Figure CN119579476B_ABST
Patent Text Reader

Abstract

The present application relates to a method, system and device for optimizing skin color of ID card based on image perception, and relates to the field of image processing technology, including: performing semantic analysis and extraction on the ID card image to be optimized through a semantic analysis model to obtain deep semantic information, generating an optimization layer including a color layer and a color scale layer based on the deep semantic information, generating corresponding adjustment parameter information based on the color layer and the color scale layer based on the deep semantic information, adjusting the skin color of the color layer according to the adjustment parameters, and optimizing the color scale of the color scale layer according to the adjustment parameters to obtain an optimized target ID card image, extracting the complex features of the image color distribution by constructing an advanced semantic analysis model, and decomposing the image into multiple independent layers, so that each layer can be carefully adjusted to ensure color accuracy, contrast and overall visual effect, thereby improving the image optimization effect and optimization efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, system and device for optimizing skin color of a certificate based on image perception. Background Art

[0002] ID photos have strict color requirements due to printing requirements. Furthermore, during the photo capture process, due to lighting conditions, the captured images may have color casts or darkening, which can cause facial color shifts. Therefore, it's difficult to directly use the captured images for ID photos. Color adjustments are usually required using tools like Photoshop.

[0003] Existing ID photo optimization methods perform independent operations when optimizing and adjusting images. There's no global control, and they rely on a single parameter to uniformly process the entire image. For example, if a dark image is brightened, the grayscale will shift upward, resulting in reduced contrast, poor clarity, and a grayish, hazy appearance. Consequently, existing ID photo optimization methods fail to meet actual optimization needs and produce poor results. Summary of the Invention

[0004] The present application provides a method, system and device for optimizing skin color of ID photos based on image perception. By constructing an advanced semantic analysis model, the complex features of image color distribution are extracted to achieve more refined and natural color adjustment. The image is decomposed into multiple independent layers, and each layer can be carefully adjusted. Automatic optimization of image adjustment is achieved to ensure color accuracy, contrast and overall visual effect. This not only improves efficiency, but also makes the adjustment process more intuitive and easy to control, meeting the actual optimization needs of ID photos, and solving the problem that the existing technology can only perform unified image processing, resulting in poor image optimization effect.

[0005] In a first aspect, the present application provides a method for optimizing skin color of a certificate based on image perception, comprising:

[0006] Obtain the ID photo image to be optimized;

[0007] Performing semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information, wherein the deep semantic information includes features and context required for adjusting the ID photo image;

[0008] Constructing an optimized layer of the ID photo image based on the deep semantic information, wherein the optimized layer includes a color layer and a color scale layer;

[0009] According to the deep semantic information, based on the color layer and the tone level layer, generating corresponding adjustment parameter information;

[0010] performing skin color optimization adjustment on each color channel in the color layer according to the adjustment parameter information to obtain a color optimization layer, and performing characteristic optimization adjustment on each hue region in the gradation layer according to the adjustment parameter information and a preset layered adjustment strategy to obtain a gradation optimization layer;

[0011] According to the fusion parameters in the adjustment parameter information, the color optimization layer and the color level optimization layer are fused to obtain an optimized target ID photo image, and the target ID photo image is an ID photo image that meets the preset clarity requirements and brightness requirements.

[0012] Optionally, performing semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information includes:

[0013] Performing color analysis and color feature extraction on the ID photo image using a preset semantic analysis model to obtain color semantic information, and performing color scale analysis and color scale feature extraction on the ID photo image using the semantic analysis model to obtain color scale semantic information;

[0014] Deep semantic information is generated according to the color semantic information and the color scale semantic information.

[0015] Optionally, based on the deep semantic information, an optimized layer of the ID photo image is constructed, wherein the optimized layer includes a color layer and a color scale layer, including:

[0016] constructing layers of the ID photo image according to the color semantic information to obtain a color layer, and constructing layers of the ID photo image according to the color scale semantic information to obtain a color scale layer;

[0017] Among them, the color layer includes color channels, the color channels include a brightness channel, a first color component channel and a second color component channel, and the color channels are independent of each other; the level layer includes hue areas, the hue areas include a dark area, a midtone area and a highlight area, and the hue areas are independent of each other.

[0018] Optionally, generating corresponding adjustment parameter information based on the color layer and the level layer according to the deep semantic information includes:

[0019] Determining color description information of the ID photo image based on the color semantic information, and determining color scale description information of the ID photo image based on the color scale semantic information;

[0020] Performing skin color optimization analysis based on each pixel in the color layer according to the color description information to obtain color adjustment parameters, and performing adjustment analysis based on each pixel in the color layer according to the color level description information to obtain color level adjustment parameters;

[0021] The adjustment parameter information is generated according to the preset fusion parameter, the color adjustment parameter and the color scale adjustment parameter.

[0022] Optionally, performing skin color optimization adjustment on each color channel in the color layer according to the adjustment parameter information to obtain a color optimization layer includes:

[0023] extracting color optimization parameters and color fusion parameters from the color adjustment parameters;

[0024] Optimizing skin color for each color channel according to the optimization parameters to obtain three skin color optimization layers;

[0025] The three skin color optimization layers are fused using the fusion parameters to obtain a color optimization layer.

[0026] Optionally, optimizing and adjusting the characteristics of each hue region in the color scale layer according to the color scale adjustment parameter and a preset layered adjustment strategy to obtain a color scale optimized layer includes:

[0027] Extracting tone optimization parameters and tone fusion parameters from the tone scale adjustment parameters;

[0028] According to the tone optimization parameters, shadow enhancement is performed on the dark area, contrast optimization is performed on the midtone area, and overexposure prevention optimization is performed on the highlight area, thereby obtaining a dark optimized layer after the dark area is optimized, a midtone optimized layer after the midtone area is optimized, and a highlight optimized layer after the highlight area is optimized;

[0029] The dark optimization layer, the mid-tone optimization layer, and the highlight optimization layer are layer-fused according to the tone fusion parameter to obtain a tone level optimization layer.

[0030] Optionally, fusing the color optimization layer and the tone level optimization layer according to the layer fusion parameters in the adjustment parameters to obtain an optimized target ID photo image includes:

[0031] according to Perform layer optimization and fusion to obtain the optimized target ID photo image;

[0032] Among them, Dresult is the target ID photo image output after optimization, Dlab is the color optimization layer, θlab is the parameter weight corresponding to the color optimization layer, Dg is the color level optimization layer, and θg is the parameter weight corresponding to the color level optimization layer.

[0033] Optionally, before performing semantic analysis and extraction on the ID photo image using a preset semantic analysis model, the method further includes:

[0034] Obtaining a paired image dataset and building an initial semantic analysis model, wherein the paired image dataset includes paired images, and the paired images include an original image and a corrected image corresponding to the original image;

[0035] Performing color adjustment and image expansion on the original images in the paired image dataset using a lookup table technology to obtain an expanded image dataset;

[0036] Using the initial semantic analysis model, the expanded image dataset is identified and skin color features in the face area are extracted to obtain a semantic analysis result;

[0037] According to the semantic analysis result, the parameters of the initial semantic analysis model are optimized to obtain a trained semantic analysis model.

[0038] In a second aspect, the present application provides a system for optimizing skin color for ID cards based on image perception, comprising:

[0039] An image acquisition module, used to acquire the ID photo image to be optimized;

[0040] A semantic analysis and extraction module, configured to perform semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information, wherein the deep semantic information includes features and context required for adjustment of the ID photo image;

[0041] An optimized layer generation module, configured to construct an optimized layer of the ID photo image based on the deep semantic information, wherein the optimized layer includes a color layer and a color scale layer;

[0042] An adjustment parameter information generation module, configured to generate corresponding adjustment parameter information based on the color layer and the color scale layer according to the deep semantic information;

[0043] an optimization and adjustment module, configured to optimize the skin color of each color channel in the color layer according to the adjustment parameter information to obtain a color-optimized layer, and to optimize the characteristics of each hue region in the gradation layer according to the adjustment parameter information and a preset layered adjustment strategy to obtain a gradation-optimized layer;

[0044] A layer fusion module is used to fuse the color optimization layer and the color level optimization layer according to the fusion parameters in the adjustment parameter information to obtain an optimized target ID photo image, where the target ID photo image is an ID photo image that meets the preset clarity and brightness requirements.

[0045] In summary, the embodiment of the present application performs semantic analysis and extraction on the acquired ID photo image through a semantic analysis model to obtain deep semantic information containing the features and context required for ID photo image adjustment, and then constructs the color layer and color scale layer of the ID photo image according to the deep semantic information. According to the deep semantic information, based on the color layer and the color scale layer, corresponding adjustment parameter information is generated. Finally, the skin color of the color layer is adjusted according to the adjustment parameter information, and the color scale layer is optimized according to the adjustment parameters. The color optimization layer and the color scale optimization layer are merged to obtain a target ID photo image that meets the preset clarity and brightness requirements. The present application realizes automatic optimization of image adjustment to ensure color accuracy, contrast and overall visual effect, which not only improves efficiency, but also makes the adjustment process more intuitive and easy to control, meets the actual optimization needs of ID photos, and solves the problem that the existing technology can only perform unified processing of images, resulting in poor image optimization effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0048] Figure 1 A flowchart of a method for optimizing skin color for ID cards based on image perception provided in an embodiment of the present application;

[0049] Figure 2 This is a schematic flow chart of the steps of a method for optimizing skin color for a certificate based on image perception, provided in an optional embodiment of the present application;

[0050] Figure 3 This is an optional example of an ID photo optimization and adjustment flow chart provided in this application;

[0051] Figure 4 This is another optional example of this application providing a flowchart for optimizing and adjusting ID photos;

[0052] Figure 5This is a comparison chart of the results after optimizing and adjusting the color cast image of the ID photo provided in an optional example of this application;

[0053] Figure 6 This is a comparison chart of the results after optimizing and adjusting the brighter ID photo provided in another optional example of this application;

[0054] Figure 7 This is a structural block diagram of a system for optimizing skin color for ID cards based on image perception provided in an embodiment of the present application;

[0055] Figure 8 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0057] To facilitate understanding of the embodiments of the present application, further explanation will be given below in conjunction with the drawings and specific embodiments. The embodiments do not constitute a limitation on the embodiments of the present application.

[0058] Figure 1 This is a flow chart of a method for optimizing skin color for ID cards based on image perception provided in an embodiment of the present application. Figure 1 As shown, the method for optimizing skin color for a certificate based on image perception provided in the embodiment of the present application may specifically include the following steps:

[0059] Step 110: Obtain the ID photo image to be optimized.

[0060] Step 120 , performing semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information.

[0061] The deep semantic information includes features and context required for adjusting the ID photo image.

[0062] A unified description of steps 110 to 120 is provided:

[0063] Specifically, the ID photo image (also called ID photo, ID photo picture, etc.) is usually an ID photo containing a face. The ID photo image can be an original image or an image that has been optimized or adjusted to a certain extent. This embodiment does not limit this.

[0064] In this embodiment, the semantic analysis model is a pre-trained neural network model capable of parsing complex semantic features from images. This embodiment does not limit the type of neural network model used to construct the semantic analysis model; the deep semantic information includes the features and context required for ID photo image adjustment, and has two types of semantic information. The deep semantic information corresponds to the subsequently constructed color layer and color scale layer, and respectively includes the semantic analysis results corresponding to the color layer and the semantic analysis results corresponding to the color scale layer.

[0065] In a specific implementation, this embodiment can input the ID photo image to be optimized into a semantic analysis model. The semantic analysis model then extracts complex features from the input image, including performing feature analysis and extraction on each pixel of the input image to obtain deep semantic information about the image, providing the necessary features and context for subsequent color optimization and adjustment of each layer of the image. Furthermore, this embodiment can analyze the input image using the semantic analysis model and generate unique operating parameters for each pixel in the image, thus executing step 130. Thus, this embodiment analyzes the input image using the semantic analysis model, improving the flexibility and accuracy of subsequent color adjustments and achieving more refined and natural color adjustments.

[0066] It should be noted that the ID skin color optimization method provided in this application can be used not only to optimize ID photos, but also to optimize other types of images in specific applications, and this embodiment does not limit this.

[0067] In actual implementation, before inputting the ID photo image into the semantic analysis model for analysis and extraction, this embodiment may also first perform model training on the semantic analysis model to improve the model's analysis and extraction capabilities for the input image.

[0068] In an optional embodiment, before the embodiment of the present application performs semantic analysis and extraction on the ID photo image through a preset semantic analysis model, it may also include: obtaining a paired image data set and constructing an initial semantic analysis model, wherein the paired image data set includes paired images, and the paired images include original images and corrected images corresponding to the original images; performing color adjustment and image expansion on the original images in the paired image data set through lookup table technology to obtain an expanded image data set; using the initial semantic analysis model, identifying and extracting skin color features in the face area of ​​the expanded image data set to obtain a semantic analysis result; and optimizing the parameters of the initial semantic analysis model based on the semantic analysis result to obtain a trained semantic analysis model.

[0069] In actual processing, this embodiment first develops a basic deep neural network model, which aims to extract deep semantic features from images, and uses the deep neural network model as the initial semantic analysis model for model training. In order to train the model, this embodiment prepares a paired image data set in advance. Each pair of images in the data set includes an original image whose skin color does not meet the standard requirements, and a corrected image that has been professionally adjusted to meet the standards for making ID photos. In order to increase the diversity of the training data, the lookup table (LUT) technology is used to adjust the color of the image, thereby expanding the data set. Through these paired image data, the network model is trained to identify and extract the characteristics of the skin color of the portrait area in each image, and generate the parameters required for subsequent image processing steps. By using a diverse and expanded data set for training, the generalization ability of the model is improved, so that the semantic analysis model can adapt to a variety of images and scenes, and maintain excellent adjustment effects in different visual environments.

[0070] Step 130: construct an optimized layer of the ID photo image based on the deep semantic information.

[0071] The optimized layers include a color layer and a color scale layer.

[0072] Step 140 : Generate corresponding adjustment parameter information based on the color layer and the tone level layer according to the deep semantic information.

[0073] A unified description of steps 130 to 140 is provided:

[0074] In a specific implementation, the portion of the ID photo image that requires optimization and adjustment can be determined based on the deep semantic information. Specifically, this embodiment can determine the portion to be optimized and adjusted based on the image features reflected by the deep semantic information, and then construct a corresponding optimization layer. The optimization layer can be divided into two major categories, including but not limited to: color layer (also known as Lab color layer or Lab space, etc.) and color scale layer. Among them, both color layer and color scale layer can contain multiple independent layers, which will not be described in detail in this embodiment.

[0075] In this embodiment, after constructing the corresponding optimization layer, the adjustment parameter information required for optimizing and adjusting the image can be determined based on the response of the deep semantic information. The adjustment parameter information can include multiple adjustment parameters for optimizing and adjusting each layer. Since the color layer and the color level layer both contain multiple independent layers, there can be multiple adjustment parameters, each corresponding to each layer.

[0076] In actual processing, the existing technology also uses commonly used image adjustment tools to operate images, such as Photoshop. However, when using image adjustment tools to adjust images, it is necessary to use color levels, color adjustment tools, etc. in combination, which requires high professional knowledge of the operator. In order to solve the problems existing in the existing technology, this embodiment can determine the part of the image that needs to be optimized and adjusted by reasonably analyzing the deep semantic information, and construct corresponding layers for the part that needs to be optimized and adjusted. Subsequently, only the established layers need to be adjusted, which improves the universality and adjustment efficiency of image optimization and adjustment, brings great convenience to image optimization and adjustment work, and effectively reduces resource consumption and dependence on professional and technical personnel; of course, in order to improve the overall visual effect and comparison of image optimization, this embodiment can also determine the optimization situation based on the image features represented by the deep semantic information, and directly construct all color layers and color level layers, and subsequently only the layers that need to be optimized and adjusted can be processed.

[0077] It should be noted that in an ID photo image, not every layer may need to be adjusted and optimized. For layers that do not need to be adjusted and optimized, this embodiment can selectively set their corresponding adjustment parameters to empty, so that the layer does not need to be processed.

[0078] In a specific implementation, the adjustment parameter may include a corresponding adjustment value. Taking the brightness layer in the color scale layer as an example, the adjustment parameter corresponding to the brightness layer may be a brightness value, such as the adjusted brightness value is 10% (percentage).

[0079] Step 150: optimizing the skin color of each color channel in the color layer according to the adjustment parameter information to obtain a color optimization layer; and optimizing the characteristics of each hue area in the color level layer according to the adjustment parameter information and a preset layered adjustment strategy to obtain a color level optimization layer.

[0080] In a specific implementation, each color channel in a color layer can be considered an independent layer. Similarly, in this embodiment, each hue region in a scale layer can also be considered an independent layer. Because the adjustment parameter information includes the adjustment parameters corresponding to each layer, this embodiment can optimize and adjust the adjustment parameters corresponding to each layer.

[0081] Specifically, for the optimization and adjustment of color channels, since each color channel is independent of each other, for each color channel in the color layer, the layer can be adjusted using its corresponding adjustment parameters, including skin color optimization adjustment for each color channel, so that the color adjustment of the ID photo image is more precise and controllable, and a color optimization layer is obtained. Therefore, by making targeted adjustments to each color channel, the color after the adjustment of the color channel meets the requirements of the ID photo.

[0082] For the optimization and adjustment of the hue area, each hue area has corresponding characteristics, and the hue areas are also independent of each other. Therefore, this embodiment can use the adjustment parameters corresponding to the hue area to optimize and adjust the hue area according to the characteristics of the hue area to obtain a color level optimization layer, thereby ensuring that the image is clear enough, the brightness meets the requirements, and there is no uneven grayscale distribution.

[0083] In actual processing, since each color channel is independent of each other and each hue area is also independent of each other, this embodiment can fuse the color channels that have completed optimization adjustment to obtain a color optimization layer, and fuse the hue areas that have completed optimization adjustment to obtain a color level optimization layer. This embodiment will not elaborate on this.

[0084] Furthermore, the color layer and the tone level layer are also independent of each other, so this embodiment can also perform layer fusion on the color optimization layer and the tone level optimization layer, that is, execute step 160.

[0085] Therefore, by adjusting the color layer and the color level layer, it is ensured that the ID photo image obtained later meets the color requirements and is clear enough.

[0086] Step 160 : Fusing the color optimization layer and the tone level optimization layer according to the fusion parameters in the adjustment parameter information to obtain an optimized target ID photo image.

[0087] The target ID photo image is an ID photo image that meets preset clarity and brightness requirements.

[0088] In a specific implementation, the adjustment parameter information may include, in addition to adjustment parameters for layer optimization and adjustment, fusion parameters for fusing the layers. There may also be multiple fusion parameters, including but not limited to: parameters for fusing color channels and tonal regions, and for fusing the color optimization layer with the color level optimization layer. This embodiment utilizes the fusion parameters to fuse the color optimization layer with the color level optimization layer. Through layer fusion, a complete image is reconstructed to obtain an optimized target ID photo image. The optimized ID photo image is the target ID photo that meets the color, clarity, and brightness requirements.

[0089] It can be seen that the embodiment of the present application performs semantic analysis and extraction on the acquired ID photo image through a semantic analysis model to obtain deep semantic information containing the features and context required for ID photo image adjustment, and then constructs the color layer and color scale layer of the ID photo image based on the deep semantic information. According to the deep semantic information, based on the color layer and color scale layer, corresponding adjustment parameter information is generated. Finally, according to the adjustment parameter information, the skin color of the color layer is adjusted, and the color scale layer is optimized and adjusted. The optimized color optimization layer and color scale optimization layer are fused to obtain the target ID photo image that meets the preset clarity and brightness requirements. Therefore, the embodiment of the present application utilizes a skin color adjustment algorithm combined with a deep algorithm to achieve image perception-based skin color optimization for ID photos. By constructing an advanced deep neural network model, the complex features of image color distribution are learned, and the semantic analysis model after training the network model is used to extract the deep semantic information of the image, providing the necessary features and context for color adjustment. The method of image layering processing and fusion is further adopted to achieve automatic optimization of image adjustment, ensuring color accuracy, contrast and overall visual effect, which not only improves efficiency, but also makes the adjustment process more intuitive and easy to control, meeting the actual optimization needs of ID photos, and solving the problem that the existing technology can only perform unified processing of images, resulting in poor image optimization effect.

[0090] Reference Figure 2 , shows a schematic flow chart of a method for optimizing skin color for a license based on image perception, provided in an optional embodiment of the present application. The method may specifically include the following steps:

[0091] Step 210: Obtain the ID photo image to be optimized.

[0092] Step 220: Perform color analysis and color feature extraction on the ID photo image using a preset semantic analysis model to obtain color semantic information, and perform color scale analysis and color scale feature extraction on the ID photo image using the semantic analysis model to obtain color scale semantic information.

[0093] Step 230: Generate deep semantic information based on the color semantic information and the color scale semantic information.

[0094] The deep semantic information includes features and context required for adjusting the ID photo image.

[0095] A unified description of steps 220 to 230 is provided:

[0096] In a specific implementation, this embodiment utilizes layers to operate on various regions of the original ID photo image. To ensure that the ID photo can be optimized and adjusted to meet professional needs, the ID photo image can be input into a semantic analysis model. The semantic analysis model analyzes the ID photo image, extracts the color portion that can be optimized and adjusted, and describes the color portion, including but not limited to: analyzing and describing the color of each pixel region in the color portion, extracting skin color features, etc., to obtain color semantic information. Similarly, the semantic analysis model can analyze the color scale portion that can be optimized and adjusted from the ID photo image, and describe the color scale portion, including but not limited to: analyzing and describing the sensitivity of each pixel region in the ID photo image, etc., to obtain color scale semantic information. This embodiment obtains the current description of the image through feature extraction as deep semantic information, and then generates corresponding adjustment parameters based on the description.

[0097] It should be noted that the steps of extracting color semantic information and color scale semantic information from the ID photo image in this embodiment can be performed in parallel or sequentially, that is, extracting two semantic information at the same time, or extracting them in a preset order. This embodiment does not impose any restrictions on this.

[0098] Step 240 , constructing layers of the ID photo image according to the color semantic information to obtain a color layer, and constructing layers of the ID photo image according to the color scale semantic information to obtain a color scale layer.

[0099] Among them, the color layer includes color channels, the color channels include a brightness channel, a first color component channel and a second color component channel, and the color channels are independent of each other; the level layer includes hue areas, the hue areas include a dark area, a midtone area and a highlight area, and the hue areas are independent of each other.

[0100] In practice, to make color adjustments for ID photos more precise and controllable, ensuring color accuracy, contrast, and overall visual quality after adjustment, this embodiment divides the ID photo image into two large layers: a color layer and a gradation layer. Each large layer can be further divided into three smaller layers. The color layer can contain three color channels (or color spaces), and the gradation layer can contain three tonal regions. Optimization and adjustments can then be performed on each smaller layer.

[0101] In actual implementation, this embodiment divides the color layer into three color spaces for independent manipulation. This division is because most standard documents require image color based on the Lab color space. Each color channel in the color space can be independent, making color adjustments more precise and controllable. This embodiment generates a Lab color layer and a color scale layer for ID photo images, including: a luminance channel L (brightness), a first color component channel a (color components from green to red), and a second color component channel b (color components from blue to yellow).

[0102] For the color gradation layer, this embodiment meticulously divides the ID photo image into three main tonal regions: dark areas (referred to as darks), midtone areas (referred to as midtones), and highlights (referred to as highlights). Each tonal region corresponds to a separate layer, and is specifically adjusted based on its characteristics.

[0103] Therefore, this embodiment subdivides the ID photo image into six layers so that each layer can be independently operated subsequently, thereby ensuring that the color and brightness of the image can be accurately controlled to achieve the desired visual effect.

[0104] Step 250: Determine color description information of the ID photo image based on the color semantic information, and determine color scale description information of the ID photo image based on the color scale semantic information.

[0105] In a specific implementation, by interpreting and analyzing color semantic information, the semantic analysis model can analyze and describe the color space of the ID photo image, thereby obtaining color description information. For example, consider an ID photo captured in backlight, where the skin color appears darker, but the degree of darkness varies from area to area. A neural network is used to extract skin color features, which describe the distribution of skin color grayscale values.

[0106] Similarly, this embodiment interprets and analyzes the color scale description information to obtain the semantic analysis model's analysis and description of the color scale portion of the ID photo image, thereby obtaining the color scale description information. For example, a certain ID photo image may have a severely darkened left side of the face, while the right side is slightly darker. This feature representation can be used to generate an adjustment parameter layer of the same size as the original image, thus avoiding the need to resize the image to a fixed size without altering the original image.

[0107] It should be noted that the color description information and the color scale description information can be generated and output by a semantic classification model.

[0108] Step 260, based on the color description information, perform skin color optimization analysis based on each pixel in the color layer to obtain color adjustment parameters, and based on the color level description information, perform adjustment analysis based on each pixel in the color level layer to obtain color level adjustment parameters.

[0109] In this embodiment, the model uses the color description information and color scale description information obtained after analyzing the ID photo image to determine specific adjustment parameters for each operation layer. For example, adjustment parameters for the L, a, and b channels in the Lab color space, as well as adjustment parameters for the shadow, midtone, and highlight portions of the color scale, can be calculated for each operation layer. For example, the L channel adjustment parameter can be Fl, the a channel adjustment parameter can be Fa, and the b channel adjustment parameter can be Fb, thereby obtaining the color adjustment parameters; the shadow adjustment parameter can be Fd, the midtone adjustment parameter can be Fm, and the highlight adjustment parameter can be Fh, thereby obtaining the color scale adjustment parameters.

[0110] Step 270 : Generate the adjustment parameter information according to the preset fusion parameter, the color adjustment parameter, and the color scale adjustment parameter.

[0111] In the specific implementation, the adjustment parameters can mainly include four parts, including but not limited to: descriptive parameters of the ID photo image (such as whether the image is reddish or dark, whether it is not clear enough in grayscale, etc.), adjustment parameters for specific adjustments to each layer of the image (including color adjustment parameters and color scale adjustment parameters), a first fusion parameter for adjusting the fusion of layers, and a second fusion parameter for fusing Lab and color scale.

[0112] Among them, the adjustment parameters include color adjustment parameters and level adjustment parameters. The adjustment parameters are specific adjustments to the image, which respectively adjust the dark levels, midtones and highlights corresponding to the Lab channel and level of the image.

[0113] It should be noted that, in this embodiment, the adjustment parameter information can be generated and output by a semantic analysis model.

[0114] Step 280: optimizing the skin color of each color channel in the color layer according to the adjustment parameter information to obtain a color optimization layer; and optimizing the characteristics of each hue area in the color level layer according to the adjustment parameter information and a preset layered adjustment strategy to obtain a color level optimization layer.

[0115] In practice, the neural network generates unique operating parameters for each pixel in the image. When adjusting layers, adjustments can be made to each pixel region in the original image. Feature extraction is used to obtain the current description of the image, and corresponding adjustment parameters are generated based on this description. These adjustment parameters are then used to adjust each channel in the Lab color space and each tonal region in the color scale layer. For example, if a person's skin is dark in an ID photo, the system can analyze and identify the specific skin region that requires optimization and adjustment, as well as the extent of the image brightness adjustment.

[0116] Refer to Figure 3 and Figure 4 As shown in the ID photo image optimization and adjustment flow chart, the ID photo skin color optimization method provided by this application can be mainly divided into three stages: in the first stage, this application constructs a basic deep neural network model to extract the deep semantic information of the image, providing the necessary features and context for subsequent color adjustment; in the second stage, this application uses the output of the first stage to generate image adjustment parameters. In this stage, the Lab color space and color scale of the image are adjusted; in the third stage, the adjusted Lab color space and color scale layer are fused through fusion parameters to obtain an optimized ID photo image. The optimized ID photo image not only meets the standard requirements for ID photos, but also ensures the clarity and naturalness of the image. In this embodiment, after completing the image adjustment, the image adjustment effect can also be compared, and then the semantic analysis model can be continuously optimized to obtain more accurate adjustment parameters.

[0117] In an optional embodiment, the above-mentioned skin color optimization adjustment is performed on each color channel in the color layer according to the adjustment parameter information to obtain a color optimization layer, which may specifically include: extracting color optimization parameters and color fusion parameters from the color adjustment parameters; according to the optimization parameters, optimizing the skin color of each color channel to obtain three skin color optimization layers; and layer fusion of the three skin color optimization layers using the fusion parameters to obtain a color optimization layer.

[0118] In the specific implementation, the fusion parameters include a first fusion parameter for adjusting the fusion of the layer and a second fusion parameter for fusing Lab and color levels. The first fusion parameter mainly includes two parameters, namely, the parameter for fusing the three adjusted Lab channels and the parameter for fusing the three adjusted hue areas.

[0119] For example, refer to Figure 5 , Figure 5 Figure a is a color cast image of an ID photo, and Figure b is an optimized image obtained after the color layer is optimized and adjusted according to this embodiment.

[0120] In an optional embodiment, the above-mentioned optimization adjustment of the characteristics of each tonal area in the tonal layer is performed according to the tonal adjustment parameters and the preset layered adjustment strategy to obtain a tonal optimization layer, which may specifically include: extracting tonal optimization parameters and tonal fusion parameters from the tonal adjustment parameters; according to the tonal optimization parameters, performing shadow enhancement on the dark area, contrast optimization on the midtone area, and overexposure optimization on the highlight area, respectively, to obtain a dark optimization layer after the dark area is optimized, a midtone optimization layer after the midtone area is optimized, and a highlight optimization layer after the highlight area is optimized; and performing layer fusion on the dark optimization layer, the midtone optimization layer, and the highlight optimization layer according to the tonal fusion parameters to obtain a tonal optimization layer.

[0121] In practice, the Levels adjustment process employs a layered approach. The image is meticulously divided into three primary tonal regions. Each region is assigned a separate layer, with adjustments tailored to its specific characteristics. The Shadows layer enhances shadow detail, the Midtones layer optimizes contrast within the main image, and the Highlights layer preserves highlight detail to prevent overexposure.

[0122] In related technologies, commonly used white balance corrections need to be adjusted according to the actual shooting environment, and the white balance parameters have a hard correlation with the shooting equipment used. If the shooting environment changes, it is necessary to use a color card to adjust the white balance of the camera, which has the problems of cumbersome operation and high cost. To solve this problem, this embodiment adds color level adjustment to the layer layering process, mainly to allow the generated image to have a higher dynamic range of grayscale, so that the overall image is clearer and not gray. This embodiment refers to the HDR generation process of photography to shoot multiple photos with different exposures, and synthesizes them into an image with a wider brightness range. The same principle is also used in the process of adjusting the color level of the image, and the image is divided into three layers: dark, mid-tone and highlight for adjustment. Finally, the three layers are fused together through a fusion layer to adjust the clarity of the image.

[0123] For example, refer to Figure 6 , Figure 6 Figure a in the middle is a brighter ID photo, and Figure b is an optimized image obtained after the color level layer optimization adjustment is performed in this embodiment.

[0124] Furthermore, the above-mentioned first fusion parameter and second fusion parameter are both preset fusion parameters. Since the fusion of layer adjustments is independent of each other between Lab channels, a fusion parameter is required. As the first fusion parameter, the channel adjustments are fused, and the same is true for the color scale. The second fusion parameter is used to fuse Lab and color scale to ensure that the color of the image is consistent with the ID photo while ensuring that the image is clear enough without uneven grayscale distribution.

[0125] Furthermore, the Lab channel and each hue area can be adjusted using the following formula:

[0126]

[0127] Among them, Dl...Dh are the intermediate adjustment images generated by applying the adjustment parameters to the original image, Dl is the process image after L color space adjustment, Da is the process image after a color space adjustment, Db is the process image after b color space adjustment, Dd is the process image after dark level adjustment, Dm is the process image after midtone level adjustment, and Dh is the process image after bright level adjustment.

[0128] Step 290: Fusing the color optimization layer and the tone level optimization layer according to the fusion parameters in the adjustment parameter information to obtain an optimized target ID photo image.

[0129] The target ID photo image is an ID photo image that meets preset clarity and brightness requirements.

[0130] In practice, since Lab color adjustment and scale adjustment are performed independently, this example introduces a parameter fusion weighting mechanism to ensure that after each layer is adjusted, the parameters of all adjustment layers are combined to ensure that the final image meets the standard requirements for ID photos. This method ensures that the adjusted image meets the quality standards immediately, reducing the need for post-processing and improving efficiency.

[0131] In an optional embodiment, the above-mentioned fusion of the color optimization layer and the tone optimization layer according to the fusion parameters in the adjustment parameter information to obtain the optimized target ID photo image may specifically include: Perform layer optimization and fusion to obtain the optimized target ID photo image; among them, Dresult is the target ID photo image output after optimization, Dlab is the color optimization layer, θlab is the parameter weight corresponding to the color optimization layer, Dg is the color level optimization layer, and θg is the parameter weight corresponding to the color level optimization layer.

[0132] In a specific implementation, after adjusting the Lab color space and color levels separately, it is necessary to merge these independent layer effects together, that is, to perform layer fusion. This embodiment outputs the fusion parameters of the Lab color space and the color level fusion parameters in the network, and finally obtains the adjusted image Dresult by using the operating parameters of the Lab color and color level fusion. Therefore, this embodiment merges these independent layer effects together after adjusting the Lab color space and color levels separately. Through this fusion strategy, it can ensure that the adjustment effects of each layer are properly reflected in the final image, while avoiding conflicts in color and contrast.

[0133] For the image optimization and adjustment process, this embodiment designs three steps in the adjustment process: the first step is to generate six adjustment layers of Lab and Levels; the second step is to generate two adjustment layers after Lab and Levels adjustment based on the previous six adjustment layers; the third step is to fuse the Lab and Levels adjustment results, and a total of 9 adjustment layers are designed. This embodiment combines the image layering processing and fusion methods to automatically optimize image adjustment. By decomposing the image into multiple independent layers, each layer can be carefully adjusted to ensure color accuracy, contrast and overall visual effect. Finally, through the layer fusion operation, all adjusted layers are synthesized into a passport photo that meets professional needs. The integrated method adopted in this embodiment not only improves efficiency, but also makes the adjustment process more intuitive and easy to control.

[0134] In summary, the embodiment of the present application uses a semantic analysis model to perform color analysis and color feature extraction on the ID photo image, as well as color scale analysis and color scale feature extraction on the ID photo image to obtain color semantic information and color scale semantic information. Subsequently, based on the color semantic information and color scale semantic information, the ID photo image is layered to obtain a color layer and a color scale layer. Color description information is determined based on the color semantic information, and color scale description information is determined based on the color scale semantic information. Based on the color description information, skin color optimization analysis is performed on each pixel in the color layer to obtain color adjustment parameters. Based on the color scale description information, adjustment analysis is performed on each pixel in the color scale layer to obtain color scale adjustment parameters. Then, based on the color adjustment parameters, skin color optimization adjustment is performed on each color channel in the color layer to obtain a color optimization layer. Based on the color scale adjustment parameters and a preset layered adjustment strategy, characteristics of each hue area in the color scale layer are optimized to obtain a color scale optimization layer. Finally, the color optimization layer and the color scale optimization layer are fused using fusion parameters to obtain an optimized target ID photo image. This application uses convolutional neural network technology to perform Lab color adjustment and color level adjustment on images, which can effectively avoid the problem of using a single fixed parameter to adjust the image, resulting in a lack of layering and poor visual effects. It can also effectively solve the problem of traditional methods requiring manual adjustment of different parameters according to different scenes in multiple scenarios. Through this method, images that meet high standards can be generated, whether in terms of color accuracy, contrast or overall visual effects, which can meet the professional needs of making ID photos and improve the efficiency of image optimization processing.

[0135] It should be noted that, for the purpose of simple description, the method embodiments are expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited to the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously.

[0136] like Figure 7 As shown, the embodiment of the present application further provides a certificate skin color optimization system 700 based on image perception, including:

[0137] Image acquisition module 710, used to acquire the ID photo image to be optimized;

[0138] Semantic analysis and extraction module 720, configured to perform semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information, wherein the deep semantic information includes features and context required for adjustment of the ID photo image;

[0139] An optimized layer generation module 730 is configured to construct an optimized layer of the ID photo image based on the deep semantic information, wherein the optimized layer includes a color layer and a tone level layer;

[0140] An adjustment parameter information generating module 740 is configured to generate corresponding adjustment parameter information based on the color layer and the tone level layer according to the deep semantic information;

[0141] an optimization and adjustment module 750 for optimizing the skin tone of each color channel in the color layer according to the adjustment parameter information to obtain a color-optimized layer, and optimizing the characteristics of each hue region in the gradation layer according to the adjustment parameter information and a preset layered adjustment strategy to obtain a gradation-optimized layer;

[0142] The layer fusion module 760 is used to fuse the color optimization layer and the color level optimization layer according to the fusion parameters in the adjustment parameter information to obtain an optimized target ID photo image, where the target ID photo image is an ID photo image that meets the preset clarity and brightness requirements.

[0143] Optionally, the semantic analysis and extraction module 720 includes:

[0144] A color analysis and color feature extraction submodule is used to perform color analysis and color feature extraction on the ID photo image using a preset semantic analysis model to obtain color semantic information;

[0145] A color scale analysis and color scale feature extraction submodule, configured to perform color scale analysis and color scale feature extraction on the ID photo image using the semantic analysis model to obtain color scale semantic information;

[0146] The deep semantic information generation submodule is used to generate deep semantic information according to the color semantic information and the color scale semantic information.

[0147] Optionally, the optimized layer generation module 730 includes:

[0148] A color layer construction submodule is used to construct a layer of the ID photo image according to the color semantic information to obtain a color layer;

[0149] The color scale layer construction submodule is used to construct a layer of the ID photo image according to the color scale semantic information to obtain a color scale layer; wherein the color layer includes a color channel, the color channel includes a brightness channel, a first color component channel and a second color component channel, and the color channels are independent of each other; the color scale layer includes a hue area, the hue area includes a dark area, a midtone area and a highlight area, and the hue areas are independent of each other.

[0150] Optionally, the adjustment parameter information generating module 740 includes:

[0151] a description information determination submodule, configured to determine color description information of the ID photo image based on the color semantic information, and to determine color scale description information of the ID photo image based on the color scale semantic information;

[0152] a skin color optimization analysis submodule, configured to perform skin color optimization analysis based on each pixel in the color layer according to the color description information to obtain color adjustment parameters;

[0153] An adjustment analysis submodule, configured to perform adjustment analysis based on each pixel in the color scale layer according to the color scale description information to obtain a color scale adjustment parameter;

[0154] The adjustment parameter information generation submodule is used to generate the adjustment parameter information according to the preset fusion parameter, the color adjustment parameter and the color scale adjustment parameter.

[0155] Optionally, the optimization and adjustment module 750 includes:

[0156] A first parameter extraction submodule, configured to extract color optimization parameters and color fusion parameters from the color adjustment parameters;

[0157] a skin color optimization submodule, configured to optimize the skin color of each color channel according to the optimization parameters to obtain three skin color optimization layers;

[0158] A first layer fusion submodule is used to perform layer fusion on the three skin color optimization layers using the fusion parameters to obtain a color optimization layer;

[0159] A second parameter extraction submodule is used to extract a tone optimization parameter and a tone fusion parameter from the color scale adjustment parameter;

[0160] a tone layer optimization and adjustment submodule, configured to perform shadow enhancement on the dark area, contrast optimization on the midtone area, and overexposure prevention optimization on the highlight area according to the tone optimization parameters, thereby obtaining a dark optimized layer after the dark area is optimized, a midtone optimized layer after the midtone area is optimized, and a highlight optimized layer after the highlight area is optimized;

[0161] The second layer fusion submodule is used to perform layer fusion on the dark optimization layer, the mid-tone optimization layer, and the highlight optimization layer according to the tone fusion parameter to obtain a tone level optimization layer.

[0162] Optionally, the layer fusion module 760 is specifically used to: Perform layer optimization and fusion to obtain the optimized target ID photo image; among them, Dresult is the target ID photo image output after optimization, Dlab is the color optimization layer, θlab is the parameter weight corresponding to the color optimization layer, Dg is the color level optimization layer, and θg is the parameter weight corresponding to the color level optimization layer.

[0163] Optionally, the image perception-based ID skin color optimization system 700 further includes:

[0164] A model building module is used to obtain a paired image dataset and build an initial semantic analysis model, wherein the paired image dataset includes paired images, and the paired images include an original image and a corrected image corresponding to the original image;

[0165] An image expansion module, configured to perform color adjustment and image expansion on the original images in the paired image dataset using a lookup table technology to obtain an expanded image dataset;

[0166] an identification and extraction module, configured to identify and extract skin color features in the face area of ​​the expanded image dataset using the initial semantic analysis model to obtain a semantic analysis result;

[0167] The parameter optimization module is used to optimize the parameters of the initial semantic analysis model according to the semantic analysis result to obtain a trained semantic analysis model.

[0168] It should be noted that the image perception-based certificate skin color optimization system provided in the embodiment of the present application can execute the image perception-based certificate skin color optimization system method provided in any embodiment of the present application, and has the corresponding functions and beneficial effects of the execution method.

[0169] In a specific implementation, the above-mentioned ID photo skin color optimization system based on image perception can be integrated into a device, allowing the device to optimize and adjust each layer of the ID photo image according to the adjustment parameters, thereby obtaining an ID photo that meets professional requirements. As an electronic device, this improves the efficiency of optimizing and adjusting the ID photo skin color, and also makes the adjustment process more intuitive and easy to control. The electronic device can be composed of two or more physical entities, or it can be composed of a single physical entity. For example, the electronic device can be a personal computer (PC), a computer, a server, etc., and this embodiment of the application does not impose specific limitations on this.

[0170] like Figure 8As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114; the memory 113 is used to store computer programs; the processor 111 is used to implement the steps of the image perception-based certificate skin color optimization method provided by any of the aforementioned method embodiments when executing the program stored in the memory 113. Exemplarily, the steps of the ID photo skin color optimization method based on image perception may include the following steps: obtaining an ID photo image to be optimized; performing semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information, wherein the deep semantic information includes features and context required for adjusting the ID photo image; constructing an optimization layer for the ID photo image based on the deep semantic information, wherein the optimization layer includes a color layer and a tone scale layer; generating corresponding adjustment parameter information based on the color layer and the tone scale layer based on the deep semantic information; performing skin color optimization adjustment on each color channel in the color layer according to the adjustment parameter information to obtain a color optimization layer, and performing characteristic optimization adjustment on each hue region in the tone scale layer according to the adjustment parameter information and a preset layered adjustment strategy to obtain a tone scale optimization layer; and fusing the color optimization layer and the tone scale optimization layer according to a fusion parameter in the adjustment parameter information to obtain an optimized target ID photo image, wherein the target ID photo image is an ID photo image that meets preset clarity and brightness requirements.

[0171] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the image perception-based certificate skin color optimization method provided in any of the aforementioned method embodiments are implemented.

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

[0173] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.

Claims

1. A method for optimizing skin color of ID cards based on image perception, characterized in that: include: Obtain the ID photo image to be optimized; Performing semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information, wherein the deep semantic information includes features and context required for adjusting the ID photo image; Constructing an optimized layer of the ID photo image based on the deep semantic information, the optimized layer including a color layer and a color scale layer; According to the deep semantic information, based on the color layer and the color scale layer, generating corresponding adjustment parameter information; performing skin color optimization adjustment on each color channel in the color layer according to the adjustment parameter information to obtain a color optimization layer, and performing characteristic optimization adjustment on each hue region in the gradation layer according to the adjustment parameter information and a preset layered adjustment strategy to obtain a gradation optimization layer; fusing the color optimization layer and the tone level optimization layer according to the fusion parameters in the adjustment parameter information to obtain an optimized target ID photo image, wherein the target ID photo image is an ID photo image that meets preset clarity and brightness requirements; The method of performing semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information includes: performing color analysis and color feature extraction on the ID photo image using a preset semantic analysis model to obtain color semantic information, and performing color scale analysis and color scale feature extraction on the ID photo image using the semantic analysis model to obtain color scale semantic information; and generating deep semantic information based on the color semantic information and the color scale semantic information. Based on the deep semantic information, an optimized layer of the ID photo image is constructed, and the optimized layer includes a color layer and a gradation layer, including: based on the color semantic information, the ID photo image is layer-constructed to obtain a color layer, and based on the gradation semantic information, the ID photo image is layer-constructed to obtain a gradation layer; wherein, the color layer includes color channels, and the color channels include a brightness channel, a first color component channel, and a second color component channel, and the color channels are independent of each other; the gradation layer includes a hue area, and the hue area includes a dark area, a midtone area, and a highlight area, and the hue areas are independent of each other.

2. The method according to claim 1, characterized in that The step of generating corresponding adjustment parameter information based on the color layer and the gradation layer according to the deep semantic information includes: Determining color description information of the ID photo image based on the color semantic information, and determining color scale description information of the ID photo image based on the color scale semantic information; Performing skin color optimization analysis based on each pixel in the color layer according to the color description information to obtain color adjustment parameters, and performing adjustment analysis based on each pixel in the color layer according to the color level description information to obtain color level adjustment parameters; The adjustment parameter information is generated according to the preset fusion parameter, the color adjustment parameter and the color scale adjustment parameter.

3. The method according to claim 2, characterized in that The step of performing skin color optimization adjustment on each color channel in the color layer according to the adjustment parameter information to obtain a color optimization layer includes: Extracting color optimization parameters and color fusion parameters from the color adjustment parameters; Optimizing skin color for each of the color channels according to the optimization parameters to obtain three skin color optimization layers; The three skin color optimization layers are fused using the fusion parameters to obtain a color optimization layer.

4. The method according to claim 2, characterized in that The step of optimizing and adjusting the characteristics of each hue region in the color scale layer according to the color scale adjustment parameters and the preset layered adjustment strategy to obtain the color scale optimized layer includes: Extracting tone optimization parameters and tone fusion parameters from the tone scale adjustment parameters; According to the tone optimization parameters, shadow enhancement is performed on the dark area, contrast optimization is performed on the midtone area, and overexposure prevention optimization is performed on the highlight area, thereby obtaining a dark optimized layer after the dark area is optimized, a midtone optimized layer after the midtone area is optimized, and a highlight optimized layer after the highlight area is optimized; The dark optimization layer, the mid-tone optimization layer, and the highlight optimization layer are layer-fused according to the tone fusion parameter to obtain a tone level optimization layer.

5. The method according to claim 1, wherein The step of fusing the color optimization layer and the tone optimization layer according to the fusion parameters in the adjustment parameter information to obtain an optimized target ID photo image includes: according to Perform layer optimization and fusion to obtain the optimized target ID photo image; Among them, Dresult is the target ID photo image output after optimization, Dlab is the color optimization layer, θlab is the parameter weight corresponding to the color optimization layer, Dg is the color level optimization layer, and θg is the parameter weight corresponding to the color level optimization layer.

6. The method according to any one of claims 1 to 5, characterized in that Before performing semantic analysis and extraction on the ID photo image using a preset semantic analysis model, the method further includes: Obtaining a paired image dataset and building an initial semantic analysis model, wherein the paired image dataset includes paired images, and the paired images include an original image and a corrected image corresponding to the original image; Performing color adjustment and image expansion on the original images in the paired image dataset using a lookup table technology to obtain an expanded image dataset; Using the initial semantic analysis model, the expanded image dataset is identified and skin color features in the face area are extracted to obtain a semantic analysis result; According to the semantic analysis result, the parameters of the initial semantic analysis model are optimized to obtain a trained semantic analysis model.

7. A skin color optimization system for ID cards based on image perception, characterized in that: include: An image acquisition module, used to acquire the ID photo image to be optimized; A semantic analysis and extraction module, configured to perform semantic analysis and extraction on the ID photo image using a preset semantic analysis model to obtain deep semantic information, wherein the deep semantic information includes features and context required for adjustment of the ID photo image; An optimized layer generation module, configured to construct an optimized layer of the ID photo image based on the deep semantic information, wherein the optimized layer includes a color layer and a color scale layer; An adjustment parameter information generation module, configured to generate corresponding adjustment parameter information based on the color layer and the color scale layer according to the deep semantic information; an optimization and adjustment module, configured to optimize the skin color of each color channel in the color layer according to the adjustment parameter information to obtain a color-optimized layer, and to optimize the characteristics of each hue region in the gradation layer according to the adjustment parameter information and a preset layered adjustment strategy to obtain a gradation-optimized layer; a layer fusion module, configured to fuse the color optimization layer and the tone level optimization layer according to the fusion parameters in the adjustment parameter information to obtain an optimized target ID photo image, wherein the target ID photo image is an ID photo image that meets preset clarity and brightness requirements; The semantic analysis and extraction module includes: a color analysis and color feature extraction submodule for performing color analysis and color feature extraction on the ID photo image using a preset semantic analysis model to obtain color semantic information; a color scale analysis and color scale feature extraction submodule for performing color scale analysis and color scale feature extraction on the ID photo image using the semantic analysis model to obtain color scale semantic information; and a deep semantic information generation submodule for generating deep semantic information based on the color semantic information and the color scale semantic information. The optimized layer generation module includes: a color layer construction submodule, which is used to construct a layer of the ID photo image according to the color semantic information to obtain a color layer; a gradation layer construction submodule, which is used to construct a layer of the ID photo image according to the gradation semantic information to obtain a gradation layer; wherein, the color layer includes a color channel, the color channel includes a brightness channel, a first color component channel and a second color component channel, and the color channels are independent of each other; the gradation layer includes a hue area, the hue area includes a dark area, a midtone area and a highlight area, and the hue areas are independent of each other.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; The processor is configured to implement the steps of the method for optimizing skin color for a license based on image perception according to any one of claims 1 to 6 when executing a program stored in the memory.

Citation Information

Patent Citations

  • Image processing method and device, equipment a and storage medium

    CN111127476A