Face image super-resolution processing method and system based on open source gap, terminal and storage medium
By using an adaptive super-resolution processing method on lightweight HarmonyOS devices, which utilizes implicit representation networks and feature fusion technology, we have solved the problems of low processing efficiency, high latency, and inaccurate results in existing methods. This method achieves efficient and low-latency image super-resolution processing, adapts to dynamic scaling requirements, and reduces the false positive rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-13
AI Technical Summary
Existing face image super-resolution methods suffer from low processing efficiency, high latency, and inaccurate results. They are particularly unable to meet real-time requirements on lightweight HarmonyOS devices. Furthermore, existing methods rely on fixed-ratio models, which cannot adapt to dynamic scaling requirements, resulting in a high false positive rate.
By acquiring multiple low-resolution face image streams for preprocessing, a face image network model is created. The scale vector of the implicit representation network is used to achieve adaptive super-resolution processing at arbitrary image scales. Combined with global coordinate modulation, feature fusion, and pixel synthesis, the image processing workflow is optimized to improve efficiency and accuracy.
It achieves low-latency, high-efficiency adaptive face image super-resolution processing on lightweight HarmonyOS devices, improving image quality and processing efficiency, reducing false positive rate, and meeting real-time requirements.
Smart Images

Figure CN121660889A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, system, terminal, and computer-readable storage medium for super-resolution processing of facial images based on the open-source HarmonyOS. Background Technology
[0002] Face super-resolution aims to improve the resolution of face images, generating a corresponding high-resolution face image from a low-resolution one. It has wide applications in many scenarios, such as smart security, industrial quality inspection, consumer electronics, and the expansion of the HarmonyOS ecosystem.
[0003] Currently, existing methods for super-resolution of face images have the following problems: (1) Inflexibility of super-resolution models: Existing methods rely on fixed-scale models, which makes them unable to adapt to dynamic scaling requirements (requiring multiple model switching), resulting in low processing efficiency and increased storage overhead. (2) Insufficient computing power of edge devices causes large latency: Existing methods have a latency of more than 100ms when running on lightweight HarmonyOS devices, which cannot meet the real-time requirements; (3) The effect of super-resolution is unstable: changes in input resolution cause output distortion (e.g., blurring of the eyes with 64×64 input), resulting in a high misjudgment rate, especially in smart security scenarios.
[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0005] The main objective of this invention is to provide a face image super-resolution processing method, system, terminal, and computer-readable storage medium based on the open-source HarmonyOS, aiming to solve the problems of low processing efficiency, large processing latency, and inaccurate processing results in existing face image super-resolution processing methods.
[0006] To achieve the above objectives, this invention provides a face image super-resolution processing method based on the open-source HarmonyOS, which includes the following steps: Multiple low-resolution face image streams from the HarmonyOS device are acquired, and all the low-resolution face image streams are preprocessed to obtain a low-resolution face image training set. The face image network model created is trained based on the low-resolution face image training set to obtain a face image super-resolution processing model. The original face image stream of the target user is acquired, the original face image stream is preprocessed to obtain the target face image stream, and the target face image stream is input into the face image super-resolution processing model to output the target high-resolution face image.
[0007] Optionally, the face image super-resolution processing method based on open-source HarmonyOS, wherein acquiring multiple low-resolution face image streams from a HarmonyOS device and preprocessing all the low-resolution face image streams to obtain a low-resolution face image training set specifically includes: Multiple low-resolution face image streams from a HarmonyOS device are acquired, and dynamic quality filtering processing is performed on all the low-resolution face image streams to obtain multiple target low-resolution face image streams. The dynamic quality filtering processing includes face clarity filtering, face pose angle filtering, and face occlusion ratio filtering. Normalize all the target low-resolution face image streams to obtain multiple normalized face images. Generate multiple image training samples by combining all the normalized face images with the corresponding real face images. Combine all the image training samples to obtain a low-resolution face image training set.
[0008] Optionally, in the face image super-resolution processing method based on open-source HarmonyOS, the normalization processing of all the target low-resolution face image streams specifically includes: ; in, To normalize face images, For low-resolution face image streams, The mean of the image pixel values. represents the standard deviation of image pixels.
[0009] Optionally, the face image super-resolution processing method based on open-source HarmonyOS, wherein training the created face image network model using the low-resolution face image training set to obtain the face image super-resolution processing model specifically includes: Create a face image network model and input a set of image training samples from the low-resolution face image training set into the face image network model; The normalized face images in the image training samples are subjected to memory compression processing to obtain normalized face compressed images, and the normalized face compressed images are mapped to coordinate space to obtain latent space coordinates. The latent space coordinates are globally modulated to obtain the facial loss value, and the normalized face compression image is optimized based on the facial loss value to obtain the face optimization image. The optimized face image is subjected to high-frequency detail processing to obtain a high-texture face image, and the local features of the face image in the normalized face compression image are weighted and fused to obtain the target fusion features. The target fusion features are subjected to pixel color synthesis to obtain a pixel color vector, and the pixel color vector is fused with the high-texture face image to obtain a high-resolution face image; The loss value is calculated on the high-resolution face image to obtain the target loss value, and the parameters of the face image network model are corrected according to the target loss value; The next set of image training samples is input into the face image network model until the training status of the face image network model meets the preset conditions, thus obtaining a trained face image super-resolution processing model.
[0010] Optionally, in the aforementioned face image super-resolution processing method based on open-source HarmonyOS, the step of performing memory compression processing on the normalized face images in the image training samples specifically involves: ; in, This is the compressed memory usage. This represents the original memory usage. The compression factor is 1. This is the compression ratio.
[0011] Optionally, the face image super-resolution processing method based on open-source HarmonyOS, wherein the step of mapping the normalized face compressed image to a coordinate space to obtain latent space coordinates specifically includes: Feature extraction is performed on the normalized face compressed image to obtain local features of the face image, and coordinate calculation is performed on the local features of the face image to obtain the relative coordinates of pixels; The proportion of the local features of the face image is calculated to obtain a proportion vector, and spatial mapping is performed based on the local features of the face image, the relative coordinates of the pixels, and the proportion vector to obtain the latent space coordinates.
[0012] Optionally, in the aforementioned face image super-resolution processing method based on open-source HarmonyOS, the step of calculating the coordinates of local features of the face image specifically involves: ; The proportion of local features in the face image is calculated as follows: ; ; ; in, These are pixel-relative coordinates. is the x-coordinate of the pixel. To normalize the width of the face image, y is the ordinate of the pixel. To normalize the height of the face image, As a proportional vector, This refers to the horizontal scaling ratio. This is the scaling ratio in the vertical direction. To normalize the width of the face compression image, The height of the normalized face compression image.
[0013] Optionally, in the face image super-resolution processing method based on open-source HarmonyOS, the global modulation of the latent space coordinates specifically involves: ; in, For human face loss value, For facial coordinate prediction function, For latent space coordinates, The actual coordinates of the face.
[0014] Optionally, the face image super-resolution processing method based on open-source HarmonyOS, wherein performing high-frequency detail processing on the optimized face image to obtain a high-texture face image specifically includes: The optimized face image is subjected to parameter calculation to obtain texture parameters, and the corresponding texture detail features are obtained based on the texture parameters; The texture detail features are tokenized to obtain texture tokens, and the texture tokens are then spectrally fused to obtain a high-texture face image.
[0015] Optionally, in the aforementioned face image super-resolution processing method based on open-source HarmonyOS, the step of calculating parameters for the optimized face image specifically involves: ; The corresponding texture detail features are obtained based on the texture parameters, specifically as follows: ; in, For the training parameters of knowledge distillation, For the parameter optimization objective, For Kullback-Leibler divergence, For teacher network output distribution, Output distribution for the student model. For encoder functions, For the target low-resolution face image stream.
[0016] Optionally, in the aforementioned face image super-resolution processing method based on open-source HarmonyOS, the token sampling of the texture detail features specifically involves: ; The spectral fusion of the texture token specifically involves: ; in, For texture tokens, For sampling function, For high-texture face images, For element-wise multiplication, It is a learnable frequency domain filter. These are implicit space coordinates.
[0017] Optionally, in the aforementioned face image super-resolution processing method based on open-source HarmonyOS, the weighted fusion of local features of the face image specifically involves: ; in, To achieve the goal of feature fusion, Local features of a face image For learnable parameters, For upsampling operation, These are implicit space coordinates.
[0018] Optionally, in the aforementioned face image super-resolution processing method based on open-source HarmonyOS, the step of synthesizing pixel colors from the target fusion features specifically involves: ; in, A pixel color vector matrix, Here is the weight matrix of the multilayer perceptron. For matrix activation functions, Here is the weight matrix of the first-layer perceptron. To achieve the goal of feature fusion, For bias terms, For matrix transpose, It is a multilayer perceptron.
[0019] Optionally, in the aforementioned face image super-resolution processing method based on open-source HarmonyOS, the step of calculating the loss value for the high-resolution face image specifically involves: ; in, For the target loss value, For Fourier transform, For high-resolution face images, For true-resolution human face images, It is the Frobenius norm.
[0020] Optionally, the face image super-resolution processing method based on open-source HarmonyOS, wherein the steps of acquiring the original face image stream of the target user, preprocessing the original face image stream to obtain the target face image stream, and inputting the target face image stream into a trained face image super-resolution processing model to output the target high-resolution face image, further include: Based on the pixel relative coordinates, coordinate watermarking is embedded into the target high-resolution face image to obtain a high-resolution face watermark image; Specifically, embedding coordinate watermarks into the target high-resolution face image based on the pixel relative coordinates involves: ; in, For high-resolution face watermark images, For high-resolution face images, These are pixel-relative coordinates.
[0021] Furthermore, to achieve the above objectives, the present invention also provides a face image super-resolution processing system based on open-source HarmonyOS, wherein the face image super-resolution processing system based on open-source HarmonyOS includes: The image preprocessing module is used to acquire multiple low-resolution face image streams from the HarmonyOS device, preprocess all the low-resolution face image streams, and obtain a low-resolution face image training set. The model training module is used to train the created face image network model based on the low-resolution face image training set to obtain a face image super-resolution processing model. The image super-resolution module is used to acquire the original face image stream of the target user, preprocess the original face image stream to obtain the target face image stream, and input the target face image stream into the trained face image super-resolution processing model to output the target high-resolution face image.
[0022] Optionally, in the aforementioned face image super-resolution processing system based on open-source HarmonyOS, the image preprocessing module includes: An image filtering unit is used to acquire multiple low-resolution face image streams from a HarmonyOS device, perform dynamic quality filtering on all the low-resolution face image streams, and obtain multiple target low-resolution face image streams. The dynamic quality filtering includes face clarity filtering, face pose angle filtering, and face occlusion ratio filtering. The image normalization unit is used to normalize all the target low-resolution face image streams to obtain multiple normalized face images, generate multiple image training samples by combining all the normalized face images with corresponding real face images, and combine all the image training samples to obtain a low-resolution face image training set.
[0023] Optionally, in the aforementioned face image super-resolution processing system based on open-source HarmonyOS, the model training module includes: The network model creation unit is used to create a face image network model and input a set of image training samples from the low-resolution face image training set into the face image network model. The coordinate mapping unit is used to perform memory compression processing on the normalized face image in the image training sample to obtain a normalized face compressed image, and to perform coordinate space mapping on the normalized face compressed image to obtain latent space coordinates. An image optimization unit is used to globally modulate the latent space coordinates to obtain a facial loss value, and to optimize the normalized face compression image based on the facial loss value to obtain an optimized face image. The detail processing unit is used to perform high-frequency detail processing on the face optimization image to obtain a high-texture face image, and to perform weighted fusion on the local features of the face image of the normalized face compression image to obtain the target fusion features. The feature fusion unit is used to synthesize pixel colors on the target fusion features to obtain a pixel color vector, and to fuse the pixel color vector with the high-texture face image to obtain a high-resolution face image. The parameter correction unit is used to calculate the loss value of the high-resolution face image, obtain the target loss value, and correct the parameters of the face image network model according to the target loss value. The repeated training unit is used to input the next set of image training samples into the face image network model until the training status of the face image network model meets the preset conditions, thereby obtaining a trained face image super-resolution processing model.
[0024] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a face image super-resolution processing program based on open-source HarmonyOS stored in the memory and executable on the processor. When the face image super-resolution processing program based on open-source HarmonyOS is executed by the processor, it implements the steps of the face image super-resolution processing method based on open-source HarmonyOS as described above.
[0025] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a face image super-resolution processing program based on open-source HarmonyOS, and when the face image super-resolution processing program based on open-source HarmonyOS is executed by a processor, it implements the steps of the face image super-resolution processing method based on open-source HarmonyOS as described above.
[0026] In this invention, multiple low-resolution face image streams from a HarmonyOS device are acquired, and all such streams are preprocessed to obtain a low-resolution face image training set. A face image network model is trained using this training set to obtain a face image super-resolution processing model. The original face image stream of the target user is acquired, preprocessed, and input into the face image super-resolution processing model to output a target high-resolution face image. This invention achieves adaptive super-resolution at arbitrary image scales through the input of a proportional vector from an implicit representation network, reduces processing latency by accelerating frame operator fusion, and improves processing efficiency through global coordinate modulation, feature fusion, and pixel synthesis, resulting in better image quality after super-resolution. Attached Figure Description
[0027] Figure 1 This is a flowchart of a preferred embodiment of the face image super-resolution processing method based on the open-source HarmonyOS of the present invention; Figure 2 This is a flowchart illustrating the specific implementation process of step S10 in a preferred embodiment of the face image super-resolution processing method based on open-source HarmonyOS of the present invention. Figure 3 This is a flowchart illustrating the specific implementation process of step S11 in a preferred embodiment of the face image super-resolution processing method based on open-source HarmonyOS of the present invention. Figure 4 This is a flowchart illustrating the specific implementation process of step S12 in a preferred embodiment of the face image super-resolution processing method based on open-source HarmonyOS of the present invention. Figure 5 This is a flowchart illustrating the specific implementation process of step S20 in a preferred embodiment of the face image super-resolution processing method based on open-source HarmonyOS of the present invention. Figure 6 This is a flowchart illustrating the specific implementation process of step S22 in a preferred embodiment of the face image super-resolution processing method based on open-source HarmonyOS of the present invention. Figure 7 This is a flowchart illustrating the specific implementation process of step S24 in a preferred embodiment of the face image super-resolution processing method based on open-source HarmonyOS of the present invention. Figure 8This is a flowchart illustrating the specific implementation process of step S30 in a preferred embodiment of the face image super-resolution processing method based on open-source HarmonyOS of the present invention. Figure 9 This is a flowchart illustrating the specific implementation process of step S40 in a preferred embodiment of the face image super-resolution processing method based on open-source HarmonyOS of the present invention. Figure 10 This is a schematic diagram of a face image super-resolution processing system based on the open-source HarmonyOS according to the present invention; Figure 11 This is another structural schematic diagram of the face image super-resolution processing system based on the open-source HarmonyOS of this invention; Figure 12 This is a schematic diagram of the data analysis module in the face image super-resolution processing system based on open-source HarmonyOS of this invention; Figure 13 This is a schematic diagram of the model training module in the face image super-resolution processing system based on open-source HarmonyOS of this invention; Figure 14 This is a schematic diagram of the image super-resolution module in the face image super-resolution processing system based on open-source HarmonyOS of this invention; Figure 15 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0029] Existing face image super-resolution methods have the following problems: (1) Inflexibility of super-resolution models: Existing methods rely on fixed-scale models, which makes them unable to adapt to dynamic scaling requirements (requiring multiple model switching), resulting in low processing efficiency and increased storage overhead. (2) Insufficient computing power of edge devices causes large latency: Existing methods have a latency of more than 100ms when running on lightweight HarmonyOS devices, which cannot meet the real-time requirements; (3) The effect of super-resolution is unstable: changes in input resolution cause output distortion (e.g., blurring of the eyes with 64×64 input), resulting in a high misjudgment rate, especially in smart security scenarios.
[0030] Therefore, this invention proposes a face image super-resolution processing method based on the open-source HarmonyOS to overcome the problems of excessive protocol overhead, high parsing complexity, and low security in existing technologies for communication between resource-constrained devices.
[0031] The preferred embodiment of the present invention describes a face image super-resolution processing method based on open-source HarmonyOS, such as... Figure 1 As shown, the face image super-resolution processing method based on open-source HarmonyOS includes the following steps: Step S10: Obtain multiple low-resolution face image streams from the HarmonyOS device, preprocess all the low-resolution face image streams to obtain a low-resolution face image training set.
[0032] Specifically, in this embodiment of the invention, multiple low-resolution face image streams from a HarmonyOS device are acquired, and dynamic resolution input is supported (e.g., 16×16 to 256×256 pixels). After acquiring multiple low-resolution face image streams, dynamic quality assessment and filtering processing is required for all low-resolution face image streams. This includes face sharpness filtering, face pose angle filtering, and face occlusion ratio filtering, retaining only images with quality scores higher than the dynamic threshold to ensure the quality of the training set. Then, a normalization layer preprocessing is used to ensure the stability of subsequent calculations.
[0033] like Figure 2 As shown, step S10 specifically includes: Step S11: Obtain multiple low-resolution face image streams from the HarmonyOS device, and perform dynamic quality filtering on all the low-resolution face image streams to obtain multiple target low-resolution face image streams. The dynamic quality filtering includes face clarity filtering, face pose angle filtering, and face occlusion ratio filtering.
[0034] Specifically, multiple low-resolution face image streams from HarmonyOS devices are acquired, and dynamic resolution input is supported. After acquiring multiple low-resolution face image streams, dynamic quality assessment and filtering processing is required for all low-resolution face image streams. This includes face sharpness filtering, face pose angle filtering, and face occlusion ratio filtering. Only images with quality scores higher than the dynamic threshold are retained to ensure the quality of the training set.
[0035] like Figure 3 As shown, step S11 specifically includes: Step S111: Obtain multiple low-resolution face image streams from the HarmonyOS device.
[0036] Specifically, step S111 is implemented as follows: By utilizing the Camera Kit API (a development toolkit for simplifying camera function integration and supporting cross-platform camera operation, such as preview, taking photos, and recording videos) provided by the open-source Harmony OS, a high-efficiency image capture channel was established on the Hi3516DV300 chip edge device, and a dynamic resolution adjustment module was configured to automatically adjust the output resolution according to the device's computing power and memory status. Subsequently, using an asynchronous non-blocking I / O mode, multiple low-resolution face image streams were continuously acquired at a rate of 15-30 FPS through the RAW image stream pipeline.
[0037] Step S112: Perform dynamic quality filtering on all the low-resolution face image streams to obtain multiple target low-resolution face image streams.
[0038] Specifically, step S112 is implemented as follows: After acquiring multiple low-resolution face image streams, dynamic quality assessment and filtering processing needs to be performed on all low-resolution face image streams. Specifically, this includes filtering based on face sharpness, face pose angle, and face occlusion ratio. Only images with quality scores higher than the dynamic threshold are retained to ensure the quality of the training set.
[0039] Step S12: Normalize all the target low-resolution face image streams to obtain multiple normalized face images. Generate samples by combining all the normalized face images with the corresponding real face images to obtain multiple image training samples. Combine all the image training samples to obtain a low-resolution face image training set.
[0040] Specifically, all the target low-resolution face image streams are normalized to obtain multiple normalized face images to ensure the stability of subsequent calculations. Then, all the normalized face images are combined with the corresponding real face images to generate multiple image training samples. All the image training samples are then combined to obtain a low-resolution face image training set.
[0041] like Figure 4 As shown, step S12 specifically includes: Step S121: Normalize all the target low-resolution face image streams to obtain multiple normalized face images.
[0042] Specifically, step S121 is implemented as follows: Normalization is performed on all the target low-resolution face image streams to obtain multiple normalized face images. The specific normalization process is as follows: ; in, To normalize face images, For low-resolution face image streams, The mean of the image pixel values. represents the standard deviation of image pixels.
[0043] Step S122: Generate samples by combining all the normalized face images with the corresponding real face images to obtain multiple image training samples, and combine all the image training samples to obtain a low-resolution face image training set.
[0044] Specifically, step S122 is implemented as follows: All the normalized face images are compared with the corresponding real face images to generate multiple image training samples, wherein each image training sample includes a set of normalized face images and the corresponding real face images; and all the image training samples are combined to obtain a low-resolution face image training set.
[0045] Step S20: Train the created face image network model based on the low-resolution face image training set to obtain a face image super-resolution processing model.
[0046] Specifically, after obtaining the low-resolution face image training set, model training needs to be performed based on this low-resolution face image training set. Specifically, a face image network model is created, and a set of image training samples from the low-resolution face image training set are input into the face image network model; the normalized face images in the image training samples are subjected to memory compression processing to obtain normalized face compressed images, and the normalized face compressed images are mapped to coordinate space to obtain latent space coordinates; the latent space coordinates are globally modulated to obtain face loss values, and the normalized face compressed images are optimized based on the face loss values to obtain optimized face images.
[0047] The optimized face image undergoes high-frequency detail processing to obtain a high-texture face image. The local features of the face image in the normalized compressed face image are then weighted and fused to obtain a target fusion feature. Pixel color synthesis is performed on the target fusion feature to obtain a pixel color vector. This pixel color vector is then fused with the high-texture face image to obtain a high-resolution face image. A loss value is calculated on the high-resolution face image to obtain a target loss value. The parameters of the face image network model are then corrected based on the target loss value. The next set of image training samples is input into the face image network model until the training status of the face image network model meets preset conditions, resulting in a trained face image super-resolution processing model.
[0048] like Figure 5As shown, step S20 specifically includes: Step S21: Create a face image network model and input a set of image training samples from the low-resolution face image training set into the face image network model.
[0049] Specifically, step S21 is implemented as follows: After obtaining the low-resolution face image training set, the model needs to be trained based on this low-resolution face image training set. Before training, a face image network model needs to be created, and a set of image training samples from the low-resolution face image training set needs to be input into the face image network model.
[0050] Step S22: Perform memory compression processing on the normalized face images in the image training samples to obtain normalized face compressed images, and perform coordinate space mapping on the normalized face compressed images to obtain latent space coordinates.
[0051] Specifically, to address the issue of significant latency caused by insufficient computing power in edge devices, this invention utilizes the OpenHarmony neural network runtime to perform operator fusion. By merging adjacent convolutional, activation functions, and pooling layers into a single hardware instruction, the normalized face images in the image training samples are subjected to memory compression processing to obtain normalized face compressed images, thus meeting the 1W power consumption constraint of edge devices and satisfying real-time requirements. Subsequently, the normalized face compressed images are mapped to a coordinate space to obtain latent space coordinates.
[0052] like Figure 6 As shown, step S22 specifically includes: Step S221: Perform memory compression processing on the normalized face images in the image training samples to obtain normalized face compressed images.
[0053] Specifically, step S221 is implemented as follows: The normalized face images in the image training samples are subjected to memory compression processing to obtain normalized face compressed images, which are expressed as follows: ; in, This is the compressed memory usage. This represents the original memory usage. The compression factor is 1. This is the compression ratio.
[0054] Step S222: Extract features from the normalized face compressed image to obtain local features of the face image, and calculate the coordinates of the local features of the face image to obtain the relative coordinates of the pixels.
[0055] Specifically, step S222 is implemented as follows: Feature extraction is performed on the normalized compressed face image using a lightweight residual encoder to obtain local face image features. The parameter size is controlled within 50KB to adapt to the Hi3516DV300 chip, and depthwise separable convolution is used to reduce computational complexity. Next, coordinate space mapping is performed on the local face image features. First, the coordinates of the local face image features are calculated to obtain the pixel relative coordinates, expressed as follows: ; in, These are pixel-relative coordinates. is the x-coordinate of the pixel. To normalize the width of the face image, y is the ordinate of the pixel. To normalize the height of the face image, It is a proportional vector.
[0056] Step S223: Calculate the proportion of the local features of the face image to obtain the proportion vector, and perform spatial mapping based on the local features of the face image, the relative coordinates of the pixels and the proportion vector to obtain the latent space coordinates.
[0057] Specifically, step S223 is implemented as follows: The proportions of local features in the face image are calculated to obtain a proportion vector, which is expressed as follows: ; in, As a proportional vector, This refers to the horizontal scaling ratio. This refers to the scaling ratio in the vertical direction; The formula for calculating the horizontal scaling ratio is: ; in, To normalize the width of the compressed face image; The formula for calculating the vertical scaling ratio is: ; in, To normalize the height of the compressed face image, the scaling vector is dynamically obtained via the HarmonyOS distributed soft bus to meet front-end requirements (e.g., access control machines require 6.2x scaling). Then, spatial mapping is performed based on the local features of the face image, the relative pixel coordinates, and the scaling vector to obtain the latent space coordinates.
[0058] Step S23: Globally modulate the latent space coordinates to obtain the face loss value, and optimize the normalized face compression image based on the face loss value to obtain the face optimization image.
[0059] Specifically, step S23 is implemented as follows: Global modulation of the latent space coordinates yields the facial loss value, which is expressed as follows: ; in, For human face loss value, For facial coordinate prediction function, For latent space coordinates, The facial coordinates are used to establish spatial continuity through positional encoding, and facial loss values ensure the fidelity of facial features (e.g., pupil position deviation <0.5 pixels). Positional encoding calculation is accelerated using an NPU (Neural Processing Unit) to overcome the effects of temperature drift. Subsequently, the normalized compressed face image is optimized based on the facial loss values to obtain an optimized face image.
[0060] Step S24: Perform high-frequency detail processing on the optimized face image to obtain a high-texture face image, and perform weighted fusion on the local features of the face image in the normalized face compression image to obtain the target fusion features.
[0061] Specifically, after obtaining the optimized face image, high-frequency detail processing is required to obtain a high-texture face image. This involves calculating parameters in the optimized face image to obtain texture parameters, and then obtaining corresponding texture detail features based on these parameters. Token sampling is performed on the texture detail features to obtain texture tokens, and spectral fusion is performed on the texture tokens to obtain the high-texture face image. Subsequently, shallow features (i.e., local features of the face image) are preserved through a skip connection structure and weighted fused with the upsampling results to obtain the target fused features. A gating mechanism is used to dynamically adjust the weight allocation, reducing texture loss caused by upsampling by more than 16 times.
[0062] like Figure 7 As shown, step S24 specifically includes: Step S241: Calculate the parameters of the face optimization image to obtain texture parameters, and obtain the corresponding texture detail features based on the texture parameters.
[0063] Specifically, step S241 is implemented as follows: The optimized face image is subjected to parameter calculation to obtain texture parameters, which are expressed as follows: ; in, For the training parameters of knowledge distillation, For the parameter optimization objective, For Kullback-Leibler divergence, For teacher network output distribution, Output the distribution for the student model.
[0064] After obtaining the texture parameters, the corresponding texture detail features are obtained based on the texture parameters, and the corresponding expression is as follows: ; in, For texture detail features, For encoder functions, For the target low-resolution face image stream.
[0065] Step S242: Token sampling is performed on the texture detail features to obtain texture tokens, and spectral fusion is performed on the texture tokens to obtain a high-texture face image.
[0066] Specifically, step S242 is implemented as follows: After obtaining the texture detail features, token sampling is performed on the texture detail features to obtain the texture token, which is expressed as follows: ; in, For texture tokens, For sampling function, This refers to texture detail features.
[0067] Next, the texture token is subjected to spectral fusion, which is expressed as follows: ; in, For high-texture face images, For texture tokens, For element-wise multiplication, It is a learnable frequency domain filter. These are implicit space coordinates.
[0068] This invention employs a token sampling mechanism to discretize continuous high-frequency features (e.g., skin pores, eyelashes, lip lines, hair strands, etc.) into semantically clear "texture tokens." This allows the model to precisely control the generation of local details, avoiding blurring or artifacts common in traditional methods. Furthermore, since token sampling is essentially a feature sparsification operation, retaining only the most discriminative texture patterns significantly reduces the amount of data required for subsequent processing, making it suitable for deployment on resource-constrained chips such as the Hi3516DV300. By using a spectrum fusion strategy to weightedly modulate the texture tokens in the frequency domain, high-frequency components lost due to low-resolution input can be effectively recovered, ensuring that the frequency domain energy distribution of the output face image is highly consistent with that of a real high-definition image.
[0069] Step S243: Perform weighted fusion on the local features of the face image to obtain the target fused features.
[0070] Specifically, step S243 is implemented as follows: The weighted fusion of local features in the facial image yields the target fused feature, which is expressed as follows: ; in, To achieve the goal of feature fusion, Local features of a face image For learnable parameters, For upsampling operation, These are implicit space coordinates.
[0071] Step S25: Perform pixel color synthesis on the target fusion features to obtain a pixel color vector, and fuse the pixel color vector with the high-texture face image to obtain a high-resolution face image.
[0072] Specifically, step S25 is implemented as follows: The target fusion features are processed to synthesize pixel colors, resulting in a pixel color vector, which is expressed as follows: ; in, A pixel color vector matrix, Here is the weight matrix of the multilayer perceptron. For matrix activation functions, Here is the weight matrix of the first-layer perceptron. To achieve the goal of feature fusion, For bias terms, For matrix transpose, This is a multilayer perceptron. The pixel color vectors are then fused with the high-texture face image to obtain a high-resolution face image. This not only solves the problem of the disconnect between "color distortion" and "texture blurring" in traditional super-resolution methods, but also achieves near-professional graphics workstation-level visual quality on resource-constrained edge chips through an end-to-end differentiable architecture and HarmonyOS native acceleration, providing a reliable technical foundation for high-value scenarios such as face recognition, digital identity, and intelligent security.
[0073] Step S26: Calculate the loss value of the high-resolution face image to obtain the target loss value, and correct the parameters of the face image network model according to the target loss value.
[0074] Specifically, step S26 is implemented as follows: The loss value is calculated for the high-resolution face image to obtain the target loss value, which is expressed as follows: ; in, For the target loss value, For Fourier transform, For high-resolution face images, For true-resolution human face images, The Frobenius norm is used; then, the parameters of the face image network model are corrected based on the target loss value.
[0075] Step S27: Input the next set of image training samples into the face image network model until the training status of the face image network model meets the preset conditions, and obtain the trained face image super-resolution processing model.
[0076] Specifically, step S27 is implemented as follows: The next set of image training samples is input into the face image network model, and the above process is repeated, which will not be elaborated here; until the training status of the face image network model meets the preset conditions, such as the number of training times reaching a preset number. The preset requirements can be determined based on the accuracy of the face image super-resolution processing model, which will not be explained in detail here. The preset number of times can be the maximum number of training times for the face image network model, such as 2000 times, etc. Finally, the trained face image super-resolution processing model is obtained.
[0077] Step S30: Obtain the original face image stream of the target user, preprocess the original face image stream to obtain the target face image stream, and input the target face image stream into the face image super-resolution processing model to output the target high-resolution face image.
[0078] Specifically, after training the face image super-resolution processing model, face image super-resolution needs to be performed. Specifically, the original face image stream of the target user is obtained, and the original face image stream is preprocessed to obtain the target face image stream. The preprocessing process includes dynamic quality filtering of the original face image stream to obtain a low-resolution original face image stream that meets the requirements. The dynamic quality filtering process includes face sharpness filtering, face pose angle filtering, and face occlusion ratio filtering.
[0079] Subsequently, the original face image stream after dynamic quality screening is normalized to obtain the target face image stream, and the target face image stream is input into the face image super-resolution processing model to output the target high-resolution face image.
[0080] like Figure 8 As shown, step S30 specifically includes: Step S31: Obtain the original face image stream of the target user, and preprocess the original face image stream to obtain the target face image stream.
[0081] Specifically, step S31 is implemented as follows: The process involves acquiring the original facial image stream of the target user, preprocessing the original facial image stream to obtain the target facial image stream, and performing dynamic quality filtering on the original facial image stream to obtain a low-resolution original facial image stream that meets the requirements. The dynamic quality filtering includes filtering based on facial sharpness, facial pose angle, and facial occlusion ratio. Subsequently, the dynamically quality-filtered original facial image stream is normalized to obtain the target facial image stream.
[0082] Step S32: Input the target face image stream into the face image super-resolution processing model and output the target high-resolution face image.
[0083] Specifically, step S32 is implemented as follows: After obtaining the target face image stream, the target face image stream is input into the face image super-resolution processing model, and the target high-resolution face image is output.
[0084] Furthermore, such as Figure 9 As shown, the process involves acquiring the original face image stream of the target user, preprocessing the original face image stream to obtain the target face image stream, inputting the target face image stream into a trained face image super-resolution processing model, and outputting the target high-resolution face image. The process further includes: Step S41: Obtain the watermark embedding instruction of the target user, and retrieve the corresponding pixel relative coordinates according to the watermark embedding instruction; Step S42: Embed coordinate watermarks into the target high-resolution face image according to the pixel relative coordinates to obtain a high-resolution face watermark image.
[0085] Specifically, the present invention can also embed a corresponding coordinate watermark into the obtained high-resolution face image. Specifically, it obtains the watermark embedding instruction from the target user, retrieves the corresponding pixel relative coordinates according to the watermark embedding instruction, and then performs coordinate watermark embedding on the target high-resolution face image according to the pixel relative coordinates to obtain a high-resolution face watermark image. The corresponding expression is: ; in, For high-resolution face watermark images, For high-resolution face images, These are pixel-relative coordinates.
[0086] The technical effects that this invention can bring are as follows: (1) By implicitly representing the proportional vector input of the network, adaptive super-resolution at any continuous scale is achieved, and the storage requirements are greatly reduced; (2) The processing latency was reduced by using the acceleration framework operator fusion, and ultra-low power operation (e.g., below 1W) was ensured by the knowledge distillation lightweight decoder of the LTE (Long Term Evolution) module. (3) The processing efficiency is improved by global coordinate modulation and jump connection structure, as well as pixel synthesis, resulting in better image quality after super-resolution. (4) By embedding coordinate watermarks, the traceability of images when they are infringed is improved.
[0087] Furthermore, such as Figure 10 As shown, based on the above-mentioned face image super-resolution processing method based on open-source HarmonyOS, the present invention also provides a face image super-resolution processing system based on open-source HarmonyOS, wherein the face image super-resolution processing system based on open-source HarmonyOS includes: Image preprocessing module 50 is used to acquire multiple low-resolution face image streams from the HarmonyOS device, preprocess all the low-resolution face image streams, and obtain a low-resolution face image training set. The model training module 60 is used to train the created face image network model based on the low-resolution face image training set to obtain a face image super-resolution processing model. The image super-resolution module 70 is used to acquire the original face image stream of the target user, preprocess the original face image stream to obtain the target face image stream, and input the target face image stream into the trained face image super-resolution processing model to output the target high-resolution face image.
[0088] like Figures 11 to 14 As shown in this embodiment of the invention, another embodiment of the face image super-resolution processing system based on open-source HarmonyOS is described. In this embodiment, the image preprocessing module 50 includes: Image filtering unit 501 is used to acquire multiple low-resolution face image streams from HarmonyOS device, perform dynamic quality filtering processing on all the low-resolution face image streams to obtain multiple target low-resolution face image streams, wherein the dynamic quality filtering processing includes face clarity filtering, face pose angle filtering and face occlusion ratio filtering. The image normalization unit 502 is used to normalize all the target low-resolution face image streams to obtain multiple normalized face images, generate multiple image training samples by combining all the normalized face images with corresponding real face images, and combine all the image training samples to obtain a low-resolution face image training set.
[0089] In this embodiment, the model training module 60 includes: The network model creation unit 601 is used to create a face image network model and input a set of image training samples from the low-resolution face image training set into the face image network model. The coordinate mapping unit 602 is used to perform memory compression processing on the normalized face image in the image training sample to obtain a normalized face compressed image, and to perform coordinate space mapping on the normalized face compressed image to obtain latent space coordinates. Image optimization unit 603 is used to globally modulate the latent space coordinates to obtain facial loss values, and to optimize the normalized face compression image based on the facial loss values to obtain an optimized face image. The detail processing unit 604 is used to perform high-frequency detail processing on the face optimization image to obtain a high-texture face image, and to perform weighted fusion on the local features of the face image of the normalized face compression image to obtain the target fusion features. The feature fusion unit 605 is used to synthesize pixel colors on the target fusion features to obtain a pixel color vector, and to fuse the pixel color vector with the high-texture face image to obtain a high-resolution face image. The parameter correction unit 606 is used to calculate the loss value of the high-resolution face image, obtain the target loss value, and correct the parameters of the face image network model according to the target loss value. The repeated training unit 607 is used to input the next set of image training samples into the face image network model until the training status of the face image network model meets the preset conditions, thereby obtaining a trained face image super-resolution processing model.
[0090] In this embodiment, the image super-resolution module 70 includes: The raw image processing unit 701 is used to acquire the raw face image stream of the target user, preprocess the raw face image stream, and obtain the target face image stream. The face image super-resolution unit 702 is used to input the target face image stream into the trained face image super-resolution processing model and output the target high-resolution face image.
[0091] This invention achieves adaptive super-resolution at arbitrary image scales by using the proportional vector input of an implicit representation network, reduces processing latency by accelerating frame operator fusion, and improves processing efficiency through global coordinate modulation, feature fusion, and pixel synthesis, resulting in better image quality after super-resolution.
[0092] Furthermore, such as Figure 15 As shown, based on the above-mentioned face image super-resolution processing method and system based on open-source HarmonyOS, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 15 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0093] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a face image super-resolution processing program 40 based on the open-source HarmonyOS, which can be executed by the processor 10 to implement the face image super-resolution processing method based on the open-source HarmonyOS described in this application.
[0094] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the face image super-resolution processing method based on the open-source HarmonyOS.
[0095] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The terminal's processor 10, memory 20, and display 30 communicate with each other via a system bus.
[0096] In one embodiment, when the processor 10 executes the face image super-resolution processing program 40 based on the open-source HarmonyOS in the memory 20, the following steps are performed: Multiple low-resolution face image streams from the HarmonyOS device are acquired, and all the low-resolution face image streams are preprocessed to obtain a low-resolution face image training set. The face image network model created is trained based on the low-resolution face image training set to obtain a face image super-resolution processing model. The original face image stream of the target user is acquired, the original face image stream is preprocessed to obtain the target face image stream, and the target face image stream is input into the face image super-resolution processing model to output the target high-resolution face image.
[0097] Specifically, the step of acquiring multiple low-resolution face image streams from the HarmonyOS device and preprocessing all the low-resolution face image streams to obtain a low-resolution face image training set includes: Multiple low-resolution face image streams from a HarmonyOS device are acquired, and dynamic quality filtering processing is performed on all the low-resolution face image streams to obtain multiple target low-resolution face image streams. The dynamic quality filtering processing includes face clarity filtering, face pose angle filtering, and face occlusion ratio filtering. Normalize all the target low-resolution face image streams to obtain multiple normalized face images. Generate multiple image training samples by combining all the normalized face images with the corresponding real face images. Combine all the image training samples to obtain a low-resolution face image training set.
[0098] Specifically, the normalization process for all the target low-resolution face image streams includes: ; in, To normalize face images, For low-resolution face image streams, The mean of the image pixel values. represents the standard deviation of image pixels.
[0099] The step of training the created face image network model based on the low-resolution face image training set to obtain a face image super-resolution processing model specifically includes: Create a face image network model and input a set of image training samples from the low-resolution face image training set into the face image network model; The normalized face images in the image training samples are subjected to memory compression processing to obtain normalized face compressed images, and the normalized face compressed images are mapped to coordinate space to obtain latent space coordinates. The latent space coordinates are globally modulated to obtain the facial loss value, and the normalized face compression image is optimized based on the facial loss value to obtain the face optimization image. The optimized face image is subjected to high-frequency detail processing to obtain a high-texture face image, and the local features of the face image in the normalized face compression image are weighted and fused to obtain the target fusion features. The target fusion features are subjected to pixel color synthesis to obtain a pixel color vector, and the pixel color vector is fused with the high-texture face image to obtain a high-resolution face image; The loss value is calculated on the high-resolution face image to obtain the target loss value, and the parameters of the face image network model are corrected according to the target loss value; The next set of image training samples is input into the face image network model until the training status of the face image network model meets the preset conditions, thus obtaining a trained face image super-resolution processing model.
[0100] Specifically, the memory compression processing of the normalized face images in the image training samples includes: ; in, This is the compressed memory usage. This represents the original memory usage. The compression factor is 1. This is the compression ratio.
[0101] Specifically, the step of mapping the normalized face compressed image to a coordinate space to obtain latent space coordinates includes: Feature extraction is performed on the normalized face compressed image to obtain local features of the face image, and coordinate calculation is performed on the local features of the face image to obtain the relative coordinates of pixels; The proportion of the local features of the face image is calculated to obtain a proportion vector, and spatial mapping is performed based on the local features of the face image, the relative coordinates of the pixels, and the proportion vector to obtain the latent space coordinates.
[0102] Specifically, the coordinate calculation of the local features of the face image includes: ; The proportion of local features in the face image is calculated as follows: ; ; ; in, These are pixel-relative coordinates. is the x-coordinate of the pixel. To normalize the width of the face image, y is the ordinate of the pixel. To normalize the height of the face image, As a proportional vector, This refers to the horizontal scaling ratio. This is the scaling ratio in the vertical direction. To normalize the width of the face compression image, The height of the normalized face compression image.
[0103] Specifically, the global modulation of the latent space coordinates includes: ; in, For human face loss value, For facial coordinate prediction function, For latent space coordinates, The actual coordinates of the face.
[0104] Specifically, the step of performing high-frequency detail processing on the optimized face image to obtain a high-texture face image includes: The optimized face image is subjected to parameter calculation to obtain texture parameters, and the corresponding texture detail features are obtained based on the texture parameters; The texture detail features are tokenized to obtain texture tokens, and the texture tokens are then spectrally fused to obtain a high-texture face image.
[0105] Specifically, the parameter calculation for the optimized face image includes: ; The corresponding texture detail features are obtained based on the texture parameters, specifically as follows: ; in, For the training parameters of knowledge distillation, For the parameter optimization objective, For Kullback-Leibler divergence, For teacher network output distribution, Output distribution for the student model. For encoder functions, For the target low-resolution face image stream.
[0106] Specifically, token sampling of the texture detail features involves: ; The spectral fusion of the texture token specifically involves: ; in, For texture tokens, For sampling function, For high-texture face images, For element-wise multiplication, It is a learnable frequency domain filter. These are implicit space coordinates.
[0107] Specifically, the weighted fusion of local features of the face image includes: ; in, To achieve the goal of feature fusion, Local features of a face image For learnable parameters, For upsampling operation, These are implicit space coordinates.
[0108] Specifically, the pixel color synthesis of the target fusion features involves: ; in, A pixel color vector matrix, Here is the weight matrix of the multilayer perceptron. For matrix activation functions, Here is the weight matrix of the first-layer perceptron. To achieve the goal of feature fusion, For bias terms, For matrix transpose, It is a multilayer perceptron.
[0109] Specifically, the loss calculation for the high-resolution face image includes: ; in, For the target loss value, For Fourier transform, For high-resolution face images, For true-resolution human face images, It is the Frobenius norm.
[0110] The process includes: acquiring the original face image stream of the target user; preprocessing the original face image stream to obtain the target face image stream; inputting the target face image stream into a trained face image super-resolution processing model; and outputting the target high-resolution face image. The process further includes: Based on the pixel relative coordinates, coordinate watermarking is embedded into the target high-resolution face image to obtain a high-resolution face watermark image; Specifically, embedding coordinate watermarks into the target high-resolution face image based on the pixel relative coordinates involves: ; in, For high-resolution face watermark images, For high-resolution face images, These are pixel-relative coordinates.
[0111] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a face image super-resolution processing program based on open source HarmonyOS, and the face image super-resolution processing program based on open source HarmonyOS, when executed by a processor, implements the steps of the face image super-resolution processing method based on open source HarmonyOS as described above.
[0112] In summary, this invention provides a method, system, terminal, and computer-readable storage medium for face image super-resolution processing based on the open-source HarmonyOS. The method includes: acquiring multiple low-resolution face image streams from a HarmonyOS device; preprocessing all the low-resolution face image streams to obtain a low-resolution face image training set; training a face image network model based on the low-resolution face image training set to obtain a face image super-resolution processing model; acquiring the original face image stream of a target user; preprocessing the original face image stream to obtain a target face image stream; and inputting the target face image stream into the face image super-resolution processing model to output a target high-resolution face image. This invention achieves adaptive super-resolution at arbitrary image scales through the input of a proportional vector of an implicit representation network, reduces processing latency by accelerating frame operator fusion, and improves processing efficiency through global coordinate modulation, feature fusion, and pixel synthesis, resulting in better image quality after super-resolution.
[0113] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0114] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.
[0115] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A face image super-resolution processing method based on open-source HarmonyOS, characterized in that, The face image super-resolution processing method based on open-source HarmonyOS includes: Multiple low-resolution face image streams from the HarmonyOS device are acquired, and all the low-resolution face image streams are preprocessed to obtain a low-resolution face image training set. The face image network model is trained using the low-resolution face image training set to obtain a face image super-resolution processing model. The original face image stream of the target user is acquired, the original face image stream is preprocessed to obtain the target face image stream, and the target face image stream is input into the face image super-resolution processing model to output the target high-resolution face image.
2. The face image super-resolution processing method based on open-source HarmonyOS according to claim 1, characterized in that, The process of acquiring multiple low-resolution face image streams from the HarmonyOS device and preprocessing all the low-resolution face image streams to obtain a low-resolution face image training set specifically includes: Multiple low-resolution face image streams from a HarmonyOS device are acquired, and dynamic quality filtering processing is performed on all the low-resolution face image streams to obtain multiple target low-resolution face image streams. The dynamic quality filtering processing includes face clarity filtering, face pose angle filtering, and face occlusion ratio filtering. Normalize all the target low-resolution face image streams to obtain multiple normalized face images. Generate multiple image training samples by combining all the normalized face images with the corresponding real face images. Combine all the image training samples to obtain a low-resolution face image training set.
3. The face image super-resolution processing method based on open-source HarmonyOS according to claim 2, characterized in that, The normalization process for all the target low-resolution face image streams specifically involves: ; in, To normalize face images, For low-resolution face image streams, The mean of the image pixel values. represents the standard deviation of image pixels.
4. The face image super-resolution processing method based on open-source HarmonyOS according to claim 3, characterized in that, The step of training the created face image network model based on the low-resolution face image training set to obtain a face image super-resolution processing model specifically includes: Create a face image network model and input a set of image training samples from the low-resolution face image training set into the face image network model; The normalized face images in the image training samples are subjected to memory compression processing to obtain normalized face compressed images, and the normalized face compressed images are mapped to coordinate space to obtain latent space coordinates. The latent space coordinates are globally modulated to obtain the facial loss value, and the normalized face compression image is optimized based on the facial loss value to obtain the face optimization image. The optimized face image is subjected to high-frequency detail processing to obtain a high-texture face image, and the local features of the face image in the normalized face compression image are weighted and fused to obtain the target fusion features. The target fusion features are subjected to pixel color synthesis to obtain a pixel color vector, and the pixel color vector is fused with the high-texture face image to obtain a high-resolution face image; The loss value is calculated on the high-resolution face image to obtain the target loss value, and the parameters of the face image network model are corrected according to the target loss value; The next set of image training samples is input into the face image network model until the training status of the face image network model meets the preset conditions, thus obtaining a trained face image super-resolution processing model.
5. The face image super-resolution processing method based on open-source HarmonyOS according to claim 4, characterized in that, The memory compression process for the normalized face images in the image training samples is specifically as follows: ; in, This is the compressed memory usage. This represents the original memory usage. The compression factor is 1. This is the compression ratio.
6. The face image super-resolution processing method based on open-source HarmonyOS according to claim 4, characterized in that, The step of mapping the normalized face compressed image to a coordinate space to obtain latent space coordinates specifically includes: Feature extraction is performed on the normalized compressed face image to obtain local features of the face image, and coordinate calculation is performed on the local features of the face image to obtain the relative coordinates of pixels; The proportion of the local features of the face image is calculated to obtain a proportion vector, and spatial mapping is performed based on the local features of the face image, the relative coordinates of the pixels, and the proportion vector to obtain the latent space coordinates.
7. The face image super-resolution processing method based on open-source HarmonyOS according to claim 6, characterized in that, The calculation of coordinates for the local features of the face image specifically involves: ; The proportion of local features in the facial image is calculated, specifically as follows: ; ; ; in, These are pixel-relative coordinates. is the x-coordinate of the pixel. To normalize the width of the face image, y is the ordinate of the pixel. To normalize the height of the face image, As a proportional vector, This refers to the horizontal scaling ratio. This is the scaling ratio in the vertical direction. To normalize the width of the face compression image, The height of the normalized face compression image.
8. The face image super-resolution processing method based on open-source HarmonyOS according to claim 4, characterized in that, The global modulation of the latent space coordinates specifically involves: ; in, For human face loss value, For facial coordinate prediction function, For latent space coordinates, The actual coordinates of the face.
9. The face image super-resolution processing method based on open-source HarmonyOS according to claim 4, characterized in that, The step of performing high-frequency detail processing on the optimized face image to obtain a high-texture face image specifically includes: The optimized face image is subjected to parameter calculation to obtain texture parameters, and the corresponding texture detail features are obtained based on the texture parameters; The texture detail features are tokenized to obtain texture tokens, and the texture tokens are then spectrally fused to obtain a high-texture face image.
10. The face image super-resolution processing method based on open-source HarmonyOS according to claim 9, characterized in that, The parameter calculation for the optimized face image specifically involves: ; The corresponding texture detail features are obtained based on the texture parameters, specifically as follows: ; in, For the training parameters of knowledge distillation, For the parameter optimization objective, For Kullback-Leibler divergence, For teacher network output distribution, Output distribution for the student model. For texture detail features, For encoder functions, For the target low-resolution face image stream.
11. The face image super-resolution processing method based on open-source HarmonyOS according to claim 9, characterized in that, The token sampling of the texture detail features specifically involves: ; The spectral fusion of the texture token specifically involves: ; in, For texture tokens, For sampling function, For high-texture face images, For element-wise multiplication, It is a learnable frequency domain filter. These are implicit space coordinates.
12. The face image super-resolution processing method based on open-source HarmonyOS according to claim 11, characterized in that, The weighted fusion of local features in the facial image specifically involves: ; in, To achieve the goal of feature fusion, Local features of a face image For learnable parameters, For upsampling operation, These are implicit space coordinates.
13. The face image super-resolution processing method based on open-source HarmonyOS according to claim 12, characterized in that, The pixel color synthesis of the target fusion features specifically involves: ; in, A pixel color vector matrix, Here is the weight matrix of the multilayer perceptron. For matrix activation functions, Here is the weight matrix of the first-layer perceptron. To achieve the goal of feature fusion, For bias terms, For matrix transpose, It is a multilayer perceptron.
14. The face image super-resolution processing method based on open-source HarmonyOS according to claim 1, characterized in that, The loss calculation for the high-resolution face image is specifically as follows: ; in, For the target loss value, For Fourier transform, For high-resolution face images, For true-resolution human face images, It is the Frobenius norm.
15. The face image super-resolution processing method based on open-source HarmonyOS according to claim 1, characterized in that, The process includes: acquiring the original facial image stream of the target user; preprocessing the original facial image stream to obtain the target facial image stream; inputting the target facial image stream into a trained facial image super-resolution processing model; and outputting the target high-resolution facial image. The process further includes: Obtain the watermark embedding instruction of the target user, and retrieve the corresponding pixel relative coordinates according to the watermark embedding instruction; Based on the pixel relative coordinates, coordinate watermarking is embedded into the target high-resolution face image to obtain a high-resolution face watermark image; Specifically, embedding coordinate watermarks into the target high-resolution face image based on the pixel relative coordinates involves: ; in, For high-resolution face watermark images, For high-resolution face images, These are pixel-relative coordinates.
16. A face image super-resolution processing system based on open-source HarmonyOS, characterized in that, The face image super-resolution processing system based on open-source HarmonyOS includes: The image preprocessing module is used to acquire multiple low-resolution face image streams from the HarmonyOS device, preprocess all the low-resolution face image streams, and obtain a low-resolution face image training set. The model training module is used to train the created face image network model based on the low-resolution face image training set to obtain a face image super-resolution processing model. The image super-resolution module is used to acquire the original face image stream of the target user, preprocess the original face image stream to obtain the target face image stream, and input the target face image stream into the trained face image super-resolution processing model to output the target high-resolution face image.
17. The face image super-resolution processing system based on open-source HarmonyOS according to claim 16, characterized in that, The image preprocessing module includes: An image filtering unit is used to acquire multiple low-resolution face image streams from a HarmonyOS device, perform dynamic quality filtering on all the low-resolution face image streams, and obtain multiple target low-resolution face image streams. The dynamic quality filtering includes face clarity filtering, face pose angle filtering, and face occlusion ratio filtering. The image normalization unit is used to normalize all the target low-resolution face image streams to obtain multiple normalized face images, generate multiple image training samples by combining all the normalized face images with corresponding real face images, and combine all the image training samples to obtain a low-resolution face image training set.
18. The face image super-resolution processing system based on open-source HarmonyOS according to claim 16, characterized in that, The model training module includes: The network model creation unit is used to create a face image network model and input a set of image training samples from the low-resolution face image training set into the face image network model. The coordinate mapping unit is used to perform memory compression processing on the normalized face image in the image training sample to obtain a normalized face compressed image, and to perform coordinate space mapping on the normalized face compressed image to obtain latent space coordinates. An image optimization unit is used to globally modulate the latent space coordinates to obtain a facial loss value, and to optimize the normalized face compression image based on the facial loss value to obtain an optimized face image. The detail processing unit is used to perform high-frequency detail processing on the face optimization image to obtain a high-texture face image, and to perform weighted fusion on the local features of the face image of the normalized face compression image to obtain the target fusion features. The feature fusion unit is used to synthesize pixel colors on the target fusion features to obtain a pixel color vector, and to fuse the pixel color vector with the high-texture face image to obtain a high-resolution face image. The parameter correction unit is used to calculate the loss value of the high-resolution face image, obtain the target loss value, and correct the parameters of the face image network model according to the target loss value. The repeated training unit is used to input the next set of image training samples into the face image network model until the training status of the face image network model meets the preset conditions, thereby obtaining a trained face image super-resolution processing model.
19. A terminal, characterized in that, The terminal includes: a memory, a processor, and a face image super-resolution processing program based on open-source HarmonyOS stored in the memory and executable on the processor. When the face image super-resolution processing program based on open-source HarmonyOS is executed by the processor, it implements the steps of the face image super-resolution processing method based on open-source HarmonyOS as described in any one of claims 1-15.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a face image super-resolution processing program based on the open-source HarmonyOS. When the face image super-resolution processing program based on the open-source HarmonyOS is executed by a processor, it implements the steps of the face image super-resolution processing method based on the open-source HarmonyOS as described in any one of claims 1-15.