An image processing method, apparatus, electronic device, and medium

CN115660938BActive Publication Date: 2026-09-29DOUYIN VISION CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211361729.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-02
Publication Date
2026-09-29
Estimated Expiration
2042-11-02

AI Technical Summary

Technical Problem

这就限制了图像处理模型的处理性能

Benefits of technology

[0018]本公开实施例,首先确定待处理子图像,待处理子图像为待处理图像的待处理区域内的图像;然后确定辅助图像,辅助图像与待处理子图像尺寸相等,辅助图像内像素数据为零;最后将待处理子图像和辅助图像串联后输入至图像处理模型,得到待处理图像的处理后的目标图像,待处理子图像和辅助图像的个数与图像处理模型在训练阶段作为输入的图像的个数均为设定个数。该方法通过确定待处理子图像和辅助图像,辅助图像作为输入能够辅助扩大图像处理模型的感受野,通过将待处理子图像和辅助图像串联后输入至图像处理模型以得到目标图像,采用图像串联的方式能够使得输入至图像处理模型的多个图像块的尺寸没有增加,避免了由于增加输入图像处理模型的图像块尺寸的大小而导致增加GPU显存占用与算力的问题,提高了图像处理模型的处理性能,从而提高了图像处理的可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115660938B_ABST
    Figure CN115660938B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide an image processing method and device, electronic equipment and medium. The method comprises: determining a to-be-processed sub-image; determining an auxiliary image, the auxiliary image being equal in size to the to-be-processed sub-image; inputting the to-be-processed sub-image and the auxiliary image in series to an image processing model to obtain a processed target image of the to-be-processed image, the number of to-be-processed sub-images and auxiliary images being equal to the number of images input to the image processing model in the training phase. By determining the to-be-processed sub-image and the auxiliary image, the auxiliary image as input can assist in expanding the receptive field of the image processing model, and the image concatenation method can ensure that the size of the multiple image blocks input to the image processing model does not increase, avoiding the problem of increasing GPU memory occupation and computing power caused by increasing the size of the image blocks input to the image processing model, improving the processing performance of the image processing model, and thus improving the reliability of image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to computer technology, and more particularly to an image processing method, apparatus, electronic device, and medium. Background Technology

[0002] With the rapid development of deep learning technology, it has been applied in numerous fields, particularly computer vision and natural language processing. Within computer vision, it can be further subdivided into low-level and high-level domains. High-level domains primarily extract high-level semantic information from images, such as face detection, recognition, or image classification; these tasks focus more on the semantic information within the image and are less concerned with individual pixel details. Low-level domain tasks, such as image super-resolution, dehazing, deblurring, and enhancement, are more focused on the pixel information of the image.

[0003] Due to limitations in GPU memory and computing power, as well as the characteristics of low-level tasks, there are restrictions on the size of the input image for image processing models. Currently, all tasks targeting low-level domains, such as image super-resolution or enhancement, do not input the entire image into the corresponding image processing model. Instead, they randomly crop a fixed-size image patch from the entire image and then input this patch into the image processing model for processing. This limits the processing performance of image processing models. Summary of the Invention

[0004] This disclosure provides an image processing method, apparatus, electronic device, and medium to improve the reliability of image processing.

[0005] In a first aspect, embodiments of this disclosure provide an image processing method, the method comprising:

[0006] Determine the sub-image to be processed, wherein the sub-image to be processed is the image within the processing area of ​​the image to be processed;

[0007] An auxiliary image is determined, wherein the auxiliary image has the same size as the sub-image to be processed, and the pixel data in the auxiliary image is zero;

[0008] The sub-image to be processed and the auxiliary image are concatenated and input into the image processing model to obtain the processed target image of the sub-image to be processed. The number of the sub-image to be processed and the auxiliary image are the same as the number of images used as input to the image processing model during the training phase.

[0009] Secondly, embodiments of this disclosure also provide an image processing apparatus, the apparatus comprising:

[0010] The first determining module is used to determine the sub-image to be processed, wherein the sub-image to be processed is an image within the processing area of ​​the image to be processed;

[0011] The second determining module is used to determine an auxiliary image, wherein the auxiliary image has the same size as the sub-image to be processed, and the pixel data in the auxiliary image is zero;

[0012] The processing module is used to concatenate the sub-image to be processed and the auxiliary image and input them into the image processing model to obtain the processed target image of the sub-image to be processed. The number of the sub-image to be processed and the auxiliary image and the number of images used as input to the image processing model during the training phase are both set numbers.

[0013] Thirdly, embodiments of this disclosure also provide an electronic device, including:

[0014] One or more processing devices;

[0015] Storage device for storing one or more programs.

[0016] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the image processing method provided in the embodiments of this disclosure.

[0017] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processing device, are used to perform the image processing method provided in embodiments of this disclosure.

[0018] In this embodiment, a sub-image to be processed is first determined, which is an image within the processing region of the image to be processed. Then, an auxiliary image is determined, with the same size as the sub-image to be processed and zero pixel data within it. Finally, the sub-image to be processed and the auxiliary image are concatenated and input into an image processing model to obtain the processed target image. The number of sub-images to be processed and the number of auxiliary images are both predetermined, as are the number of images used as input to the image processing model during the training phase. This method, by determining the sub-image to be processed and the auxiliary image (which, as input, helps expand the receptive field of the image processing model), and by concatenating the sub-image to be processed and the auxiliary image before inputting it into the image processing model to obtain the target image, avoids increasing the size of multiple image patches input to the image processing model, thus preventing an increase in GPU memory usage and computing power due to larger image patch sizes. This improves the processing performance of the image processing model and enhances the reliability of image processing. Attached Figure Description

[0019] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 This is a schematic flowchart of an image processing method provided in an embodiment of the present disclosure;

[0021] Figure 2 This is a schematic flowchart of another image processing method provided in an embodiment of the present disclosure;

[0022] Figure 3 This is a schematic diagram illustrating the implementation of a sample image according to an embodiment of this disclosure;

[0023] Figure 4 A schematic diagram illustrating the implementation of an auxiliary sub-image horizontal symmetrical flipping according to an embodiment of this disclosure;

[0024] Figure 5 A schematic diagram illustrating the implementation of an auxiliary sub-image vertical symmetric flipping according to an embodiment of this disclosure;

[0025] Figure 6 This is a schematic diagram illustrating the implementation of a sample image according to an embodiment of this disclosure;

[0026] Figure 7 A schematic diagram illustrating the implementation of image processing model training according to an embodiment of this disclosure;

[0027] Figure 8 A schematic diagram illustrating the implementation of another image processing model training method provided in this embodiment of the disclosure;

[0028] Figure 9 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of the present disclosure;

[0029] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0030] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0031] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0032] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0033] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0034] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0035] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0036] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0037] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the terminal device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0038] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the terminal device.

[0039] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0040] To better understand the embodiments of this disclosure, the relevant terms are described below.

[0041] Pixel: The basic unit of image display, or the smallest unit in an image represented by a sequence of numbers. In the entire image, a pixel can be viewed as a small square of a single color that cannot be further divided into smaller elements or units. The more pixels per unit area, the higher the resolution, and the clearer the displayed image.

[0042] The receptive field refers to the input region that neurons in a neural network "see". In a convolutional neural network, the calculation of a certain element on the feature map is affected by a certain region on the input image, which is the receptive field of that element.

[0043] When an image processing model inputs a patch for processing, the receptive field of the model is limited to the cropped patch due to GPU memory and computing power limitations. Information outside the patch is not visible during processing, thus impacting the model's performance. In this embodiment, increasing the patch size can improve the model's algorithmic capabilities; however, patch size is also limited by GPU memory and computing power, thus limiting the effectiveness of this method.

[0044] To solve the above technical problems, Figure 1 This is a schematic flowchart of an image processing method provided in an embodiment of the present disclosure. The embodiments of the present disclosure are applicable to situations where images are processed to improve the reliability of image processing. The method can be executed by an image processing device, which can be implemented in the form of software and / or hardware, or optionally by an electronic device, such as a mobile phone, computer, or server.

[0045] like Figure 1 As shown, the method includes:

[0046] S110. Determine the sub-image to be processed, wherein the sub-image to be processed is the image within the processing area of ​​the image to be processed.

[0047] In this embodiment, the image to be processed can be understood as the image to be processed. The image to be processed is not specifically limited here. For example, it can be the image to be processed by pixels. The pixel processing of the image can include image super-resolution, image enhancement, image deblurring and image dehazing.

[0048] The sub-image to be processed can be understood as the image within the region to be processed in the image to be processed. The region to be processed can be understood as the image area within the image to be processed; here, the region to be processed is not specifically limited and can be flexibly set according to actual needs.

[0049] The method for determining the sub-image to be processed is not specifically limited here. For example, a piece of the image with a size equal to the pre-set size threshold can be randomly cropped from the processing area of ​​the image to be processed as the sub-image to be processed, or the entire image to be processed can be used as the sub-image to be processed. Size can be understood as the width and height of the image.

[0050] S120. Determine an auxiliary image, wherein the auxiliary image has the same size as the sub-image to be processed, and the pixel data in the auxiliary image is zero.

[0051] In this embodiment, the auxiliary image can be understood as an image used to assist in processing the sub-image to be processed; wherein, the auxiliary image and the sub-image to be processed are of the same size, that is, the size of the auxiliary image is equal to the size of the sub-image to be processed; the pixel data in the auxiliary image can be zero. Pixel data can be understood as data representing pixels, such as pixel values.

[0052] There are no restrictions on how to determine the auxiliary image; for example, after determining the sub-image to be processed, at least one image with zero pixel data of the same size as the sub-image to be processed can be automatically generated as the auxiliary image.

[0053] S130. The sub-image to be processed and the auxiliary image are concatenated and input into the image processing model to obtain the processed target image of the image to be processed. The number of the sub-image to be processed and the auxiliary image are the same as the number of images used as input to the image processing model during the training phase.

[0054] In this embodiment, the image processing model can be understood as a model used for image processing. The image processing model is not specifically limited here; it could be a deep learning-based network model. The target image can be understood as the image obtained after processing the image to be processed, such as the image obtained after processing the pixels of the image to be processed. The training phase can be understood as the phase in which the image processing model is trained.

[0055] Understandably, during the training phase of an image processing model, the input to the model can be an image. Correspondingly, when the image processing model is applied, the number of sub-images and auxiliary images to be processed is the same as the number of images used as input during the training phase; that is, both can be a predetermined number. Here, the predetermined number can be understood as a pre-set number of images, and the specific value of the predetermined number is not limited here; it could be 5 or 9, etc.

[0056] Concatenation, which can be understood as the concatenation operation in image processing, refers to establishing a connection between the layers corresponding to the images to be concatenated, so that the later layers are connected to the earlier layers, thereby performing feature unification of the images in a dimensional way. For example, it can involve taking a given sub-image to be processed and an auxiliary image, layer by layer, and superimposing and combining the sub-image to be processed and the auxiliary image together, which is concatenation. The specific method for concatenating the sub-image to be processed and the auxiliary image is not specified here.

[0057] After determining the sub-image to be processed and the auxiliary image, they are first concatenated. Then, the concatenated sub-image and auxiliary image are used as input data to a pre-trained image processing model to obtain the processed target image. No specific limitations are made here on how the image processing model processes the sub-image and auxiliary image to obtain the target image.

[0058] This disclosure provides an image processing method. First, a sub-image to be processed is determined, which is an image within the processing region of the original image. Then, an auxiliary image is determined, with the same size as the sub-image and zero pixel data within it. Finally, the sub-image to be processed and the auxiliary image are concatenated and input into an image processing model to obtain the processed target image. The number of sub-images to be processed and the number of auxiliary images are both predetermined, as are the number of images used as input to the image processing model during training. This method, by determining the sub-image to be processed and the auxiliary image, uses the auxiliary image as input to help expand the receptive field of the image processing model. By concatenating the sub-image to be processed and the auxiliary image before inputting them into the image processing model to obtain the target image, the method avoids increasing the size of multiple image patches input to the image processing model, thus preventing increased GPU memory usage and computational power due to larger image patch sizes. This improves the processing performance of the image processing model and enhances the reliability of image processing.

[0059] Optionally, the image to be processed is the image to be pixel-processed, and the target image is the image after pixel processing.

[0060] This disclosure pertains to image processing in a low-level field. In this embodiment, pixel processing can be understood as the processing of the pixels of an image, such as image super-resolution, image enhancement, and image dehazing.

[0061] The image to be processed can be understood as the image to be processed pixel by pixel, and the target image can be understood as the image after pixel processing. For example, if the image to be processed is the image to be super-resolution processed, then the corresponding target image can be the image obtained after super-resolution processing; if the image to be processed is the image to be enhanced, then the corresponding target image can be the image obtained after enhancement processing; and so on.

[0062] Optionally, the training phase of the image processing model includes the following steps:

[0063] Obtain a sample set, which includes multiple sample pairs. Each sample pair includes its corresponding concatenated sample sub-images and a processed image. The processed image is the image after processing the target sub-image. The target sub-image is a sample sub-image to be processed among the multiple sample sub-images. The relative positional relationship between the target sub-image and the other corresponding sample sub-images is the same among the sample pairs.

[0064] The image processing model to be trained is trained based on the sample set to obtain the trained image processing model.

[0065] In this embodiment, the sample set can be understood as a collection of multiple sample pairs used to train the image processing model. The sample set may include multiple sample pairs. Each sample pair may include its corresponding concatenated multiple sample sub-images and processed image; that is, a sample pair includes its own corresponding concatenated multiple sample sub-images and processed image. A sample sub-image can be understood as a sub-image cropped from a sample image; the multiple sample sub-images in each sample pair may correspond to one sample image, meaning that the multiple sample sub-images in each sample pair may be multiple different sub-images cropped from the corresponding sample image. The processed image can be understood as the image after processing the target sub-image. The target sub-image can be understood as a sample sub-image to be processed from the multiple sample sub-images.

[0066] The remaining sample sub-images can be understood as the other sample sub-images besides the target sub-image among the multiple sample sub-images of each sample pair. The relative positional relationship can be understood as the relationship between the position of the target sub-image and the positions of the corresponding remaining sample sub-images, with the target sub-image as the reference point. For example, if there are four remaining sample sub-images located directly above, below, to the left, and to the right of the target sub-image, this is the relative positional relationship between the target sub-image and its corresponding remaining sample sub-images.

[0067] It should be noted that the terms "center," "upper," "lower," "left," "right," "front," and "back," etc., indicate directions or positional relationships that may be based on the directions or positional relationships shown in the accompanying drawings. For example, "upper" and "lower" are defined along the direction of the header and footer of the page; "left" and "right" are defined in the direction facing the page; "front" is perpendicular to the page and from the back of the page to the front; and "back" is perpendicular to the page and from the front of the page to the back. These definitions are only for the convenience of describing the technical solutions of this disclosure and do not indicate that the content referred to must have a specific orientation, and therefore should not be construed as a limitation of this disclosure.

[0068] Between each sample pair, the relative positional relationship between the target sub-image and its corresponding other sample sub-images is the same. In other words, if there are two sample pairs, the relative positional relationship between the target sub-image and its corresponding other sample sub-images in one sample pair is the same as that in the other sample pair.

[0069] The method for obtaining the sample set is not specifically limited here. Multiple sample images can be acquired first. For each sample image, a sub-image is randomly cropped as the target sub-image. Then, using the location of the target sub-image as a reference point, multiple different sub-images are cropped at pre-defined positions around the target sub-image to serve as the remaining sample sub-images. The pre-defined positions are not specifically limited, as long as the pre-defined positions used when extracting sample pairs from each sample image are the same. For example, they can be directly above, below, to the left, or to the right of the target sub-image. The edges of the cropped sample sub-images can coincide with the edges of the corresponding target sub-image, or they can be spaced at a predetermined distance; this is not specifically limited here. Finally, the multiple sample sub-images cropped from the sample image and their corresponding processed images can be combined to form a sample pair. Based on this, all the formed sample pairs can be merged into a single sample set.

[0070] After obtaining the sample set, the image processing model to be trained can be trained based on the sample set to obtain the trained image processing model. No specific limitations are made here on how to train the image processing model to be trained based on the sample set.

[0071] For example, multiple sample sub-images of each sample pair have been pre-concatenated. These concatenated sample sub-images can be sequentially input into the image processing model to be trained. The model processes the multiple sample sub-images in the sample pair and outputs a result, which can be considered a single image. Based on this output and the processed image in the corresponding sample pair, a loss function is calculated to adjust the model parameters. After training, the resulting image processing model is the trained image processing model.

[0072] The conditions for ending training are not limited; they can be determined based on the number of training iterations or the accuracy of the training results.

[0073] It should be noted that the training phase of the image processing model can be executed on the electronic device provided in the embodiments of this disclosure, or on other electronic devices different from the electronic devices provided in the embodiments of this disclosure, and no limitation is made here.

[0074] Figure 2 This is a flowchart illustrating another image processing method provided in this embodiment, which is a refinement of the above embodiments. In this embodiment, the training phase of the image processing model is described in detail. It should be noted that technical details not described in detail in this embodiment can be found in any of the above embodiments.

[0075] like Figure 2 As shown, it includes:

[0076] S210. Obtain the sample image.

[0077] In this embodiment, sample images can be understood as image samples used to train the image processing model. There is no specific limitation on how sample images are obtained; for example, multiple images can be obtained as sample images from a data source that provides samples for model training.

[0078] S220. Obtain a target sub-image and an auxiliary sub-image located at a set position on the target sub-image from the sample image. The number of auxiliary sub-images is at least one, and the relative positions of each auxiliary sub-image and the target sub-image are different.

[0079] In this embodiment, the set position can be understood as a pre-set position; the set position is not specifically limited here, and may include any position around the target sub-image with the target sub-image as the reference point. The auxiliary sub-image can be understood as a sub-image used to assist the target sub-image in training the image processing model.

[0080] From the sample image, a target sub-image and an auxiliary sub-image located at a predetermined position within the target sub-image can be obtained. There must be at least one auxiliary sub-image; that is, there can be one or more auxiliary sub-images. The relative positions of each auxiliary sub-image to the target sub-image are different; in other words, the relative position between each auxiliary sub-image and the target sub-image is unique.

[0081] This section does not specify how the target sub-image and auxiliary sub-image can be obtained from the sample image. For example, a target sub-image of a set size can be randomly cropped from the sample image. The set size is not limited here and can be flexibly set according to actual needs. Based on this, the corresponding auxiliary sub-image is cropped from the sample image at the set position of the target sub-image. For example, an auxiliary sub-image can be cropped from the top, bottom, left and right positions of the target sub-image, that is, the relative positions of each auxiliary sub-image and the target sub-image are different. It should be noted that the size of each cropped auxiliary sub-image is the same as the size of the target sub-image.

[0082] Understandably, if, when acquiring auxiliary sub-images, some or all of the images in the acquired auxiliary sub-images are located outside the range of the sample image (i.e., the range outside the edge of the sample image can be considered as outside the range of the sample image), then the pixels corresponding to the part of the auxiliary sub-image that is outside the range of the sample image can be set to zero.

[0083] Figure 3 This is a schematic diagram illustrating the implementation of a sample image provided in an embodiment of this disclosure. For example... Figure 3 As shown, P represents the sample image, p5 represents the target sub-image, and p1, p2, p3, p4, p6, p7, p8, and p9 represent auxiliary sub-images, totaling eight. Among them, p2, p4, p6, and p8 are located directly above, to the left, to the right, and directly below p5, respectively. p1, p3, p7, and p9 are located diagonally opposite p5, specifically at the upper left, upper right, lower left, and lower right corners, respectively. The relative positions of p1, p2, p3, p4, p6, p7, p8, and p9 to p5 are all different.

[0084] S230. The auxiliary sub-image is flipped to obtain the processed auxiliary sub-image.

[0085] In this embodiment, the flipping process can be understood as a horizontal symmetrical flipping process using the vertical center line of the auxiliary sub-image as a reference line and / or a vertical symmetrical flipping process using the horizontal center line of the auxiliary sub-image as a reference line. The vertical center line can be understood as the center line in the vertical direction. The horizontal center line can be understood as the center line in the horizontal direction.

[0086] Figure 4 This is a schematic diagram illustrating the implementation of an auxiliary sub-image horizontal symmetrical flipping method provided in an embodiment of this disclosure. For example... Figure 4 As shown, an auxiliary sub-image is represented by 1, which indicates the vertical center line. Before the auxiliary sub-image is horizontally symmetrically flipped, a, b, c, and d are located at the top left, top right, bottom left, and bottom right corners of the auxiliary sub-image, respectively. After the auxiliary sub-image is horizontally symmetrically flipped along the vertical center line 1 (i.e., after the auxiliary sub-image is horizontally symmetrically flipped), a, b, c, and d are located at the top right, top left, bottom right, and bottom left corners of the auxiliary sub-image, respectively.

[0087] Figure 5 This is a schematic diagram illustrating an implementation of an auxiliary sub-image vertical symmetric flipping method provided in an embodiment of this disclosure. For example... Figure 5 As shown, an auxiliary sub-image is represented by 2, which represents the horizontal center line. Before the auxiliary sub-image is vertically symmetrically flipped, a, b, c, and d are located at the top left, top right, bottom left, and bottom right corners of the auxiliary sub-image, respectively. After the auxiliary sub-image is vertically symmetrically flipped along the horizontal center line 2 (i.e., after the auxiliary sub-image is vertically symmetrically flipped), a, b, c, and d are located at the bottom left, bottom right, top left, and top right corners of the auxiliary sub-image, respectively.

[0088] The acquired auxiliary sub-images are flipped to obtain processed auxiliary sub-images. The specific method for flipping the auxiliary sub-images is not limited here. For example, the regions in each auxiliary sub-image associated with the target sub-image and the regions in the target sub-image associated with each auxiliary sub-image can be determined based on the position of each auxiliary sub-image relative to the target sub-image. The auxiliary sub-images are then flipped so that the position of the region in each auxiliary sub-image associated with the target sub-image is consistent with the position of the region in the target sub-image associated with that auxiliary sub-image. Here, the associated region can be understood as the part where the auxiliary sub-image and the target sub-image are connected.

[0089] Specifically, such as Figure 2 As shown, the lower right corner of p1 is connected to the upper left corner of p5. That is, the lower right corner of p1 is the region in the auxiliary sub-image associated with the target sub-image, and the upper left corner of p5 is the region in the target sub-image associated with the auxiliary sub-image. In this case, to make the lower right corner of p1 become the upper left corner of p1, p1 can be horizontally and vertically flipped. Similarly, the right edge of p4 is connected to the left edge of p5. In this case, to make the right edge of p4 become the right edge of p4, p4 can be horizontally flipped. And so on, other auxiliary sub-images undergo the same flipping process.

[0090] S240. Concatenate the target sub-image and the auxiliary sub-image to obtain multiple concatenated sample sub-images.

[0091] In this embodiment, for each sample image, the target sub-image and auxiliary sub-image obtained from the sample image can be concatenated to obtain multiple concatenated sample sub-images; that is, the target sub-image and auxiliary sub-image can be considered as sample sub-images. The method for concatenating the target sub-image and auxiliary sub-image is not described in detail here; please refer to the above embodiment.

[0092] Each sample image can correspond to a concatenated set of multiple sample sub-images; the concatenation order of multiple sample sub-images in different sample images is the same; that is, if the concatenation order of multiple sample sub-images of a sample image is p1, p2, p3, p4, p5, p6, p7, p8, p9, then the concatenation order of other sample sub-images is the same, which is also p1, p2, p3, p4, p5, p6, p7, p8, p9.

[0093] Optionally, when concatenating multiple sample sub-images of different sample images, the order of each sample sub-image is the same.

[0094] In this context, when multiple sample sub-images of each sample image are concatenated, they can correspond to a concatenation order, which can represent the superposition order when multiple sample sub-images are concatenated; the concatenation order corresponding to each sample image can be the same.

[0095] S250. The concatenated sample sub-images and their corresponding processed images are used as sample pairs of sample images.

[0096] In this embodiment, the processed image can be considered as the processed image of the target sub-image among multiple sample sub-images. Multiple concatenated sample sub-images and their corresponding processed images can be considered as sample pairs corresponding to the sample images.

[0097] S260. Combine multiple sample pairs to form a corresponding sample set.

[0098] In this embodiment, one sample image can correspond to one sample pair. Multiple sample pairs can be combined to form a corresponding sample set.

[0099] S270. Train the image processing model to be trained based on the sample set to obtain the trained image processing model.

[0100] This disclosure embodies the process of the training phase of an image processing model. The method obtains a target sub-image and an auxiliary sub-image from a sample image, and flips the auxiliary sub-image. This ensures that the region in each auxiliary sub-image associated with the target sub-image is located in the same position as the region in the target sub-image associated with that auxiliary sub-image, thereby increasing the correlation between the target and auxiliary sub-images. Furthermore, by using the concatenated target and auxiliary sub-images, along with their corresponding processed images, as sample pairs in a sample set, and training the image processing model based on this sample set, the receptive field of the image processing model can be expanded, thereby improving the image processing performance of the model.

[0101] Optionally, the auxiliary sub-image is flipped to obtain the processed auxiliary sub-image, including: for each auxiliary sub-image, determining the flipping method based on the position of the auxiliary sub-image relative to the target sub-image; and flipping the auxiliary sub-image using the flipping method.

[0102] In this embodiment, the flipping method can be understood as the flipping processing method; for example, the flipping method can include horizontal symmetrical flipping and vertical symmetrical flipping. The position of the auxiliary sub-image relative to the target sub-image can also be considered as the relative position of the auxiliary sub-image and the target sub-image.

[0103] For each auxiliary sub-image, a flipping method is determined based on its position relative to the target sub-image. The specific method for determining the flipping method is not limited here. For example, based on the position of the auxiliary sub-image relative to the target sub-image, the associated region between the auxiliary and target sub-images can be determined (i.e., the region in the auxiliary sub-image associated with the target sub-image and the region in the target sub-image associated with the auxiliary sub-image are both included). The flipping method of the auxiliary sub-image is determined by ensuring that the position of the region in the auxiliary sub-image associated with the target sub-image is consistent with the position of the region in the target sub-image associated with the auxiliary sub-image. The specific method for determining the flipping method of the auxiliary sub-image based on the associated region between the auxiliary and target sub-images is not elaborated here; please refer to the content described in S230 of the above embodiment.

[0104] After determining the flipping method, the auxiliary sub-image can be flipped so that the position of the region in the auxiliary sub-image associated with the target sub-image is consistent with the position of the region in the target sub-image associated with the auxiliary sub-image.

[0105] Optionally, the flipping method is determined based on the position of the auxiliary sub-image relative to the target sub-image, including: if the auxiliary sub-image is located on the straight line containing the horizontal center line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be horizontal symmetrical flipping; if the auxiliary sub-image is located on the straight line containing the vertical center line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be vertical symmetrical flipping; if the auxiliary sub-image is located on the straight line containing the diagonal line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be both horizontal symmetrical flipping and vertical symmetrical flipping.

[0106] Figure 6 This is a schematic diagram illustrating the implementation of a sample image provided in an embodiment of this disclosure. For example... Figure 6 As shown, P represents the sample image, p1, p2, p3, p4, p6, p7, p8 and p9 represent auxiliary sub-images, p5 represents the target sub-image, 3 represents the diagonal of the target sub-image, 4 represents the line containing the vertical center line of the target sub-image, and 5 represents the line containing the horizontal center line of the target sub-image.

[0107] In this embodiment, if the auxiliary sub-image is located on the straight line where the horizontal center line of the target sub-image p5 is located, that is, the auxiliary sub-images p4 and p6 are located on the straight line 5 where the horizontal center line of the target sub-image p5 is located, then the flipping method of the auxiliary sub-image is determined to be horizontal symmetrical flipping.

[0108] If the auxiliary sub-image is located on the vertical center line of the target sub-image p5, that is, if the auxiliary sub-images p2 and p8 are located on the vertical center line 4 of the target sub-image p5, then the flipping method of the auxiliary sub-image is determined to be vertical symmetrical flipping.

[0109] If the auxiliary sub-images are located on the diagonal line of the target sub-image p5, that is, if the auxiliary sub-images p1, p3, p7 and p9 are located on the diagonal line 3 of the target sub-image p5, then the flipping method of the auxiliary sub-images is determined to be horizontal symmetrical flipping and vertical symmetrical flipping.

[0110] The following provides an exemplary description of this disclosure.

[0111] Figure 7 This is a schematic diagram illustrating the implementation of an image processing model training method according to an embodiment of this disclosure. Figure 7 As shown, a patch is randomly cropped from the sample image and used as the input image in the training process of the image processing model. The output image of the image processing model is obtained after passing through the image processing model.

[0112] Figure 8 This is a schematic diagram illustrating the implementation of another image processing model training method provided in this embodiment of the disclosure. For example... Figure 8As shown, a target sub-image p5 and multiple auxiliary sub-images (i.e., p1, p2, p3, p4, p6, p7, p8 and p9) are obtained from the sample image. The target sub-image and the auxiliary sub-images are concatenated to obtain multiple concatenated sample sub-images, which are used as input images in the image processing model training process. The output image of the image processing model is obtained after passing through the image processing model.

[0113] The training of an image processing model based on image super-resolution will be used as an example for illustration. The above... Figure 7 The training method for the image processing model shown is a patch-based method. During training, low-resolution patches and their corresponding high-resolution patches are used as the network's input and label, respectively. However, this method suffers from a limited receptive field. Figure 8 As shown, to address the problem of limited receptive field, this disclosure proposes a multi-patch training method, which... Figure 7 The difference between the methods shown lies in the input. In the multi-patch training method, the input is multiple concatenated patches (i.e., multiple concatenated sample sub-images).

[0114] like Figure 8 As shown in this embodiment, considering the spatial correlation between the various sample sub-images, each auxiliary sub-image is flipped according to its relative position to the center patch (i.e., the auxiliary sub-images p1, p2, p3, p4, p6, p7, p8, and p9) and the center patch (i.e., the target sub-image p5). Specifically, p1, p3, p7, and p9 are flipped vertically and horizontally, p2 and p8 are flipped vertically, and p4 and p6 are flipped horizontally. The center patch is then concatenated with the surrounding eight flipped patches to obtain the final input information (i.e., the target sub-image and the auxiliary sub-images are concatenated to obtain multiple concatenated sample sub-images).

[0115] The multi-patch training method proposed in this disclosure can solve the problem that the patch size is limited by GPU computing power and memory in low-level tasks. It can also effectively improve the receptive field of the image processing model without increasing GPU computing power and memory, thereby effectively improving the image processing performance of the image processing model.

[0116] Figure 9 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of the present disclosure, as shown below. Figure 9 As shown, it includes:

[0117] The first determining module 310 is used to determine the sub-image to be processed, wherein the sub-image to be processed is an image within the processing area of ​​the image to be processed;

[0118] The second determining module 320 is used to determine an auxiliary image, wherein the auxiliary image has the same size as the sub-image to be processed, and the pixel data in the auxiliary image is zero;

[0119] The processing module 330 is used to concatenate the sub-image to be processed and the auxiliary image and input them into the image processing model to obtain the processed target image of the sub-image to be processed. The number of the sub-image to be processed and the auxiliary image and the number of images used as input to the image processing model during the training phase are both set numbers.

[0120] The technical solution provided in this embodiment first determines the sub-image to be processed by a first determining module 310. The sub-image to be processed is an image within the processing region of the image to be processed. Then, a second determining module 320 determines an auxiliary image. The auxiliary image has the same size as the sub-image to be processed, and its pixel data is zero. Finally, a processing module 330 concatenates the sub-image to be processed and the auxiliary image and inputs them into an image processing model to obtain the processed target image of the image to be processed. The number of sub-images to be processed and the number of auxiliary images are the same as the number of images used as input to the image processing model during the training phase. This device determines the sub-image to be processed and the auxiliary image. The auxiliary image, as input, can help expand the receptive field of the image processing model. By concatenating the sub-image to be processed and the auxiliary image and inputting them into the image processing model to obtain the target image, the image concatenation method ensures that the size of the multiple image blocks input to the image processing model does not increase. This avoids the problem of increased GPU memory usage and computing power caused by increasing the size of the image blocks input to the image processing model, thus improving the processing performance of the image processing model and improving the reliability of image processing.

[0121] Optionally, the image to be processed is the image to be pixel-processed, and the target image is the image after pixel processing.

[0122] Optionally, the device includes a training module, which is used for:

[0123] The acquisition module is used to acquire a sample set, which includes multiple sample pairs. Each sample pair includes multiple concatenated sample sub-images and a processed image. The processed image is the image after processing the target sub-image. The target sub-image is a sample sub-image to be processed among the multiple sample sub-images. The relative positional relationship between the target sub-image and the other corresponding sample sub-images is the same among the sample pairs.

[0124] The training module is used to train the image processing model to be trained based on the sample set, so as to obtain the trained image processing model.

[0125] Optional, the acquisition module includes:

[0126] The first acquisition unit is used to acquire sample images;

[0127] The second acquisition unit is used to acquire a target sub-image and an auxiliary sub-image located at a set position of the target sub-image from the sample image. The number of auxiliary sub-images is at least one, and the relative positions of each auxiliary sub-image and the target sub-image are different.

[0128] A flipping unit is used to flip the auxiliary sub-image to obtain a processed auxiliary sub-image.

[0129] A concatenation unit is used to concatenate the target sub-image and the auxiliary sub-image to obtain multiple concatenated sample sub-images;

[0130] The sample pair determination unit is used to take the concatenated multiple sample sub-images and their corresponding processed images as sample pairs of the sample images.

[0131] Optionally, when concatenating multiple sample sub-images of different sample images, the order of each sample sub-image is the same.

[0132] Optional, the flip unit includes:

[0133] A sub-unit is defined for determining the flipping method for each auxiliary sub-image based on the position of the auxiliary sub-image relative to the target sub-image.

[0134] A flipping sub-unit is used to flip the auxiliary sub-image using the flipping method.

[0135] Optionally, define sub-units, specifically for:

[0136] If the auxiliary sub-image is located on the straight line of the horizontal center line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be a horizontal symmetrical flip.

[0137] If the auxiliary sub-image is located on the straight line of the vertical center line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be vertical symmetrical flipping.

[0138] If the auxiliary sub-image is located on the straight line containing the diagonal of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be horizontal symmetrical flipping and vertical symmetrical flipping.

[0139] The image processing apparatus provided in this disclosure can execute the image processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method.

[0140] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0141] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 10 This document illustrates a structural schematic diagram of an electronic device 400 suitable for implementing embodiments of the present disclosure. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0142] like Figure 10 As shown, electronic device 400 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of electronic device 400. The processing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. An edit / output (I / O) interface 405 is also connected to bus 404.

[0143] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 10 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0144] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.

[0145] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0146] The electronic device provided in this embodiment and the image processing method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0147] This disclosure provides a computer storage medium storing a computer program that, when executed by a processing device, implements the image processing method provided in the above embodiments.

[0148] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0149] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0150] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0151] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: determine a sub-image to be processed, the sub-image being an image within a processing region of the image to be processed; determine an auxiliary image, the auxiliary image having the same size as the sub-image to be processed, and the auxiliary image having zero pixel data; concatenate the sub-image to be processed and the auxiliary image and input them into an image processing model to obtain a processed target image of the image to be processed, wherein the number of the sub-image to be processed and the auxiliary image and the number of images used as input to the image processing model during the training phase are both predetermined numbers.

[0152] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0153] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0154] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the units are not necessarily limiting in certain circumstances; for example, the first acquisition unit can also be described as a "unit for acquiring sample images".

[0155] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0156] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0157] According to one or more embodiments of this disclosure, Example 1 provides an image processing method, including:

[0158] Determine the sub-image to be processed, wherein the sub-image to be processed is the image within the processing area of ​​the image to be processed;

[0159] An auxiliary image is determined, wherein the auxiliary image has the same size as the sub-image to be processed, and the pixel data in the auxiliary image is zero;

[0160] The sub-image to be processed and the auxiliary image are concatenated and input into the image processing model to obtain the processed target image of the sub-image to be processed. The number of the sub-image to be processed and the auxiliary image are the same as the number of images used as input to the image processing model during the training phase.

[0161] According to one or more embodiments of this disclosure, Example 2 describes the method described in Example 1.

[0162] The image to be processed is the image to be pixel-processed, and the target image is the image after pixel processing.

[0163] According to one or more embodiments of this disclosure, Example 3 describes the method described in Example 1.

[0164] The training phase of the image processing model includes the following steps:

[0165] Obtain a sample set, which includes multiple sample pairs. Each sample pair includes multiple concatenated sample sub-images and a processed image. The processed image is the image after processing the target sub-image. The target sub-image is a sample sub-image to be processed among the multiple sample sub-images. The relative positional relationship between the target sub-image and the other corresponding sample sub-images is the same among each sample pair.

[0166] The image processing model to be trained is trained based on the sample set to obtain the trained image processing model.

[0167] According to one or more embodiments of this disclosure, Example 4 describes the method described in Example 3.

[0168] The acquisition of the sample set includes:

[0169] Acquire sample images;

[0170] Obtain a target sub-image and an auxiliary sub-image located at a predetermined position in the target sub-image from the sample image. The number of auxiliary sub-images is at least one, and the relative positions of each auxiliary sub-image to the target sub-image are different.

[0171] The auxiliary sub-image is flipped to obtain the processed auxiliary sub-image;

[0172] The target sub-image and the auxiliary sub-image are concatenated to obtain multiple concatenated sample sub-images;

[0173] The concatenated sample sub-images and their corresponding processed images are used as sample pairs of the sample images.

[0174] According to one or more embodiments of this disclosure, Example 5 describes the method described in Example 4.

[0175] When multiple sample sub-images of different sample images are concatenated, the order of each sample sub-image is the same.

[0176] According to one or more embodiments of this disclosure, Example 6 describes the method described in Example 4.

[0177] The step of flipping the auxiliary sub-image to obtain the processed auxiliary sub-image includes:

[0178] For each auxiliary sub-image, the flipping method is determined based on the position of the auxiliary sub-image relative to the target sub-image;

[0179] The auxiliary sub-image is flipped using the aforementioned flipping method.

[0180] According to one or more embodiments of this disclosure, Example 7 describes the method according to Example 6.

[0181] Determining the flipping method based on the position of the auxiliary sub-image relative to the target sub-image includes:

[0182] If the auxiliary sub-image is located on the straight line of the horizontal center line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be a horizontal symmetrical flip.

[0183] If the auxiliary sub-image is located on the straight line of the vertical center line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be vertical symmetrical flipping.

[0184] If the auxiliary sub-image is located on the straight line containing the diagonal of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be horizontal symmetrical flipping and vertical symmetrical flipping.

[0185] According to one or more embodiments of this disclosure, Example 8 provides an image processing apparatus, including:

[0186] The first determining module is used to determine the sub-image to be processed, wherein the sub-image to be processed is an image within the processing area of ​​the image to be processed;

[0187] The second determining module is used to determine an auxiliary image, wherein the auxiliary image has the same size as the sub-image to be processed, and the pixel data in the auxiliary image is zero;

[0188] The processing module is used to concatenate the sub-image to be processed and the auxiliary image and input them into the image processing model to obtain the processed target image of the sub-image to be processed. The number of the sub-image to be processed and the auxiliary image and the number of images used as input to the image processing model during the training phase are both set numbers.

[0189] According to one or more embodiments of this disclosure, Example 9 provides an electronic device, including:

[0190] One or more processing devices;

[0191] Storage device for storing one or more programs.

[0192] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the image processing method as described in any of Examples 1-7.

[0193] According to one or more embodiments of the present disclosure, Example 10 provides a storage medium containing computer-executable instructions that, when executed by a computer processing device, are used to perform an image processing method as described in any of Examples 1-7.

[0194] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0195] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0196] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. An image processing method, characterized by, include: Determine the sub-image to be processed, wherein the sub-image to be processed is the image within the processing area of ​​the image to be processed; An auxiliary image is determined, wherein the auxiliary image has the same size as the sub-image to be processed, and the pixel data in the auxiliary image is zero; The sub-image to be processed and the auxiliary image are concatenated and input into the image processing model to obtain the processed target image of the sub-image to be processed. The number of the sub-image to be processed and the auxiliary image and the number of images used as input to the image processing model during the training phase are both set numbers. The training phase of the image processing model includes the following steps: A sample set is obtained, which includes multiple sample pairs. Each sample pair includes multiple concatenated sample sub-images and a processed image. The multiple sample sub-images include a concatenated target sub-image and auxiliary sub-images. The relative positions of each auxiliary sub-image and the target sub-image are different. The processed image is the image after processing the target sub-image. The target sub-image is a sample sub-image to be processed among the multiple sample sub-images. The relative positional relationship between the target sub-image and the other corresponding sample sub-images is the same among each sample pair. The image processing model to be trained is trained based on the sample set to obtain the trained image processing model.

2. The method of claim 1, wherein, The image to be processed is the image to be pixel-processed, and the target image is the image after pixel processing.

3. The method of claim 1, wherein, The acquisition of the sample set includes: Acquire sample images; Obtain a target sub-image and an auxiliary sub-image located at a predetermined position in the target sub-image from the sample image. The number of auxiliary sub-images is at least one, and the relative positions of each auxiliary sub-image to the target sub-image are different. The auxiliary sub-image is flipped to obtain the processed auxiliary sub-image; The target sub-image and the auxiliary sub-image are concatenated to obtain multiple concatenated sample sub-images; The concatenated sample sub-images and their corresponding processed images are used as sample pairs of the sample images.

4. The method of claim 3, wherein, When multiple sample sub-images of different sample images are concatenated, the order of each sample sub-image is the same.

5. The method of claim 3, wherein, The step of flipping the auxiliary sub-image to obtain the processed auxiliary sub-image includes: For each auxiliary sub-image, the flipping method is determined based on the position of the auxiliary sub-image relative to the target sub-image; The auxiliary sub-image is flipped using the aforementioned flipping method.

6. The method of claim 5, wherein, Determining the flipping method based on the position of the auxiliary sub-image relative to the target sub-image includes: If the auxiliary sub-image is located on the straight line of the horizontal center line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be a horizontal symmetrical flip. If the auxiliary sub-image is located on the straight line of the vertical center line of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be vertical symmetrical flipping. If the auxiliary sub-image is located on the straight line containing the diagonal of the target sub-image, then the flipping method of the auxiliary sub-image is determined to be horizontal symmetrical flipping and vertical symmetrical flipping.

7. An image processing apparatus characterized by comprising: The device includes: The first determining module is used to determine the sub-image to be processed, wherein the sub-image to be processed is an image within the processing area of ​​the image to be processed; The second determining module is used to determine an auxiliary image, wherein the auxiliary image has the same size as the sub-image to be processed, and the pixel data in the auxiliary image is zero; The processing module is used to concatenate the sub-image to be processed and the auxiliary image and input them into the image processing model to obtain the processed target image of the sub-image to be processed. The number of the sub-image to be processed and the auxiliary image and the number of images used as input to the image processing model during the training phase are both set numbers. The device further includes a training module, the training module comprising: An acquisition module is used to acquire a sample set, which includes multiple sample pairs. Each sample pair includes multiple concatenated sample sub-images and a processed image. The multiple sample sub-images include a concatenated target sub-image and auxiliary sub-images. The relative positions of each auxiliary sub-image and the target sub-image are different. The processed image is the image after processing the target sub-image. The target sub-image is a sample sub-image to be processed among the multiple sample sub-images. The relative positional relationship between the target sub-image and the other corresponding sample sub-images is the same among each sample pair. The training module is used to train the image processing model to be trained based on the sample set, so as to obtain the trained image processing model.

8. An electronic device, comprising: The electronic device includes: One or more processing devices; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the image processing method as described in any one of claims 1-6.

9. A storage medium comprising computer-executable instructions, which, when executed by a computer processing device, are used to perform the image processing method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Image processing method and device, storage medium and equipment

    CN113034348A