Method and device for constructing image model
By introducing additional layers into the target image model and training based on the output of the reference model, the problem of degradation in high-resolution image recognition performance is solved, effective recognition of high-resolution images and maintenance of low-resolution image performance are achieved, reducing the Training difficulty.
Patent Information
- Application Number
- CN201910549883.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-07-02
- Filing Date
- 2019-06-24
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2039-06-24
AI Technical Summary
The performance of existing artificial neural networks decreases in the recognition task from high-resolution images to low-resolution images, it is difficult to maintain recognition performance, and the training difficulty increases.
Improve the image model by generating an additional layer of the target image model and training the additional layer based on the reference image model, calculating the error using the converted image, and updating the parameters of the target image model until the error between the reference model output and the target model output converges recognition performance.
The target image model that can recognize high-resolution images is effectively trained, maintaining the recognition performance of low-resolution images, while reducing the number of training parameters and reducing the training difficulty.
Smart Images

Figure CN110674919B_ABST
Abstract
Description
[0001] This application claims the benefit of Korean Patent Application No. 10-2018-0076226, filed on Jul. 2, 2018, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety for all purposes by reference. Technical Field
[0002] The following description relates to a technique for training an image model. Background Art
[0003] Recently, in order to solve the problem of classifying input patterns into predetermined groups, research is being actively conducted to try to apply effective pattern recognition methods of humans to actual computers. The research includes research on artificial neural networks (ANNs), in which artificial neural networks (ANNs) are obtained by modeling the characteristics of human biological neurons via mathematical expressions. In order to solve the above problems, ANNs use algorithms that simulate the learning ability of humans. ANN uses this algorithm to generate a mapping between input patterns and output patterns, which indicates that ANNs have learning capabilities. In addition, ANNs have a generalization ability to generate relatively correct outputs for input patterns that are not used for training based on training results.
[0004] In the case where an artificial neural network is used to recognize an object, when an image model trained to recognize images having a first resolution is used to recognize images having a resolution different from the first resolution, the performance of the image model may deteriorate. Summary of the invention
[0005] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
[0006] In one general aspect, a method for constructing an image model includes generating a target image model and training additional layers of the target image model based on a reference image model, wherein the target image model includes the additional layers and layers identical to multiple layers of the reference image model.
[0007] The generating of the target image model may include generating the target image model by connecting an additional layer to a layer located at an input side among the plurality of layers.
[0008] The step of generating the target image model may include initializing the additional layer by assigning a random value to each node of the additional layer in the target image model.
[0009] The step of training the additional layer may include: computing a reference model output from the image with the transformed training input based on a reference image model, and training the target image model based on the reference model output.
[0010] The step of calculating the reference model output may include generating a transformed image by transforming the training input based on an input layer of the reference image model, and calculating the reference model output from the transformed image.
[0011] The step of training the additional layer may include training the target image model based on a reference model output and a target model output based on the reference image model and the target image model, respectively.
[0012] The step of training the additional layers may include calculating errors based on the reference model output and the target model output, and updating parameters of all of the layers in the target image model and at least part of the additional layers based on the calculated errors.
[0013] The step of updating the parameters may include repeatedly updating the parameters until the error between the reference model output and the target model output converges.
[0014] The step of training the additional layer may include updating parameters of the additional layer.
[0015] The step of training the additional layer may include updating parameters of the additional layer while maintaining parameters of the remaining layers in the target image model.
[0016] The step of generating the target image model may include generating remaining layers of the target image model by copying parameters and a layer structure of the reference image model, and connecting the additional layer to the remaining layers.
[0017] The method may further include updating parameters of all of the layers and additional layers in the target image model in response to completion of training of the additional layer.
[0018] The step of generating a target image model may include: generating an additional layer including nodes, wherein the number of nodes in the additional layer is greater than or equal to the number of nodes included in one layer of multiple layers of the reference image model, and less than or equal to the number of nodes included in the input layer of the target image model.
[0019] The method may also include acquiring a new input image, determining a label for the new input image, and additionally training the target image model based on the new input image and the label.
[0020] The step of determining the label may include determining the label based on user input associated with the acquisition of the new input image.
[0021] The method may further include: in response to completion of training of the target image model, generating an additional image model including an additional layer connected to the target image model, and training the additional layer of the additional image model based on an output of the target image model.
[0022] The generating of the target image model may include generating the target image model for receiving an image having a higher resolution than an input resolution of the reference image model.
[0023] The step of training the additional layer may include training the additional layer based on feature data output from at least part of the layers of the reference image model and feature data output from at least part of the layers of the target image model.
[0024] In another general aspect, a device for constructing an image model includes: a processor configured to generate a target image model including additional layers and layers identical to multiple layers of a reference image model, and train the additional layers of the target image model based on the reference image model; and a memory configured to store the trained target image model.
[0025] Other features and aspects will be apparent from the following detailed description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 An example of the configuration of an image model is shown.
[0027] Figure 2 An example of constructing a target image model based on a reference image model is shown.
[0028] Figure 3 and Figure 4 is a flowchart illustrating an example of an image model building method.
[0029] Figure 5 An example of generating and initializing a target image model is shown.
[0030] Figure 6 is a flowchart illustrating an example of training a target image model.
[0031] Figure 7 Shows an example of calculating the error during training.
[0032] Figure 8 An example of training all parts of the target image model is shown.
[0033] Fig. 9 An example of extending the target image model is shown.
[0034] Fig.10 and Fig.11 is a block diagram illustrating an example of an image model building device.
[0035] Throughout the drawings and specific embodiments, unless otherwise described or provided, the same reference numerals will be understood to represent the same elements, features, and structures. The drawings may not be drawn to scale, and the relative sizes, proportions, and depictions of the elements in the drawings may be exaggerated for clarity, illustration, and convenience. DETAILED DESCRIPTION
[0036] The following specific embodiments are provided to help the reader obtain a comprehensive understanding of the methods, devices, and / or systems described herein. However, after understanding the disclosure of the present application, various changes, modifications, and equivalents of the methods, devices, and / or systems described herein will be clear. For example, the order of operations described herein is only an example and is not limited to the order of operations set forth herein, but in addition to the operations that must occur in a specific order, the order of operations described herein can be changed as clearly after understanding the disclosure of the present application. In addition, for greater clarity and brevity, the description of features known in the art may be omitted.
[0037] The features described herein can be implemented in different forms and are not to be construed as being limited to the examples described herein. Rather, the examples described herein are provided only to illustrate some of the many possible ways to implement the methods, devices and / or systems described herein that will be clear after understanding the disclosure of the present application.
[0038] Various modifications may be made to the following examples. Here, the examples are not interpreted as being limited to the present disclosure, but should be understood to include all changes, equivalents, and substitutions within the concept and technical scope of the present disclosure.
[0039] The terms used herein are only for the purpose of describing specific examples and are not intended to limit the examples. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. It should also be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates that there are stated features, integers, steps, operations, elements, components or combinations thereof, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0040] Unless otherwise defined herein, all terms (including technical and scientific terms) used herein have the same meanings as those generally understood. Unless otherwise defined herein, terms defined in general dictionaries should be interpreted as having a meaning that matches the meaning of the context in the relevant art and not as an idealized or overly formal meaning.
[0041] Hereinafter, examples will be described in detail with reference to the accompanying drawings, wherein like reference numerals refer to like elements throughout.
[0042] Figure 1 An example of the configuration of an image model is shown.
[0043] The neural network 100 corresponds to an example of a deep neural network (DNN). For example, the DNN includes a fully connected network, a convolutional neural network (CNN), a deep convolutional network, a recurrent neural network (RNN), a deep belief network, a bidirectional neural network, or a restricted Boltzmann machine, or may include different or overlapping neural network parts having full connections, convolutional connections, recurrent connections, and / or bidirectional connections, respectively. The neural network 100 maps input data and output data in a nonlinear relationship based on deep learning to perform, for example, object classification, object recognition, speech recognition, or image recognition. Deep learning is a machine learning solution for solving problems such as recognizing speech or images from a large data set. Through supervised learning or unsupervised learning in deep learning, input data and output data are mapped to each other.
[0044] In the following description, identification includes verification and recognition. Verification is the operation of determining whether input data is true or false, and recognition is the operation of determining which of multiple labels the input data indicates.
[0045] Reference Figure 1 , the neural network 100 includes an input layer 110, a hidden layer 120, and an output layer 130. Each of the input layer 110, the hidden layer 120, and the output layer 130 includes a plurality of artificial neurons. The artificial neurons may be referred to as "nodes."
[0046] For the convenience of description, Figure 1 As shown in FIG. 1 , the hidden layer 120 includes three layers, however, the example is not limited thereto, and the hidden layer 120 may include various numbers of layers. Figure 1 The illustrated neural network 100 includes a separate input layer for receiving input data, however, in other examples, the input data is directly input to the hidden layer 120. In the neural network 100, the artificial neurons of the layers other than the output layer 130 are connected to the artificial neurons of the next layer via links for transmitting output signals. The number of links between the current layer and the next layer is associated with the number of artificial neurons included in the current layer and the number of artificial neurons included in the next layer. For example, in one example, the number of links between the current layer and the next layer is less than or equal to the product of the number of artificial neurons included in the current layer and the number of artificial neurons included in the next layer. The links are called "synapses".
[0047] The output of the activation function associated with the weighted input of the artificial neuron in the previous layer included in the hidden layer 120 is input to each artificial neuron of the current layer included in the hidden layer 120. The weighted input is obtained by multiplying the synaptic weight by the input of the artificial neuron included in the previous layer. The synaptic weight is called a parameter of the neural network 100. For example, the activation function includes a sigmoid function, a hyperbolic tangent (tanh) function, or a rectified linear unit (ReLU) function. Nonlinearity is formed in the neural network 100 by the activation function. The weighted input of the artificial neuron in the previous layer included in the output layer 130 is input to each artificial neuron included in the output layer 130.
[0048] When input data is provided, the neural network 100 calculates a function value based on the number of multiple classes to be classified and identified in the output layer 130 via the hidden layer 120, and classifies and identifies the input data as a class with a maximum value among the multiple classes. The neural network 100 can classify or identify the input data, and for the convenience of description below, the classification and identification processing of the neural network 100 will be described as the identification processing. Without departing from the spirit of the present disclosure, the following description of the identification processing is also applicable to the classification processing.
[0049] When the width and depth of the neural network 100 are large enough, the neural network 100 has sufficient capability to implement any function. When the neural network 100 learns a sufficiently large amount of training data through a suitable learning process, the best recognition performance is achieved.
[0050] In the present disclosure, the image model has a machine learning structure trained to output a recognition result in response to an input of an input image. For example, the image model includes the above-mentioned neural network 100, however, the example is not limited thereto. The image model building device trains an extended image model. For example, the image model building technology is applied to the recognition of objects related to autonomous driving. The image model building device trains the image model based on an image output from a camera installed in a vehicle to effectively generate an image model that supports high-resolution images.
[0051] The image model building device is a device for building an image model. For example, the image model building device generates and trains a target image model based on a reference image model. The operation of building an image model includes the operation of generating and training an image model. The image recognition device recognizes an input image based on the built image model. For example, the image recognition device recognizes an object appearing in an input image based on the built target image model. However, the example is not limited to this, and the image model building device is integrated with the image recognition device.
[0052] Figure 2 An example of training a target image model based on a reference image model is shown.
[0053] The image model includes multiple layers. The connection relationship between the multiple layers changes according to the design. In the present disclosure, the reference image model 210 is the original image model that has completed training, and is designed to receive an image with a first resolution as input. The target image model 220 is a new image model to be trained, and is designed to receive an image with a second resolution as input. The second resolution is higher than the first resolution. The image model building device generates and trains the target image model 220 based on the reference image model 210.
[0054] The reference image model 210 and the target image model 220 include input layers 211 and 221, convolutional layers 212 and 222, customized parts 213 and 223, and classifiers 214 and 224, respectively.
[0055] The input layer 211 and the input layer 221 are layers configured to receive input images. The input layer 221 of the target image model 220 receives an image having a second resolution, and the input layer 211 of the reference image model 210 receives an image having a first resolution. Therefore, the target image model 220 is used to extract, recognize, and classify features of an image having a higher resolution than that of the reference image model 210.
[0056] Convolutional layers 212 and 222 extract feature data from an input image. Feature data is data obtained by abstracting an input image and is represented as, for example, a feature vector. When the number of convolutional layers 212 and 222 increases, the degree of abstraction also increases. For example, when the number of convolutional layers included in an image model increases, an image recognition device uses the image model to extract features of an input image with a higher resolution. However, when the number of convolutional layers 212 and 222 increases, the number of parameters that need to be trained also increases. When the number of parameters that need to be trained increases, during the training of the image model, the vanishing level of gradient information increases, thereby increasing the difficulty of training the image model. The image model construction device effectively trains the image model while expanding the convolutional layers 212 and 222.
[0057] Customized portion 213 and customized portion 223 are designed to solve a given problem. In one example, customized portion 213 and customized portion 223 are a region proposal network (RPN) in a faster region-based convolutional neural network (FR-CNN). In another example, customized portion 213 and customized portion 223 are adversarialspatial dropout networks (ASDN) in a generative adversarial network (GAN). However, in another example, customized portion 213 and customized portion 223 are omitted based on a given problem.
[0058] Classifier 214 and classifier 224 classify the class of input data. For example, classifier 214 and classifier 224 are networks for object recognition that classify the category of objects appearing in the input image. Classifier 214 and classifier 224 output information indicating the identity (ID) of the object. Classifier 214 and classifier 224 include a fully connected layer. However, when the ultimate purpose of the image model is to extract the features of the input image, classifier 214 and classifier 224 are removed from the image model.
[0059] Although Figure 2 Four layers (i.e., layers L1, L2, L3, and L4) are shown as convolution layers 212 of the reference image model 210, but the number of convolution layers 212 is not limited thereto. The convolution layers close to the input layer extract more detailed features of the input image. For example, the reference image model 210 is an image model trained based on training data including an image having a first resolution.
[0060] exist Figure 2 , the target image model 220 has a structure formed by extending the reference image model 210. For example, the convolution layer 222 of the target image model 220 further includes one additional layer (e.g., layer L0) compared to the convolution layer 212 of the reference image model 210, however, the number of additional layers is not limited thereto. An example of effectively training the target image model 220 including more parameters and a greater number of layers than those of the reference image model 210 will be described below.
[0061] The image model building device trains a target image model 220 for a high-resolution image based on a reference image model 210 trained based on a low-resolution image. For example, a camera sensor of an image recognition device (e.g., an autonomous driving vehicle) is changed to support a higher resolution than before. In this example, when the reference image model 210 is trained based on a low-resolution image, the performance (e.g., recognition rate) for a high-resolution image decreases.
[0062] The image model building device acquires new training data. For example, the new training data includes a high-resolution image. In operation 201, the image model building device generates a conversion image by converting a high-resolution image of the new training data (e.g., an image with a second resolution) into an image with a low resolution (e.g., a first resolution). The image model building device calculates an output from the conversion image based on a reference image model 210. The image model building device generates an output from an input image of the new training data based on a target image model 220. In operation 209, the image model building device calculates an error from an output based on the reference image model 210 and an output based on the target image model 220. The image model building device trains the target image model 220 based on the calculated error. An example of generating and training the target image model 220 will be further described below.
[0063] Figure 3 and Figure 4 is a flowchart illustrating an example of an image model building method.
[0064] Figure 3 An example of an image model construction method is shown.
[0065] Reference Figure 3 In operation 310, the image model construction device generates a target image model. The target image model includes layers identical to a plurality of layers of a reference image model and additional layers. In the present disclosure, in the target image model, the layers identical to the layers of the reference image model are layers other than the additional layers and are referred to as "remaining layers" in the present disclosure. The image model construction device generates the remaining layers of the target image model by copying the parameters and layer structure of the reference image model. The image model construction device connects the additional layers to the remaining layers. For example, the image model construction device connects the additional layers to the layers located on the input side among the plurality of layers copied from the reference image model (for example, Figure 2 The layer L1 of FIG. 1 is used to generate a target image model. However, the connection of the additional layer is not limited thereto.
[0066] For example, the target image model includes layers having the same parameters and the same structure as those of layers (e.g., convolutional layers) included in the reference image model. For example, a plurality of layers of the target image model copied from the reference image model are Figure 2 The target image model also includes additional layers connected to multiple layers copied from the reference image model. For example, the additional layers are Figure 2 Layer L0.
[0067] In operation 320, the image model building device trains additional layers of the target image model based on the reference image model. For example, the image model building device trains the additional layers of the target image model based on the output calculated from the training input based on the reference image model and the output calculated from the training input based on the target image model. The training input in image format is referred to as a training input image. The image model building device maintains parameters of the remaining layers of the target image model while training the additional layers.
[0068] Figure 4 Another example of the image model construction method is shown.
[0069] Reference Figure 4 In operation 410, the image model construction device generates and initializes a target image model. The image model construction device connects the additional layer to one layer (e.g., a layer on the input side) of the layers (e.g., the remaining layers) copied from the reference image model to generate the target image model. The image model construction device initializes the additional layer by assigning a random value to each node of the additional layer in the target image model. The image model construction device assigns the same value as that of each node in the reference image model to each node of the layer copied from the reference image model.
[0070] In the present disclosure, a layer on the input side is a layer in the hidden layer of any image model that is adjacent to the input layer. Figure 2 In the target image model 220, the layer on the input side is layer L1.
[0071] In operation 420, the image model construction apparatus trains a portion of the target image model, for example, the image model construction apparatus trains an additional layer of the target image model by updating parameters of the additional layer. The image model construction apparatus maintains parameters of the remaining layers of the target image model while updating the parameters of the additional layer.
[0072] In operation 430, the image model construction apparatus trains all parts of the target image model. For example, in response to completion of the training of the additional layer, the image model construction apparatus updates parameters of all layers in the target image model.
[0073] Therefore, the image model construction device first trains the additional layers to output results similar to those of the reference image model. The image model construction device secondly trains all the additional layers and the remaining layers to output results more accurate than those of the reference image model.
[0074] The order of operations performed by the image model building device is not limited to Figure 3 and Figure 4 The order of operations may be changed according to the design, or some operations may be omitted or added. In addition, the following will further describe Figure 4Each of operations 410 to 430.
[0075] Figure 5 An example of generating and initializing a target image model is shown.
[0076] Figure 5 Show Figure 4 An example of operation 410 of generating and initializing a target image model 520 in an image model building device.
[0077] The image model construction device generates an additional layer 521 and a remaining layer 522. The remaining layer 522 is a layer having the same layer structure as the layer structure of the plurality of layers 512 of the reference image model 510. For example, the remaining layer 522 has a structure such as a classifier structure and the convolutional layers L1, L2, L3, and L4 of the reference image model 510. The image model construction device connects the additional layer 521 to a portion of the remaining layer 522. For example, the image model construction device connects the additional layer 521 to a layer on the input side in the remaining layer 522. For example, the additional layer 521 is composed of Figure 5 However, the connection of the additional layer 521 is not limited thereto.
[0078] The image model building device generates an additional layer 521 configured to process data having a size greater than or equal to the size of data that can be processed by the reference image model. For example, the image model building device generates a target image model for receiving an image having a resolution higher than the input resolution of the reference image model. The image model building device generates an additional layer including nodes, wherein the number of nodes is greater than or equal to the number of nodes included in a layer of the reference image model (e.g., a layer on the output side in the reference image model) and less than or equal to the number of nodes included in the input layer of the target image model. Therefore, the image model building device uses the additional layer including the number of nodes greater than the number of nodes included in a layer of the reference image model to extract detailed feature information about the high-resolution image.
[0079] The image model building device initializes the generated target image model 520. For example, the image model building device sets the parameters of the target image model 520 to initial values. The image model building device determines the parameters of the pre-trained reference image model 510 as the initial parameters of the remaining layer 522. The image model building device performs random initialization of the additional layer 521. For example, the image model building device determines random values as initial parameters for the additional layer 521.
[0080] Therefore, the target image model 520 includes a randomly initialized additional layer 521 and a remaining layer 522 copied from the reference image model 510 .
[0081] Figure 6is a flowchart illustrating an example of training a target image model.
[0082] Figure 6 Show Figure 4 An example of operation 420 of a portion of training a target image model.
[0083] Reference Figure 6 In operation 621, the image model building device obtains a high-resolution training input image. For example, the image model building device obtains new training data with a high resolution (eg, a second resolution).
[0084] The new training data is data for training the target image model and includes, for example, a training input image having a second resolution. Compared with the original training data indicating the first resolution, the new training data indicates a high resolution. The new training data indicates the same object as the object included in the original training data, however, the example is not limited thereto. The new training data is data acquired regardless of the original training data. For example, the new training data also includes a label mapped to the training input image having the second resolution, however, the example is not limited thereto.
[0085] In operation 622, the image model building device calculates the output of the target image model. For example, the image model building device calculates the target model output from the training input having the second resolution based on the target image model. When the target image model is implemented as a neural network, the image model building device calculates the output of the target image model by forward propagating the training input from an input layer to an output layer of the target image model.
[0086] In operation 623, the image model building device converts the training input image based on the input layer of the reference image model. The image model building device generates a converted image by converting the training input based on the input layer of the reference image model. For example, the image model building device recognizes the resolution that can be input to the reference image model based on the input layer of the reference image model, and converts the training input image to an image with the recognized resolution. The image model building device converts the training input image with the second resolution into an image with the first resolution supported by the reference image model.
[0087] The image model building device converts the image format of the training input image into an image format corresponding to the first resolution. For example, the image model building device changes the size of the training input image, or downsamples the pixels included in the training input image to convert the image format of the training input image. The converted image is an image having an image format into which the image format of the training input image is converted.
[0088] In operation 624, the image model building device calculates the output of the reference image model. The image model building device calculates the reference model output based on the input (e.g., the transformed image) to which the reference image model is transformed from the training input. For example, the image model building device calculates the reference model output by forward propagating the transformed image from the input layer to the output layer of the reference image model.
[0089] In operation 625, the image model building device calculates an error based on the output of the target image model and the output of the reference image model. The image model building device trains the target image model based on the reference model output. The image model building device calculates an error based on the reference model output and the target model output. For example, the image model building device calculates a loss function for training the target image model based on at least one of the reference model output and the target model output. The loss function is a function indicating the difference between the reference model output and the target model output. For example, the loss function includes a softmax loss function or a cross-entropy loss function, however, the loss function is not limited to this. For example, when the training data includes pairs of training input images and training labels, the loss function can be a function indicating the difference between the target model output and the training label.
[0090] In operation 626, the image model construction apparatus updates parameters of the additional layer of the target image model based on the calculated error. The image model construction apparatus trains the target image model based on a reference model output and a target model output based on the reference image model and the target image model, respectively.
[0091] The image model building device updates the parameters of at least some layers of the target image model based on the calculated error. For example, the image model building device uses a gradient-based back-propagation scheme to update the parameters of the additional layers of the target image model. In this example, the image model building device maintains the parameters of the remaining layers of the target image model while updating the parameters of the additional layers.
[0092] In operation 627, the image model building device determines whether the error has converged. The image model building device repeatedly updates the parameters until the error between the reference model output and the target model output converges. In one example, when the parameters of the additional layer are updated in the target image model, and when the change in the error between the reference model output and the target model output is less than or equal to a threshold, the image model building device determines that the error has converged. In another example, when the difference between the parameters before and after the update is less than or equal to a threshold, the image model building device determines that the error has converged. In response to determining that the error does not converge, the image model building device returns to operation 621 and updates the parameters based on the new training input.
[0093] Therefore, the image model construction device minimizes the error based on the reference image model and the target image model by repeatedly updating the parameters of the additional layer.
[0094] The image model building device minimizes the time used to train the target image model by limiting the target having the parameters to be updated to the additional layer. The image model building device trains the target image model to have recognition performance similar to that of the reference image model by minimizing the error between the reference model output and the target model output. Because the target for training is limited to the additional layer, the image model building device trains the target image model while robustly maintaining the recognition performance for the low-resolution image acquired from the reference image model.
[0095] Figure 7 Shows an example of calculating the error during training.
[0096] exist Figure 6 In operation 625, an error is calculated based on the output of the target image model and the output of the reference image model, however, the example is not limited thereto. For example, the image model building device trains the additional layer 721 based on feature data output from at least part of the layers of the reference image model 710 and feature data output from at least part of the layers of the target image model 720 (e.g., layers corresponding to at least part of the layers of the reference image model 710). In operation 701, a conversion image input to the reference image model 710 is generated by converting the training input.
[0097] Reference Figure 7 In operation 709, the image model construction device calculates an error based on the feature data of the reference image model 710 and the feature data of the target image model 720. For example, the image model construction device calculates the error using an automatic encoding scheme. The image model construction device calculates the error based on the feature data output from each layer of the reference image model 710 and the feature data output from the layer of the target image model 720 corresponding to each layer of the reference image model 710. For example, the image model construction device calculates the error based on the difference between the features of layer L1 in the reference image model 710 and layer L1 of the target image model 720, the difference between the features of layer L2 in the reference image model 710 and layer L2 of the target image model 720, the difference between the features of layer L3 in the reference image model 710 and layer L3 of the target image model 720, and the difference between the features of layer L4 in the reference image model 710 and layer L4 of the target image model 720. Layers L1, L2, L3, and L4 are included in the reference image model 710 and the target image model 720.
[0098] The image model construction apparatus updates parameters of the additional layer 721 (ie, layer L0 ) based on differences between features of the plurality of layers 712 of the reference image model 710 and features of the remaining layers 722 of the target image model 720 .
[0099] Figure 8 An example of training all parts of the target image model is shown.
[0100] Figure 8 Show Figure 4 An example of operation 430 of training all parts of the target image model. In response to completion of the training of the additional layer, the image model construction apparatus updates parameters of all layers in the target image model.
[0101] Reference Figure 8 In operation 831, the image model building device obtains a high-resolution input image. For example, the image model building device obtains a new input image. The new input image corresponds to Figure 6 The new input image is a training input image acquired in operation 621, however, the example is not limited thereto. For example, the new input image is an image acquired separately from the training input image. For example, when the image model building device is included in an autonomous driving vehicle, the new input image is an image acquired during driving of the autonomous driving vehicle.
[0102] In operation 832, the image model building apparatus determines a label of the high-resolution input image. The image model building apparatus determines a label of a new input image having a second resolution.
[0103] In one example, when the target image model is a model for a classification task, the image model building device generates ground truth label information for a new input image with a second resolution. In another example, when the target image model is a model for detecting the size and position of an object in an image, the image model building device generates label information indicating the size and position of the object in the new input image. In addition, the image model building device uses label information manually input by a user (e.g., an expert).
[0104] In addition, the image model building device determines a label of the new input image based on a user input associated with the acquisition of the new input image. For example, when the image model building device is installed in an autonomous driving vehicle, and when the driver finds an obstacle, the driver operates the brake pads. The image model building device generates label information associated with the new input image and indicating that the detected object is true, wherein the new input image is acquired at the time point of acquiring the user input (e.g., the user operation of the brake pads). However, this is only an example, and the automatic generation of label information based on the user input may be changed according to the design.
[0105] However, when the target image model is designed for an unsupervised image domain conversion task, operation 832 is not performed.
[0106] In operation 833, the image model building device updates all parameters of the target image model. For example, the image model building device additionally trains the target image model based on the new input image and label. When the training of the additional layer is completed, the image model building device updates all parameters of the target image model to fine-tune the parameters of the target image model. The image model building device calculates output from the training input image with the second resolution acquired in operations 831 and 832 based on the training image model. The image model building device calculates an error based on the calculated output and label information, and uses the calculated error to update the parameters of all layers in the target image model based on a back-propagation scheme.
[0107] In operation 834, the image model building device determines whether the error converges. The image model building device repeatedly trains all layers of the target image model until the error converges. In one example, when the error converges, the image model building device terminates training the target image model. In another example, when the error does not converge, the image model building device returns to operation 831 and repeats training all parts of the target image model.
[0108] Therefore, the image model building device uses the pre-trained reference image model based on a relatively low amount of training data to effectively and robustly train the target image model. In addition, the image model building device minimizes the computational cost and time cost for training the target image model.
[0109] Fig. 9 An example of growing the target image model is shown.
[0110] Image model building equipment by reference Figures 1 to 8 For example, when the training of the target image model 920 is completed, the image model building device generates an additional image model 930 having an additional layer L0 ′ connected to the target image model 920 .
[0111] The image model construction apparatus generates a target image model 920 by connecting the additional layer L0 to multiple layers (e.g., layers L1 to L4) of the reference image model 910. The image model construction apparatus generates an additional image model 930 by connecting the additional layer L0' to multiple layers (e.g., additional layer L0 and layers L1 to L4) of the target image model 920.
[0112] The image model building device trains the additional layer L0' of the additional image model 930 based on the output of the target image model 920. The additional image model 930 is trained similarly to the training of the target image model 920. For example, the image model building device obtains a training input image with a third resolution, inputs the training input image to the additional image model 930, and calculates a third temporary output. The image model building device converts the training input image with the third resolution into an image with a second resolution, inputs the image with the second resolution to the target image model 920, and calculates a second temporary output. The image model building device converts the image with the second resolution into an image with a first resolution, inputs the image with the first resolution to the reference image model 910, and calculates a first temporary output. In operation 909, the image model building device calculates an error based on any one or any combination of the first temporary output, the second temporary output, and the third temporary output. The image model building device updates the parameters of the additional layer L0' of the additional image model 930 based on the calculated error. The second resolution is higher than the first resolution, and the third resolution is higher than the second resolution.
[0113] The image model building device extends the image model as described above, and thus, even if the performance of the camera sensor changes, the image model can be quickly and efficiently generated and trained for the resolution supported by the camera sensor.
[0114] The trained target image model is installed in the image recognition device. The image recognition device acquires an input image and generates a recognition result from the acquired input image based on the target image model. For example, the image recognition device extracts feature data from the input image based on the target image model, or determines a label indicated by the input image. The image recognition device recognizes an object appearing in the input image based on the target image model. When the image recognition device is installed in a vehicle, the image recognition device recognizes an obstacle appearing in an output image.
[0115] Fig.10 and Fig.11 is a block diagram showing an example of the configuration of an image model construction device.
[0116] Fig.10 An example of a configuration of an image model construction apparatus 1000 is shown. The image model construction apparatus 1000 includes a processor 1010 and a memory 1020 .
[0117] The processor 1010 generates a target image model including layers identical to the plurality of layers of the reference image model and additional layers. In addition, the processor 1010 trains the additional layers of the target image model based on the reference image model. However, the operation of the processor 1010 is not limited thereto, and the processor 1010 performs the above reference Figures 1 to 9 At least part of the operations described.
[0118] The memory 1020 stores the trained target image model. In addition, the memory 1020 stores the reference image model and / or the additional image model.
[0119] Fig.11 An example of a configuration of an image model construction device 1100 configured to perform active learning is shown. The image model construction device 1100 includes a processor 1110, a memory 1120, and an image acquirer 1130.
[0120] Processor 1110 executes Fig.10 In response to the new input image being acquired by the image acquirer 1130, the processor 1110 generates and trains the target image model 1122 based on the new input image. For example, the processor 1110 generates label information associated with the new input image acquired by the image acquirer 1130, and trains the target image model 1122 based on the new input image and the generated label information. However, the operation of the processor 1110 is not limited thereto, and the processor 1110 performs the above-mentioned reference Figures 1 to 9 At least part of the operations described.
[0121] The memory 1120 temporarily or permanently stores data for training the target image model 1122. For example, the memory 1120 stores the reference image model 1121, the target image model 1122, and the training data 1123. In one example, in response to the completion of the training of the target image model 1122, the memory 1120 deletes the reference image model 1121. The training data 1123 includes a pre-acquired training input image. The training data 1123 also includes a new input image acquired by the image acquirer 1130.
[0122] The image acquirer 1130 acquires an image for training the target image model 1122. For example, the image acquirer 1130 includes a camera sensor configured to capture an external image of a device (e.g., an autonomous driving vehicle). The image acquirer 1130 acquires an external image in response to a request from the processor 1110 (e.g., in response to receiving a user input). However, the example is not limited thereto, and the image acquirer 1130 acquires an image periodically or continuously. In addition, the image acquirer 1130 acquires an input image for training by communicating (e.g., wireless communication or wired communication) with an external device (e.g., an arbitrary server).
[0123] Image model construction device 1000, image model construction device 1100 and Fig.10 and Fig.11Other devices, units, modules, devices and other components described are implemented by hardware components. Examples of hardware components that can be used to perform the operations described in this application include: controllers, sensors, generators, drivers, memories, comparators, arithmetic logic units, adders, subtractors, multipliers, dividers, integrators, and any other electronic components configured to perform the operations described in this application. In other examples, one or more hardware components that perform the operations described in this application are implemented by computing hardware (e.g., by one or more processors or computers). A processor or computer may be implemented by one or more processing elements (such as logic gate arrays, controllers and arithmetic logic units, digital signal processors, microcomputers, programmable logic controllers, field programmable gate arrays, programmable logic arrays, microprocessors, or any other devices or combinations of devices configured to respond and execute instructions in a limited manner to obtain desired results). In one example, a processor or computer includes or is connected to one or more memories storing instructions or software executed by a processor or computer. The hardware components implemented by a processor or computer may execute instructions or software (such as an operating system (OS) and one or more software applications running on the OS) to perform the operations described in this application. Hardware components can also access, operate, process, create and store data in response to the execution of instructions or software. For simplicity, the singular term "processor" or "computer" can be used in the description of the examples described in this application, but in other examples, multiple processors or computers can be used, or a processor or computer can include multiple processing elements or multiple types of processing elements or both. For example, a single hardware component or two or more hardware components can be implemented by a single processor, or two or more processors, or a processor and a controller. One or more hardware components can be implemented by one or more processors, or a processor or a controller, and one or more other hardware components can be implemented by one or more other processors, or another processor and another controller. One or more processors, or a processor and a controller can implement a single hardware component, or two or more hardware components. Hardware components can have any one or more different processing configurations, wherein the examples of one or more different processing configurations include: single processor, independent processor, parallel processor, single instruction single data (SISD) multiprocessing, single instruction multiple data (SIMD) multiprocessing, multiple instruction single data (MISD) multiprocessing, multiple instruction multiple data (MIMD) multiprocessing.
[0124] Figure 3 , Figure 4 , Figure 6 and Figure 8The method for performing the operations described in the present application shown in the is performed by computing hardware (e.g., by one or more processors or computers), wherein the computing hardware is implemented to execute instructions or software as described above to perform the operations described in the present application performed by the method. For example, a single operation or two or more operations may be performed by a single processor, or two or more processors, or a processor and a controller. One or more operations may be performed by one or more processors or a processor and a controller, and one or more other operations may be performed by one or more other processors or another processor and another controller. One or more processors or a processor and a controller may perform a single operation or two or more operations.
[0125] The instructions or software for controlling a processor or computer to implement a hardware component and perform the method as described above are written as a computer program, a code segment, an instruction, or a combination thereof, to individually or collectively instruct or configure a processor or computer to operate as a machine or a special-purpose computer to perform the operations performed by the hardware component and the method as described above. In one example, the instructions or software include machine code (such as machine code generated by a compiler) directly executed by a processor or computer. In another example, the instructions or software include high-level code executed by a processor or computer using an interpreter. A programmer of ordinary skill in the art can easily write instructions or software based on the block diagrams and flow charts shown in the accompanying drawings and the corresponding descriptions in the specification, wherein the block diagrams and flow charts shown in the accompanying drawings and the corresponding descriptions in the specification disclose algorithms for performing the operations performed by the hardware component and the method as described above.
[0126] The instructions or software for controlling the processor or computer-implemented hardware components and performing the methods described above, as well as any associated data, data files, and data structures, are recorded, stored, or fixed in or on one or more non-transitory computer-readable storage media. Examples of non-transitory computer-readable storage media include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card-type storage (e.g., multimedia card or micro card (e.g., Secure Digital (SD) or Extreme Digital (XD))), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, and any other device, wherein any other device is configured to store instructions or software and any associated data, data files and data structures in a non-temporary manner, and provide instructions or software and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the instructions.
[0127] Although the present disclosure includes specific examples, it will be clear to those of ordinary skill in the art that various changes in form and detail can be made in these examples without departing from the spirit and scope of the claims and their equivalents. The examples described herein will be considered to be descriptive only and not for limiting purposes. The description of the features or aspects in each example will be considered to apply to similar features or aspects in other examples. If the described techniques are performed in a different order, and / or if the components in the described systems, architectures, devices, or circuits are combined in different ways, and / or replaced or supplemented by other components or their equivalents, suitable results can be achieved. Therefore, the scope of the present disclosure is not limited by specific embodiments, but by the claims and their equivalents, and all changes within the scope of the claims and their equivalents will be interpreted as included in the present disclosure.
Claims
1. A method for constructing an image model for identifying an object from an image, the method include: generating a target image model, wherein the target image model comprises an additional layer and a plurality of remaining layers that are the same as the layers of a reference image model, wherein the reference image model is an original image model that has completed training and is configured to receive an image having a first resolution as an input, and the target image model is a new image model to be trained and is configured to receive an image having a second resolution higher than the first resolution as an input; training an additional layer of a target image model based on the reference image model to obtain a trained target image model as an image model for recognizing an object from an image, The step of generating the target image model includes: generating the target image model by connecting the additional layer to the layer located on the input side among the remaining layers, The steps of training the additional layer include: Based on the target image model, computing a target model output of the target image model from the training input having the second resolution and / or feature data output from at least a portion of the layers of the target image model; Based on the reference image model, calculating a reference model output of the reference image model and / or feature data output from at least part of the layers of the reference image model from a converted image having a first resolution into which the training input is converted; Calculating an error based on a reference model output of a reference image model and a target model output of a target image model and / or based on feature data output from at least a portion of a layer of the reference image model and feature data output from at least a portion of a layer of the target image model, wherein the calculated error comprises a first error between the reference model output and the target model output and / or a second error between feature data output from said at least a portion of a layer of the reference image model and feature data output from said at least a portion of a layer of the target image model; updating parameters of at least some of the remaining layers and the additional layers in the target image model based on the calculated error; The step of updating the parameters includes: repeatedly updating the parameters until the error converges.
2. The method according to claim 1, in, The step of generating the target image model includes initializing the additional layer by assigning a random value to each node of the additional layer in the target image model.
3. The method according to claim 1, in, The transformed image is generated by transforming the training input based on the input layer of the reference image model.
4. The method according to claim 1, in, The step of updating the parameters includes: updating the parameters of the additional layer.
5. The method according to claim 1, in, The step of updating the parameters includes updating the parameters of the additional layer while maintaining the parameters of the remaining layers in the target image model.
6. The method according to claim 1, in, The steps to generate the target image model include: generating the remaining layers of the target image model by copying the parameters and layer structure of the reference image model; Connect additional layers to the remaining layers.
7. The method according to claim 1, further comprising: include: In response to completion of the training of the additional layer, parameters of all remaining layers and the additional layer in the target image model are updated.
8. The method according to claim 1, in, The step of generating a target image model includes: generating an additional layer including nodes, wherein the number of nodes in the additional layer is greater than or equal to the number of nodes included in one layer among the multiple layers of the reference image model, and less than or equal to the number of nodes included in the input layer of the target image model.
9. The method according to claim 1, further comprising: include: Get a new input image; Determine the label of the new input image; A target image model is additionally trained based on new input images and labels.
10. The method according to claim 9, in, The step of determining the label includes determining the label based on user input associated with the acquisition of the new input image.
11. The method according to claim 1, further comprising: include: In response to completion of the training of the target image model, generating an additional image model including an additional layer connected to the target image model; Additional layers of the additional image model are trained based on the output of the target image model.
12. The method according to claim 1, in, The step of generating a target image model includes generating a target image model for receiving an image having a higher resolution than an input resolution of the reference image model.
13. A non-transitory computer-readable storage medium storing instructions, which, when executed by a processor, cause the processor to perform the method of claim 1.
14. A device for constructing an image model, the device include: A processor configured to: generate a target image model including an additional layer and remaining layers that are the same as the plurality of layers of a reference image model, and train the additional layers of the target image model based on the reference image model to obtain a trained target image model as a constructed image model, wherein the reference image model is an original image model that has completed training and is configured to receive an image with a first resolution as input, and the target image model is a new image model to be trained and is configured to receive an image with a second resolution higher than the first resolution as input; A memory, configured to: store a trained target image model, The processor is configured to generate a target image model by connecting the additional layer to the layer located on the input side among the remaining layers, The processor is configured as follows: Based on the target image model, computing a target model output of the target image model from the training input having the second resolution and / or feature data output from at least a portion of the layers of the target image model; Based on the reference image model, calculating a reference model output of the reference image model and / or feature data output from at least part of the layers of the reference image model from a converted image having a first resolution into which the training input is converted; Calculating an error based on a reference model output of a reference image model and a target model output of a target image model and / or based on feature data output from at least a portion of a layer of the reference image model and feature data output from at least a portion of a layer of the target image model, wherein the calculated error comprises a first error between the reference model output and the target model output and / or a second error between feature data output from said at least a portion of a layer of the reference image model and feature data output from said at least a portion of a layer of the target image model; updating parameters of at least some of the remaining layers and the additional layers in the target image model based on the calculated error; The processor is configured to: repeatedly update the parameters until the error converges.
