WO2023137914A1 - Image processing method and apparatus, electronic device, and storage medium - Google Patents

Image processing method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2023137914A1
WO2023137914A1 PCT/CN2022/090713 CN2022090713W WO2023137914A1 WO 2023137914 A1 WO2023137914 A1 WO 2023137914A1 CN 2022090713 W CN2022090713 W CN 2022090713W WO 2023137914 A1 WO2023137914 A1 WO 2023137914A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
foreground
sample
foreground image
matting
Prior art date
Application number
PCT/CN2022/090713
Other languages
French (fr)
Chinese (zh)
Inventor
郑喜民
翟尤
舒畅
陈又新
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023137914A1 publication Critical patent/WO2023137914A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4053Super resolution, i.e. output image resolution higher than sensor resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the present application relates to the technical fields of artificial intelligence and image processing, and in particular to an image processing method, device, electronic equipment, and storage medium.
  • the performance of the existing method depends on the quality of the marking, which often results in lower image quality after matting. Therefore, how to provide an image processing method that can improve the image quality after matting has become a technical problem to be solved urgently.
  • the embodiment of the present application proposes an image processing method, the method comprising:
  • Preliminary matting processing is performed on the original image through the backbone network of the pre-trained matting model to obtain an initial foreground image
  • Image fusion is performed on the standard foreground image and the preset background image to obtain a target image.
  • the embodiment of the present application proposes an image processing device, the device includes:
  • the original image acquisition module is used to acquire the original image to be processed
  • the preliminary image matting module is used to perform initial image matting processing on the original image through the backbone network of the preset image matting model to obtain an initial foreground image;
  • a local refinement module configured to perform local refinement processing on the edge region of the initial foreground image through the fine-tuning network of the matting model to obtain a target foreground image
  • a super-resolution reconstruction module configured to perform super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
  • the image fusion module is used to perform image fusion on the standard foreground image and the preset background image to obtain the target image.
  • an embodiment of the present application proposes an electronic device, the electronic device includes a memory, a processor, a program stored in the memory and operable on the processor, and a data bus for realizing connection and communication between the processor and the memory.
  • the image processing method includes: obtaining an original image to be processed; performing preliminary matting processing on the original image through a pre-trained backbone network of a matting model to obtain an initial foreground image; Carry out local thinning processing to obtain the target foreground image; carry out super-resolution reconstruction processing on the target foreground image by a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image; image fusion is performed on the standard foreground image and the preset background image to obtain the target image.
  • an embodiment of the present application proposes a storage medium, the storage medium is a computer-readable storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement an image processing method, wherein the image processing method includes: obtaining an original image to be processed; performing preliminary matting processing on the original image through a pre-trained backbone network of a matting model to obtain an initial foreground image; The target foreground image; the target foreground image is subjected to super-resolution reconstruction processing through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image; image fusion is performed on the standard foreground image and the preset background image to obtain the target image.
  • the image processing method, device, electronic device and storage medium proposed in the present application can obtain a foreground image with a better matting effect through a matting model. Furthermore, by performing super-resolution reconstruction on the target foreground image through the pre-trained image reconstruction model, a clearer standard foreground image can be obtained, and the matting effect is enhanced visually. Finally, image fusion is performed on the standard foreground image and the preset background image, so that the target image has a higher resolution, thereby improving the image quality.
  • Fig. 1 is a flow chart of the image processing method provided by the embodiment of the present application.
  • Fig. 2 is another flow chart of the image processing method provided by the embodiment of the present application.
  • Fig. 3 is the flowchart of step S102 in Fig. 1;
  • Fig. 4 is the flowchart of step S103 in Fig. 1;
  • Fig. 5 is another flow chart of the image processing method provided by the embodiment of the present application.
  • Fig. 6 is the flowchart of step S104 in Fig. 1;
  • Fig. 7 is the flowchart of step S105 in Fig. 1;
  • FIG. 8 is a schematic structural diagram of an image processing device provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • Image matting means that for a given picture, the network can automatically extract the foreground part and delete the background part. It is a common method in the field of image enhancement.
  • Image Fusion refers to the process of image processing and computer technology on the image data of the same target collected by multi-source channels to maximize the extraction of beneficial information in each channel, and finally synthesize high-quality images to improve the utilization of image information, improve the accuracy and reliability of computer interpretation, and improve the spatial resolution and spectral resolution of the original image, which is conducive to monitoring.
  • Image fusion refers to the process of combining multiple images into one image according to certain fusion rules after preprocessing such as denoising and registration. The fused image can describe the target more clearly and accurately, which is more suitable for the subsequent processing of the image. (multi-sensor image fusion (visible light image and infrared image fusion), single sensor multi-focus image fusion).
  • the fused image should contain obvious salient information of all source images
  • pixel-level image fusion According to the principle of information extraction level from low to high, it can be divided into three categories: pixel-level image fusion, feature-level image fusion and decision-level image fusion.
  • Pixel-level fusion directly fuses the pixel-based features of the source image according to certain fusion rules, and finally generates a fusion image. It retains the most original information of the source image and the highest fusion accuracy, but this type of method also has the disadvantages of the largest amount of information, high requirements for hardware equipment and registration, long calculation time and poor real-time processing.
  • Feature-level image fusion is the process of firstly performing simple preprocessing on the source image, then extracting feature information such as corners, edges, and shapes of the source image through a certain model, and selecting through appropriate fusion rules, and then selecting and fusing these feature information according to certain fusion rules, and finally generating a fusion image.
  • the fusion object of this type of fusion method is the feature information of the source image, so the requirements for image registration are not as strict as those for pixel-level fusion.
  • this type of method extracts the characteristic information of the source image, compresses the detailed information of the image, enhances its own real-time processing ability, and provides the required characteristic information for decision analysis as much as possible. Compared with the previous level image fusion method, the accuracy of the feature level image fusion method is average.
  • the decision-level image is a process in which each source image has independently completed its own decision-making tasks such as classification and recognition before fusion.
  • the fusion process is a process in which a global optimal decision is generated by comprehensively analyzing the results of each independent decision in the front and then a fused image is formed accordingly.
  • This fusion method has the advantages of high flexibility, small communication volume, best real-time performance, strong fault tolerance and strong anti-interference ability.
  • decision-level image fusion needs to make decisions and judgments on each image separately, resulting in too many processing tasks before the final fusion and high preprocessing costs in the early stage.
  • embodiments of the present application provide an image processing method, device, electronic device, and storage medium, aiming at improving the image quality of a matted target image.
  • the image processing method, device, electronic device, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the image processing method in the embodiments of the present application is described.
  • AI artificial intelligence
  • digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
  • Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • the image processing method provided in the embodiment of the present application relates to the technical field of artificial intelligence.
  • the image processing method provided in the embodiment of the present application may be applied to a terminal, may also be applied to a server, and may also be software running on the terminal or the server.
  • the terminal can be a smart phone, tablet computer, notebook computer, desktop computer, etc.
  • the server can be configured as an independent physical server, or can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms;
  • Fig. 1 is an optional flow chart of the image processing method provided by the embodiment of the present application.
  • the method in Fig. 1 may include but not limited to steps S101 to S105.
  • Step S101 acquiring the original image to be processed
  • Step S102 performing preliminary matting processing on the original image through the backbone network of the pre-trained matting model to obtain an initial foreground image
  • step S103 the edge area of the initial foreground image is locally refined through the fine-tuning network of the matting model to obtain the target foreground image;
  • Step S104 performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
  • Step S105 performing image fusion on the standard foreground image and the preset background image to obtain the target image.
  • the pre-trained backbone network of the matting model is used to perform preliminary matting processing on the original image to obtain the initial foreground image; the fine-tuning network of the matting model is used to locally refine the edge area of the initial foreground image to obtain the target foreground image. In this way, the foreground image with better matting effect can be obtained through the matting model.
  • the pre-trained image reconstruction model is used to perform super-resolution reconstruction on the target foreground image to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than that of the target foreground image, and a clearer standard foreground image can be obtained, which strengthens the matting effect from the visual effect.
  • the standard foreground image and the preset background image are fused to obtain the target image, which makes the target image have a higher resolution, thereby improving the image quality.
  • the original image to be processed may be a three-dimensional image; in some embodiments, the three-dimensional image may be obtained by computer tomography (Computed Tomo-graphy, -CT), and in another embodiment, the three-dimensional image may also be obtained by magnetic resonance imaging (Magnetic Resonance Imaging, MRI).
  • computer tomography Computer tomography
  • MRI Magnetic Resonance Imaging
  • the above-mentioned original image to be processed may be a medical image, and the type of object contained in the original image is a lesion, that is, a part of the body where a lesion occurs.
  • Medical imaging refers to internal tissues obtained in a non-invasive manner for medical treatment or medical research, such as CT (Computed Tomography, computerized tomography), MRI (Magnetic Resonance Imaging, magnetic resonance imaging), US (ultrasonic, ultrasound), X-ray images, and images generated by medical instruments with optical photography lights.
  • the image processing method further includes pre-training the matting model, specifically including but not limited to steps S201 to S207:
  • Step S201 acquiring a sample image, wherein the resolution of the sample image is lower than that of a preset reference image
  • Step S202 inputting the sample image into the cutout model
  • Step S203 performing convolution processing on the sample image through the backbone network to obtain a sample image matrix, and performing feature extraction on the sample image matrix to obtain a predicted foreground value of the sample;
  • Step S204 performing preliminary matting processing on the sample image through the backbone network and the predicted foreground value of the sample to obtain the sample foreground image;
  • Step S205 obtaining the sample edge prediction value of each sample pixel in the sample foreground map through the fine-tuning network
  • Step S206 according to the size relationship between the sample edge prediction value and the preset edge prediction threshold, determine the number of sample edge pixel points
  • Step S207 optimize the loss function of the cutout model according to the number of sample edge pixels, so as to update the cutout model.
  • the sample image can be obtained by computer tomography (Computed Tomo-graphy, CT) or magnetic resonance imaging (Magnetic Resonance Imaging, MRI), wherein the resolution of the sample image is lower than the resolution of the preset reference image, that is, the sample image is a low-resolution image.
  • computer tomography Computer tomography
  • Magnetic resonance Imaging Magnetic Resonance Imaging
  • step S202 is executed to input the sample image into the matting model.
  • the matting model can include the open-source matting network Background Matting V2.
  • the matting model is mainly composed of two parts, namely a backbone network and a fine-tuning network.
  • the backbone network is an adjusted and deformed residual network.
  • the backbone network includes 3 convolutional layers (namely, the first convolutional layer, the second convolutional layer, and the third convolutional layer).
  • the convolution kernel size of each convolutional layer is set to 3 ⁇ 3, and the backbone network contains six input channels.
  • step S203 and S204 are executed, and the sample image is convoluted through the first convolutional layer of the backbone network to obtain a sample image matrix equal in size to the sample image, and the matrix values of the sample image matrix include 0 and 1, wherein 0 represents the background and 1 represents the foreground.
  • the feature extraction of the sample image matrix is performed through the second convolutional layer, and all matrix values with a value of 1 are obtained, and these matrix values with a value of 1 are included in the same set, and the matrix values in this set are the predicted foreground values of the sample.
  • the pixel values with a predicted foreground value of 1 are extracted from the original image, and the image formed by these pixel values is the sample foreground image.
  • the sample edge prediction value contained in the sample edge prediction information can be obtained, and the degree to which the sample pixel point belongs to the edge can be identified through the sample edge prediction value.
  • the edge prediction threshold By setting the edge prediction threshold in advance, the sample edge prediction value is compared with the edge prediction threshold, so as to filter the sample pixels in the edge area of the sample foreground image.
  • sample edge prediction value is less than or equal to the edge prediction threshold, it indicates that the sample pixel point belongs to the sample foreground image; if the sample edge prediction value is greater than the edge prediction threshold value, it indicates that the sample pixel point does not belong to the sample foreground image, and the sample pixel point is used as the sample edge pixel point, thereby statistically determining the number of sample edge pixel points.
  • step S207 is performed to compare the number of sample edge pixels with the preset threshold number of sample edge pixels, calculate the model loss of the cutout model, and backpropagate the model loss.
  • backpropagation can be performed according to the loss function to update the cutout model by optimizing the loss function, mainly to update the internal parameters of the cutout model (that is, loss parameters). It can be understood that conventional backpropagation principles may be applied to the backpropagation principle, which is not limited in this embodiment of the present application.
  • step S102 may include but not limited to include steps S301 to S303:
  • Step S301 performing convolution processing on the original image to obtain the original image matrix
  • Step S302 performing feature extraction on the original image matrix to obtain predicted foreground values
  • Step S303 performing preliminary matting processing on the original image according to the predicted foreground value to obtain an initial foreground image.
  • step S301 the original image is input into the matting model, and the original image is convoluted through the first convolution layer of the backbone network of the matting model to obtain an original image matrix that is equal in size to the original image.
  • the matrix values of the original image matrix include 0 and 1, where 0 represents the background and 1 represents the foreground. It should be noted that the equal size here means that both the width and the height of the original image matrix are the same as those of the original image.
  • step S302 feature extraction is performed on the original image matrix through the second convolutional layer to obtain all matrix values with a value of 1, and these matrix values with a value of 1 are included in the same set, and the matrix values in this set are predicted foreground values.
  • step S303 the pixel values with predicted foreground values of 1 are extracted from the original image through the third convolutional layer of the backbone network, and the image formed by these pixel values is the initial foreground image, so as to realize the preliminary image matting process on the original image and obtain the initial foreground image.
  • step S103 may include but not limited to include steps S401 to S403:
  • Step S401 obtaining the edge prediction value of each pixel in the initial foreground image
  • Step S402 according to the size relationship between the edge prediction value and the preset edge prediction threshold, determine the edge pixel points of the initial foreground image
  • Step S403 filter the edge pixels of the initial foreground image to obtain the target foreground image.
  • step S401 is executed.
  • the edge prediction information of each pixel can be calculated. Therefore, in the process of local refinement of the initial foreground image, the edge prediction value contained in the edge prediction information can be obtained, and the extent to which the pixel belongs to the edge can be identified through the edge prediction value.
  • step S402 and step S403 are executed, by setting the edge prediction threshold in advance, comparing the edge prediction value with the edge prediction threshold, thereby filtering the pixels in the edge region.
  • the preset edge prediction threshold may be 0.5, 0.3 and so on.
  • the edge prediction value is less than or equal to the edge prediction threshold, it indicates that the pixel belongs to the initial foreground image; if the edge prediction value is greater than the edge prediction threshold, it indicates that the pixel does not belong to the initial foreground image, and the pixel is regarded as an edge pixel, and the edge pixel is removed to realize the filtering and impurity removal of the pixels of the initial foreground image, and the image composed of the remaining pixels is used as the target foreground image, so as to realize the local refinement of the initial foreground image and improve the image quality of the target foreground image.
  • the image processing method further includes pre-training an image reconstruction model, specifically including but not limited to steps S501 to S506:
  • Step S501 acquiring a sample image, wherein the resolution of the sample image is lower than that of a preset reference image
  • Step S502 performing preliminary matting processing and local refinement processing on the sample image to obtain a sample foreground image
  • Step S503 inputting the sample foreground image into the initial model
  • Step S504 perform super-resolution reconstruction processing on the sample foreground image through the generation network of the initial model, and generate a sample intermediate foreground image corresponding to the sample foreground image, and the resolution of the sample intermediate foreground image is higher than that of the sample foreground image;
  • Step S505 calculate the similarity between the sample intermediate foreground image and the reference sample foreground image through the discriminant network of the initial model, and obtain the similarity probability value;
  • Step S506 optimizing the loss function of the initial model according to the similarity probability value to update the initial model to obtain an image reconstruction model.
  • the sample image can be obtained by computer tomography (Computed Tomo-graphy, CT) or magnetic resonance imaging (Magnetic Resonance Imaging, MRI), wherein the resolution of the sample image is lower than the resolution of the preset reference image, that is, the sample image is a low-resolution image.
  • computer tomography Computer tomography
  • Magnetic resonance Imaging Magnetic Resonance Imaging
  • step S502 is executed to perform preliminary matting processing and local optimization processing on the sample image through the backbone network of the pre-trained matting model and the fine-tuning network to obtain the sample foreground image.
  • the specific process is the same as the above-mentioned matting process of the original image, and will not be repeated here.
  • step S503 is executed to input the sample image into the initial model.
  • the initial model is the SRGAN network, which is a generative confrontation network for super-resolution reconstruction.
  • the SRGAN network mainly includes two parts, the generator and the discriminator.
  • the generator is mainly used to convert the input image into a high-definition image
  • the discriminator is mainly used to judge whether the generated high-definition image is true or false.
  • the generated high-definition image and the reference image are about to be similarly calculated.
  • step S504 is executed, and the low-resolution sample foreground image can be converted into a higher-resolution sample intermediate foreground image through the generating function in the generating network, wherein the generating function of the generating network can be expressed as shown in formula (1):
  • G() represents the sample intermediate foreground image
  • I HR represents the high-resolution reference foreground image
  • I LR represents the low-resolution sample foreground image
  • step S505 is executed to compare the sample intermediate foreground image with the reference foreground image through the discriminant network.
  • the sample intermediate foreground image can be continuously optimized by calculating the true similarity probability of the sample intermediate foreground image, so that the sample intermediate foreground image is as identical as possible to the reference foreground image.
  • the difference between the two can be judged by calculating the MSE (mean square error) of the reference foreground image and the intermediate foreground image; the calculation formula is shown in formula (2):
  • min means that the model loss of the generative network is the smallest, and max means that the model loss of the discriminant network is the largest;
  • D means the discriminative network, G means the generative network, and D(G(I LR )) means that the discriminative network judges the authenticity of the sample intermediate foreground image generated by the generative network, and obtains the true similarity value of the sample intermediate foreground image, and continuously optimizes the sample intermediate foreground image according to the similarity probability value.
  • step S506 is performed to calculate the model loss of the initial model according to the similarity probability value, that is, the loss value, and then use the gradient descent method to backpropagate the loss value, feed the loss value back to the initial model, modify the model parameters of the initial model, and repeat the above process until the loss value meets the preset iteration condition, wherein the preset iteration condition is that the number of iterations can reach the preset value, or the variance of the loss function change is smaller than the preset threshold.
  • the backpropagation can be stopped, and the final model parameter can be used as the final model parameter, and the update of the initial model can be stopped to obtain the image reconstruction model.
  • an image reconstruction model for performing image reconstruction on a low-resolution image to generate a high-resolution image can be obtained, and the image reconstruction model can achieve the purpose of improving image quality by means of super-resolution reconstruction.
  • step S104 also includes but is not limited to steps S601 to S602:
  • Step S601 performing super-resolution reconstruction processing on the target foreground image through the generation network of the image reconstruction model to obtain an intermediate foreground image
  • step S602 the intermediate foreground image is optimized through the discrimination network of the image reconstruction model and the preset reference foreground image to obtain a standard foreground image.
  • step S601 the low-resolution target foreground image can be converted into a higher-resolution intermediate foreground image through the generating function in the generating network, where the generating function of the generating network can be expressed as shown in formula (3):
  • G() represents the intermediate foreground image
  • I HR represents the high-resolution reference foreground image
  • I LR represents the low-resolution target foreground image
  • the intermediate foreground image is compared with the reference foreground image through the discrimination network.
  • the intermediate foreground image can be continuously optimized by calculating the probability that the intermediate foreground image is true, so that the intermediate foreground image is as identical as the reference foreground image as possible.
  • the difference between the two can be judged by calculating the MSE (mean square error) of the reference foreground image and the intermediate foreground image; the calculation formula is shown in formula (4):
  • min means that the model loss of the generative network is the smallest, and max means that the model loss of the discriminant network is the largest;
  • D means the discriminative network, G means the generative network, and D(G(I LR )) means that the discriminative network judges whether the intermediate foreground image generated by the generating network is true or not, and obtains the similarity probability value of the intermediate foreground image as true, and continuously optimizes the intermediate foreground image according to the similarity probability value until the similarity probability value is greater than or equal to the preset similarity probability threshold, and outputs the standard foreground image, and the similarity between the output standard foreground image and the reference foreground image can meet the requirements.
  • step S105 may also include but not limited to include steps S701 to S703:
  • Step S701 performing feature extraction on the standard foreground image to obtain the foreground feature value, and performing feature extraction on the background image to obtain the background feature value;
  • Step S702 performing XOR calculation on the preset channel bitmap according to the foreground feature value and the background feature value to obtain the target channel bitmap;
  • Step S703 performing image fusion on the standard foreground image and the background image according to the target channel bitmap to obtain the target image.
  • step S701 is first performed to perform feature extraction on the standard foreground image and the background image through the sigmoid function, transform the foreground feature value of the standard foreground image to between 0 and 1, and transform the background feature value of the background image to between 0 and 1.
  • the foreground feature value of the pixel on the standard foreground map is represented as 1
  • the background feature value of the pixel point on the background map is represented as 0.
  • step S702 is executed to construct an alpha channel bitmap in advance, and the size of the channel bitmap is the same as that of the original image, that is, the height, width and number of channels of the channel bitmap are the same as the original image.
  • XOR calculation of 0 and 1 is performed on the alpha channel bitmap, that is, a value of 0 or 1 is marked on the position corresponding to each pixel point on the alpha channel bitmap, and the value is used to indicate whether the pixel point at this position is displayed, and the target channel bitmap can be obtained through this process.
  • step S703 is executed, when performing image fusion on the standard foreground image and the background image, according to the mark on the target channel bitmap, it can be conveniently determined whether to display the pixels of the standard foreground image or the pixels of the background image on the new image, and finally obtain the target image.
  • the original image to be processed is acquired; the original image is preliminarily matted through the backbone network of the pre-trained matting model to obtain the initial foreground image; the edge area of the initial foreground image is locally refined through the fine-tuning network of the matting model to obtain the target foreground image.
  • the foreground image with better matting effect can be obtained through the matting model.
  • the pre-trained image reconstruction model is used to perform super-resolution reconstruction on the target foreground image to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than that of the target foreground image, and a clearer standard foreground image can be obtained, which strengthens the matting effect from the visual effect.
  • the standard foreground image and the preset background image are fused to obtain the target image, which makes the target image have a higher resolution, thereby improving the image quality.
  • the embodiment of the present application also provides an image processing device, which can realize the above image processing method, and the image processing device includes:
  • the preliminary image matting module 802 is used to perform initial image matting processing on the original image through the backbone network of the preset matting model to obtain an initial foreground image;
  • the local refinement module 803 is used to perform local refinement processing on the edge area of the initial foreground image through the fine-tuning network of the matting model to obtain the target foreground image;
  • a super-resolution reconstruction module 804 configured to perform super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
  • the image fusion module 805 is configured to perform image fusion on the standard foreground image and the preset background image to obtain the target image.
  • the specific implementation manner of the image processing device is basically the same as the specific embodiment of the above image processing method, and will not be repeated here.
  • the embodiment of the present application also provides an electronic device.
  • the electronic device includes: a memory, a processor, a program stored in the memory and operable on the processor, and a data bus for realizing connection and communication between the processor and the memory.
  • the program is executed by the processor, the above image processing method is implemented.
  • the electronic device may be any intelligent terminal including a tablet computer, a vehicle-mounted computer, and the like.
  • FIG. 9 illustrates a hardware structure of an electronic device in another embodiment.
  • the electronic device includes:
  • the processor 901 may be implemented by a general-purpose CPU (Central Processing Unit, central processing unit), microprocessor, application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application;
  • a general-purpose CPU Central Processing Unit, central processing unit
  • microprocessor microprocessor
  • application-specific integrated circuit Application Specific Integrated Circuit, ASIC
  • ASIC Application Specific Integrated Circuit
  • the memory 902 may be implemented in the form of a read-only memory (ReadOnlyMemory, ROM), a static storage device, a dynamic storage device, or a random access memory (RandomAccessMemory, RAM).
  • the memory 902 can store an operating system and other application programs.
  • the relevant program codes are stored in the memory 902, and are invoked by the processor 901 to execute an image processing method, wherein the image processing method includes: obtaining the original image to be processed; performing preliminary matting processing on the original image through the backbone network of the pre-trained matting model to obtain the initial foreground image; Carry out super-resolution reconstruction processing on the target foreground image through the pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image; image fusion is performed on the standard foreground image and the preset background image to obtain the target image;
  • the input/output interface 903 is used to realize information input and output
  • the communication interface 904 is used to realize the communication interaction between the device and other devices, and the communication can be realized through a wired method (such as USB, network cable, etc.), or can be realized through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.);
  • bus 905 for transferring information between various components of the device (such as processor 901, memory 902, input/output interface 903 and communication interface 904);
  • the processor 901 , the memory 902 , the input/output interface 903 and the communication interface 904 are connected to each other within the device through the bus 905 .
  • An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium for computer-readable storage.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement an image processing method, wherein the image processing method includes: obtaining an original image to be processed; performing preliminary matting processing on the original image through a backbone network of a pre-trained matting model to obtain an initial foreground image; performing local refinement processing on an edge region of the initial foreground image through a fine-tuning network of the matting model to obtain a target foreground image; performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, The resolution of the foreground image is higher than that of the target foreground image; image fusion is performed on the standard foreground image and the preset background image to obtain the target image.
  • memory can be used to store non-transitory software programs and non-transitory computer-executable programs.
  • the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices.
  • the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • FIGS. 1-7 do not limit the embodiments of the present application, and may include more or fewer steps than those shown in the illustrations, or combine some steps, or different steps.

Abstract

Embodiments of the present application relate to the technical field of image processing, and provide an image processing method and apparatus, an electronic device, and a storage medium. The method comprises: obtaining an original image to be processed; performing preliminary matting processing on the original image by means of a backbone network of a pre-trained matting model to obtain an initial foreground image; performing local refinement processing on an edge area of the initial foreground image by means of a fine-tuning network of the matting model to obtain a target foreground image; performing super-resolution reconstruction processing on the target foreground image by means of a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than that of the target foreground image; and performing image fusion on the standard foreground image and a preset background image to obtain a target image. The embodiments of the present application can improve the image quality of the matted target image.

Description

图像处理方法、装置、电子设备及存储介质Image processing method, device, electronic device and storage medium
本申请要求于2022年1月18日提交中国专利局、申请号为202210057041.9,发明名称为“图像处理方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202210057041.9 and the invention title "image processing method, device, electronic equipment and storage medium" submitted to the China Patent Office on January 18, 2022, the entire contents of which are incorporated in this application by reference.
技术领域technical field
本申请涉及人工智能及图像处理技术领域,尤其涉及一种图像处理方法、装置、电子设备及存储介质。The present application relates to the technical fields of artificial intelligence and image processing, and in particular to an image processing method, device, electronic equipment, and storage medium.
背景技术Background technique
目前,许多方法常常依赖于蒙版数据集来学习抠图,例如上下文感知抠图、索引抠图、基于采样的抠图和基于不透明度传播的抠图等等。Currently, many methods often rely on masked datasets to learn matting, such as context-aware matting, indexed matting, sampling-based matting, and opacity propagation-based matting, etc.
技术问题technical problem
以下是发明人意识到的现有技术的技术问题:现有方法的性能取决于标记的质量,往往会使得抠图后的图像质量较低。因此,如何提供一种图像处理方法,能够提高抠图后的图像质量,成为了亟待解决的技术问题。The following is the technical problem of the prior art realized by the inventor: the performance of the existing method depends on the quality of the marking, which often results in lower image quality after matting. Therefore, how to provide an image processing method that can improve the image quality after matting has become a technical problem to be solved urgently.
技术解决方案technical solution
第一方面,本申请实施例提出了一种图像处理方法,所述方法包括:In the first aspect, the embodiment of the present application proposes an image processing method, the method comprising:
获取待处理的原始图像;Get the original image to be processed;
通过预先训练的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图;Preliminary matting processing is performed on the original image through the backbone network of the pre-trained matting model to obtain an initial foreground image;
通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图;performing local refinement processing on the edge area of the initial foreground image through the fine-tuning network of the cutout model to obtain the target foreground image;
通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,其中,所述标准前景图的分辨率高于所述目标前景图的分辨率;performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
对所述标准前景图和预设的背景图进行图像融合,得到目标图像。Image fusion is performed on the standard foreground image and the preset background image to obtain a target image.
第二方面,本申请实施例提出了一种图像处理装置,所述装置包括:In the second aspect, the embodiment of the present application proposes an image processing device, the device includes:
原始图像获取模块,用于获取待处理的原始图像;The original image acquisition module is used to acquire the original image to be processed;
初步抠图模块,用于通过预设的抠图模型的骨干网络对所述原始图像进行初始抠图处理,得到初始前景图;The preliminary image matting module is used to perform initial image matting processing on the original image through the backbone network of the preset image matting model to obtain an initial foreground image;
局部细化模块,用于通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图;A local refinement module, configured to perform local refinement processing on the edge region of the initial foreground image through the fine-tuning network of the matting model to obtain a target foreground image;
超分辨率重构模块,用于通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,其中,所述标准前景图的分辨率高于所述目标前景图的分辨率;A super-resolution reconstruction module, configured to perform super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
图像融合模块,用于对所述标准前景图和预设的背景图进行图像融合,得到目标图像。The image fusion module is used to perform image fusion on the standard foreground image and the preset background image to obtain the target image.
第三方面,本申请实施例提出了一种电子设备,所述电子设备包括存储器、处理器、存储在所述存储器上并可在所述处理器上运行的程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,所述程序被所述处理器执行时实现一种图像处理方法,其中,所述图像处理方法包括:获取待处理的原始图像;通过预先训练的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图;通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图;通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,其中,所述标准前景图的分辨率高于 所述目标前景图的分辨率;对所述标准前景图和预设的背景图进行图像融合,得到目标图像。In a third aspect, an embodiment of the present application proposes an electronic device, the electronic device includes a memory, a processor, a program stored in the memory and operable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, an image processing method is implemented, wherein the image processing method includes: obtaining an original image to be processed; performing preliminary matting processing on the original image through a pre-trained backbone network of a matting model to obtain an initial foreground image; Carry out local thinning processing to obtain the target foreground image; carry out super-resolution reconstruction processing on the target foreground image by a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image; image fusion is performed on the standard foreground image and the preset background image to obtain the target image.
第四方面,本申请实施例提出了一种存储介质,所述存储介质为计算机可读存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现一种图像处理方法,其中,所述图像处理方法包括:获取待处理的原始图像;通过预先训练的抠图模型的骨干网络对原始图像进行初步抠图处理,得到初始前景图;通过抠图模型的微调网络对初始前景图的边缘区域进行局部细化处理,得到目标前景图;通过预先训练的图像重构模型对目标前景图进行超分辨率重构处理,得到标准前景图,其中,标准前景图的分辨率高于目标前景图的分辨率;对标准前景图和预设的背景图进行图像融合,得到目标图像。In a fourth aspect, an embodiment of the present application proposes a storage medium, the storage medium is a computer-readable storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement an image processing method, wherein the image processing method includes: obtaining an original image to be processed; performing preliminary matting processing on the original image through a pre-trained backbone network of a matting model to obtain an initial foreground image; The target foreground image; the target foreground image is subjected to super-resolution reconstruction processing through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image; image fusion is performed on the standard foreground image and the preset background image to obtain the target image.
有益效果Beneficial effect
本申请提出的图像处理方法、装置、电子设备及存储介质,其通过抠图模型能够得到抠图效果较好的前景图像。进而,通过预先训练的图像重构模型对目标前景图进行超分辨率重构处理,能够获得更为清晰的标准前景图,从视觉效果上强化了抠图效果。最后对标准前景图和预设的背景图进行图像融合,使得目标图像具有较高的分辨率,从而提高了图像质量。The image processing method, device, electronic device and storage medium proposed in the present application can obtain a foreground image with a better matting effect through a matting model. Furthermore, by performing super-resolution reconstruction on the target foreground image through the pre-trained image reconstruction model, a clearer standard foreground image can be obtained, and the matting effect is enhanced visually. Finally, image fusion is performed on the standard foreground image and the preset background image, so that the target image has a higher resolution, thereby improving the image quality.
附图说明Description of drawings
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present application, and constitute a part of the specification, and are used together with the embodiments of the present application to explain the technical solution of the present application, and do not constitute a limitation to the technical solution of the present application.
图1是本申请实施例提供的图像处理方法的流程图;Fig. 1 is a flow chart of the image processing method provided by the embodiment of the present application;
图2是本申请实施例提供的图像处理方法的另一流程图;Fig. 2 is another flow chart of the image processing method provided by the embodiment of the present application;
图3是图1中的步骤S102的流程图;Fig. 3 is the flowchart of step S102 in Fig. 1;
图4是图1中的步骤S103的流程图;Fig. 4 is the flowchart of step S103 in Fig. 1;
图5是本申请实施例提供的图像处理方法的另一流程图;Fig. 5 is another flow chart of the image processing method provided by the embodiment of the present application;
图6是图1中的步骤S104的流程图;Fig. 6 is the flowchart of step S104 in Fig. 1;
图7是图1中的步骤S105的流程图;Fig. 7 is the flowchart of step S105 in Fig. 1;
图8是本申请实施例提供的图像处理装置的结构示意图;FIG. 8 is a schematic structural diagram of an image processing device provided by an embodiment of the present application;
图9是本申请实施例提供的电子设备的硬件结构示意图。FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application.
需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although the functional modules are divided in the schematic diagram of the device, and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the flow chart. The terms "first", "second" and the like in the specification and claims and the above drawings are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
首先,对本申请中涉及的若干名词进行解析:First, analyze some nouns involved in this application:
图像抠图(image matting),指的是对于一张给定的图片,网络可以自动的提取出其中的前景部分,删除背景部分。是图片增强领域的一种常用方法。Image matting means that for a given picture, the network can automatically extract the foreground part and delete the background part. It is a common method in the field of image enhancement.
图像融合(Image Fusion)是指将多源信道所采集到的关于同一目标的图像数据经过图像处理和计算机技术等,最大限度的提取各自信道中的有利信息,最后综合成高质量的图像,以提高图像信息的利用率、改善计算机解译精度和可靠性、提升原始图像的空间分辨率和光 谱分辨率,利于监测。图像融合是指将多幅图像,在经过去噪、配准等预处理后,再依据某些融合规则合成一幅图像的过程。融合图像对目标的描述更清晰和准确,更适合图像后续的处理。(多传感器图像融合(可见光图像和红外图像融合)、单一传感器多聚焦图像融合)。Image Fusion refers to the process of image processing and computer technology on the image data of the same target collected by multi-source channels to maximize the extraction of beneficial information in each channel, and finally synthesize high-quality images to improve the utilization of image information, improve the accuracy and reliability of computer interpretation, and improve the spatial resolution and spectral resolution of the original image, which is conducive to monitoring. Image fusion refers to the process of combining multiple images into one image according to certain fusion rules after preprocessing such as denoising and registration. The fused image can describe the target more clearly and accurately, which is more suitable for the subsequent processing of the image. (multi-sensor image fusion (visible light image and infrared image fusion), single sensor multi-focus image fusion).
图像融合需要遵守的3个基本原则:There are three basic principles to be followed in image fusion:
1)融合后图像要含有所有源图像的明显突出信息;1) The fused image should contain obvious salient information of all source images;
2)融合后图像不能加入任何的人为信息;2) The fused image cannot add any artificial information;
3)对源图像中不感兴趣的信息,如噪声要尽可能多地抑制其出现在融合图像中。3) Information that is not of interest in the source image, such as noise, should be suppressed as much as possible from the fusion image.
按照信息提取的层次从低到高的原则可划分为3类:像素级图像融合、特征级图像融合和决策级图像融合。According to the principle of information extraction level from low to high, it can be divided into three categories: pixel-level image fusion, feature-level image fusion and decision-level image fusion.
像素级融合依据一定的融合规则直接对源图像基于像素的特征进行融合,最后生成一幅融合图像的过程。它保留源图像的原始信息最多、融合准确性最高,但该类方法也存在着信息量最大、对硬件设备和配准的要求较高、计算时间长和实时处理差等缺点。Pixel-level fusion directly fuses the pixel-based features of the source image according to certain fusion rules, and finally generates a fusion image. It retains the most original information of the source image and the highest fusion accuracy, but this type of method also has the disadvantages of the largest amount of information, high requirements for hardware equipment and registration, long calculation time and poor real-time processing.
特征级图像融合是首先对源图像进行简单的预处理,再通过一定模型对源图像的角点、边缘、形状等特征信息进行提取,并通过合适的融合规则进行选取,再依据一定的融合规则对这些特征信息进行选取和融合,最后生成一幅融合图像的过程。该类融合方法融合的对象是源图像的特征信息,所以对图像配准环节的要求没有像素级融合要求的严格。同时,该类方法提取了源图像的特征信息,对图像的细节信息进行了压缩,增强其自身实时处理能力,并尽最大可能为决策分析提供所需要的特征信息。相对于前一级图像融合方法,特征级图像融合方法的精度一般。Feature-level image fusion is the process of firstly performing simple preprocessing on the source image, then extracting feature information such as corners, edges, and shapes of the source image through a certain model, and selecting through appropriate fusion rules, and then selecting and fusing these feature information according to certain fusion rules, and finally generating a fusion image. The fusion object of this type of fusion method is the feature information of the source image, so the requirements for image registration are not as strict as those for pixel-level fusion. At the same time, this type of method extracts the characteristic information of the source image, compresses the detailed information of the image, enhances its own real-time processing ability, and provides the required characteristic information for decision analysis as much as possible. Compared with the previous level image fusion method, the accuracy of the feature level image fusion method is average.
决策级图像是在进行融合之前,每一源图像都已独立地完成了分类、识别等自身的决策任务,融合过程是通过对前面每一独立决策结果进行综合分析,从而生成全局最优决策并依此形成融合图像的过程。这种融合方法具有灵活度高、通信量小、实时性最好、容错能力强、抗干扰能力强等优点。但是决策级图像融合需要首先对各个图像分别进行决策判断,导致最终融合前的处理任务太多、前期的预处理代价高。The decision-level image is a process in which each source image has independently completed its own decision-making tasks such as classification and recognition before fusion. The fusion process is a process in which a global optimal decision is generated by comprehensively analyzing the results of each independent decision in the front and then a fused image is formed accordingly. This fusion method has the advantages of high flexibility, small communication volume, best real-time performance, strong fault tolerance and strong anti-interference ability. However, decision-level image fusion needs to make decisions and judgments on each image separately, resulting in too many processing tasks before the final fusion and high preprocessing costs in the early stage.
传统的非基于学习的抠图算法需要手动标记三色图,并求解三色图的未知区域中的α蒙版。目前,许多方法常常依赖于蒙版数据集来学习抠图,例如上下文感知抠图、索引抠图、基于采样的抠图和基于不透明度传播的抠图等等。这些方法的性能取决于标记的质量,往往会使得抠图后的图像质量较低。因此,如何提供一种图像处理方法,能够提高抠图后的图像质量,成为了亟待解决的技术问题。Traditional non-learning based matting algorithms need to manually label the three-color image and solve the alpha mask in the unknown region of the three-color image. Currently, many methods often rely on masked datasets to learn matting, such as context-aware matting, indexed matting, sampling-based matting, and opacity propagation-based matting, etc. The performance of these methods depends on the quality of the labeling, which tends to result in lower image quality after matting. Therefore, how to provide an image processing method that can improve the image quality after matting has become a technical problem to be solved urgently.
基于此,本申请实施例提供了一种图像处理方法、装置、电子设备及存储介质,旨在提高抠图后的目标图像的图像质量。Based on this, embodiments of the present application provide an image processing method, device, electronic device, and storage medium, aiming at improving the image quality of a matted target image.
本申请实施例提供的图像处理方法、装置、电子设备及存储介质,具体通过如下实施例进行说明,首先描述本申请实施例中的图像处理方法。The image processing method, device, electronic device, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the image processing method in the embodiments of the present application is described.
本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。The embodiments of the present application may acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
本申请实施例提供的图像处理方法,涉及人工智能技术领域。本申请实施例提供的图像处理方法可应用于终端中,也可应用于服务器端中,还可以是运行于终端或服务器端中的软件。在一些实施例中,终端可以是智能手机、平板电脑、笔记本电脑、台式计算机等;服务器端可以配置成独立的物理服务器,也可以配置成多个物理服务器构成的服务器集群或者分布式系统,还可以配置成提供云服务、云数据库、云计算、云函数、云存储、网络服务、云 通信、中间件服务、域名服务、安全服务、CDN以及大数据和人工智能平台等基础云计算服务的云服务器;软件可以是实现图像处理方法的应用等,但并不局限于以上形式。The image processing method provided in the embodiment of the present application relates to the technical field of artificial intelligence. The image processing method provided in the embodiment of the present application may be applied to a terminal, may also be applied to a server, and may also be software running on the terminal or the server. In some embodiments, the terminal can be a smart phone, tablet computer, notebook computer, desktop computer, etc.; the server can be configured as an independent physical server, or can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms;
图1是本申请实施例提供的图像处理方法的一个可选的流程图,图1中的方法可以包括但不限于包括步骤S101至步骤S105。Fig. 1 is an optional flow chart of the image processing method provided by the embodiment of the present application. The method in Fig. 1 may include but not limited to steps S101 to S105.
步骤S101,获取待处理的原始图像;Step S101, acquiring the original image to be processed;
步骤S102,通过预先训练的抠图模型的骨干网络对原始图像进行初步抠图处理,得到初始前景图;Step S102, performing preliminary matting processing on the original image through the backbone network of the pre-trained matting model to obtain an initial foreground image;
步骤S103,通过抠图模型的微调网络对初始前景图的边缘区域进行局部细化处理,得到目标前景图;In step S103, the edge area of the initial foreground image is locally refined through the fine-tuning network of the matting model to obtain the target foreground image;
步骤S104,通过预先训练的图像重构模型对目标前景图进行超分辨率重构处理,得到标准前景图,其中,标准前景图的分辨率高于目标前景图的分辨率;Step S104, performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
步骤S105,对标准前景图和预设的背景图进行图像融合,得到目标图像。Step S105, performing image fusion on the standard foreground image and the preset background image to obtain the target image.
本申请实施例所示意的步骤S101至步骤S105中,通过预先训练的抠图模型的骨干网络对原始图像进行初步抠图处理,得到初始前景图;通过抠图模型的微调网络对初始前景图的边缘区域进行局部细化处理,得到目标前景图,这样一来,通过抠图模型能够得到抠图效果较好的前景图像。进而,通过预先训练的图像重构模型对目标前景图进行超分辨率重构处理,得到标准前景图,其中,标准前景图的分辨率高于目标前景图的分辨率,能够获得更为清晰的标准前景图,从视觉效果上强化了抠图效果。最后对标准前景图和预设的背景图进行图像融合,得到目标图像,使得目标图像具有较高的分辨率,从而提高了图像质量。In steps S101 to S105 shown in the embodiment of the present application, the pre-trained backbone network of the matting model is used to perform preliminary matting processing on the original image to obtain the initial foreground image; the fine-tuning network of the matting model is used to locally refine the edge area of the initial foreground image to obtain the target foreground image. In this way, the foreground image with better matting effect can be obtained through the matting model. Furthermore, the pre-trained image reconstruction model is used to perform super-resolution reconstruction on the target foreground image to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than that of the target foreground image, and a clearer standard foreground image can be obtained, which strengthens the matting effect from the visual effect. Finally, the standard foreground image and the preset background image are fused to obtain the target image, which makes the target image have a higher resolution, thereby improving the image quality.
在一些实施例的步骤S101中,待处理的原始图像可以为三维图像;在一些实施例,该三维图像可以是通过计算机断层扫描(Computed Tomo-graphy,-CT),在另一项实施例,该三维图像还可以是通过核磁共振成像(Magnetic Resonance Imaging,MRI)得来。In step S101 of some embodiments, the original image to be processed may be a three-dimensional image; in some embodiments, the three-dimensional image may be obtained by computer tomography (Computed Tomo-graphy, -CT), and in another embodiment, the three-dimensional image may also be obtained by magnetic resonance imaging (Magnetic Resonance Imaging, MRI).
在一些医学应用场景中,上述的待处理的原始图像可以为医学影像,原始图像包含的对象所属类型为病灶,即机体上发生病变的部分。医学影像是指为了医疗或医学研究,以非侵入方式取得的内部组织,比如,CT(Computed Tomography,电子计算机断层扫描)、MRI(Magnetic Resonance Imaging,磁共振成像)、US(ultrasonic,超声)、X光图像以及光学摄影灯由医学仪器生成的图像。In some medical application scenarios, the above-mentioned original image to be processed may be a medical image, and the type of object contained in the original image is a lesion, that is, a part of the body where a lesion occurs. Medical imaging refers to internal tissues obtained in a non-invasive manner for medical treatment or medical research, such as CT (Computed Tomography, computerized tomography), MRI (Magnetic Resonance Imaging, magnetic resonance imaging), US (ultrasonic, ultrasound), X-ray images, and images generated by medical instruments with optical photography lights.
请参阅图2,在一些实施例中,在步骤S102之前,该图像处理方法还包括预先训练抠图模型,具体包括但不限于包括步骤S201至步骤S207:Please refer to FIG. 2 , in some embodiments, before step S102, the image processing method further includes pre-training the matting model, specifically including but not limited to steps S201 to S207:
步骤S201,获取样本图像,其中,样本图像的分辨率低于预设的参考图像的分辨率;Step S201, acquiring a sample image, wherein the resolution of the sample image is lower than that of a preset reference image;
步骤S202,将样本图像输入至抠图模型中;Step S202, inputting the sample image into the cutout model;
步骤S203,通过骨干网络对样本图像进行卷积处理,得到样本图像矩阵,并对样本图像矩阵进行特征提取,得到样本预测前景值;Step S203, performing convolution processing on the sample image through the backbone network to obtain a sample image matrix, and performing feature extraction on the sample image matrix to obtain a predicted foreground value of the sample;
步骤S204,通过骨干网络和样本预测前景值对样本图像进行初步抠图处理,得到样本前景图;Step S204, performing preliminary matting processing on the sample image through the backbone network and the predicted foreground value of the sample to obtain the sample foreground image;
步骤S205,通过微调网络获取样本前景图中每一样本像素点的样本边缘预测值;Step S205, obtaining the sample edge prediction value of each sample pixel in the sample foreground map through the fine-tuning network;
步骤S206,根据样本边缘预测值和预设的边缘预测阈值的大小关系,确定样本边缘像素点的个数;Step S206, according to the size relationship between the sample edge prediction value and the preset edge prediction threshold, determine the number of sample edge pixel points;
步骤S207,根据样本边缘像素点的个数对抠图模型的损失函数进行优化,以更新抠图模型。Step S207, optimize the loss function of the cutout model according to the number of sample edge pixels, so as to update the cutout model.
具体地,在步骤S201中,可以通过计算机断层扫描(Computed Tomo-graphy,CT)或者核磁共振成像(Magnetic Resonance Imaging,MRI)得到样本图像,其中该样本图像的分辨率低于预设的参考图像的分辨率,即样本图像为低分辨率图像。Specifically, in step S201, the sample image can be obtained by computer tomography (Computed Tomo-graphy, CT) or magnetic resonance imaging (Magnetic Resonance Imaging, MRI), wherein the resolution of the sample image is lower than the resolution of the preset reference image, that is, the sample image is a low-resolution image.
进一步地,执行步骤S202,将样本图像输入至抠图模型中。Further, step S202 is executed to input the sample image into the matting model.
需要说明的是,该抠图模型可以包括已开源的抠图网络Background Matting V2,该抠图模型主要由两部分组成,即骨干网络和微调网络,其中,骨干网络为经过调整变形的残差 网络,该骨干网络包括3个卷积层(即第一卷积层、第二卷积层以及第三卷积层),每一卷积层的卷积核大小设置为3×3,骨干网络包含六个输入通道。It should be noted that the matting model can include the open-source matting network Background Matting V2. The matting model is mainly composed of two parts, namely a backbone network and a fine-tuning network. The backbone network is an adjusted and deformed residual network. The backbone network includes 3 convolutional layers (namely, the first convolutional layer, the second convolutional layer, and the third convolutional layer). The convolution kernel size of each convolutional layer is set to 3×3, and the backbone network contains six input channels.
进一步地,执行步骤S203和S204,通过骨干网络的第一卷积层对样本图像进行卷积处理,可以得到一个与样本图像大小相等的样本图像矩阵,该样本图像矩阵的矩阵值包含0和1,其中,0表示背景,1表示前景。通过第二卷积层对样本图像矩阵进行特征提取,获取所有数值为1的矩阵值,将这些数值为1的矩阵值纳入同一集合,该集合内的矩阵值即为样本预测前景值。通过骨干网络的第三卷积层在原始图像上抠取出预测前景值为1的像素值,这些像素值构成的图像即为样本前景图。Further, step S203 and S204 are executed, and the sample image is convoluted through the first convolutional layer of the backbone network to obtain a sample image matrix equal in size to the sample image, and the matrix values of the sample image matrix include 0 and 1, wherein 0 represents the background and 1 represents the foreground. The feature extraction of the sample image matrix is performed through the second convolutional layer, and all matrix values with a value of 1 are obtained, and these matrix values with a value of 1 are included in the same set, and the matrix values in this set are the predicted foreground values of the sample. Through the third convolutional layer of the backbone network, the pixel values with a predicted foreground value of 1 are extracted from the original image, and the image formed by these pixel values is the sample foreground image.
进一步地,执行步骤S205和S206,由于通过主干网络对样本图像进行初步抠图处理时,可以计算得到每一样本像素点的样本边缘预测信息,因而,可以获取样本边缘预测信息中包含的样本边缘预测值,通过样本边缘预测值来识别出该样本像素点属于边缘的程度。通过预先设置边缘预测阈值,将样本边缘预测值与边缘预测阈值进比对,从而对样本前景图的边缘区域的样本像素点进行筛选。若样本边缘预测值小于或者等于边缘预测阈值,则表明该样本像素点属于样本前景图;若样本边缘预测值大于边缘预测阈值,则表明该样本像素点不属于样本前景图,将该样本像素点作为样本边缘像素点,从而统计确定出样本边缘像素点的个数。Further, by executing steps S205 and S206, since the sample edge prediction information of each sample pixel point can be calculated when the sample image is preliminarily matted through the backbone network, the sample edge prediction value contained in the sample edge prediction information can be obtained, and the degree to which the sample pixel point belongs to the edge can be identified through the sample edge prediction value. By setting the edge prediction threshold in advance, the sample edge prediction value is compared with the edge prediction threshold, so as to filter the sample pixels in the edge area of the sample foreground image. If the sample edge prediction value is less than or equal to the edge prediction threshold, it indicates that the sample pixel point belongs to the sample foreground image; if the sample edge prediction value is greater than the edge prediction threshold value, it indicates that the sample pixel point does not belong to the sample foreground image, and the sample pixel point is used as the sample edge pixel point, thereby statistically determining the number of sample edge pixel points.
最后,执行步骤S207,将样本边缘像素点的个数与预设的样本边缘像素点个数阈值进行比对,计算抠图模型的模型损失,并将模型损失进行反向传播,例如,可以根据损失函数进行反向传播,以通过优化损失函数更新抠图模型,主要为更新抠图模型的内部参数(也即损失参数)。可以理解的是,反向传播原理可以应用常规的反向传播原理,本申请实施例不做限定。通过不断地重复上述过程,直至样本边缘像素点的个数小于或者等于样本边缘像素点个数阈值,或者迭代次数满足预设次数,完成对抠图模型的损失函数进行优化,停止更新抠图模型。Finally, step S207 is performed to compare the number of sample edge pixels with the preset threshold number of sample edge pixels, calculate the model loss of the cutout model, and backpropagate the model loss. For example, backpropagation can be performed according to the loss function to update the cutout model by optimizing the loss function, mainly to update the internal parameters of the cutout model (that is, loss parameters). It can be understood that conventional backpropagation principles may be applied to the backpropagation principle, which is not limited in this embodiment of the present application. By continuously repeating the above process, until the number of sample edge pixels is less than or equal to the threshold of the number of sample edge pixels, or the number of iterations meets the preset number of times, the loss function optimization of the cutout model is completed, and the update of the cutout model is stopped.
请参阅图3,在一些实施例中,步骤S102可以包括但不限于包括步骤S301至步骤S303:Referring to FIG. 3, in some embodiments, step S102 may include but not limited to include steps S301 to S303:
步骤S301,对原始图像进行卷积处理,得到原始图像矩阵;Step S301, performing convolution processing on the original image to obtain the original image matrix;
步骤S302,对原始图像矩阵进行特征提取,得到预测前景值;Step S302, performing feature extraction on the original image matrix to obtain predicted foreground values;
步骤S303,根据预测前景值对原始图像进行初步抠图处理,得到初始前景图。Step S303, performing preliminary matting processing on the original image according to the predicted foreground value to obtain an initial foreground image.
具体地,在步骤S301中,将原始图像输入至抠图模型中,通过抠图模型的骨干网络的第一卷积层对原始图像进行卷积处理,可以得到一个与原始图像大小相等的原始图像矩阵,该原始图像矩阵的矩阵值包含0和1,其中,0表示背景,1表示前景。需要说明的是,此处的大小相等指的是原始图像矩阵的宽度和高度均与原始图像的宽度和高度相同。Specifically, in step S301, the original image is input into the matting model, and the original image is convoluted through the first convolution layer of the backbone network of the matting model to obtain an original image matrix that is equal in size to the original image. The matrix values of the original image matrix include 0 and 1, where 0 represents the background and 1 represents the foreground. It should be noted that the equal size here means that both the width and the height of the original image matrix are the same as those of the original image.
在步骤S302中,通过第二卷积层对原始图像矩阵进行特征提取,获取所有数值为1的矩阵值,将这些数值为1的矩阵值纳入同一集合,该集合内的矩阵值即为预测前景值。In step S302, feature extraction is performed on the original image matrix through the second convolutional layer to obtain all matrix values with a value of 1, and these matrix values with a value of 1 are included in the same set, and the matrix values in this set are predicted foreground values.
在步骤S303中,通过骨干网络的第三卷积层在原始图像上抠取出预测前景值为1的像素值,这些像素值构成的图像即为初始前景图,从而实现对原始图像的初步抠图处理,得到初始前景图。In step S303, the pixel values with predicted foreground values of 1 are extracted from the original image through the third convolutional layer of the backbone network, and the image formed by these pixel values is the initial foreground image, so as to realize the preliminary image matting process on the original image and obtain the initial foreground image.
请参阅图4,在一些实施例中,步骤S103可以包括但不限于包括步骤S401至步骤S403:Referring to FIG. 4, in some embodiments, step S103 may include but not limited to include steps S401 to S403:
步骤S401,获取初始前景图中每一像素点的边缘预测值;Step S401, obtaining the edge prediction value of each pixel in the initial foreground image;
步骤S402,根据边缘预测值和预设的边缘预测阈值的大小关系,确定初始前景图的边缘像素点;Step S402, according to the size relationship between the edge prediction value and the preset edge prediction threshold, determine the edge pixel points of the initial foreground image;
步骤S403,对初始前景图的边缘像素点进行过滤处理,得到目标前景图。Step S403, filter the edge pixels of the initial foreground image to obtain the target foreground image.
具体地,为了提高抠图精度,需要对初始前景图的边缘区域难以进行抠图区分的像素点进行进一步地细致划分。首先执行步骤S401,通过主干网络对原始图像进行初步抠图处理时,可以计算得到每一像素点的边缘预测信息,因而,在对初始前景图进行局部细化处理过程中,可以获取边缘预测信息中包含的边缘预测值,通过边缘预测值来识别出该像素点属于边缘的程度。Specifically, in order to improve the matting accuracy, it is necessary to further finely divide the pixels in the edge area of the initial foreground image that are difficult to distinguish by matting. Firstly, step S401 is executed. When the original image is preliminarily matted through the backbone network, the edge prediction information of each pixel can be calculated. Therefore, in the process of local refinement of the initial foreground image, the edge prediction value contained in the edge prediction information can be obtained, and the extent to which the pixel belongs to the edge can be identified through the edge prediction value.
进一步地,执行步骤S402和步骤S403,通过预先设置边缘预测阈值,将边缘预测值与边 缘预测阈值进比对,从而对边缘区域的像素点进行筛选。例如,预设的边缘预测阈值可以是0.5、0.3等等。若边缘预测值小于或者等于边缘预测阈值,则表明该像素点属于初始前景图;若边缘预测值大于边缘预测阈值,则表明该像素点不属于初始前景图,将该像素点作为边缘像素点,并将该边缘像素点剔除掉,以实现对初始前景图的像素点的过滤除杂,将剩下的像素点构成的图像作为目标前景图,从而实现对初始前景图的局部细化处理,提高目标前景图的图像质量。Further, step S402 and step S403 are executed, by setting the edge prediction threshold in advance, comparing the edge prediction value with the edge prediction threshold, thereby filtering the pixels in the edge region. For example, the preset edge prediction threshold may be 0.5, 0.3 and so on. If the edge prediction value is less than or equal to the edge prediction threshold, it indicates that the pixel belongs to the initial foreground image; if the edge prediction value is greater than the edge prediction threshold, it indicates that the pixel does not belong to the initial foreground image, and the pixel is regarded as an edge pixel, and the edge pixel is removed to realize the filtering and impurity removal of the pixels of the initial foreground image, and the image composed of the remaining pixels is used as the target foreground image, so as to realize the local refinement of the initial foreground image and improve the image quality of the target foreground image.
请参阅图5,在一些实施例中,在步骤S104之前,该图像处理方法还包括预先训练图像重构模型,具体包括但不限于包括步骤S501至步骤S506:Referring to FIG. 5, in some embodiments, before step S104, the image processing method further includes pre-training an image reconstruction model, specifically including but not limited to steps S501 to S506:
步骤S501,获取样本图像,其中,样本图像的分辨率低于预设的参考图像的分辨率;Step S501, acquiring a sample image, wherein the resolution of the sample image is lower than that of a preset reference image;
步骤S502,对样本图像进行初步抠图处理和局部细化处理,得到样本前景图;Step S502, performing preliminary matting processing and local refinement processing on the sample image to obtain a sample foreground image;
步骤S503,将样本前景图输入至初始模型中;Step S503, inputting the sample foreground image into the initial model;
步骤S504,通过初始模型的生成网络对样本前景图进行超分辨率重构处理,生成与样本前景图对应的样本中间前景图,样本中间前景图的分辨率高于样本前景图;Step S504, perform super-resolution reconstruction processing on the sample foreground image through the generation network of the initial model, and generate a sample intermediate foreground image corresponding to the sample foreground image, and the resolution of the sample intermediate foreground image is higher than that of the sample foreground image;
步骤S505,通过初始模型的判别网络对样本中间前景图和参考样本前景图进行相似度计算,得到相似概率值;Step S505, calculate the similarity between the sample intermediate foreground image and the reference sample foreground image through the discriminant network of the initial model, and obtain the similarity probability value;
步骤S506,根据相似概率值对初始模型的损失函数进行优化,以更新初始模型,得到图像重构模型。Step S506, optimizing the loss function of the initial model according to the similarity probability value to update the initial model to obtain an image reconstruction model.
具体地,执行步骤S501,可以通过计算机断层扫描(Computed Tomo-graphy,CT)或者核磁共振成像(Magnetic Resonance Imaging,MRI)得到样本图像,其中该样本图像的分辨率低于预设的参考图像的分辨率,即样本图像为低分辨率图像。Specifically, by executing step S501, the sample image can be obtained by computer tomography (Computed Tomo-graphy, CT) or magnetic resonance imaging (Magnetic Resonance Imaging, MRI), wherein the resolution of the sample image is lower than the resolution of the preset reference image, that is, the sample image is a low-resolution image.
进一步地,执行步骤S502,通过预训练的抠图模型的骨干网络和微调网络对样本图像进行初步抠图处理和局部优化处理,得到样本前景图。该具体过程与上述对原始图像的抠图处理过程相同,此处不再赘述。Further, step S502 is executed to perform preliminary matting processing and local optimization processing on the sample image through the backbone network of the pre-trained matting model and the fine-tuning network to obtain the sample foreground image. The specific process is the same as the above-mentioned matting process of the original image, and will not be repeated here.
进一步地,执行步骤S503,将样本图像输入至初始模型中。Further, step S503 is executed to input the sample image into the initial model.
需要说明的是,该初始模型为SRGAN网络,SRGAN网络为用于超分辨率重建的生成对抗网络,SRGAN网络主要包括生成器和判别器两部分,其中,生成器主要用于将输入图像转化为高清图像,判别器主要用于判断生成的高清图像的真假,即将生成的高清图像与参考图像进行相似概率计算。It should be noted that the initial model is the SRGAN network, which is a generative confrontation network for super-resolution reconstruction. The SRGAN network mainly includes two parts, the generator and the discriminator. The generator is mainly used to convert the input image into a high-definition image, and the discriminator is mainly used to judge whether the generated high-definition image is true or false. The generated high-definition image and the reference image are about to be similarly calculated.
进一步地,执行步骤S504,通过生成网络中的生成函数可以将低分辨率的样本前景图转换为更高分辨率的样本中间前景图,其中,生成网络的生成函数可以表示如公式(1)所示:Further, step S504 is executed, and the low-resolution sample foreground image can be converted into a higher-resolution sample intermediate foreground image through the generating function in the generating network, wherein the generating function of the generating network can be expressed as shown in formula (1):
Figure PCTCN2022090713-appb-000001
Figure PCTCN2022090713-appb-000001
其中,G()表示样本中间前景图,I HR表示高分辨率的参考前景图,I LR表示低分辨率的样本前景图,I SR表示其他损失,如感知损失等,n=1,2……,n代表每一张图像,将每一个图像的结果累加后再除以图像总数量。 Among them, G() represents the sample intermediate foreground image, I HR represents the high-resolution reference foreground image, I LR represents the low-resolution sample foreground image, I SR represents other losses, such as perceptual loss, etc., n=1, 2..., n represents each image, and the results of each image are accumulated and then divided by the total number of images.
进一步地,执行步骤S505,通过判别网络将样本中间前景图与参考前景图进行对比,为了使得对比差异尽可能的小,可以通过计算样本中间前景图为真的相似概率,不断地对样本中间前景图进行优化处理,使得样本中间前景图尽可能的与参考前景图相同。在进行对比时,可以通过计算参考前景图与中间前景图的MSE即均方误差来判断两者的差异性;其中,计算公式如公式(2)所示:Further, step S505 is executed to compare the sample intermediate foreground image with the reference foreground image through the discriminant network. In order to make the contrast difference as small as possible, the sample intermediate foreground image can be continuously optimized by calculating the true similarity probability of the sample intermediate foreground image, so that the sample intermediate foreground image is as identical as possible to the reference foreground image. When making a comparison, the difference between the two can be judged by calculating the MSE (mean square error) of the reference foreground image and the intermediate foreground image; the calculation formula is shown in formula (2):
Figure PCTCN2022090713-appb-000002
Figure PCTCN2022090713-appb-000002
其中,min是指生成网络的模型损失最小,max是指判别网络的模型损失最大;D指判别网络,G指生成网络,D(G(I LR))指判别网络判断生成网络生成的样本中间前景图的真假,得到样本中间前景图为真的相似概率值,根据相似概率值不断地对样本中间前景图进行优化。 Among them, min means that the model loss of the generative network is the smallest, and max means that the model loss of the discriminant network is the largest; D means the discriminative network, G means the generative network, and D(G(I LR )) means that the discriminative network judges the authenticity of the sample intermediate foreground image generated by the generative network, and obtains the true similarity value of the sample intermediate foreground image, and continuously optimizes the sample intermediate foreground image according to the similarity probability value.
最后,执行步骤S506,根据相似概率值计算初始模型的模型损失,即loss值,再利用梯度下降法对loss值进行反向传播,将loss值反馈回初始模型,修改初始模型的模型参数,重复上述过程,直至loss值满足预设的迭代条件,其中,预设的迭代条件是可以迭代次数达到预设值,或者是损失函数的变化方差小于预设阈值。当loss值满足预设的迭代条件时可以停止反向传播,将最后的模型参数作为最终的模型参数,停止对初始模型的更新,得到图像重构模型。Finally, step S506 is performed to calculate the model loss of the initial model according to the similarity probability value, that is, the loss value, and then use the gradient descent method to backpropagate the loss value, feed the loss value back to the initial model, modify the model parameters of the initial model, and repeat the above process until the loss value meets the preset iteration condition, wherein the preset iteration condition is that the number of iterations can reach the preset value, or the variance of the loss function change is smaller than the preset threshold. When the loss value satisfies the preset iteration condition, the backpropagation can be stopped, and the final model parameter can be used as the final model parameter, and the update of the initial model can be stopped to obtain the image reconstruction model.
通过上述过程能够得到用于将低分辨率图像进行图像重构生成高分辨率图像的图像重构模型,该图像重构模型能够实现利用超分辨率重构方式来提高图像质量的目的。Through the above process, an image reconstruction model for performing image reconstruction on a low-resolution image to generate a high-resolution image can be obtained, and the image reconstruction model can achieve the purpose of improving image quality by means of super-resolution reconstruction.
请参阅图6,在一些实施例,步骤S104还包括但不限于包括步骤S601至步骤S602:Referring to FIG. 6, in some embodiments, step S104 also includes but is not limited to steps S601 to S602:
步骤S601,通过图像重构模型的生成网络对目标前景图进行超分辨率重构处理,得到中间前景图;Step S601, performing super-resolution reconstruction processing on the target foreground image through the generation network of the image reconstruction model to obtain an intermediate foreground image;
步骤S602,通过图像重构模型的判别网络和预设的参考前景图对中间前景图进行优化处理,得到标准前景图。In step S602, the intermediate foreground image is optimized through the discrimination network of the image reconstruction model and the preset reference foreground image to obtain a standard foreground image.
具体地,在步骤S601中,通过生成网络中的生成函数可以将低分辨率的目标前景图转换为更高分辨率的中间前景图,其中,生成网络的生成函数可以表示如公式(3)所示:Specifically, in step S601, the low-resolution target foreground image can be converted into a higher-resolution intermediate foreground image through the generating function in the generating network, where the generating function of the generating network can be expressed as shown in formula (3):
Figure PCTCN2022090713-appb-000003
Figure PCTCN2022090713-appb-000003
其中,G()表示中间前景图,I HR表示高分辨率的参考前景图,I LR表示低分辨率的目标前景图图像,I SR表示其他损失,如感知损失等,n=1,2……,n代表每一张图像,将每一个图像的结果累加后再除以图像总数量。 Among them, G() represents the intermediate foreground image, I HR represents the high-resolution reference foreground image, I LR represents the low-resolution target foreground image, I SR represents other losses, such as perceptual loss, etc., n=1, 2..., n represents each image, and the results of each image are accumulated and then divided by the total number of images.
在一些实施例的步骤S602中,通过判别网络将中间前景图与参考前景图进行对比,为了使得对比差异尽可能的小,可以通过计算中间前景图为真的概率,不断地对中间前景图进行优化处理,使得中间前景图尽可能的与参考前景图相同。在进行对比时,可以通过计算参考前景图与中间前景图的MSE即均方误差来判断两者的差异性;其中,计算公式如公式(4)所示:In step S602 of some embodiments, the intermediate foreground image is compared with the reference foreground image through the discrimination network. In order to make the contrast difference as small as possible, the intermediate foreground image can be continuously optimized by calculating the probability that the intermediate foreground image is true, so that the intermediate foreground image is as identical as the reference foreground image as possible. When making a comparison, the difference between the two can be judged by calculating the MSE (mean square error) of the reference foreground image and the intermediate foreground image; the calculation formula is shown in formula (4):
Figure PCTCN2022090713-appb-000004
Figure PCTCN2022090713-appb-000004
其中,min是指生成网络的模型损失最小,max是指判别网络的模型损失最大;D指判别网络,G指生成网络,D(G(I LR))指判别网络判断生成网络生成的中间前景图的真假,得到中间前景图为真的相似概率值,根据相似概率值不断地对中间前景图进行优化,直至相似概率值大于或等于预设的相似概率阈值,输出标准前景图,输出的标准前景图与参考前景图的相似程度能够达到需求。 Among them, min means that the model loss of the generative network is the smallest, and max means that the model loss of the discriminant network is the largest; D means the discriminative network, G means the generative network, and D(G(I LR )) means that the discriminative network judges whether the intermediate foreground image generated by the generating network is true or not, and obtains the similarity probability value of the intermediate foreground image as true, and continuously optimizes the intermediate foreground image according to the similarity probability value until the similarity probability value is greater than or equal to the preset similarity probability threshold, and outputs the standard foreground image, and the similarity between the output standard foreground image and the reference foreground image can meet the requirements.
通过上述方式能够方便地对目标前景图进行超分辨率重构,使得目标前景图具有更高的分辨率,能够提高图像质量。Through the above method, super-resolution reconstruction can be conveniently performed on the target foreground image, so that the target foreground image has a higher resolution and image quality can be improved.
请参阅图7,在一些实施例中,步骤S105还可以包括但不限于包括步骤S701至步骤S703:Referring to FIG. 7, in some embodiments, step S105 may also include but not limited to include steps S701 to S703:
步骤S701,对标准前景图进行特征提取,得到前景特征值,并对背景图进行特征提取,得到背景特征值;Step S701, performing feature extraction on the standard foreground image to obtain the foreground feature value, and performing feature extraction on the background image to obtain the background feature value;
步骤S702,根据前景特征值和背景特征值对预设的通道位图进行异或计算,得到目标通道位图;Step S702, performing XOR calculation on the preset channel bitmap according to the foreground feature value and the background feature value to obtain the target channel bitmap;
步骤S703,根据目标通道位图对标准前景图和背景图进行图像融合,得到目标图像。Step S703, performing image fusion on the standard foreground image and the background image according to the target channel bitmap to obtain the target image.
具体地,首先执行步骤S701,通过sigmoid函数对标准前景图和背景图进行特征提取,将标准前景图的前景特征值变换到0和1之间,将背景图的背景特征值变换到0和1之间。其中,与前述的前景预测值的表示方式一致,此处将标准前景图上的像素点的前景特征值表示为1,背景图上的像素点的背景特征值表示为0。Specifically, step S701 is first performed to perform feature extraction on the standard foreground image and the background image through the sigmoid function, transform the foreground feature value of the standard foreground image to between 0 and 1, and transform the background feature value of the background image to between 0 and 1. Wherein, consistent with the representation of the aforementioned foreground predicted value, here the foreground feature value of the pixel on the standard foreground map is represented as 1, and the background feature value of the pixel point on the background map is represented as 0.
进一步地,执行步骤S702,预先构建一个alpha通道位图,该通道位图与原始图像的大小一致,即该通道位图与原始图像的高度、宽度以及通道数量均相同。根据前景特征值和背景特征值,对该alpha通道位图进行0和1的异或计算,即在该alpha通道位图上对应每一像素点位置上标记有0或者1的数值,该数值用于指示该位置的像素点是否显示,通过这一过程能够得到目标通道位图。Further, step S702 is executed to construct an alpha channel bitmap in advance, and the size of the channel bitmap is the same as that of the original image, that is, the height, width and number of channels of the channel bitmap are the same as the original image. According to the foreground feature value and the background feature value, XOR calculation of 0 and 1 is performed on the alpha channel bitmap, that is, a value of 0 or 1 is marked on the position corresponding to each pixel point on the alpha channel bitmap, and the value is used to indicate whether the pixel point at this position is displayed, and the target channel bitmap can be obtained through this process.
最后,执行步骤S703,在对标准前景图和背景图进行图像融合时,根据目标通道位图上的标记,可以方便地确定在新的图像上是显示标准前景图的像素点还是背景图的像素点,最终得到目标图像。Finally, step S703 is executed, when performing image fusion on the standard foreground image and the background image, according to the mark on the target channel bitmap, it can be conveniently determined whether to display the pixels of the standard foreground image or the pixels of the background image on the new image, and finally obtain the target image.
本申请实施例通过获取待处理的原始图像;通过预先训练的抠图模型的骨干网络对原始图像进行初步抠图处理,得到初始前景图;通过抠图模型的微调网络对初始前景图的边缘区域进行局部细化处理,得到目标前景图,这样一来,通过抠图模型能够得到抠图效果较好的前景图像。进而,通过预先训练的图像重构模型对目标前景图进行超分辨率重构处理,得到标准前景图,其中,标准前景图的分辨率高于目标前景图的分辨率,能够获得更为清晰的标准前景图,从视觉效果上强化了抠图效果。最后对标准前景图和预设的背景图进行图像融合,得到目标图像,使得目标图像具有较高的分辨率,从而提高了图像质量。In the embodiment of the present application, the original image to be processed is acquired; the original image is preliminarily matted through the backbone network of the pre-trained matting model to obtain the initial foreground image; the edge area of the initial foreground image is locally refined through the fine-tuning network of the matting model to obtain the target foreground image. In this way, the foreground image with better matting effect can be obtained through the matting model. Furthermore, the pre-trained image reconstruction model is used to perform super-resolution reconstruction on the target foreground image to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than that of the target foreground image, and a clearer standard foreground image can be obtained, which strengthens the matting effect from the visual effect. Finally, the standard foreground image and the preset background image are fused to obtain the target image, which makes the target image have a higher resolution, thereby improving the image quality.
请参阅图8,本申请实施例还提供一种图像处理装置,可以实现上述图像处理方法,该图像处理装置包括:Please refer to FIG. 8, the embodiment of the present application also provides an image processing device, which can realize the above image processing method, and the image processing device includes:
原始图像获取模块801,用于获取待处理的原始图像;An original image acquisition module 801, configured to acquire an original image to be processed;
初步抠图模块802,用于通过预设的抠图模型的骨干网络对原始图像进行初始抠图处理,得到初始前景图;The preliminary image matting module 802 is used to perform initial image matting processing on the original image through the backbone network of the preset matting model to obtain an initial foreground image;
局部细化模块803,用于通过抠图模型的微调网络对初始前景图的边缘区域进行局部细化处理,得到目标前景图;The local refinement module 803 is used to perform local refinement processing on the edge area of the initial foreground image through the fine-tuning network of the matting model to obtain the target foreground image;
超分辨率重构模块804,用于通过预先训练的图像重构模型对目标前景图进行超分辨率重构处理,得到标准前景图,其中,标准前景图的分辨率高于目标前景图的分辨率;A super-resolution reconstruction module 804, configured to perform super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
图像融合模块805,用于对标准前景图和预设的背景图进行图像融合,得到目标图像。The image fusion module 805 is configured to perform image fusion on the standard foreground image and the preset background image to obtain the target image.
该图像处理装置的具体实施方式与上述图像处理方法的具体实施例基本相同,在此不再赘述。The specific implementation manner of the image processing device is basically the same as the specific embodiment of the above image processing method, and will not be repeated here.
本申请实施例还提供了一种电子设备,电子设备包括:存储器、处理器、存储在存储器上并可在处理器上运行的程序以及用于实现处理器和存储器之间的连接通信的数据总线,程序被处理器执行时实现上述图像处理方法。该电子设备可以为包括平板电脑、车载电脑等任意智能终端。The embodiment of the present application also provides an electronic device. The electronic device includes: a memory, a processor, a program stored in the memory and operable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the above image processing method is implemented. The electronic device may be any intelligent terminal including a tablet computer, a vehicle-mounted computer, and the like.
请参阅图9,图9示意了另一实施例的电子设备的硬件结构,电子设备包括:Please refer to FIG. 9. FIG. 9 illustrates a hardware structure of an electronic device in another embodiment. The electronic device includes:
处理器901,可以采用通用的CPU(CentralProcessingUnit,中央处理器)、微处理器、应用专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本申请实施例所提供的技术方案;The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit, central processing unit), microprocessor, application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application;
存储器902,可以采用只读存储器(ReadOnlyMemory,ROM)、静态存储设备、动态存储设备或者随机存取存储器(RandomAccessMemory,RAM)等形式实现。存储器902可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器902中,并由处理器901来调用执行一种图像处理方法,其中,所述图像处理方法包括:获取待处理的原始图像;通过预先训练的抠图模型的骨干网络对原始图像进行初步抠图处理,得到初始前景图;通过抠图模型的微调网络对初始前景图的边缘区域进行局部细化处理,得到目标前景图;通过预先训练的图像重构模型对目标前景图进行超分辨率重构处理,得到标准前景图,其中,标准前景图的分辨率高于目标前景图的分辨率;对标准前景图和预设的背景图进行图像融合,得到目标图像;The memory 902 may be implemented in the form of a read-only memory (ReadOnlyMemory, ROM), a static storage device, a dynamic storage device, or a random access memory (RandomAccessMemory, RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided by the embodiments of this specification are implemented through software or firmware, the relevant program codes are stored in the memory 902, and are invoked by the processor 901 to execute an image processing method, wherein the image processing method includes: obtaining the original image to be processed; performing preliminary matting processing on the original image through the backbone network of the pre-trained matting model to obtain the initial foreground image; Carry out super-resolution reconstruction processing on the target foreground image through the pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image; image fusion is performed on the standard foreground image and the preset background image to obtain the target image;
输入/输出接口903,用于实现信息输入及输出;The input/output interface 903 is used to realize information input and output;
通信接口904,用于实现本设备与其他设备的通信交互,可以通过有线方式(例如USB、 网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信;The communication interface 904 is used to realize the communication interaction between the device and other devices, and the communication can be realized through a wired method (such as USB, network cable, etc.), or can be realized through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.);
总线905,在设备的各个组件(例如处理器901、存储器902、输入/输出接口903和通信接口904)之间传输信息;bus 905, for transferring information between various components of the device (such as processor 901, memory 902, input/output interface 903 and communication interface 904);
其中处理器901、存储器902、输入/输出接口903和通信接口904通过总线905实现彼此之间在设备内部的通信连接。The processor 901 , the memory 902 , the input/output interface 903 and the communication interface 904 are connected to each other within the device through the bus 905 .
本申请实施例还提供了一种存储介质,存储介质为计算机可读存储介质,用于计算机可读存储,计算机可读存储介质可以是非易失性,也可以是易失性。存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现一种图像处理方法,其中,所述图像处理方法包括:获取待处理的原始图像;通过预先训练的抠图模型的骨干网络对原始图像进行初步抠图处理,得到初始前景图;通过抠图模型的微调网络对初始前景图的边缘区域进行局部细化处理,得到目标前景图;通过预先训练的图像重构模型对目标前景图进行超分辨率重构处理,得到标准前景图,其中,标准前景图的分辨率高于目标前景图的分辨率;对标准前景图和预设的背景图进行图像融合,得到目标图像。An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The computer-readable storage medium may be non-volatile or volatile. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement an image processing method, wherein the image processing method includes: obtaining an original image to be processed; performing preliminary matting processing on the original image through a backbone network of a pre-trained matting model to obtain an initial foreground image; performing local refinement processing on an edge region of the initial foreground image through a fine-tuning network of the matting model to obtain a target foreground image; performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, The resolution of the foreground image is higher than that of the target foreground image; image fusion is performed on the standard foreground image and the preset background image to obtain the target image.
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。As a non-transitory computer-readable storage medium, memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
本申请实施例描述的实施例是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着技术的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The embodiments described in the embodiments of the present application are to illustrate the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation to the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
本领域技术人员可以理解的是,图1-7中示出的技术方案并不构成对本申请实施例的限定,可以包括比图示更多或更少的步骤,或者组合某些步骤,或者不同的步骤。Those skilled in the art can understand that the technical solutions shown in FIGS. 1-7 do not limit the embodiments of the present application, and may include more or fewer steps than those shown in the illustrations, or combine some steps, or different steps.
以上参照附图说明了本申请实施例的优选实施例,并非因此局限本申请实施例的权利范围。本领域技术人员不脱离本申请实施例的范围和实质内所作的任何修改、等同替换和改进,均应在本申请实施例的权利范围之内。The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings, which does not limit the scope of rights of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall fall within the scope of rights of the embodiments of the present application.

Claims (20)

  1. 一种图像处理方法,其中,所述方法包括:An image processing method, wherein the method includes:
    获取待处理的原始图像;Get the original image to be processed;
    通过预先训练的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图;Preliminary matting processing is performed on the original image through the backbone network of the pre-trained matting model to obtain an initial foreground image;
    通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图;performing local refinement processing on the edge area of the initial foreground image through the fine-tuning network of the cutout model to obtain the target foreground image;
    通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,其中,所述标准前景图的分辨率高于所述目标前景图的分辨率;performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
    对所述标准前景图和预设的背景图进行图像融合,得到目标图像。Image fusion is performed on the standard foreground image and the preset background image to obtain a target image.
  2. 根据权利要求1所述的图像处理方法,其中,所述通过预设的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图,包括:The image processing method according to claim 1, wherein the preliminary matting process is performed on the original image through the backbone network of the preset matting model to obtain an initial foreground image, including:
    对所述原始图像进行卷积处理,得到原始图像矩阵;Carrying out convolution processing on the original image to obtain an original image matrix;
    对所述原始图像矩阵进行特征提取,得到预测前景值;performing feature extraction on the original image matrix to obtain predicted foreground values;
    根据所述预测前景值对所述原始图像进行初步抠图处理,得到所述初始前景图。Preliminary image matting processing is performed on the original image according to the predicted foreground value to obtain the initial foreground image.
  3. 根据权利要求1所述的图像处理方法,其中,所述通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图,包括:The image processing method according to claim 1, wherein the fine-tuning network of the matting model performs local refinement processing on the edge region of the initial foreground image to obtain the target foreground image, comprising:
    获取所述初始前景图中每一像素点的边缘预测值;Obtain the edge prediction value of each pixel in the initial foreground image;
    根据所述边缘预测值和预设的边缘预测阈值的大小关系,确定所述初始前景图的边缘像素点;Determine the edge pixel points of the initial foreground image according to the magnitude relationship between the edge prediction value and a preset edge prediction threshold;
    对所述初始前景图的边缘像素点进行过滤处理,得到所述目标前景图。The edge pixels of the initial foreground image are filtered to obtain the target foreground image.
  4. 根据权利要求1所述的图像处理方法,其中,所述通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,包括:The image processing method according to claim 1, wherein, performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, comprising:
    通过所述图像重构模型的生成网络对目标前景图进行超分辨率重构处理,得到中间前景图;Performing super-resolution reconstruction processing on the target foreground image through the generation network of the image reconstruction model to obtain an intermediate foreground image;
    通过所述图像重构模型的判别网络和预设的参考前景图对所述中间前景图进行优化处理,得到标准前景图。The intermediate foreground image is optimized through the discrimination network of the image reconstruction model and a preset reference foreground image to obtain a standard foreground image.
  5. 根据权利要求1至4任一项所述的图像处理方法,其中,所述对所述标准前景图和预设的背景图进行图像融合,得到目标图像,包括:The image processing method according to any one of claims 1 to 4, wherein the image fusion of the standard foreground image and the preset background image to obtain the target image includes:
    对所述标准前景图进行特征提取,得到前景特征值,并对所述背景图进行特征提取,得到背景特征值;performing feature extraction on the standard foreground image to obtain a foreground feature value, and performing feature extraction on the background image to obtain a background feature value;
    根据所述前景特征值和所述背景特征值对预设的通道位图进行异或计算,得到目标通道位图;performing XOR calculation on a preset channel bitmap according to the foreground feature value and the background feature value to obtain a target channel bitmap;
    根据所述目标通道位图对所述标准前景图和所述背景图进行图像融合,得到目标图像。performing image fusion on the standard foreground image and the background image according to the target channel bitmap to obtain a target image.
  6. 根据权利要求1至4任一项所述的图像处理方法,其中,在所述通过预设的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图之前,所述方法还包括预先训练所述抠图模型,包括:The image processing method according to any one of claims 1 to 4, wherein, before performing preliminary matting processing on the original image through the backbone network of the preset matting model to obtain an initial foreground image, the method further includes pre-training the matting model, including:
    获取样本图像,其中,所述样本图像的分辨率低于预设的参考图像的分辨率;acquiring a sample image, wherein the resolution of the sample image is lower than that of a preset reference image;
    将所述样本图像输入至所述抠图模型中;inputting the sample image into the matting model;
    通过所述骨干网络对所述样本图像进行卷积处理,得到样本图像矩阵,并对所述样本图像矩阵进行特征提取,得到样本预测前景值;performing convolution processing on the sample image through the backbone network to obtain a sample image matrix, and performing feature extraction on the sample image matrix to obtain a sample predicted foreground value;
    通过所述骨干网络和所述样本预测前景值对所述样本图像进行初步抠图处理,得到样本前景图;performing preliminary matting processing on the sample image through the backbone network and the predicted foreground value of the sample to obtain a sample foreground image;
    通过所述微调网络获取所述样本前景图中每一样本像素点的样本边缘预测值;Obtaining the sample edge prediction value of each sample pixel in the sample foreground map through the fine-tuning network;
    根据所述样本边缘预测值和预设的边缘预测阈值的大小关系,确定样本边缘像素点的个数;Determine the number of sample edge pixels according to the size relationship between the sample edge prediction value and a preset edge prediction threshold;
    根据所述样本边缘像素点的个数对所述抠图模型的损失函数进行优化,以更新所述抠图模型。Optimizing the loss function of the image matting model according to the number of edge pixels of the sample, so as to update the image matting model.
  7. 根据权利要求1至4任一项所述的图像处理方法,其中,在所述通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图之前,所述方法还包括预先训练所述图像重构模型,包括:The image processing method according to any one of claims 1 to 4, wherein, before performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, the method further includes pre-training the image reconstruction model, including:
    获取样本图像,其中,所述样本图像的分辨率低于预设的参考图像的分辨率;acquiring a sample image, wherein the resolution of the sample image is lower than that of a preset reference image;
    对所述样本图像进行初步抠图处理和局部细化处理,得到样本前景图;performing preliminary matting processing and local refinement processing on the sample image to obtain a sample foreground image;
    将所述样本前景图输入至初始模型中;inputting the sample foreground map into the initial model;
    通过所述初始模型的生成网络对所述样本前景图进行超分辨率重构处理,生成与所述样本前景图对应的样本中间前景图,所述样本中间前景图的分辨率高于所述样本前景图;performing super-resolution reconstruction processing on the sample foreground image through the generation network of the initial model, and generating a sample intermediate foreground image corresponding to the sample foreground image, and the resolution of the sample intermediate foreground image is higher than that of the sample foreground image;
    通过所述初始模型的判别网络对所述样本中间前景图和参考样本前景图进行相似度计算,得到相似概率值;Performing similarity calculation on the sample intermediate foreground map and the reference sample foreground map through the discriminant network of the initial model to obtain a similar probability value;
    根据所述相似概率值对所述初始模型的损失函数进行优化,以更新所述初始模型,得到所述图像重构模型。Optimizing the loss function of the initial model according to the similarity probability value to update the initial model to obtain the image reconstruction model.
  8. 一种图像处理装置,其中,所述装置包括:An image processing device, wherein the device includes:
    原始图像获取模块,用于获取待处理的原始图像;The original image acquisition module is used to acquire the original image to be processed;
    初步抠图模块,用于通过预设的抠图模型的骨干网络对所述原始图像进行初始抠图处理,得到初始前景图;The preliminary image matting module is used to perform initial image matting processing on the original image through the backbone network of the preset image matting model to obtain an initial foreground image;
    局部细化模块,用于通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图;A local refinement module, configured to perform local refinement processing on the edge region of the initial foreground image through the fine-tuning network of the matting model to obtain a target foreground image;
    超分辨率重构模块,用于通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,其中,所述标准前景图的分辨率高于所述目标前景图的分辨率;A super-resolution reconstruction module, configured to perform super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
    图像融合模块,用于对所述标准前景图和预设的背景图进行图像融合,得到目标图像。The image fusion module is used to perform image fusion on the standard foreground image and the preset background image to obtain the target image.
  9. 一种电子设备,其中,所述电子设备包括存储器、处理器、存储在所述存储器上并可在所述处理器上运行的程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,所述程序被所述处理器执行时实现一种图像处理方法,其中,所述图像处理方法包括:An electronic device, wherein the electronic device includes a memory, a processor, a program stored in the memory and operable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and when the program is executed by the processor, an image processing method is implemented, wherein the image processing method includes:
    获取待处理的原始图像;Get the original image to be processed;
    通过预先训练的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图;Preliminary matting processing is performed on the original image through the backbone network of the pre-trained matting model to obtain an initial foreground image;
    通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图;performing local refinement processing on the edge area of the initial foreground image through the fine-tuning network of the cutout model to obtain the target foreground image;
    通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,其中,所述标准前景图的分辨率高于所述目标前景图的分辨率;performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
    对所述标准前景图和预设的背景图进行图像融合,得到目标图像。Image fusion is performed on the standard foreground image and the preset background image to obtain a target image.
  10. 根据权利要求9所述的电子设备,其中,所述通过预设的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图,包括:The electronic device according to claim 9, wherein the preliminary matting process is performed on the original image through the backbone network of the preset matting model to obtain an initial foreground image, comprising:
    对所述原始图像进行卷积处理,得到原始图像矩阵;Carrying out convolution processing on the original image to obtain an original image matrix;
    对所述原始图像矩阵进行特征提取,得到预测前景值;performing feature extraction on the original image matrix to obtain predicted foreground values;
    根据所述预测前景值对所述原始图像进行初步抠图处理,得到所述初始前景图。Preliminary image matting processing is performed on the original image according to the predicted foreground value to obtain the initial foreground image.
  11. 根据权利要求9所述的电子设备,其中,所述通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图,包括:The electronic device according to claim 9, wherein the fine-tuning network of the matting model performs local refinement processing on the edge area of the initial foreground image to obtain a target foreground image, comprising:
    获取所述初始前景图中每一像素点的边缘预测值;Obtain the edge prediction value of each pixel in the initial foreground image;
    根据所述边缘预测值和预设的边缘预测阈值的大小关系,确定所述初始前景图的边缘像素点;Determine the edge pixel points of the initial foreground image according to the magnitude relationship between the edge prediction value and a preset edge prediction threshold;
    对所述初始前景图的边缘像素点进行过滤处理,得到所述目标前景图。The edge pixels of the initial foreground image are filtered to obtain the target foreground image.
  12. 根据权利要求9所述的电子设备,其中,所述通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,包括:The electronic device according to claim 9, wherein, performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, comprising:
    通过所述图像重构模型的生成网络对目标前景图进行超分辨率重构处理,得到中间前景图;Performing super-resolution reconstruction processing on the target foreground image through the generation network of the image reconstruction model to obtain an intermediate foreground image;
    通过所述图像重构模型的判别网络和预设的参考前景图对所述中间前景图进行优化处理,得到标准前景图。The intermediate foreground image is optimized through the discrimination network of the image reconstruction model and a preset reference foreground image to obtain a standard foreground image.
  13. 根据权利要求9至12任一项所述的电子设备,其中,所述对所述标准前景图和预设的背景图进行图像融合,得到目标图像,包括:The electronic device according to any one of claims 9 to 12, wherein the image fusion of the standard foreground image and the preset background image to obtain the target image includes:
    对所述标准前景图进行特征提取,得到前景特征值,并对所述背景图进行特征提取,得到背景特征值;performing feature extraction on the standard foreground image to obtain a foreground feature value, and performing feature extraction on the background image to obtain a background feature value;
    根据所述前景特征值和所述背景特征值对预设的通道位图进行异或计算,得到目标通道位图;performing XOR calculation on a preset channel bitmap according to the foreground feature value and the background feature value to obtain a target channel bitmap;
    根据所述目标通道位图对所述标准前景图和所述背景图进行图像融合,得到目标图像。performing image fusion on the standard foreground image and the background image according to the target channel bitmap to obtain a target image.
  14. 根据权利要求9至12任一项所述的电子设备,其中,在所述通过预设的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图之前,所述方法还包括预先训练所述抠图模型,包括:The electronic device according to any one of claims 9 to 12, wherein, before performing preliminary matting processing on the original image through the backbone network of the preset matting model to obtain an initial foreground image, the method further includes pre-training the matting model, including:
    获取样本图像,其中,所述样本图像的分辨率低于预设的参考图像的分辨率;acquiring a sample image, wherein the resolution of the sample image is lower than that of a preset reference image;
    将所述样本图像输入至所述抠图模型中;inputting the sample image into the matting model;
    通过所述骨干网络对所述样本图像进行卷积处理,得到样本图像矩阵,并对所述样本图像矩阵进行特征提取,得到样本预测前景值;performing convolution processing on the sample image through the backbone network to obtain a sample image matrix, and performing feature extraction on the sample image matrix to obtain a sample predicted foreground value;
    通过所述骨干网络和所述样本预测前景值对所述样本图像进行初步抠图处理,得到样本前景图;performing preliminary matting processing on the sample image through the backbone network and the predicted foreground value of the sample to obtain a sample foreground image;
    通过所述微调网络获取所述样本前景图中每一样本像素点的样本边缘预测值;Obtaining the sample edge prediction value of each sample pixel in the sample foreground map through the fine-tuning network;
    根据所述样本边缘预测值和预设的边缘预测阈值的大小关系,确定样本边缘像素点的个数;Determine the number of sample edge pixels according to the size relationship between the sample edge prediction value and a preset edge prediction threshold;
    根据所述样本边缘像素点的个数对所述抠图模型的损失函数进行优化,以更新所述抠图模型。Optimizing the loss function of the image matting model according to the number of edge pixels of the sample, so as to update the image matting model.
  15. 一种存储介质,所述存储介质为计算机可读存储介质,用于计算机可读存储,其中,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现一种图像处理方法,其中,所述图像如理方法包括:A storage medium, the storage medium is a computer-readable storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement an image processing method, wherein the image processing method includes:
    获取待处理的原始图像;Get the original image to be processed;
    通过预先训练的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图;Preliminary matting processing is performed on the original image through the backbone network of the pre-trained matting model to obtain an initial foreground image;
    通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图;performing local refinement processing on the edge area of the initial foreground image through the fine-tuning network of the cutout model to obtain the target foreground image;
    通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,其中,所述标准前景图的分辨率高于所述目标前景图的分辨率;performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, wherein the resolution of the standard foreground image is higher than the resolution of the target foreground image;
    对所述标准前景图和预设的背景图进行图像融合,得到目标图像。Image fusion is performed on the standard foreground image and the preset background image to obtain a target image.
  16. 根据权利要求15所述的存储介质,其中,所述通过预设的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图,包括:The storage medium according to claim 15, wherein the preliminary matting process is performed on the original image through the backbone network of the preset matting model to obtain an initial foreground image, comprising:
    对所述原始图像进行卷积处理,得到原始图像矩阵;Carrying out convolution processing on the original image to obtain an original image matrix;
    对所述原始图像矩阵进行特征提取,得到预测前景值;performing feature extraction on the original image matrix to obtain predicted foreground values;
    根据所述预测前景值对所述原始图像进行初步抠图处理,得到所述初始前景图。Preliminary image matting processing is performed on the original image according to the predicted foreground value to obtain the initial foreground image.
  17. 根据权利要求15所述的存储介质,其中,所述通过所述抠图模型的微调网络对所述初始前景图的边缘区域进行局部细化处理,得到目标前景图,包括:The storage medium according to claim 15, wherein the fine-tuning network of the matting model performs local refinement processing on the edge area of the initial foreground image to obtain the target foreground image, comprising:
    获取所述初始前景图中每一像素点的边缘预测值;Obtain the edge prediction value of each pixel in the initial foreground image;
    根据所述边缘预测值和预设的边缘预测阈值的大小关系,确定所述初始前景图的边缘像素点;Determine the edge pixel points of the initial foreground image according to the magnitude relationship between the edge prediction value and a preset edge prediction threshold;
    对所述初始前景图的边缘像素点进行过滤处理,得到所述目标前景图。The edge pixels of the initial foreground image are filtered to obtain the target foreground image.
  18. 根据权利要求15所述的存储介质,其中,所述通过预先训练的图像重构模型对所述目标前景图进行超分辨率重构处理,得到标准前景图,包括:The storage medium according to claim 15, wherein, performing super-resolution reconstruction processing on the target foreground image through a pre-trained image reconstruction model to obtain a standard foreground image, comprising:
    通过所述图像重构模型的生成网络对目标前景图进行超分辨率重构处理,得到中间前景图;Performing super-resolution reconstruction processing on the target foreground image through the generation network of the image reconstruction model to obtain an intermediate foreground image;
    通过所述图像重构模型的判别网络和预设的参考前景图对所述中间前景图进行优化处理,得到标准前景图。The intermediate foreground image is optimized through the discrimination network of the image reconstruction model and a preset reference foreground image to obtain a standard foreground image.
  19. 根据权利要求15至18任一项所述的存储介质,其中,所述对所述标准前景图和预设的背景图进行图像融合,得到目标图像,包括:The storage medium according to any one of claims 15 to 18, wherein the image fusion of the standard foreground image and the preset background image to obtain the target image includes:
    对所述标准前景图进行特征提取,得到前景特征值,并对所述背景图进行特征提取,得到背景特征值;performing feature extraction on the standard foreground image to obtain a foreground feature value, and performing feature extraction on the background image to obtain a background feature value;
    根据所述前景特征值和所述背景特征值对预设的通道位图进行异或计算,得到目标通道位图;performing XOR calculation on a preset channel bitmap according to the foreground feature value and the background feature value to obtain a target channel bitmap;
    根据所述目标通道位图对所述标准前景图和所述背景图进行图像融合,得到目标图像。performing image fusion on the standard foreground image and the background image according to the target channel bitmap to obtain a target image.
  20. 根据权利要求15至18任一项所述的存储介质,其中,在所述通过预设的抠图模型的骨干网络对所述原始图像进行初步抠图处理,得到初始前景图之前,所述方法还包括预先训练所述抠图模型,包括:The storage medium according to any one of claims 15 to 18, wherein, before performing preliminary matting processing on the original image through the backbone network of the preset matting model to obtain an initial foreground image, the method further includes pre-training the matting model, including:
    获取样本图像,其中,所述样本图像的分辨率低于预设的参考图像的分辨率;acquiring a sample image, wherein the resolution of the sample image is lower than that of a preset reference image;
    将所述样本图像输入至所述抠图模型中;inputting the sample image into the matting model;
    通过所述骨干网络对所述样本图像进行卷积处理,得到样本图像矩阵,并对所述样本图像矩阵进行特征提取,得到样本预测前景值;performing convolution processing on the sample image through the backbone network to obtain a sample image matrix, and performing feature extraction on the sample image matrix to obtain a sample predicted foreground value;
    通过所述骨干网络和所述样本预测前景值对所述样本图像进行初步抠图处理,得到样本前景图;performing preliminary matting processing on the sample image through the backbone network and the predicted foreground value of the sample to obtain a sample foreground image;
    通过所述微调网络获取所述样本前景图中每一样本像素点的样本边缘预测值;Obtaining the sample edge prediction value of each sample pixel in the sample foreground map through the fine-tuning network;
    根据所述样本边缘预测值和预设的边缘预测阈值的大小关系,确定样本边缘像素点的个数;Determine the number of sample edge pixels according to the size relationship between the sample edge prediction value and a preset edge prediction threshold;
    根据所述样本边缘像素点的个数对所述抠图模型的损失函数进行优化,以更新所述抠图模型。Optimizing the loss function of the image matting model according to the number of edge pixels of the sample, so as to update the image matting model.
PCT/CN2022/090713 2022-01-18 2022-04-29 Image processing method and apparatus, electronic device, and storage medium WO2023137914A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210057041.9A CN114399454A (en) 2022-01-18 2022-01-18 Image processing method, image processing device, electronic equipment and storage medium
CN202210057041.9 2022-01-18

Publications (1)

Publication Number Publication Date
WO2023137914A1 true WO2023137914A1 (en) 2023-07-27

Family

ID=81230568

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090713 WO2023137914A1 (en) 2022-01-18 2022-04-29 Image processing method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN114399454A (en)
WO (1) WO2023137914A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116935140A (en) * 2023-08-04 2023-10-24 北京邮电大学 Luxury identification model training method based on ink, identification method and device
CN117522717A (en) * 2024-01-03 2024-02-06 支付宝(杭州)信息技术有限公司 Image synthesis method, device and equipment

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114399454A (en) * 2022-01-18 2022-04-26 平安科技(深圳)有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN114820686B (en) * 2022-05-16 2022-12-16 北京百度网讯科技有限公司 Matting method and device, electronic equipment and storage medium
CN115022668B (en) * 2022-07-21 2023-08-11 中国平安人寿保险股份有限公司 Live broadcast-based video generation method and device, equipment and medium
CN116167922B (en) * 2023-04-24 2023-07-18 广州趣丸网络科技有限公司 Matting method and device, storage medium and computer equipment
CN116684607B (en) * 2023-07-26 2023-11-14 腾讯科技(深圳)有限公司 Image compression and decompression method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040151371A1 (en) * 2003-01-30 2004-08-05 Eastman Kodak Company Method for face orientation determination in digital color images
CN110807385A (en) * 2019-10-24 2020-02-18 腾讯科技(深圳)有限公司 Target detection method and device, electronic equipment and storage medium
CN112598678A (en) * 2020-11-27 2021-04-02 努比亚技术有限公司 Image processing method, terminal and computer readable storage medium
CN114399454A (en) * 2022-01-18 2022-04-26 平安科技(深圳)有限公司 Image processing method, image processing device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040151371A1 (en) * 2003-01-30 2004-08-05 Eastman Kodak Company Method for face orientation determination in digital color images
CN110807385A (en) * 2019-10-24 2020-02-18 腾讯科技(深圳)有限公司 Target detection method and device, electronic equipment and storage medium
CN112598678A (en) * 2020-11-27 2021-04-02 努比亚技术有限公司 Image processing method, terminal and computer readable storage medium
CN114399454A (en) * 2022-01-18 2022-04-26 平安科技(深圳)有限公司 Image processing method, image processing device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "Background Matting v2 for portrait matting", 18 June 2021 (2021-06-18), XP093079217, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/381917042?ivk_sa=1024320u> [retrieved on 20230906] *
LIN SHANCHUAN, RYABTSEV ANDREY, SENGUPTA SOUMYADIP, CURLESS BRIAN, SEITZ STEVE, KEMELMACHER-SHLIZERMAN IRA: "Real-Time High-Resolution Background Matting", ARXIV:2012.07810V1 [CS.CV], 14 December 2020 (2020-12-14), XP093079222 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116935140A (en) * 2023-08-04 2023-10-24 北京邮电大学 Luxury identification model training method based on ink, identification method and device
CN116935140B (en) * 2023-08-04 2024-04-16 北京邮电大学 Luxury identification model training method based on ink, identification method and device
CN117522717A (en) * 2024-01-03 2024-02-06 支付宝(杭州)信息技术有限公司 Image synthesis method, device and equipment
CN117522717B (en) * 2024-01-03 2024-04-19 支付宝(杭州)信息技术有限公司 Image synthesis method, device and equipment

Also Published As

Publication number Publication date
CN114399454A (en) 2022-04-26

Similar Documents

Publication Publication Date Title
WO2023137914A1 (en) Image processing method and apparatus, electronic device, and storage medium
US11551333B2 (en) Image reconstruction method and device
US11798132B2 (en) Image inpainting method and apparatus, computer device, and storage medium
US11861829B2 (en) Deep learning based medical image detection method and related device
CN111524106B (en) Skull fracture detection and model training method, device, equipment and storage medium
CN110930416B (en) MRI image prostate segmentation method based on U-shaped network
US20180165810A1 (en) Method of automatically detecting microaneurysm based on multi-sieving convolutional neural network
CN112052831B (en) Method, device and computer storage medium for face detection
Varish et al. Image retrieval scheme using quantized bins of color image components and adaptive tetrolet transform
US20210057069A1 (en) Method and device for generating medical report
TW202014984A (en) Image processing method, electronic device, and storage medium
WO2020259453A1 (en) 3d image classification method and apparatus, device and storage medium
US20130070997A1 (en) Systems, methods, and media for on-line boosting of a classifier
US10929643B2 (en) 3D image detection method and apparatus, electronic device, and computer readable medium
WO2021159811A1 (en) Auxiliary diagnostic apparatus and method for glaucoma, and storage medium
CN112016592B (en) Domain adaptive semantic segmentation method and device based on cross domain category perception
CN116612357B (en) Method, system and storage medium for constructing unsupervised RGBD multi-mode data set
CN110910497B (en) Method and system for realizing augmented reality map
CN112465735A (en) Pedestrian detection method, device and computer-readable storage medium
CN114627136B (en) Tongue image segmentation and alignment method based on feature pyramid network
WO2022226744A1 (en) Texture completion
CN113989588A (en) Self-learning-based intelligent evaluation system and method for pentagonal drawing test
CN108154107B (en) Method for determining scene category to which remote sensing image belongs
Patibandla et al. CT Image Precise Denoising Model with Edge Based Segmentation with Labeled Pixel Extraction Using CNN Based Feature Extraction for Oral Cancer Detection
WO2023028866A1 (en) Image processing method and apparatus, and vehicle

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22921345

Country of ref document: EP

Kind code of ref document: A1