A method for identifying military warehouse item categories based on output layer re-expression
By adding an output result re-expression layer to the output layer of the Googlenet network model and retraining the output results, the problem of identifying a large number of categories of items in large military warehouses was solved, and lightweight recognition and multi-warehouse result sharing were achieved.
Patent Information
- Application Number
- CN202310905998.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-07-24
AI Technical Summary
Existing technologies make it difficult to accurately identify a wide range of items in large military warehouses. This is limited by the size of the recognition network model and computer hardware equipment. In addition, the types of items in different warehouses vary, making it difficult to effectively integrate network models trained in multiple warehouses.
The output layer re-expression method of the Googlenet network model is adopted. By adding an output result re-expression layer after the output layer, the output results of the Googlenet network model are retrained to build a lightweight recognition model to realize the recognition of super-large categories of objects.
Without increasing the number of model parameters, the requirements for computing power and GPU are reduced. It can effectively identify items in a large category with a small number of training samples and supports the sharing of training results among multiple warehouses.
Smart Images

Figure CN116844031B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a method for identifying categories of military warehouse items based on output layer re-expression. Background Art
[0002] Image recognition-based inventory management is becoming increasingly mainstream in military warehouses. However, large military warehouses contain a wide variety of equipment and equipment, and commonly used recognition methods are often limited by the size of recognition networks and computer hardware, making it difficult to accurately identify a wide range of item categories. Existing methods require building a large network structure and a sufficient number of image samples for each category, which is difficult to achieve in large military warehouses due to hardware and personnel limitations. Furthermore, the variety of items in different warehouses makes it difficult to effectively integrate multiple network models trained across multiple warehouses. Therefore, a lightweight and easily shareable method for identifying items in military warehouses with a large number of categories has become an urgent need. Summary of the Invention
[0003] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a method for identifying a large number of categories of items in military warehouses based on the re-expression of the output layer of the Googlenet network model, which includes four parts: inputting a pre-processed image I, the output coefficient vector X of the Googlenet network output layer, re-expressing the output result, and outputting the recognition result Y. The main idea of this method is to add an output result re-expression layer after the output layer of the Googlenet network model. The output result re-expression layer further expands the output results of the Googlenet network model to achieve the recognition of a large number of categories of items. The Googlenet network model can use a publicly trained network model and does not need to be trained on stored items, thus saving a lot of training time.
[0004] The present invention provides a method for identifying the category of military warehouse items based on output layer re-expression, comprising:
[0005] Obtain the original image of the object to be identified;
[0006] Preprocessing the original image to obtain an input image;
[0007] Obtain a publicly trained Googlenet network model, input the input image into the Googlenet network model, and obtain an output layer coefficient vector;
[0008] Constructing an output result re-expression layer, and inputting the output layer coefficient vector into the output result re-expression layer for training to obtain a trained output result re-expression layer;
[0009] The object category recognition result is obtained by re-expressing the layer based on the trained output result.
[0010] Optionally, the process of inputting the output layer coefficient vector into the output result re-expression layer for training includes:
[0011] Inputting the output layer coefficient vector into the output result re-expression layer to obtain a plurality of neuron outputs; wherein the output result re-expression layer includes a plurality of neurons, one neuron corresponding to one type of object to be identified;
[0012] Fusing the outputs of several neurons to obtain a prediction result;
[0013] Calculating an error based on the predicted result and the actual result;
[0014] The weights and biases are updated based on the error to obtain a trained output result re-expression layer.
[0015] Optionally, the output result re-expression layer and the output layer of the Googlenet network model are fully connected.
[0016] Optionally, the propagation calculation formula of the neuron output is as follows:
[0017] Z j =X1*w j1+ X2*w j2 +… + +X 1000 *w j1000 +b j
[0018] Where Z j is the output of the jth neuron, X i is the i-th element in the vector X, X is the output layer coefficient vector, X is a 1*1000 vector, w ji is the i-th weight in the j-th neuron, b j is the bias of the j-th neuron, j∈[1,N], i∈[1,1000].
[0019] Optionally, updating weights and biases using a gradient descent method based on the error;
[0020] The error is calculated based on the mean square error, and the calculation formula is as follows:
[0021] E=(YY*) 2 / 2
[0022] The calculation formula for updating weights is as follows:
[0023]
[0024] The calculation formula for updating the bias is as follows:
[0025]
[0026] In the formula, Y is the true value, Y* is the predicted result output during training, and w ji ′ represents the updated weight, b j ′ represents the updated bias, and η represents the step size.
[0027] Optionally, the calculation formula for outputting the item type recognition result is as follows:
[0028]
[0029] Where Y j is the jth element in the output result Y. When Y j When the maximum value is j Indicates the result of item type recognition.
[0030] The present invention has the following technical effects:
[0031] The present invention provides a method for identifying the categories of military warehouse items based on output layer re-expression. This method narrows the scope to a limited range of about 100 categories through preliminary screening. Without increasing the number of model parameters, it can identify warehouse items of a very large number of categories, reducing the requirements for computing power and GPU.
[0032] The present invention provides a method for identifying the categories of military warehouse items based on output layer re-expression. The method uses a network model to extract features, and the feature re-expression reduces the demand for the number of samples of each warehouse item, and can effectively identify items based on a small number of training samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 This is a flow chart of a method for identifying the category of items in a military warehouse based on output layer re-expression in an embodiment of the present invention;
[0035] Figure 2 This is a flow chart for re-expressing the output results provided in an embodiment of the present invention;
[0036] Figure 3 Flowchart of the training process of output result re-expression layer B in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0038] Example 1
[0039] like Figure 1 As shown, this embodiment discloses a method for identifying the category of military warehouse items based on output layer re-expression, which includes four parts: inputting a preprocessed image I, output coefficient vector X of the Googlenet network output layer, output result re-expression, and outputting a recognition result Y.
[0040] First, the preprocessed image I is input, which is the image of the object to be identified scaled to 224*224 pixels, which is consistent with the size of the Googlenet input image, to obtain the input image I.
[0041] Next, the GoogleNet network output layer outputs a coefficient vector X. This is obtained by feeding the input image I into the GoogleNet network model. X is a 1*1000 vector. The GoogleNet network model uses a publicly available trained network model. The default public GoogleNet network model can recognize a maximum of 1000 items, so the output layer is a 1*1000 vector.
[0042] Then, the output result is expressed again by adding a layer of network after the output layer A of the Googlenet network model for re-expression. This layer is called the output result re-expression layer B, such as Figure 2 As shown in the figure, the recognition results are re-expressed by training the output result re-expression layer B. The output result re-expression layer B can be trained independently or by fusing the training results of multiple warehouses.
[0043] Furthermore, the output layer A of the Googlenet network model and the output result re-expression layer B are fully connected.
[0044] Furthermore, the number of neurons N in the output result re-expression layer B is equal to the number of items to be identified in the military warehouse, with a one-to-one correspondence between neurons and item types. Furthermore, as the number of items to be identified increases during use, the number of neurons in the output result re-expression layer B increases dynamically.
[0045] Furthermore, the output result is expressed in the neuron propagation calculation method of layer B as follows: j=X1*w j1+ X2*w j2 +… + +X 1000 *w j1000 +b j , where Z j is the output of the jth neuron, X i is the i-th element in vector X, w ji is the i-th weight in the j-th neuron, b j is the bias of the jth neuron, j∈[1,N], i∈[1,1000]
[0046] Furthermore, the training method of the output expression layer B is to update the weight w using the idea of gradient descent method. ji and bias b j , the process is as follows Figure 3 It is characterized by including the output result, re-expression layer prediction result, calculation error E, and update weight w ji and bias b j .
[0047] Further, update the weight w ji and bias b j The calculation method can be based on the formula Calculated. η is the step size, which can be set based on experience, with a default value of 0.5.
[0048] Furthermore, the error E is calculated using the mean square error, that is, E = (YY*)2 / 2, where Y is the true value and Y* is the predicted result output during the training process.
[0049] Furthermore, when updating the weight w ji and bias b j During the process, when the number of iterations is large enough or the error E is less than a certain value T, the iteration is stopped, that is, the update of the weight w is finished. ji and bias b j The number of iterations and T are set based on experience.
[0050] Furthermore, to fuse the training results from multiple warehouses, we simply merge the neurons in the output re-expression layer B, taking the union of the item types and fusing them to form the final output re-expression layer. This approach is also a way to share training results.
[0051] Finally, the output recognition result Y is obtained by calculating the output result through the Sigmoid function of the neurons in the expression layer B, that is, Among them, Y j is the jth element in the output result Y. Further, the maximum value Y in the final identification result Y is jis the recognition result, j∈[1,N].
[0052] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the foregoing embodiments. The foregoing embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for identifying the category of military warehouse items based on output layer re-expression, characterized in that: include: Obtain the original image of the object to be identified; Preprocessing the original image to obtain an input image; Obtain a publicly trained Googlenet network model, input the input image into the Googlenet network model, and obtain an output layer coefficient vector; Constructing an output result re-expression layer, and inputting the output layer coefficient vector into the output result re-expression layer for training to obtain a trained output result re-expression layer; The process of inputting the output layer coefficient vector into the output result re-expression layer for training includes: inputting the output layer coefficient vector into the output result re-expression layer to obtain a plurality of neuron outputs; wherein the output result re-expression layer includes a plurality of neurons, one neuron corresponding to a type of object to be identified; fusing the plurality of neuron outputs to obtain a prediction result; calculating an error based on the prediction result and an actual result; and updating weights and biases based on the error to obtain a trained output result re-expression layer; The output result re-expression layer and the output layer of the Googlenet network model are in a fully connected relationship; The propagation calculation formula of the neuron output is as follows: Z j =X1*w j1+ X2* w j2 +. + +X 1000 *w j1000 +b j Where Z j is the output of the jth neuron, X i is the i-th element in the vector X, X is the output layer coefficient vector, X is a 1*1000 vector, w ji is the i-th weight in the j-th neuron, b j is the bias of the jth neuron, , ; The object category recognition result is obtained by re-expressing the layer based on the trained output result.
2. The method for identifying the category of military warehouse items based on output layer re-expression according to claim 1 is characterized in that: updating weights and biases using a gradient descent method based on the error; The error is calculated based on the mean square error, and the calculation formula is as follows: E=(YY*) 2 / 2 The calculation formula for updating weights is as follows: The calculation formula for updating the bias is as follows: In the formula, Y is the true value, Y* is the predicted result output during the training process, represents the updated weight, represents the updated bias, Indicates the step size.
3. The method for identifying the category of military warehouse items based on output layer re-expression according to claim 2 is characterized in that: The calculation formula for outputting the item type recognition result is as follows: Where Y j is the jth element in the output result Y. When Y j When the maximum value is j Indicates the result of item type recognition.
Citation Information
Patent Citations
Vegetable image classification identification method and system
CN108491765A
Medical analysis system
US20200405148A1