Learning device, learning method, and program
The learning device enhances convolutional neural networks' robustness to image transformations by generating and integrating features through inverse transformations, addressing performance degradation issues in data augmentation and test-time augmentation.
Patent Information
- Application Number
- JP2021095607
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-06-08
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2041-06-08
AI Technical Summary
Convolutional neural networks suffer significant performance degradation for image transformations such as rotation and optical transformations, despite data augmentation and test-time augmentation, leading to reduced recognition accuracy.
A learning device and method that generates multiple converted data using different conversion parameters, extracts and integrates features through inverse transformations, and updates the recognition and feature extraction models to enhance robustness against data conversion.
The approach learns a robust data recognition model that maintains high accuracy even with data conversion, improving performance on geometric and optical image transformations.
Smart Images

Figure 0007561379000014 
Figure 0007561379000015 
Figure 0007561379000016
Abstract
Description
[Technical field]
[0001] The present invention relates to a learning device, a learning method, and a program. [Background technology]
[0002] Following the success of a very large-scale image recognition benchmark, convolutional neural networks used as image recognition models have made great progress. Convolutional neural networks have been established as a powerful framework, but they are not without drawbacks. It is widely known that the performance of convolutional neural networks drops dramatically when image transformations such as image rotation occur. A typical convolutional neural network learning method for improving this degradation is to augment the data for learning. Such a learning algorithm can obtain a recognition model with high expressiveness. However, as the degree of data augmentation increases, the number of trials increases, making learning extremely difficult. As a method for solving such problems, a method called Test-Time Augmentation (TTA) that performs data augmentation during testing has also been disclosed (see, for example, Non-Patent Document 1). Test-time augmentation is sometimes called multi-crop evaluation. Test-time augmentation aims to reduce performance degradation for image transformations such as image rotation by calculating the average inference score and the maximum inference score. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun, "Deep Residual Learning for Image Recognition", In Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp.770-778, 2016. Summary of the Invention [Problem to be solved by the invention]
[0004] Test time augmentation is widely used, but since the final recognition accuracy is evaluated only by the inference score, the performance tends to degrade significantly in the case of misrecognition with a high inference score. That is, even with data augmentation and test time augmentation, the performance of convolutional neural networks degrades dramatically for geometric image transformations, such as image rotation. The same is true for optical transformations of images, such as hue and saturation. That is, the performance of convolutional neural networks degrades for optical image transformations.
[0005] In view of the above circumstances, an object of the present invention is to provide a learning device, a learning method, and a program capable of learning a robust data recognition model even for data that has undergone data conversion. [Means for solving the problem]
[0006] One aspect of the present invention includes a conversion unit that generates a plurality of converted data by converting input data using different conversion parameters, a feature extraction unit that inputs each of the plurality of converted data generated by the conversion unit into a feature extraction model that extracts features of the input data and extracts a first feature, an inverse conversion unit that performs an inverse conversion corresponding to the conversion by the conversion unit on each of the first features extracted by the feature extraction unit to calculate a second feature, a feature integration unit that integrates the second feature obtained from each of the plurality of converted data, a recognition unit that inputs the second feature integrated by the feature integration unit into a recognition model that recognizes data based on the input features to obtain a recognition result, and an update unit that calculates a loss representing a difference between the recognition result obtained by the recognition unit and a correct recognition result corresponding to the input data, and updates one or both of the recognition model and the feature extraction model so as to reduce the calculated loss. the feature integration unit integrates the second features obtained from each of the plurality of transformed data by calculating a maximum value, an average value, a median value, or a weighted sum of the second features in a corresponding space-time under a constraint that the second features obtained from the regions of the input data that have been subjected to the same transformation by the transformation unit are selected; It is a learning device.
[0007] One aspect of the present invention is Learning devices are different Conversion parameters each Convert the input data using Generate multiple conversion data A conversion step of converting the input data into a feature extraction model for extracting features from the input data. The generated multiple The above conversion data each a feature extraction step of inputting the first feature and extracting the first feature extracted in the feature extraction step; each the inverse transformation step of calculating a second feature by performing an inverse transformation corresponding to the transformation in the transformation step; a feature integration step of integrating the second feature calculated in the inverse transformation step; a recognition step of inputting the second feature integrated in the feature integration step into a recognition model representing the correspondence between a feature and a recognition result of input data to obtain a recognition result; and an update step of calculating a loss representing a difference between the recognition result obtained in the recognition step and a correct answer corresponding to the input data, and updating one or both of the recognition model and the feature extraction model so as to reduce the calculated loss. and in the feature integration step, the second features obtained from each of the plurality of transformed data are integrated by calculating a maximum value, an average value, a median value, or a weighted sum of the second features in the corresponding space-time under a constraint that the second features obtained from the regions of the input data that have been subjected to the same transformation in the transformation step are selected. It is a way of learning.
[0008] One aspect of the present invention is a program for causing a computer to function as the learning device described above. Effect of the Invention
[0009] According to the present invention, it is possible to learn a data recognition model that is robust even for data that has undergone data transformation. [Brief description of the drawings]
[0010] [Figure 1] 1 is a functional block diagram showing a configuration of a learning device according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram illustrating an example of a hardware configuration of a learning device according to the embodiment. [Diagram 3] FIG. 4 is a diagram showing an overview of processing performed by a calculation unit according to the embodiment. [Figure 4] FIG. 11 is a functional block diagram showing another configuration of the learning device according to the embodiment. [Diagram 5] 4 is a flowchart showing a process during learning by the learning device according to the embodiment. [Figure 6] 11 is a flowchart showing an inference process of the learning device according to the embodiment. [Figure 7] 13A to 13C are diagrams showing experimental results using the learning device according to the embodiment. [Figure 8] FIG. 2 is a diagram showing an experimental setup using the learning device according to the embodiment. [Figure 9] 13A to 13C are diagrams showing experimental results using the learning device according to the embodiment. [Figure 10] 13A to 13C are diagrams showing experimental results using the learning device according to the embodiment. [Figure 11] 13A to 13C are diagrams showing experimental results using the learning device according to the embodiment. [Figure 12] FIG. 1 illustrates a convolutional neural network trained by TTA. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0012] <Description of one embodiment of the present invention> FIG. 1 is a functional block diagram showing the configuration of a learning device 1 according to an embodiment of the present invention. In FIG. 1, only functional blocks related to this embodiment are extracted and shown. The learning device 1 accepts one or more input data, and outputs the results of data recognition by inputting each input data into a recognition model as required. The learning device 1 learns the recognition model using the input data for learning. The learning device 1 includes a data input unit 10, a conversion parameter input unit 11, a calculation unit 20, and a data output unit 30. Note that one or more of the data input unit 10, the conversion parameter input unit 11, and the data output unit 30 may be functional units external to the learning device 1.
[0013] The data input unit 10 inputs data to be processed. The data input unit 10 may receive the data to be processed from an information processing device connected to the learning device 1, or may read the data to be processed from a recording medium. The data to be processed during learning is learning data in which input data and objective variables are associated with each other, and the data to be processed during inference is input data. The objective variables represent the correct recognition result of the input data.
[0014] The conversion parameter input unit 11 inputs parameters used for converting input data. The conversion parameter input unit 11 is configured using existing input devices such as a keyboard, a pointing device (mouse, tablet, etc.), a button, a touch panel, etc. The conversion parameter input unit 11 may also be an interface for connecting the input device to the learning device 1. In this case, the conversion parameter input unit 11 inputs an input signal generated in the input device in response to a user's input to the learning device 1. The conversion parameter input unit 11 may also receive conversion parameters from an information processing device connected to the learning device 1. The conversion parameter input unit 11 may also read out conversion parameters from a recording medium.
[0015] The calculation unit 20 includes a conversion unit 201, a feature extraction unit 202, an inverse conversion unit 203, a feature integration unit 204, a recognition unit 205, and a parameter update unit 206. The conversion unit 201 converts the input data input by the data input unit 10 using one or more conversion parameters input by the conversion parameter input unit 11. The converted input data is referred to as converted data. For example, when the input data is image data, the conversion unit 201 performs image conversion on the input data according to the conditions represented by the conversion parameters.
[0016] The feature extraction unit 202 extracts features (first features) from the converted data generated by the conversion unit 201 using a feature extraction model. For example, the feature extraction model is an algorithm such as a neural network that outputs features of input data from the data, or a function that calculates features based on values obtained from the data. In the following, a case where the feature extraction model is a neural network will be described as an example. The inverse conversion unit 203 performs an inverse conversion of the data conversion performed by the conversion unit 201 on the features extracted by the feature extraction unit 202. The feature integration unit 204 integrates the features (second features) inversely converted by the inverse conversion unit 203. This integration obtains features of the same dimension as the output data obtained by inputting the input data to the feature extraction model of the feature extraction unit 202.
[0017] The recognition unit 205 inputs the features integrated by the feature integration unit 204 into a recognition model to obtain a recognition result. The recognition model is a model that represents the correspondence between features and recognition results. For example, a neural network is used for the recognition model. The parameter update unit 206 calculates a loss that represents the difference between the recognition result calculated by the recognition unit 205 and the objective variable corresponding to the input data from which the recognition result was obtained, and updates one or both of the values of the network parameters of the recognition model used by the recognition unit 205 and the values of the network parameters of the feature extraction model used by the feature extraction unit 202 so as to reduce the calculated loss. Details of the processing performed by each unit of the calculation unit 20 will be described later.
[0018] The data output unit 30 outputs the recognition result by the recognition unit 205. The output form may be display on a display device such as a display, printing by a printer, writing to a recording medium, or transmission to an information processing device connected to the learning device 1. For example, the data output unit 30 may output the recognition result to a display device in real time. Alternatively, the data output unit 30 may store the result as image data in a storage device such as a semiconductor memory or a hard disk drive (HDD). This storage device may be provided inside the learning device 1, or may be an external storage device.
[0019] The learning device 1 is realized, for example, by a computer device. The learning device 1 may also be realized by multiple computer devices connected to a network. In this case, it is possible to arbitrarily determine which of the multiple computer devices each functional unit of the learning device 1 is realized by. Also, the same functional unit of the learning device 1 may be realized by multiple computer devices.
[0020] FIG. 2 is a device configuration diagram showing an example of the hardware configuration of the learning device 1. The learning device 1 includes a processor 71, a storage unit 72, a communication interface 73, and a user interface 74. The processor 71 is a central processing unit that performs calculations and control. The processor 71 is, for example, a CPU (central processing unit). The processor 71 realizes the function of the calculation unit 20 by reading and executing a program from the storage unit 72. The storage unit 72 further has a work area and the like when the processor 71 executes various programs. The communication interface 73 is connected to other devices so as to be able to communicate with them. The user interface 74 is an input device such as a keyboard, a pointing device (mouse, tablet, etc.), a button, a touch panel, etc., or a display device such as a display. An artificial operation is input through the user interface 74.
[0021] All or part of the functions of the calculation unit 20 may be realized using hardware such as an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a field programmable gate array (FPGA).
[0022] The following describes the detailed processing of each functional unit of the learning device 1. The following mainly describes an example in which image data is handled as input data, but the present embodiment is not limited thereto. The following also describes a case in which deep learning is used, but the present embodiment is not limited thereto.
[0023] <<<Examples of variables in this embodiment>>> FIG. 12 is a diagram showing a standard convolutional neural network trained by conventional TTA. A general convolutional neural network includes structures called a backbone and a head. In the following, f() is the backbone and g() is the head. The backbone f() is further divided into f F () and f R The output y^ when an input x is input to a convolutional network is given by the following equation (1).
[0024]
number
[0025] As shown in Fig. 12, in conventional TTA, multiple transformed data obtained by performing different transformations T on an input x are input to a convolutional neural network, and the obtained results are integrated and output.
[0026] 3 is a diagram showing an outline of the processing performed by the calculation unit 20 of the learning device 1. In this embodiment, the backbone f F() is the feature extraction model used by the feature extraction unit 202, and the backbone f R () and head g() are used as the recognition model by the recognition unit 205.
[0027] In the following, backbone f F Let the output of () be the feature z=z chw Here, c is a channel index, h is a height index, and w is a width index. In the following, the above variables are used for simplicity, but the present embodiment is not limited to these.
[0028] <<<Explanation of operation of each part>>> The operation of each part of the learning device 1 will be described with reference to FIG. 1 and FIG.
[0029] The data input unit 10 inputs one or more pieces of processing target data. That is, during learning, the data input unit 10 inputs a plurality of pieces of learning data, which are pairs of input data x (hereinafter also referred to as input x) and a target variable y representing a correct recognition result of the input x, as processing target data. Furthermore, during inference, the data input unit 10 inputs the input x as processing target data. The amount corresponding to the input x may be, for example, two-dimensional or more data such as an image, or one-dimensional time series data such as voice, sound, or vibration. Alternatively, the amount corresponding to the input x may be symbolic data such as natural language. That is, the input x may be data to which machine learning is generally applied. The amount corresponding to the target variable y may be a quantified version of information corresponding to a class label, such as an attribute, a class name, or a person ID, or may be data similar to the input x, that is, image or sound data. In this way, the target variable y may be a target variable when machine learning is generally applied. More specifically, when a label is used as the target variable, the purpose is identification or authentication, and when data similar to the input x is used as the target variable, regression is the purpose.
[0030] The conversion parameter input unit 11 inputs conversion parameters used for converting input data. When the input data is image data, the conversion referred to here is, for example, a geometric image conversion such as rotation, enlargement / reduction, affine transformation, projective transformation, or nonlinear transformation using B-spline interpolation. Alternatively, the conversion referred to here may be an optical image conversion such as a conversion of color tone or color temperature. Alternatively, the conversion referred to here may be a conversion related to image degradation such as noise removal or noise addition, removal or addition of compression noise or antagonistic noise, or addition or removal of blur. In the following, a set of conversion parameters characterizing these conversions is expressed as the following formula (2).
[0031]
number
[0032] ξ n is a transformation parameter representing the n-th transformation. For example, when the transformation performed by the transformation unit 201 is a two-dimensional rotation, ξ n is the value of one variable. In this case, for example, a value representing a rotation angle of 0 degrees is set to ξ1, a value representing a rotation angle of 90 degrees to ξ2, a value representing a rotation angle of 180 degrees to ξ3, etc. On the other hand, if the transformation is an affine transformation, then ξ n are the values of six variables: four variables representing linear transformation and two variables representing parallel translation. Note that {} is the symbol that represents a set.
[0033] The conversion unit 201 converts the input x included in the processing target data input by the data input unit 10, using a conversion model using the conversion parameters input by the conversion parameter input unit 11. As already described, the conversion performed on the input x by the conversion model is, for example, a geometric image conversion such as rotation, enlargement / reduction, affine transformation, projective transformation, or nonlinear conversion using B-spline interpolation. Alternatively, the conversion performed by the conversion model may be an optical image conversion such as conversion of color tone or color temperature. Alternatively, the conversion performed by the conversion model may be a conversion related to image degradation, such as noise removal or noise addition, removal of compression noise or hostile noise or addition of compression noise or hostile noise, or addition of blur or removal of blur.
[0034] Furthermore, the conversion unit 201 may convert the input data using some of the conversion parameters selected from the multiple conversion parameters, rather than converting the input data using all of the multiple conversion parameters input by the conversion parameter input unit 11. For example, when 100 conversion parameters are input, the conversion unit 201 may randomly select 10 of them each time, and convert the input x by the conversion model using only the selected conversion parameters.
[0035] In the following, the transformation performed by the transformation unit 201 is represented as T, and the inverse transformation corresponding to transformation T is represented as T -1 That is, the transformation T is the transformation model, and the inverse transformation T -1 is an inverse transformation model. The inverse transformation model is used in the inverse transformation unit 203 as described later. n , …, ξ N A set of transformed data transformed by a transformation T using each of the above is expressed as the following formula (3).
[0036]
number
[0037] Here, n is a subscript for distinguishing the transformations, and N is the total number of transformations. That is, the transformation data x ~ 1 to x ~ N The n-th parameter ξ n The transformed data generated by transforming the input x using the transform T with ~ n Specifically, x ~ n is given by the following equation (4).
[0038]
number
[0039] For example, if the transformation T is a two-dimensional rotation, x ~ n is the image data of the input x rotated by an angle ξ n The feature extraction unit 202 extracts the converted data x obtained by converting the input data by the conversion unit 201. ~ 1, …, x ~ N The feature extraction unit 202 extracts features from each of the features by using a feature extraction model. The extracted features are, for example, feature maps that have been subjected to geometric transformation. As described above, the feature extraction unit 202 uses f F In this case, the set of converted data {x ~ 1,…,x ~ n ,…,x ~ N}, each element of f F The feature extraction unit 202 calculates the following equation (5) as a set of features of the transformed data.
[0040]
number
[0041] The inverse transformation unit 203 performs an inverse transformation T corresponding to the transformation T performed by the transformation unit 201 for each feature extracted by the feature extraction unit 202. -1 More specifically, the inverse transformation unit 203 performs the following on a set of features {f F (x ~ 1),…,f F (x ~ n ),…,f F (x ~ N )} is the inverse transformation model, -1 The inverse transform unit 203 performs inverse transform T -1 The transformation parameters for are defined as the transformation parameters {ξ1…ξ n …ξ N For example, when the transformation by the transformation T of the transformation unit 201 is a rotation of θ degrees, the inverse transformation unit 203 performs the inverse rotation, that is, a rotation of −θ degrees, by the inverse transformation T -1 The set of inversely transformed features is given by the following equation (6).
[0042]
number
[0043] Here, z n is the nth transformation data x of the input x ~ n This is a feature obtained by inversely transforming the feature obtained from and is given by the following equation (7).
[0044]
number
[0045] Hereinafter, the features inversely transformed by the inverse transformation model will be referred to as inverse transformation features. Note that the feature integration unit 204 described later integrates, for example, a set of inverse transformation features z1 to z2 corresponding to each position. NIn this case, the feature integration unit 204 compares inverse transformation features at the same spatial position. For example, when the transformation T is a geometric transformation such as rotation, the inverse transformation T is selected from the inverse transformation feature obtained from the transformation data transformed by different transformation parameters in order to align the positions of the inverse transformation features. -1 is necessary.
[0046] The feature integration unit 204 integrates the inverse transformation features calculated by the inverse transformation unit 203, and outputs features of the same dimension as the output obtained when the input data input by the data input unit 10 is input to the feature extraction unit 202. For ease of explanation, consider a set Z of inverse transformation features. The set Z of inverse transformation features is divided into inverse transformation features z1 to z2 using the concatenation operator [] as shown in the following formula (8). n It is a quantity obtained by concatenating the above.
[0047]
number
[0048] Note that the set Z of integrated inverse transformation features is not limited to this. For example, the feature integration unit 204 integrates the maximum value of the inverse transformation features calculated by equation (9), the average value of the inverse transformation features calculated by equation (10), and the weighted maximum value of the inverse transformation features calculated by equation (11) into the integrated inverse transformation feature z ^ For example, the feature integration unit 204 may use the inverse transformation feature z ^ Hereinafter, using the maximum value of the inverse transformation features calculated as shown in formula (9) as the integrated inverse transformation feature will be referred to as maximum value integration, and using the average of the inverse transformation features calculated as shown in formula (10) as the integrated inverse transformation feature will be referred to as average value integration.
[0049]
number
[0050]
number
[0051]
number
[0052]
number
[0053] Here, w n is a weight given for each transformation, and may be defined in advance by the user. Alternatively, the feature integration unit 204 may integrate the inverse transformation features by obtaining the maximum value, the average value, the median value, or a weighted sum thereof between corresponding inverse transformation features in time and space. The feature integration unit 204 may also add a constraint that an inverse transformation feature corresponding to the same image transformation is selected between inverse transformation features in the vicinity of each other, and select and integrate the inverse transformation feature. That is, when the transformation unit 201 performs different image transformations for each region on the input data, the feature integration unit 204 selects an inverse transformation feature obtained by inversely transforming a feature obtained from a region where the same transformation has been performed, and integrates the inverse transformation feature by obtaining the maximum value, the average value, the median value, or a weighted sum thereof between the selected inverse transformation features. For example, when integrating the inverse transformation features of a region of interest using equation (9) or equation (10), the inverse transformation features can be integrated so that, among the inverse transformation features within the region of interest, inverse transformation features that correspond to the same image transformation as the inverse transformation features surrounding the region of interest are more likely to be selected, or the weight of the weighted average for inverse transformation features that correspond to the same image transformation as the inverse transformation features surrounding the region of interest is increased.
[0054] The recognition unit 205 recognizes the inverse transformation feature z ^ For example, the recognition unit 205 performs data recognition such as detection, classification, and semantic segmentation. R()), the recognition unit 205 calculates the value y ^ is output as the recognition result.
[0055]
number
[0056] The parameter update unit 206 calculates a loss using the recognition result y^ calculated by the recognition unit 205 and the objective variable y, which is a correct label included in the learning data, and updates the recognition model of the recognition unit 205 and the feature extraction model of the feature extraction unit 202 so as to reduce the loss. More specifically, for example, the parameter update unit 206 calculates the recognition result y^ calculated by the recognition unit 205. ^ Based on the objective variable y included in the learning data, the loss is calculated using a loss function such as cross-entropy. Then, the parameter update unit 206 updates one or both of the network parameter values of the recognition model used by the recognition unit 205 and the network parameter values of the feature extraction model used by the feature extraction unit 202 so that the loss is reduced by using, for example, stochastic gradient descent (SGD). The parameter update unit 206 may update all of the network parameter values of the recognition model and the network parameter values of the feature extraction model, or may update only a part of these parameters. For example, the parameter update unit 206 may update only the network parameters of the recognition model. Alternatively, the parameter update unit 206 may update all of the network parameters of the recognition model and the feature extraction model in the initial stage of parameter update, and update a part of all of these network parameters after a certain number of updates have been completed. Alternatively, the parameter update unit 206 may update some of all the network parameters of the recognition model and the feature extraction model in the initial stage of parameter update, and update all the network parameters after a certain number of updates.
[0057] Note that the parameter update operation according to this embodiment is not limited to this. FIG. 4 is a functional block diagram showing the configuration of the learning device 1a. In this figure, the same parts as those of the learning device 1 shown in FIG. 1 are given the same reference numerals, and their description will be omitted. The learning device 1a differs from the learning device 1 in that it includes a calculation unit 20a instead of the calculation unit 20. The calculation unit 20a differs from the calculation unit 20 in that it includes a parameter update unit 206a instead of the parameter update unit 206. The parameter update unit 206a has the same function as the parameter update unit 206 in FIG. 1. Furthermore, the parameter update unit 206a updates the value of the conversion parameter of the conversion model used by the conversion unit 201 and the value of the conversion parameter of the inverse conversion model in the inverse conversion unit 203. More specifically, for example, the parameter update unit 206a selects one of the conversion parameters and updates the value of the selected conversion parameter so that the loss is reduced. For example, the method of updating the value of the conversion parameter may be optimization using a method such as a gradient method, or the value of the selected conversion parameter may be randomly changed, and if the loss of the changed value is smaller, the conversion parameter value may be updated to the changed value. Then, the parameter update unit 206a updates the value of the conversion parameter of the inverse conversion model used by the inverse conversion unit 203 so as to correspond to the updated conversion parameter value.
[0058] <<<Processing flow>>> Figures 5 and 6 are flow diagrams showing an example of processing by the learning device 1. The processing flow of the learning device 1 differs between network learning in deep learning (when updating parameters) and inference using the network. The flow diagram in Figure 5 shows processing during network learning, and the flow diagram in Figure 6 shows processing during inference using a trained network.
[0059] [Study time] The process of the learning device 1 during network learning will be described with reference to FIG. 5. First, the data input unit 10 inputs learning data, and the conversion parameter input unit 11 inputs conversion parameters (step S201). The conversion unit 201 selects a part of learning data from the learning data input by the data input unit 10. The conversion unit 201 converts the input data included in the selected learning data by a conversion model using one or more conversion parameters input by the conversion parameter input unit 11, and calculates converted data (step S202). When the input data is an image, the conversion is, for example, rotation or scaling. The feature extraction unit 202 extracts features from each of the converted data calculated by the conversion unit 201 by the feature extraction model (step S203).
[0060] The inverse conversion unit 203 uses an inverse conversion model for each feature extracted by the feature extraction unit 202 to perform an inverse conversion corresponding to the conversion performed by the conversion unit 201 using the conversion model to calculate inverse conversion features (step S204). The feature integration unit 204 integrates the inverse conversion features calculated by the inverse conversion unit 203 (step S205). As a result, the feature integration unit 204 outputs features of the same dimension as the output obtained by inputting input data to the feature extraction unit 202. The recognition unit 205 inputs the inverse conversion features integrated by the feature integration unit 204 to a recognition model to perform recognition (step S206).
[0061] The parameter update unit 206 calculates the loss using the recognition result obtained by the recognition unit 205 using the recognition model and the objective variable corresponding to the input data that was the target of conversion in step S202. The parameter update unit 206 updates one or both of the network parameter values of the recognition model used by the recognition unit 205 and the network parameter values of the feature extraction model used by the feature extraction unit 202 so as to reduce the loss (step S207). The calculation unit 20 determines whether or not the learning end condition is satisfied (step S208). The calculation unit 20 may determine that the end condition is satisfied when, for example, the processing is completed for a predetermined number of learning data or when the change in loss is within a predetermined range. When the calculation unit 20 determines that the end condition is not satisfied, the calculation unit 20 repeats the processing from step S202, and when the calculation unit 20 determines that the end condition is satisfied, the calculation unit 20 performs the processing of step S209. That is, the data output unit 30 outputs the recognition result of the recognition unit 205 (step S209).
[0062] [When inferring] The process of inference by the learning device 1 will be described with reference to FIG. 6. First, the data input unit 10 inputs input data, and the conversion parameter input unit 11 inputs conversion parameters (step S301). The conversion unit 201 converts the input data input by the data input unit 10 with a conversion model using one or more conversion parameters input by the conversion parameter input unit 11, and calculates converted data (step S302). When the input data is an image, the conversion is, for example, rotation or enlargement / reduction. The feature extraction unit 202 extracts features from each of the converted data calculated by the conversion unit 201 with the feature extraction model learned in the process of FIG. 5 (step S303).
[0063] The inverse conversion unit 203 uses an inverse conversion model for each feature extracted by the feature extraction unit 202 to perform an inverse conversion corresponding to the conversion performed by the conversion unit 201 to calculate inverse conversion features (step S304). The feature integration unit 204 integrates the inverse conversion features calculated by the inverse conversion unit 203 by a process similar to step S205 in Fig. 4 (step S305). The recognition unit 205 inputs the inverse conversion features integrated by the feature integration unit 204 to the recognition model learned in the process of Fig. 5 to perform recognition (step S306). The data output unit 30 outputs the recognition result obtained by the recognition unit 205 using the recognition model (step S307).
[0064] The learning device 1a operates in the same manner as in Fig. 5 and Fig. 6. However, in step S207 in Fig. 7, the parameter update unit 206a further updates the values of the conversion parameters used by the conversion unit 201 and the values of the conversion parameters of the inverse conversion model used by the inverse conversion unit 203 so as to reduce the loss.
[0065] <<<Experimental Results>>> The results of an experiment in which the learning device 1 was used to recognize image data are shown below.
[0066] [Experiment 1] The estimation accuracy of the present embodiment was compared with that of the conventional technology using rotated image data. The CIFAR10 dataset was used for the image data. The learning data was input data generated by rotating the original image data with a rotation angle randomly selected from four discrete values of 0 degrees, 90 degrees, 180 degrees, and 270 degrees. The test data, which is the input data to be recognized, was four image data groups generated by rotating the original image data with rotation angles of 0 degrees, 90 degrees, 180 degrees, and 270 degrees. In addition, ResNet18 was used for the convolutional neural network. The initial values of the weights of ResNet18 were those previously trained using the image data of CIFAR10 that had not been rotated.
[0067] FIG. 7 is a diagram showing the experimental results of Experiment 1. BS (base model) indicates that the model was trained using the original image data without rotation as training data, and DA (data augmentation) indicates that the model was trained using the original image data and the rotated image data as training data. TTA indicates that image data of four rotation angles was used as training data. FIG. 7 shows the estimation accuracy of the recognition results obtained by inputting image data rotated by 0 degrees, 90 degrees, 180 degrees, and 270 degrees as test data to the model trained by BS, the model trained by BS and TTA, the model trained by DA, the model trained by DA and TTA, and the learning device 1 of this embodiment. Note that the learning device 1 of this embodiment was able to obtain good estimation accuracy when maximum value integration was used for feature integration. In addition, in the case of TTA, good estimation accuracy was obtained by using the mean for interface integration.
[0068] The estimation accuracy of the model trained by BS was significantly reduced when rotated image data was used as input data. Even after data augmentation and TTA, the estimation accuracy of BS when rotated image data was used as input data was lower than the estimation accuracy when image data with a rotation angle of 0 degrees was used as input data. On the other hand, in the case of the learning device 1 of this embodiment, the estimation accuracy was maintained even when rotated image data was used as input data. In other words, this shows that the learning device 1 of this embodiment is robust against rotation transformations.
[0069] [Experiment 2] The estimation accuracy of the learning device 1 of this embodiment was compared with that of a convolutional neural network trained by TTA. In this experiment, the following three types of geometric transformations, transformation A, transformation B, and transformation C, were performed on image data of four types of image databases to create 12 types of evaluation databases. Each of the 12 types of evaluation databases includes training data and test data. The test data is input data to be input to a model trained using the training data. The four types of image databases are CIFAR10, CIFAR100, SVHN, and CUB-200. Transformation A is a transformation that rotates the original image data by a rotation angle randomly selected from four discrete values of 0 degrees, 90 degrees, 180 degrees, and 270 degrees. Transformation B is a transformation that rotates the original image data by an angle randomly selected with a uniform probability from between 0 degrees and 360 degrees. Transformation C is a transformation that rotates the original image data by an angle selected randomly with uniform probability from between 0 degrees and 360 degrees, and then enlarges or reduces the image by a magnification factor selected randomly from between 0.5 and 1.5.
[0070] FIG. 8 is a diagram showing the settings of the learning device 1 and the existing technology to be tested. As shown in FIG. 8, for the existing technology, the model was learned by BS only, DA only, or a combination of BS and DA with TTA using the maximum value (max) or the mean value (mean) for interface integration. In BS, image data without conversion was used for fine tuning the model, and in DA, image data converted by conversions A to C was used for fine tuning. In the learning device 1 of this embodiment, maximum value integration and mean value integration were used for feature integration, and image data converted by conversions A to C was used for fine tuning. Three types of convolutional networks, ResNet18, ResNet50, and MobileNetV2, were used for the model. By default, the network was learned with a mini-batch size of 128, a weight decay coefficient of 0.0005, momentum of 0.9, and 200 epochs. SGD was used for optimization, and the learning rate was set to 0.1 to 0.0001.
[0071] 9 and 10 are diagrams showing the estimation accuracy by the convolutional neural network of each setting. FIG. 9 shows the estimation accuracy when ResNet18 is used as the model for CIFAR10, CIFAR100, and SVHN, and ResNet50 is used as the model for CUB-200. FIG. 10 shows the estimation accuracy when MobileNetV2 is used as the model. The numbers surrounded by squares indicate the best estimation accuracy, and the numbers underlined indicate the second best estimation accuracy. As shown in FIG. 9 and FIG. 10, the estimation accuracy by the learning device 1 of this embodiment was higher than that of the existing technology for all network models and all databases. This shows that this embodiment is effective. Note that maximum value integration has a higher estimation accuracy than average value integration, so maximum value integration is used in the following experiments.
[0072] [Experiment 3] The effectiveness of combining learning device 1 with existing data augmentation was evaluated. In this experiment, a dataset was used in which image data from CIFAR10 and CIFAR100 was converted using conversion B in experiment 2. Rand Augmentation (RA) was used for data augmentation, and the number of layers in the recognition model was increased using WideResNet (WR). The comparison method was the same as in experiment 2. Furthermore, instead of learning device 1, image recognition was performed using a model trained using existing methods such as TTA or GPS. RA is described in Reference 1, WR in Reference 2, and GPS in Reference 3.
[0073] (Reference 1) ED Cubuk, B. Zoph, J. Shlens, QV Le, “Randaugment: Practical automated data augmentation with a reduced search space”, in Proc. of the Conference on Computer Vision and Pattern Recognition Workshop (CVPRW), 2020.
[0074] (Reference 2) S. Zagoruyko, N. Komodakis, “Wide Residual Networks”, in Proc. of British Machine Vision Conference (BMVC), 2016.
[0075] (Reference 3) D. Molchanov, A. Lyzhov, Y. Molchanova, A. Ashukha, D. Vetrov, “Greedy Policy Search: A Simple Baseline for Learnable Test-Time Augmentation”, in Proc. of Uncertainty in Artificial Intelligence, 2020.
[0076] 11 is a diagram showing the experimental results. The learning device 1 had higher estimation accuracy than all existing methods including GPS. These results show that the learning device 1 of the present embodiment can be effectively used in combination with existing data augmentation.
[0077] According to this embodiment, the learning device performs one or more image transformations on input image data, extracts features from each image data after the image transformation, performs an inverse transformation on the extracted features, and then integrates them. By using the integrated features, the learning device can realize learning of a recognition model that is robust against image transformations. In addition to image recognition, the learning device can also be applied to data classification, data search, and the like.
[0078] According to the above-described embodiment, the learning device includes a conversion unit, a feature extraction unit, an inverse conversion unit, a feature integration unit, a recognition unit, and an update unit. The conversion unit generates a plurality of converted data by converting input data using different conversion parameters. The feature extraction unit inputs each of the plurality of converted data generated by the conversion unit into a feature extraction model that extracts features of the input data, and extracts a first feature. The inverse conversion unit calculates a second feature by performing an inverse conversion corresponding to the conversion by the conversion unit on each of the first features extracted by the feature extraction unit. The feature integration unit integrates the second features obtained from each of the plurality of converted data. The recognition unit inputs the second feature integrated by the feature integration unit into a recognition model that recognizes data based on the input features, and obtains a recognition result. The update unit calculates a loss representing a difference between the recognition result obtained by the recognition unit and a correct recognition result corresponding to the input data, and updates one or both of the recognition model and the feature extraction model so as to reduce the calculated loss.
[0079] The feature integration unit may integrate the second features obtained from each of the plurality of transformed data by calculating a maximum value, an average value, a median value, or a weighted sum of the corresponding spatiotemporal second features. Alternatively, the feature integration unit may integrate the second features obtained from each of the plurality of transformed data by calculating a maximum value, an average value, a median value, or a weighted sum of the corresponding spatiotemporal second features under a constraint that the second features obtained from the input data regions subjected to the same transformation by the transformation unit are selected.
[0080] The conversion unit may convert the input data using some of the input multiple conversion parameters. Also, the update unit may update values of the conversion parameters so as to reduce loss.
[0081] Although the embodiment of the present invention has been described above with reference to the drawings, it is clear that the above embodiment is merely an example of the present invention and the present invention is not limited to the above embodiment. Therefore, addition, omission, substitution, and other modifications of components may be made without departing from the technical spirit and scope of the present invention. [Explanation of symbols]
[0082] 1, 1a... learning device, 10... data input unit, 11... conversion parameter input unit, 20, 20a... calculation unit, 30... data output unit, 71... processor, 72... memory unit, 73... communication interface, 74... user interface, 201... conversion unit, 202... feature extraction unit, 203... inverse conversion unit, 204... feature integration unit, 205... recognition unit, 206, 206a... parameter update unit
Claims
1. a conversion unit that converts input data using different conversion parameters to generate a plurality of converted data; a feature extraction unit that inputs each of the plurality of converted data generated by the conversion unit into a feature extraction model that extracts features of the input data, and extracts a first feature; an inverse conversion unit that calculates second features by performing an inverse conversion corresponding to the conversion by the conversion unit on each of the first features extracted by the feature extraction unit; a feature integration unit that integrates the second features obtained from each of the plurality of transformed data; a recognition unit that inputs the second feature integrated by the feature integration unit into a recognition model that recognizes data based on input features to obtain a recognition result; an update unit that calculates a loss representing a difference between the recognition result obtained by the recognition unit and a correct recognition result corresponding to the input data, and updates one or both of the recognition model and the feature extraction model so as to reduce the calculated loss; Equipped with the feature integration unit integrates the second features obtained from each of the plurality of transformed data by calculating a maximum value, an average value, a median value, or a weighted sum of the second features in a corresponding space-time under a constraint that the second features obtained from the regions of the input data that have been subjected to the same transformation by the transformation unit are selected; Learning device.
2. the feature integration unit integrates the second features obtained from each of the plurality of transformed data by calculating a maximum value, an average value, a median value, or a weighted sum of the second features in the corresponding space-time; The learning device according to claim 1 .
3. The conversion unit converts the input data using some of the input conversion parameters. The learning device according to claim 1 or 2.
4. The update unit updates the value of the transformation parameter so as to reduce the loss. The learning device according to any one of claims 1 to 3.
5. A learning device comprising: A conversion step of generating a plurality of converted data by converting input data using different conversion parameters; a feature extraction step of inputting each of the plurality of converted data generated in the conversion step into a feature extraction model that extracts features from input data, and extracting a first feature; an inverse transformation step of calculating second features by performing an inverse transformation corresponding to the transformation in the transformation step on each of the first features extracted in the feature extraction step; a feature integration step of integrating the second features calculated in the inverse transformation step; a recognition step of inputting the second feature integrated in the feature integration step into a recognition model that represents a correspondence between features and a recognition result of input data to obtain a recognition result; an update step of calculating a loss representing a difference between the recognition result obtained in the recognition step and a correct answer corresponding to the input data, and updating one or both of the recognition model and the feature extraction model so as to reduce the calculated loss; having In the feature integration step, the second features obtained from each of the plurality of transformed data are integrated by calculating a maximum value, an average value, a median value, or a weighted sum of the second features in the corresponding space-time, under a constraint that the second features obtained from the regions of the input data that have been subjected to the same transformation in the transformation step are selected. How to learn.
6. Computer, A program for causing the learning device according to any one of claims 1 to 4 to function.
Citation Information
Patent Citations
Method and device for providing integrated feature map by using ensemble of a plurality of outputs from convolutional neural network
JP2020038664A
Information processing unit, information processing method and program
JP2021082068A
