Smoked sheet rubber impurity removal path planning method based on visual guidance

By using vision-guided identification of impurities in flue gas resin and ant colony algorithm path planning, the problem of low efficiency in the automated removal of impurities in flue gas resin is solved, achieving highly efficient automatic identification and removal, which is suitable for industrial automation.

CN121767705APending Publication Date: 2026-03-31BEIJING UNIV OF CHEM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for the automatic identification and removal of impurities in smoked sheet adhesives are inefficient, hindering the progress of industrial automation.

Method used

A vision-guided approach is adopted, using a neural network built with an optimized YOLO algorithm for impurity identification, combined with ant colony algorithm for path planning, and SAHI slicing-assisted super inference model and lightweight detection head to improve detection accuracy and efficiency.

Benefits of technology

It achieves efficient and automatic identification and removal of impurities in smoked sheet adhesive, improves detection accuracy and model real-time performance, and is suitable for industrial automation needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767705A_ABST
    Figure CN121767705A_ABST
Patent Text Reader

Abstract

The invention provides a smoked sheet rubber impurity removal path planning method based on visual guidance. According to the method, work is executed based on an impurity identification model and a path planning model. Wherein the core of the impurity identification model is a neural network which is established on the basis of an optimized YOLO algorithm and is used for smoked sheet rubber image target identification, and in addition, an SAHI model is used for carrying out auxiliary prediction of impurities; the core of the path planning model is to carry out global path planning based on an ant colony algorithm. The specific execution process for completing smoked sheet rubber impurity identification and elimination path planning work by using the method comprises the steps of constructing a smoked sheet rubber data set, completing training of an impurity analysis model, performing impurity prediction based on the impurity analysis model, performing coordinate conversion on a smoked sheet rubber impurity image set, and obtaining the smoked sheet rubber impurity identification and elimination path planning work. And calculating an elimination path corresponding to the impurities based on the path planning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of visual inspection and path planning technology, and in particular to a path planning method for removing impurities from tobacco sheet adhesive based on visual guidance. Background Technology

[0002] Natural rubber, as a key raw material in industrial manufacturing, plays an irreplaceable role in the production of downstream products such as automobile tires, seals, and shock absorbers. Among these, smoked sheet rubber (SBR), an important processed product of natural rubber, is highly susceptible to foreign matter residue (i.e., impurities) during actual production due to insufficient raw material purity, uneven process control, and abnormal factors in the drying process. These impurities significantly weaken the mechanical properties of the finished product, and in severe cases, can even cause product failure, thus adversely affecting the overall quality and reliability of rubber products.

[0003] Currently, the mainstream method for removing tobacco sheet adhesive is to visually inspect it and then cut it off with scissors. This method not only requires a large amount of labor but is also inefficient, hindering the progress of industrial automation. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a path planning method for removing impurities from tobacco sheet adhesives based on visual guidance, thereby solving the problem of the lack of automatic identification and removal of tobacco sheet adhesive impurities in existing technologies.

[0005] This invention provides a method for path planning and impurity identification and removal in smoked sheet adhesives based on visual guidance technology. The method relies on an impurity identification model and a path planning model. The core of the impurity identification model is a neural network for target recognition in smoked sheet adhesive images, built based on an optimized YOLO algorithm. Furthermore, a slice-assisted hyper-inference (SAHI) model is used for auxiliary impurity prediction. The core of the path planning model is global path planning based on an ant colony algorithm.

[0006] In the construction of the impurity identification model, the YOLOv8n network structure was optimized. A detection model was established with smoked sheet images as input and impurity quantity and location as output. The model consists of a backbone network, a neck network, a detection head, and a SAHI slice-assisted hyper-inference model.

[0007] like Figure 1As shown, the Backbone section takes an RGB image with a size of 640×640×3 as input. After two layers of convolutional Conv (kernel size k=3, stride s=2, padding p=1), the resolution is reduced to 320×320 and 160×160, and the number of channels is expanded to 64 and 128. Then, an improved CSP_MSEIE module is introduced to extract high-level semantic information by fusing multi-scale convolutional kernels with edge features. After outputting 160×160×128 features, they are downsampled to 80×80×256 by convolutional Conv (k=3, s=2, p=1), and then stacked again with a CSP_MSEIE module to enhance non-linear representation and multi-scale consistency. Subsequently, 40×40×512 features are obtained through convolutional Conv (k=3, s=2, p=1), and a third CSP_MSEIE module is stacked to further deepen non-linear representation and multi-scale consistency. The feature map is then reduced to 20×20×1024 using convolutional Conv(k=3, s=2, p=1), and then the last CSP_MSEIE module is stacked for global semantic modeling. Finally, the SPPF module uses multi-scale pooling with kernel sizes of 5×5, 9×9, and 13×13 to aggregate features, outputting 20×20×1024 global features.

[0008] Neck employs a feature pyramid structure for multi-layer fusion. The 20×20×1024 features are upsampled to 40×40×1024 and then concatenated with the shallow 40×40×512 features, increasing the number of channels to 1536. After processing by the C2f module, the output is a 40×40×512 feature. This is then upsampled to 80×80×512 and concatenated with the Backbone's 80×80×256 features, expanding the number of channels to 768. After channel compression and feature refinement using the C2f module and convolutional Conv (k=3, s=2, p=1), a multi-scale feature pyramid of 80×80×256, 40×40×512, and 20×20×1024 is formed. During this process, an AFGC attention mechanism is embedded to enhance contour features and improve the detection performance of small targets and slender impurities.

[0009] Head employs a lightweight LSCD module to perform regression and classification predictions on the three scale features output by Neck, outputting corresponding 80×80, 40×40, and 20×20 grids to accommodate targets of different scales. The SAHI-assisted hyper-inference model is a target detection enhancement method based on an image slicing strategy, which can improve the detection performance of detection models in high-resolution images or small target scenes.

[0010] The CSP_MSEIE module integrates key mechanisms such as multi-scale feature extraction, edge information enhancement, and feature fusion, significantly improving the model's ability to represent complex structures. The structure of CSP_MSEIE is as follows: Figure 2 As shown, firstly, AdaptiveAvgPool is used to perform multi-scale adaptive pooling on the input feature map to extract information at different scales in local regions, effectively capturing multi-level features in the image. The given input feature map is X∈R. C×H×W (C, H, and W represent the number of channels, image height, and image width, respectively). Then, the feature F at different scales s∈{3,6,9,12}... s Represented as:

[0011] F s =Conv3(Conv1(AdaptiveAvgpool s (X))) (1)

[0012] Here, Conv3 and Conv1 represent convolution operations with kernel sizes of 3×3 and 1×1, respectively, used for information fusion and feature compression. AdaptiveAvgPool() represents downsampling the feature map to s×s.

[0013] Subsequently, the Edge Enhancer submodule is introduced to model fine-grained edges in the image, enhancing the model's sensitivity to key regions such as impurity contours and boundary breaks. The specific process is as follows: First, the input features... Figure X ∈R C×H×W (C, H, and W represent the number of channels, image height, and image width, respectively) Perform average pooling smoothing:

[0014]

[0015] Where k = 3 represents 3×3 average pooling, and s = 1 represents a step size of 1. The resulting smoothing... The low-frequency feature component is represented by E. By subtracting it from the original feature component, the high-frequency residual information E can be obtained.

[0016]

[0017] Then, a 3×3 convolution is used to extract the edge response, and an adaptive weight map is generated by passing it through a sigmoid activation function:

[0018] Y = X + σ(Conv) 3×3 (E)) (4)

[0019] Where σ() represents the Sigmoid activation function. Y indicates that the edge detail information is re-injected into the original feature map through residual enhancement, making the model's response to the target edge region more significant.

[0020] The features extracted from each branch are upsampled to their original size and then concatenated to obtain F. cat :

[0021] F cat =Concat(F3,F6,F9,F) 12 (5)

[0022] F3, F6, F9, F 12 These are features at different scales s∈{3,6,9,12}. `Concat()` represents feature fusion. After fusion, a 1×1 convolution is performed to integrate the channels.

[0023] F ms =Conv 1×1 (F cat (6)

[0024] F ms For the feature map after channel integration, Conv 1×1 This indicates a convolution operation with a 1×1 kernel. By overlaying multi-scale information, the model can simultaneously capture local details and global structural features.

[0025] Based on the characteristics and functions of the aforementioned CSP_MSEIE module, this example replaces the C2f module in the backbone network with the CSP_MSEIE module, resulting in better model performance.

[0026] The AFGC mechanism is a novel attention mechanism that integrates channel attention and spatial attention, enhancing the model's ability to recognize small targets in complex backgrounds. The structure of the AFGC module is as follows: Figure 3 As shown, the specific process is as follows: given the input feature map F∈R C×H×W (C, H, and W represent the number of channels, image height, and image width, respectively), the output of global average pooling, i.e., the channel descriptor U∈R. C×1×1 The formula for calculating the element value of the nth channel of the channel descriptor is:

[0027]

[0028] Where F n (i,j) represents the element value of the nth channel, i-th row, and j-th column of the feature map. Subsequently, using the strip matrix B = [b1,b2,…,b...]... k Extracting local channel information descriptor U lcDimension R C×1×1 This indicates that the correlation of neighboring channels is extracted by 1×1 convolution, and the specific formula is as follows:

[0029]

[0030] Where k is the number of neighborhood channels, b i This represents the i-th weight parameter of the 1×1 convolution kernel, used to capture the contribution of the i-th neighborhood channel. Simultaneously, a diagonal matrix D = [d1, d2, ... d...] is used. c Capture global channel information U gc Dimension R C×1×1 Global channel correlation is extracted using 1×1 convolution, with the specific formula as follows:

[0031]

[0032] Where j is the number of neighborhood channels, d j Let represent the j-th weight parameter of the 1×1 convolution kernel, used to model the global correlation across all channels. Furthermore, to fuse global and local information, a cross-granularity correlation matrix M is calculated:

[0033]

[0034] At this time, M i,j This represents the correlation between the i-th local channel and the j-th local channel. Extract the row and column weight vector from M:

[0035]

[0036] in, The total correlation strength between the i-th channel and all local channels; Let be the total association strength between the i-th channel and all global channels. The weights are adaptively adjusted using a learnable parameter θ.

[0037]

[0038] Where G represents the channel attention weights of the final output, with dimension R. C×1×1 σ() is the Sigmoid activation function, which maps values ​​to the [0,1] interval to normalize weights; θ is a learnable fusion parameter with dimension R. C×1×1 This is used to dynamically adjust the ratio of global to local weights. The final output feature map is obtained through modulation.

[0039]

[0040] Among them, F * The output feature map is after attention modulation, and its dimension is the same as the input feature map F (R). C×H×W )

[0041] In this way, the AFGC module can effectively enhance the model's focus on the target region, suppress background interference, and improve detection accuracy.

[0042] In this example, based on the excellent performance of the AFGC attention module, it is integrated into the neck network of YOLOv8 as the 23rd layer of the network, so that the model can better focus on the feature information of the target information.

[0043] Considering the need to deploy the model on a device to cut off detected impurities, this paper introduces a lightweight shared convolutional detection head, LSCD, to improve the model's real-time detection efficiency. For example... Figure 4 As shown, the LSCD module processes the feature maps of all detection layers through two 3×3 shared convolutional layers, significantly reducing model parameters and computational overhead while ensuring effective information transfer. Furthermore, to further optimize the detection head performance, this paper replaces the BN layer in the original convolution with a less computationally intensive and more efficient GN layer, designing the Conv_GN module. The GN structure is as follows... Figure 5 As shown, a 1×1 convolution is used to learn channel weights and reduce dimensionality, thereby enhancing the model's ability to extract features from small targets. Simultaneously, a Scale layer is introduced to scale the feature maps of different detection layers. Scale is a learnable scalar parameter (initialized to a given value, such as 1), which can alleviate the fluctuations in detection accuracy caused by differences in target scale.

[0044] In this example, the use of an LSCD detection head reduces structural redundancy and improves inference speed, making it suitable for tasks such as the detection of impurities in smoked sheet adhesives, which have dual requirements for accuracy and model lightweighting.

[0045] Finally, since the detection of impurities in smoked sheet adhesive is a high-resolution, small-target detection task, a SAHI slicing-assisted hyper-inference model is introduced in the prediction stage. The principle of SAHI slicing technology is as follows: Figure 6 As shown, the entire image is first divided into multiple sub-images, also known as slices, according to a set size. Each slice is individually fed into the object detection model for inference, thereby focusing on target features within a local area and effectively improving the detection model's sensitivity to small targets. After inference, SAHI stitches and integrates the detection results of each slice, and removes overlapping redundant boxes using non-maximum suppression (NMS) technology, ultimately generating the detection results for the entire image. The SAHI technique not only improves the detection accuracy of tobacco sheet impurities but also alleviates the computational burden of directly inputting high-resolution images, providing a more efficient and accurate inference strategy for deploying the model in real-world scenarios.

[0046] The path planning model described above primarily employs the ant colony optimization algorithm. The ant colony optimization algorithm is a heuristic intelligent optimization algorithm. Its search process is as follows: Figure 7 As shown, ants mark their paths by secreting pheromones when searching for food. Other ants tend to choose paths with higher pheromone concentrations, and shorter paths accumulate pheromones faster due to shorter round-trip times, creating a positive feedback loop. Ultimately, the ants are able to find the optimal path from their nest to the food source, i.e., the shortest distance.

[0047] In the ant colony algorithm, the probability of an ant choosing a path is determined by both pheromones and heuristic information along the path. The calculation formula is as follows:

[0048]

[0049] In the formula, P ij η represents the probability of moving from node i to node j, and is the direct basis for ant path selection. Parameter α is the pheromone weighting factor, controlling the influence of pheromones on the path. The larger α is, the more the ant relies on "historical experience (i.e., accumulated pheromones)" for path selection. If α = 0, it means the influence of pheromones is completely ignored. Parameter β is the heuristic factor weighting factor, controlling the influence of heuristic information (such as path length). The larger β is, the more the ant relies on "current intuitive advantages and disadvantages (such as shortest paths)" for path selection. If β = 0, it means relying solely on pheromones, and the algorithm is prone to getting trapped in local optima. In this paper, α and β are 1 and 2, respectively. Allowed is the set of nodes that the ant can choose (i.e., the allowed path range). ij It is a heuristic factor, usually taken as the reciprocal of the path length: η ij =1 / d ij (d ij τ is the path length from node i to j; the shorter the path, the higher the probability of it being selected. ij This represents the pheromone concentration along path i to j. In the ant colony algorithm, the pheromone update formula is:

[0050] τ ij (t+1)=(1-ρ)τ ij (t)+Δτ ij (15)

[0051] In the formula, ρ is the pheromone evaporation coefficient, with a value range of (0,1). The evaporation coefficient ρ used in this paper is 0.2. τ ij (t) represents the pheromone concentration on the path from i to j at time t. τ ij (t+1) represents the updated pheromone concentration on the path from i to j at time t+1. Δτ ij This represents the total amount of pheromone added in one iteration from path i to j. In the ant colony algorithm, the newly added pheromone is Δτ. ijThe calculation formula is:

[0052]

[0053] In the formula, n is the total number of ants participating in the iteration, which is taken as 30 in this paper. This represents the pheromone increment left by the k-th ant on the path from i to j. It is usually related to the "quality" (i.e., length, fitness) of the ant path, and its calculation formula is:

[0054]

[0055] In the formula, Q is the pheromone total constant, a hyperparameter that needs to be manually set. It is generally taken as 100 or 200, and in this paper it is taken as 100 to adjust the total amount of pheromone that a single ant can leave behind. L k Let be the length of the path completed by the k-th ant. The shorter the path, the greater the ant's length. The larger. Attached Figure Description

[0056] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:

[0057] Figure 1 Here is a flowchart of the optimized visual detection algorithm;

[0058] Figure 2 Here is a diagram of the CSP_MSEIE structure;

[0059] Figure 3 Here is the structure diagram of AFGC;

[0060] Figure 4 This is a diagram of the LSCD structure.

[0061] Figure 5 This is a diagram of the GN structure.

[0062] Figure 6 This is a schematic diagram of SAHI.

[0063] Figure 7 This is a diagram illustrating the ant colony algorithm's search process.

[0064] Figure 8 A classification diagram of smoked sheet adhesives;

[0065] Figure 9 For comparison, see the mAP50 curve.

[0066] Figure 10 For comparison, see the precision curve graph from the experiment;

[0067] Figure 11 For comparison of the Recall curves in the experiment;

[0068] Figure 12 A visual comparison of detection results before and after algorithm optimization;

[0069] Figure 13 A magnified view of the detection results after algorithm optimization;

[0070] Figure 14 This is a schematic diagram of the coordinate transformation process;

[0071] Figure 15 This is a coordinate distribution diagram of impurities in grade 3 smoked sheet adhesive.

[0072] Figure 16 This is a coordinate distribution diagram of impurities in grade 4 smoked sheet adhesive.

[0073] Figure 17 This is a coordinate distribution diagram of impurities in grade 5 smoked sheet adhesive.

[0074] Figure 18 The diagram shows the path planning results of the ant colony algorithm for level 3 smoke sheet adhesive.

[0075] Figure 19 The diagram shows the path planning results of the 4th level smoke sheet glue ant colony algorithm;

[0076] Figure 20 The diagram shows the path planning results of the 5th level smoke sheet glue ant colony algorithm; Detailed Implementation

[0077] The specific execution process for completing the identification and removal path planning of impurities in smoked sheet adhesives using this method includes five steps: constructing a smoked sheet adhesive dataset, training an impurity analysis model, predicting impurities based on the impurity analysis model, transforming the coordinates of the smoked sheet adhesive impurity image set, and calculating the removal path corresponding to the impurities based on the path planning model.

[0078] Step 1: Construct the smoked sheet adhesive dataset. Smoked sheet adhesive dimensions: 1050mm long, 450mm wide, 4mm thick. It is classified into grades 3, 4, and 5, with higher grades indicating more impurities. Furthermore, it may exhibit stickiness, wrinkling, or mold growth after storage. Figure 8 As shown, 200 images of smoked sheet rubber were captured, and the images were labeled using the labelimg annotation software to generate an XML dataset for object detection. The dataset was then augmented through rotation, noise reduction, and inversion to enhance its robustness. The images captured in this experiment had a resolution of 4608×3456. When using the SAHI segmentation method, the width and height of the slices were set to 640×640, making it easier to detect small impurities. The overlap rate of the width and height was set to 0.1.

[0079] Step 2: Complete the training of the impurity analysis model. The experiment used Python 3.9 programming language and the PyTorch 1.12.0 deep learning framework, with SAHI slice inference version 0.11.23. The graphics card used was an Nvidia GeForce RTX 3090 with 24GB of video memory and CUDA version 11.3. The initial learning rate was set to 0.01, the batch size to 32, the number of training epochs to 300, the input image size adjusted for slices, the IoU threshold set to 0.5, and the optimizer set to "SGD".

[0080] To verify the effectiveness of the proposed algorithm in detecting impurities in smoked sheet adhesives, a comparative experiment was conducted with current mainstream models. The number of parameters, mAP50, precision, and recall were used as evaluation metrics. The comparative experimental results are shown in Table 1. The proposed algorithm shows significant improvements in precision, recall, and average precision, enabling better detection of impurities in smoked sheet adhesives. Furthermore, the number of parameters and the size of the weight file are reduced, making it more suitable for deployment. (Curve comparison is shown below.) Figure 9-11 As shown in the figure, the effectiveness of the improvement of the present invention can be seen.

[0081] Table 1 Comparison of experimental results

[0082]

[0083] Step 3: Impurity prediction based on the impurity analysis model. To verify the optimization effect of YOLOv8n, the detection performance of the optimized YOLOv8n was evaluated, such as... Figure 12-13 As shown in the visualization and detection accuracy data, the YOLOv8n detection model before optimization had many false positives and false negatives. After optimization, the false positive and false negative rates decreased significantly, the detection accuracy was greatly improved, and it demonstrated excellent target detection performance, fully meeting the needs of subsequent path planning.

[0084] Step 4: Coordinate transformation of the smoked sheet adhesive impurity image set. The predicted impurity coordinates are pixel coordinates, such as... Figure 14 As shown, the intrinsic parameter matrix K and distortion coefficient matrix D obtained from camera calibration are used to convert them into camera coordinates. Then, the affine transformation matrix T obtained from nine-point calibration is used to convert the camera coordinates into Cartesian coordinates that the robot can recognize. The specific conversion process is as follows:

[0085] K is the intrinsic parameter matrix, reflecting the internal optical and geometric parameters of the camera. D is the distortion coefficient matrix. Optical distortion of the camera lens can cause image points to deviate from their ideal distortion-free positions. D is used to quantify and correct this distortion.

[0086] Intrinsic parameter matrix K:

[0087]

[0088] Among them, f x f y ... x c y Principal point coordinates, in pixels, are defined as the coordinates of the intersection of the camera's optical axis and the image plane, and are usually located near the center of the image.

[0089] Distortion coefficient D:

[0090] D = [k1,k2,p1,p2,k3] (19)

[0091] Wherein, k1 is the first-order radial distortion coefficient, mainly describing the distortion over medium radial distances; k2 is the second-order radial distortion coefficient, used to correct distortion over large radial distances; k3 is the third-order radial distortion coefficient, used to handle extreme edge distortions that k1 and k2 cannot completely cover. p1 is the first-order tangential distortion coefficient; p2 is the second-order tangential distortion coefficient.

[0092] The intrinsic parameter matrix K and distortion coefficient matrix D can be obtained by using Zhang Zhengyou's calibration method for camera calibration.

[0093] T is a 2×3 affine transformation matrix, obtained through nine-point calibration. The specific procedure for nine-point calibration is as follows:

[0094] Using a standard nine-point calibration board, the pixel coordinates of its nine points are first obtained, and then converted into camera coordinates using equations (20) and (21):

[0095] Let the distortion-free pixel coordinates be (u, v), and normalize them using the parameters in the intrinsic parameter matrix K:

[0096]

[0097] f x f y Let c be the focal length parameters of the camera along the x and y axes in matrix K. x c y Let Z be the coordinates of the principal point in matrix K. The camera depth is Z. c This is related to the camera's mounting height. The nine pixel coordinates are converted to camera coordinates (X...). c ,Y c ):

[0098] X c =x n ·Z c Yc =y n Z c (twenty one)

[0099] The mechanical coordinates of the nine pixel coordinates are obtained sequentially by the control device according to the order in which they were acquired, and denoted as (X...). ri Y ri ), i∈[1,9]. The camera coordinates of the nine points obtained by equation (21) are (X ci Y ci ), i∈[1,9]. The affine transformation matrix T can be obtained by fitting the camera coordinates and machine coordinates using these nine points:

[0100]

[0101] After obtaining matrices K, D, and T through the above steps, the pixel coordinates (u, v) of the detected tobacco film impurities can be distorted and converted into camera coordinates (X) using equations (20) and (21). c ,Y c Then, use equation (23) to convert it into machine coordinates (X). r ,Y r ),Right now:

[0102]

[0103] Step 5: Calculate the removal path corresponding to the impurities based on the path planning model.

[0104] To verify the effectiveness and overall performance of this invention, grade 3, 4, and 5 smoked sheet adhesives (higher grades indicate more impurities) were selected, and multiple path planning methods were compared with the ant colony algorithm. The path lengths of different planning algorithms are shown in Table 2.

[0105] Table 2 Comparison of Path Lengths in Path Planning Algorithms

[0106] Serial Number Smoked sheet adhesive grade Impurity points Ant colony algorithm / pixel Dijkstra / Pixel A* algorithm / pixel 1 Level 3 16 8683.59 10450.27 10761.56 2 Level 3 12 5852.39 9102.24 8077.96 3 Level 4 50 11253.56 13070.21 17499.61 4 Level 4 42 10231.63 12034.28 11782.3 5 Level 5 90 22151.32 26743.67 26300.37 6 Level 5 85 18886.4 20625.94 25547.31

[0107] As can be seen from Table 2, compared with other planning algorithms, the ant colony algorithm generally has a better path length and the planned path is also optimal. This shows that the ant colony algorithm has better planning efficiency and can better meet the requirements of this invention.

[0108] Visualization experiments were conducted using grade 3, 4, and 5 smoked sheet adhesives. The coordinates of impurities detected using the algorithm presented in this paper are shown below. Figure 15-17 As shown in the image. The path planning was performed using the ant colony algorithm, and the resulting visualization is shown below. Figure 18-20 As shown, this invention can effectively detect impurities and plan the optimal removal path when dealing with different grades of smoked sheet adhesive.

Claims

1. A method for visual guidance based path planning for removal of trash from tobacco sheet, the method comprising: The system used is composed of a backbone network, a neck network, a detection head, and an SAHI slice auxiliary super-inference model; The Backbone part inputs an RGB image with a size of 640x640x3, and reduces the resolution to 320x320 and 160x160 through two convolutional layers Conv, and the channel number is expanded to 64 and 128, wherein the convolution kernel size k=3, the step size s=2, and the padding p=1; the CSP_MSEIE module is introduced to extract high-level semantic information through multi-scale convolution kernel and edge feature fusion; after outputting 160x160x128 features, the convolution Conv is used for down-sampling to 80x80x256, wherein k=3, s=2, and p=1, and the CSP_MSEIE module is stacked again; then, the convolution Conv (k=3, s=2, p=1) is used to obtain 40x40x512 features, wherein k=3, s=2, and p=1, and a third CSP_MSEIE module is stacked again; then, the convolution Conv is used to reduce the feature map to 20x20x1024, wherein k=3, s=2, and p=1, and a last CSP_MSEIE module is stacked for global semantic modeling; finally, the SPPF module realizes feature aggregation through multi-scale pooling with kernel sizes of 5x5, 9x9, and 13x13, and outputs 20x20x1024 global features; The Neck adopts a feature pyramid structure for multi-layer fusion; the 20x20x1024 features are up-sampled to 40x40x1024, and are concatenated with the shallow layer features 40x40x512 channels to form a feature map with a channel number of 1536, which is output after being processed by the C2f module; Then, the feature map is up-sampled to 80x80x512, and is concatenated with the 80x80x256 features of the Backbone to expand the channel to 768; the C2f module and the convolution Conv are used for channel compression and feature purification, wherein k=3, s=2, and p=1, forming a multi-scale feature pyramid with 80x80x256, 40x40x512, and 20x20x1024; in this process, the AFGC attention mechanism is embedded to strengthen the contour features; The Head adopts a lightweight LSCD module to regress and classify the three-scale features output by the Neck, and outputs corresponding 80x80, 40x40, and 20x20 grids to consider different scale targets; The SAHI auxiliary super reasoning model is a target detection enhancement method based on an image slicing strategy, wherein a CSP_MSEIE module uses AdaptiveAvgPool to perform adaptive pooling on an input feature map under multiple scales, so as to extract information of different scales in a local region and effectively capture multi-level features in an image. Given an input feature map X e R C×H×W , C, H and W respectively represent a channel number, a picture height and a picture width. A feature F s under different scales s e {3, 6, 9, 12} is represented as: F s = Conv3(Conv1(AdaptiveAvgpool s (X))) (1) wherein Conv3 and Conv1 represent convolution operations with a convolution kernel k of 3x3 and 1x1 size, respectively, for information fusion and feature compression; and AdaptiveAvgPool() represents down-sampling the feature map to sxs. Then the Edge Enhancer submodule is introduced to model the fine-grained edges in the image. The specific process is as follows: first, the input feature map X e R C×H×W C, H, W are the channel number, picture height, and picture width, respectively, and average pooling smoothing is performed: where k=3 represents 3x3 average pooling and s=1 represents a stride of 1; and the smoothed result is obtained represents a low-frequency feature component, and a high-frequency residual information E is obtained by subtracting the original feature Then, a 3x3 convolution is used to extract edge responses, and a Sigmoid activation function is used to generate an adaptive weight map: Y = X + σ(Conv 3×3 (E)) (4) wherein σ() represents the Sigmoid activation function; and Y represents re-injecting edge detail information into the original feature map through a residual enhancement method; The features extracted by each branch are up-sampled to the original size and then spliced and fused to obtain F cat : F cat = Concat(F3, F6, F9, F 12 ) (5) F3, F6, F9, F 12 are features at different scales s e {3, 6, 9, 12}; Concat() denotes feature fusion; after fusion, channel integration is performed by 1x1 convolution: F ms = Conv 1×1 (F cat ) (6) F ms is the feature map after channel integration, Conv 1×1 represents a convolution operation with a 1x1 size of a convolution kernel.

2. The method of claim 1, wherein: Replace the C2f module in the backbone network with a CSP_MSEIE module; the specific process is: through a given input feature map F∈R C×H×W (C, H, W are the number of channels, picture height, picture width respectively), the output of the global average pooling, that is, the channel descriptor U∈R C×1×1 The element value of the nth channel of the channel descriptor is calculated according to the following formula: Where F n (i,j) represents the element value of the nth channel, i-th row, and j-th column of the feature map; subsequently, using the strip matrix B = [b1,b2,…,b k Extracting local channel information descriptor U lc Dimension R C×1×1 This indicates that the correlation of neighboring channels is extracted by 1×1 convolution, and the specific formula is as follows: where k is the number of neighborhood channels, b i represents the i-th weight parameter of the 1x1 convolution kernel, which is used to capture the contribution of the i-th neighborhood channel; at the same time, the diagonal matrix D = [d1, d2, … d c ] is used to capture the global channel information U gc , the dimension of R C×1×1 is extracted by 1x1 convolution to capture the global channel correlation, and the specific formula is: where j is the number of neighborhood channels, d j denotes the j-th weight parameter of the 1x1 kernel modeling the global correlation across all channels; in addition, to fuse global and local information, a cross-granularity correlation matrix M is computed: At this time, M i,j represents the correlation of the ith local channel with the jth local channel; extract the row and column weight vectors from M: wherein, is the total association strength of the ith channel with all local channels; is the total association strength of the ith channel with all global channels; adaptive weights by learnable parameters θ: wherein G is the channel attention weight of the final output, with a dimension of R C×1×1 ; σ() is a Sigmoid activation function, which maps values to the interval [0, 1] to normalize the weights; θ is a learnable fusion parameter with a dimension of R C×1×1 , used to dynamically adjust the proportion of global and local weights; the final output feature map is obtained after modulation: where F * is the output feature map after attention modulation, with the same dimension as the input feature map F(R C×H×W ).

3. The method of claim 1, wherein the path planning model uses an ant colony algorithm, and the calculation formula is: where P ij denotes the probability of moving from node i to node j, which is the direct basis for the ant path selection; parameter a is the pheromone weight factor; parameter β is the heuristic factor weight factor; a and β used are 1 and 2 respectively; Allowed is the set of nodes that the current ant can select, i.e. the allowed path range; η ij is the heuristic factor, which takes the reciprocal of the path length: η ij = 1 / d ij , d ij is the path length from node i to j, and the shorter the path, the higher the probability of being selected; τ ij represents the pheromone concentration on the path i to j; in the ant colony algorithm, the update formula of the pheromone is: τ ij (t+1) = (1 - p)τ ij (t) + Δτ ij (15) Wherein, ρ is pheromone evaporation coefficient, the value range is (0, 1), and the evaporation coefficient ρ is 0.2; τ ij (t) represents the pheromone concentration on the path i to j at t time; τ ij (t+1) represents the updated pheromone concentration on the path i to j at t+1 time; Δτ ij represents the total amount of newly added pheromone on the path i to j in one iteration; in the ant colony algorithm, the newly added pheromone Δτ ij is calculated by the formula: where n is the total number of ants participating in the iteration, and is taken to be 30 in this paper; denotes the pheromone increment left by the kth ant on the path i to j, which is usually related to the "quality" (i.e. length, fitness) of the ant path, and is calculated as: where Q is a pheromone total quantity constant, which is a hyper parameter, taken as 100, L k is the length of the path completed by the kth ant, and the shorter the path is the larger the value of Lk.