Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
An image processing apparatus comprises a first obtaining unit configured to obtain a restoration accuracy of processing for restoring a teacher image from a deteriorated image for which deterioration has been added to the teacher image, a second obtaining unit configured to obtain a frequency characteristic of the teacher image, and a first training unit configured to perform processing for training a learning model based on the restoration accuracy and the frequency characteristic.
1 . An image processing apparatus comprising:
one or more processors and a memory, which are configured to function as a plurality of units comprising:
(1) a first obtaining unit configured to obtain a restoration accuracy of processing for restoring a teacher image from a deteriorated image for which deterioration has been added to the teacher image;
(2) a second obtaining unit configured to obtain a frequency characteristic of the teacher image;
(3) a first training unit configured to perform processing for training a learning model based on the restoration accuracy and the frequency characteristic;
(4) a selection unit configured to (1) obtain a distribution of the number of teacher images to be selected for each restoration accuracy from a plurality of teacher images based on a distribution of restoration accuracies obtained by inputting respective frequency characteristics of a plurality of reference images into the learning model and a pre-generated distribution of the number of selections corresponding to restoration accuracies and (2) select, as main training teacher images, some teacher images from the plurality of teacher images based on the obtained distribution; and
(5) a generation unit configured to generate a data set including the main training teacher images and deteriorated images for which deterioration has been added to the main training teacher images.
2 . The image processing apparatus according to claim 1 , wherein the first obtaining unit obtains, as the restoration accuracy, a difference between the teacher image and a deterioration-restored image obtained by the processing for restoring the deteriorated image.
3 . The image processing apparatus according to claim 1 , wherein the first training unit performs training of the learning model such that output of the learning model to which the frequency characteristic has been inputted will be the restoration accuracy.
4 . The image processing apparatus according to claim 1 , wherein the plurality of units further comprises a second training unit configured to perform processing for training a learning model for inferring a pre-deterioration image from an image to which deterioration has been added, using the data set.
5 . The image processing apparatus according to claim 1 , wherein the first obtaining unit obtains, as the teacher images, some patches from a plurality of patches obtained by dividing an input image.
6 . The image processing apparatus according to claim 5 , wherein the first obtaining unit obtains, as the teacher images, the some patches such that an average of frequency characteristics of the plurality of patches and an average of frequency characteristics of the some patches coincide.
7 . The image processing apparatus according to claim 5 , wherein the first obtaining unit obtains, as the teacher images, the some patches from the plurality of patches obtained by dividing the input image such that an average of frequency characteristics of a group of input images and an average of frequency characteristics of the some patches coincide.
8 . An image processing apparatus comprising:
one or more processors and a memory, which are configured to function as a plurality of units comprising:
(1) a first obtaining unit configured to obtain a restoration accuracy of processing for restoring a teacher image from a deteriorated image for which deterioration has been added to the teacher image;
(2) a second obtaining unit configured to obtain a frequency characteristic of the teacher image;
(3) a first training unit configured to perform processing for training a learning model based on the restoration accuracy and the frequency characteristic;
(4) a selection unit configured to select, as main training teacher images, some teacher images from a plurality of teacher images based on a distribution of restoration accuracies obtained by inputting respective frequency characteristics of a plurality of reference images into the learning model; and
(5) a generation unit configured to generate a data set including the main training teacher images and images for which deterioration has been added to the main training teacher images.
9 . An image processing apparatus comprising:
one or more processors and a memory, which are configured to function as a plurality of units comprising:
(1) a first obtaining unit configured to obtain a restoration accuracy of processing for restoring a teacher image from a deteriorated image for which deterioration has been added to the teacher image;
(2) a second obtaining unit configured to obtain a frequency characteristic of the teacher image;
(3) a first training unit configured to perform processing for training a learning model based on the restoration accuracy and the frequency characteristic;
(4) a selection unit configured to select, as main training teacher images, some teacher images from a plurality of teacher images based on a pre-generated distribution of the number of selections corresponding to restoration accuracies; and
(5) a generation unit configured to generate a data set including the main training teacher images and images for which deterioration has been added to the main training teacher images.
10 . An image processing method comprising:
obtaining a restoration accuracy of processing for restoring a teacher image from a deteriorated image for which deterioration has been added to the teacher image;
obtaining a frequency characteristic of the teacher image;
performing processing for training a learning model based on the restoration accuracy and the frequency characteristic;
obtaining a distribution of the number of teacher images to be selected for each restoration accuracy from a plurality of teacher images based on a distribution of restoration accuracies obtained by inputting respective frequency characteristics of a plurality of reference images into the learning model and a pre-generated distribution of the number of selections corresponding to restoration accuracies;
selecting, as main training teacher images, some teacher images from the plurality of teacher images based on the obtained distribution; and
generating a data set including the main training teacher images and deteriorated images for which deterioration has been added to the main training teacher images.
11 . A non-transitory computer-readable storage medium storing a computer program,
wherein the computer program causes a computer, including one or more processors and a memory, to function as a plurality of units comprising:
(1) a first obtaining unit configured to obtain a restoration accuracy of processing for restoring a teacher image from a deteriorated image for which deterioration has been added to the teacher image;
(2) a second obtaining unit configured to obtain a frequency characteristic of the teacher image;
(3) a first training unit configured to perform processing for training a learning model based on the restoration accuracy and the frequency characteristic;
(4) a selection unit configured to (1) obtain a distribution of the number of teacher images to be selected for each restoration accuracy from a plurality of teacher images based on a distribution of restoration accuracies obtained by inputting respective frequency characteristics of a plurality of reference images into the learning model and a pre-generated distribution of the number of selections corresponding to restoration accuracies and (2) select, as main training teacher images, some teacher images from the plurality of teacher images based on the obtained distribution; and
(5) a generation unit configured to generate a data set including the main training teacher images and deteriorated images for which deterioration has been added to the main training teacher images.