Learning device, learning method, and program
By employing a learning device and method that transfers knowledge from a trained convolutional neural network to an anti-aliased convolutional neural network, the accuracy of feature extraction is maintained despite limited training data, addressing overfitting issues.
Patent Information
- Application Number
- JP2021099368
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-06-15
- Publication Date
- 2024-10-24
- Estimated Expiration
- 2041-06-15
AI Technical Summary
The accuracy of feature extraction processing using an anti-aliased convolutional neural network decreases when fine-tuning is performed with less than a predetermined amount of training data, leading to overfitting.
A learning device and method that includes a first image processing unit using teacher model parameters, a second image processing unit with student model parameters, and an optimization processing unit to update additional parameters, reducing an intermediate loss function value, thereby transferring knowledge from a trained convolutional neural network to an anti-aliased convolutional neural network.
This approach suppresses the decrease in accuracy of feature extraction processing even when using less than a predetermined amount of training data, preventing overfitting and maintaining performance.
Smart Images

Figure 0007572684000005 
Figure 0007572684000006 
Figure 0007572684000007
Abstract
Description
[Technical field]
[0001] The present invention relates to a learning device, a learning method, and a program. [Background technology]
[0002] There are machine learning techniques that identify, detect, and segment captured objects (subjects) in images. In addition, the automation of visual inspection processes using Convolutional Neural Networks (CNNs) is attracting attention in various fields of business.
[0003] When the visual inspection process is automated, it is desirable that the accuracy of image processing using a convolutional neural network is high. In Non-Patent Documents 1 and 2, an anti-aliased convolutional neural network (Anti-aliased CNN) is proposed for the purpose of improving the accuracy of image processing. In the anti-aliased convolutional neural network, a blurring process using a Gaussian filter or the like is performed on the output of the intermediate layer of the convolutional neural network. This suppresses the occurrence of aliasing that occurs in image processing, thereby suppressing a decrease in the accuracy of image processing using the convolutional neural network.
[0004] As deep learning technology develops, various machine learning models using convolutional neural networks are published online. Therefore, introducing a blurring process to the output of the intermediate layer of the convolutional neural network in the models published online is a practical method for developing an anti-aliased convolutional neural network. [Prior art documents] [Non-patent literature]
[0005] [Non-Patent Document 1] R. Zhang, “Making Convolutional Networks Shift-Invariant Again”, 2019 [Non-Patent Document 2] S. Sinha, A. Garg, H. Larochelle, “Curriculum by Smoothing”, 2020. Summary of the Invention [Problem to be solved by the invention]
[0006] However, if blurring is simply performed on the output of the intermediate layer of an anti-aliased convolutional neural network, the accuracy of feature extraction processing (e.g., processing to extract image features) using the anti-aliased convolutional neural network will decrease. In order to prevent the accuracy of the feature extraction processing from decreasing, fine-tuning must be performed on the model using the anti-aliased convolutional neural network using a certain amount of training data or more.
[0007] However, it is sometimes difficult to prepare a certain amount of training data. If fine-tuning is performed using less than the certain amount of training data, the accuracy of the feature extraction process using the anti-aliased convolutional neural network decreases due to overfitting of the training data.
[0008] In view of the above circumstances, the present invention aims to provide a learning device, a learning method, and a program that are capable of suppressing a decrease in accuracy of feature extraction processing using an anti-aliased convolutional neural network, even when fine-tuning is performed using less than a predetermined amount of learning data. [Means for solving the problem]
[0009] One aspect of the present invention is a learning device comprising: a first image processing unit that performs, on a training image, a first image processing using teacher model parameters, which are image processing parameters of a trained convolutional neural network; a second image processing unit that performs, on the training image, a second image processing using student model parameters including the teacher model parameters and additional parameters; an intermediate loss derivation unit that derives an intermediate loss function value representing the difference between an intermediate result of the first image processing and an intermediate result of the second image processing; and an optimization processing unit that updates the student model parameters by updating the additional parameters so as to reduce the intermediate loss function value.
[0010] One aspect of the present invention is a learning method executed by a learning device, the learning method including: a first image processing step of executing, on a training image, a first image processing using teacher model parameters, which are image processing parameters of a trained convolutional neural network; a second image processing step of executing, on the training image, a second image processing using student model parameters including the teacher model parameters and additional parameters; an intermediate loss derivation step of deriving an intermediate loss function value representing the difference between an intermediate result of the first image processing and an intermediate result of the second image processing; and an optimization processing step of updating the student model parameters by updating the additional parameters so as to reduce the intermediate loss function value.
[0011] One aspect of the present invention is a program for causing a computer to function as the above-mentioned learning device. Effect of the Invention
[0012] According to the present invention, even when fine-tuning is performed using less than a predetermined amount of training data, it is possible to suppress a decrease in accuracy of feature extraction processing using an anti-aliased convolutional neural network. [Brief description of the drawings]
[0013] [Figure 1]1 is a diagram illustrating an example of the configuration of an image processing device in a first embodiment. [Diagram 2] 2 is a diagram illustrating an example of the configuration of a first image processing unit and a second image processing unit in the first embodiment. FIG. [Diagram 3] 4 is a diagram illustrating an example of the configuration of an intermediate loss derivation unit in the first embodiment. FIG. [Figure 4] 4 is a flowchart showing an example of the operation of the image processing device in the first embodiment. [Diagram 5] 5 is a flowchart showing an example of the operation of a first image processing unit in the first embodiment. [Figure 6] 6 is a flowchart showing an example of the operation of a second image processing unit in the first embodiment. [Figure 7] 5 is a flowchart showing an operation example of an intermediate loss derivation unit in the first embodiment. [Figure 8] 5 is a flowchart showing an example of the operation of an optimization processing unit in the first embodiment. [Figure 9] FIG. 11 is a diagram illustrating an example of the configuration of an image processing device in a second embodiment. [Figure 10] 13 is a flowchart showing an example of the operation of an adjustment unit in the second embodiment. [Figure 11] FIG. 2 is a diagram illustrating an example of a hardware configuration of an image processing device in each embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] (overview) In the following embodiment, knowledge transfer (transfer learning) in machine learning (Reference 1 (G. Hinton, O. Vinyals, J. Dean, “Distilling the Knowledge in a Neural Network”, 2015.)) is performed. Knowledge transfer refers to providing knowledge possessed by a trained convolutional neural network (hereinafter referred to as a “teacher model”) to an updated convolutional neural network (hereinafter referred to as a “student model”). The knowledge possessed by the teacher model is, for example, knowledge related to feature extraction in image processing. Image processing is, for example, object identification processing, object detection processing, or region segmentation processing in images. By performing knowledge transfer, it is possible to improve the accuracy of feature extraction processing using the student model while suppressing overlearning of training data (training images).
[0015] In the following embodiment, a first image processing unit in an image processing device executes image processing using a teacher model (hereinafter referred to as "first image processing") on a learning image. Hereinafter, parameters of the first image processing are referred to as "teacher model parameters." The model parameters are image processing parameters of a model represented using a convolutional neural network.
[0016] In the following embodiment, a second image processing unit in the image processing device generates a student model by adding additional parameters to an intermediate layer of a teacher model. The additional parameters are parameters of a blur layer for performing a blurring process. The additional parameters turn the student model into an anti-aliased convolutional neural network. The second image processing unit executes image processing using the student model (hereinafter referred to as "second image processing") on the learning image. In the second image processing, the occurrence of aliasing noise is suppressed by a blurring process. Hereinafter, the parameters of the second image processing are referred to as "student model parameters".
[0017] In the following embodiment, the optimization processing unit in the image processing device performs fine tuning on the student model. Since the teacher model parameters (transferred knowledge) in the student model are fixed, in the fine tuning, additional parameters in the student model are updated.
[0018] In the following embodiment, the student model is optimized so that the features extracted by the teacher model are similar to those extracted by the student model (Reference 2 (A. Romero, N. Ballas, SE Kahou, A. Chassang, C. Gatta, Y. Bengio, “FitNets: Hints for Thin Deep Nets”, 2015.)). Here, a constraint is set that the output of the hidden layer immediately before the blur layer of the student model is similar to the output of a specific hidden layer in the teacher model.
[0019] As a result, even if fine-tuning is performed using less than a certain amount of training data, it is possible to suppress deterioration in the accuracy of feature extraction processing using an anti-aliased convolutional neural network.
[0020] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail with reference to the drawings. (First embodiment) 1 is a diagram showing an example of the configuration of an image processing device 1a. The image processing device 1a includes a storage unit 2 and a learning device 3a. The learning device 3a includes a first image processing unit 31, a second image processing unit 32, an intermediate loss derivation unit 33, and an optimization processing unit .
[0021] The storage unit 2 stores the teacher model parameters, the learning images, the correct labels (correct data), and the additional parameters. The learning images are images used for learning. The learning images include images of captured objects.
[0022] The first image processing unit 31 acquires a training image and teacher model parameters from the storage unit 2. The first image processing unit 31 executes a first image processing on the training image. The first image processing unit 31 generates an intermediate result of the first image processing and a final result of the first image processing. The intermediate result of the first image processing is the output of an intermediate layer in the hierarchy from the input layer to the output layer of the teacher model (the output of the intermediate layer of the teacher model). The final result of the first image processing is the output of the output layer of the teacher model.
[0023] The first image processing unit 31 outputs an intermediate result of the first image processing to the intermediate loss derivation unit 33. A convolution layer immediately before the blur layer in the student model and a predetermined convolution layer in the teacher model are associated in advance. The first image processing unit 31 outputs the output of the predetermined convolution layer in the teacher model to the intermediate loss derivation unit 33 as an intermediate result of the first image processing.
[0024] The second image processing unit 32 acquires the teacher model parameters, the correct answer label, the additional parameters, and the learning image from the storage unit 2. The second image processing unit 32 generates the student model parameters by adding the additional parameters to the intermediate layer of the teacher model parameters in the second image processing unit 32. The teacher model parameters (transferred knowledge) in the student model parameters are fixed.
[0025] The second image processing unit 32 executes second image processing on the training image. The second image processing unit 32 generates an intermediate result of the second image processing and a final result of the second image processing. The intermediate result of the second image processing is the output of the intermediate layer of the student model. The final result of the second image processing is the output of the output layer of the student model. The second image processing unit 32 outputs the intermediate result of the second image processing to the intermediate loss derivation unit 33. The second image processing unit 32 derives an image loss function value "Loss recog. " and the student model parameters are output to the optimization processing unit 34.
[0026] The second image processing unit 32 derives a function value (hereinafter referred to as "image loss function value") according to the difference (error) between the final result of the second image processing and the correct label. The image loss function value is, for example, a cross-entropy loss for the image or a mean square error for the image. The smaller the difference between the result of the second image processing and the correct label, the smaller the image loss function value. The second image processing unit 32 acquires updated student model parameters (optimized student model parameters) from the optimization processing unit 34.
[0027] 2 is a diagram showing an example of the configuration of each of the first image processing unit 31 and the second image processing unit 32. The first image processing unit 31 includes a convolution layer 310, a convolution layer 311, a convolution layer 312, a global pooling layer 313, and a fully connected layer 314. The second image processing unit 32 includes a blur layer 320, a convolution layer 321, a convolution layer 322, a blur layer 323, a convolution layer 324, a global pooling layer 325, and a fully connected layer 326.
[0028] The first image processing unit 31 outputs a result of the feature extraction process of the convolution layer 310 to the intermediate loss derivation unit 33 as one of the intermediate results of the first image processing. The first image processing unit 31 outputs a result of the process of the convolution layer 312 to the intermediate loss derivation unit 33 as one of the intermediate results of the first image processing. The convolution layer 310 of the first image processing unit 31 and the convolution layer 321 of the second image processing unit 32 are associated in advance. The convolution layer 312 of the first image processing unit 31 and the convolution layer 324 of the second image processing unit 32 are associated in advance.
[0029] The "n" in " / n" shown in FIG. 2 is an integer equal to or greater than 1, and represents the pixel interval of subsampling in image processing. In a layer marked with " / 1" in FIG. 2 (e.g., convolution layer 322), thinning processing is not performed on the signal of the training image. In a layer marked with " / 2" in FIG. 2 (e.g., convolution layer 311), thinning processing is performed on the signal of the training image at a pixel interval of "2". Signals that exceed the Nyquist frequency during this thinning processing become aliasing noise. One of the core ideas of an anti-aliased convolutional neural network is to apply a low-pass blur filter to the signal before the subsampling at the pixel interval of "2" is performed. This makes it possible to prevent the signal of the training image from exceeding the Nyquist frequency.
[0030] For example, neurons in the convolution layer 321 extract higher-order features from the training image that has been blurred by the blur layer 320. The second image processing unit 32 is a convolution layer subsequent to the blur layer 320 for performing the blurring process, and outputs the processing result of the convolution layer 321 (a layer close to the blur layer) immediately before the blur layer 323 that performs the next blurring process to the intermediate loss derivation unit 33 as one of the intermediate results of the second image processing (feature extraction process).
[0031] For example, neurons in the convolution layer 324 extract higher-order features from the training image that has been blurred by the blur layer 323. The second image processing unit 32 is a convolution layer subsequent to the blur layer 323 for performing blurring, and may output a processing result of the convolution layer 324 immediately before the global pooling layer 325 to the intermediate loss derivation unit 33 as one of the intermediate results of the second image processing.
[0032] The student model is trained so that the neurons in the convolutional layer of the teacher model and the neurons in the convolutional layer of the student model respond similarly. By training the student model, the intermediate results of the first image processing and the intermediate results of the second image processing substantially match each other even if blurring is introduced in the student model.
[0033] The intermediate loss derivation unit 33 (transition unit) acquires the intermediate result "t" of the first image processing from the first image processing unit 31. The intermediate loss derivation unit 33 acquires the intermediate result "s" of the second image processing from the second image processing unit 32. The intermediate loss derivation unit 33 derives an intermediate loss function value (knowledge loss function value) based on the intermediate result of the first image processing and the intermediate result of the second image processing. The intermediate loss function value is a function value representing the difference (knowledge loss) between the intermediate result of the first image processing and the intermediate result of the second image processing.
[0034] FIG. 3 is a diagram illustrating an example of the configuration of the intermediate loss derivation unit 33. The intermediate loss derivation unit 33 includes a function processing unit 330-1 “f t " and the function processing unit 330-2 "f s The function processing unit 330-1 includes a convolution layer 331-1, a global pooling layer 332-1, and a fully connected layer 333-1 (output layer). Similarly, the function processing unit 330-2 includes a convolution layer 331-2, a global pooling layer 332-2, and a fully connected layer 333-2 (output layer).
[0035] A constraint that the intermediate result of the first image processing and the intermediate result of the second image processing are similar is given to the learning process. If such a constraint on the intermediate result is based on the mean square error (MSE) or mean absolute error (MAE) of the entire output of the intermediate layer (Reference 2, Reference 3 (J. Johnson, A. Alahi, L. Fei-Fei, “Perceptual Losses for Real-Time Style Transfer and Super-Resolution”, 2016.), not only essential knowledge that contributes to image processing such as object recognition, but also non-essential knowledge affected by aliasing noise (knowledge that does not contribute to image processing) is transferred to the student model, so that the desired accuracy of the student model may not be obtained.
[0036] Therefore, in the following, an intermediate loss function value (knowledge loss function value) is added to the mean squared error (MSE) or mean absolute error (MAE) so that the effect of aliasing noise is maximally reduced and any extraneous knowledge transferred to the student model is penalized.
[0037] The intermediate loss deriving unit 33 derives a pixel-level loss function value based on the intermediate result "t" of the first image processing and the intermediate result "s" of the second image processing. pixel " is expressed as equation (1).
[0038]
number
[0039] Here, "D" is a function for deriving the difference (distance) between the intermediate result "t" of the first image processing and the intermediate result "s" of the second image processing, and is, for example, a function of mean absolute error. The pixel-level loss function value is a loss function value that represents the distance between the intermediate result of the first image processing and the intermediate result of the second image processing at the pixel level. By knowledge transfer of the pixel-level loss function value, it is possible to transfer detailed knowledge (information about each pixel), but not only essential knowledge that contributes to image processing such as object recognition, but also non-essential knowledge affected by aliasing noise is transferred. When non-essential knowledge is transferred, the accuracy of image processing decreases.
[0040] The intermediate loss derivation unit 33 includes a function processing unit 330-1 “f t The intermediate result "t" of the first image processing is input to the fully connected layer 333-1. The function processing unit 330-1 executes a process (for example, an averaging process) to reduce the resolution of the intermediate result "t" of the first image processing. The function processing unit 330-1 executes image processing (feature extraction process) on the result of the process to reduce the resolution. The features extracted from the intermediate result "t" of the first image processing by the fully connected layer 333-1 contain almost no aliasing noise. That is, the function value "f t (t)" contains almost no aliasing noise.
[0041] The intermediate loss derivation unit 33 includes a function processing unit 330-2 “f s The intermediate result "s" of the second image processing is input to "t". The function processing unit 330-2 executes processing (e.g., averaging processing) to reduce the resolution of the intermediate result "t" of the second image processing. The function processing unit 330-2 executes image processing (feature extraction processing) on the result of the processing to reduce the resolution.
[0042] The intermediate loss derivation unit 33 calculates the output “f t (t)” and the output of the fully connected layer 333-2, “f s Based on the image-level loss function value "Loss (s)", the image-level loss function value "Loss global " is expressed as equation (2).
[0043]
number
[0044] Here, "f t " is a function that extracts rough knowledge (information about the whole image) that contributes to image processing such as object recognition from the intermediate result "t" of the first image processing. Note that the function "f t To improve the accuracy of the function "f t An auxiliary loss function value may be used to train "f". The auxiliary loss function value represents the difference between the output of the fully connected layer 333-1 and the correct label. s " is a function that extracts rough knowledge (information) that contributes to image processing such as object recognition from the intermediate result "s" of the second image processing.
[0045] The image-level loss function value is a loss function value that represents the distance between the intermediate result of the first image processing and the intermediate result of the second image processing at the image level. The more non-essential knowledge affected by aliasing is transferred by the pixel-level loss function value, the larger the image-level loss function value becomes.
[0046] The intermediate loss derivation unit 33 derives an intermediate loss function value (knowledge loss function value) based on the intermediate result "t" of the first image processing and the intermediate result "s" of the second image processing. Here, the intermediate loss derivation unit 33 derives a pixel-level loss function value "Loss pixel ” and the image-level loss function value “Loss global ", an intermediate loss function value (knowledge loss function value) is derived based on the pixel-level loss function value and the image-level loss function value. The intermediate loss function value is, for example, the sum of the pixel-level loss function value and the image-level loss function value "(Loss pixel )+(Loss global The intermediate loss function value is, for example, a value obtained by multiplying the sum of the pixel-level loss function value and the image-level loss function value by a predetermined connection weight “λ”, “λ((Loss pixel )+(Loss global ))" is also acceptable.
[0047] The features extracted from the intermediate result “t” of the first image processing by the fully connected layer 333-1 contain almost no aliasing noise, so it is expected that the intermediate loss function values will impose a penalty when transferring non-essential knowledge to the student model by the mean squared error (MSE) or mean absolute error (MAE).
[0048] The optimization processor 34 calculates the student model parameters and the image loss function value “Loss recog. " from the second image processing unit 32. The optimization processing unit 34 acquires the intermediate loss function value from the intermediate loss derivation unit 33. The optimization processing unit 34 derives a loss function value based on the image loss function value and the intermediate loss function value. The loss function value "Loss" is expressed as shown in Equation (3).
[0049]
number
[0050] The optimization processing unit 34 updates the student model parameters by performing optimization processing on the additional parameters in the student model parameters. That is, the optimization processing unit 34 updates the loss function value "Loss" so that the intermediate loss function value (knowledge loss function value) is optimized (so that the intermediate result of the first image processing and the intermediate result of the second image processing are similar). This optimization is not limited to a specific optimization, but is, for example, minimization or maximization. The optimization processing unit 34 generates updated student model parameters (updated image processing parameters of the student model) by updating the additional parameters in the student model parameters.
[0051] When the image processing device 1a continues the learning process, the optimization processing unit 34 outputs the updated student model parameters as image processing parameters of the learned convolutional neural network (learned model parameters) to the second image processing unit 32. When the image processing device 1a ends the learning process, the optimization processing unit 34 outputs the updated student model parameters as image processing parameters of the learned convolutional neural network to, for example, an inference device (not shown) that executes object identification processing.
[0052] Next, an example of the operation of the image processing device 1a will be described. 4 is a flowchart showing an example of the operation of the image processing device 1a. The first image processing unit 31 acquires the teacher model parameters from the storage unit 2. The second image processing unit 32 acquires the teacher model parameters from the storage unit 2 (step S101). The first image processing unit 31 outputs an intermediate result of the first image processing, which is image processing using the teacher model parameters on a learning image, to the intermediate loss derivation unit 33 (step S102).
[0053] The second image processing unit 32 outputs the intermediate result of the second image processing to the intermediate loss derivation unit 33 (step S103). The second image processing unit 32 derives an image loss function value based on the difference between the final result of the second image processing and the correct label. The second image processing unit 32 outputs the image loss function value to the optimization processing unit 34 (step S104).
[0054] The intermediate loss derivation unit 33 derives an intermediate loss function value (knowledge loss function value) for reducing the difference between the intermediate result of the first image processing and the intermediate result of the second image processing. The intermediate loss derivation unit 33 outputs the intermediate loss function value to the optimization processing unit 34 (step S105). The optimization processing unit 34 generates updated student model parameters based on the image loss function value and the intermediate loss function value (step S106).
[0055] The optimization processing unit 34 judges whether or not to end the learning process (step S107). If it is judged that the learning process is to be continued (step S107: NO), the optimization processing unit 34 outputs the updated student model parameters to the second image processing unit 32 (step S108). If it is judged that the learning process is to be ended (step S107: YES), the optimization processing unit 34 outputs the updated student model parameters as learned model parameters to, for example, an inference device (not shown) that executes inference.
[0056] Next, an example of the operation of the first image processing unit 31 will be described. 5 is a flowchart showing an example of the operation of the first image processing unit 31. The first image processing unit 31 acquires teacher model parameters from the storage unit 2 (step S201). The first image processing unit 31 acquires learning images from the storage unit 2 (step S202). The first image processing unit 31 generates an intermediate result of the first image processing using the teacher model parameters for the learning images (step S203). The first image processing unit 31 outputs the intermediate result of the first image processing to the intermediate loss derivation unit 33 (step S204).
[0057] Next, an example of the operation of the second image processing unit 32 will be described. 6 is a flowchart showing an example of the operation of the second image processing unit 32. The second image processing unit 32 determines whether or not it is the start time of the learning process. The start time of the learning process refers to the execution time of the learning process that is executed first among the learning processes that are executed repeatedly (step S301).
[0058] If it is determined that the learning process is not starting (step S401: NO), the second image processing unit 32 proceeds to step S304. If it is determined that the learning process is starting (step S301: YES), the second image processing unit 32 acquires the teacher model parameters and additional parameters (blur layer parameters) from the storage unit 2 (step S302).
[0059] The second image processing unit 32 adds the student model parameters to a blur layer that performs blurring on the intermediate processing result of the image processing of the student model parameters as a new intermediate layer in the neural network.
[0060] The teacher model parameters in the student model parameters acquired in step S302 are treated as model parameters for which optimization processing has been performed in advance (trained model parameters). Therefore, the second image processing unit 32 fixes the teacher model parameters in the student model parameters (step S303) so that optimization processing is not further performed on the teacher model parameters in the student model parameters acquired in step S302 (so that the parameters are not updated).
[0061] The second image processing unit 32 acquires the correct label from the storage unit 2 (step S304). When the image processing is an object identification process, the correct label is a vector sequence indicating whether or not an image of an object to be identified is included in the training image. When the image processing is a region segmentation process, the correct label is an array indicating the region to which each pixel of the training image belongs.
[0062] The second image processing unit 32 acquires a training image from the storage unit 2 (step S305). The second image processing unit 32 generates an intermediate result of the second image processing by using the student model parameters for the training image (step S306). The second image processing unit 32 outputs the intermediate result of the second image processing to the intermediate loss derivation unit 33 (step S307). The second image processing unit 32 derives an image loss function value representing the difference between the correct label "y" and the intermediate result "x" of the second image processing (step S408).
[0063] The smaller the difference between the correct label "y" and the intermediate result "x" of the second image processing, the smaller the image loss function value. dist " is expressed as equation (4).
[0064]
number
[0065] Here, "y q " represents the probability distribution of the correct label "y" (true probability distribution). "x' q " represents the probability distribution (estimated probability distribution) of the intermediate result "x" of the second image processing. The second image processing unit 32 outputs the image loss function value to the optimization processing unit .
[0066] Next, an example of the operation of the intermediate loss derivation unit 33 will be described. 7 is a flowchart showing an example of the operation of the intermediate loss derivation unit 33. The intermediate loss derivation unit 33 acquires an intermediate result of the first image processing from the first image processing unit 31. The intermediate loss derivation unit 33 acquires an intermediate result of the second image processing from the second image processing unit 32 (step S401).
[0067] The intermediate loss derivation unit 33 derives an intermediate loss function value based on the intermediate result of the first image processing and the intermediate result of the second image processing. The intermediate loss function value is smaller as the intermediate result of the first image processing and the intermediate result of the second image processing are more similar (step S402). The intermediate loss derivation unit 33 outputs the intermediate loss function value to the optimization processing unit 34 (step S403).
[0068] Next, an example of the operation of the optimization processor 34 will be described. 8 is a flowchart showing an example of the operation of the optimization processing unit 34. The optimization processing unit 34 acquires an image loss function value from the second image processing unit 32 (step S501). The optimization processing unit 34 acquires an intermediate loss function value (knowledge loss function value) from the intermediate loss derivation unit 33 (step S502). The optimization processing unit 34 acquires student model parameters from the second image processing unit 32 (step S503).
[0069] The optimization processing unit 34 generates updated student model parameters by updating an additional parameter in the student model parameters so that the intermediate loss function value satisfies a predetermined first condition (for example, a condition that the intermediate loss function value is equal to or less than a first threshold value).
[0070] The optimization processing unit 34 may generate updated student model parameters by updating additional parameters in the student model parameters so that the image loss function value and the intermediate loss function value satisfy a predetermined second condition (e.g., a condition that they are less than or equal to a second threshold value).
[0071] The optimization processing unit 34 may generate updated student model parameters by updating an additional parameter in the student model parameters so that the loss function value "Loss" satisfies a third predetermined condition (e.g., a condition that the loss function value is equal to or less than a third threshold). The loss function value "Loss" is a value resulting from linearly combining the image loss function value and the intermediate loss function value using a coupling weight "λ". Here, the coupling weight "λ" of the image loss function value is, for example, "1", and the coupling weight "λ" of the intermediate loss function value is, for example, "0.02".
[0072] Depending on the transition of the loss function value (the value resulting from the linear combination of the image loss function value and the intermediate loss function value), the connection weight "λ" may be arbitrarily adjusted by a human. In order to generate the updated student model parameters, an optimization method such as Stochastic Gradient Descent (SGD) or Adam (Adaptive Moment Estimation) may be used, or an optimization algorithm such as Newton's method may be used (step S504).
[0073] The optimization processing unit 34 determines whether or not to end the execution of the learning process. For example, the optimization processing unit 34 determines whether or not to end the execution of the learning process based on whether or not a predetermined number of executions has been reached. The optimization processing unit 34 may determine whether or not to end the execution of the learning process based on whether or not the objective function value is equal to or less than a predetermined value. In addition, the optimization processing unit 34 may determine whether or not to end the execution of the learning process based on a command signal given by a person (step S505).
[0074] If it is determined that the execution of the learning process is to be continued (step S505: NO), the optimization processing unit 34 outputs the updated student model parameters to the second image processing unit 32 (step S506). If it is determined that the execution of the learning process is to be ended (step S505: YES), the optimization processing unit 34 outputs the updated student model parameters as learned model parameters to, for example, an inference device (not shown) (step S507).
[0075] As described above, the first image processing unit 31 executes the first image processing using the teacher model parameters (image processing parameters of the trained convolutional neural network) on the training image. The second image processing unit 32 executes the second image processing using the student model parameters including the teacher model parameters and the additional parameters on the training image. The intermediate loss derivation unit 33 derives an intermediate loss function value representing the difference between the intermediate result of the first image processing and the intermediate result of the second image processing. The optimization processing unit 34 updates the student model parameters by updating the additional parameters so as to reduce the intermediate loss function value.
[0076] In this way, less than a certain amount of knowledge acquired by the teacher model through learning is transferred to the output of the intermediate layer of the convolutional neural network in the student model (the intermediate result of the feature extraction process using the student model) in fine-tuning (knowledge transfer) performed on the student model. In fine-tuning (knowledge transfer), overfitting of the training data is suppressed. This makes it possible to suppress a decrease in the accuracy of the feature extraction process using an anti-aliased convolutional neural network, even if fine-tuning is performed using less than a certain amount of training data.
[0077] The second image processing unit 32 adds additional parameters to a hierarchy of the convolutional neural network having the student model parameters as a new layer (blur layer) for performing blurring processing in the second image processing. The second image processing unit 32 derives an image loss function value representing the difference between the final result of the second image processing and the correct label. The optimization processing unit 34 updates the student model parameters by updating the additional parameters so as to reduce the loss function value (the value resulting from the linear combination of the image loss function value and the intermediate loss function value).
[0078] Second embodiment The second embodiment differs from the first embodiment in that the coupling load (weighting) between the image loss function value and the intermediate loss function value is adjusted. The second embodiment will be described focusing on the differences from the first embodiment.
[0079] By appropriately adjusting the image loss function value and the intermediate loss function value, the deterioration of the accuracy of the feature extraction process is further suppressed. However, since there are many combinations of the image loss function value and the intermediate loss function value, it is not realistic to manually search for the optimal connection weight. Therefore, in the second embodiment, as an example, the connection weight between the image loss function value and the intermediate loss function value is adjusted based on the method described in Reference 4 (Y. Du, WM Czarnecki, SM Jayakumar, R. Pascanu, B. Lakshminarayanan, “Adapting Auxiliary Losses Using Gradient Similarity”, 2019.).
[0080] 9 is a diagram showing a configuration example of an image processing device 1b. The image processing device 1b includes a storage unit 2 and a learning device 3b. The learning device 3b includes a first image processing unit 31, a second image processing unit 32, an intermediate loss derivation unit 33, an optimization processing unit 34, and an adjustment unit 35.
[0081] The adjustment unit 35 derives the connection weights of the loss function values and the connection weights of the constraint function values. The adjustment unit 35 outputs the connection weights of the loss function values and the connection weights of the constraint function values to the optimization processing unit 34. The optimization processing unit 34 updates the pre-update model parameters by executing an optimization process on the pre-update model parameters using the connection weights of the loss function values and the connection weights of the constraint function values.
[0082] Next, an example of the operation of the adjustment unit 35 will be described. 10 is a flowchart showing an example of the operation of the adjustment unit 35. The adjustment unit 35 acquires an intermediate loss function value from the intermediate loss derivation unit 33 (step S601). The adjustment unit 35 acquires an image loss function value from the second image processing unit 32 (step S602). The adjustment unit 35 acquires student model parameters from the second image processing unit 32 (step S603).
[0083] The adjustment unit 35 back-propagates the intermediate loss function value in the student model parameters to derive a gradient of the intermediate loss function value (step S604). The adjustment unit 35 back-propagates the image loss function value in the student model parameters to derive a gradient of the image loss function value (step S605). Note that the method of deriving the gradient is not limited to the back-propagation method.
[0084] The adjustment unit 35 derives a similarity between the gradient of the intermediate loss function value and the gradient of the image loss function value. The derived similarity is, for example, a cosine similarity (step S606). The adjustment unit 35 outputs a connection weight (weighting) according to the similarity to the optimization processing unit 34. For example, the adjustment unit 35 may reduce the connection weight of the image loss function value as the similarity of the gradient of the intermediate loss function value to the gradient of the image loss function value increases.
[0085] As described above, the adjustment unit 35 adjusts the weighting of the image loss function value and the intermediate loss function value. The optimization processing unit 34 updates the additional parameters based on the image loss function value and the intermediate loss function value whose weighting has been adjusted. This makes it possible to further suppress deterioration in the accuracy of the feature extraction process using the anti-aliased convolutional neural network, even when fine-tuning is performed using less than a predetermined amount of learning data.
[0086] 11 is a diagram showing an example of a hardware configuration of an image processing device 1 in each embodiment. Some or all of the functional units of the image processing device are realized as software by a processor 100 such as a CPU (Central Processing Unit) executing a program stored in a memory 102 having a non-volatile recording medium (non-transient recording medium). The program may be recorded in a computer-readable recording medium. The computer-readable recording medium is, for example, a portable medium such as a flexible disk, a magneto-optical disk, a ROM (Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or a non-transient recording medium such as a storage device 101 such as a hard disk built into a computer system.
[0087] Some or all of the functional units of the image processing device may be realized using hardware including electronic circuits (electronic circuits or circuitry) using, for example, an LSI (Large Scale Integrated circuit), an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), or an FPGA (Field Programmable Gate Array).
[0088] In the above-mentioned embodiment, the program implemented in the above-mentioned form does not depend on a single device, but may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read into a computer system and executed to perform image processing. Note that the term "computer system" here includes hardware such as an OS and peripheral devices. The term "computer system" also includes a WWW system equipped with a homepage providing environment (or display environment). The term "computer-readable recording medium" also includes a memory that holds a program for a certain period of time, such as a volatile memory (RAM) inside a computer system that becomes a server or client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line.
[0089] The above program may also be transmitted from a computer system in which the program is stored in a storage device or the like to another computer system via a transmission medium, or by transmission waves in the transmission medium. Here, the "transmission medium" that transmits the program refers to a medium that has the function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. The above program may also be for realizing part of the above-mentioned functions. Furthermore, it may be a so-called difference file (difference program) that can realize the above-mentioned functions in combination with a program already recorded in the computer system.
[0090] Although an embodiment of the present invention has been described in detail above with reference to the drawings, the specific configuration is not limited to this embodiment, and designs that do not deviate from the gist of the present invention are also included. [Industrial Applicability]
[0091] The present invention is applicable to an image processing device. [Explanation of symbols]
[0092] Reference Signs List 1, 1a, 1b... image processing device, 2... storage unit, 3a, 3b... learning device, 31... first image processing unit, 32... second image processing unit, 33... intermediate loss derivation unit, 34... optimization processing unit, 100... processor, 101... storage device, 102... memory, 330... function processing unit, 331... convolution layer, 332... global pooling layer, 333... fully connected layer
Claims
1. a first image processing unit that performs a first image processing on a training image using teacher model parameters that are image processing parameters of a trained convolutional neural network; a second image processing unit that performs a second image processing on the learning image using student model parameters including the teacher model parameters and additional parameters; an intermediate loss derivation unit that derives an intermediate loss function value that represents a difference between an intermediate result of the first image processing and an intermediate result of the second image processing; an optimization unit that updates the student model parameters by updating the additional parameters so as to reduce the intermediate loss function value; Equipped with The additional parameters are added to a layer of a convolutional neural network having the student model parameters as a new layer for performing a blurring process in the second image processing. Learning device.
2. A first image processing unit that performs a first image processing on a training image using teacher model parameters that are image processing parameters of a trained convolutional neural network; a second image processing unit that performs a second image processing on the learning image using student model parameters including the teacher model parameters and additional parameters; an intermediate loss derivation unit that derives an intermediate loss function value that represents a difference between an intermediate result of the first image processing and an intermediate result of the second image processing; an optimization unit that updates the student model parameters by updating the additional parameters so as to reduce the intermediate loss function value; Equipped with The second image processing unit derives an image loss function value representing a difference between a final result of the second image processing and a correct label; The optimization processing unit updates the student model parameters by updating the additional parameters so as to reduce a value of a result of a linear combination of the image loss function value and the intermediate loss function value. Learning device.
3. An adjustment unit adjusts a weighting between an image loss function value representing a difference between a final result of the second image processing and a correct label and the intermediate loss function value, The optimization processing unit updates the additional parameters based on the weight-adjusted image loss function value and the intermediate loss function value. The learning device according to claim 1 or 2.
4. A learning method executed by a learning device, comprising: a first image processing step of performing a first image processing on a training image using teacher model parameters, which are image processing parameters of a trained convolutional neural network; a second image processing step of performing a second image processing on the learning image using student model parameters including the teacher model parameters and additional parameters; an intermediate loss derivation step of deriving an intermediate loss function value representing a difference between an intermediate result of the first image processing and an intermediate result of the second image processing; an optimization step of updating the student model parameters by updating the additional parameters so as to reduce the intermediate loss function value; Including, The additional parameters are added to a layer of a convolutional neural network having the student model parameters as a new layer for performing a blurring process in the second image processing. How to learn.
5. A learning method executed by a learning device, comprising: a first image processing step of performing a first image processing on a training image using teacher model parameters, which are image processing parameters of a trained convolutional neural network; a second image processing step of performing a second image processing on the learning image using student model parameters including the teacher model parameters and additional parameters; an intermediate loss derivation step of deriving an intermediate loss function value representing a difference between an intermediate result of the first image processing and an intermediate result of the second image processing; an optimization step of updating the student model parameters by updating the additional parameters so as to reduce the intermediate loss function value; Including, The second image processing step includes deriving an image loss function value representing a difference between a final result of the second image processing and a correct label; The optimization step includes updating the additional parameters so as to reduce a value of a linear combination of the image loss function value and the intermediate loss function value, thereby updating the student model parameters. How to learn.
6. A program for causing a computer to function as the learning device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Information processing device and information processing method
JP2020086738A
Training a neural network model
JP2021503662A
