A multi-task solid waste visual grasping method based on modal fusion
The multi-task solid waste visual grabbing method through modal fusion, combined with deep learning and modal fusion modules, solves the problems of low efficiency and insufficient accuracy in solid waste grabbing technology, and achieves high-precision and efficient grabbing configurations output, improving the efficiency of solid waste recycling work.
Patent Information
- Application Number
- CN202410910725.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-09
AI Technical Summary
Existing solid waste capture technology suffers from heavy workload, low efficiency, single data set, and weak generalization ability. The accuracy and operating efficiency of traditional image recognition algorithms need to be improved, especially in the 6DOF space capture scenario, where the efficiency is low.
A multi-task solid waste visual capture method based on modal fusion is used to process solid waste scene images through deep learning methods. Color channel and depth channel images are combined to build a multi-task solid waste capture network. The modal fusion module and Basic crawling network, the output crawling configuration includes crawling center, angle, width and quality score, realizing end-to-end mapping function learning.
It improves the reasoning accuracy and real-time performance of the model, improves the grasping accuracy and object category recognition accuracy, and meets the real-time grasping requirements. Compared with the baseline method, the grasping accuracy increases by 1.41% and 1.13%, and the object category recognition accuracy reaches 80.30%.
Smart Images

Figure CN118456445B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of application of artificial intelligence in solid grasping, and specifically relates to a multi-task solid waste visual grasping method based on modal fusion. Background Art
[0002] With the continuous development of the global economy, the living standards of residents are constantly improving, and the generation of domestic waste is increasing year by year. At present, manual sorting of solid waste faces problems such as heavy workload and low efficiency, while the data sets used by traditional image recognition algorithms are generally relatively simple, with weak generalization ability, and the accuracy and operation efficiency still need to be improved.
[0003] Grasping detection can be divided into two categories according to the actual application scenario: 2D plane grasping and 6DOF (Degrees of Freedom) space grasping. In the 6DOF space grasping scenario, the robot arm can grasp with 6 degrees of freedom in three-dimensional space, that is, it can move horizontally in the x, y, and z directions, and can rotate around the x, y, and z axes. In the 2D plane grasping scenario, the robot arm moves vertically downward and grasps the target object from a single angle. The direction of the gripper is perpendicular to a plane, and the basic information is simplified from 6D to 3D, that is, 2D plane position information and 1D rotation angle information.
[0004] In terms of technical methods, grasping detection is mainly divided into analytical methods and data-driven methods. The analytical method is a hard-coded method that determines the grasping position by performing kinematic, dynamic and mechanical analysis on the geometric shape and posture of the object. It has limitations such as a large number of constraints, high computational difficulty, low efficiency and difficulty in modeling. The data-driven method is mainly based on machine learning methods. It determines the grasping position of the object by learning a large amount of grasping experience data. In actual application scenarios, there are many unknown objects other than training data. Therefore, the data-driven method is more conducive to grasping reasoning for unknown objects than the analytical method. Existing data-driven grasping detection methods are mainly divided into two types: discriminative and generative methods. The discriminative method is a method that directly classifies and discriminates the grasping posture based on existing data and knowledge. The discriminative method usually includes several steps of feature extraction, feature representation, classification and discrimination; while the generative method refers to the method of generating new data samples based on the characteristics of the object shape, size, center of gravity, etc., through mathematical modeling and optimization algorithms, learning the distribution probability of data, thereby simulating the generation process of real data and generating a suitable grasping posture. The discriminative strategy approach has advantages in accuracy, but is less efficient due to the need to sort and filter many candidate grasps. In contrast, the generative strategy approach has advantages over the discriminative strategy in terms of efficiency. Summary of the invention
[0005] The present invention provides a multi-task solid waste visual grasping method based on modal fusion, which utilizes a deep learning method to generate corresponding grasping configurations for solid waste in solid waste scene images and performs waste classification.
[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0007] A multi-task solid waste visual grasping method based on modal fusion, comprising:
[0008] Obtain solid waste scene images, label the categories and effective grasping postures of the solid waste, and construct a training sample set;
[0009] Construct and use the training sample set to train a multi-task solid waste grasping network, including a modal fusion module and a basic grasping network. The input data is a solid waste scene image, and the output data is the category and grasping posture of each solid waste in the image.
[0010] The modality fusion module includes two different branches, which input the color channel image and the depth channel image respectively. In the two branches: (1) different convolution operations are performed on the input images to obtain the same number of channels, and then activated. (2) Convolution is performed with the same convolution kernel, and channel swap is performed after normalization in the BN layer, that is, the unimportant channels in the branch are replaced with the channels with a larger scaling factor in the other branch, and then activated. (3) The second channel swap is performed according to the same process as (2). Finally, the feature maps obtained from the two branches are spliced along the channel dimension and then input into the basic crawling network.
[0011] Finally, the trained multi-task solid waste grasping network is used to classify the solid waste in the image and generate grasping postures based on the input solid waste scene image.
[0012] Furthermore, the grasping posture includes: grasping center, grasping angle, grasping width, and grasping quality score.
[0013] Furthermore, when using the training sample set to train the multi-task solid waste grasping network, for n objects Dataset , corresponding to the input N scene images and each object The crawl configuration set , by minimizing the input scene image Conditional crawl configuration The negative log-likelihood of is used to train the model, thereby learning the mapping function end-to-end = , defined as:
[0014]
[0015] In the formula, represents the kth input scene image, and N represents the number of input scene images; represents the jth grasp configuration of the kth input scene image, including the grasp category and grasp posture; represents the total number of grasp configurations in the k-th input scene image.
[0016] Furthermore, the training model adopts the loss function L as:
[0017]
[0018] In the formula, They are the grasping quality, grasping angle sine, grasping angle cosine, grasping width and grasping category losses output by the corresponding model. is the scaling factor of the BN layer, λ is the coefficient of the sparse constraint; among them, each loss Using the same calculation function, each loss All used uniformly If The calculation function is specifically expressed as:
[0019]
[0020] In the formula, is the grasping quality, grasping angle, grasping width or grasping category in the grasping configuration generated by the grasping network for the i-th object, is the actual grasping quality, grasping angle, grasping width or grasping category for the i-th object.
[0021] Furthermore, the normalization operation in the BN layer is expressed as:
[0022]
[0023] in, and are the input and output feature maps of the cth channel on the current branch, respectively. and Calculate the mean and standard deviation of all activations at the pixel location of the current mini-batch data, and are trainable scaling factors and offsets, is a small constant that prevents the denominator from being zero.
[0024] Furthermore, the channel swapping is performed after the normalization operation in the BN layer, specifically:
[0025]
[0026] in, are the output feature map of the cth channel of another branch of the current branch and the related parameters of the BN layer, is a set threshold.
[0027] Furthermore, in the multi-task solid waste grasping network, after the modal fusion module, the concatenated feature map is passed through several residual layers and then a convolution transpose operation is performed to upsample the image so that the size of the output image is consistent with that of the input image.
[0028] Beneficial Effects
[0029] The method of the present invention improves the inference accuracy of the model without adding additional network parameters by fusing the color channel data and the depth channel data by channel exchange at the input end, and the inference speed still meets the requirements of real-time grasping. In addition, the present invention regresses the grasping quality, grasping angle and grasping width while regressing the category of the grasped object without adding additional network modules, and achieves a high classification accuracy.
[0030] Compared with the existing technology for generating grab points for solid waste, it has the following advantages:
[0031] (1) Compared with the baseline method GR-Convnet, the multi-task solid waste grasping method based on modal fusion proposed in this paper has effectively improved the grasping accuracy. On the dataset of the conveyor belt background, the average image-based accuracy is 71.58%, and the average object-based accuracy is 89.35%, which are 1.41% and 1.13% higher than the baseline method, respectively.
[0032] (2) The present invention deeply fuses the color channel image and the depth channel image, rather than simply splicing the two modal data together as the existing crawling network does. This makes full use of the intrinsic characteristics of different modalities and improves the accuracy of the model.
[0033] (3) The present invention regresses the corresponding object category for each generated grab rectangle, and classifies the objects into 13 subcategories and 9 major categories, with an object category recognition accuracy of 80.30%, preparing for subsequent solid waste recycling work.
[0034] (4) The present invention can still achieve real-time grasping reasoning while slightly increasing the complexity of the model, and the reasoning speed meets the real-time requirements of the "eyes before hands" conveyor belt system. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1It is a schematic diagram of the structure of the present invention for modal fusion of color channel data and depth channel data.
[0036] Figure 2 It is a network flow diagram of the multi-task solid waste visual grasping method based on modal fusion of the present invention.
[0037] Figure 3 Class distribution histogram for the solid waste dataset in the conveyor belt scenario.
[0038] Figure 4 Schematic diagram of the levels of the solid waste dataset categories for the conveyor belt scenario.
[0039] Figure 5 A comparison chart of the image-based grasping point generation accuracy between the present invention and the benchmark method.
[0040] Figure 6 A comparison chart of the accuracy of the object grasping point generation between the present invention and the benchmark method.
[0041] Figure 7 This is a comparison chart of the object classification accuracy of the present invention and the benchmark method.
[0042] Figure 8 The following is a schematic diagram of the generation result of the final model of the present invention. (a) is the grabbing rectangle displayed on the color image; (b) is the corresponding image of the grabbing quality; (c) is the corresponding image of the grabbing angle; (d) is the corresponding image of the grabbing category. DETAILED DESCRIPTION
[0043] The following is a detailed description of an embodiment of the present invention. This embodiment is based on the technical solution of the present invention, and provides a detailed implementation method and a specific operation process to further explain the technical solution of the present invention.
[0044] The present invention provides a multi-task solid waste visual grasping method based on modal fusion. For conveyor belt solid waste scene images with labeled information, a deep learning method is used to train solid waste image data, and the color channel image and the depth channel image are fused to fully utilize the different information in the two modalities. Finally, pairs of grasping points are generated on each pixel of the image, and the grasping quality, grasping angle and required clamper width image of each pair of grasping points and the classification score of the object are obtained, so as to predict the best grasping point, generate a grasping rectangle and confirm the type of the grasped object.
[0045] The multi-task solid waste visual grasping method based on modal fusion of the embodiment is experimentally or engineeringly applied through Python programming language, and includes the following steps:
[0046] Step 1: Obtain solid waste scene images, label the categories and effective grasping postures of the solid waste, and construct a training sample set.
[0047] The dataset used in this embodiment is a scene of solid waste on a conveyor belt that was photographed and annotated with directed rectangles. The dataset consists of 2161 color channel images and 2161 depth channel images aligned with them. The solid waste contained in the images is divided into 9 categories and 13 types. Among them, there are 930 plastic bottles, 355 plastic boxes, 1311 paper boxes, 232 paper cups, 755 metal bottles, 309 glass bottles, 175 glass cups, 385 ceramic cups, 625 wooden sticks and blocks, 414 foams, 335 tapes, 226 shoes, and 75 discarded dolls. The data distribution is as follows: Figure 3 As shown in Figure 2, the dataset types are divided into two levels, such as Figure 4 As shown in the figure, the pixel size of all images is 500×380.
[0048] For the acquired dataset, before training the crawling network, each image in it was cropped, resized and normalized, and the image size was adjusted to 224×224.
[0049] Step 2: Build and use the training sample set to train a multi-task solid waste grasping network, including a modal fusion module and a basic grasping network.
[0050] The current grasping reasoning network pays less attention to the intrinsic connection of image information of different modalities. It usually uses the method of directly splicing depth information as the fourth channel of color information, and does not fully utilize the difference information between different modalities. For example, the color channel image has more surface texture features, while the depth channel image contains more contour information. This method compares the scaling factors in the feature maps of the color channel image and the depth channel image with a given threshold, and replaces the channel part below the threshold at the corresponding position in the own modality with the channel with a higher scaling factor in the other modality, thereby removing unimportant redundant channels.
[0051] Batch Normalization (BN) is a common structure in neural networks. It is widely used to eliminate covariate shift and improve generalization ability. The change relationship of the BN layer is:
[0052]
[0053] in, is the feature map of the cth channel of the network, and Calculate the mean and standard deviation of all activated pixels at the current mini-batch location. and are trainable scaling factors and offsets, and ε is a small constant to avoid the denominator being zero.
[0054] Scaling factors in BN layers Evaluated during training and If tends to 0 during the training process, then The influence on the final result will be lost during the training process. If the scaling factor of a channel is lower than a threshold slightly greater than 0 during training, the channel will become unimportant. Therefore, the present invention considers replacing the channel with the feature map of the corresponding channel of another modality, that is,
[0055]
[0056] in, are the output feature map of the cth channel of another branch of the current branch and the related parameters of the BN layer, is a threshold value slightly greater than 0. The specific structure of the modality fusion module is as follows: Figure 1 shown.
[0057] In the specific modal fusion module, two different branches input the color channel image and the depth channel image respectively; in the two branches: (1) different convolution operations are performed on each input image to obtain the same number of channels, and then activated; (2) convolution is performed with the same convolution kernel, and channel exchange is performed after normalization in the BN layer, that is, the unimportant channels in the own branch are replaced with channels with larger scaling factors in the other branch, and activation is performed after channel exchange; (3) the second channel exchange is performed according to the same process as (2); the modal fusion module finally splices the feature maps obtained from the two branches along the channel dimension. The spliced feature maps will then pass through five residual layers to alleviate the problem of gradient dissipation and allow information to be transmitted more smoothly in the network; after passing through the residual layer, a convolution transpose operation is performed to upsample the image so that the size of the output image is consistent with the size of the input image. Figure 2 shown.
[0058] In order to avoid the situation where there are some redundant channels with scaling factors close to 0 in both modes, which will lead to a decrease in model capacity and the inability to determine the direction of channel exchange, this method divides the channel into two parts, and channel exchange is only performed in the corresponding parts. Sparse constraints are further applied to the scaling factors of each mode to discover unnecessary channels and avoid invalid exchanges.
[0059] In addition, the multi-task solid waste grasping network of this embodiment has its input data as solid waste scene images, and its output data as the category and grasping posture of each solid waste in the image, and the grasping posture includes: grasping center, grasping angle, grasping width, and grasping quality score.
[0060] Existing grasping research usually does not distinguish the types of grasped objects, but it is necessary to grasp and classify solid waste on the conveyor belt, which is helpful for the subsequent solid waste classification and treatment. This method adds category dimension information by additionally annotating the grasping dataset, so that the network can learn the category information of solid waste during the training process, and finally regress it together with the grasping center, grasping angle, grasping width and grasping quality score.
[0061] The grasping configuration of the i-th object is defined as follows:
[0062]
[0063] in, To capture the center, is the grasping angle, i.e. the angular rotation required to grasp the object, expressed as The value of Indicates the crawl width, which is [0, ] range, is the actual maximum width of the gripper; Indicates the crawl quality score, which is a score between 0 and 1. The closer it is to 1, the higher the success rate. Is based on the crawl quality score The object category number generated together, It is expressed as a score between 0 and 12, where each score corresponds to a category of an object.
[0064] When training a multi-task solid waste grasping network, for objects containing Dataset, input scene image and each object The crawl configuration set . By minimizing to input image scene Conditional The negative log-likelihood of is used to train the model, thereby learning the mapping function end-to-end , defined as:
[0065]
[0066] In order to alleviate the gradient vanishing problem and smooth the Huber loss, the network loss is defined as:
[0067]
[0068] In the formula, They are the grasping quality, grasping angle sine, grasping angle cosine, grasping width and grasping category losses output by the corresponding model. is the scaling factor of the BN layer, λ is the coefficient of the sparse constraint; among them, each loss Using the same calculation function, each loss All used uniformly If The calculation function is specifically expressed as:
[0069]
[0070] In the formula, is the grasping quality, grasping angle, grasping width or grasping category in the grasping configuration generated by the grasping network for the i-th object, is the actual grasping quality, grasping angle, grasping width or grasping category for the i-th object.
[0071] In this example, training requires Ubuntu 18.04.5 LTS and above. The system environment requires Python 3.8.5, Pytroch 1.10.1, Torchvision 0.11.2, CUDA 11.1 and above. The hardware platform needs to meet the requirements of NVIDIA GeForce RTX 3090 (24G) graphics card, 16G or more memory and a hard disk with a capacity of no less than 256G. When training the model, a total of 200 epochs are trained, and the Adam optimizer is used for parameter update. The standard back propagation algorithm and small batch stochastic gradient descent technology are used during training, and the learning rate is set to 10 -3 , the threshold of channel swapping is selected as 0.05, and the coefficient λ of the sparse constraint is set to 0.0004. Eight samples are randomly selected for training each time. A random seed is used during training so that the same random split is obtained when running the training at different times, eliminating the differences introduced by randomness.
[0072] In this example, the above training method is repeated 5 times, and the model with the highest grasping accuracy in the validation set is selected as the basic prediction model for subsequent steps. If there are multiple models with the same grasping accuracy, the one with the highest classification accuracy is selected.
[0073] During the training process, the common evaluation method for grasping a single object is the grasping rectangle measurement method. When a grasp satisfies the intersection over union (IoU) score between the predicted grasping rectangle and the actual grasping rectangle exceeds 25%, and the deviation between the grasping direction of the predicted grasping rectangle and the actual grasping rectangle is less than , this predicted grasp is considered valid. In order to convert from image-based grasp representation to rectangular representation, the grasp configuration generated corresponding to each pixel in the output image is mapped to its equivalent rectangular representation. The specific mapping is: based on the grasp quality, grasp angle, grasp width, and grasp category in the pixel point and its corresponding grasp configuration, the complete rectangle can be restored according to the pixel center point coordinates, the width grasp rectangle center line and the horizontal angle, and the fixed gripper size, that is, mapped to the equivalent rectangular representation. For the multi-target grasping problem, this method proposes a new evaluation index based on the grasping rectangle measurement method.
[0074] For a scene with multiple objects to be grasped, the scene image is considered to be successfully grasped when at least one feasible grasping rectangle is generated for each object and no additional infeasible grasping rectangles are generated; when each object has at least one feasible grasping rectangle, the object is considered to be successfully grasped; and among the successfully grasped objects, the classification accuracy is calculated based on the classification score obtained by regression.
[0075] Step 3: Use the trained multi-task solid waste grasping network to classify the solid waste in the image and generate grasping postures based on the input solid waste scene image.
[0076] In this example, the image-based basic prediction model achieved the highest verification accuracy of 82.56%, and the object-based basic prediction model achieved the highest verification accuracy of 92.54%. The image-based model accuracy of this method was 83.05%, and the object-based model accuracy was 93.54%. The epochs to achieve this accuracy were 38, and the corresponding grasped object classification accuracy was 83%. The average accuracy comparison between the basic model and the model used in this method is shown in Table 1.
[0077]
[0078] The GR-Convnet network is selected as the basic model and compared with the network used in this method in terms of prediction accuracy. The results of the image-based grasping accuracy comparison, object-based grasping accuracy comparison and classification accuracy comparison are shown in Figure 2. Figure 5 , Figure 6 , Figure 7 The inference results of the final model are shown in Figure 8 shown.
[0079] The above embodiments are preferred embodiments of the present application. Ordinary technicians in this field can also make various changes or improvements on this basis. Without departing from the overall concept of the present application, these changes or improvements should fall within the scope of protection required by the present application.
Claims
1. A multi-task solid waste visual grasping method based on modal fusion, characterized in that: include: Obtain solid waste scene images, label the categories and effective grasping postures of the solid waste, and construct a training sample set; Construct and use the training sample set to train a multi-task solid waste grasping network, including a modal fusion module and a basic grasping network. The input data is a solid waste scene image, and the output data is the category and grasping posture of each solid waste in the image. The modality fusion module includes two different branches, which input the color channel image and the depth channel image respectively. In the two branches: (1) different convolution operations are performed on the input images to obtain the same number of channels, and then activated. (2) Convolution is performed with the same convolution kernel, and channel swap is performed after normalization in the BN layer, that is, the unimportant channels in the branch are replaced with the channels with a larger scaling factor in the other branch, and then activated. (3) The second channel swap is performed according to the same process as (2). Finally, the feature maps obtained from the two branches are spliced along the channel dimension and then input into the basic crawling network. The normalization operation in the BN layer is expressed as: ; in, and are the input and output feature maps of the cth channel on the current branch, respectively. and Calculate the mean and standard deviation of all activations at the pixel location of the current mini-batch data, and are trainable scaling factors and offsets, is a small constant to avoid the denominator being 0; After the normalization operation is performed in the BN layer, channel swapping is performed, specifically: ; in, are the output feature map of the cth channel of another branch of the current branch and the related parameters of the BN layer, is a set threshold; Finally, the trained multi-task solid waste grasping network is used to classify the solid waste in the image and generate grasping postures based on the input solid waste scene image.
2. The multi-task solid waste visual grasping method based on modal fusion according to claim 1 is characterized in that: The grasping posture includes: grasping center, grasping angle, grasping width, and grasping quality score.
3. The multi-task solid waste visual grasping method based on modal fusion according to claim 1 is characterized in that: When using the training sample set to train a multi-task solid waste grasping network, for n objects Dataset , corresponding to the input N scene images and each object The crawl configuration set , by minimizing the input scene image Conditional crawl configuration The negative log-likelihood of is used to train the model, thereby learning the mapping function end-to-end = , defined as: ; In the formula, represents the kth input scene image, and N represents the number of input scene images; represents the jth grasp configuration of the kth input scene image, including the grasp category and grasp posture; represents the total number of grasp configurations in the k-th input scene image.
4. The multi-task solid waste visual grasping method based on modal fusion according to claim 3 is characterized in that: The training model uses the loss function L as: ; In the formula, They are the grasping quality, grasping angle sine, grasping angle cosine, grasping width and grasping category losses output by the corresponding model. is the scaling factor of the BN layer, λ is the coefficient of the sparse constraint; among them, each loss Using the same calculation function, each loss All used uniformly If The calculation function is specifically expressed as: ; In the formula, is the grasping quality, grasping angle, grasping width or grasping category in the grasping configuration generated by the grasping network for the i-th object, is the actual grasping quality, grasping angle, grasping width or grasping category for the i-th object.
5. The multi-task solid waste visual grasping method based on modal fusion according to claim 1 is characterized in that: In the multi-task solid waste grasping network, after the modal fusion module, the spliced feature map is passed through several residual layers and then a convolution transpose operation is performed to upsample the image so that the size of the output image is consistent with that of the input image.
