Method, system, device and medium for rapid identification of multi-category complex aliased targets
By constructing sample data sets and combining ResNet-50 convolutional neural network and improved methods of human-like attention mechanism, the problems of high recognition error rate and lighting changes in multi-category spare parts recognition are solved, and faster and more accurate target object recognition is achieved, improving the recognition efficiency of industrial robots.
Patent Information
- Application Number
- CN202210562668.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-05-23
AI Technical Summary
The existing visual detection algorithms have high recognition error rates when dealing with multi-category spare parts recognition and position estimation tasks, difficulty in adapting to light changes and target objects occlusion, and difficult to meet real-time detection requirements, resulting in low recognition efficiency at the assembly and processing site of industrial robots.
The sample data set is constructed and data is collected through visual sensors, combined with the human-like attention mechanism of the ResNet-50 convolutional neural network, the ECA-Net module and the ISAB module, feature extraction and non-maximum suppression are performed, and the target model is generated to output the recognition results.
It improves the accuracy and speed of identification of multi-category aliased targets, and improves the recognition efficiency of industrial robots, especially in unmanned factories and autonomously assembled robots.
Smart Images

Figure CN115049911B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent recognition technology, and in particular to a method for quickly recognizing multi-category complex aliasing targets, a system for quickly recognizing multi-category complex aliasing targets, a computer device, and a computer-readable storage medium. Background Art
[0002] Existing industrial robot assembly and processing sites generally have problems such as complex lighting conditions and mixed stacking of multiple categories of spare parts. These problems bring many difficulties to existing machine vision inspection algorithms when handling multi-category spare parts identification and pose estimation tasks, and restrict the promotion and application of automated sorting equipment such as industrial robots in the assembly parts sorting and loading links.
[0003] In actual industrial environments, when multiple different types of targets are placed together, the outlines of individual targets are obscured by other targets, resulting in a high error rate in existing visual detection algorithms when identifying partially obscured targets. In addition, when dealing with the classification and identification of multiple categories of targets with large size differences or the identification of small targets in large scenes, existing target recognition methods may be unable to identify small-sized targets. In addition, existing visual detection algorithms are difficult to meet the requirements of real-time detection. They can meet the detection accuracy but cannot meet the detection timeliness, and vice versa. Furthermore, existing visual detection algorithms are difficult to adapt to problems such as changes in target color characteristics, reflections, and blurred outlines caused by changes in light intensity.
[0004] The shortcomings of the existing visual detection algorithms listed above are all due to defects in feature extraction, excessive redundant features extracted by the feature extraction network, and excessively large models, resulting in poor algorithm robustness and practicality. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method for quickly identifying multi-category complex aliased targets, a system for quickly identifying multi-category complex aliased targets, a computer device and a computer-readable storage medium, which can quickly and accurately identify aliased targets in industrial scenarios.
[0006] In order to solve the above technical problems, the present invention provides a method for rapid recognition of multi-category complex aliasing targets, including: constructing a sample data set, wherein the sample data set includes a training data set and a test data set; constructing a baseline model, wherein the baseline model includes a feature extraction network, a human-like attention mechanism module, an additional feature extraction network and a non-maximum suppression module, wherein the human-like attention mechanism module includes an ECA-Net module and an ISAB module, and the ISAB module is a SAM spatial attention mechanism with weighted screening features; training the baseline model with the training data set to generate a target model; and inputting the target object data set into the target model to output a recognition result.
[0007] As an improvement to the above scheme, the steps of constructing the feature extraction network include: constructing a ResNet-50 convolutional neural network; adjusting the step size of the convolutional layer in the ResNet-50 convolutional neural network according to the characteristics of the target object, so that the ResNet-50 convolutional neural network outputs initial features of the target size, and the target size matches the characteristics of the target object; and using the adjusted ResNet-50 convolutional neural network as the feature extraction network.
[0008] As an improvement to the above solution, the step size of the fourth convolutional layer in the ResNet-50 convolutional neural network is adjusted according to the target object features so that the ResNet-50 convolutional neural network outputs initial features with a target size of 38×38×1024.
[0009] As an improvement of the above scheme, the steps of constructing the ISAB module include: constructing a SAM spatial attention mechanism; adding a weight screening feature to the SAM spatial attention mechanism; and using the SAM spatial attention mechanism after adding the weight screening feature as an ISAB module.
[0010] As an improvement of the above scheme, the step of adding weight screening features in the SAM spatial attention mechanism includes: extracting two baseline features in the SAM spatial attention machine; transposing the two baseline features respectively to generate two weight screening features; and adding the two weight screening features to the SAM spatial attention machine.
[0011] As an improvement to the above solution, the method for rapidly identifying multi-category complex aliased targets further includes: storing the recognition result in text form; generating a recognition box corresponding to the recognition result through a drawing function, and displaying the recognition box.
[0012] As an improvement to the above scheme, the step of constructing a sample data set includes: collecting a sample set through a visual sensor; performing data enhancement processing on the sample set; and labeling the enhanced sample set to construct a training data set and a test data set.
[0013] Accordingly, the present invention also provides a multi-category complex aliasing target rapid recognition system, including: a sample construction module, used to construct a sample data set, the sample data set includes a training data set and a test data set; a model construction module, used to construct a baseline model, the baseline model includes a feature extraction network, a human-like attention mechanism module, an additional feature extraction network and a non-maximum suppression module, the human-like attention mechanism module includes an ECA-Net module and an ISAB module, the ISAB module is a SAM spatial attention mechanism with weighted screening features; a training module, used to train the baseline model through the training data set to generate a target model; a recognition processing module, inputting the target object data set into the target model to output a recognition result.
[0014] Accordingly, the present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the above-mentioned method for rapidly identifying multi-category complex aliased targets when executing the computer program.
[0015] Accordingly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the above-mentioned method for rapidly identifying multi-category complex aliased targets are implemented.
[0016] The implementation of the present invention has the following beneficial effects:
[0017] The present invention combines a feature extraction network, a human-like attention mechanism module, an additional feature extraction network, and a non-maximum suppression module to form a uniquely structured recognition model. This model can provide better and faster recognition results for unmanned factories and autonomous assembly robots, significantly improving the recognition efficiency of enterprises' robots.
[0018] The present invention incorporates an improved attention mechanism to perform weighted operations on the feature information extracted by the feature extraction network, thereby effectively highlighting useful features, eliminating useless features, and displaying important features of the target object, ultimately achieving improved accuracy in target object recognition and improving the execution efficiency of the network;
[0019] The present invention can balance speed and accuracy, reduce useless neural networks and neurons, and make the model faster and more accurate in identifying multi-category targets in aliasing scenarios;
[0020] Furthermore, the present invention proposes a feature extraction network based on the ResNet-50 convolutional neural network as the backbone, adjusts and designs some feature extraction modules, and extracts more and better features for subsequent steps. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a first embodiment of a method for rapidly identifying multi-category complex aliased objects according to the present invention;
[0022] Figure 2 It is a structural diagram of the benchmark model in the present invention;
[0023] Figure 3 This is a schematic diagram of the structure of the fourth convolutional layer in the existing ResNet-50 convolutional neural network;
[0024] Figure 4 It is a structural diagram of the feature extraction network in the present invention;
[0025] Figure 5 It is a schematic diagram of the structure of the ECA-Net module in the present invention;
[0026] Figure 6 It is a structural diagram of the ISAB module in the present invention;
[0027] Figure 7 This is a flow chart of a second embodiment of the method for rapidly identifying multi-category complex aliased objects of the present invention;
[0028] Figure 8 It is a structural diagram of the multi-category complex aliasing target rapid identification system of the present invention. DETAILED DESCRIPTION
[0029] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be described in further detail below with reference to the accompanying drawings.
[0030] See also Figure 1 , Figure 1 The first embodiment of the method for rapidly identifying multi-category complex aliased targets of the present invention is shown, which includes:
[0031] S101, construct a sample data set.
[0032] In the present invention, the sample data set includes a training data set and a test data set; specifically, the steps of constructing the sample data set include:
[0033] (1) Collect sample sets through visual sensors;
[0034] (2) Perform data enhancement on the sample set;
[0035] The sample set can be enhanced through operations such as flipping, mosaic, increasing or decreasing brightness, increasing or decreasing saturation, etc., thereby increasing the diversity of the sample set and enhancing the robustness of the trained model.
[0036] (3) The enhanced sample set is labeled to construct a training dataset and a test dataset.
[0037] The enhanced sample set is annotated using the image annotation tool Labelimg to construct the training and test datasets required for subsequent steps.
[0038] S102, building a baseline model.
[0039] like Figure 2 As shown in Figure 1, the baseline model includes a feature extraction network, a human-like attention mechanism module, an additional feature extraction network, and a non-maximum suppression module. Unlike the prior art, the present invention improves the feature extraction network and the human-like attention mechanism module. The following describes the feature extraction network, the human-like attention mechanism module, and the non-maximum suppression module in detail:
[0040] 1. Feature Extraction Network
[0041] The steps of constructing the feature extraction network include:
[0042] (1) Construct a ResNet-50 convolutional neural network;
[0043] (2) Adjust the step size of the convolutional layer in the ResNet-50 convolutional neural network according to the characteristics of the target object so that the ResNet-50 convolutional neural network outputs the initial features of the target size, and the target size matches the characteristics of the target object;
[0044] Combine Figure 3 and Figure 4 As can be seen, the present invention adjusts the step size of the fourth convolutional layer in the ResNet-50 convolutional neural network based on the target object characteristics, so that the ResNet-50 convolutional neural network outputs initial features with a target size of 38×38×1024. In other words, by adjusting the residual structure in the convolutional layer, the present invention can effectively improve the output size of the feature map to better match the target object characteristics.
[0045] (3) The adjusted ResNet-50 convolutional neural network is used as the feature extraction network.
[0046] Accordingly, the comparison results of the output size and module structure of the ResNet-50 convolutional neural network and the feature extraction network are shown in Table 1:
[0047] Table 1
[0048]
[0049] Therefore, based on the characteristics of the assembly target objects faced by autonomous assembly robots in actual industrial scenarios, the present invention can form a feature extraction network with a unique structure by modifying the residual structure in the convolutional layer on the basis of the ResNet-50 convolutional neural network to extract the most initial and most important feature layer of the target object.
[0050] 2. Human-like Attention Mechanism Module
[0051] It should be noted that while the feature extraction network extracts a large number of target object features, it does not perform feature filtering, resulting in a large amount of redundant and useless feature information, leading to poor recognition results and low efficiency. Therefore, the present invention integrates the feature extraction network with a human-like attention mechanism module to filter the original feature set, highlight important features, eliminate redundant features, and improve the efficiency of the entire model.
[0052] Different from the prior art, the human-like attention mechanism module in the present invention includes an ECA-Net module (see Figure 5 ) and ISAB (Improved Spatial Attention Block) modules; such as Figure 6 As shown in the figure, the ISAB module is a SAM spatial attention mechanism with weighted filtering features. The steps of constructing the ISAB module include:
[0053] (1) Constructing the SAM spatial attention mechanism;
[0054] (2) Add weighted filtering features to the SAM spatial attention mechanism;
[0055] Specifically, the steps of adding weighted filtering features to the SAM spatial attention mechanism include:
[0056] (a) Extracting two benchmark features in the SAM spatial attention machine;
[0057] (b) transposing the two benchmark features to generate two weighted screening features;
[0058] (c) Adding two weighted filtering features to the SAM spatial attention machine.
[0059] (3) The SAM spatial attention mechanism with added weighted filtering features is used as the ISAB module.
[0060] Accordingly, the feature comparison results of the SAM spatial attention machine and the ISAB module are shown in Table 2:
[0061] Table 2
[0062]
[0063] Therefore, the human-like attention mechanism module can be used to screen features with different weights, thereby effectively highlighting useful features, eliminating useless features, and displaying important features of the target object, ultimately improving the accuracy of target object recognition and improving the execution efficiency of the network.
[0064] 3. Non-maximum suppression module
[0065] Since the baseline model may produce multiple recognition boxes with different confidence levels and Intersection over Union (IoU) for the same object, in order to eliminate redundant recognition boxes and select the recognition box with the best recognition result, the non-maximum suppression (NMS) algorithm can be used to select the optimal recognition box.
[0066] S103, training the baseline model using the training data set to generate a target model;
[0067] By using the training data set constructed in step S101 to train the benchmark model and adjust and fit the corresponding model parameters, the performance of the benchmark model can be improved.
[0068] S104: Input the target object data set into the target model to output the recognition result.
[0069] In summary, based on the existing neural network algorithm, the present invention has made improvements in feature extraction network, human-like attention mechanism and other aspects, thereby improving the performance of the algorithm; thereby improving the detection and recognition efficiency of machine vision for multi-category aliased targets, especially enhancing the detection recall rate of the algorithm for small-sized targets, providing better, more efficient and faster recognition results for unmanned factories and autonomous assembly robots.
[0070] See also Figure 7 , Figure 7 A second embodiment of the method for rapidly identifying multi-category complex aliased objects of the present invention is shown, which includes:
[0071] S201, construct a sample data set.
[0072] S202, construct a baseline model.
[0073] S203, training the baseline model using the training data set to generate a target model;
[0074] S204: Input the target object data set into the target model to output the recognition result.
[0075] S205, storing the recognition result in text form;
[0076] Preferably, it can be stored in the form of txt text, but it is not limited to this and can be adjusted according to actual conditions, with strong flexibility.
[0077] S206: Generate a recognition frame corresponding to the recognition result through a drawing function, and display the recognition frame.
[0078] and Figure 1 The difference from the first embodiment shown is that in this embodiment, the recognition result can be stored in text form through step S205; and the recognition box can be drawn using a drawing function to realize visualization of the recognition result.
[0079] Accordingly, when the Faster-Rcnn visual detection algorithm, YoloV4 visual detection algorithm, EfficientDet-D1 visual detection algorithm, SDD visual detection algorithm and the multi-category complex aliasing target rapid recognition method of the present invention are respectively applied to the same scene, the recognition results are shown in Table 3:
[0080]
[0081] As can be seen from the above table, the multi-category complex aliasing target rapid recognition method of the present invention can maintain the algorithm's detection rate (FPS: 78) while maintaining a high mAP (98.4%) value.
[0082] In summary, the multi-category complex aliased target rapid identification method of the present invention can help industrial robots more quickly and accurately identify aliased targets in industrial scenarios, provide better and faster recognition results for unmanned factories and autonomous assembly robots, and significantly improve the recognition efficiency of enterprises' robots. Specifically:
[0083] 1. This paper proposes a feature extraction network based on the ResNet-50 convolutional neural network as the backbone, adjusts and designs some feature extraction modules, and extracts more and better features for subsequent steps;
[0084] 2. The present invention incorporates an improved attention mechanism to perform weighted operations on the feature information extracted by the feature extraction network, thereby filtering out redundant features and highlighting effective features;
[0085] 3. The present invention can balance speed and accuracy, reduce useless neural networks and neurons, and make the model faster and more accurate when identifying multi-category targets in aliasing scenarios.
[0086] See also Figure 8 , Figure 8The specific structure of the multi-category complex aliasing target rapid identification system 100 of the present invention is shown, which includes a sample construction module 1, a model construction module 2, a training module 3 and an identification processing module 4. Specifically:
[0087] Sample Construction Module 1 is used to construct a sample dataset, which includes a training dataset and a test dataset. Specifically, Sample Construction Module 1 collects sample datasets using a visual sensor, performs data augmentation processing (e.g., flipping, mosaicing, increasing or decreasing brightness, increasing or decreasing saturation), and then annotates the enhanced sample dataset to construct a training dataset and a test dataset. This increases the diversity of the sample dataset and enhances the robustness of the trained model.
[0088] Model construction module 2 is used to build a baseline model. The baseline model includes a feature extraction network, a human-like attention mechanism module, an additional feature extraction network and a non-maximum suppression module. The human-like attention mechanism module includes an ECA-Net module and an ISAB module. The ISAB module is a SAM spatial attention mechanism with weighted screening features.
[0089] The training module 3 is used to train the benchmark model using the training data set to generate the target model. Specifically, the training module 3 can use the training data set constructed by the sample construction module to train the benchmark model and adjust and fit the corresponding model parameters to achieve better performance of the benchmark model.
[0090] The recognition processing module 4 inputs the target object dataset into the target model to output the recognition result. Specifically, the recognition processing module 4 can store the recognition result in text form and use a drawing function to draw the recognition box to realize the visualization of the recognition result.
[0091] like Figure 2 As shown in Figure 2, the baseline model includes a feature extraction network, a human-like attention mechanism module, an additional feature extraction network, and a non-maximum suppression module.
[0092] The feature extraction network is improved based on the ResNet-50 convolutional neural network. Specifically, the ResNet-50 convolutional neural network can be constructed first; then the step size of the convolution layer in the ResNet-50 convolutional neural network is adjusted according to the characteristics of the target object, so that the ResNet-50 convolutional neural network outputs the initial features of the target size, and the target size matches the characteristics of the target object; finally, the adjusted ResNet-50 convolutional neural network is used as the feature extraction network. Figure 3 and Figure 4As can be seen, the present invention adjusts the step size of the fourth convolutional layer in the ResNet-50 convolutional neural network based on the target object characteristics, so that the ResNet-50 convolutional neural network outputs initial features with a target size of 38×38×1024. In other words, by adjusting the residual structure in the convolutional layer, the present invention can effectively improve the output size of the feature map to better match the target object characteristics.
[0093] The human-like attention mechanism module is composed of the ECA-Net module (see Figure 5 ) and ISAB (Improved Spatial Attention Block) modules. Specifically, the SAM spatial attention mechanism is first constructed; then, weighted filtering features are added to the SAM spatial attention mechanism; finally, the SAM spatial attention mechanism with the added weighted filtering features is used as the ISAB module. The weighted filtering features are generated by transposing the two baseline features in the SAM spatial attention machine.
[0094] Accordingly, the present invention further discloses a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein when the processor executes the computer program, the steps of the method for rapidly identifying multiple types of complex aliased objects are implemented. Furthermore, the present invention further discloses a computer-readable storage medium storing the computer program, wherein when the processor executes the computer program, the steps of the method for rapidly identifying multiple types of complex aliased objects are implemented.
[0095] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for rapid identification of multi-category complex aliased targets, characterized by: include: Constructing a sample data set, wherein the sample data set includes a training data set and a test data set; Construct a benchmark model, which includes a feature extraction network, a human-like attention mechanism module, an additional feature extraction network, and a non-maximum suppression module. The human-like attention mechanism module includes an ECA-Net module and an ISAB module. The ISAB module is a SAM spatial attention mechanism with weighted filtering features. Training the benchmark model using the training data set to generate a target model; Inputting the target object data set into the target model to output a recognition result; The steps of constructing the ISAB module include: constructing a SAM spatial attention mechanism; adding a weight screening feature to the SAM spatial attention mechanism; and using the SAM spatial attention mechanism after adding the weight screening feature as an ISAB module; The step of adding weight screening features in the SAM spatial attention mechanism includes: extracting two baseline features in the SAM spatial attention machine; transposing the two baseline features respectively to generate two weight screening features; and adding the two weight screening features to the SAM spatial attention machine.
2. The method for rapidly identifying multi-category complex aliased objects according to claim 1, wherein: The steps of constructing the feature extraction network include: Build a ResNet-50 convolutional neural network; Adjusting the step size of a convolutional layer in the ResNet-50 convolutional neural network according to the target object characteristics so that the ResNet-50 convolutional neural network outputs initial features of a target size, where the target size matches the target object characteristics; The adjusted ResNet-50 convolutional neural network is used as the feature extraction network.
3. The method for rapidly identifying multi-category complex aliased objects according to claim 2, wherein: The step size of the fourth convolutional layer in the ResNet-50 convolutional neural network is adjusted according to the target object features so that the ResNet-50 convolutional neural network outputs an initial feature with a target size of 38×38×1024.
4. The method for rapidly identifying multi-category complex aliased objects according to claim 1, wherein: Also includes: Storing the recognition result in text form; An identification frame corresponding to the identification result is generated by a drawing function, and the identification frame is displayed.
5. The method for rapidly identifying multi-category complex aliased objects according to claim 1, wherein: The steps of constructing a sample data set include: Collect sample sets through visual sensors; performing data enhancement processing on the sample set; The enhanced sample set is annotated to construct a training data set and a test data set.
6. A multi-category complex aliasing target rapid recognition system, characterized by: include: A sample construction module is used to construct a sample data set, wherein the sample data set includes a training data set and a test data set; A model construction module is used to build a baseline model. The baseline model includes a feature extraction network, a human-like attention mechanism module, an additional feature extraction network, and a non-maximum suppression module. The human-like attention mechanism module includes an ECA-Net module and an ISAB module. The ISAB module is a SAM spatial attention mechanism with weighted filtering features. A training module, configured to train the benchmark model using the training data set to generate a target model; A recognition processing module, which inputs the target object data set into the target model to output a recognition result; The steps of constructing the ISAB module include: constructing a SAM spatial attention mechanism; adding a weight screening feature to the SAM spatial attention mechanism; and using the SAM spatial attention mechanism after adding the weight screening feature as an ISAB module; The step of adding weight screening features in the SAM spatial attention mechanism includes: extracting two baseline features in the SAM spatial attention machine; transposing the two baseline features respectively to generate two weight screening features; and adding the two weight screening features to the SAM spatial attention machine.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.