Image processing system, image processing method, learning system and program
The image processing system addresses the high computational cost of harmonizing high-resolution images by reducing and upsampling parameter maps, allowing efficient and accurate color adjustment with reduced computational overhead.
Patent Information
- Application Number
- JP2023135922
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-12-21
- Filing Date
- 2023-08-23
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2043-08-23
AI Technical Summary
Conventional image harmonization using machine learning models is limited to low-resolution images due to high computational costs, making it impractical for high-resolution images.
An image processing system that acquires high-resolution images and mask images, reduces their resolution, processes them through a parameter map estimation model to generate low-resolution parameter maps, and upsamples these maps to obtain high-resolution parameter maps for color adjustment, thereby reducing computational costs.
Enables efficient color adjustment of high-resolution images with reduced calculation costs by avoiding direct high-resolution input to machine learning models, while maintaining accuracy through affine transformations and loss function normalization.
Smart Images

Figure 0007550936000008 
Figure 0007550936000010 
Figure 0007550936000016
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing system, an image processing method, a learning system, and a program. [Background technology]
[0002] Image Harmonization is known as a technique for reducing the visual discomfort that occurs when two different images (a foreground image and a background image) are combined. When a part of a foreground image is combined with a background image, a visual discomfort occurs due to the difference in the environment in which each image was taken. Image Harmonization is a technique for reducing the above discomfort by appropriately adjusting the color of the area of the combined image that originates from the foreground image.
[0003] Conventionally, a technique related to image harmony using a machine learning model such as a Convolutional Neural Network (CNN) has been proposed, as disclosed in, for example, Non-Patent Document 1. In the conventional technique, the machine learning model estimates a harmonic image based on a composite image, in which the color of a region originating from a foreground image in the composite image and the color of a region originating from a background image in the composite image are harmonized. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] Konstantin Sofiiuk, Polina Popenova, and Anton Konushin. Foreground-aware semantic representations for image harmonization. In Proceedings of the IEEE / CVF Winter Conference on Applications of Computer Vision (WACV), pages 1620-1629, January 2021. Summary of the Invention [Problem to be solved by the invention]
[0005] However, it is difficult to apply the above conventional techniques to high-resolution images. In the above conventional techniques, the machine learning model directly estimates the target harmonic image. The computational cost required for such estimation by the machine learning model increases as the resolution of the image input to the machine learning model increases. Therefore, the application of the above conventional techniques is practically limited to images with low resolution (e.g., 256×256 pixels).
[0006] Note that the above problem applies not only to image harmony using a machine learning model, i.e., a technique for adjusting only the color of the area in the composite image that originates from the foreground image, but also to techniques related to color adjustment of images using machine learning models in general.
[0007] The present invention has been made in consideration of the above-mentioned problems, and its object is to provide an image processing system, an image processing method, a learning system, and a program that enable color adjustment of high-resolution images using a machine learning model at low computational cost. [Means for solving the problem]
[0008] The image processing system according to the present invention includes a first image acquisition means for acquiring a first image having a first resolution, a first mask image acquisition means for acquiring a first mask image having the first resolution and specifying one or more target pixels in the first image to be subjected to color adjustment, a second image acquisition means for acquiring a second image having a second resolution lower than the first resolution based on the first image, a second mask image acquisition means for acquiring a second mask image having the second resolution based on the first mask image, a second parameter map acquisition means for acquiring a second parameter map having the second resolution by inputting the second image and the second mask image to a parameter map estimation model, and a color-adjusted image acquisition means for calculating a color-adjusted pixel value vector which is an output of a transformation function defined by an equation including a product term of a pixel value vector indicating colors of one or more adjustment pixels which are at least the one or more target pixels among the pixels of the first image and a transformation matrix, and acquiring a color-adjusted image including color-adjusted pixels having colors indicated by the color-adjusted pixel value vector, the parameter map estimation model is learned using training data including a first learning image, a first learning mask image specifying one or more learning target pixels to be subjected to color adjustment in the first learning image, and a first correct color-adjusted image, all of which have the first resolution, so as to reduce an error of the first learning color-adjusted image relative to the first correct color-adjusted image; the first learning color-adjusted image includes learning color-adjusted pixels having a color indicated by a learning color-adjusted pixel value vector, which is an output of a learning transformation function including a product term of a learning pixel value vector indicating the color of each of the learning adjustment pixels, which are at least the one or more learning target pixels among the pixels of the first learning image, and a learning transformation matrix, and which is defined by an equation of the same format as the transformation function; the learning transformation matrix has elements of the learning transformation parameters set for the learning adjustment pixels in the first learning parameter map having the first resolution; and the first learning parameter map includes a second learning image, which is the first learning image that has been reduced in resolution and has the second resolution;a second learning mask image having the second resolution and the first learning mask image having the lower resolution, and a second learning parameter map which is an output when the first learning mask image is input to the parameter map estimation model, the second learning parameter map being the higher resolution one; [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a diagram illustrating an example of a hardware configuration of an image processing system according to an embodiment of the present invention. [Figure 2A] FIG. 1 is a diagram illustrating an overview of an image processing system. [Figure 2B] FIG. 1 is a diagram illustrating an overview of an image processing system. [Figure 3A] FIG. 2 is a functional block diagram showing an example of functions realized by the image processing system. [Figure 3B] FIG. 2 is a functional block diagram showing an example of functions realized by the image processing system. [Figure 4] FIG. 13 is a diagram illustrating an example of a parameter map estimation model. [Figure 5A] FIG. 4 is a flow chart showing an example of processing executed in the image processing system. [Figure 5B] FIG. 4 is a flow chart showing an example of processing executed in the image processing system. [Figure 6] FIG. 13 is a diagram showing a result of comparing a case where a transformation matrix is an asymmetric matrix with a case where a transformation matrix is a symmetric matrix. [Figure 7] FIG. 13 is a diagram showing a modified example of a parameter map estimation model. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0011] [1. Hardware configuration of image processing system] Fig. 1 is a diagram showing an example of a hardware configuration of an image processing system 1 according to an embodiment of the present invention. The image processing system 1 according to this embodiment is a computer such as a personal computer. As shown in Fig. 1, the image processing system 1 includes, for example, a control unit 10, a storage unit 12, a communication unit 14, an operation unit 16, and an output unit 18.
[0012] The control unit 10 is, for example, a program-controlled device such as a microprocessor that operates according to a program installed in the image processing system 1. The control unit 10 includes at least one processor.
[0013] The storage unit 12 is, for example, a storage element such as a ROM or a RAM, a hard disk drive (HDD), a solid state drive (SSD) including a flash memory, etc. The storage unit 12 stores programs executed by the control unit 10, etc.
[0014] The communication unit 14 is a communication interface for wired or wireless communication, such as a network interface card, and transmits and receives data to and from other computers or terminals via a computer network such as the Internet.
[0015] The operation unit 16 is an input device and includes, for example, a touch panel, a pointing device such as a mouse, a keyboard, etc. The operation unit 16 transmits the operation content to the control unit 10. The output unit 18 is, for example, an output device such as a display such as a liquid crystal output unit or an organic EL output unit, or an audio output device such as a speaker.
[0016] The programs and data stored in the storage unit 12 may be supplied from another computer via a network. The hardware configuration of the image processing system 1 is not limited to the above example, and various hardware configurations are applicable. For example, the image processing system 1 may include a reading unit (e.g., an optical disk drive or a memory card slot) that reads a computer-readable information storage medium, and an input / output unit (e.g., a USB port) that inputs and outputs data to and from an external device. For example, the programs and data stored in the information storage medium may be supplied to the image processing system 1 via the reading unit or the input / output unit. The image processing system 1 may be composed of multiple computers.
[0017] [2. Image processing system overview] In the following, an overview of the image processing system 1 will be described with reference to Figs. 2A and 2B. Figs. 2A and 2B are diagrams showing an overview of the image processing system 1. In this embodiment, an example will be described in which the image processing system 1 is used for image harmony of a composite image 200. Figs. 2A and 2B show, as an example, a composite image 200 in which a foreground image having a dog as a subject and a background image having the ground of a park as a subject are synthesized. In this specification, image harmony refers to adjusting the color of an area in the composite image that originates from the foreground image (in the case of Figs. 2A and 2B, an area in the composite image 200 where the figure of a dog is displayed).
[0018] The main processes performed by the image processing system 1 are as follows: (1) acquisition of composite image and mask image; (2) acquisition of low-resolution composite image and low-resolution mask image; (3) acquisition of low-resolution parameter map; (4) acquisition of original resolution parameter map; (5) acquisition of harmonic image. An overview of each process is given below.
[0019] [2-1. Acquiring composite images and mask images] First, the image processing system 1 acquires a composite image 200 and a mask image 202 (FIG. 2A). The composite image 200 has a predetermined resolution (hereinafter referred to as "first resolution"). Here, the resolution refers to the number of pixels in an image. The composite image 200 is a three-dimensional array of width W x height H x number of channels 3. Here, the width W and height H are the number of pixels in the width direction and the number of pixels in the height direction of the composite image 200, respectively. Each channel of the composite image 200 corresponds to RGB.
[0020] The mask image 202 is an image that specifies a plurality of target pixels that are to be subjected to color adjustment in the composite image 200. In this embodiment, the target pixels are pixels in an area in the composite image 200 that originates from the foreground image. Specifically, the mask image 202 is a binary image in which the pixel value of the target pixel is 1 and the pixel values of pixels other than the target pixel are 0. The mask image 202 also has a first resolution. The mask image 202 having the first resolution is a three-dimensional array of width W × height H × number of channels 1.
[0021] [2-2. Acquiring low-resolution composite image and low-resolution mask image] The image processing system 1 obtains a low-resolution composite image 200d based on the composite image 200 (FIG. 2A). The low-resolution composite image 200d has a resolution lower than the first resolution (hereinafter referred to as the "second resolution"). The image processing system 1 obtains the low-resolution composite image 200d by reducing the resolution (downsampling) of the composite image 200 (FIG. 2A). The low-resolution composite image 200d has a width W d ×Height H d × 3-channel 3-dimensional array, where the width W d and height H d are the number of pixels in the width direction and the number of pixels in the height direction of the low-resolution composite image 200d, respectively, and W>W d ,H>H d Each channel of the low-resolution composite image 200d corresponds to each of RGB.
[0022] The image processing system 1 also obtains a low-resolution mask image 202d based on the mask image 202. The low-resolution mask image 202d also has a second resolution. The low-resolution mask image 202d has a width W d ×Height H d × 1 channel three-dimensional array.
[0023] [2-3. Acquiring low-resolution parameter maps] The image processing system 1 obtains a low-resolution parameter map 204d by inputting the low-resolution composite image 200d and the low-resolution mask image 202d into a parameter map estimation model M (FIG. 2A).
[0024] Twelve low-resolution conversion parameters are set for each pixel in the low-resolution parameter map 204d. d ×Height H d × 12 channels. Each channel of the original resolution parameter map 204 corresponds to one of the 12 low resolution conversion parameters.
[0025] The parameter map estimation model M is a trained machine learning model that is trained to receive the low-resolution composite image 200d and the low-resolution mask image 202d and output the low-resolution parameter map 204d. Note that, in the present embodiment, a case is illustrated in which the low-resolution composite image 200d and the low-resolution mask image 202d are concatenated and input to the parameter map estimation model M (FIG. 2A), but these may be input to the parameter map estimation model M separately.
[0026] [2-4. Obtaining the original resolution parameter map] The image processing system 1 obtains an original resolution parameter map 204 based on the low resolution parameter map 204d (FIG. 2A). The original resolution parameter map 204 has a first resolution, i.e., the same resolution as the composite image 200 and the mask image 202. The image processing system 1 obtains the original resolution parameter map 204 by increasing the resolution (upsampling) of the low resolution parameter map 204d.
[0027] Twelve conversion parameters are set for each pixel in the original resolution parameter map 204. The twelve conversion parameters set for each pixel in the original resolution parameter map 204 are used to convert the pixel value of that pixel in the composite image 200, as described below. The original resolution parameter map 204 is a three-dimensional array of width W x height H x 12 channels. Each channel of the original resolution parameter map 204 corresponds to one of the twelve conversion parameters.
[0028] [2-5. Acquiring Harmonic Images] The image processing system 1 calculates a harmonic pixel value vector, which is the output of a transformation function defined by an equation including a term of the product of a pixel value vector indicating the color of each of a plurality of target pixels in a composite image 200 and a transformation matrix, and obtains a harmonic image 206 including harmonic pixels having the color indicated by the harmonic pixel value vector (FIG. 2B). Here, the transformation matrix has elements of the 12 transformation parameters set for the target pixel in the original resolution parameter map 204. Details of the transformation function will be described later (see the explanation of Equation 1).
[0029] [Summary] As described above, the image processing system 1 according to this embodiment (1) obtains the composite image 200 and the mask image 202, (2) obtains the low-resolution composite image 200d and the low-resolution mask image 202d, (3) obtains the low-resolution parameter map 204d by inputting the low-resolution composite image 200d and the low-resolution mask image 202d into the parameter map estimation model M, (4) obtains the original resolution parameter map 204 based on the low-resolution parameter map 204d, and (5) calculates a harmonic pixel value vector, which is the output of a transformation function defined by an equation including a term representing the product of a pixel value vector and a transformation matrix, and obtains the harmonic image 206 including harmonic pixels having the color indicated by the harmonic pixel value vector (FIGS. 2A and 2B).
[0030] In conventional image harmony using machine learning models, a machine learning model is used that receives a composite image and a mask image and outputs a desired harmonized image. The computational cost required for estimation using such a machine learning model increases as the resolution of the image input to the machine learning model increases. Therefore, the application of image harmony using the conventional machine learning model is practically limited to images with low resolution (e.g., 256×256 pixels).
[0031] In contrast, the image processing system 1 according to the present embodiment employs the above-described configuration, making it possible to avoid the use of a machine learning model that is used in conventional image harmony, in which a composite image and a mask image are input and a desired harmonized image is output. As a result, the computational cost required for image harmony can be reduced, and image harmony of a high-resolution composite image can be performed at low computational cost. Details of the image processing system 1 will be described below.
[0032] [3. Functions realized by image processing system] Figures 3A and 3B are functional block diagrams showing an example of functions realized by image processing system 1. The functional block diagram of Figure 3A shows, among the functions realized by image processing system 1, functions as a learning system that executes learning of parameter map estimation model M (functions related to learning). Moreover, the functional block diagram of Figure 3B shows, among the functions realized by image processing system 1, functions as an image harmony system that acquires harmonized image 206 (functions related to image harmony). Below, the functions realized by image processing system 1 will be explained separately as functions as a learning system and functions as an image harmony system, using Figures 3A and 3B, respectively.
[0033] [3-1. Function as a learning system] 3A, the image processing system 1 includes a training data storage unit 300, a training data acquisition unit 302, a learning low-resolution composite image acquisition unit 304, a learning low-resolution mask image acquisition unit 306, a model storage unit 308, a learning low-resolution parameter map acquisition unit 310, a learning source resolution parameter map acquisition unit 312, a learning harmonic image acquisition unit 314, and a learning unit 316. The training data storage unit 300 and the model storage unit 308 are mainly realized by the storage unit 12. The training data acquisition unit 302, the learning low-resolution composite image acquisition unit 304, the learning low-resolution mask image acquisition unit 306, the learning low-resolution parameter map acquisition unit 310, the learning source resolution parameter map acquisition unit 312, the learning harmonic image acquisition unit 314, and the learning unit 316 are mainly realized by the control unit 10.
[0034] For convenience of explanation, reference may be made to Figures 2A and 2B below. In the following explanation, a training synthetic image, a training mask image, a training low-resolution synthetic image, a training low-resolution mask image, a training low-resolution parameter map, a training original resolution parameter map, and a training harmonic image correspond to a synthetic image 200, a mask image 202, a low-resolution synthetic image 200d, a low-resolution mask image 202d, a low-resolution parameter map 204d, an original resolution parameter map 204, and a harmonic image 206 in Figures 2A and 2B, respectively.
[0035] It should be noted that the training composite image, training mask image, training low-resolution composite image, training low-resolution mask image, training low-resolution parameter map, training original resolution parameter map, and training harmonic image are distinct from composite image 200, mask image 202, low-resolution composite image 200d, low-resolution mask image 202d, low-resolution parameter map 204d, original resolution parameter map 204, and harmonic image 206, respectively.
[0036] [Training data storage section] The training data storage unit 300 stores a plurality of training data. Each training data includes a training synthetic image (first training image), a training mask image (first training mask image) that specifies one or more training target pixels to be color-adjusted in the training synthetic image, and a correct harmonic image (first correct color-adjusted image). The training synthetic image, the training mask image, and the correct harmonic image all have a first resolution. In the present embodiment, as an example, the first resolution is 1920×1080 pixels, but the first resolution may be any resolution. In the present embodiment, the training data further includes an incorrect harmonic image, which will be described later.
[0037] The training synthetic image is an image obtained by synthesizing a training foreground image and a training background image. The training mask image specifies one or more pixels originating from the training foreground image in the training synthetic image as one or more target pixels. The ground truth harmonic image is ground truth data assigned to a pair of a training synthetic image and a training mask image. The ground truth harmonic image is obtained, for example, by artificially adjusting the color of one or more pixels originating from the training foreground image in the corresponding training synthetic image.
[0038] [Training data acquisition section] The training data acquisition unit 302 acquires training data. In this embodiment, the training data acquisition unit 302 acquires the training data stored in the training data storage unit 300, but the training data may be recorded in another device or information storage medium, and the training data acquisition unit 302 may acquire the training data from the device or information storage medium.
[0039] [Learning low-resolution synthetic image acquisition part] The training low-resolution composite image acquisition unit 304 (second training image acquisition means) acquires a training low-resolution composite image (second training image) having a second resolution based on the training synthetic image (see FIG. 2A). Specifically, the training low-resolution composite image acquisition unit 304 acquires the training low-resolution composite image by reducing the resolution (downsampling) of the training synthetic image. As a method of interpolation associated with the reduction in resolution, a known method such as bilinear interpolation, bicubic interpolation, or Lanczos interpolation may be used. In this embodiment, as an example, a case where the second resolution is 256×256 pixels will be described, but the second resolution may be any resolution as long as it is lower than the first resolution.
[0040] [Low-resolution mask image acquisition part] The learning low-resolution mask image acquisition unit 306 (second learning mask image acquisition means) acquires a low-resolution learning mask image (second learning mask image) having a second resolution based on the learning mask image (see FIG. 2A). Specifically, the learning low-resolution mask image acquisition unit 306 acquires the low-resolution learning mask image by reducing the resolution (downsampling) of the learning mask image. As a method of interpolation associated with the reduction in resolution, any known method may be used, as in the case of the learning low-resolution composite image acquisition unit 304.
[0041] [Model memory section] The model storage unit 308 stores the parameter map estimation model M. Specifically, the model storage unit 308 stores the structure and parameters of the parameter map estimation model M.
[0042] [Parameter map estimation model] The parameter map estimation model M is a machine learning model that receives a training low-resolution composite image and a training low-resolution mask image, and outputs a training low-resolution parameter map (see FIG. 2A). Note that in the image harmonization stage, the parameter map estimation model M receives a low-resolution composite image 200d and a low-resolution mask image 202d, and outputs a low-resolution parameter map 204d.
[0043] Fig. 4 is a diagram showing an example of the parameter map estimation model M. In this embodiment, as an example, a case will be described in which a Convolutional Neural Network (CNN) is used as the parameter map estimation model M. Note that the structure of the parameter map estimation model M is not limited to the example shown in Fig. 4 and can be changed as appropriate.
[0044] The parameter map estimation model M includes an encoder unit 400, a decoder unit 402, and a dimension adjustment unit 404 (see FIG. 4). The encoder unit 400 receives a training low-resolution composite image and a training low-resolution mask image, and outputs a training feature map. The decoder unit 402 receives the training feature map output from the encoder unit 400, and outputs an unadjusted low-resolution parameter map.
[0045] The learning unadjusted low-resolution parameter map has a second resolution, and C (C≠12) low-resolution conversion parameters are set for each pixel. That is, the learning unadjusted low-resolution parameter map has a width W d ×Height H d × C number of channels.
[0046] The dimension adjustment unit 404 receives the learning pre-adjustment low-resolution parameter map and outputs a learning low-resolution parameter map. The dimension adjustment unit 404 is, for example, a convolution layer with a kernel size of 1×1.
[0047] [Low-resolution parameter map acquisition part] The learning low-resolution parameter map acquisition unit 310 (second learning parameter map acquisition means) acquires a learning low-resolution parameter map (second learning parameter map) having a second resolution by inputting the learning low-resolution composite image and the learning low-resolution mask image to the parameter map estimation model M (see FIG. 2A). In this embodiment, the learning low-resolution parameter map acquisition unit 310 uses the parameter map estimation model M stored in the model storage unit 308, but the parameter map estimation model M may be recorded in another device or information storage medium, and the learning low-resolution parameter map acquisition unit 310 may acquire the parameter map estimation model M from the device or information storage medium.
[0048] In this embodiment, the learning low-resolution parameter map acquisition unit 310 acquires a learning low-resolution parameter map by inputting a concatenation (concatenation) of a learning low-resolution composite image and a learning low-resolution mask image to the parameter map estimation model M (FIG. 2A). Note that the learning low-resolution parameter map acquisition unit 310 may input the learning low-resolution composite image and the learning low-resolution mask image separately to the parameter map estimation model M.
[0049] Each pixel in the learning low-resolution parameter map has 12 learning low-resolution transformation parameters. The learning low-resolution parameter map has a width W d ×Height H d × 12 channel three-dimensional array. Each channel of the training low-resolution parameter map corresponds to one of the 12 training low-resolution transformation parameters.
[0050] [Learning source resolution parameter map acquisition part] The learning source resolution parameter map acquisition unit 312 acquires a learning source resolution parameter map (first learning parameter map) based on the learning low resolution parameter map (see FIG. 2A). Specifically, the learning source resolution parameter map acquisition unit 312 acquires the learning source resolution parameter map by increasing the resolution (upsampling) of the learning low resolution parameter map. As a method of interpolation associated with the increase in resolution, a known method such as bilinear interpolation, bicubic interpolation, or Lanczos interpolation may be used.
[0051] Twelve training conversion parameters are set for each pixel in the training source resolution parameter map. That is, the training source resolution parameter map is a three-dimensional array of width W × height H × number of channels 12. Each channel of the training source resolution parameter map corresponds to one of the 12 training conversion parameters. The 12 training conversion parameters set for each pixel in the training source resolution parameter map are used by the training harmonic image acquisition unit 314 to convert the pixel value of the pixel in the training synthetic image, as described below.
[0052] [Learning Harmony Image Acquisition Section] The learning harmony image acquisition unit 314 (learning color-adjusted image acquisition means) calculates a learning harmony pixel value vector (learning color-adjusted pixel value vector), which is the output of the learning conversion function, and acquires a learning harmony image (learning color-adjusted image) including learning harmony pixels (learning color-adjusted pixels) having the color indicated by the learning harmony pixel value vector (see Figure 2B).
[0053] The learning transformation function is defined by an equation including a product term of a learning pixel value vector and a learning transformation matrix. The learning pixel value vector indicates the color of each of a plurality of learning target pixels of the learning synthetic image. In this embodiment, the learning pixel value vector is a three-dimensional vector having each of the RGB values of the learning target pixel as an element. The learning transformation matrix has a plurality of (12 in this embodiment) learning transformation parameters set for the learning target pixel in the learning source resolution parameter map as elements.
[0054] In this embodiment, the learning conversion function is an affine transformation including a product of a learning pixel value vector and a learning conversion matrix. Specifically, as shown in the following formula 1, the formula that defines the learning conversion function is a learning pixel value vector p and a learning conversion matrix W θ A learning transformation vector b θ More specifically, the learning transformation matrix W θ is a training transformation vector b θ has three learned transformation parameters as elements. In this embodiment, the learned transformation matrix is a symmetric matrix. It can be said that the learned harmonic image acquisition unit 314 maps the learned pixel value vector to the learned harmonic pixel value vector in the same color space by the learned transformation function.
[0055]
number
[0056] In the above formula 1, I^ i、j is the training harmonic pixel value vector indicating the color of the training harmonic pixel in the i-th row and j-th column of the training harmonic image, and θ n is the learning transformation parameter set for the pixel in the i-th row and j-th column of the learning source resolution parameter map (n=1,2,...12), p R ,p G ,p B are the RGB values of the training pixel in the i-th row and j-th column of the training composite image.
[0057] [Learning Department] The learning unit 316 learns the parameter map estimation model M based on the training harmonic image and the correct harmonic image. Specifically, the learning unit 316 learns the parameter map estimation model M so that the error of the training harmonic image with respect to the correct harmonic image is reduced.
[0058] In this embodiment, as shown in the following equation 2, a loss function L, which is an error of the training harmonic image with respect to the ground truth harmonic image, is normalized based on the training mask image.
[0059]
number
[0060] In the above formula 2, I^ i、j is the pixel value of the pixel in the i-th row and j-th column of the training harmonic image, I i、j is the pixel value of the pixel in the i-th row and j-th column of the correct harmonic image, A min is a given threshold, M i,j is the pixel value of the pixel in the i-th row and j-th column of the learning mask image. The denominator of Equation 2 is A min and Σ i,j M i,j The largest value among them is shown.
[0061] The learning unit 316 further learns the parameter map estimation model M so that the similarity between the training harmonic image and the correct harmonic image increases and the similarity between the training harmonic image and an incorrect harmonic image (first incorrect color-adjusted image) different from the correct harmonic image decreases. The incorrect harmonic image is an image obtained by converting the pixel values of the training target pixels in the correct harmonic image.
[0062] In addition, the learning unit 316 learns the parameter map estimation model M so that the difference between the degree of agreement between the area originating from the training foreground image and the area originating from the training background image in the training harmonic image and said degree of agreement in the correct harmonic image becomes smaller, and the difference between the degree of agreement in the training harmonic image and said degree of agreement in the incorrect harmonic image becomes larger.
[0063] Specifically, the learning unit 316 calculates a contrast loss function L CR The parameter map estimation model M is trained so that
[0064]
number
[0065] In the above equation 3, D(·) denotes the L1 norm. f,f + ,f - are the feature vectors of regions derived from the training foreground image in the training harmonic image, the correct harmonic image, and the incorrect harmonic image, respectively. + ,f - may be obtained based on the training harmonic image, the correct harmonic image, and the incorrect harmonic image, respectively, using a trained feature extractor. + ,c - are the degrees of agreement between the regions derived from the training foreground image and the regions derived from the training background image in the training harmonic image, the correct harmonic image, and the incorrect harmonic image, respectively. + ,c - are calculated using the following formula 4, respectively.
[0066]
number
[0067] In the above formula 4, gram(·) denotes the Gram matrix. + is the feature vector of the region in the ground truth harmonic image derived from the training background image. + may be obtained based on the ground truth harmonic image using a trained feature extractor.
[0068] The learning unit 316 further learns the parameter map estimation model M so that in the learned low-resolution parameter map, the similarity between at least one learned low-resolution parameter set for a pixel and at least one learned low-resolution parameter set for a pixel adjacent to the pixel is increased.
[0069] Specifically, the learning unit 316 calculates a smoothing loss function L smooth The parameter map estimation model M is trained so that
[0070]
number
[0071] In the above formula 5, ||∇Θ k ||2 indicates the magnitude of the gradient of the learned low-resolution parameter set at the k-th pixel in the learned low-resolution parameter map.
[0072] [3-2. Function as an image harmonizing system] 3B, the image processing system 1 further includes an image data storage unit 318, a composite image acquisition unit 320, a mask image acquisition unit 322, a low-resolution composite image acquisition unit 324, a low-resolution mask image acquisition unit 326, a model storage unit 308, a low-resolution parameter map acquisition unit 328, an original resolution parameter map acquisition unit 330, and a harmonic image acquisition unit 332. The image data storage unit 318 and the model storage unit 308 are mainly realized by the storage unit 12. The composite image acquisition unit 320, the mask image acquisition unit 322, the low-resolution composite image acquisition unit 324, the low-resolution mask image acquisition unit 326, the low-resolution parameter map acquisition unit 328, the original resolution parameter map acquisition unit 330, and the harmonic image acquisition unit 332 are mainly realized by the control unit 10.
[0073] [Image data storage section] The image data storage unit 318 stores the composite image 200 and the mask image 202. Details of the composite image 200 and the mask image 202 are as described in [2-1. Acquisition of composite image and mask image], so description thereof will be omitted.
[0074] [Synthetic image acquisition section] The composite image acquisition unit 320 (first image acquisition means) acquires the composite image 200 (first image) (FIG. 2A). In this embodiment, the composite image acquisition unit 320 acquires the composite image 200 stored in the image data storage unit 318, but the composite image 200 may be recorded in another device or information storage medium, and the composite image acquisition unit 320 may acquire the composite image 200 from the device or information storage medium.
[0075] [Mask image acquisition section] The mask image acquisition unit 322 (first mask image acquisition means) acquires the mask image 202 (first mask image) (FIG. 2A). In this embodiment, the mask image acquisition unit 322 acquires the composite image 200 stored in the image data storage unit 318, but the mask image 202 may be recorded in another device or information storage medium, and the mask image acquisition unit 322 may acquire the mask image 202 from the device or information storage medium.
[0076] [Low-resolution composite image acquisition section] The low-resolution composite image acquisition unit 324 (second image acquisition means) acquires a low-resolution composite image 200d (second image) having a second resolution based on the composite image 200 (FIG. 2A). Specifically, the low-resolution composite image acquisition unit 324 acquires the low-resolution composite image 200d by reducing the resolution (downsampling) of the composite image 200. The method of interpolation associated with the reduction in resolution is similar to that of the training low-resolution composite image, and therefore will not be described.
[0077] [Low-resolution mask image acquisition section] The low-resolution mask image acquisition unit 326 (second mask image acquisition means) acquires a low-resolution mask image 202d (second mask image) having a second resolution based on the mask image 202 (FIG. 2A). Specifically, the low-resolution mask image acquisition unit 326 acquires the low-resolution mask image 202d by reducing the resolution (downsampling) of the mask image 202. The method of interpolation associated with the reduction in resolution is similar to that of the learning low-resolution mask image, and therefore will not be described.
[0078] [Low-resolution parameter map acquisition section] The low-resolution parameter map acquisition unit 328 (second parameter map acquisition means) acquires a low-resolution parameter map 204d (second parameter map) having a second resolution by inputting the composite image 200 and the mask image 202 to the parameter map estimation model M (see FIG. 2A). Here, the parameters of the parameter map estimation model M used by the low-resolution parameter map acquisition unit 328 have been adjusted by the learning of the learning unit 316. Details of the low-resolution parameter map 204d are as described in [2-3. Acquisition of low-resolution parameter map], and therefore will not be described here.
[0079] [Original resolution parameter map acquisition part] The original resolution parameter map acquisition unit 330 (first parameter map acquisition means) acquires the original resolution parameter map 204 (first parameter map) based on the low resolution parameter map 204d (see FIG. 2A). Specifically, the original resolution parameter map acquisition unit 330 acquires the original resolution parameter map 204 by increasing the resolution (upsampling) of the low resolution parameter map 204d. The method of interpolation associated with the reduction in resolution is the same as that of the learning original resolution parameter map, and therefore will not be described.
[0080] [Harmonic Image Acquisition Section] The harmonic image acquisition unit 332 (color-adjusted image acquisition means) calculates a harmonic pixel value vector (color-adjusted pixel value vector), which is the output of the conversion function, and acquires a harmonic image 206 (color-adjusted image) that includes harmonic pixels (color-adjusted pixels) having the color indicated by the harmonic pixel value vector (see Figure 2B).
[0081] The transformation function is defined by an equation including a term of the product of a pixel value vector and a transformation matrix. The pixel value vector indicates the color of each of a plurality of target pixels in the composite image 200. In this embodiment, the pixel value vector is a three-dimensional vector having each of the RGB values of the target pixel as an element. The transformation matrix has a plurality of transformation parameters set for the pixel in the original resolution parameter map 204 as elements.
[0082] The transformation function is an affine transformation including the product of a pixel value vector and a transformation matrix. Specifically, the equation defining the transformation function is expressed as the sum of a term of the product of a pixel value vector and a transformation matrix whose elements are some transformation parameters set for pixels related to the pixel value vector in the original resolution parameter map 204, and a term of a transformation vector whose elements are other some transformation parameters set for pixels related to the pixel value vector in the original resolution parameter map 204. The specific equation is the same as that of the learning transformation function, so a description thereof will be omitted (see Equation 1). That is, the equation defining the transformation function has the same format as the equation defining the learning transformation function, and only the parameters are different. It can also be said that the harmonic image acquisition unit 332 maps a pixel value vector to a harmonic pixel value vector in the same color space by the transformation function.
[0083] [4. Processing performed by the image processing system] Figures 5A and 5B are flow diagrams showing an example of processing executed by image processing system 1. The flow diagram of Figure 5A shows processing related to learning among the processing executed by image processing system 1. Moreover, the flow diagram of Figure 5B shows processing related to image harmony among the functions realized by image processing system 1. The processing shown in Figures 5A and 5B is executed by control unit 10 operating in accordance with a program stored in storage unit 12.
[0084] [4-1. Learning-related processing] 5A, the control unit 10 acquires training data including a training synthetic image, a training mask image, and a correct harmonic image (S500a). The control unit 10 acquires a training low-resolution synthetic image based on the training synthetic image (S502a), and acquires a training low-resolution mask image based on the training mask image (S504a).
[0085] The control unit 10 acquires a training low-resolution parameter map (S506a) by inputting the training low-resolution composite image and the training low-resolution mask image to the parameter map estimation model M. Next, the control unit 10 acquires a training source resolution parameter map based on the training low-resolution parameter map (S508a).
[0086] The control unit 10 calculates a learned harmonic pixel value vector, which is the output of the learned transformation function, and obtains a learned harmonic image including learned harmonic pixels having the color indicated by the learned harmonic pixel value vector (S510a).
[0087] The control unit 10 performs training of the parameter map estimation model M based on the training harmonic image and the ground truth harmonic image (S512a). Specifically, the control unit 10 performs training of the parameter map estimation model M based on the loss function L and the contrast loss function L CR and the smoothing loss function L smooth The parameter map estimation model M is trained so that the values of each of the loss functions become small. If the values of each of the loss functions become sufficiently small during the training, the control unit 10 ends the training at that point. The control unit 10 may end the training when the training has been repeated a predetermined number of times, even if the values do not become sufficiently small. As a training method, a known method may be used, and for example, backpropagation, Adam, RMSProp, etc. may be used.
[0088] When the control unit 10 determines not to end the learning (S514a; N), it repeats the processes of S500 to S512. When the control unit 10 determines to end the learning (S514a; Y), it ends this process.
[0089] [4-2. Image Harmony Processing] 5B, the control unit 10 acquires the composite image 200 (S500b), and acquires the mask image 202 (S502b). The control unit 10 acquires a low-resolution composite image 200d based on the composite image 200 (S504b), and acquires a low-resolution mask image 202d based on the learning mask image (S506b).
[0090] The control unit 10 inputs the low-resolution composite image 200d and the low-resolution mask image 202d to the parameter map estimation model M to obtain a low-resolution parameter map 204d (S508b). The control unit 10 obtains the original resolution parameter map 204 based on the low-resolution parameter map 204d (S510b). The control unit 10 calculates a harmonic pixel value vector, which is the output of the conversion function, and obtains a harmonic image 206 including harmonic pixels having the color indicated by the harmonic pixel value vector (S512b), and ends this process.
[0091] [5. Summary] According to the image processing system 1 of the present embodiment described above, it is possible to avoid using a machine learning model that is used in conventional image harmony, in which a composite image and a mask image are input and a target harmonized image is output. As a result, the computational cost required for image harmony can be reduced, and image harmony of a high-resolution composite image can be performed at low computational cost.
[0092] Furthermore, the image processing system 1 according to this embodiment calculates a harmonic pixel value vector, which is the output of a transformation function defined by an equation including a term of the product of a pixel value vector indicating the color of each of a plurality of target pixels in the composite image 200 and a transformation matrix whose elements are a plurality of transformation parameters set for the target pixels in the original resolution parameter map 204, and acquires a harmonic image 206 including harmonic pixels having the color indicated by the harmonic pixel value vector. That is, the image processing system 1 directly converts the pixel value of the target pixel in the composite image 200 into the pixel value of a pixel (harmonic pixel) corresponding to the target pixel in the harmonic image 206 based on one type of parameter set, so that the process of learning and image harmony is simplified, and as a result, learning and image harmony can be performed with high efficiency.
[0093] In the image processing system 1 according to the present embodiment, the transformation function is an affine transformation including a product of a pixel value vector and a transformation matrix, and the transformation matrix is a symmetric matrix. In this way, by using an affine transformation including a symmetric transformation matrix as the transformation function, the accuracy of learning and image harmony is improved as shown in FIG.
[0094] In addition, in the image processing system 1 according to the present embodiment, the error of the training harmonic image relative to the ground truth harmonic image is normalized based on the training mask image (see Equation 2). This makes the error value independent of the size of the area originating from the foreground image (the area occupied by the target pixel), enabling stable training.
[0095] Furthermore, in the image processing system 1 according to this embodiment, the parameter map estimation model M is trained so that the similarity between the training harmonic image and the correct harmonic image is increased and the similarity between the training harmonic image and an incorrect harmonic image that is different from the correct harmonic image is decreased, thereby further improving the learning accuracy.
[0096] Furthermore, in the image processing system 1 according to this embodiment, the parameter map estimation model M is trained so that in the trained low-resolution parameter map, the similarity between at least one trained low-resolution parameter set for a pixel and at least one trained low-resolution parameter set for a pixel adjacent to the pixel is increased, thereby further improving the accuracy of training.
[0097] [6. Modifications] The present invention is not limited to the above-described embodiment. Furthermore, the specific character strings and numerical values described above and the specific character strings and numerical values in the drawings are merely examples, and the present invention is not limited to these character strings and numerical values.
[0098] [6-1. Variation 1] In this embodiment, the learning pixel value vector is a three-dimensional vector having elements each representing the RGB value of the learning target pixel related to the learning pixel value vector, but the learning pixel value vector may be a four- or higher-dimensional vector based on the RGB value of the target pixel related to the learning pixel value vector. For example, the learning pixel value vector may include, as an element, the product of at least any two components out of the three components of the pixel value related to the learning pixel value vector. Also, the learning pixel value vector may include, as an element, the square of at least one component of the pixel value related to the learning pixel value vector. The learning pixel value vector p related to the first modification is shown in the following equation 6.
[0099]
number
[0100] The equation that defines the learning transformation function according to this modification is expressed as the product of the learning pixel value vector and the learning transformation matrix, as shown in the following formula 7. The learning transformation function according to this modification is a linear transformation. As shown in formula 7, the learning transformation matrix W θ has 27 learned conversion parameters as elements. Therefore, in this modification, 27 low resolution conversion parameters are set for each pixel of the learning low resolution parameter map, and 27 conversion parameters are set for each pixel of the learning source resolution parameter map. Details of the pixel value vector, conversion function, low resolution parameter map 204d, and source resolution parameter map 204 related to the composite image 200 in this modification are similar to the above-mentioned learning pixel value vector, learning conversion function, learning low resolution parameter map, and learning source resolution parameter map. According to this modification, the number of conversion parameters increases, making it possible to learn and harmonize images with higher accuracy.
[0101]
number
[0102] [6-2. Variation 2] In the present embodiment, a case has been described in which CNN is used as the parameter map estimation model M, but the parameter map estimation model M may be a machine learning model other than CNN. For example, the parameter map estimation model M may be a Transformer model. The Transformer model may be a Transformer model dedicated to image processing, which is so-called a Vision Transformer.
[0103] Specifically, as shown in FIG. 7, the parameter map estimation model M according to this modification includes a patch embedding unit 700, a transformer encoder unit 702, a transposed convolution unit 704, an activation unit 706, and a dimension adjustment unit 708. As specific configurations of the patch embedding unit 700, the transformer encoder unit 702, the transposed convolution unit 704, and the activation unit 706, for example, those described in Reference 1 (Alexey Dosovitskiy, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020) can be used. Details of the dimension adjustment unit 708 are similar to those of the dimension adjustment unit 404, so description will be omitted.
[0104] [6-3. Other Modifications] In this embodiment, a case has been described in which the image processing system 1 learns the parameter map estimation model M, but the learning of the parameter map estimation model M may be performed by another system.
[0105] In the present embodiment, the original resolution parameter map acquisition unit 330 of the image processing system 1 acquires the original resolution parameter map 204 based on the low resolution parameter map 204d, but the image processing system 1 does not necessarily need to include the original resolution parameter map acquisition unit 330. In other words, when the conversion function includes an operation related to interpolation, the low resolution parameters set for each pixel of the low resolution parameter map 204d may be used as parameters in the conversion function. In this case, it can be said that the original resolution parameter map 204 is acquired in the processing of the harmonic image acquisition unit 332. The same applies to the learning original resolution parameter map acquisition unit 312.
[0106] Furthermore, in this embodiment, among the pixels of the composite image 200, only the pixel value of the target pixel is provided for processing by the harmonic image acquisition unit 332, but among the pixels of the composite image 200, the pixel values of pixels other than the target pixel may also be provided for processing by the harmonic image acquisition unit 332. For example, the pixel values of pixels surrounding the region derived from the foreground image in the composite image 200 may also be provided for processing by the harmonic image acquisition unit 332. This may further improve the affinity between the color of the region derived from the foreground image and the color surrounding the region after color conversion.
[0107] In short, the harmonic image acquisition unit 332 only needs to calculate a harmonic pixel value vector that is the output of a transformation function defined by an equation including a term of the product of a transformation matrix and a pixel value vector indicating the color of one or more adjustment pixels that are at least one or more target pixels among the pixels of the composite image 200, and acquire the harmonic image 206 that includes harmonic pixels having the color indicated by the harmonic pixel value vector. The same applies to the training harmonic image acquisition unit 314.
[0108] Furthermore, in the present embodiment, a case has been described in which there are a plurality of target pixels, but the number of target pixels may be one or more.
[0109] In addition, in the present embodiment, the mask image 202 is a binary image, but the present invention is not limited to this example. For example, when the composite image 200 is an image obtained by combining a plurality of foreground images and one background image, a different value may be set for each region derived from each foreground image. In short, the mask image 202 may be one that specifies one or more target pixels that are to be subjected to color adjustment in the composite image 200. The same applies to the learning mask image.
[0110] Furthermore, in this embodiment, a case has been described in which the image processing system 1 is used for image harmony, but the present invention is generally applicable to techniques relating to image color adjustment using a machine learning model.
[0111] [7. Notes] (1) a first image acquisition means for acquiring a first image having a first resolution; a first mask image acquisition means for acquiring a first mask image having the first resolution and designating one or more target pixels in the first image that are to be subjected to color adjustment; a second image acquisition means for acquiring a second image having a second resolution lower than the first resolution based on the first image; a second mask image acquisition means for acquiring a second mask image having the second resolution based on the first mask image; a second parameter map acquisition means for acquiring a second parameter map having the second resolution by inputting the second image and the second mask image into a parameter map estimation model; a color-adjusted image acquisition means for calculating a color-adjusted pixel value vector which is an output of a transformation function defined by an equation including a product term of a pixel value vector indicating a color of each of one or more adjustment pixels which are at least the one or more target pixels among the pixels of the first image and a transformation matrix, and acquiring a color-adjusted image including color-adjusted pixels having a color indicated by the color-adjusted pixel value vector, a color-adjusted image acquisition means for acquiring a color-adjusted image, the transformation matrix being the second parameter map having a high resolution, the transformation parameters being set for the adjustment pixels in the first parameter map having the first resolution; having The parameter map estimation model is using training data including a first learning image, a first learning mask image that specifies one or more learning target pixels to be color-adjusted in the first learning image, and a first correct color-adjusted image, all of which have the first resolution, learning is performed so that an error of the first learning color-adjusted image relative to the first correct color-adjusted image is reduced; The first learning color adjustment image is a learning color-adjusted pixel having a color indicated by a learning color-adjusted pixel value vector, which is an output of a learning conversion function that includes a product term of a learning pixel value vector indicating the color of each of the learning adjusted pixels that are at least the one or more learning target pixels among the pixels of the first learning image and a learning conversion matrix and is defined by an equation of the same format as the conversion function; the learning transformation matrix has as its elements a plurality of learning transformation parameters set for the learning adjustment pixels in a first learning parameter map having the first resolution, The first learned parameter map is a second learning parameter map, which is an output when the first learning image whose resolution has been reduced and which has the second resolution, and the first learning mask image whose resolution has been reduced and which has the second resolution, are input to the parameter map estimation model, has a higher resolution; Image processing system. (2) the first image acquisition means acquires an image in which a foreground image and a background image are combined as the first image; the first mask image acquisition means acquires, as the first mask image, an image in which one or more pixels originating from the foreground image in the composite image are designated as the one or more target pixels; The image processing system according to (1). (3) Further comprising a first parameter map acquisition means for acquiring the first parameter map based on the second parameter map. An image processing system according to (1) or (2). (4) the transformation matrix is a symmetric matrix, The transformation function is an affine transformation including a product of the pixel value vector and the transformation matrix. The image processing system according to any one of (1) to (3). (5) The pixel value vector includes, as an element, a product of at least any two components of three components of a pixel value related to the pixel value vector. An image processing system according to any one of (1) to (4). (6) The pixel value vector includes, as an element, a square of at least one component of a pixel value related to the pixel value vector. An image processing system according to any one of (1) to (5). (7) The parameter map estimation model includes a Transformer model. An image processing system according to any one of (1) to (6). (8) The error is normalized based on the first training mask image. An image processing system according to any one of (1) to (7). (9) the parameter map estimation model is a machine learning model trained to increase the similarity between the first training color-adjusted image and the first correct color-adjusted image and to decrease the similarity between the first training color-adjusted image and a first incorrect color-adjusted image different from the first correct color-adjusted image. (8) An image processing system according to (8). (10) The first incorrectly color-adjusted image is an image obtained by converting pixel values of the learning pixels in the first correctly color-adjusted image. (9) An image processing system according to (9). (11) The parameter map estimation model is further a machine learning model trained to increase a similarity between at least one second learned conversion parameter set for a pixel and at least one second learned conversion parameter set for a pixel adjacent to the pixel in the second learned parameter map. (9) An image processing system according to (9). [Explanation of symbols]
[0112] 1 image processing system, 10 control unit, 12 memory unit, 14 communication unit, 16 operation unit, 18 output unit, 200 composite image, 200d low-resolution composite image, 202 mask image, 202d low-resolution mask image, 204 original resolution parameter map, 204d low-resolution parameter map, 206 harmonic image, 300 training data memory unit, 302 training data acquisition unit, 304 learning low-resolution composite image acquisition unit, 306 learning low-resolution mask image acquisition unit, 308 model memory unit, 310 learning low-resolution parameter map acquisition unit, 312 learning original resolution parameter map acquisition unit, 314 learning harmonic image acquisition unit, 316 learning unit, 318 image data memory unit, 320 composite image acquisition unit, 322 mask image acquisition unit, 324 low-resolution composite image acquisition unit, 326 low-resolution mask image acquisition unit, 328 low-resolution parameter map acquisition unit, 330 An original resolution parameter map acquisition unit, 332 a harmonic image acquisition unit, an M parameter map estimation model, 400 an encoder unit, 402 a decoder unit, 404 a dimension adjustment unit, 700 a patch embedding unit, 702 a transformer encoder unit, 704 a transposed convolution unit, 706 an activation unit, and 708 a dimension adjustment unit.
Claims
1. a first image capture means for capturing a first image having a first resolution; a first mask image acquisition means for acquiring a first mask image having the first resolution and designating one or more target pixels in the first image that are to be subjected to color adjustment; a second image acquisition means for acquiring a second image having a second resolution lower than the first resolution based on the first image; a second mask image acquiring means for acquiring a second mask image having the second resolution based on the first mask image; a second parameter map acquisition means for acquiring a second parameter map having the second resolution by inputting the second image and the second mask image into a parameter map estimation model; a color-adjusted image acquisition means for calculating a color-adjusted pixel value vector which is an output of a transformation function defined by an equation including a product term of a pixel value vector indicating a color of each of one or more adjustment pixels which are at least the one or more target pixels among the pixels of the first image and a transformation matrix, and acquiring a color-adjusted image including color-adjusted pixels having a color indicated by the color-adjusted pixel value vector, a color-adjusted image acquisition means for acquiring a color-adjusted image, the transformation matrix having elements of a plurality of transformation parameters set for the adjustment pixels in the first parameter map having the first resolution, the second parameter map being a resolution-enhanced first parameter map; having The parameter map estimation model is using training data including a first learning image, a first learning mask image that specifies one or more learning target pixels to be subjected to color adjustment in the first learning image, and a first correct color-adjusted image, all of which have the first resolution, learning is performed so that an error of the first learning color-adjusted image relative to the first correct color-adjusted image is reduced; The first learning color adjusted image is a learning color-adjusted pixel having a color indicated by a learning color-adjusted pixel value vector, which is an output of a learning conversion function that includes a product term of a learning pixel value vector indicating the color of each of the learning adjusted pixels that are at least the one or more learning target pixels among the pixels of the first learning image and a learning conversion matrix and is defined by an equation of the same format as the conversion function; the learning transformation matrix has elements each corresponding to a plurality of learning transformation parameters set for the learning adjustment pixels in a first learning parameter map having the first resolution; The first learned parameter map is a second learning parameter map, which is an output when the first learning image, which has been reduced in resolution, and has the second resolution, and the first learning mask image, which has been reduced in resolution, and has the second resolution, are input to the parameter map estimation model, has a higher resolution; Image processing system.
2. the first image acquisition means acquires an image in which a foreground image and a background image are combined as the first image; the first mask image acquisition means acquires, as the first mask image, an image in which one or more pixels originating from the foreground image in the composite image are designated as the one or more target pixels; The image processing system according to claim 1 .
3. The method further includes a first parameter map acquisition means for acquiring the first parameter map based on the second parameter map.
3. The image processing system according to claim 1.
4. the transformation matrix is a symmetric matrix, The transformation function is an affine transformation including a product of the pixel value vector and the transformation matrix.
3. The image processing system according to claim 1.
5. the pixel value vector includes, as an element, a product of at least any two components of three components of a pixel value related to the pixel value vector; 3. The image processing system according to claim 1.
6. The pixel value vector includes, as an element, a square of at least one component of a pixel value related to the pixel value vector.
3. The image processing system according to claim 1.
7. The parameter map estimation model includes a Transformer model.
3. The image processing system according to claim 1.
8. The error is normalized based on the first training mask image.
3. The image processing system according to claim 1.
9. the parameter map estimation model is a machine learning model trained to increase the similarity between the first learning color-adjusted image and the first correct color-adjusted image and to decrease the similarity between the first learning color-adjusted image and a first incorrect color-adjusted image different from the first correct color-adjusted image. The image processing system according to claim 8.
10. The first incorrectly color-adjusted image is an image obtained by converting pixel values of the learning pixels in the first correctly color-adjusted image. The image processing system according to claim 9.
11. The parameter map estimation model is further a machine learning model trained to increase a similarity between at least one second learned conversion parameter set for a pixel and at least one second learned conversion parameter set for a pixel adjacent to the pixel in the second learned parameter map. The image processing system according to claim 9.
12. training data acquiring means for acquiring training data including a first learning image, a first learning mask image that specifies one or more learning target pixels to be subjected to color adjustment in the first learning image, and a first corrected color image, all of which have a first resolution; a second learning image acquiring means for acquiring a second learning image having a second resolution lower than the first resolution based on the first learning image; a second learning mask image acquiring means for acquiring a second learning mask image having the second resolution based on the first learning mask image; a second learning parameter map acquisition means for acquiring a second learning parameter map having the second resolution by inputting the second learning image and the second learning mask image into a parameter map estimation model; a learning color-adjusted image acquisition means for calculating a learning color-adjusted pixel value vector which is an output of a learning conversion function which includes a product term of a learning pixel value vector indicating the color of each of the learning adjusted pixels which are at least the one or more learning target pixels among the pixels of the first learning image and a learning conversion matrix and is defined by an equation of the same format as the conversion function, and for acquiring a learning color-adjusted image including learning color-adjusted pixels having a color indicated by the learning color-adjusted pixel value vector, a learning color-adjusted image acquisition means for acquiring the learning transformation matrix, the learning transformation matrix being based on a plurality of learning transformation parameters set for the learning adjustment pixels in the first learning parameter map having the first resolution, the second learning parameter map being a high-resolution map; a learning means for learning the parameter map estimation model based on the training color-adjusted image and the correct color-adjusted image; A learning system having the above configuration.
13. a first image acquisition step of acquiring a first image having a first resolution; a first mask image acquisition step of acquiring a first mask image having the first resolution and designating one or more target pixels in the first image that are to be subjected to color adjustment; a second image acquisition step of acquiring a second image having a second resolution lower than the first resolution based on the first image; a second mask image acquisition step of acquiring a second mask image having the second resolution based on the first mask image; a two-parameter map acquisition step of acquiring a second parameter map having the second resolution by inputting the second image and the second mask image into a parameter map estimation model; a color-adjusted image acquisition step of calculating a color-adjusted pixel value vector which is an output of a transformation function defined by an equation including a product term of a pixel value vector indicating the color of each of one or more adjustment pixels which are at least the one or more target pixels among the pixels of the first image and a transformation matrix, and acquiring a color-adjusted image including color-adjusted pixels having the color indicated by the color-adjusted pixel value vector, a color-adjusted image acquisition step in which the transformation matrix has elements of a plurality of transformation parameters set for the adjustment pixels in the first parameter map having the first resolution, the second parameter map being a high-resolution image; having The parameter map estimation model is using training data including a first learning image, a first learning mask image that specifies one or more learning target pixels to be subjected to color adjustment in the first learning image, and a first correct color-adjusted image, all of which have the first resolution, learning is performed so that an error of the first learning color-adjusted image relative to the first correct color-adjusted image is reduced; The first learning color adjusted image is a learning color-adjusted pixel having a color indicated by a learning color-adjusted pixel value vector, which is an output of a learning conversion function that includes a product term of a learning pixel value vector indicating the color of each of the learning adjusted pixels that are at least the one or more learning target pixels among the pixels of the first learning image and a learning conversion matrix and is defined by an equation of the same format as the conversion function; the learning transformation matrix has elements each corresponding to a plurality of learning transformation parameters set for the learning adjustment pixels in a first learning parameter map having the first resolution; The first learned parameter map is a second learning parameter map, which is an output when the first learning image, which has been reduced in resolution, and has the second resolution, and the first learning mask image, which has been reduced in resolution, and has the second resolution, are input to the parameter map estimation model, has a higher resolution; Image processing methods.
14. a first image capture means for capturing a first image having a first resolution; a first mask image acquisition means for acquiring a first mask image having the first resolution and designating one or more target pixels in the first image that are to be subjected to color adjustment; a second image acquisition means for acquiring a second image having a second resolution lower than the first resolution based on the first image; a second mask image acquisition means for acquiring a second mask image having the second resolution based on the first mask image; a second parameter map acquisition means for acquiring a second parameter map having the second resolution by inputting the second image and the second mask image into a parameter map estimation model; a color-adjusted image acquisition means for calculating a color-adjusted pixel value vector which is an output of a transformation function defined by an equation including a product term of a pixel value vector indicating a color of each of one or more adjustment pixels which are at least the one or more target pixels among the pixels of the first image and a transformation matrix, and acquiring a color-adjusted image including color-adjusted pixels having a color indicated by the color-adjusted pixel value vector, a color-adjusted image acquisition means for acquiring a color-adjusted image, the transformation matrix having elements of a plurality of transformation parameters set for the adjustment pixels in the first parameter map having the first resolution, the second parameter map being a high-resolution image; A program for causing a computer to function as The parameter map estimation model is using training data including a first learning image, a first learning mask image that specifies one or more learning target pixels to be subjected to color adjustment in the first learning image, and a first correct color-adjusted image, all of which have the first resolution, learning is performed so that an error of the first learning color-adjusted image relative to the first correct color-adjusted image is reduced; The first learning color adjusted image is a learning color-adjusted pixel having a color indicated by a learning color-adjusted pixel value vector, which is an output of a learning conversion function that includes a product term of a learning pixel value vector indicating the color of each of the learning adjusted pixels that are at least the one or more learning target pixels among the pixels of the first learning image and a learning conversion matrix and is defined by an equation of the same format as the conversion function; the learning transformation matrix has elements each corresponding to a plurality of learning transformation parameters set for the learning adjustment pixels in a first learning parameter map having the first resolution; The first learned parameter map is a second learning parameter map, which is an output when the first learning image, which has been reduced in resolution, and has the second resolution, and the first learning mask image, which has been reduced in resolution, and has the second resolution, are input to the parameter map estimation model, has a higher resolution; program.
Citation Information
Patent Citations
Virtual studio method and system based on high-definition multiple screens
CN114173021A
Generating deep harmonized digital images
US20220292654A1
