Image processing device, image processing method, and image processing program
The machine learning model enhances super-resolution by distinguishing between blurs caused by deterioration and inherent blurs, ensuring the background blur is maintained, thus improving the quality of the generated high-resolution image.
Patent Information
- Application Number
- JP2024043763
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-19
- Filing Date
- 2024-03-19
- Publication Date
- 2024-10-31
Smart Images

Figure 2024155748000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing device, an image processing method, and an image processing program. [Background technology]
[0002] Image generation AI (generative AI) technologies such as generative adversarial networks (GANs) are known (Patent Document 1). In addition, in relation to image generation, a technology called super-resolution is known that generates high-resolution images from low-resolution images. Super-resolution is not simply enlarging a low-resolution image, but is a technology that predicts and restores the high-frequency components of the low-resolution image to increase the resolution and generate a high-resolution image. Simply enlarging a low-resolution image causes the image to become blurred, but super-resolution can increase the resolution while removing the resulting blur. In relation to super-resolution, real-ESRGAN (Non-Patent Document 1) has been proposed. In real-ESRGAN, a blurred image is created by performing degradation processing on the teacher image data on the output side, and the blurred image is set as the teacher image data on the input side to train a generator. Here, the input side teacher image data and the output side teacher image data are teacher image data input to the machine learning model and teacher image data to be output from the machine learning model, respectively, during learning of the machine learning model. In the image generation AI, the input side teacher image data is input to the learning model and image processing is performed, so that the learning model learns to obtain an image close to the output side teacher image data. An image is generated by inputting image data into a machine image model as a trained generator and performing inference. In the case of the super-resolution method described in Non-Patent Document 1, a super-resolution image is generated in which the resolution is increased and blur is removed. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Publication No. 2020-205030 [Non-patent literature]
[0004] [Non-Patent Document 1] Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data, Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan, 2021 Summary of the Invention [Problem to be solved by the invention]
[0005] However, in the super-resolution technique of Non-Patent Document 1, image generation is performed without distinguishing whether the input image data is an image blurred by degradation processing or an image with a blurred background based on the depth of field. As a result, all blurs below a certain level, such as the background, are sharpened, and an image different from the original may be generated. One aspect of the present invention aims to improve the quality of super-resolution of an image that includes a blurred portion. [Means for solving the problem]
[0006] In one aspect, the present invention is characterized by comprising a learning unit that learns a machine learning model that outputs a value corresponding to specified input image data based on processed image data in which image data has been degraded based on a specified degradation processing parameter and a value corresponding to the degradation processing parameter. In one aspect, the present invention is characterized by comprising: processed image data in which image data is degraded based on a predetermined degradation processing parameter; and a learning unit that trains a machine learning model that generates output image data corresponding to predetermined input image data based on the image data and a value corresponding to the degradation processing parameter. In one aspect, the present invention is characterized by comprising a learning unit that trains a first machine learning model capable of outputting a value corresponding to specified input image data based on processed image data in which image data has been degraded based on a specified degradation processing parameter and a value corresponding to the degradation processing parameter, and trains a second machine learning model that generates image data corresponding to the specified input image data based on the image data, the processed image data, and a value corresponding to the degradation processing parameter; and an inference unit that performs inference using the first machine learning model using target image data for image processing as input, outputs a value based on the target image data, and performs inference using the second machine learning model using the output value and the target image data as input, and generates output image data based on the target image data. Effect of the Invention
[0007] According to one aspect of the present invention, it is possible to improve the quality of super-resolution of an image including a blurred portion. [Brief description of the drawings]
[0008] [Figure 1] 1 is a block diagram showing a configuration of an image processing device according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a functional block diagram of the image processing device. [Diagram 3] FIG. 2 is a conceptual diagram illustrating learning of a classifier according to the embodiment. [Figure 4] 13 is a diagram illustrating a table that defines the relationship between the degree of deterioration and the tag value. FIG. [Diagram 5] 13 is a diagram illustrating a table that defines the relationship between the degree of deterioration and the tag value. FIG. [Figure 6] 13 is a diagram illustrating a table that defines the relationship between the degree of deterioration and the tag value. FIG. [Figure 7] 4 is a conceptual diagram illustrating derivation of a tag value in a discriminator according to the present embodiment. FIG. [Figure 8] FIG. 2 is a conceptual diagram illustrating learning performed by a generator according to the present embodiment. [Figure 9]11 is a diagram for explaining a tag value to be input to a generator according to the present embodiment. FIG. [Figure 10] FIG. 2 is a diagram illustrating an image generation process executed by the image processing device. [Figure 11] 1A to 1C are diagrams illustrating images generated by the image processing device of this embodiment. [Figure 12] FIG. 11 is a diagram illustrating a first modified example of the discriminator of the present embodiment. [Figure 13] FIG. 11 is a diagram illustrating a second modified example of the classifier of the present embodiment. [Figure 14] FIG. 13 is a diagram illustrating a method for identifying a cutout position in an image. [Figure 15] 4 is a flowchart illustrating a learning process of a classifier in the present embodiment. [Figure 16] 11 is a flowchart illustrating a learning process of a generator in this embodiment. [Figure 17] 4 is a flowchart illustrating an image generation process in the present embodiment. [Figure 18] FIG. 13 is a diagram illustrating the configuration of a generator according to a modified example of the present embodiment. [Figure 19] FIG. 1 is an explanatory diagram of Channel Attention. [Figure 20] FIG. 1 is an explanatory diagram of Spatial Attention. [Figure 21] FIG. 1 is an explanatory diagram of Scaled Dot-Product Attention. [Figure 22] FIG. 1 is a block diagram illustrating an embodiment of a computing device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. First, the process performed by the image processing apparatus according to this embodiment will be outlined. The image processing device of this embodiment inputs target image data to be subjected to super-resolution or the like and information on the degree of blur in the target image data to a trained generator, and performs image generation involving upsampling. The generator is a machine learning model that learns using teacher image data, processed image data obtained by degrading the teacher image data (by reducing or applying Gaussian blur, etc.), and a numerical value of the degree of blur in the processed image data by the degradation processing. By inputting the target image data and information on the degree of blur in the target image data to the trained generator, it is possible to distinguish between blur caused by degradation processing and blur inherent to the target image data, and generate an image with increased resolution. As a result, it is possible to sharpen only the blur caused by increasing the resolution (upsampling), while preventing background blur caused by the depth of field, which is originally contained in the target image data, from being sharpened. Therefore, according to this embodiment, the problem of different images being generated from different target image data can be solved, and the quality of super-resolution can be improved.
[0010] The information on the degree of blur of the target image data input to the generator is obtained by inputting the target image data to a classifier, which is a characteristic configuration of this embodiment. This classifier is a machine learning model that learns pairs of processed image data, which has been subjected to degradation processing such as reduction and Gaussian blurring of teacher image data, and a numerical value indicating the degree of blur caused by the degradation processing. By inputting the target image data to a trained classifier, information on the degree of blur of the target image data is obtained. The machine learning model used in this embodiment may be, for example, a neural network, or a convolutional neural network (CNN) including a convolution layer. In the following description, the machine learning model is simply referred to as a learning model.
[0011] The image processing apparatus of this embodiment will be described in more detail below. <Image processing device> FIG. 1 is a block diagram showing the configuration of an image processing apparatus according to this embodiment, and FIG. 2 is a block diagram explaining the functional blocks of the image processing apparatus. As shown in FIG. 1, the image processing device 1 includes a control unit 10, an image processing unit 11, a storage unit 12, a communication unit 13, a display unit 14, an operation unit 15, and a reading unit 16. Although the image processing device 1 and the operation of the image processing device 1 will be described below as being one computer, the image processing device 1 may be configured to distribute processing among a plurality of computers. The control unit 10 uses a processor such as a CPU (Central Processing Unit), a memory, and the like to control each component of the device and realize various functions. The image processing unit 11 uses a processor such as a GPU (Graphics Processing Unit) or a dedicated circuit, and a memory, and executes image processing in response to a control instruction from the control unit 10. The control unit 10 and the image processing unit 11 may be integrated into one piece of hardware. The control unit 10 and the image processing unit 11 may also be configured as one piece of hardware (SoC: System On a Chip) that integrates a processor such as a CPU or a GPU, a memory, and further a storage unit 12 and a communication unit 13.
[0012] The storage unit 12 uses a hard disk, a flash memory, or a RAM (Random Access Memory). An image processing program 1P and a machine learning library 121L are stored in the storage unit 12. The storage unit 12 also stores definition data defining a classifier 42 and a generator 43, which are learning models created for each learning, parameter information of the learned classifier 42 and generator 43, and the like. The definition data is information that indicates, for example, the network configuration (layer configuration) of a neural network, and the parameter information is information that indicates the weights of nodes in the neural network.
[0013] In the following explanation, parameters such as node weights in a neural network are referred to as "NN parameters." Parameters such as the reduction rate and pixel variation amount in image degradation processing are referred to as "degradation processing parameters" to distinguish them from the above NN parameters. The memory unit 12 can store target image data that is the subject of super-resolution processing (the seed for image generation), output image data that is the result of the super-resolution processing, teacher image data for learning by the discriminator 42 and the generator 43, processed image data obtained by processing the teacher image data, etc. A learning model defined by definition data and NN parameters is incorporated into the machine learning library 121L, and the machine learning library 121L is executed by the control unit 10, whereby the image processing unit 11 realizes a discriminator 42 and a generator 43 that perform the learning and inference of this embodiment.
[0014] The classifier 42 outputs a tag value indicating the degree of blur in the image data based on the input image data. The classifier 42 may be trained so as to be used alone. The generator 43 may be configured by appropriately combining networks such as a transposed convolution layer, a convolution layer, and an upsampling layer. The trained generator 43 generates and outputs (upsampled) image data from input seed data and the tag value. The machine learning library 121L has an inference engine (program) that performs learning and inference, and is executed by providing definition data and NN parameters, thereby providing the definition data and NN parameters with the functionality of a machine learning model. Representative examples of the machine learning library 121L include TensorFlow and Cafe, but the invention is not limited to these and any machine learning library may be used. When the discriminator 42 is configured only with a machine learning model and the target image data input to the generator 43 is not divided into blocks, the discriminator 42 and the generator 43 may be integrated.
[0015] In this embodiment, only the machine learning library 121L is described as the machine learning library that realizes the discriminator 42 and the generator 43, but a discriminator library that realizes the discriminator 42 and a generator library that realizes the generator 43 may be separately provided. In this case, the machine learning library 121L is given a function as a machine learning model, and the discriminator library and the generator library give, for example, definition data such as a layer configuration and parameters such as the weight of each node in the machine learning model.
[0016] The communication unit 13 is a communication module that realizes a communication connection to a communication network such as the Internet, etc. The communication unit 13 uses a network card, a wireless communication device, or a carrier communication module. The display unit 14 uses a liquid crystal panel, an organic EL (Electro Luminescence) display, etc. The display unit 14 is capable of displaying an image by processing in the image processing unit 11 according to an instruction from the control unit 10. The operation unit 15 includes a user interface such as a keyboard or a mouse. It may be a physical button provided on the housing, or a software button displayed on the display unit 14. The operation unit 15 notifies the control unit 10 of operation information by the user. The reading unit 16 can use, for example, a disk drive to read the image processing program 2P and the machine learning library 21L stored in the recording medium 2, which is an optical disk or the like. The image processing program 1P and the machine learning library 121L stored in the storage unit 12 may be the image processing program 2P and the machine learning library 21L read by the reading unit 16 from the recording medium 2 and copied by the control unit 10 to the storage unit 12.
[0017] The control unit 10 of the image processing device 1 functions as a learning process execution unit 31 and an image processing execution unit (inference process control unit) 32 based on an image processing program 1P stored in the storage unit 12. The image processing unit 11 functions as a classifier 42 based on the machine learning library 121L, definition data, and parameter information stored in the storage unit 12, using a memory. In addition, the image processing unit 11 functions as a generator 43 using a memory based on the machine learning library 121L, definition data, and parameter information stored in the storage unit 12. The image processing unit 11 also functions as an input unit 41 and an output unit 44 for inputting and outputting images to and from the discriminator 42 and the generator 43. The functions of the input unit 41 and the output unit 44 may be possessed by the discriminator 42 and the generator 43, respectively, or may be possessed by the learning process execution unit 31 and the image processing execution unit 32 executed by the control unit 10. The image processing unit 11 also functions as a processing unit 45 that processes the teacher image data and a cut-out unit 46 that cuts out the teacher image data. The functions of the processing unit 45 and the cut-out unit 46 may be included in the learning process execution unit 31 and the image processing execution unit 32 executed by the control unit 10. In FIG. 2, the functions of the discriminator 42 and the generator 43 are realized by the machine learning library 121L, so the machine learning library 121L is not shown in the storage unit 12.
[0018] The learning process execution unit 31 performs a process of making the machine learning model into the discriminator 42 by learning NN parameters of the discriminator 42 based on the machine learning library 121L and the teacher image data. The learning process execution unit 31 also performs a process of making the machine learning model into the generator 43 by learning the NN parameters of the generator 43 based on the machine learning library 121L and the teacher image data.
[0019] The image processing execution unit 32 executes a process of inputting image data to a trained classifier 42 and acquiring the result output by the classifier 42 . The image processing execution unit 32 also executes a process of inputting seed image data to a trained generator 43 and acquiring image data generated by the generator 43 . The image processing execution unit 32 may render the image data output from the generator 43 as an image and output it to the display unit 14.
[0020] The image processing device 1 may include, in addition to the machine learning models as the discriminator 42 and the generator 43, a machine learning model as a classifier (discriminator) that constitutes a GAN (Generative Adversarial Networks) for training the generator 43. In this case, the image processing device 1 may include a classifier library in the storage unit 12, and may store definition data defining the classifiers and NN parameters. Then, the image processing execution unit 31 performs a process of learning NN parameters so as to use the machine learning model as a classifier, based on the machine learning library 121L, the classifier library, and the teacher image data. The image processing execution unit 32 provides image data to the trained classifier and obtains the results output from the classifier. The trained classifier classifies the input image data into image data generated by the generator 43 and other image data based on the feature amount extracted from the input image data. The classifier includes multiple convolutional layers defined by parameters to be learned. The configuration of the classifier is not limited to this, and may include a pooling layer, a fully connected layer, etc.
[0021] The classifier of this embodiment will be described. FIG. 3 is a conceptual diagram for explaining learning of a classifier according to this embodiment. The learning of the classifier is performed under the control of the learning process execution unit 31. The learning process execution unit 31 inputs the teacher image data to the processing unit 45, and performs degradation processing (reduction, Gaussian blur, etc.) on the teacher image data based on degradation processing parameters (reduction ratio, pixel fluctuation amount, etc.) shown in Figures 4 to 6 described below, to generate processed image data. The learning process execution unit 31 inputs the generated processed image data to the discriminator 42, and performs learning of the discriminator 42. This learning is learning of NN parameters that enable the discriminator 42 to output a value indicating the degree of blur in the target image data when the target image data is input to the discriminator 42. The learning process execution unit 31, for example, inputs processed image data in which the teacher image data is reduced by 71% with a degradation processing parameter set to a reduction rate of 71% to the discriminator 42, and learns the NN parameters so that the discriminator 42 outputs a tag value equivalent to 71% of the degradation processing parameter.
[0022] In this learning, the learning process execution unit 31 generates one or more processed image data by changing various degradation processing parameters such as the reduction ratio and pixel fluctuation amount in accordance with the tables shown in the following Figs. The learning execution processing unit 31 inputs the generated one or more pieces of processed image data to the discriminator 42, and causes the discriminator 42 to learn. Instead of actually reducing the teacher image data, it is also possible to input only a numerical value (reduction rate) representing a certain percentage of the size of the original image. The learning execution processing unit 31 outputs one or more tag values corresponding to each processed image data to the discriminator 42, and compares the output tag values with tag values corresponding to the degradation processing parameters used when the processed image data was generated. The tag value to be output here is, for example, a tag value of 128 for the reduction ratio when a 50% reduction is performed, a tag value of 128 for the Gaussian blur when a Gaussian blur with a pixel variation of 5 as shown in Figure 5 is also performed, or a tag value of 96 for the combination of a reduction ratio of 50% and a pixel variation of 5. If the output tag values do not all match the tag values corresponding to the degradation processing parameters used to generate the processed image data, the learning process execution unit 31 repeats the adjustment of the NN parameters and the output of the tag values until the tag values output by the discriminator 42 all match the tag values corresponding to the degradation processing parameters. The NN parameters when all match are the NN parameters of the trained discriminator 42. When any image data is input, the discriminator 42 that has undergone this learning process can output a tag value according to the degree of blur that the image data has.
[0023] 4 to 6 are diagrams showing tables in which tag values indicating the degree of blur are assigned to the degree of degradation processing, and 256 tag values indicating the degree of blur from 0 to 255 are assigned to the degree of degradation processing. Here, the larger the tag value, the smaller the degree of blur. Fig. 4 shows a table that defines the relationship between the reduction ratio and the tag value indicating the degree of blur. For example, as shown in Fig. 4, the tag value is defined in advance so that it changes according to the change in the reduction ratio. For example, the tag value is set to 0 when the reduction ratio is 13%, 128 when the reduction ratio is 50.0%, and 255 when the reduction ratio is 100%. The learning process execution unit 31 learns the NN parameters of the discriminator 42 so that when any target image data is input, a corresponding tag value defined in Figure 4 is output according to the degree (reduction rate) of degradation processing (reduction) applied to the target image data.
[0024] Fig. 5 shows a table that defines the relationship between the pixel fluctuation amount of Gaussian blur and the tag value that indicates the degree of blur. For example, as shown in Fig. 5, the tag value is defined in advance so that the tag value changes according to the change in the pixel fluctuation amount. For example, the tag value is set to 0 when the pixel fluctuation amount is 10 pixels, 128 when it is 5 pixels, and 255 when it is 0 pixels. The learning process execution unit 31 learns the NN parameters of the discriminator 42 so that when any target image data is input, a tag value defined in Figure 5 is output according to the degree (pixel variation amount) of degradation processing (Gaussian blur) applied to the target image data. In the cases of Figures 4 and 5, it may be considered that a single type of degradation processing (only reduction, only Gaussian blur) is performed, but it is not limited to this, and a tag value may be output for each of multiple degradation processes performed on the processed image data.
[0025] FIG. 6 shows the tag value with integrated shrinkage and Gaussian blur. As shown in Figures 4 and 5, rather than setting a tag value for each type of degradation processing, it is possible to set a single tag value indicating the degree of blur corresponding to multiple degradation processing parameters, assuming that multiple degradation processes are performed. As shown in Fig. 6, the tag value is defined in advance so that the tag value indicating the degree of blur changes according to the change in the reduction ratio and the change in the pixel variation amount. More specifically, the tag value is set so that the tag value changes according to the change in the pixel variation amount at a predetermined reduction ratio, and also changes according to the change in the pixel variation amount at different reduction ratios. For example, if the reduction ratio is 50.0% and the pixel variation is 10 pixels, the tag value is 64; if the reduction ratio is 50.0% and the pixel variation is 5 pixels, the tag value is 96; and if the reduction ratio is 50.0% and the pixel variation is 0 pixels, the tag value is 128. In addition, when the reduction ratio is 71.0% and the pixel variation is 10 pixels, the tag value is 96; when the reduction ratio is 71.0% and the pixel variation is 5 pixels, the tag value is 144; and when the reduction ratio is 71.0% and the pixel variation is 0 pixels, the tag value is 192. The learning process execution unit 31 learns the NN parameters of the discriminator 42 so that when any target image data is input, a corresponding tag value defined in Figure 6 is output according to the degree (reduction ratio, pixel fluctuation amount) of degradation processing (reduction and Gaussian blur) applied to the target image data. The learning process execution unit 31 similarly performs learning for other degradation processes, such as noise addition and JPEG compression, so that a tag value indicating the degree of blurring according to the degree of degradation is output.
[0026] FIG. 7 is a conceptual diagram for explaining derivation of a tag value in the discriminator of this embodiment. The discriminator 42 inputs processed image data during learning and target image data during inference, and finally outputs one piece of data (tag value) by repeating convolution, activation function processing, pooling, etc. This is like inputting RGB image data and obtaining grayscale data for one pixel. The number of output channels can be changed depending on the type of degradation processing. For example, when only the reduction ratio or only the pixel variation amount is used as the tag value, the number of output channels is set to 1. In that case, when an image with a reduction ratio of 50.0% is input to the trained discriminator 42 and processed, the discriminator 42 outputs a tag value that indicates the degree of blur corresponding to a reduction ratio of 50%. The classifier 42 can also be configured to learn tag values for both the shrinkage ratio and Gaussian blur and obtain a two-channel output (output of two tag values) during inference.
[0027] <generator> Next, the generator of this embodiment will be described. FIG. 8 is a conceptual diagram illustrating the learning performed by the generator of this embodiment. The learning of the generator is performed under the control of the learning process execution unit 31. As shown in Figure 8, the learning execution processing unit 31 inputs teacher image data to the processing unit 45, and performs degradation processing (reduction, Gaussian blurring) on the teacher image data based on degradation processing parameters such as the reduction ratio and pixel fluctuation amount specified in Figures 4 to 6, to obtain processed image data. For example, the learning process execution unit 31 reduces the teacher image data by a certain magnification (1 / 4 if used for 4x super-resolution), and blurs it according to a numerical value of the degree of blurring by Gaussian blurring or the like to generate processed image data. The learning execution processing unit 31 generates one or more pieces of processed image data by changing various degradation processing parameters such as the reduction ratio and pixel fluctuation amount in accordance with the tables of Figures 4 to 6. The processed image data generated for the learning of the discriminator 42 may be used as the processed image data used for learning of the generator.
[0028] The learning execution processing unit 31 inputs the generated one or more pieces of processed image data and one or more tag values corresponding to the degradation processing parameters used to generate these pieces of processed image data to the generator 43, and causes the generator 43 to learn. The tag value here is, for example, a tag value of 128 for the reduction ratio when a 50% reduction as shown in Figure 4 is performed as a degradation process, a tag value of 128 for the Gaussian blur when a Gaussian blur with a pixel variation of 5 as shown in Figure 5 is also performed, or a tag value of 96 for the combination of a reduction ratio of 50% and a pixel variation of 5. This learning is the learning of NN parameters that enable the discriminator 42 to output information (tag) indicating the degree of blur in an image based on the target image data and the degree of blur represented by the tag value when the target image data is input.
[0029] The learning process execution unit 31 inputs the processed image data and the tag value to the generator 43 to generate an image. For example, the learning process execution unit 31 inputs processed image data obtained by reducing (deteriorating) teacher image data at a reduction rate of 50% and a tag value indicating the degree of blur corresponding to a reduction rate of 50% to the generator 43. Since information on a reduction rate of 50% has been input to the generator 43, as a result of processing, the generator 43 outputs output image data that is twice the size of the input image. The learning process execution unit 31 compares the generated image with teacher image data (100% size). If the comparison shows that the two images do not match, the NN parameters are adjusted and the image is generated repeatedly until they match (come closer). The NN parameters when they match are the NN parameters of the trained generator 43. For the learning of the generator 43 by the learning process execution unit 31, for example, the classification result (true / false determination for the teacher data) by the above-mentioned classifier can be used.
[0030] FIG. 9 is a diagram for explaining the tag values to be input to the generator of this embodiment. The tag values input to the generator 43 during learning and inference are in a two-dimensional state according to the input image (processed image data during learning, and target image data during inference). For example, as shown in FIG. 9(a), when the tag value is "50", tag values of the same pixel are prepared for the number of pixels in the input image, and these are input to generator 43 as one data.
[0031] As shown in FIG. 9(b), the learning execution processing unit 31 inputs the acquired tag value of one or more channels and the RGB data (3 channels: R, G, and B) of the processed image data to the generator 43, and obtains output image data by machine learning. The generator 43 starts with convolution processing in the convolution layer (Conv), then repeats activation processing in the convolution layer (Conv) and activation layer (RoLU), and pooling processing in the pooling layer (Pooling) to generate RGB data (3 channels: R', G', and B') different from the input image, and finally combines these to obtain output image data. The same applies to Gaussian blur, JPEG compression, and noise addition.
[0032] FIG. 10 is a diagram illustrating the image generation process executed by the image processing device. The image generation process is performed under the control of the image processing execution unit 32 . The input unit 41 acquires the target image data stored in the storage unit 12 and inputs it to the discriminator 42 . The discriminator 42 performs inference on the target image data using the definition data and NN parameters stored in the storage unit 12, and outputs a tag value. The input unit 41 further inputs the target image data to a generator 43 . The generator 43 uses the tag value output by the discriminator 42, the target image data, and the definition data and NN parameters stored in the memory unit 12 to generate an image using the target image data as a seed, thereby generating output image data. The output unit 44 outputs the output image data generated by the generator 43 to the storage unit 12 .
[0033] FIG. 11 is a diagram explaining the images generated by the image processing device of this embodiment, where (a) is a diagram of the seed target image data, (b) is a diagram of the entire image in a defocused state, (c) is a diagram of the entire image in a sharpened state, and (d) is a diagram of the foreground in a sharpened state and the background in a blurred state according to the depth of field. The seed image is a low-resolution image with a person in the foreground in focus and a blurred background due to depth of field. When a low-resolution image is simply enlarged, the entire image becomes blurred as shown in Fig. 11(b). In the conventional technology described in Non-Patent Document 1, the foreground person and background are all sharpened as shown in Fig. 11(c), resulting in an image that differs from the original image. On the other hand, according to the image processing device of this embodiment, as shown in Fig. 11(d), it is possible to sharpen only the foreground person while leaving the background, which is blurred in the original image, blurred. That is, the image processing device 1 of this embodiment can realize super-resolution that directly captures the overall image characteristics of the low-resolution image of FIG. 11(a). As described above, in super-resolution models such as Real-ESRGAN in Non-Patent Document 1, when generating (reproducing) a high-resolution image based on seed image data, there is a problem in that all blurs below a certain level are sharpened, resulting in the generation of an image that is different from the original. In the image processing device 1 of this embodiment, when a high-resolution image is generated (reproduced) based on seed image data, information on the degree of blur contained in the seed target image data is explicitly provided to the generator 43, so that when the generator 43 reproduces the high-resolution image, it is possible to reproduce even the blur contained in the target image data. Therefore, the blurred background and the like are not sharpened, and the non-blurred parts are directly converted to high resolution, so that the original image can be converted to high resolution. In addition, to address the problem of the entire blurred image being sharpened and becoming different from the original image, there is no need to prepare a pattern that sharpens the blurred image and a pattern that leaves the blurred image blurred in the pair of processed image data and teacher image data in the generator 43, thereby preventing a decrease in learning efficiency.
[0034] <Variation 1> FIG. 12 is a diagram showing a first modified example of the classifier of this embodiment. The image processing device of this embodiment may include a classifier for each type of degradation processing, as shown in FIG. For example, the image processing device 1 may include a reduction ratio discriminator 42A, a Gaussian blur discriminator 42B, a noise addition discriminator 42C, and a JPEG compression discriminator 42D. In this case, the discriminators 42A to 42D learn tag values (reduction ratio tag value, Gaussian blur tag value, noise addition tag value, JPEG compression tag value) indicating the degree of blurring according to the type of degradation processing in the processed image data. The classifiers 42A to 42D may be configured to output a tag value indicating the degree of blur for each factor in the target image data during inference, and the tag values output from the classifiers 42A to 42D may be input to the generator 43. When only reduction is performed on the processed image data, the reduction ratio discriminator 42A outputs a tag value corresponding to the reduction ratio (reduction ratio tag value), and the other discriminators 42B to 42D output tag values when no deterioration processing is performed (255 in the example of FIG. 5). The tag values output from the discriminators 42A to 42D are input to the generator 43 and used for learning and inference in the same manner as in the above description.
[0035] The discriminator 42 may be further divided. A single model corresponding to all the numerical values of the degree of blur may be set, but multiple models may be prepared by dividing the numerical values (reduction ratio) into several large and small values, such as 100% to 80%, 80% to 60%, etc. In this case, the reduction ratio discriminator 42A in Fig. 12(a) is configured as a discriminator according to the reduction ratio, and image data is input to each discriminator, thereby improving the accuracy of discriminating the reduction ratio. For example, as shown in FIG. 12(b), the reduction ratio discriminator 42A in FIG. 12(a) is divided into a first reduction ratio discriminator 42A1, a second reduction ratio discriminator 42A2, a third reduction ratio discriminator 42A3, a fourth reduction ratio discriminator 42A4, and a fifth reduction ratio discriminator 42A5. The first reduction ratio discriminator 42A1 learns the tag value based on the processed image data with reduction ratios ranging from 100% to 80%. The second reduction ratio discriminator 42A2 learns the tag value based on the processed image data with reduction ratios of 80% to 60%. The third reduction ratio discriminator 42A3 learns the tag value based on the processed image data with reduction ratios of 60% to 40%. The fourth reduction ratio discriminator 42A4 learns the tag value based on the processed image data with reduction ratios of 40% to 20%. The fifth reduction ratio discriminator 42A5 learns the tag value based on the processed image data with reduction ratios ranging from 20% to 0%. The trained first to fifth reduction ratio discriminators 42A1 to 42A5 can more accurately output the tag value of the reduction value from the super-resolution target image data during inference.
[0036] <Variation 2> FIG. 13 is a diagram showing a second modified example of the classifier of this embodiment. In the above embodiment, when the discriminator 42 is trained, the entire processed image data is input to the discriminator 42. The same applies to the inference of the discriminator 42 during image generation processing. In this modified example, the image processing device 1 inputs the portion of the processed image data cut out by the cut-out unit 46 executed by the image processing unit 11 to the discriminator 42 to perform learning and inference, thereby reducing the computational load required for learning and inference. For example, blurring occurs due to degradation of the entire image caused by enlarging a small image, applying image compression such as JPEG, etc. Basically, it does not happen that some parts of an image are significantly degraded while other parts are less degraded, and it is assumed that the same degradation occurs within a single image. And the most complicated parts of an image (such as the hair of the person in the foreground in Figure 14) are likely to be parts that were not blurred to begin with. As a result of degradation processing, it is thought that the degradation in those parts affects the entire image equally. The cutout unit 46 can detect the degree to which the image is blurred by cutting out the most complicated part of the image and inputting the cutout part to the trained classifier 42. This makes it unnecessary to input the entire image to the classifier 42 to perform learning and inference, thereby reducing the calculation load. Regarding the generator 43, when a GAN is used, even if the generator 43 is trained using a tag value indicating the degree of blur, the entire image tends to become sharp, but this can also be used as a countermeasure to this problem. The image processing device 1 identifies and cuts out the most complicated part of the image using a method described below, and uses the cut-out part for learning and inference in the discriminator 42.
[0037] 14 is a diagram for explaining a method for identifying the most complicated part of an image as the cutout position in the image. Known image processing can be used for this purpose. For example, a method is considered in which a rough estimate is made of a portion of an image where pixels are intertwined using a gradient filter or edge detection filter, and then the portion is subjected to a discriminator. The image processing device 1 applies Laplacian filtering to a processed image (input image) as shown in FIG. 14(a) to obtain a post-filter image as shown in FIG. 14(b). The specific location of the cut-out position varies depending on the type of degradation processing. When the degradation processing is shrinkage, Gaussian blur, or JPEG compression, the image processing device 1 cuts out the processed image in Fig. 14(a) at a position corresponding to a portion (where a large value is detected) with a lot of white (edge portion) in the filtered image in Fig. 14(b). In the filtered image, a portion with a lot of white is a portion where the pixel change is large. For example, the cut-out position is preferably around the pixel with the most white (the pixel change is the largest, the value obtained by the Laplacian filter is the largest). As a method for identifying the most complicated part of the image after filtering, only the vicinity of pixels where large values are detected can be identified by a specific size as shown in Fig. 14(c). Alternatively, as shown in Fig. 14(d), the image in Fig. 14(b) can be divided into blocks, and the block containing the largest value can be identified as the most complicated part of the image. Alternatively, the block with the highest total value in the block can be identified as the specific location.
[0038] When the type of degradation processing is noise addition, the position of the part where the pixel change in the processed image data is the smallest (the value obtained by Laplacian filter processing is the smallest) is identified. Alternatively, the block where the total value in the block is the lowest may be identified as the specific location. For example, in the case of noise that is applied from above on the entire image, such as film grain, the amount of noise in the image can be estimated by looking at the amount of noise in the flattest part where the image is least complicated, as opposed to blur. Also, even if it is the same noise, noise applied to JPEG compression is considered to be similar in nature to blur because it is a degradation of the original image, so it is considered best to judge based on the amount of large change, just like blur. In the case of JPEG, the compression quality is estimated. When noise is used as a degradation process, there are various methods for adding noise and the degradation process parameters are different for each method, so it is difficult to give a general explanation. In the case of real-ESRGAN described above, two noise distribution functions and parameters that determine their shape (e.g., standard deviation) are set, and there are also conditions such as whether to add noise to all RGB or to add noise individually.
[0039] Since this embodiment is intended to capture features that are present across the entire image, it is preferable that the type of noise be one that occurs uniformly across the entire screen. Methods for adding uniform noise across the entire screen include using a Gaussian distribution or a uniform distribution, and the tag value correspondence as shown in Figures 4 to 6 may be set so that the tag value is 0 when the amount of added noise is at its maximum. Furthermore, when dealing with a plurality of noises, it is preferable to prepare a classifier for each type of noise and train the classifiers and generators, as in the case of the reduction ratio in FIG. 12(b).
[0040] FIG. 15 is a flowchart illustrating the learning process of the classifier in this embodiment. In step S101, the image processing device 1 (learning process execution unit 31) causes the processing unit 45 to perform degradation processing on the teacher image data based on the degradation processing parameters, and generates one or more processed image data. In step S102, the image processing device 1 (learning process execution unit 31) inputs the processed image data to the discriminator . In step S103, the image processing device 1 (learning process execution unit 31) causes the discrimination unit 42 to output the tag value. In step S104, the image processing device 1 (learning process execution unit 31) determines whether or not all of the output tag values match the tag values corresponding to the degradation processing parameters. If it is determined that there is no match (No in step S104), the image processing device 1 (learning process execution unit 31) changes the NN parameters of the discrimination unit 42 in step S106, outputs the tag value in step S103, and performs the judgment in step S104. When it is determined that there is a match (Yes in step S104), the image processing device 1 (learning process execution unit 31) ends the learning process of the discriminator 42 in step S105.
[0041] FIG. 16 is a flowchart illustrating the learning process of the generator in this embodiment. In step S201, the image processing device 1 (learning process execution unit 31) causes the processing unit 45 to perform degradation processing on the teacher image data based on the degradation processing parameters, and generates one or more processed image data. In step S202, the image processing device 1 (learning process execution unit 31) inputs to the generator 43 the generated processed image data and a tag value corresponding to the degradation processing parameter. In step S203, the image processing device 1 (learning process execution unit 31) causes the generator 43 to generate an image based on the processed image data and the tag value. In step S204, the image processing device 1 (learning process execution unit 31) determines whether or not the image generated in step S203 matches all of the teacher image data. This may be determined based on whether or not the image is determined to be true by the classifier described above. If it is determined that there is no match (No in step S204), the image processing device 1 (learning process execution unit 31) changes the NN parameters of the generator 43 in step S206, outputs the tag value in step S203, and performs the determination in step S204. When it is determined that there is a match (Yes in step S204), the image processing device 1 (learning process execution unit 31) ends the learning process of the generator 43 in step S205.
[0042] FIG. 17 is a flowchart illustrating the image generation process in this embodiment. In step S301, the image processing device 1 (image processing execution unit 32) causes the input unit 41 to acquire target image data from the storage unit 12 or the like. In step S302, the image processing device 1 (image processing execution unit 32) inputs the acquired target image data to the discriminator . In step S303, the image processing device 1 (image processing execution unit 32) causes the discrimination unit 42 to output a tag value based on the target image data. In step S304, the image processing device 1 (image processing execution unit 32) inputs to the generator 43 the output tag value and the target image data serving as the seed. In step S306, the image processing device 1 (image processing execution unit 32) causes the generation unit 43 to generate output image data based on the tag value and the target image data. In step S307, the image processing device 1 (image processing execution unit 32) causes the output unit 44 to output the output image data generated by the generation unit 43 to the storage unit 12 or the like.
[0043] <Modifications of the generator> In the above explanation, the entire image or the most intricate (non-blurred) part of the image is input to discriminator 42, which outputs a tag value representing the degree of blur, and this tag value is input to generator 43, thereby appropriately performing super-resolution processing on the target image data. By inputting the tag value into the generator 43 together with the target image data, the blurred background and the like are not sharpened, and the unblurred parts are made high-resolution as they are, so that the original image can be made high-resolution. In recent years, in fields using machine learning, the "Attention" mechanism that identifies closely related data and generates new data is used for various purposes. The generator 43A of the modified example can use this "Attention" mechanism in addition to the configuration described for the generator 43 for super-resolution processing.
[0044] FIG. 18 is a diagram illustrating the configuration of a generator according to a modified example of this embodiment. 18 includes a neural network (hereinafter simply referred to as a network) 50 (50A, 50B, 50C, 50D) and an attention mechanism 51 (51A, 51B, 51C) provided between the network 50. The attention mechanism 51 can also be configured as a neural network, but is distinguished from the network 50 here. The generator 43A learns the NN parameters of the network 50 and the attention mechanism 51 so that a super-resolution image can be generated by the network 50 and the attention mechanism 51 based on the target image data and the tag value. The learning procedure of the generator 43A can be the same as the procedure described in Fig. 16 except for the configuration of the neural network. The image generation procedure of the generator 43A can also be the same as the procedure described in Fig. 17 except for the configuration of the neural network.
[0045] The detailed configuration of the attention mechanism 51 will be described later, but it is possible to use Channel Attention, Spatial Attention, Dot-Product Attention, etc., which are used in image processing. These attentions may be connected in series or in parallel and used in combination. The number of networks 50 and attention mechanisms 51 is not limited to the example of FIG. 18, but the generator 43A includes two or more networks 50 and attention mechanisms 51 provided between the networks 50. The network 50A serves as an input stage for inputting target image data, and the network 50D serves as an output stage for outputting output image data that has been subjected to super-resolution processing. The network 50 and the attention mechanism 51 may be Residual Neural Networks (ResNet), Recurrent Neural Networks (RNN), the above-mentioned CNN, etc. The network 50A receives target image data, performs convolution (Conv), linear processing (ReLU), pooling, and other processes, and outputs the processed data to the next stage, the attention mechanism 51A. The networks 50B, 50C, and 50D have the same configuration as the network 50A, and perform the same processes on the input image data from the attention mechanism 51.
[0046] The output data from the network 50A and the tag value output by the discriminator 42 are input to the attention mechanism 51A. The attention mechanism 51A performs convolution, linear processing, pooling, and further sigmoid function processing on the image data input from the network 50, and outputs image data in which the tag value is reflected in each data to the next-stage network 50B. The attention mechanisms 51B, 51C, and 51D have the same configuration as the attention mechanism 51A and perform the same processing on the image data input from the network 50.
[0047] The network 50 and the attention mechanism 51 repeatedly process each other's output data, and the network 50 at the output stage (network 50D in this case) finally outputs the data as output image data. By using the attention mechanism 51, it is possible to reflect the tag value especially for data or objects that are closely related (meaningful), so it is possible to generate data that reflects the degree of blurring of the original image even more. In other words, the blurred background etc. is not sharpened, and the non-blurred parts are made high resolution as they are, so that the original image can be made high resolution. The tag value input to the attention mechanism 51 may be a tag value output by the trained discriminator 42 described with reference to FIG. 3 or FIG. 13 based on the target image data. In addition, in the generator 43A of the modified example, except for the output-stage network 50D, the attention mechanism 51 in the subsequent stage performs processing to reflect the tag value on the output data from each network 50. Therefore, it is possible to perform super-resolution processing more effectively compared to the case of Fig. 9(b) in which the tag value is input once to the generator 43 together with the input image data.
[0048] Hereinafter, the attention mechanism applicable to this embodiment will be described with reference to FIGS. In the following explanation, "C" represents the number of channels of data handled by the attention mechanism, "W" represents the width (number of pixels) of the image data handled by the attention mechanism, and "H" represents the image height (number of pixels) of the same image data. In either case, new C×W×H image data reflecting the tag value can be output by multiplying the data with Attention applied to the tag value by C×W×H input from the network 50. By performing this for each process of the network 50, as a result of the processing of the generator 43A, the blurred background and the like are not sharpened, and the non-blurred parts are made high-resolution as they are, making it possible to make the original image high-resolution.
[0049] FIG. 19 is an explanatory diagram of Channel Attention. In the attention mechanism using Channel Attention, meaningful data in the image data (feature map) input from the network 50 is weighted, and a tag value is applied to the weighted data to obtain output data that better reflects the degree of blur. The attention mechanism 51 using Channel Attention executes the following processes in the learning and inference processes of the generator 43A. The attention mechanism 51 receives 1×1×n tag values in (A), where n is the number of channels of the tag values according to the type of degradation process described in FIG. The attention mechanism 51 processes the tag values with Dense (fully connected layer or linear regression) in (B) and with a sigmoid function in (C) to obtain 1×1×C data shown in (D). The number of channels C can be the number of channels of the image data to be multiplied later by (F). In (E), the attention mechanism 51 inputs image data from the previous network 50 and performs convolution, linear processing, and pooling to generate C×W×H image data. In (F), the attention mechanism 51 multiplies the data obtained in (D) and the image data obtained in (E) for each channel, and obtains new C×W×H image data in (G). When no convolution or the like is performed on the image data from the previous network 50, the attention mechanism 51 multiplies the image data (C×W×H) input from the network 50 by the data obtained in (D) for each channel in (F), and obtains new C×W×H image data in (G). The image data obtained in (G) is image data in which tag values have been applied to weighted areas of the image data input from the network 50. The attention mechanism 51 outputs the new image data to the next-stage network 50.
[0050] FIG. 20 is an explanatory diagram of Spatial Attention. The attention mechanism that uses spatial attention focuses on where objects are located in the image, and by applying tag values to that data, output data that better reflects the degree of blur is obtained. The attention mechanism 51 using Spatial Attention performs the following processes in the learning and inference of the generator 43A. The attention mechanism 51 receives 1×1×n tag values in (A), where n is the number of channels of the tag values according to the type of degradation process described in FIG. The attention mechanism 51 expands the 1×1×n tag values in (B) to obtain n×W×H data, where W and H can be the width and height of the original image data to be later combined in (C). In (C), the attention mechanism 51 uses a combining function to combine the extended data of the tag value obtained in (B) with the RGB value data (3×W×H) of the target image data (original image) to obtain (n+3)×W×H data. The attention mechanism 51 performs convolution processing on the (n+3)×W×H data in (D) and sigmoid function processing in (E) to obtain 1×W×H data shown in (F). W and H can be the width and height of the image data to be multiplied by (H) later. The 1×W×H data obtained in (F) is one-channel data indicating the tag value at the position of the object that was in the original image (target image data). The attention mechanism 51 inputs image data from the previous network 50 at (G) and performs convolution, linear processing, and pooling to generate C×W×H image data. The attention mechanism 51 multiplies the data obtained at (F) and the image data obtained at (G) for each channel at (H) to obtain new C×W×H image data at (I). When convolution or the like is not performed on the image data from the previous network 50, the attention mechanism 51 multiplies the image data (C×W×H) input from the network 50 by the data obtained in (F) for each channel in (H), and obtains new C×W×H image data in (I). The image data obtained in (I) is image data in which a tag value has been applied to an area where an object is located in the image data input from the network 50. The attention mechanism 51 outputs the new image data to the next-stage network 50.
[0051] FIG. 21 is an explanatory diagram of Scaled Dot-Product Attention. The attention mechanism 51 that uses Scaled Dot-Product Attention performs the following processes in the learning and inference of the generator 43A. The attention mechanism 51 receives 1×1×n tag values in (A), where n is the number of channels of the tag values according to the type of degradation process described in FIG. The attention mechanism 51 expands the 1×1×n tag values in (B) to obtain n×W×H data, where W and H can be the width and height of the image data to be later combined in (C). In (C), the attention mechanism 51 combines the n×W×H data of (B) with the RGB value data (3×W×H) of the target image data (original image) using a combining function to obtain (n+3)×W×H data. The attention mechanism 51 performs convolution processing on the (n+3)×W×H data in (D), and softmax processing in (E), to obtain the C×W×H data shown in (F). These C, W, and H can be the number of channels and the width and height of the image data to be used later in (H). The C×W×H data obtained in (F) is data consisting of the above C channel that indicates the tag value at the position of the object that was in the original image (target image data).
[0052] At (G), the attention mechanism 51 inputs image data from the previous network 50, and performs convolution, linear processing, and pooling to generate C×W×H image data. In (H), the attention mechanism 51 generates a query, key, and value from the image data obtained in (G), inputs the data obtained in (F) into the query to generate a query that takes into account the tag value, further multiplies the multiplied result of the query and key by the value, and obtains new C×W×H image data in (I). In the attention mechanism, a query is a value that represents data to be searched from input data. A key is a value used to measure the closeness between a query and the data to be searched. A value is the data of the search result based on the key. By performing the process of (H), tag values are applied to the image data from the network 50, taking into account the positions of objects in the original image (target image data) and the weighting in the image data input from the network 50, and new C×W×H image data can be obtained in (I). If convolution or the like is not performed on the image data from the network 50, the attention mechanism 51 performs processing (H) using the image data input from the network 50 and the data obtained in (F), and obtains new C×W×H image data in (I). The image data obtained in (I) is image data input from the network 50 that has been weighted (meaningful) and has tag values applied to areas where objects are present. The attention mechanism 51 outputs the new image data to the next-stage network 50.
[0053] FIG. 22 is a block diagram illustrating an embodiment of a computer device. The configuration of the computer device 100 will be described with reference to FIG. The computer device 100 is, for example, an image processing device that processes various types of information, and includes a control circuit 101, a storage device 102, a reading / writing device 103, a recording medium 104, a communication interface 105, an input / output interface 106, an input device 107, and a display device 109. The communication interface 105 is connected to a network 200. The components are connected to each other via a bus 110. The image processing device 1 can be configured by appropriately selecting some or all of the components described in the computer device 100.
[0054] The control circuit 101 controls the entire computer device 100 . The control circuit 101 is a processor such as a Central Processing Unit (CPU), a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), or a Programmable Logic Device (PLD). The control circuit 101 functions as, for example, the control unit 10 in FIG. The image control circuit 108 controls the image processing in the computer device 100 . The image control circuit 108 is a graphic processing unit (GPU) etc. The image control circuit 108 functions as the image processing unit 11 in FIG.
[0055] The storage device 102 stores various data. The storage device 102 is, for example, a memory such as a Read Only Memory (ROM) and a Random Access Memory (RAM), a Hard Disk (HD), a Solid State Drive (SSD), etc. The storage device 102 may store an image processing program that causes the control circuit 101 to function as the control unit 10 in Fig. 1. The storage device 102 functions as, for example, the storage unit 12 in Fig. 1.
[0056] When performing image processing, the image processing device 1 reads out a program stored in the storage device 102 into the RAM. The image processing device 1 executes a program read into the RAM by the control circuit 101, thereby executing processing including at least one of a learning processing execution unit and an image processing execution unit. The program may be stored in a storage device of a server on the network 200 as long as the control circuit 101 can access the program via the communication interface 105 .
[0057] The reading / writing device 103 is controlled by the control circuit 101 and reads / writes data from / to a removable recording medium 104 . The recording medium 104 stores various data. For example, the recording medium 104 stores an image processing program. For example, the recording medium 104 is a non-volatile memory (non-transient recording medium) such as a Secure Digital (SD) memory card, a Floppy Disk (FD), a Compact Disc (CD), a Digital Versatile Disk (DVD), a Blu-ray (registered trademark) Disk (BD), or a flash memory.
[0058] The communication interface 105 communicably connects the computer device 100 to other devices via the network 200. The communication interface 105 functions as, for example, the communication unit 13 in FIG. The input / output interface 106 is, for example, an interface that is detachably connected to various input devices. The input device 107 connected to the input / output interface 106 includes, for example, a keyboard and a mouse. The input / output interface 106 communicably connects the various input devices connected to the computer device 100. The input / output interface 106 outputs signals input from the various input devices connected to the control circuit 101 via a bus 110. The input / output interface 106 also outputs signals output from the control circuit 101 to the input / output device via the bus 110. The input / output interface 106 and the input device 107 function as, for example, the operation unit 15 in FIG. 1.
[0059] The display device 109 displays various information. The display device 109 is, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display panel (PDP), an organic electroluminescence display (OLED), etc. The network 200 is, for example, a LAN, wireless communication, a P2P network, the Internet, etc., and communicatively connects the computer device 100 to other devices. It should be noted that the present embodiment is not limited to the embodiment described above, and various configurations or embodiments can be adopted without departing from the spirit of the present embodiment. [Explanation of symbols]
[0060] 1 Image processing device, 100 Computer device, 101 Control circuit, 102 Storage device, 103 Reading device, 104 Recording medium, 105 Communication interface, 106 Input / output interface, 107 Input device, 108 Image control circuit, 109 Display device, 110 Bus, 200 Network
Claims
1. An image processing device comprising: a learning unit that performs learning of a machine learning model that outputs a value corresponding to a specified input image data based on processed image data in which image data is degraded based on a specified degradation processing parameter and a value corresponding to the degradation processing parameter.
2. a learning unit that performs learning of a machine learning model that generates output image data corresponding to predetermined input image data based on processed image data obtained by degrading image data based on a predetermined degradation processing parameter and the image data and a value corresponding to the degradation processing parameter; An image processing device comprising:
3. A first machine learning model is trained to output a value corresponding to a predetermined input image data based on processed image data obtained by degrading the image data based on a predetermined degradation processing parameter and a value corresponding to the degradation processing parameter; A learning unit that performs learning of a second machine learning model that generates image data corresponding to predetermined input image data based on the image data, the processed image data, and a value corresponding to the degradation processing parameter; Performing inference using the first machine learning model with target image data for image processing as input, and outputting a value based on the target image data; An inference unit that performs inference using the second machine learning model with the output value and the target image data as input, and generates output image data based on the target image data; An image processing device comprising:
4. 4. The image processing device according to claim 1, The image processing device according to claim 1, wherein the value defines a degree of blur in an image.
5. 4. The image processing device according to claim 1, The image processing device according to claim 1, wherein the degradation processing is at least one of reduction, Gaussian blur, noise addition, and JPEG compression.
6. 2. The image processing device according to claim 1, The learning unit is The machine learning model is trained using a portion of the processed image data corresponding to a specific portion including a pixel that satisfies a predetermined condition in an image obtained by performing a filter process on the processed image data.
13. An image processing device comprising:
7. 7. The image processing device according to claim 6, The specific portion includes an area in which a numerical value in the processed image data after the filter processing is high.
13. An image processing device comprising:
8. 7. The image processing device according to claim 6, The specific portion includes an area in which the numerical value of the processed image data after the filter processing is low.
13. An image processing device comprising:
9. 1. A processor-implemented image processing method, comprising: learning a machine learning model that outputs a value corresponding to a predetermined input image data based on processed image data obtained by degrading the image data based on a predetermined degradation processing parameter and a value corresponding to the degradation processing parameter; 13. An image processing method comprising:
10. 1. A processor-implemented image processing method, comprising: A machine learning model is trained to generate output image data corresponding to predetermined input image data based on processed image data obtained by degrading teacher image data based on a predetermined degradation processing parameter, the image data, and a value corresponding to the degradation processing parameter.
13. An image processing method comprising:
11. 1. A processor-implemented image processing method, comprising: A first machine learning model is trained to output a value corresponding to a predetermined input image data based on processed image data obtained by degrading the image data based on a predetermined degradation processing parameter and a value corresponding to the degradation processing parameter; A second machine learning model is trained to generate image data corresponding to predetermined input image data based on the image data, the processed image data, and a value corresponding to the degradation processing parameter; Performing inference using the first machine learning model with target image data for image processing as input, and outputting a value based on the target image data; performing inference using the second machine learning model with the output value and the target image data as input, and generating output image data based on the target image data; 13. An image processing method comprising:
12. An image processing program for causing a processor to execute an image processing method, learning a machine learning model that outputs a value corresponding to a predetermined input image data based on processed image data obtained by degrading the image data based on a predetermined degradation processing parameter and a value corresponding to the degradation processing parameter; 2. An image processing program comprising:
13. An image processing program for causing a processor to execute an image processing method, learning a machine learning model that generates output image data corresponding to predetermined input image data based on processed image data obtained by degrading image data based on a predetermined degradation processing parameter, a value corresponding to the degradation processing parameter, and the image data; 2. An image processing program comprising:
14. An image processing program for causing a processor to execute an image processing method, A first machine learning model is trained to output a value corresponding to a predetermined input image data based on processed image data obtained by degrading the image data based on a predetermined degradation processing parameter and a value corresponding to the degradation processing parameter; A second machine learning model is trained to generate image data corresponding to predetermined input image data based on the image data, the processed image data, and a value corresponding to the degradation processing parameter; Performing inference using the first machine learning model with target image data for image processing as input, and outputting a value based on the target image data; performing inference using the second machine learning model with the output value and the target image data as input, and generating output image data based on the target image data; 2. An image processing program comprising:
15. 4. The image processing device according to claim 3, The inference unit is generating a processed value by performing a predetermined process on the value output by inference using the first machine learning model; generating the output image data by applying the processing value to an intermediate output of the inference using the second machine learning model; 13. An image processing device comprising:
16. 16. The image processing device according to claim 15, the inference unit applies the processing values to the weighted regions in the intermediate output.
13. An image processing device comprising:
17. 16. The image processing device according to claim 15, the inference unit applies the processing value to an area corresponding to a position of an object in the intermediate output based on a position of the object in the target image data.
13. An image processing device comprising:
Citation Information
Patent Citations
Learning method, computer program, classifier, generator, and processing system
JP2020205030A
Cited By
Industrial fault enhanced classification method based on Gaussian discriminant generative adversarial network
CN119538033A
