A grasping target positioning method based on Grasp-CAD target detection model

By introducing CBAM attention mechanism and adaptive feature scaling fusion module into the object detection model, combining feature pyramid network and path aggregation network, the problems of low accuracy and slow speed of occluded target detection by existing object detectors are solved, and the problem of low accuracy and slow speed of occluded target detection is achieved. Efficient object detection, suitable for picking robot systems.

CN118982582BActive Publication Date: 2025-01-14NANJING NORMAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411450929.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-14
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

Existing target detectors are difficult to detect occluded targets, and the detection accuracy is low and the speed is slow, resulting in inefficient grabbing of picking robots.

Method used

Using the Grasp-CAD object detection model method, the C3 module and adaptive feature scaling and fusion AFRC module are introduced with the CBAM attention mechanism to improve feature extraction capabilities and detection speed, and combine feature pyramid network FPN and path aggregation network PAN to achieve rapid And accurate target detection.

Benefits of technology

It significantly improves the detection adaptability and performance of occlusions, improves detection speed and accuracy, is suitable for robot systems, and has practical application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982582B_ABST
    Figure CN118982582B_ABST
Patent Text Reader

Abstract

The invention discloses a grasping target positioning method based on a Grasp‑CAD target detection model. The Grasp‑CAD target detection model processes image data by introducing a C3 module of a CBAM attention mechanism and an AFRC module for adaptive feature scaling and fusion of features of different scales of FPN and PAN, and obtains the coordinates of a detection frame of a target object in the image data; and obtains the position of the target object relative to the end of a robotic arm according to the coordinates of the detection frame. The C3 module of the CBAM attention mechanism is adopted in the detection model, which improves the adaptability and performance of occluder detection. The model has strong feature extraction capability and can detect occluded targets. The Neck module adaptive feature scaling and fusion of the AFRC module improve the detection speed. The model occupies little memory and is easy to be deployed in a robot system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to robot visual positioning, and in particular to a grasping target positioning method based on a Grasp-CAD target detection model. Background Art

[0002] Harvesting robots are intelligent agricultural equipment that use various types of sensors to sense the agricultural working environment and use the information obtained to guide the robotic arm to complete precise harvesting operations. Although harvesting robots have broad application prospects, at this stage, harvesting robots still have shortcomings such as low work efficiency, poor environmental adaptability and high cost, making it difficult to form commercial products in a short period of time.

[0003] In recent years, deep learning models have gradually replaced traditional machine vision methods and become the mainstream algorithm in the field of object detection. Most of the most advanced object detectors use deep learning networks as their backbone and detection networks to extract features from input images for classification and positioning, respectively. However, existing object detectors have difficulty detecting occluded objects and have low detection accuracy. In addition, the object detection algorithm has a slow detection speed, and the robotic arm consumes a lot of time in the detection process, resulting in low grasping efficiency. Summary of the invention

[0004] Purpose of the invention: In view of the above shortcomings, the present invention provides a grasping target positioning method based on the Grasp-CAD target detection model with high detection accuracy and fast detection speed.

[0005] Technical solution: To solve the above problems, the present invention adopts a grasping target positioning method based on the Grasp-CAD target detection model, comprising the following steps:

[0006] (1) Obtain a dataset for target detection;

[0007] (2) training a Grasp-CAD target detection model according to the acquired data set; obtaining a trained Grasp-CAD target detection model for identifying the plane coordinates of the target object in the image data; the Grasp-CAD target detection model comprises a backbone network Backbone module, a neck network Neck module and a detection end Head module connected in sequence, the backbone network Backbone module comprises a C3 module that introduces a CBAM attention mechanism for feature extraction, the neck network Neck module comprises a feature pyramid network FPN and a path aggregation network PAN and an adaptive feature scaling fusion AFRC module, and the adaptive feature scaling fusion AFRC module is used to scale and adaptively fuse features of different scales of the feature pyramid network FPN and the path aggregation network PAN;

[0008] (3) Acquire image data of the grasping environment in real time;

[0009] (4) Based on the acquired image data, the coordinates of the detection box of the grasped target in the image data are obtained by processing it through the trained Grasp-CAD target detection model;

[0010] (5) Perform coordinate system transformation on the coordinates of the detection frame to obtain the position of the grasped target relative to the end of the grasping robot arm.

[0011] Furthermore, the backbone network Backbone module includes a CBS module, a C3 module, a spatial pooling pyramid SPP module, and an attention mechanism CBAM module;

[0012] The CBS module includes a Conv convolution layer, a BN normalization layer and a SiLU activation function, which are used to extract convolutional layer features from the acquired image data;

[0013] The C3 module includes two branches, one of which performs a convolution operation, and the other branch performs a residual connection through a Bottleneck module after the convolution operation, and then the outputs of the two branches are spliced;

[0014] The spatial pooling pyramid SPP module is used to generate feature maps of different scales through maximum pooling;

[0015] After the output of the C3 module, the attention mechanism CBAM module is used to extract features as the input of the neck network Neck module.

[0016] Furthermore, the CBAM module includes a channel attention mechanism module and a spatial attention mechanism module;

[0017] The channel attention mechanism module fuses the residual features into Two one-dimensional feature vectors are generated by maximum pooling and average pooling respectively according to the channel. The two one-dimensional feature vectors are summed after nonlinear feature changes through the fully connected network. After summing, the Sigmoid activation function is used to obtain the channel attention weight , the channel attention weight Fusion graph with residual features The channel attention mechanism feature map is obtained by matrix multiplication ;

[0018] The spatial attention mechanism module converts the channel attention mechanism feature map Two two-dimensional feature maps are generated by maximum pooling and average pooling respectively according to the space. The two two-dimensional feature maps are concatenated and convolved. After convolution, the Sigmoid activation function is used to obtain the spatial attention weight. , the spatial attention weight Feature map with channel attention mechanism The residual channel spatial attention feature map is obtained by matrix multiplication .

[0019] Furthermore, the feature pyramid network FPN transfers the semantic features of the deep layer to the shallow layer from top to bottom, and the path aggregation network PAN transfers the positioning information of the shallow layer to the high layer from top to top. The feature pyramid network FPN and the path aggregation network PAN output three F1 feature layers, F2 feature layers and F3 feature layers with different resolutions and channel numbers. The feature maps of the F1 feature layer, the F2 feature layer and the F3 feature layer are processed by the adaptive feature scaling fusion AFRC module. The specific steps are as follows:

[0020] (1.1) The feature map of the Fm feature layer is X m , m=1, 2, 3, the feature map X of the Fn feature layer n Adjust to the feature map X m Same scale, n≠m:

[0021] When the feature map X n The scale is smaller than the feature map X m When the scale is n Upsample and use deconvolution to expand the feature map X n The size of the scale;

[0022] When the feature map X n The scale is larger than the feature map X m When the scale is n Down-sample and use the average pooling layer to transform the feature map X n The scale is reduced and the number of channels of the feature map is adjusted using the convolutional layer;

[0023] After scaling, we get the standardized feature map X 1→m , feature map X 2→m , feature map X 3→m ;

[0024] (1.2) For feature map X m→m After a 1×1 convolutional layer, the feature map X p→m After a 3×3 convolution layer, p≠m, the convolution results are added, and then a 1×1 convolution layer with an output channel of 3 is passed, and the output is adjusted to [0,1] using the softmax function. Finally, the adaptive spatial weights of the three-layer feature map are obtained. , and , each feature map is multiplied by its corresponding weight parameter matrix, and then the corresponding element values ​​are added to obtain the final feature fusion result. :

[0025] ;

[0026] in, Indicates that the feature map of the nth layer is resized to the feature map of the mth layer The eigenvector of the position, n=1, 2, 3; .

[0027] Furthermore, the adaptive spatial weight , and The calculation formula is:

[0028] ;

[0029] ;

[0030] ;

[0031] in, Depend on After 1×1 convolution, Depend on After 1×1 convolution, Depend on Obtained through 1×1 convolution.

[0032] Furthermore, the prediction result of the Head module at the detection end is an N×6 matrix, wherein N rows represent N target objects detected in an image data, and 6 columns represent the upper left corner horizontal coordinate, upper left corner vertical coordinate, lower right corner horizontal coordinate, lower right corner vertical coordinate, confidence, and category of the detection box of the target object, and all detection results are screened using the Distance Intersection-over-Union Non-maximum Suppression DIoU-NMS algorithm.

[0033] Furthermore, the step (2) performs coordinate system conversion on the coordinates of the detection frame to obtain the position of the grasping target relative to the end of the grasping robot arm. The specific steps are:

[0034] (2.1) Calculate the center pixel coordinates of the target object based on the coordinates of the detection frame , convert the coordinates of the center pixel point into the coordinates in the camera coordinate system, and the three-dimensional coordinates of the target object in the camera coordinate system The calculation formula is:

[0035] ;

[0036] in, is the depth distance of the center pixel, is the intrinsic parameter matrix of the camera;

[0037] (2.2) According to the hand-eye transformation matrix from the camera coordinate system to the robot arm end coordinate system, the three-dimensional coordinates of the target object in the camera coordinate system are transformed into the three-dimensional coordinates of the target object relative to the robot arm end.

[0038] Furthermore, the method for obtaining the hand-eye conversion matrix from the camera coordinate system to the robot arm end coordinate system is: setting the calibration plate at a fixed position, installing the camera at the end of the robot arm, moving the robot arm end, recording the posture of the robot arm end and the posture of the calibration plate image taken by the corresponding camera, and calculating the hand-eye conversion matrix from the camera coordinate system to the robot arm end coordinate system.

[0039] The present invention also adopts a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0040] The present invention also adopts a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0041] Beneficial effects: Compared with the prior art, the present invention has the significant advantage that the C3 module that introduces the CBAM attention mechanism is used in the detection model, which improves the adaptability and performance of occluded object detection. The model has strong feature extraction capabilities and can detect occluded targets. The Neck module adaptive feature scaling fusion AFRC module improves the detection speed. The model occupies little memory and is easy to deploy in the robot system. The method has practical application value, good versatility, accurate object positioning, and high picking and grasping accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the workflow of the control method of the present invention.

[0043] Figure 2 It is a schematic diagram of the Grasp-CAD target detection network structure in the present invention.

[0044] Figure 3 This is the module structure diagram of the CBAM channel space hybrid attention mechanism in the present invention.

[0045] Figure 4 It is a structural diagram of the AFRC adaptive feature scaling and fusion module in the present invention.

[0046] Figure 5 It is a schematic diagram of the YOLOv5 detection result in the prior art.

[0047] Figure 6 It is a schematic diagram of the Grasp-CAD detection results in the present invention. DETAILED DESCRIPTION

[0048] like Figure 1 As shown, in this embodiment, a method for grasping target positioning based on the Grasp-CAD target detection model is used. First, a Grasp-CAD target detection model is built, image data of several orange scenes are collected, and the orange targets to be picked are calibrated for the image data using LabelImg. A data set is made of the calibrated image data, and the training set and the verification set are divided into a training set and a verification set in a ratio of 8:2. The Grasp-CAD target detection model is built and trained, and the RGB image data of the collection environment is obtained. The image data is processed by the Grasp-CAD target detection model to obtain the coordinates of the detection box of the target object in the image data. The Grasp-CAD target detection model includes three parts: a backbone network Backbone module, a neck network Neck module, and a detection end Head module.

[0049] The robot arm control method based on the grasping target positioning method includes the following steps:

[0050] (1) First, power on and enable the robot arm, initialize the camera parameters and the robot arm joint angles. The six joint angles of the robot arm when it is reset are [0°, 90°, -90°, -180°, 90°, -180°]. Initialize the camera and set the resolution to 640 × 480. Read the camera intrinsic parameter matrix K. Turn on the camera to read the RGB image and depth image information in real time. The RGB image is used for object detection, and the depth map is used to obtain the actual distance of the object. Obtain the RGB image data of the acquisition environment, process the image data through the Grasp-CAD target detection model, and obtain the coordinates of the detection box of the target object in the image data.

[0051] like Figure 2 As shown in the figure, the specific steps of the Grasp-CAD target detection model to process image data are as follows:

[0052] (1.1) The dataset images are processed using mosaic data enhancement and adaptive anchor box calculation methods, and the images are scaled to a size of 640×640.

[0053] (1.2) The processed image is processed by the Backbone module. The processed image is first grouped by the focus module. BackBone includes CBS, C3, spatial pyramid pooling SPP (Spatial Pyramid Pooling) module and attention mechanism CBAM (Convolutional Block Attention Module) module. The CBS module performs convolutional layer feature extraction, including Conv convolution layer, BN normalization layer and SiLU activation function. The C3 module includes two branches, one of which performs convolution operation and the other branch performs residual connection through the bottleneck module after convolution operation, and then the outputs of the two branches are spliced; the spatial pyramid pooling SPP module is used to generate feature maps of different scales through maximum pooling; after the output of the C3 module, the CBAM channel spatial mixed attention mechanism is used for feature extraction to obtain richer semantic information and serve as the input for subsequent Neck part feature fusion.

[0054] like Figure 3 As shown in Figure 2, the CBAM module includes a channel attention mechanism module and a spatial attention mechanism module. The channel attention mechanism module fuses the residual features output by the C3 module into a graph. Two one-dimensional feature vectors are generated by maximum pooling and average pooling respectively according to the channel. The two one-dimensional feature vectors are summed after nonlinear feature changes through the fully connected network. After summing, the Sigmoid activation function is used to obtain the channel attention weight , the channel attention weight Fusion graph with residual features The channel attention mechanism feature map is obtained by matrix multiplication , the formula is:

[0055] ;

[0056] ;

[0057] Where σ represents the sigmoid activation function, MLP represents the multi-layer perceptron, AvgPool and MaxPool represent the average pooling and maximum pooling operations on the spatial information of the feature map, respectively. and They represent the global average pooling and maximum pooling of the RFM channel attention mechanism respectively. W0 and W1 represent the weights of the two layers of MLP, and the ReLU activation function is used after the W0 weight.

[0058] The spatial attention mechanism module converts the channel attention mechanism feature map Two two-dimensional feature maps are generated by maximum pooling and average pooling respectively according to the space. The two two-dimensional feature maps are concatenated and convolved. After convolution, the Sigmoid activation function is used to obtain the spatial attention weight. , the spatial attention weight Feature map with channel attention mechanism The residual channel spatial attention feature map is obtained by matrix multiplication , the formula is:

[0059] ;

[0060] ;

[0061] AvgPool and MaxPool represent the average pooling and maximum pooling operations on the channel information of the feature map, respectively, and Cat represents the connection operation. is a convolution of size 7×7. and They represent the global average pooling and maximum pooling of the RFC spatial attention mechanism respectively.

[0062] (1.3) The image processed by the Backbone module is processed by the Neck module; the Neck module includes the Feature Pyramid Networks (FPN), the Path Aggregation Network (PAN), and the Adaptive Feature Resize Merge (AFRC) module. The deep semantic features are first transferred from top to bottom through the FPN to the shallow layer, and the image is upsampled. The PAN transfers the shallow positioning information to the high layer from top to top and downsamples the image. The AFRC adaptive feature scaling and fusion module efficiently fuses feature maps of different scales to improve the detection speed of the model.

[0063] The feature pyramid network FPN and the path aggregation network PAN output three feature layers with different resolutions and channel numbers, denoted as F1, F2 and F3, whose resolutions are 1 / 8, 1 / 16 and 1 / 32 of the original image respectively. To fuse feature maps of different scales, it is necessary to first adjust them to a unified scale, and use the AFRC adaptive feature scaling and fusion module to perform feature scaling and adaptive feature fusion of different scales, which correspond to the output of AFRC-1, AFRC-2 and AFRC-3 respectively. The specific steps of the AFRC module are as follows:

[0064] like Figure 4 As shown, the scale feature of the input layer Fm(m∈{1,2,3}) is set to X m, the features X of other feature layers Fn (n≠m) n Adjust to X m The same scale size. For feature maps with a scale smaller than the given scale size, it is necessary to upsample the feature map and use deconvolution (Deconv) with a convolution kernel size of 2×2 (step size of 2) to expand the size of the feature map. For feature maps with a scale larger than the given scale size, it is necessary to downsample the feature map and use an average pooling layer with a step size of 2 to adjust the feature map to 1 / 2 of the current size, and use a 1×1 convolution layer to adjust the number of channels of the feature map. Use two average pooling layers (step size of 2) to downsample to 1 / 4, and use a 1×1 convolution layer to adjust the number of channels of the feature map to achieve a unified scale of the feature map.

[0065] After scaling by scale feature, we get X 1→m , X 2→m , X 3→m After standardization, for the feature map X of the same layer m→m After 1×1 convolutional layer, for the feature maps X of different layers p→m (p≠m) After a 3×3 convolution layer, the convolution results are added, and then a 1×1 convolution layer with an output channel of 3 is passed, and the output is adjusted to [0,1] using the softmax function. Finally, the adaptive spatial weights of the three-layer feature map are obtained. , and , each feature map is multiplied by its corresponding weight parameter matrix, and then the corresponding element values ​​are added to obtain the final feature fusion result. Indicates that the feature map of the nth layer is resized to the feature map of the mth layer The feature vector of the position corresponds to the feature fusion result of the mth level as follows:

[0066] ;

[0067] in, , and are the spatial fusion weights from three different feature layers to the corresponding output feature layer, which are adaptively learned by the network. They can be scalar variables, shared in all channels, and specified at the same time. and , and define:

[0068] ;

[0069] ;

[0070] ;

[0071] in: , , Depend on , , After 1×1 convolution, , , By using the softmax function with control parameters , , , adjust its output to between [0,1].

[0072] (1.4) The fused feature map is input into the detection end Head module for prediction (Detect). The prediction result of Head is an N×6 matrix, where N rows represent N objects detected in a picture, and 6 columns represent the upper left corner horizontal coordinate, upper left corner vertical coordinate, lower right corner horizontal coordinate, lower right corner vertical coordinate, confidence, and category of the object detection rectangle. All possible detection results are screened using the DIoU-NMS algorithm to obtain results with higher probability. If there is no orange, the chassis moves until the target is detected. If there is, the chassis stops and the RGB image is aligned with the depth map.

[0073] (2) Based on the coordinates of the detection frame, obtain the position of the target object relative to the end of the robotic arm. The specific steps are:

[0074] (2.1) Calculate the center pixel coordinates of the target object based on the coordinates of the detection frame , take the average depth of the center point and its eight adjacent pixels as the depth distance d of the center point. Determine the depth distance d and the maximum reachable distance D of the robot arm max If d>D max The target is too far away, and the chassis moves gradually closer to the target. If d <D max , then perform pose estimation. Convert the center pixel coordinates into the coordinates in the camera coordinate system, and the three-dimensional coordinates of the target object in the camera coordinate system The calculation formula is:

[0075] ;

[0076] in, is the depth distance of the center pixel, is the intrinsic parameter matrix of the camera;

[0077] (2.2) According to the hand-eye conversion matrix from the camera coordinate system to the robot end coordinate system, the three-dimensional coordinates of the target object in the camera coordinate system are converted into the three-dimensional coordinates of the target object relative to the robot end. Read the current end position of the robot [x0, y0, z0, rx, ry, rz], where x0, y0, z0 are the three-dimensional coordinates of the robot end relative to the robot base, and rx, ry, rz are the rotation angles of the robot end. The three-dimensional coordinates of the current robot end relative to the robot base and the three-dimensional coordinates of the object relative to the robot end can be added to obtain the final three-dimensional coordinates of the object relative to the robot base, thereby determining the position of the robot grasping the object.

[0078] (3) According to the position of the target object, the control angles of the six joints of the robot arm are obtained by inverse kinematics of the robot arm; the target joint angles are solved by inverse kinematics of the target pose. If there is no solution or a joint angle exceeds the limit, the number of times that it cannot be grasped is recorded, and the maximum count threshold is set to C. max , if count <C max That is, if the count is within the set threshold, re-detection is performed, otherwise the chassis moves to adjust the robot position. If the result of the inverse solution meets the conditions, trajectory planning is performed in the joint space.

[0079] (4) Based on the obtained control angle, the movement of the six joints of the robot arm is controlled so that the end of the robot arm reaches the position of the target object. The gripper closes to grasp the target object and places it in the corresponding place, thus completing the grasping action of the target object.

[0080] like Figure 5 As shown in FIG. 1 , the YOLOv5 detection model has the problem of missed detection. When the fruit is blocked by leaves, it cannot be detected. However, the Grasp-CAD detection model in this embodiment has a good detection effect and can also detect blocked targets. Figure 6 The YOLOv5 detection model takes 25.49 seconds to detect 50 images, while the Grasp-CAD detection model in this embodiment takes 12.08 seconds to detect 50 images. It can be seen that the detection model used in this embodiment has a faster detection speed.

Claims

1. A grasping target positioning method based on the Grasp-CAD target detection model, characterized in that: The following steps are involved: (1) Obtain a dataset for target detection; (2) training a Grasp-CAD target detection model according to the acquired data set; obtaining a trained Grasp-CAD target detection model for identifying the plane coordinates of the target object in the image data; the Grasp-CAD target detection model comprises a backbone network Backbone module, a neck network Neck module and a detection end Head module connected in sequence, the backbone network Backbone module comprises a C3 module that introduces a CBAM attention mechanism for feature extraction, the neck network Neck module comprises a feature pyramid network FPN and a path aggregation network PAN and an adaptive feature scaling fusion AFRC module, and the adaptive feature scaling fusion AFRC module is used to scale and adaptively fuse features of different scales of the feature pyramid network FPN and the path aggregation network PAN; After the output of the C3 module, the attention mechanism CBAM module is used to extract features as the input of the neck network Neck module; The CBAM module includes a channel attention mechanism module and a spatial attention mechanism module; The channel attention mechanism module fuses the residual features output by the C3 module Two one-dimensional feature vectors are generated by maximum pooling and average pooling respectively according to the channel. The two one-dimensional feature vectors are summed after nonlinear feature changes through the fully connected network. After summing, the Sigmoid activation function is used to obtain the channel attention weight , the channel attention weight Fusion graph with residual features The channel attention mechanism feature map is obtained by matrix multiplication ; The spatial attention mechanism module converts the channel attention mechanism feature map Two two-dimensional feature maps are generated by maximum pooling and average pooling respectively according to the space. The two two-dimensional feature maps are concatenated and convolved. After convolution, the Sigmoid activation function is used to obtain the spatial attention weight. , the spatial attention weight Feature map with channel attention mechanism The residual channel spatial attention feature map is obtained by matrix multiplication ; The feature pyramid network FPN transfers the semantic features of the deep layer to the shallow layer from top to bottom, and the path aggregation network PAN transfers the positioning information of the shallow layer to the high layer from top to top. The feature pyramid network FPN and the path aggregation network PAN output three F1 feature layers, F2 feature layers and F3 feature layers with different resolutions and channel numbers. The feature maps of the F1 feature layer, F2 feature layer and F3 feature layer are processed by the adaptive feature scaling fusion AFRC module. The specific steps are as follows: (1.1) The feature map of the Fm feature layer is X m , m=1, 2, 3, the feature map X of the Fn feature layer n Adjust to the feature map X m Same scale, n≠m: When the feature map X n The scale is smaller than the feature map X m When the scale is n Upsample and use deconvolution to expand the feature map X n The size of the scale; When the feature map X n The scale is larger than the feature map X m When the scale is n Down-sample and use the average pooling layer to transform the feature map X n The scale is reduced and the number of channels of the feature map is adjusted using the convolutional layer; After scaling, we get the standardized feature map X 1→m , feature map X 2→m , feature map X 3→m ; (1.2) For feature map X m→m After a 1×1 convolutional layer, the feature map X p→m After a 3×3 convolution layer, p≠m, the convolution results are added, and then a 1×1 convolution layer with an output channel of 3 is passed, and the output is adjusted to [0,1] using the softmax function. Finally, the adaptive spatial weights of the three-layer feature map are obtained. , and , each feature map is multiplied by its corresponding weight parameter matrix, and then the corresponding element values ​​are added to obtain the final feature fusion result. : ; in, Indicates that the feature map of the nth layer is resized to the feature map of the mth layer The eigenvector of the position, n=1, 2, 3; ; (3) Acquire image data of the grasping environment in real time; (4) Based on the acquired image data, the coordinates of the detection box of the grasped target in the image data are obtained by processing it through the trained Grasp-CAD target detection model; (5) Perform coordinate system transformation on the coordinates of the detection frame to obtain the position of the grasped target relative to the end of the grasping robot arm.

2. The method for positioning a grasping target according to claim 1, characterized in that: The backbone network Backbone module includes a CBS module, a C3 module, a spatial pooling pyramid SPP module, and an attention mechanism CBAM module; The CBS module includes a Conv convolution layer, a BN normalization layer and a SiLU activation function, which are used to extract convolutional layer features from the acquired image data; The C3 module includes two branches, one of which performs a convolution operation, and the other branch performs a residual connection through a Bottleneck module after the convolution operation, and then the outputs of the two branches are spliced; The spatial pooling pyramid SPP module is used to generate feature maps of different scales through maximum pooling.

3. The method for positioning a grasping target according to claim 2, characterized in that: The adaptive spatial weight , and The calculation formula is: ; ; ; in, Depend on After 1×1 convolution, Depend on After 1×1 convolution, Depend on Obtained through 1×1 convolution.

4. The method for positioning a grasping target according to claim 1, characterized in that: The prediction result of the Head module at the detection end is an N×6 matrix, wherein N rows represent N target objects detected in an image data, and 6 columns represent the upper left corner horizontal coordinate, upper left corner vertical coordinate, lower right corner horizontal coordinate, lower right corner vertical coordinate, confidence, and category of the detection box of the target object, and all detection results are screened using the Distance Intersection-over-Union Non-Maximum Suppression DIoU-NMS algorithm.

5. The method for positioning a grasping target according to claim 1, characterized in that: The step (2) converts the coordinates of the detection frame into a coordinate system to obtain the position of the grasping target relative to the end of the grasping robot arm. The specific steps are: (2.1) Calculate the center pixel coordinates of the target object based on the coordinates of the detection frame , convert the coordinates of the center pixel point into the coordinates in the camera coordinate system, and the three-dimensional coordinates of the target object in the camera coordinate system The calculation formula is: ; in, is the depth distance of the center pixel, is the intrinsic parameter matrix of the camera; (2.2) According to the hand-eye transformation matrix from the camera coordinate system to the robot arm end coordinate system, the three-dimensional coordinates of the target object in the camera coordinate system are transformed into the three-dimensional coordinates of the target object relative to the robot arm end.

6. The method for positioning a grasping target according to claim 5, characterized in that: The method for obtaining the hand-eye conversion matrix from the camera coordinate system to the robot end coordinate system is as follows: setting the calibration plate at a fixed position, installing the camera at the end of the robot arm, moving the robot end, recording the posture of the robot end and the posture of the calibration plate image taken by the corresponding camera, and calculating the hand-eye conversion matrix from the camera coordinate system to the robot end coordinate system.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 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 6 are implemented.

Citation Information

Patent Citations

  • Target detection method and system based on attention mechanism and feature cross fusion

    CN115035361A

  • Underwater garbage detection method and system

    CN115797658A