Digital human image correction method, electronic equipment and storage medium

Through the digital human image processing method of multimodal feature analysis and adaptive correction strategy, the limitations of digital human image acquisition equipment, lighting sensitivity and insufficient algorithm processing capabilities are solved, and the digital human image quality improvement of high fidelity and reality is achieved, adapting to a variety of lighting conditions and scenes, and meeting the needs of film and television rendering and real-time interaction.

CN120355627APending Publication Date: 2025-07-22国家电网有限公司客户服务中心
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510353886.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The prior art has limitations in digital human image processing, lighting sensitivity, insufficient algorithm processing capabilities, and contradictions between real-time and generalization in digital human image processing, making it difficult to achieve high fidelity and realism in digital human image quality improvement.

Method used

The multimodal feature analysis and adaptive correction methods generated by image preprocessing, feature extraction, bias analysis and correction strategies are used to combine deep learning and traditional algorithms, and through spatial domain filtering, affine transformation, deep learning models and weighted fusion algorithms, the geometric deformation, color and texture of digital human images are optimized to build an adaptive correction strategy.

Benefits of technology

It has achieved the improvement of high fidelity and reality of digital human images, adapted to a variety of lighting conditions and scenes, met the needs of film and television rendering and real-time interaction, and improved the image quality by more than 20%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355627A_ABST
    Figure CN120355627A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing and computer vision, in particular to a digital human image correction method, electronic equipment and a storage medium. The digital human image correction method comprises the following steps: preprocessing an image; extracting features; deviation analysis; generating a correction strategy; and correcting the image. According to the invention, image correction is realized by using an image processing library, a deep learning framework and the like through related software modules, so that the digital human image quality is improved, and the sense of reality and the visual effect are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of image processing and computer vision, and particularly relates to a digital human image correction method, an electronic device, and a storage medium. Background Art

[0002] With the rapid development of fields such as virtual reality, film and television production, and the metaverse, digital human technology has become the core carrier of human-computer interaction and digital content creation. As the basis for its visual presentation, digital human images need to have high fidelity and realism. However, the existing technologies face the following bottlenecks in practical applications:

[0003] Limitations of acquisition devices; restricted by hardware such as camera resolution and dynamic range, problems such as noise interference and motion blur are likely to occur in low-light or moving scenes, resulting in the loss of facial details, such as pores and eyelashes.

[0004] Sensitivity to lighting conditions; traditional algorithms have poor adaptability to complex lighting such as side light and backlight, and are prone to phenomena such as uneven skin color and shadow distortion. For example, in a backlight environment, the face of a digital human is prone to overexposure or loss of dark part details.

[0005] Insufficient algorithm processing capabilities; existing methods mostly rely on a single technical route such as rule-based image enhancement, and it is difficult to balance geometric deformation correction and color restoration. For example, traditional filtering algorithms will blur the facial features when denoising, and threshold-based color correction cannot solve local color deviation problems.

[0006] Contradiction between real-time performance and generalization; although methods based on deep learning such as GAN networks can generate high-quality images, they have a large number of model parameters and high computational costs, making it difficult to achieve real-time processing on mobile devices, and their generalization ability for unknown scenes is limited.

[0007] Current mainstream solutions mostly focus on single problems, such as only optimizing denoising or color balance, and lack the ability to synergistically correct multi-dimensional defects such as geometric deviation, texture loss, and color distortion in digital human images. Therefore, there is an urgent need for a technical solution that integrates multi-modal feature analysis and adaptive correction strategies to systematically improve the quality of digital human images and meet the requirements of scenarios such as film-level rendering and real-time interaction. Summary of the Invention

[0008] The present invention proposes a digital human image correction method, an electronic device, and a storage medium implemented by using an image processing library, a deep learning framework, etc., to improve the quality of digital human images, enhance the sense of reality and visual effects. The specific technical solutions are as follows:

[0009] A digital human image correction method includes the following processes:

[0010] S100: Image preprocessing;

[0011] S200: Feature extraction;

[0012] S300: Deviation analysis;

[0013] S400: Correction strategy generation;

[0014] S500: Image correction.

[0015] Preferably, the S100 includes the following process:

[0016] S110: Eliminate image noise through spatial domain filtering algorithms; Use Gaussian filtering and median filtering as the core methods. For the collected digital human images, first use a 5×5 Gaussian kernel for smoothing to remove the noise caused by uneven illumination while retaining the outlines of the facial features; For images with obvious isolated noise points, use a 3×3 median filtering window to replace pixel values to ensure the coherence of skin texture;

[0017] S120: Convert the RGB color image to a single-channel grayscale image to simplify calculations; Preferably use the weighted average method, formula: grayscale value = 0.30R + 0.59G + 0.11B;

[0018] S130: Adjust image deformation through affine transformation and perspective transformation; The specific process is as follows: First, use the MTCNN model to detect 68 key points on the digital human face, calculate the offset from the standard template, and then align through the affine transformation matrix, including translation, rotation, and scaling parameters;

[0019] S140: Use the adaptive threshold method to segment the target area; For the problem of illumination differences in digital human images, use the adaptiveThreshold function in OpenCV to dynamically calculate the threshold with an 11×11 pixel local window to effectively separate the facial area from the complex background;

[0020] S150: Strengthen edge features based on the Laplacian operator; Apply the convolution kernel [0]()[1]()[0](),[-1,5,-1],[0,-1,0]] through the filter2D function to enhance the facial feature outlines and texture details of the digital human;

[0021] S160: Combine deep learning models with connected component analysis; First, use SSDFace to detect the face bounding box, and then segment independent feature areas such as pupils and lips through the region growing algorithm, and record their coordinate and size parameters.

[0022] Preferably, the S200 includes the following process:

[0023] S210: Feature classification and target setting;

[0024] The underlying features include: edges, corner points, and basic texture information;

[0025] The high-level semantic features include: extracting semantic-level feature representations based on deep learning to characterize the overall shape and details of the digital human;

[0026] S220: Locate the object boundary through pixel gradient changes; specifically including the following steps:

[0027] S221: Perform Gaussian smoothing on the preprocessed grayscale image to eliminate noise interference;

[0028] S222: Use the Sobel operator to calculate the horizontal Gx and vertical Gy direction gradients respectively, and synthesize the gradient magnitude map;

[0029] S223: Refine the edge along the gradient direction and only retain the local maximum points;

[0030] S224: Set high and low thresholds, connect strong edges and eliminate weak responses;

[0031] S230: Texture analysis; specifically including the following steps:

[0032] S231: Divide the digital human image into multiple local regions;

[0033] S232: Calculate the local binary pattern LBP for each block to generate a texture encoding map;

[0034] S233: Statistically analyze the occurrence frequencies of different LBP patterns to generate a texture feature vector;

[0035] S240: Deep learning feature extraction based on the convolutional neural network CNN; using the lightweight MobileNetV3 or the high-precision VGG19 network; specifically including the following steps:

[0036] S241: Normalize the grayscale image to a resolution of 224×224 and standardize it to the range of [0,1];

[0037] S242: Extract edges / textures through the convolutional layer, reduce the dimension through the pooling layer, and the residual block learns complex patterns to gradually abstract features;

[0038] S243: Intercept the feature map output by the 5th residual block and flatten it into a feature vector.

[0039] S250: Use the HRNet model to locate 68 facial key points; specifically including the following steps:

[0040] S251: Input the preprocessed RGB image into the model;

[0041] S252: Process different-scale feature maps in parallel to maintain high-precision positioning;

[0042] S253: Output the coordinates of key points such as the pupil center, the tip of the nose, and the corners of the mouth, with an error < 2 pixels;

[0043] S260: Feature optimization and dimensionality reduction; specifically including the following steps:

[0044] S261: Concatenate the 50-dimensional edge histogram with the 512-dimensional CNN feature vector to form a 562-dimensional multi-modal feature;

[0045] S262: Calculate the covariance matrix, select the first 150 principal components, and retain 95% of the variance;

[0046] S263: Project the high-dimensional features onto a 2D space through t-SNE to observe class separability;

[0047] Preferably, the S300 includes the following process:

[0048] S310: Establish a standard feature database of digital human images as a comparison benchmark; by collecting high-quality, distortion-free digital human samples, use the pre-trained ResNet-50 model to extract facial geometric structures, color histograms, and texture features;

[0049] S320: Align the input image and the standard features spatially and numerically; use Procrustes analysis to eliminate scale and rotation differences caused by the shooting angle, and align the input feature point set to the standard template coordinate system through translation, scaling, and rotation transformations; at the same time, perform gamma correction on the color features, Gamma = 2.2, to unify the lighting conditions and ensure that the comparison results are not affected by the environment;

[0050] S330: Calculate the position offset of the facial key points; use the Euclidean distance formula to measure the difference between the input features and the standard template point by point; the formula is as follows:

[0051]

[0052] For the overall facial structure, additionally calculate the symmetry index and the proportional parameter;

[0053] S340: Evaluate color balance and texture consistency through a statistical model; specifically including: extracting the LAB color space histogram of the input image, performing Earth Mover's Distance calculation with the histogram under the corresponding lighting conditions in the standard library to quantify the color deviation degree; comparing the gray-level co-occurrence matrix GLCM features of the input image and the standard template, and judging whether the skin texture is distorted through the cosine similarity;

[0054] S350: Use a weighted fusion algorithm to generate a comprehensive deviation score; dynamically allocate weights according to the correction target, through the following formula:

[0055] Total deviation score = Σ (individual deviation value × weight),

[0056] Sort the detected deviations by severity, and prioritize the high-score items to avoid minor corrections from affecting the overall efficiency.

[0057] Preferably, the S400 includes the following process:

[0058] S410: Deviation classification and priority ranking; specifically including the following steps:

[0059] Classify the problem through a decision tree or clustering algorithm based on the feature difference data output by the deviation analysis module;

[0060] Divide the deviation into geometric deformation, color anomaly, and texture distortion categories, and determine the repair priority according to the preset weight;

[0061] S420: Based on the classification results, generate correction parameters by combining a rule engine and a regression model;

[0062] Rule-driven: For clear problems, directly call the affine transformation parameters in the preset rule library for correction;

[0063] Data-driven: For complex problems, use the XGBoost regression model, input the deviation feature vector, and output the best Gamma value and contrast adjustment parameter; the model needs to be trained on the labeled dataset to ensure the reliability of the strategy;

[0064] Geometric deviation: Key point coordinate offset, Euclidean distance calculation:

[0065]

[0066] Color deviation: LAB color space histogram difference, Chi-square distance:

[0067]

[0068] Texture deviation: Gray-level co-occurrence matrix GLCM contrast difference:

[0069]

[0070] XGBoost regression modeling:

[0071] w i : Sample weight, dynamically adjusted according to the quality of the labeled data;

[0072] λ: L2 regularization coefficient, default set to 1.0;

[0073] ω: Model parameter vector

[0074] Tree structure optimization:

[0075] Training parameter configuration: 5-fold cross-validation is adopted, and early stopping is used to prevent overfitting, patience = 10;

[0076] S430: Balance the conflicts of different correction objectives through a multi-objective optimization algorithm;

[0077] S440: Introduce a reinforcement learning framework to achieve dynamic optimization of the strategy;

[0078] State definition: The current image quality index and environmental parameters are used as state variables;

[0079] Action space: Set the parameter adjustment range;

[0080] Reward function: The user score and objective metrics are used as feedback signals;

[0081] Policy update: Continuously optimize the policy generation model through the PPO algorithm, for example, automatically reduce the model complexity in the low-computation-power scenario of mobile devices;

[0082] S450: Construct an adversarial generative network GAN to verify the correction effect; Input the corrected image into the discriminant network. If it is determined as "non-real image", trigger the rollback mechanism; at the same time, set a safety threshold to prevent image collapse caused by excessive correction.

[0083] Preferably, the S500 includes the following process:

[0084] S510: Geometric correction; Adjust the image shape deviation through the affine transformation matrix, and the formula is as follows:

[0085]

[0086] Among them, (x, y) is the original coordinate, (x', y') is the corrected coordinate, a, b, c, d control the rotation and scaling control parameters, t x , t y is the translation parameter;

[0087] S520: Color correction; Specifically, it includes the following process:

[0088] S521: Histogram equalization, perform non-linear stretching on the luminance channel, and the formula is as follows:

[0089]

[0090] Among them, r k is the input gray level, n j is the corresponding number of pixels, N is the total number of pixels, s k is the output gray level;

[0091] S522: Color temperature adjustment. By converting from the RGB to the Lab color space, the white balance parameters are adjusted. The formula is:

[0092] L’ = L, a’ = a + △a, b’ = b + △b,

[0093] where △a and △b are determined by the preset standard skin color temperature;

[0094] S523: Texture enhancement; The Retinex algorithm is used to optimize the lighting consistency. The formula is as follows:

[0095] I(x, y) = R(x, y)·L(x, y),

[0096] where I is the observed image, R is the reflection component, and L is the lighting component; After separating L through multi-scale Gaussian filtering with σ = 15, 80, 200, contrast stretching is performed on R to enhance the digital human skin texture details;

[0097] S524: Detail repair; Based on super-resolution reconstruction SRCNN, the missing details are restored. The loss function is:

[0098]

[0099] where y i is the low-resolution image patch, x i is the corresponding high-resolution patch, F(·) is a three-layer convolutional network, which takes the low-quality digital human image as input and outputs the repaired high-definition image with a 4-fold resolution improvement;

[0100] S525: Global optimization; The weighted least squares method WLS is used for edge-preserving smoothing. The energy function:

[0101]

[0102] where g is the input image and u is the optimization result, Controlling the smoothing intensity; This step can eliminate the local artifacts introduced by the correction and maintain the sharpness of the facial features edges.

[0103] The present invention is a technical solution that combines multi-modal feature analysis and an adaptive correction strategy to systematically improve the quality of digital human images and meet the requirements of scenarios such as film-level rendering and real-time interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0104] Figure 1 is a schematic flowchart of a method for correcting digital human images according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0105] A method for correcting digital human images includes the following processes:

[0106] S100: Image preprocessing; specifically including the following processes:

[0107] S110: Eliminate image noise through spatial domain filtering algorithms; use Gaussian filtering and median filtering as the core methods, that is, smooth high-frequency noise and eliminate salt-and-pepper noise. For the collected digital human images, preferentially use a 5×5 Gaussian kernel for smoothing processing to remove the noise caused by uneven illumination while retaining the facial features; for images with obvious isolated noise points, use a 3×3 median filtering window to replace pixel values to ensure the coherence of skin texture;

[0108] S120: Convert the RGB color image to a single-channel grayscale image to simplify calculations; preferably use the weighted average method, formula: grayscale value = 0.30R + 0.59G + 0.11B; this algorithm conforms to the physiological characteristics of the human eye being sensitive to green and can retain the facial details of the digital human to the greatest extent; for example, for digital human images with high contrast, it can avoid the overexposure problem caused by the maximum value method and better retain fine features such as hair and eyelashes than the average value method;

[0109] S130: Adjust image deformation through affine transformation and perspective transformation; the specific process is as follows: first use the MTCNN model to detect 68 key points on the digital human face, calculate the offset from the standard template, and then align through the affine transformation matrix, including translation, rotation, and scaling parameters; for example, for a digital human image of a side face, perspective transformation needs to be combined to correct the facial proportion distortion caused by the shooting angle;

[0110] S140: Use the adaptive threshold method to segment the target area; for the problem of illumination difference in digital human images, use the adaptiveThreshold function of OpenCV to dynamically calculate the threshold with an 11×11 pixel local window to effectively separate the facial area from the complex background; for example, in a low-light scene, this method can avoid the problem of misjudging shadows as the background by the global threshold method;

[0111] S150: Strengthen edge features based on the Laplace operator; apply the convolution kernel [[0]()[1]()[0](),[-1,5,-1],[0,-1,0]] through the filter2D function to enhance the facial features and texture details of the digital human; for example, for a blurred eye image, after sharpening, the iris pattern can be made clearer, improving the accuracy of subsequent feature extraction;

[0112] S160: Combine deep learning models with connected component analysis; first use SSDFace to detect the face bounding box, and then use the region growing algorithm to segment independent feature regions such as pupils and lips, and record their coordinate and size parameters; for example, for a semi-occluded digital human image, this step can accurately locate the visible facial area and avoid processing invalid data;

[0113] S200: Feature extraction; specifically including the following processes:

[0114] S210: Feature classification and target setting; before feature extraction, it is necessary to clarify the target feature type and application scenario.

[0115] Underlying features include: edges, corner points, and basic texture information; for example, the contour line of the digital human face is extracted through the Canny algorithm, or the roughness and directionality of skin texture are analyzed using the Gray-Level Co-Occurrence Matrix (GLCM). Such features have high calculation efficiency and are suitable for quick correction, such as preliminary geometric adjustment, but have limited processing ability for complex deformations such as expression distortion.

[0116] High-level semantic features include: semantic-level features extracted based on deep learning to represent the overall shape and details of the digital human, such as the positions of facial features and expression states. For example, a pre-trained ResNet-50 model is used to extract a 1024-dimensional feature vector before the fully connected layer. Such features can capture abstract semantic information and support refined corrections such as expression naturalization and skin color homogenization.

[0117] S220: Locate the object boundary through pixel gradient changes; specifically including the following steps:

[0118] S221: Perform Gaussian smoothing on the preprocessed grayscale image with a kernel size of 5×5 to eliminate noise interference.

[0119] S222: Use the Sobel operator to calculate the horizontal Gx and vertical Gy direction gradients respectively and synthesize the gradient magnitude map.

[0120] S223: Refine the edge along the gradient direction and only retain the local maximum points.

[0121] S224: Set high and low thresholds, such as 100 / 200, connect strong edges and eliminate weak responses.

[0122] S230: Texture analysis; specifically including the following steps:

[0123] S231: Divide the digital human image into multiple local regions, such as 16×16 pixels.

[0124] S232: Calculate the Local Binary Pattern (LBP) for each block to generate a texture coding map.

[0125] S233: Statistically analyze the occurrence frequencies of different LBP patterns to generate a texture feature vector.

[0126] S240: Deep learning feature extraction based on the Convolutional Neural Network (CNN); using lightweight MobileNetV3 or high-precision VGG19 network; specifically including the following steps:

[0127] S241: Normalize the grayscale image to 224×224 resolution and standardize it to the range of [0,1];

[0128] S242: Extract edges / textures through convolutional layers, reduce dimensions through pooling layers, and gradually abstract features by learning complex patterns through residual blocks;

[0129] S243: intercept the feature map output by the fifth residual block, with a size of 7×7×512, and flatten it into a feature vector;

[0130] S250: Use the HRNet model to locate 68 facial key points; specifically includes the following steps:

[0131] S251: preprocessed RGB image, 256×256 resolution, input to the model;

[0132] S252: Parallel processing of feature maps of different scales to maintain high-precision positioning;

[0133] S253: Output the coordinates of key points such as pupil center, nose tip, and mouth corners, with an error of <2 pixels;

[0134] S260: Feature optimization and dimensionality reduction; specifically includes the following steps:

[0135] S261: Concatenate the 50-dimensional edge histogram with the 512-dimensional CNN feature vector to form a 562-dimensional multimodal feature; improve the robustness of the correction strategy;

[0136] S262: Calculate the covariance matrix, select the first 150 principal components, and retain 95% of the variance;

[0137] S263: Project high-dimensional features into 2D space through t-SNE to observe category separability; this can reduce computational redundancy and speed up the operation efficiency of subsequent deviation analysis modules;

[0138] S300: Deviation analysis; specifically includes the following processes:

[0139] S310: Establish a standard feature database of digital human images as a comparison benchmark; collect high-quality, distortion-free digital human samples, such as benchmark images generated by 3D modeling or collected by professional equipment, and use the pre-trained ResNet-50 model to extract the following features:

[0140] Facial geometry, such as the coordinates of 68 key points; color histogram, RGB three-channel distribution; texture features, such as LBP encoding; for example, the "eye distance" parameter stored in the standard library is the average distance between the pupil centers of the two eyes under the frontal perspective, about 60-70 pixels, which is used for subsequent comparison;

[0141] S320: Align the input image and the standard features both spatially and numerically; use Procrustes analysis to eliminate scale and rotation differences caused by shooting angles, and align the input feature point set to the standard template coordinate system through translation, scaling, and rotation transformations; meanwhile, perform gamma correction on the color features with Gamma = 2.2 to unify the lighting conditions and ensure that the comparison results are not interfered by the environment;

[0142] S330: Calculate the position offset of the facial key points; use the Euclidean distance formula to measure the differences between the input features and the standard template point by point; the formula is as follows:

[0143]

[0144] For the overall facial structure, additionally calculate symmetry indicators and ratio parameters, such as the ratio of the distances from the left and right eyes to the tip of the nose, and the facial width-to-height ratio; for example, if the distance from the left eye to the tip of the nose is 15% longer than that of the right eye, it is determined that there is a facial asymmetry problem;

[0145] S340: Evaluate color balance and texture consistency through a statistical model; specifically include: extract the LAB color space histogram of the input image, perform Earth Mover's Distance calculation with the histogram under the corresponding lighting conditions in the standard library to quantify the color deviation degree; compare the gray-level co-occurrence matrix (GLCM) features of the input image and the standard template, such as contrast and energy value, and judge whether the skin texture is distorted through cosine similarity; for example, if the GLCM energy value of the input image is 20% lower than the standard value, it is determined that there is blur or detail loss;

[0146] S350: Use a weighted fusion algorithm to generate a comprehensive deviation score; dynamically allocate weights according to the correction target, such as 60% for geometric deviation, 30% for color, and 10% for texture, through the following formula:

[0147] Total deviation score = Σ (single deviation value × weight),

[0148] Sort the detected deviations according to the severity, and give priority to processing high-score items, such as serious geometric errors with a pupil position offset > 5 pixels, to avoid minor corrections affecting the overall efficiency.

[0149] Key points of technical implementation: Tool framework: Use OpenCV for geometric transformation, Scikit-learn to calculate similarity indicators, and PyTorch to implement feature extraction; Optimization strategy: Adopt GPU-accelerated matrix operations, such as batch calculation of Euclidean distance accelerated by CUDA, to improve the processing speed, and enable distributed computing for large-scale data; Dynamic update: Regularly feedback the image features that meet the quality standards after correction to the standard library to enhance the adaptability of the model to different ethnic groups and makeup.

[0150] S400: Correction Strategy Generation; specifically including the following processes:

[0151] S410: Deviation Classification and Priority Ranking; specifically including the following steps:

[0152] Based on the feature difference data output by the deviation analysis module, such as Euclidean distance and cosine similarity, classify the problems through decision trees or clustering algorithms;

[0153] Divide the deviations into categories of geometric deformation, color anomaly, and texture distortion, such as facial contour offset, yellowish skin color, and blurred skin, and determine the repair priorities according to the preset weights, such as a geometric deviation weight of 0.6 and a color weight of 0.3; in engineering practice, if both serious misalignment of facial features and slight color deviation are detected, a geometric correction strategy should be generated preferentially;

[0154] S420: Based on the classification results, generate correction parameters by combining a rule engine and a regression model;

[0155] Rule-driven: For clear problems, such as a 5% offset in the position of the left eye, directly call the affine transformation parameters in the preset rule library for correction; for example, if the pupil distance is detected to be less than the standard value, generate a horizontal stretching coefficient proportionally;

[0156] Data-driven: For complex problems, use the XGBoost regression model, input the deviation feature vector, and output the best Gamma value and contrast adjustment amount parameters; the model needs to be trained on the labeled dataset to ensure the reliability of the strategy;

[0157] Geometric deviation: Offset amount of key point coordinates, Euclidean distance calculation:

[0158]

[0159] Color deviation: Difference in LAB color space histogram, Chi-square distance:

[0160]

[0161] Texture deviation: Contrast difference of gray-level co-occurrence matrix GLCM:

[0162]

[0163] XGBoost regression modeling:

[0164] w i : Sample weight, dynamically adjusted according to the quality of the labeled data;

[0165] λ: L2 regularization coefficient, default set to 1.0;

[0166] ω: Model parameter vector

[0167] Tree structure optimization:

[0168] Training parameter configuration: 5-fold cross-validation is adopted, and early stopping method is used to prevent overfitting, patience = 10;

[0169] S430: Balance the conflicts of different correction objectives through a multi-objective optimization algorithm, such as NSGA-II; for example, when adjusting the sharpness parameter, it is necessary to consider both detail enhancement and noise suppression at the same time, construct a loss function including edge sharpness, PSNR index, and SSIM similarity, and iteratively find the Pareto optimal solution. In practical applications, this step can improve the skin texture repair effect by more than 20%, while controlling the increase in noise within 5%;

[0170] S440: Introduce a reinforcement learning framework to achieve dynamic optimization of strategies;

[0171] State definition: Use the current image quality index such as FID score and environmental parameters such as device computing power as state variables;

[0172] Action space: Set the parameter adjustment range, such as color saturation adjustment ±30%;

[0173] Reward function: Use user ratings and objective indicators such as LPIPS visual similarity as feedback signals;

[0174] Policy update: Continuously optimize the policy generation model through the PPO algorithm, for example, automatically reduce the model complexity in the low-computing-power scenario of mobile devices;

[0175] S450: Construct an adversarial generative network GAN to verify the correction effect; input the corrected image into the discriminant network, if it is determined as "non-real image", then trigger the rollback mechanism; for example, when color adjustment causes color level breaks, automatically switch to the histogram matching algorithm to regenerate the strategy; at the same time, set a safety threshold, such as the single-parameter adjustment amplitude does not exceed 40%, to prevent image collapse caused by excessive correction;

[0176] S500: Image correction; specifically includes the following process:

[0177] S510: Geometric correction; adjust the image shape deviation through an affine transformation matrix, and the formula is as follows:

[0178]

[0179] Among them, (x, y) is the original coordinate, (x', y') is the corrected coordinate, and a, b, c, d control the rotation and scaling control parameters, t x t yis the translation parameter; for example, when the detected tilt angle θ of the digital human face is detected, set a = cosθ, b = -sinθ, c = sinθ, d = cosθ, and fit the target shape by the least squares method;

[0180] S520: Color correction;

[0181] Histogram equalization: Perform non-linear stretching on the luminance channel, and the formula is as follows:

[0182]

[0183] where r k is the input gray level, n j is the corresponding number of pixels, N is the total number of pixels, and s k is the output gray level;

[0184] Color temperature adjustment: Adjust the white balance parameters by converting from RGB to the Lab color space. The formula is:

[0185] L’ = L, a’ = a + △a, b’ = b + △b,

[0186] where △a and △b are determined by the preset standard skin color temperature;

[0187] Texture enhancement: Use the Retinex algorithm to optimize the lighting consistency. The formula is as follows:

[0188] I(x, y) = R(x, y)·L(x, y),

[0189] where I is the observed image, R is the reflection component, and L is the lighting component; after separating L by multi-scale Gaussian filtering with σ = 15, 80, 200, perform contrast stretching on R to enhance the digital human skin texture details;

[0190] Detail repair: Restore the missing details based on the super-resolution reconstruction SRCNN. The loss function is:

[0191]

[0192] where y i is the low-resolution image patch, x i is the corresponding high-resolution patch, and F(·) is a three-layer convolutional network. Input a low-quality digital human image and output a repaired high-definition image with a 4-fold resolution improvement;

[0193] Global optimization: Use the weighted least squares method WLS for edge-preserving smoothing. The energy function:

[0194] E(u) = ∑ p ((u p - g p )2 +λ∑ q∈N(p) w pq (u p -u q ) 2 ),

[0195] where g is the input image and u is the optimized result, controlling the smoothing intensity. This step can eliminate local artifacts introduced by the correction and maintain the sharpness of the edges of facial features.

[0196] The parameters of the electronic device implementing the above method are as follows:

[0197] Hardware architecture selection: Based on the computing requirements, select a high-performance processor and a dedicated image processing chip, such as the NVIDIA Jetson AGX Orin edge computing module, such as the Huawei Ascend NPU, with DDR4 memory, ≥16GB; a high-speed solid-state drive, ≥1TB; to ensure efficient processing of digital human images. The device needs to support multi-threaded parallel computing to meet the real-time requirements of deep learning model inference.

[0198] Modular function integration: The image processing module is connected to the GPU / NPU acceleration card through the PCIe interface and is used to execute computationally intensive tasks such as preprocessing and feature extraction; the data storage module adopts a hierarchical storage architecture, with the SSD caching real-time image data and the HDD storing historical correction records; the communication module integrates Gigabit Ethernet, Wi-Fi 6, and USB 3.2 interfaces to support low-latency data interaction with cameras and cloud servers.

[0199] Software system deployment: Deploy the image correction algorithm stack on the Linux operating system, including: a preprocessing library based on OpenCV; a deep learning inference engine of the PyTorch framework; a self-developed deviation analysis and correction strategy generation service. Through Docker containerization encapsulation, cross-hardware platform rapid deployment is achieved.

[0200] Real-time optimization design: Split steps such as preprocessing, feature extraction, and correction into independent threads, and achieve zero-copy data transfer through shared memory; use CUDA or OpenCL to accelerate image convolution and matrix operations on the GPU, so that the single-frame processing time ≤50ms, 1080p resolution.

[0201] Local storage: Adopt an industrial-grade SSD, support wide-temperature operation from -40°C to 85°C, and is suitable for embedded devices.

[0202] Removable media: Design a flash card compatible with the UFS 3.1 standard, provide a capacity of ≥512GB, and support hot plugging and encrypted reading and writing.

[0203] Cloud Storage: Integrate AWS S3 or Alibaba Cloud OSS interfaces to achieve distributed storage and version management of the corrected images.

[0204] Firmware Flashing: Write the image correction algorithm program into the NOR Flash chip through the JTAG interface to ensure data persistence during power-off. OTA Upgrade: Design a differential upgrade mechanism to only transfer the incremental package of the algorithm model, reducing bandwidth consumption.

[0205] Encrypted Storage: Use the AES-256 algorithm to encrypt the original images and correction parameters, and store the key in an independent security chip, such as the TPM 2.0 module.

[0206] Access Control: Based on the RBAC model, restrict the read and write permissions of different users to the storage medium, and log operation behaviors.

[0207] Cache Design: Allocate a 128MB dedicated cache area in DRAM, and use the LRU algorithm to manage frequently accessed data, increasing the feature comparison speed by 3-5 times.

Claims

1. A method for correcting digital human images, characterized in that, It includes the following processes: S100: Image preprocessing; S200: Feature extraction; S300: Deviation analysis; S400: Correction strategy generation; S500: Image correction.

2. The digital human image correction method according to claim 1, wherein, S100 includes the following processes: S110: Eliminate image noise through spatial domain filtering algorithms; Use Gaussian filtering (smoothing high-frequency noise) and median filtering (eliminating salt-and-pepper noise) as the core methods. For the collected digital human images, first use a 5×5 Gaussian kernel for smoothing processing to remove the noise caused by uneven illumination while retaining the outlines of the facial features; For images with obvious isolated noise points, use a 3×3 median filtering window to replace the pixel values to ensure the coherence of the skin texture; S120: Convert the RGB color image to a single-channel grayscale image to simplify the calculation; Preferably use the weighted average method (formula: grayscale value = 0.30R + 0.59G + 0.11B); S130: Adjust the image deformation through affine transformation and perspective transformation; The specific process is as follows: First, use the MTCNN model to detect 68 key points on the digital human face, calculate the offset between them and the standard template, and then align them through the affine transformation matrix, including translation, rotation, and scaling parameters; S140: Use the adaptive threshold method to segment the target area; For the problem of illumination difference in digital human images, use the adaptiveThreshold function in OpenCV to dynamically calculate the threshold with an 11×11 pixel local window to effectively separate the facial area from the complex background; S150: Strengthen the edge features based on the Laplace operator; Apply the convolution kernel [[0]()[1]()[0](),[-1,5,-1],[0,-1,0]] through the filter2D function to enhance the outlines and texture details of the digital human facial features; S160: Combine the deep learning model with connected component analysis; First, use the SSD Face to detect the face bounding box, and then segment the independent feature areas, such as pupils and lips, through the region growing algorithm, and record their coordinate and size parameters.

3. The digital human image correction method according to claim 1, characterized in that S200 includes the following processes: S210: Feature classification and target setting; The underlying features include: edges, corners, and basic texture information; The high-level semantic features include: extracting semantic-level features based on deep learning to represent the overall shape and details of the digital human; S220: Locate the object boundary through pixel gradient changes; Specifically, it includes the following steps: S221: Perform Gaussian smoothing on the preprocessed grayscale image to eliminate noise interference; S222: Use the Sobel operator to calculate the horizontal (Gx) and vertical (Gy) direction gradients respectively, and synthesize the gradient magnitude map; S223: Refine the edge along the gradient direction and only retain the local maximum points; S224: Set high and low thresholds, connect the strong edges and eliminate the weak responses; S230: Texture analysis; Specifically, it includes the following steps: S231: Divide the digital human image into multiple local areas; S232: Calculate the local binary pattern (LBP) for each block to generate a texture coding map; S233: Count the occurrence frequencies of different LBP patterns to generate a texture feature vector; S240: Deep learning feature extraction based on Convolutional Neural Network (CNN); using lightweight MobileNetV3 or high-precision VGG19 network; specifically including the following steps: S241: Normalize the grayscale image to a resolution of 224×224 and standardize it to the range [0,1]; S242: Extract edges / textures through the convolutional layer, reduce the dimension through the pooling layer, and the residual block learns complex patterns to gradually abstract features; S243: Intercept the feature map output by the 5th residual block and flatten it into a feature vector; S250: Use the HRNet model to locate 68 facial key points; specifically including the following steps: S251: Input the preprocessed RGB image into the model; S252: Process feature maps of different scales in parallel to maintain high-precision positioning; S253: Output the key point coordinates of the pupil center, nose tip, and mouth corners, with an error < 2 pixels; S260: Feature optimization and dimensionality reduction; specifically including the following steps: S261: Concatenate the 50-dimensional edge histogram with the 512-dimensional CNN feature vector to form a 562-dimensional multi-modal feature; S262: Calculate the covariance matrix, select the first 150 principal components, and retain 95% of the variance; S263: Project the high-dimensional features into a 2D space through t-SNE to observe class separability.

4. The digital human image correction method according to claim 1, characterized in that S300 includes the following process: S310: Establish a standard feature database of digital human images as a comparison benchmark; by collecting high-quality, distortion-free digital human samples, use the pre-trained ResNet-50 model to extract facial geometric structures, color histograms, and texture features; S320: Align the input image and the standard features spatially and numerically; Use Procrustes analysis to eliminate scale and rotation differences caused by the shooting angle, and align the input feature point set to the standard template coordinate system through translation, scaling, and rotation transformations; at the same time, perform gamma correction (Gamma = 2.2) on the color features to unify the lighting conditions and ensure that the comparison results are not affected by the environment; S330: Calculate the position offset of the facial key points; use the Euclidean distance formula to measure the difference between the input features and the standard template point by point; the formula is as follows: For the overall facial structure, additionally calculate the symmetry index and proportional parameters; S340: Evaluate color balance and texture consistency through a statistical model; specifically including: extract the LAB color space histogram of the input image, calculate the Earth Mover's Distance (EMD) with the histogram under the corresponding lighting conditions in the standard library to quantify the degree of color deviation; compare the gray-level co-occurrence matrix (GLCM) features of the input image and the standard template, and judge whether the skin texture is distorted through the cosine similarity; S350: Use a weighted fusion algorithm to generate a comprehensive deviation score; dynamically allocate weights according to the correction target, through the following formula: Total deviation score = Σ (single deviation value × weight), Sort the detected deviations according to the severity, and give priority to processing high-score items to avoid minor corrections affecting the overall efficiency.

5. The digital human image correction method according to claim 1, characterized in that S400 includes the following process: S410: Deviation classification and priority ranking; specifically including the following steps: Classify the problem through a decision tree or clustering algorithm based on the feature difference data output by the deviation analysis module; Divide the deviation into geometric deformation, color anomaly, and texture distortion categories, and determine the repair priority according to the preset weights; S420: Based on the classification results, generate correction parameters by combining a rule engine and a regression model; Rule-driven: For clear problems, directly call the affine transformation parameters in the preset rule library for correction; Data-driven: For complex problems, use the XGBoost regression model, input the deviation feature vector, and output the best Gamma value and contrast adjustment amount parameters; The model needs to be trained on the labeled dataset to ensure the reliability of the strategy; Geometric deviation: Key point coordinate offset (calculated by Euclidean distance): Color deviation: LAB color space histogram difference (chi-square distance): Texture deviation: Gray-level co-occurrence matrix (GLCM) contrast difference: XGBoost Regression Modeling: w i : Sample weight, dynamically adjusted according to the quality of labeled data; λ: L2 regularization coefficient, default set to 1.0; ω: Model parameter vector Tree structure optimization: Training parameter configuration: Adopt 5-fold cross-validation, and the early stopping method (patience = 10) to prevent overfitting; S430: Balance the conflicts of different correction objectives through a multi-objective optimization algorithm; S440: Introduce a reinforcement learning framework to achieve dynamic optimization of the strategy; State definition: Use the current image quality index and environmental parameters as state variables; Action space: Set the parameter adjustment range; Reward function: Use the user score and objective metrics as feedback signals; Policy update: Continuously optimize the policy generation model through the PPO algorithm, for example, automatically reduce the model complexity in the low-computing-power scenario of the mobile terminal; S450: Construct an adversarial generative network (GAN) to verify the correction effect; Input the corrected image into the discriminant network, if it is determined as a "non-real image", trigger the rollback mechanism; At the same time, set a safety threshold to prevent image collapse caused by overcorrection.

6. The digital human image correction method according to claim 1, wherein S500 includes the following processes: S510: Geometric correction; Adjust the image shape deviation through the affine transformation matrix, and the formula is as follows: Among them, (x, y) are the original coordinates, (x', y') are the corrected coordinates, a, b, c, d are the control parameters for rotation and scaling, and t x , t y is the translation parameter; S520: Color correction; Specifically include the following processes: S521: Histogram equalization, perform non-linear stretching on the luminance channel, and the formula is as follows: where r k is the input gray level, n j is the corresponding number of pixels, N is the total number of pixels, and s k is the output gray level; S522: Color temperature adjustment, adjust the white balance parameters by converting from RGB to the Lab color space, and the formula: L’ = L, a’ = a + △a, b’ = b + △b, where, △a and △b are determined by the preset standard skin color temperature; S523: Texture enhancement; Use the Retinex algorithm to optimize the lighting consistency, and the formula is as follows: I(x, y) = R(x, y)·L(x, y), where, I is the observed image, R is the reflection component (texture), and L is the lighting component; After separating L through multi-scale Gaussian filtering (σ = 15, 80, 200), perform contrast stretching on R to enhance the digital human skin texture details; S524: Detail repair; Based on super-resolution reconstruction (SRCNN) to restore the missing details, and the loss function is: Among them, y i is a low-resolution image patch, and x i is the corresponding high-resolution patch. F(·) is a three-layer convolutional network that takes a low-quality digital human image as input and outputs a restored high-definition image with a 4-fold resolution increase; S525: Global optimization; Use the weighted least squares method (WLS) for edge-preserving smoothing, and the energy function: E(u) = ∑ p ((u p - g p ) 2 + λ∑ q∈N(p) w pq (u p - u q ) 2 ) where g is the input image and u is the optimization result, control the smoothing intensity; this step can eliminate local artifacts introduced by the correction and maintain the sharpness of the facial feature edges.

7. An electronic device, characterized in that, Include: A memory storing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory for executing the evaluation method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The storage medium includes the evaluation method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Three-dimensional digital human flaw repairing method, related device and storage medium

    CN120726242A

  • Municipal pipeline defect classification method and device based on intelligent algorithm and electronic equipment

    CN120726406A

  • Municipal pipeline defect classification method and device based on intelligent algorithm and electronic equipment

    CN120726406B

  • Face fusion preprocessing method and system based on hair repairing and lightweight skin beautifying

    CN121032822A

  • Artificial intelligence-based automatic calibration method and system for creative and cultural patterns

    CN121280220A