Waste cable grabbing and classifying method and system based on neural network machine vision
By using neural network machine vision methods and combining Transformer and CNN architectures, high-precision identification and automated processing of waste cables have been achieved, solving the problems of insufficient identification accuracy and stability in existing technologies and improving recycling efficiency and safety.
Patent Information
- Application Number
- CN202511041594.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-04
AI Technical Summary
In the current technology, the identification and classification of waste cables mainly rely on manual labor, which is inefficient and poses safety hazards. Furthermore, machine vision methods lack sufficient accuracy and stability in complex environments, making it difficult to achieve automated recycling.
A neural network-based machine vision approach is adopted, which uses feature data acquisition, feature extraction, channel and spatial attention processing, and a neural network with a hybrid architecture of Transformer and CNN to identify the location and type of waste cables, and then uses a gripping device for automated processing.
It achieves high-precision identification of waste cables in complex environments, reduces the false judgment rate, and realizes a fully automated process from identification to grasping to classification, thereby improving recycling efficiency and reducing labor costs and safety risks.
Smart Images

Figure CN120894634A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of waste cable recycling, and particularly relates to a waste cable grabbing and classifying method and system based on neural network machine vision. BACKGROUND
[0002] Waste cables contain a large amount of non-ferrous metals and recyclable materials, such as copper and aluminum, and therefore, the recycling of waste cables is an important link of resource recycling, and the classification accuracy will directly affect the separation efficiency and recycling value of metal and non-metal materials.
[0003] At present, the identification and classification of waste cables in the industry mainly rely on manual classification and handling, which is low in efficiency and has safety hazards. At the same time, manual identification is prone to misjudgment, resulting in resource waste and increased recycling cost.
[0004] In recent years, some classification methods based on machine vision have been introduced into some technologies, which can preliminarily identify cables, but still face problems such as lack of data, insufficient real-time performance, lack of multi-modal fusion, and lack of effective combination with grabbing and processing equipment in the waste cable recycling scene, making it difficult to realize the automatic recycling process.
[0005] Therefore, the prior art needs to be further developed. SUMMARY
[0006] The present application aims to overcome the above technical deficiencies and provide a waste cable grabbing and classifying method and system based on neural network machine vision to solve the technical problem of improving the recognition accuracy and stability of the type and position of waste cables in complex environments in the related art.
[0007] To achieve the above technical purpose, the present application adopts the following technical solution: a waste cable grabbing and classifying method based on neural network machine vision is provided, which comprises: collecting feature data of waste cables; performing feature extraction based on the feature data to obtain a feature map of the waste cables; performing channel attention processing and spatial attention processing on the feature map to obtain a feature vector; inputting the processed feature vector into a preset analysis model to obtain the position and type of the waste cables; and determining a grabbing scheme according to the position and type of the waste cables.
[0008] Further, the method of feature extraction based on appearance data is specifically: pre-processing the feature data to obtain standardized data; extracting global features and local features of the waste cables based on the standardized data; and performing feature fusion on the global features and local features to obtain a feature map of the waste cables.
[0009] Furthermore, the method for obtaining the feature vector includes: performing spatial dimension processing on the feature map of the waste cable to obtain the channel attention weight vector; performing channel dimension processing on the feature map of the waste cable to obtain the spatial attention weight map; and multiplying the spatial attention weight map with the channel attention weight vector to obtain the feature vector.
[0010] Furthermore, the method for spatial dimension processing of the feature map of waste cables includes: performing global average pooling and global max pooling on the feature map in the spatial dimension to obtain Zavg and Zmax; inputting Zavg and Zmax into the first fully connected layer and the second fully connected layer respectively, wherein the first fully connected layer compresses the number of channels to C / r, where r is the compression ratio, and the second fully connected layer restores the number of channels to C; obtaining the channel attention weight vector through the Sigmoid activation function, the calculation formula is: s=σ(W2δ(W1z) avg )+W3δ(W1z max )); where Zavg is the result of global average pooling, Zmax is the result of global max pooling, W1, W2, and W3 are all weight matrices of the fully connected layer, σ is the ReLU activation function, δ is the Sigmoid activation function, and s is the channel attention weight vector; the channel attention weight vector is multiplied by the original feature map to achieve weighting of features of different channels.
[0011] Furthermore, the method for channel-dimensional processing of the feature map of waste cables includes: performing average pooling and max pooling on the feature map along the channel dimension to obtain... and Will and The layers are stitched together along the channel dimension; the stitched layers are then processed by a 7×7 convolutional layer. and Feature extraction is performed; the spatial attention weight map is obtained based on the Sigmoid activation function, and the calculation formula is as follows: in, This is the average pooling result along the channel dimension. f is the result of max pooling along the channel dimension. 7×7 This is a 7×7 convolution operation.
[0012] Furthermore, the pre-defined analysis models include: a cable location model, which adopts a regression network structure and maps feature vectors to the position coordinates and orientation information of waste cables in the feature map through multiple fully connected layers; a cable classification model, which maps feature vectors to the probability distribution of different types of waste cables through fully connected layers; and a cable defect segmentation model, which adopts a fully convolutional network structure and gradually restores the size of the feature map through convolutional layers and upsampling layers to obtain a segmentation mask of the same size as the input image, wherein the value of each pixel in the segmentation mask represents the probability that the location belongs to the defect region.
[0013] Furthermore, the probability distribution calculation method for different types of waste cables is as follows: Where Zi is the output value of the i-th category, and n is the total number of categories.
[0014] Furthermore, the gripping scheme includes: calculating the gripping path and gripping angle of the grippers based on the location of the waste cable; and obtaining the gripping force of the grippers based on the type of waste cable.
[0015] A waste cable grasping and classification system based on neural network machine vision is also provided. This system includes: a data acquisition unit for collecting feature data of the waste cables; a feature extraction unit for extracting features from the feature data to obtain feature maps of the waste cables; an attention processing unit for performing channel attention and spatial attention processing on the feature maps to obtain feature vectors; a classification unit for inputting the processed feature vectors into a preset analysis model to obtain the location and type of the waste cables; and a grasping unit for determining a grasping scheme based on the location and type of the waste cables.
[0016] A computer-readable storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a processor, implement the steps of any of the above-mentioned neural network machine vision-based waste cable grasping and classification methods.
[0017] Beneficial effects:
[0018] 1. The waste cable grabbing and classification method based on neural network machine vision of the present invention adopts advanced machine vision technology and neural network algorithm, which can accurately identify the type and location of waste cables in complex environments. The recognition accuracy is high and the false judgment rate is greatly reduced. At the same time, the recognition system and grabbing equipment are organically combined, and the grabbing plan is formulated according to the type of waste cable. The fully automated process of waste cable from recognition to grabbing to classification is realized, which improves recycling efficiency, reduces manual intervention, and reduces labor costs and safety risks.
[0019] 2. The waste cable grabbing and classification method based on neural network machine vision of this invention adopts a neural network recognition module with a hybrid architecture of Transformer and CNN. The SwingTransformer is used as the backbone network to capture the global structural features of the cable, such as its overall shape and degree of curvature. The hybrid CNN architecture is used to extract local detailed features, such as the outer sheath texture and joint solder points. Simultaneously, channel attention (SE module) and spatial attention (CBAM module) are introduced to enhance the model's ability to focus on key features, improve recognition accuracy, and construct an industrial-grade data augmentation system. The dataset is expanded through optical simulation enhancement, defect feature synthesis, and multimodal data fusion to enhance adaptability and stability in complex scenarios.
[0020] 3. The waste cable grasping and classification system based on neural network machine vision of the present invention has strong adaptability and can effectively identify and process waste cables of different types, specifications and stacking methods. It is suitable for various waste cable recycling sites. Attached Figure Description
[0021] Fig. 1 This is a flowchart of the waste cable grabbing and classification method based on neural network machine vision used in the embodiments of the present invention;
[0022] Fig. 2 This is a schematic diagram of the structure of the waste cable grabbing and classification system based on neural network machine vision used in an embodiment of the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0024] According to an embodiment of the present invention, a method for grasping and classifying waste cables based on neural network machine vision is provided. Please refer to [link / reference]. Figs. 1-2 ,include:
[0025] S100 collects characteristic data of waste cables;
[0026] In practice, the method for collecting characteristic data of waste cables is to use multiple high-definition industrial cameras and light source systems to collect images of the waste cable stacking area from different angles, and obtain image information including cable appearance, cross-section and other features.
[0027] The parameters of the camera and light source can be adjusted according to the actual situation to ensure that the acquired images are clear and accurate.
[0028] S200 performs feature extraction based on feature data to obtain a feature map of waste cables;
[0029] In the waste cable grabbing and classification method based on neural network machine vision in this embodiment, the specific method for feature extraction based on feature data is as follows:
[0030] S210 preprocesses the feature data to obtain standardized data;
[0031] Specifically, the feature data of the waste cables (i.e., images of the waste cables) are input into the preprocessing module, where the image size is uniformly adjusted to a fixed size to meet the network input requirements. Subsequently, a normalization operation is performed, mapping the pixel values to the [0,1] interval. The calculation formula is as follows:
[0032]
[0033] Where x is the original pixel value, x min and x max These represent the minimum and maximum pixel values of the image, respectively. Furthermore, to enhance the model's generalization ability, random data augmentation operations such as flipping, rotating, and scaling are performed.
[0034] Preferably, the image size is 224×224 pixels.
[0035] S220 extracts global and local features of waste cables based on standardized data;
[0036] In practice, the specific methods for extracting global features are as follows:
[0037] The preprocessed image is divided into non-overlapping patches, where each patch is a block and each patch is 4×4 pixels in size. Each patch is mapped to an embedding vector of dimension C through a linear projection layer, resulting in a patch embedding. At this point, the image is transformed into a two-dimensional patch embedding sequence with the shape... H and W represent the height and width of the original image, respectively.
[0038] Preferably, C is 96.
[0039] Furthermore, a hierarchical architecture is adopted for feature extraction, comprising multiple Stages. Each Stage contains multiple TransformerBlocks, and within each Block, the following operations are performed:
[0040] 1. Windowed Multi-Head Self-Attention (W-MSA): The patch embedding sequence is divided into multiple non-overlapping windows, each with a size of MxM (e.g., 7x7). Multi-head self-attention is calculated independently within each window. The calculation process is as follows:
[0041]
[0042] Where Q, K, and V are the query, key, and value matrices, respectively, and d k The key dimension. A multi-head mechanism is used to capture feature relationships within the window from different angles.
[0043] 2. Shifted Window Multi-Head Self-Attention (SW-MSA): To enable information exchange between windows, a shifted window operation is used. Windows are periodically shifted, allowing patches from adjacent windows to participate in the computation, thus obtaining broader contextual information. After the shifted window operation, the windows are redefined and multi-head self-attention computation is performed.
[0044] 3. Multilayer Perceptron (MLP): At the end of each block, the features calculated by self-attention are further extracted by performing a non-linear transformation using a multilayer perceptron. An MLP consists of two fully connected layers, with the GELU activation function used in between. The formula is as follows:
[0045] GELU(x) = xΦ(x);
[0046] Where Φ(x) is the cumulative distribution function of the standard normal distribution.
[0047] As the network hierarchy deepens, the receptive field is gradually expanded by merging adjacent windows in different stages, allowing for the extraction of higher-level global features, such as the overall shape and curvature of the cable.
[0048] In this embodiment, the method for extracting local features is as follows: a Residual Network (ResNet) is used as the basic architecture of the CNN to enhance the training stability and feature extraction capability of the network. The Residual Network comprises multiple convolutional layers, pooling layers, and residual blocks.
[0049] Specifically, convolutional layers use kernels of different sizes (e.g., 3×3) to perform convolution operations on the input feature map to extract local texture features. The convolution process can be represented as:
[0050]
[0051] Where, x i+m,j+n For the input feature map, k m,n y is the convolution kernel, b is the bias, and y is the bias. i,j This is for outputting feature maps.
[0052] In practice, pooling layers use max pooling for downsampling to reduce the size of the feature map while preserving important features. The pooling window size is typically 2×2, with a stride of 2.
[0053] Furthermore, the residual block directly adds the input to the output through skip connections, solving the vanishing gradient problem in deep network training. The residual block contains multiple convolutional layers and activation functions, and its output is:
[0054] y = F(x) + x;
[0055] Where F(x) is the result of the convolution operation within the residual block.
[0056] In this embodiment, through multi-layer convolution and pooling operations, CNN can extract local detailed features such as cable sheath texture and joint solder joints, as well as cross-sectional texture details.
[0057] S230 fuses global and local features to obtain a feature map of the waste cable.
[0058] Specifically, the feature fusion method includes merging the global features extracted by SwinTransformer and the local features extracted by CNN in the feature fusion layer, and connecting the two feature maps in the channel dimension by channel concatenation to obtain the fused feature map.
[0059] S300 performs channel attention and spatial attention processing on the feature map to obtain the feature vector;
[0060] In the waste cable grabbing and classification method based on neural network machine vision in this embodiment, the method for obtaining the feature vector includes:
[0061] S310 performs spatial dimension processing on the feature map of the waste cable to obtain the channel attention weight vector; specifically, the method for performing spatial dimension processing on the feature map of the waste cable includes:
[0062] The fused feature map is then subjected to global average pooling and global max pooling in the spatial dimension through the channel attention module (SE module) to obtain two 1×1×C vectors, namely Zavg and Zmax.
[0063] These two vectors (Zavg and Zmax) are distributed and input into two fully connected layers (the first fully connected layer and the second fully connected layer). The first fully connected layer compresses the number of channels to C / r, where r is the compression ratio, and the second fully connected layer restores the number of channels to C.
[0064] Preferably, r is 16.
[0065] The channel attention weight vector is obtained through the Sigmoid activation function, and the calculation formula is as follows:
[0066] s=σ(W2δ(W1z avg )+W3δ(W1z max ))
[0067] Among them, Z avg Z is the result of global average pooling. max The result is the global max pooling. W1, W2, and W3 are the weight matrices of the fully connected layer, σ is the ReLU activation function, δ is the Sigmoid activation function, and s is the channel attention weight vector.
[0068] Multiply the channel attention weight vector with the original feature map to achieve weighting of features from different channels.
[0069] S320 performs channel dimension processing on the feature map of waste cables to obtain a spatial attention weight map.
[0070] Specifically, methods for channel-dimensional processing of the feature maps of scrap cables include:
[0071] After channel attention processing, a spatial attention module (CBAM module) is used to perform average pooling and max pooling on the feature maps along the channel dimension, resulting in two H×W×1 feature maps, i.e. and
[0072] These two feature maps ( and (Splitting along the channel dimension;)
[0073] The stitched data is processed using a 7×7 convolutional layer. and Perform feature extraction;
[0074] The spatial attention weight map is obtained based on the Sigmoid activation function, and the calculation formula is as follows:
[0075]
[0076] in, This is the average pooling result along the channel dimension. f is the result of max pooling along the channel dimension. 7 ×7 This is a 7×7 convolution operation.
[0077] S330 multiplies the spatial attention weight map with the channel attention weight vector to obtain the feature vector.
[0078] In this embodiment, a balance is achieved between computational efficiency and feature representation capability through hierarchical window attention mechanism and multi-stage feature fusion. This not only solves the problems of low computational efficiency and difficulty in processing high-resolution images of ViT, but also makes up for the shortcomings of CNN in long-distance dependency modeling.
[0079] The S400 inputs the processed feature vectors into a preset analysis model to obtain the location and type of the waste cable. It should be noted that this embodiment employs a neural network recognition module with a hybrid Transformer and CNN architecture, based on the correlation between the thickness and curvature of the waste cable and its cross-sectional characteristics. The SwinTransformer serves as the backbone network, responsible for capturing the global structural features of the cable, such as its overall shape, thickness, and curvature; the CNN extracts local detail features, such as the outer sheath texture and joint solder points. Channel attention (SE module) and spatial attention (CBAM module) are introduced to enhance the model's ability to focus on key features and improve recognition accuracy.
[0080] In the waste cable grabbing and classification method based on neural network machine vision in this embodiment, the feature vectors processed by the attention mechanism are respectively input into the three task branches of the preset analysis model: cable positioning model, cable classification model and defect segmentation model.
[0081] Specifically, the cable location model adopts a regression network structure, which maps the feature vectors to the position coordinates (such as the upper left and lower right corner coordinates) and attitude information (such as rotation angle) of the waste cable in the feature map through multiple fully connected layers;
[0082] In practice, the cable localization model adopts a multi-branch regression network structure, which includes a position regression branch and a pose regression branch. The feature vector processed by the attention mechanism is input into the multi-branch regression network, and the CoordConv layer is used to add pixel coordinate channels to the input feature map, so as to obtain the position coordinate decoding and pose angle decoding.
[0083] Specifically, the feature vector processed by the attention mechanism is input into a multi-branch regression network structure. This multi-branch regression network includes a position regression branch and a pose regression branch, with different branches processing the feature vector for different purposes. The position regression branch extracts position-related features from the feature vector processed by the attention mechanism and with added pixel coordinate channels (through the CoordConv layer). These features may be related to the cable's endpoint location, the cable's direction, or its representation in the image or data space. Specific regression algorithms, such as linear or non-linear regression algorithms (e.g., regression layers based on neural networks, possibly fully connected layers), are then used to process these features. This process transforms the information in the feature vector into specific position coordinates based on patterns learned by the model beforehand. For example, cable positioning on a two-dimensional plane yields coordinate values like (x, y); in three-dimensional space, it yields coordinate values like (x, y, z), representing the cable's specific location in space. During training, the location regression branch will be optimized and adjusted based on known cable location labels (such as manually labeled accurate location coordinates) to make the output location coordinates as close as possible to the true values.
[0084] The attitude regression branch also extracts attitude-related features from the previously processed feature vectors. These features may be related to cable shape variations, relative angles between different parts, etc. Appropriate regression algorithms for attitude analysis are then used. For example, angle regression might employ trigonometric function calculations or angle-range-based classification regression methods. For complex attitude information such as cable bending, geometric feature analysis combined with the regression capabilities of neural networks might be utilized. During the training phase, the attitude regression branch is trained and optimized based on accurate attitude labels (such as actual cable attitude angles obtained through measurement tools), ensuring that the model's output attitude angle decoding results accurately reflect the actual attitude of the cable.
[0085] In multi-branch regression networks, the CoordConv layer is used to add pixel coordinate channels to the input feature map. This step helps the model better understand the position information of each pixel in the feature map, thereby enabling more accurate subsequent decoding.
[0086] The position regression branch decodes the cable's position coordinates based on the previously processed feature vectors. This decoding process reveals the cable's spatial coordinates, such as its specific location (x, y, z coordinates) in a specific recycling scenario. Simultaneously, the attitude regression branch decodes the cable's attitude angles based on the same processed feature vectors. This operation determines the cable's attitude angles, such as its tilt angle, degree of bending, and other attitude-related information.
[0087] Through the above operations, the cable positioning model can obtain key information such as the cable's position coordinates and attitude angle, thereby providing support for positioning operations in the waste cable recycling process.
[0088] The cable type classification task branch maps the feature vectors to probability distributions for different cable types using a fully connected layer, and calculates the probability of each category using the Softmax activation function, as shown in the formula:
[0089]
[0090] Where, p i Zi represents the probability value of the i-th category, i.e., the probability that the waste cable belongs to the i-th type, with a value ranging from [0,1]. The sum of the probabilities of all categories is 1. Zi is the output value of the i-th category, output by the fully connected layer of the cable classification model, reflecting the original score of the category feature. n is the total number of categories, i.e., the total number of waste cable types to be classified. j is the category index, used to traverse all categories (j ranges from 1 to n). j is the output value for the j-th category, similar to Zi, which is the original score of the fully connected layer corresponding to the j-th cable type.
[0091] Preferably, after the cable type classification task branch receives the feature vector processed by the attention mechanism, the feature vector contains relevant feature information of the cable. These features come from data processing results from various aspects such as image analysis and physical characteristic measurement of the cable.
[0092] Furthermore, the input feature vector enters the fully connected layer. The neurons in the fully connected layer are connected to every neuron in the previous layer, and its function is to perform a linear transformation on the input feature vector. The fully connected layer uses learned weight parameters to perform operations such as weighted summation on the input feature vector, mapping it to a new vector space. The dimension of this new vector space is related to the number of cable types to be classified. For example, if there are n cable types to classify, the dimension of the vector after mapping by the fully connected layer might be n.
[0093] Specifically, the vector obtained after passing through the fully connected layer enters the Softmax activation function. The Softmax function converts each element in the vector output by the fully connected layer into a probability value between 0 and 1, and the sum of the probability values of all elements is 1.
[0094] Specifically, for the vector output by the fully connected layer, the Softmax function calculates the probability of each category, thus obtaining the probability distribution of the input feature vector belonging to each cable type.
[0095] Furthermore, based on the calculated probability distribution of each category, the type of cable can be determined. Typically, the category with the highest probability value is considered the type of cable. For example, if the calculated probability of a cable belonging to type A is 0.6, to type B is 0.3, and to type C is 0.1, then the cable is classified as type A.
[0096] The cable defect segmentation task branch adopts a fully convolutional network (FCN) structure, which gradually restores the size of the feature map through convolutional layers and upsampling layers, and finally outputs a segmentation mask with the same size as the input image. The value of each pixel represents the probability that the location belongs to the defect region.
[0097] In practice, the feature vector processed by the attention mechanism is used as input. This feature vector has been weighted by the attention mechanism for different parts of the cable image, highlighting important information related to cable defects, strengthening features of suspected defect areas, and weakening features of irrelevant areas.
[0098] A fully convolutional network (FCN) structure contains an initial convolutional layer. The input feature vector enters the initial convolutional layer, which performs convolution operations using kernels to further extract feature information from the feature vector. Since the input is already a processed feature vector, the convolution operation here focuses more on integrating and further abstracting the features emphasized by the attention mechanism. During this process, the dimension of the feature vector changes; the number of channels increases, and the spatial dimension is adjusted according to factors such as the kernel size and stride.
[0099] Furthermore, higher-level features are extracted through convolutional operations. The convolutional kernels here learn the relationships between features processed by the attention mechanism to better identify defect features. With each convolutional layer, the features become more abstract, better distinguishing feature patterns from defective and normal regions. After several convolutional layers, upsampling is performed to gradually restore the image to the size corresponding to the input image. Upsampling layers use methods such as transposed convolution to increase the size of the feature map, while maintaining an accurate representation of the defect region based on the learned feature information. This process may be gradual, with alternating upsampling and convolutional layers achieving finer segmentation. After a series of convolutional and upsampling layers, a segmentation mask of the same size as the input image is finally output. The value of each pixel in the segmentation mask represents the probability that the location belongs to a defect region. This probability is based on the input feature vector processed by the attention mechanism, and is obtained after a series of processing steps by a fully convolutional network, thus achieving the segmentation of cable defects.
[0100] During training, a joint loss function is used to optimize the three tasks. The loss function is as follows:
[0101] L=αL loc +βL cls +γL seg ;
[0102] Among them, L loc L cls L seg These are the loss functions for cable location, type classification, and defect segmentation tasks, respectively, with α, β, and γ being weighting coefficients used to balance the importance of different tasks.
[0103] The S500 determines the gripping scheme based on the location and type of the waste cable. Specifically, based on the location of the waste cable, the gripping path and gripping angle of the gripper are calculated; based on the type of waste cable, the gripping force of the gripper is obtained.
[0104] In practice, the robotic arm employs a multi-joint structure, exhibiting high flexibility and precision, enabling it to quickly and accurately reach and grasp cables in complex environments. The gripping jaws apply varying degrees of force depending on the cable type and specifications, ensuring stable and reliable grasping.
[0105] Specifically, based on the location and type information of the waste cables output by the neural network recognition module, the system will perform a series of precise and coordinated operations to control the robotic arm and the gripping tool (i.e., gripper) at the end of the robotic arm to complete the precise gripping task.
[0106] First, the robotic arm's motion planning system generates a collision-free and efficient motion trajectory based on the spatial location data of the scrap cable and the robotic arm's own kinematic model. This process requires comprehensive consideration of factors such as the range of motion, speed limits, and acceleration constraints of each joint of the robotic arm to ensure that the gripper at the end of the robotic arm can smoothly and quickly reach the location of the cable.
[0107] During the movement of the robotic arm, a real-time feedback mechanism continuously plays a crucial role. Encoders and various sensors installed at the joints of the robotic arm constantly feed back information such as the actual position and posture of the robotic arm to the control system. By comparing the actual state with the preset trajectory, the control system makes timely fine adjustments to the movement of the robotic arm to ensure its motion accuracy.
[0108] Furthermore, as the robotic arm approaches the cable, the control system of the gripping tool begins to operate based on the cable type information.
[0109] Preferably, if the identified cable is a thin communication cable, the gripping tool may employ high-precision grippers. The gripper's control algorithm automatically adjusts the gripper's opening and closing degree according to the cable's diameter to achieve a gentle yet stable grip, avoiding damage to the cable's outer sheath. For thicker power cables, a clamp-type gripping tool with a buffer device may be selected. The control system adjusts the clamp's clamping force based on the cable's outer diameter and material characteristics, ensuring a secure grip without damaging the cable due to excessive force.
[0110] Preferably, to ensure the reliability of the gripping process, a force sensor monitors the gripping force in real time the instant the gripping tool contacts the cable. If the force sensor detects that the gripping force is below the preset value, the control system will control the gripping tool to further adjust the gripping force; if the gripping force is too large, the system will appropriately relax it to prevent excessive compression of the cable. Thus, throughout the entire gripping process, the vision system continuously monitors the gripping status. If it detects cable misalignment or unstable gripping posture, it will immediately feed back to the control system for timely adjustments, thereby achieving precise and safe cable gripping.
[0111] Example 1:
[0112] This embodiment establishes a closed-loop system for feature recognition, parameter mapping, and real-time control.
[0113] Specifically, the feature recognition system processes cross-sectional images of waste cables through a convolutional neural network (CNN) and outputs classification labels for the waste cables;
[0114] The parameter mapping system conducted grasping tests based on various standard cable samples and established the correspondence between classification labels and grasping parameters, as shown in Table 1. Then, based on the classification of waste cables, the grasping path, force, and angle were adjusted.
[0115] Table 1:
[0116]
[0117]
[0118] In practice, when performing the gripping action, the robotic arm further optimizes the gripping scheme according to the type of waste cable.
[0119] In some embodiments, a pressure sensor is provided on the gripper. If the pressure sensor detects slippage, the gripper instantly increases its force by 20%.
[0120] Example 2:
[0121] The discarded cable is located in a confined space. The motion planning algorithm prioritizes the path that minimizes the range of motion of each joint of the robotic arm in order to avoid collisions with surrounding obstacles.
[0122] In practical application, the waste cable grabbing and sorting method based on neural network machine vision in this embodiment also includes classifying and storing the grabbed waste cables according to different types and specifications, or transporting them to corresponding processing equipment for further processing. For example, cables of different materials are transported to copper recycling equipment, aluminum recycling equipment, etc., for smelting and purification, while waste materials such as insulation layers are transported to specialized processing equipment for recycling or incineration.
[0123] See Fig. 2 This embodiment also provides a waste cable grasping and classification system based on neural network machine vision. The waste cable grasping and classification system based on neural network machine vision includes: a data acquisition unit, which is used to collect feature data of waste cables; a feature extraction unit, which is used to extract features based on the feature data to obtain feature maps of waste cables; an attention processing unit, which is used to perform channel attention processing and spatial attention processing on the feature maps to obtain feature vectors; a classification unit, which is used to input the processed feature vectors into a preset analysis model to obtain the location and type of waste cables; and a grasping unit, which is used to determine a grasping scheme based on the location and type of waste cables.
[0124] Thus, the SwinTransformer is used as the backbone network to capture the global structural features of the cable, such as its overall shape and degree of curvature; the CNN extracts local detailed features, such as the outer sheath texture and joint solder points. Simultaneously, channel attention (SE module) and spatial attention (CBAM module) are introduced to enhance the model's ability to focus on key features and improve recognition accuracy. This embodiment of the neural network machine vision-based waste cable grasping and classification system constructs an industrial-grade data augmentation system by employing a hybrid Transformer and CNN architecture for feature extraction and attention processing units that incorporate channel attention (SE module) and spatial attention (CBAM module). The system expands the dataset through optical simulation enhancement, defect feature synthesis, and multimodal data fusion, enhancing its adaptability and stability in complex scenarios. This solves the technical problem in related technologies where the accuracy and stability of waste cable type and location identification in complex environments need improvement.
[0125] This embodiment also provides a computer-readable storage medium storing computer-readable instructions, characterized in that, when executed by a processor, the computer-readable instructions implement the various steps of the above-described method for grasping and classifying waste cables based on neural network machine vision.
[0126] This invention can take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to: novel memories such as phase-change memory / resistive random access memory / magnetic memory / ferroelectric memory (PRAM / RRAM / MRAM / FeRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical disc read-only memory (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0127] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0128] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0129] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0130] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0131] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for grasping and classifying waste cables based on neural network machine vision, characterized in that, include: Collect the characteristic data of the waste cables; Based on the feature data, feature extraction is performed to obtain the feature map of the waste cable; The feature map is subjected to channel attention and spatial attention processing to obtain feature vectors; The processed feature vectors are input into a preset analysis model to obtain the location and type of the waste cables; The grabbing scheme is determined based on the location and type of the waste cables.
2. The waste cable grasping and classification method based on neural network machine vision according to claim 1, characterized in that, The specific method for feature extraction based on the aforementioned feature data is as follows: The feature data is preprocessed to obtain standardized data; Based on the standardized data, global and local features of the waste cables are extracted; The global features and the local features are fused to obtain the feature map of the waste cable.
3. The waste cable grasping and classification method based on neural network machine vision according to claim 2, characterized in that, The method for obtaining the feature vector includes: Spatial dimension processing is performed on the feature map of the waste cable to obtain the channel attention weight vector; The feature map of the waste cable is processed in the channel dimension to obtain a spatial attention weight map; The feature vector is obtained by multiplying the spatial attention weight map with the channel attention weight vector.
4. The waste cable grasping and classification method based on neural network machine vision according to claim 3, characterized in that, The method for spatial dimension processing of the feature map of the waste cable includes: Global average pooling and global max pooling are performed on the feature map in the spatial dimension to obtain Zavg and Zmax; Zavg and Zmax are input to the first fully connected layer and the second fully connected layer, respectively. The first fully connected layer compresses the number of channels to C / r, where r is the compression ratio, and the second fully connected layer restores the number of channels to C. The channel attention weight vector is obtained through the Sigmoid activation function, and the calculation formula is as follows: s=σ(W2δ(W1z avg )+W3δ(W1z max )); Where Zavg is the result of global average pooling, Zmax is the result of global max pooling, W1, W2, and W3 are all weight matrices of the fully connected layer, σ is the ReLU activation function, δ is the Sigmoid activation function, and s is the channel attention weight vector. Multiply the channel attention weight vector with the original feature map to achieve weighting of features from different channels.
5. The waste cable grasping and classification method based on neural network machine vision according to claim 3, characterized in that, The method for channel dimension processing of the feature map of the waste cable includes: The feature map is subjected to average pooling and max pooling along the channel dimension to obtain... and Will and splicing along the channel dimension; The stitched data is processed using a 7×7 convolutional layer. and Perform feature extraction; The spatial attention weight map is obtained based on the Sigmoid activation function, and the calculation formula is as follows: in, This is the average pooling result along the channel dimension. f is the result of max pooling along the channel dimension. 7×7 This is a 7×7 convolution operation.
6. The waste cable grasping and classification method based on neural network machine vision according to claim 1, characterized in that, The preset analysis model includes: A cable location model is provided, which adopts a regression network structure and maps the feature vector to the position coordinates and orientation information of the waste cable in the feature map through multiple fully connected layers. A cable classification model, wherein the cable classification model maps the feature vector to the probability distribution of different types of waste cables through a fully connected layer; A cable defect segmentation model is provided, which adopts a fully convolutional network structure. The feature map size is gradually restored through convolutional layers and upsampling layers to obtain a segmentation mask with the same size as the input image. The value of each pixel in the segmentation mask represents the probability that the location belongs to the defect region.
7. The waste cable grasping and classification method based on neural network machine vision according to claim 6, characterized in that, The probability distribution calculation method for the different types of waste cables is as follows: Where Zi is the output value of the i-th category, and n is the total number of categories.
8. The waste cable grasping and classification method based on neural network machine vision according to claim 1, characterized in that, The crawling scheme includes: Based on the location of the waste cable, calculate the gripping path and gripping angle of the gripper; The gripping force of the grippers is determined based on the type of the waste cable.
9. A waste cable grasping and sorting system based on neural network machine vision, characterized in that, The waste cable grasping and sorting system based on neural network machine vision includes: Data acquisition unit, the data acquisition unit is used to acquire the characteristic data of the waste cable; A feature extraction unit is used to extract features based on the feature data to obtain a feature map of the waste cable. An attention processing unit is used to perform channel attention processing and spatial attention processing on the feature map to obtain a feature vector; A classification unit is used to input the processed feature vector into a preset analysis model to obtain the location and type of the waste cable; A gripping unit is used to determine a gripping scheme based on the location and type of the waste cable.
10. A computer-readable storage medium storing computer-readable instructions thereon, characterized in that, When the computer-readable instructions are executed by the processor, they implement the steps of the waste cable grasping and classification method based on neural network machine vision as described in any one of claims 1-8.