Cushion block polishing visual positioning method for large-diameter seat ring opening cushion block end face operation
Through the deep learning algorithm Yolo-DNet and CC module, precise identification and positioning is achieved in the pad polishing, solving the problem of insufficient identification in complex environments by traditional methods, improving the stability and accuracy of milling cutter polishing, and meeting industrial production needs.
Patent Information
- Application Number
- CN202411264960.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-10
AI Technical Summary
Traditional image processing methods have limitations in pad positioning, and cannot achieve accurate position recognition in complex environments, resulting in poor certainty in the starting position of milling cutter polishing and difficult to meet industrial production needs.
Deep learning method is used to design a deep learning algorithm for pad polishing Yolo-DNet, combined with CC module and PAN-FPN structure, enhance feature extraction through convolutional flow splitting and CSAB modules to achieve precise recognition and positioning of the target, and through multi-threaded parallel technology Optimize execution efficiency.
It realizes accurate identification of the pad position in complex environments, overcomes the shortcomings in identification of traditional methods, improves the stability and positioning accuracy of polishing targets, and meets industrial production needs.
Smart Images

Figure CN119077488A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of processing large-diameter seat ring ring mouth pads, and in particular to a pad grinding visual positioning method for end face operation of large-diameter seat ring ring mouth pads. Background Art
[0002] In the industrial manufacturing process, accurate grinding of the target is an important part of ensuring product quality. However, before the robot starts grinding the target, it is impossible to make the milling cutter run to a fixed position to start grinding every time. Therefore, the position of the target needs to be accurately positioned to determine the starting position of the milling cutter. However, the positioning operation of the pad faces many challenges in practical applications.
[0003] See also Figure 1 , 2 , traditional image processing methods have certain limitations in pad positioning. Due to the influence of factors such as lighting and environment, pads may appear in the image with shadows, varying degrees of rust, and surface defects. These problems make it difficult for traditional methods to accurately locate the position of pads. In order to solve this problem, we first tried to detect pads with the traditional detection algorithm combined with OpenCV. In the traditional algorithm, the image is converted into a grayscale image, Gaussian blur is performed, and then the Canny operator is used to detect the edge contour of the image. Finally, the contour is screened and fitted to obtain the contour information of the target. The image opening and closing operations are also combined to obtain a more accurate target position and delete areas that should not appear. In addition, the Hough transform is used to detect the circle of the pad, and the shape prior of the pad is used to try to accurately locate the target.
[0004] However, due to the complexity of the environment and the surface of the object being inspected, it is difficult for traditional algorithms to accurately determine the location of the target. Moreover, after the parameters are adjusted for one sample, the parameters need to be adjusted again for other samples to properly detect the pad position. Therefore, traditional methods have great limitations in practical applications and cannot meet the needs of industrial production. Summary of the invention
[0005] The present invention provides a visual positioning method for pad grinding for large-diameter seat ring pad end face operations. This system adopts a deep learning method to overcome the defect that traditional algorithms cannot stably identify the grinding target. Combined with the classic deep learning detection and recognition structure, a deep learning algorithm Yolo-DNet for pad grinding is designed to achieve accurate recognition and positioning of the target.
[0006] In order to realize the above technical features, the purpose of the present invention is achieved as follows: a pad grinding visual positioning method for large-diameter seat ring ring mouth pad end face operation, comprising the following steps: System initialization settings: When the system starts, the model and camera are initialized; System trigger events: When the robot grinding platform moves to a fixed position, the system sends an event to start camera image capture and recognition. The two events are executed by thread 1 and thread 2 respectively. Execution of system thread 1: In thread 1, when the event information is received, the camera starts capturing images and puts the captured images into the shared memory queue; Execution of system thread 2: When thread 2 receives the recognition event information, it retrieves the image from the shared memory queue and starts reasoning. At the same time, thread 2 converts the upper left and lower right corners of the target box that meets the recognition conditions in the reasoning result into offset pixel distances relative to the center of the image, and reports the distances to the system. Determination of system grinding position: According to the offset pixel distance, the upper system calculates the actual offset position based on the relative position relationship between the camera and the milling cutter, thereby moving the milling cutter to the corresponding starting grinding position to achieve automatic grinding.
[0007] The model uses the deep learning algorithm Yolo-DNet and the CC module to accurately identify targets in complex backgrounds; The CC module enriches the gradient information flow by combining the convolution flow and the CSAB module, and performs channel and spatial feature selection on the features of multi-flow convergence, thereby making the detection more accurate.
[0008] The CC module includes the Conv module and the CSAB module, where the Conv module is convolution + BatchNormalization + ReLU, and the CSAB module is the Channel-Spatial Attention Block.
[0009] The specific process of the deep learning algorithm Yolo-DNet is: First, the image is input into the network, and convolution + Normalization + SiLU activation is performed on it; Then, the obtained features are sent to the subsequent CC Block module for feature extraction, and the features of the backbone network are output in the third CC Block module and the final SPPF module; At the same time, the PAN-FPN structure in deep learning general target detection is adopted.
[0010] At the same time, two prediction heads are used to predict the target category, confidence score, and position at two higher scales. Finally, both prediction heads are predicted in a decoupled manner, separating classification and detection, and are independent of Anchors. When calculating the loss, positive and negative samples are selected according to the metric scores of classification and regression, and the classification error is calculated using binary cross entropy loss, while the regression error is calculated using DFL+CIOU loss.
[0011] After training the final model, it is deployed on an industrial computer. Here, the quantization + ONNX + OpenCV solution is used for deployment.
[0012] Before deploying the model, the model must be converted and quantized first. To avoid unnecessary correction steps, the FP16 quantization model is used, and the model is converted into an ONNX model using tools. Then, use OpenCV to load the ONNX model and related configurations, build the network, and obtain the DNN inference entity; When the image arrives, the input image is preprocessed and DNN model inference is performed in the same way as during model training, and the inference result is NMS and post-processed and output; Finally, the identified and filtered target boxes are converted and reported to the system.
[0013] Beneficial effects of the present invention: 1. The deep learning solution designed in the present invention overcomes the defect that the traditional algorithm cannot stably identify the grinding target. By combining the classic deep learning detection and recognition structure, a deep learning algorithm Yolo-DNet for pad grinding is designed to achieve accurate identification and positioning of the target.
[0014] 2. The deep learning scheme used in the present invention designs a basic feature extraction module CC for feature extraction. By using the gradient diversion mechanism combined with the CSAB channel and the spatial attention module, the features of the target in the image are enhanced to overcome the problem of difficulty in recognition caused by the complexity of the environment and the surface of the object being inspected.
[0015] 3. The present invention designs a Yolo-DNet algorithm deployment scheme combining OpenCV+quantization, uses multi-threaded parallel technology to design a visual positioning system, and optimizes the execution efficiency of the target positioning and recognition system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0017] Figure 1 This is an example of a target to be detected in the present invention.
[0018] Figure 2 Not a traditional algorithm.
[0019] Figure 3 This is the deep learning algorithm architecture Yolo-DNet of the present invention.
[0020] Figure 4 This is the CC module of the present invention.
[0021] Figure 5 This is the training loss curve of the present invention.
[0022] Figure 6 This is the test result (PR curve) of the present invention.
[0023] Figure 7 (a) and (b) are examples of the detection results of the present invention.
[0024] Figure 8 This is the visual system integration solution of the present invention. DETAILED DESCRIPTION
[0025] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0026] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0027] Embodiment 1: The present invention mainly includes two aspects: (1) the design of polishing target recognition and detection algorithm; (2) the integration of visual system. They are introduced below respectively.
[0028] 1. Algorithm design: Due to the complex environment, corrosion, and defects of the target pads, it is difficult to accurately locate the target when using deep learning to identify and detect it. In order to accurately identify targets under complex backgrounds, the CC module is designed. Through the combination of convolutional splitting and CSAB modules, not only the gradient information flow is enriched, but also the channel and spatial feature selection of the multi-stream converged features is performed, so that the detection is more accurate. Among them, Conv represents convolution + BatchNormalization + ReLU; CSAB represents Channel-Spatial Attention Block, in which pooling (pool) + 2D convolution + Sigmoid activation function is used to generate feature channel weights to select the channel of the feature, and then the feature spatial position weight is calculated by the mean and maximum method, and finally the weighted channel feature is multiplied by the weight to obtain the feature with spatial position information; CC represents Conv gradient splitting module + CSAB module, which first divides the feature into multiple parts for processing, and then uses it as the input of CSAB to obtain channel and spatial weighted features to highlight the position of the target in the feature space. The following is a detailed introduction to the algorithm.
[0029] See also Figure 3 , 4 . First, the image is input into the network, and convolution + Normalization + SiLU activation is performed on it. Then, the obtained features are sent to the subsequent CC Block module for feature extraction, and the features of the backbone network are output in the third Block and the final SPPF (Spatial Pyramid Pooling Fast) module. Among them, SPPF represents fast spatial pyramid pooling, which is used to extract multi-scale feature information to enhance the receptive field of the model. At the same time, the PAN-FPN structure in deep learning general target detection is adopted, and the C2f feature extraction layer commonly used in upsampling and detection is used to enhance the multi-scale feature fusion effect and improve the problem of inaccurate predicted position caused by the loss of semantic information and position information. At the same time, due to the high requirements for the polishing positioning accuracy of the target, the selected camera installation position is close to the target, and the target occupies a large proportion in the field of view, so two prediction heads are used here to predict the target category, confidence score, and position at two higher scales. Finally, both prediction heads use the mainstream decoupling method for prediction, separating classification and detection, and not relying on Anchor. When calculating the loss, positive and negative samples are selected according to the metric scores of classification and regression, the classification error is calculated using binary cross entropy loss, and the regression error is calculated using DFL+CIOU loss.
[0030] Training and testing results: 6,000 images were collected and annotated, and divided into test and validation sets in a ratio of 8:2. The model converged after 100 epochs of training. Figure 5 is the training curve of regression and classification loss. A test set of 1,200 images was constructed to test the model, and the test results were evaluated using the area under the PR curve. P (Precision) indicates the proportion of true positive samples in the results predicted as positive samples; R (Recall) indicates the proportion of predicted positive samples to true positive samples. The higher the P and R, the better the model effect.
[0031] The recognition results are shown as Figure 7 As shown in (a) and (b).
[0032] 2. Visual system integration: After training the final model, it needs to be deployed on an industrial computer. Here, the quantization + ONNX + OpenCV solution is used for deployment. Figure 8 shown.
[0033] Before deploying the model, the model must be converted and quantized. To avoid unnecessary correction steps, the FP16 quantization model is used, and the model is converted to an ONNX model using tools. Then, the ONNX model and related configurations are loaded using OpenCV to build the network to obtain the DNN inference entity. When the image arrives, the input image is preprocessed and the DNN model is inferred in the same way as during model training, and the inference result is NMS and post-processed and output. Finally, the identified and filtered target box is converted and reported to the system.
[0034] 3. System operation: See also Figure 8 , when the system is turned on, the model and camera are initialized; When the robot grinding platform moves to a fixed position, the system sends an event to start camera image capture and recognition. The two events are executed by thread 1 and thread 2 respectively. In thread 1, when the event information is received, the camera starts capturing images and puts the captured images into the shared memory queue; When thread 2 receives the recognition event information, it retrieves the image from the shared memory queue and starts reasoning. At the same time, thread 2 converts the upper left and lower right corners of the target box that meets the recognition conditions in the reasoning result into offset pixel distances relative to the center of the image, and reports the distances to the system. The upper-level system calculates the actual offset position based on the relative position relationship between the camera and the milling cutter, thereby moving the milling cutter to the corresponding starting grinding position to achieve automatic grinding.
Claims
1. A visual positioning method for grinding a pad end face of a large-diameter seat ring ring pad, comprising the following steps: System initialization settings: When the system starts, the model and camera are initialized; System trigger events: When the robot grinding platform moves to a fixed position, the system sends an event to start camera image capture and recognition. The two events are executed by thread 1 and thread 2 respectively. Execution of system thread 1: In thread 1, when the event information is received, the camera starts capturing images and puts the captured images into the shared memory queue; Execution of system thread 2: When thread 2 receives the recognition event information, it retrieves the image from the shared memory queue and starts reasoning. At the same time, thread 2 converts the upper left and lower right corners of the target box that meets the recognition conditions in the reasoning result into offset pixel distances relative to the center of the image, and reports the distances to the system. Determination of system grinding position: According to the offset pixel distance, the upper system calculates the actual offset position based on the relative position relationship between the camera and the milling cutter, thereby moving the milling cutter to the corresponding starting grinding position to achieve automatic grinding.
2. According to claim 1, a pad grinding visual positioning method for working on the end face of a large-diameter seat ring ring pad is characterized in that: The model uses the deep learning algorithm Yolo-DNet and the CC module to accurately identify targets in complex backgrounds; The CC module enriches the gradient information flow by combining the convolution flow and the CSAB module, and performs channel and spatial feature selection on the features of multi-flow convergence, thereby making the detection more accurate.
3. According to claim 2, a pad grinding visual positioning method for working on the end face of a large-diameter seat ring ring pad is characterized in that: The CC module includes the Conv module and the CSAB module, where the Conv module is convolution + BatchNormalization + ReLU, and the CSAB module is the Channel-Spatial Attention Block.
4. According to claim 3, a pad grinding visual positioning method for working on the end face of a large-diameter seat ring ring pad is characterized in that: The specific process of the deep learning algorithm Yolo-DNet is: First, the image is input into the network, and convolution + Normalization + SiLU activation is performed on it; Then, the obtained features are sent to the subsequent CC Block module for feature extraction, and the features of the backbone network are output in the third CC Block module and the final SPPF module; At the same time, the PAN-FPN structure in deep learning general target detection is adopted.
5. According to claim 4, a pad grinding visual positioning method for working on the end face of a large-diameter seat ring ring pad is characterized in that: At the same time, two prediction heads are used to predict the target category, confidence score, and position at two higher scales. Finally, both prediction heads are predicted in a decoupled manner, separating classification and detection, and are independent of Anchors. When calculating the loss, positive and negative samples are selected according to the metric scores of classification and regression, and the classification error is calculated using binary cross entropy loss, while the regression error is calculated using DFL+CIOU loss.
6. According to claim 5, a pad grinding visual positioning method for working on the end face of a large-diameter seat ring ring pad is characterized in that: After training the final model, it is deployed on an industrial computer. Here, the quantization + ONNX + OpenCV solution is used for deployment.
7. According to claim 6, a pad grinding visual positioning method for working on the end face of a large-diameter seat ring ring pad is characterized in that: Before deploying the model, the model must be converted and quantized first. To avoid unnecessary correction steps, the FP16 quantization model is used, and the model is converted into an ONNX model using tools. Then, use OpenCV to load the ONNX model and related configurations, build the network, and obtain the DNN inference entity; When the image arrives, the input image is preprocessed and DNN model inference is performed in the same way as during model training, and the inference result is NMS and post-processed and output; Finally, the identified and filtered target boxes are converted and reported to the system.
Citation Information
Patent Citations
Spectrum reconstruction method based on 3D attention mechanism full-channel fusion network
CN113793261A
Remote sensing image small target detection method based on improved YOLOv3
CN113971764A
Aggregation-calibration CNN-based welding spot appearance image recognition method and system
CN114022750A
Automatic punching system with visual identification function
CN114193168A
Electric power operator identification method and system based on deep learning and binocular vision
CN118071983A
