Detection model, sorting system and sorting method for brake pads
Through the combination of the improved YoloV8-OBB neural network model and the Sim-SPPF module and CBAM module, the problem of low brake pad recognition and sorting efficiency is solved, and more efficient and accurate brake pad sorting is achieved, reducing production costs .
Patent Information
- Application Number
- CN202410969656.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-15
AI Technical Summary
In the prior art, the identification and sorting efficiency of brake pads is low, and is affected by manual fatigue and subjective judgment, resulting in an increase in production costs and a decrease in efficiency.
A detection model based on the improved YoloV8-OBB neural network model was designed, combining the Sim-SPPF module and the CBAM module to improve the detection speed and accuracy, and realize the rapid sorting of brake pads through a detection model-driven sorting system.
It improves the identification and sorting efficiency of brake pads, reduces the inspection cost, and achieves higher inspection speed and quality.
Smart Images

Figure CN118968129A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of industrial product identification and sorting, and in particular relates to a detection model, a sorting system and a sorting method for brake pads. Background Art
[0002] With the rapid development of my country's economy and industry, people's living standards are also constantly improving, and cars have become the most commonly used means of transportation for people's daily travel. The rapid development of the automobile industry has also increased the demand for brake pads. In industrial production, "efficient, accurate and fast production" is a very important topic, and manual product identification and sorting are easily affected by factors such as fatigue and subjective judgment, which affects production efficiency.
[0003] At present, most companies' production lines still use manual assembly line inspection for the identification and sorting of brake pads. This will not only result in low final sorting efficiency, but also with the increase in labor costs, a large number of manual assembly lines will greatly increase production costs. Summary of the invention
[0004] In order to solve the deficiencies of the prior art, the present invention provides a detection model, a sorting system and a sorting method for brake pads. The detection model designed by the present invention is an improved YoloV8-OBB neural network model, which improves the detection speed and detection accuracy. The sorting system and sorting method for brake pads designed by the present invention can realize the rapid sorting of brake pads based on the detection model, and improve the efficiency of identification and sorting of brake pads.
[0005] The present invention solves the technical problem by adopting the following technical solution: designing a detection model for brake pads, characterized in that the detection model is based on an improved YoloV8-OBB neural network model, and the method for obtaining the detection model specifically includes the following steps:
[0006] Step 1: Get brake pad images with C categories, normalize their size, and then use annotation tools to manually annotate them to obtain a data set; then divide the images in each category in this data set into training sets and validation sets according to a preset number ratio; the manually annotated labels include the category and position information of the brake pad, where the category label is a positive integer from 1 to C, each number corresponds to a category, and there are C categories in total; the position information includes the coordinates of the center point of the brake pad in the image and the width, height, and rotation angle of the brake pad;
[0007] Step 2: Design a detection model architecture based on the improved YoloV8-OBB neural network model
[0008] The basic structure of this detection model is the same as that of the YoloV8-OBB neural network model, which includes three parts: backbone extraction network, feature enhancement network and classification and regression network. The basic structure of each part is also similar. The difference is that the backbone extraction network of the detection model is obtained by replacing the SPPF module of the backbone extraction network of the YoloV8-OBB neural network model with the Sim-SPPF module. The rest of the parts are the same. The input image passes through the backbone extraction network of the detection model and outputs three valid features, of which the output ports of two valid features are the same as the output ports of the backbone extraction network of the YoloV8-OBB neural network model, and the output port of the third valid feature is the Sim-SPPF module.
[0009] The three effective features output by the backbone extraction network of the detection model are input into the feature enhancement network of the detection model; the feature enhancement network of the detection model is a structure formed by the structure of the feature enhancement network part of the YoloV8-OBB neural network model plus three CBAM modules, wherein the data input port of the feature enhancement network of the detection model is the same as the data input port of the feature enhancement network part of the YoloV8-OBB neural network model, and a CBAM module is connected to each of the three data output ports of the feature enhancement network part of the YoloV8-OBB neural network model to form the feature enhancement network of the detection model; the outputs of the three CBAM modules are the three outputs of the feature enhancement network of the detection model; the classification and regression network of the detection model has the same structure as the classification and regression network of the YoloV8-OBB neural network model;
[0010] The Sim-SPPF module is obtained by changing the SiLU activation function of the SPPF module in the YoloV8-OBB neural network model to the ReLU activation function;
[0011] The CBAM module is a convolutional attention module that connects the channel attention module and the spatial attention module in series. The specific workflow of the CBAM module is as follows:
[0012] The feature F input into the CBAM module is first input into the channel attention module. After global maximum pooling and global average pooling, the results are respectively passed through the MLP. The two results are added together, and then the added features are mapped by the Sigmoid activation function to obtain the channel attention map M. C , multiply it element by element with feature F to get feature F';
[0013] Then the feature F' is input into the spatial attention module, and is processed by global maximum pooling and global average pooling respectively. The results of global maximum pooling and global average pooling are concatenated in the channel dimension, and then processed by a 7×7 convolution and Sigmoid activation function mapping to obtain the spatial attention map M S , multiply it element-by-element with the feature F' to get the final convolution attention map F"; the specific calculation formula is as follows:
[0014]
[0015]
[0016]
[0017]
[0018] Among them, W 0 , W 1 They represent the weights of the two layers of MLP, σ represents the Sigmoid activation function, and f 7×7 represents a 7×7 convolution operation, Represents element-wise multiplication; Same as AvgPool(F), indicating the result of feature F being processed by the global maximum pooling in the channel attention module. Same meaning as MaxPool(F), indicating the result of feature F being processed by global average pooling in the channel attention module; Same meaning as AvgPool(F'), indicating the result of feature F' being processed by the global maximum pooling in the spatial attention module. Same meaning as MaxPool(F'), indicating the result of feature F' being processed by global average pooling in the spatial attention module; Indicates that and Perform stitching in the channel dimension;
[0019] Step 3: Train the detection model
[0020] For the detection model architecture based on the improved YoloV8-OBB neural network model in the second step, load the pre-trained weight parameter file, and use the random assignment method to initialize the bias parameters, set the batch size to 16, and the initial learning rate to 1×10 -2, using SGD optimizer; epochs is set to 500 rounds; a batch of brake pad images in the training set in the first step is input into the detection model, and three regression output features and three category output features are output according to each brake pad image, which are tiled and stacked to obtain a total regression output and a total category output; based on the regression output and category output, the confidence score of a certain category prediction box is calculated; the prediction box containing the confidence score is screened for initial scores and non-maximum suppression is processed, and the obtained results are used to draw the final prediction box to obtain the final brake pad location information and category information;
[0021] The weights and biases of a detection model are updated using the mean of the training loss of a batch of brake pad images to complete the training of a batch of brake pad images; the network parameters when the previous batch of training is completed are used as the initial network parameters when the next batch of training is completed, and the process is repeated continuously until the training of the last batch of brake pad images in a training set is completed and a round of training is completed; after each round of training, the brake pad images in the validation set in the first step are sequentially input into the detection model, and the mean of the training loss of the detection model for the brake pad images in the validation set during this round of training is calculated based on the output of the detection model; the network parameters when the previous round of training is completed are used as the initial parameters for the next round of training, and the process is repeated continuously until the mean of the training loss of the brake pad images in the validation set for 10 consecutive rounds remains unchanged or the training round reaches the maximum value, then the training of the detection model is completed, and the detection model is saved to obtain the detection model for the brake pad;
[0022] The loss function for the training loss of a brake pad image is the sum of Bbox_Loss and Cls_Loss:
[0023]
[0024] Among them, (x 1 ,y 1 ) is the predicted brake pad center coordinate; (x, y) is the actual brake pad center coordinate; w 1 、h 1 is the predicted brake pad width and height; x, h are the actual brake pad width and height; p c is the true category probability distribution, z c is the original output value of the detection model on category c; cooed is a weight coefficient; z i It is the output value of the detection model on class i, and the value range of i is a positive integer from 1 to C.
[0025] Furthermore, a sorting system for brake pads is designed, characterized in that the sorting system includes a detection device, an object conveying device, an action execution device, and a feeding device; the detection device includes a shooting component, a display device, and a control system in which the detection model for brake pads as described above is deployed; the shooting component includes an industrial camera and a light source; the control system is connected in communication with the industrial camera to obtain the brake pad image captured by the industrial camera; the display device is connected in communication with the control system to display the position information and category information obtained after the brake pad is detected;
[0026] The object conveying device is a device including a conveyor belt and a conveyor belt driving motor, and the brake pad is placed on the conveyor belt; the conveyor belt moves under the drive of the motor, thereby sending the brake pad to the image acquisition area and the action execution area in sequence; the conveyor belt driving motor is connected to the control system through the motor driver;
[0027] The action execution device is a device including a parallel robot with a gripper and a motor for driving the parallel robot; when the brake pad reaches the action execution area, the parallel robot moves under the drive of the motor, thereby performing the grabbing and placing operations according to the instructions; the motor of the action execution device is connected to the control system through the motor driver, and is used to perform the grabbing and placing operations according to the instructions of the control system;
[0028] The feeding device is used to place the brake pads on the conveyor belt; wherein the feeding device is a parallel robot with a clamp and a motor for driving the parallel robot, the clamp is used to grab the brake pads, and the parallel robot places the brake pads on the conveyor belt driven by the motor; the motor of the feeding device is connected to the control system through the motor driver;
[0029] The left and right sides of the conveyor belt of the object conveying device in the length direction are respectively the feeding end and the sorting end of the brake pad, the feeding device and the action execution device are respectively arranged at the feeding end and the sorting end, the shooting component is arranged at the rear of the side of the conveyor belt close to the feeding end thereof, and the camera head of the industrial camera is arranged toward one side of the conveyor belt, and the conveyor belt part located directly in front of the camera head of the industrial camera is within the shooting field of view of the camera head of the industrial camera;
[0030] The loading point of the loading equipment is located on the conveyor belt. The area of the conveyor belt facing the camera head of the industrial camera is the image acquisition area, the area of the conveyor belt facing the clamping claws of the action execution device is the action execution area, and the horizontal distance between the loading point of the loading equipment and the center point of the image acquisition area and the center point of the action execution area is a preset value.
[0031] Furthermore, a sorting method for brake pads is designed, which is implemented by the sorting system as described above, and specifically includes the following steps:
[0032] Step 1: Collect brake pad images
[0033] A brake pad is transported to a loading point by a feeding device, and then the feeding device is turned off; the time for a brake pad to arrive in front of the center point of the camera head of the industrial camera is obtained according to the rotation speed of the conveyor belt drive motor, and when the brake pad arrives in front of the center point of the camera head of the industrial camera, the conveyor belt drive motor is turned off, and the industrial camera takes a picture of the brake pad to obtain an image of the brake pad;
[0034] Step 2: Get the test results
[0035] The industrial camera sends the brake pad image in step 1 to the control system, and the control system processes the brake pad image using the detection model for the brake pad deployed internally to obtain the current position information and category information of the brake pad;
[0036] Step 3: Sorting brake pads
[0037] The conveyor belt drive motor is turned on, and the time to reach the grasping center point of the action execution device is calculated according to the horizontal distance between the center point of the camera head of the industrial camera and the grasping center point of the action execution device. When the brake pad reaches the grasping center point of the action execution device, the conveyor belt drive motor is turned off; then the action execution device is turned on, and according to the position information and category information of the brake pad sent by the control system, the parallel robot moves under the drive of the motor, and sorts it to the product collection point of the corresponding category according to its category, thereby completing the sorting of the brake pad.
[0038] Compared with the prior art, the invention has the following beneficial effects: the detection model designed by the invention is an improved YoloV8-OBB neural network model, which improves the detection speed and detection accuracy. The sorting system and sorting method designed by the invention for brake pads can realize the rapid sorting of brake pads based on the detection model, which has higher sorting efficiency, lower detection cost, faster detection speed and higher detection quality than the current industrial manual assembly line detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0040] Figure 1 The present invention is a schematic diagram of the structure and principle of a detection model of an embodiment of a detection model for brake pads.
[0041] Figure 2 It is a schematic diagram of the structure and principle of the YoloV8-OBB neural network model in the prior art.
[0042] Figure 3 It is a schematic diagram of the structure and principle of the SPPF module of the YoloV8-OBB neural network model in the prior art.
[0043] Figure 4 A schematic diagram of the structure and principle of a Sim-SPPF module of a detection model of an embodiment of a detection model for brake pads of the present invention.
[0044] Figure 5 A schematic diagram of the structure and principle of a CMBA module of a feature enhancement network part of a detection model of an embodiment of a detection model for brake pads of the present invention.
[0045] Figure 6 The present invention is a schematic assembly diagram of a detection device, an object conveying device and an action execution device of an embodiment of a sorting system for brake pads. DETAILED DESCRIPTION
[0046] Specific embodiments are given below in conjunction with the accompanying drawings. The specific embodiments are only used to illustrate the technical solutions of the present invention in detail and are not intended to limit the protection scope of the present application.
[0047] The present invention provides a detection model for a brake pad, the detection model is based on an improved YoloV8-OBB neural network model, and the method for obtaining the detection model specifically includes the following steps:
[0048] Step 1: Get brake pad images containing C categories, first normalize their size, then use annotation tools to manually annotate them to obtain a data set; then divide the images in each category in this data set into training sets and validation sets according to a preset number ratio (such as 8:2). Among them, the training set is mainly used for model training, and the validation set is mainly used after each training cycle to evaluate the model, understand the progress of the training, and check whether the model is abnormal. The manually annotated labels include the category and position information of the brake pad, where the category label is a positive integer from 1 to C, each number corresponds to a category, and there are C categories in total; the position information includes the center point coordinates of the brake pad in the image and the width, height and rotation angle of the brake pad. The rotation angle refers to the rotation angle of the outline of the brake pad in the picture to the preset state. The preset state is generally a state in which the symmetry line of the outline of the brake pad is parallel to the size symmetry line of the brake pad picture.
[0049] Step 2: Design a detection model architecture based on the improved YoloV8-OBB neural network model
[0050] The basic structure of this detection model is the same as that of the YoloV8-OBB neural network model, both of which include three parts: backbone extraction network, feature enhancement network and classification and regression network. The basic structure of each part is also similar. The difference is that the backbone extraction network of the detection model is obtained by replacing the SPPF module of the backbone extraction network of the YoloV8-OBB neural network model with the Sim-SPPF module. The rest of the parts are the same. The input image passes through the backbone extraction network of the detection model and outputs three valid features. The output ports of two of the valid features are the same as the output ports of the backbone extraction network of the YoloV8-OBB neural network model, and the output port of the third valid feature is the Sim-SPPF module, that is, the output of the SPPF module becomes the output of the Sim-SPPF module.
[0051] The three valid features output by the backbone extraction network of the detection model are input into the feature enhancement network of the detection model. The feature enhancement network of the detection model is a structure formed by the structure of the feature enhancement network part of the YoloV8-OBB neural network model plus three CBAM modules, wherein the data input port of the feature enhancement network of the detection model is the same as the data input port of the feature enhancement network part of the YoloV8-OBB neural network model, and a CBAM module is connected to each of the three data output ports of the feature enhancement network part of the YoloV8-OBB neural network model to form the feature enhancement network of the detection model; the outputs of the three CBAM modules are the three outputs of the feature enhancement network of the detection model. The classification and regression network of the detection model has the same structure as the classification and regression network of the YoloV8-OBB neural network model.
[0052] The structure of the backbone network of the detection model includes Conv2d_BN_SiLU module, CSPLayer_2Conv module and Sim-SPPF module (among which, Figure 1 Module1 in the figure is the original module in the YoloV8-OBB neural network model, including Conv2d_BN_SiLU module and CSPLayer_2Conv module). Sim-SPPF module (for specific structure, see Figure 4 ) is the SPPF module in the YoloV8-OBB neural network model (see Figure 3 ) is obtained by changing the SiLU activation function to the ReLU activation function. The ReLU activation function is a commonly used nonlinear activation function, and the formula is:
[0053] f(x)=max(0,x)
[0054] The ReLU activation function only needs to compare the size relationship between the input data and 0, and does not require complex mathematical operations, so it can increase the output speed.
[0055] The structure of the feature enhancement network of the detection model includes CSPLayer_2Conv module, Conv2d_BN_SiLU module, downsampling module, Concat module and CBAM module (among which, Figure 1 The Pan-FPN in the figure is the original module in the YoloV8-OBB neural network model, including CSPLayer_2Conv module, Conv2d_BN_SiLU module, downsampling module, and Concat module).
[0056] CBAM module (for specific structure, see Figure 5 ) is a convolutional attention module that connects the channel attention module and the spatial attention module in series. The CBAM module extracts feature information by mixing channel information and spatial information. The specific workflow of the CBAM module is as follows:
[0057] The feature F input into the CBAM module is first input into the channel attention module. After global maximum pooling and global average pooling, the results are respectively passed through the MLP (multi-layer perceptron). The two results are added together, and then the added features are mapped through the Sigmoid activation function to obtain the channel attention map M. C , multiply it element by element with feature F to get feature F';
[0058] Then the feature F' is input into the spatial attention module, and is processed by global maximum pooling and global average pooling respectively. The results of global maximum pooling and global average pooling are concatenated in the channel dimension, and then processed by a 7×7 convolution and Sigmoid activation function mapping to obtain the spatial attention map M S , multiply it element-by-element with the feature F' to get the final convolution attention map F". The specific calculation formula is as follows:
[0059]
[0060]
[0061]
[0062]
[0063] Among them, W 0 , W 1 They represent the weights of the two layers of MLP, σ represents the Sigmoid activation function, and f 7×7 represents a 7×7 convolution operation, Represents element-wise multiplication. Same as AvgPool(F), indicating the result of feature F being processed by the global maximum pooling in the channel attention module. Same meaning as MaxPool(F), indicating the result of feature F being processed by global average pooling in the channel attention module; Same meaning as AvgPool(F'), indicating the result of feature F' being processed by the global maximum pooling in the spatial attention module. Same meaning as MaxPool(F'), indicating the result of feature F' being processed by global average pooling in the spatial attention module; Indicates that and Splicing is performed in the channel dimension, that is, Figure 5 The Concat operation in .
[0064] The classification and regression network structure of the detection model includes Conv2d_BN_SiLU module and Conv2d module. (Among them, Figure 1 The Decouped-Head in the code includes the Conv2d_BN_SiLU module and the Conv2d module, which are the original modules in the YoloV8-OBB neural network model).
[0065] Step 3: Train the detection model
[0066] For the detection model architecture based on the improved YoloV8-OBB neural network model in the second step, load the pre-trained weight parameter file, and use the random assignment method to initialize the bias parameters, set the batch size to 16, and the initial learning rate to 1×10 -2 , using SGD optimizer; epochs is set to 500 rounds. A batch of brake pad images from the training set in the first step is input into the detection model. Three regression output features and three category output features are output according to each brake pad image, and they are tiled and stacked to obtain a total regression output and a total category output; based on the regression output and category output, the confidence score of a certain category prediction box is calculated; the prediction box containing the confidence score is screened for initial scores and non-maximum suppression is processed, and the results are used to draw the final prediction box to obtain the final brake pad location information and category information.
[0067] Score screening is to screen out the prediction box whose confidence score of a certain category prediction box meets the confidence score; non-maximum suppression is the box with the largest confidence score of the same category in a certain area.
[0068] The weights and biases of the detection model are updated using the mean of the training loss of a batch of brake pad images to complete the training of a batch of brake pad images; the network parameters when the previous batch of training is completed are used as the initial network parameters when the next batch of training is completed, and the training is repeated until the training of the last batch of brake pad images in a training set is completed, and a round of training is completed. After each round of training, the brake pad images in the validation set in the first step are input into the detection model in sequence, and the mean of the training loss of the detection model for the brake pad images in the validation set during this round of training is calculated based on the output of the detection model. The network parameters when the previous round of training is completed are used as the initial parameters for the next round of training, and the training is repeated until the mean of the training loss of the brake pad images in the validation set for 10 consecutive rounds remains unchanged or the training round reaches the maximum value, then the training of the detection model is completed, and the detection model is saved to obtain the detection model for the brake pad.
[0069] The loss function for the training loss of a brake pad image is the sum of Bbox_Loss and Cls_Loss:
[0070]
[0071] Among them, (x 1 ,y 1 ) is the predicted brake pad center coordinate; (x, y) is the actual brake pad center coordinate; w 1 、h 1 is the predicted brake pad width and height; x, h are the actual brake pad width and height; p c is the true category probability distribution, z c is the original output value of the detection model on category c. cooed is a weight coefficient, generally ranging from 0 to 1, and this training takes a value of 0.5; z i It is the output value of the detection model on class i, and the value range of i is a positive integer from 1 to C.
[0072] Furthermore, the present invention provides a sorting system for brake pads (see Figure 6 ), the sorting system includes a detection device 1, an object conveying device 2, an action execution device 3, and a loading device. The detection device 1 includes a shooting component 1-1, a display device 1-2, and a control system in which the above-mentioned detection model for brake pads is deployed. The shooting component 1-1 includes an industrial camera 1-1-1 and a light source 1-1-2. The control system is communicatively connected to the industrial camera 1-1-1, and is used to obtain the brake pad image captured by the industrial camera 1-1-1. The display device 1-2 is communicatively connected to the control system, and is used to display the position information and category information obtained after the brake pad is detected.
[0073] The object conveying device 2 is a device including a conveyor belt and a conveyor belt drive motor, and the brake pad is placed on the conveyor belt. The conveyor belt moves under the drive of the motor, thereby sending the brake pad to the image acquisition area and the action execution area in sequence. The conveyor belt drive motor is connected to the control system through the motor driver.
[0074] The action execution device 3 is a device including a parallel robot with a gripper and a motor for driving the parallel robot. When the brake pad reaches the action execution area, the parallel robot moves under the drive of the motor, thereby performing the grabbing and placing operations according to the instructions. The motor of the action execution device 3 is connected to the control system through a motor driver, and is used to perform the grabbing and placing operations according to the instructions of the control system.
[0075] The feeding device is used to place the brake pads on the conveyor belt. The feeding device is a parallel robot with a clamp and a motor for driving the parallel robot. The clamp is used to grab the brake pads, and the parallel robot places the brake pads on the conveyor belt driven by the motor. The motor of the feeding device is connected to the control system through the motor driver.
[0076] The left and right sides of the conveyor belt of the object conveying device 2 in the length direction are respectively the loading end and the sorting end of the brake pad. The loading equipment and the action execution device 3 are respectively arranged at the loading end and the sorting end. The shooting component 1-1 is arranged at the rear of the side of the conveyor belt close to its loading end, and the camera of the industrial camera 1-1-1 is set toward one side of the conveyor belt. The part of the conveyor belt directly in front of the camera of the industrial camera 1-1-1 is within the shooting field of view of the camera of the industrial camera 1-1-1.
[0077] The loading point of the loading equipment is located on the conveyor belt. The area of the conveyor belt facing the camera head of the industrial camera is the image acquisition area, the area of the conveyor belt facing the clamping claws of the action execution device is the action execution area, and the horizontal distance between the loading point of the loading equipment and the center point of the image acquisition area and the center point of the action execution area is a preset value.
[0078] The sorting system is turned on. First, the loading device transports a brake pad to the loading point, and then the loading device is turned off. According to the rotation speed of the conveyor belt drive motor, it is known that it takes a brake pad to reach the center point of the camera of the industrial camera 1-1-1. When the brake pad reaches the center point of the camera of the industrial camera 1-1-1, the conveyor belt drive motor is turned off, and the industrial camera 1-1-1 takes a picture of the brake pad. After the shooting is completed, the conveyor belt drive motor is turned on, and according to the horizontal distance between the center point of the camera of the industrial camera 1-1-1 (i.e., the center point of the image acquisition area) and the grabbing center point of the action execution device 3 (i.e., the center point of the action execution area), the time to reach the grabbing center point of the action execution device 3 is calculated. When the brake pad reaches the grabbing center point of the action execution device 3, the conveyor belt drive motor is turned off. The control system classifies the brake pad according to the brake pad picture taken by the industrial camera 1-1-1 using the detection model for the brake pad deployed inside it, and obtains the corresponding category information. The action execution device 3 is turned on to perform the grabbing, classification and placement operations. This process is repeated until the last brake pad is sorted.
[0079] Optionally, the industrial camera 1 - 1 - 1 may be a CMOS camera or other industrial cameras.
[0080] As an embodiment, the shooting component 1 - 1 is arranged in a dark box to prevent the external ambient light from affecting the quality of the image captured by it.
[0081] As an embodiment, the detection system further includes a sensor, which is communicatively connected with the control system. The sensor is used to detect the position of the brake pad to instruct the action execution device 3 to execute a corresponding action.
[0082] As an embodiment, the control system is an industrial computer, or other device including a computing device and a controller. The control system is deployed with the above-mentioned detection model for brake pads, and the image is input into the image position detection model. The model is first used to obtain the initial detection result of the brake pad image; then the initial detection result is decoded to determine the target detection result of the brake pad, including position information and category information. According to the position information and category information corresponding to the brake pad image, the transmission device 2, the shooting component 1-1 and the action execution device 3 are controlled accordingly. Among them, the controller can be a PLC (Programmable Logic Controller).
[0083] The industrial camera is the MV-HS series 2nd generation industrial camera manufactured by Vision Intelligent, or other models of cameras on the market can be used.
[0084] The industrial computer is a high-performance host; the parallel robot is an ABB IRB360 robot, or other models on the market.
[0085] The display device is a display screen of AOC company, or other brands of display screens on the market.
[0086] Furthermore, the present invention provides a method for sorting brake pads, which is implemented by the above-mentioned sorting system and specifically includes the following steps:
[0087] Step 1: Collect brake pad images
[0088] A brake pad is transported to the loading point by a loading device, and then the loading device is shut down. The time it takes for a brake pad to arrive directly in front of the center point of the camera of the industrial camera (MV-HS series 2nd generation industrial camera manufactured by Vision Intelligent Manufacturing) 1-1-1 is obtained based on the rotation speed of the conveyor belt drive motor. When the brake pad arrives directly in front of the center point of the camera of the industrial camera 1-1-1, the conveyor belt drive motor is shut down, and the industrial camera 1-1-1 takes a picture of the brake pad to obtain an image of the brake pad.
[0089] Step 2: Get the test results
[0090] The industrial camera 1-1-1 sends the brake pad image in step 1 to the control system, and the control system processes the brake pad image using the detection model for the brake pad deployed internally to obtain the current position information and category information of the brake pad.
[0091] Step 3: Sorting brake pads
[0092] Turn on the conveyor belt drive motor, calculate the time to reach the grabbing center point of the action execution device 3 according to the horizontal distance between the center point of the camera head of the industrial camera 1-1-1 and the grabbing center point of the action execution device 3, and turn off the conveyor belt drive motor when the brake pad reaches the grabbing center point of the action execution device 3; then turn on the action execution device 3, and according to the position information and category information of the brake pad sent by the control system, the parallel robot moves under the drive of the motor, and sorts the product to the corresponding category according to its category to complete the sorting of the brake pad.
[0093] Any matters not described in the present invention are applicable to the prior art.
Claims
1. A detection model for brake pads, characterized in that: The detection model is based on the improved YoloV8-OBB neural network model. The method for obtaining the detection model specifically includes the following steps: Step 1: Get brake pad images with C categories, normalize their size, and then use annotation tools to manually annotate them to obtain a data set; then divide the images in each category in this data set into training sets and validation sets according to a preset number ratio; the manually annotated labels include the category and position information of the brake pad, where the category label is a positive integer from 1 to C, each number corresponds to a category, and there are C categories in total; the position information includes the coordinates of the center point of the brake pad in the image and the width, height, and rotation angle of the brake pad; Step 2: Design a detection model architecture based on the improved YoloV8-OBB neural network model The basic structure of this detection model is the same as that of the YoloV8-OBB neural network model, which includes three parts: backbone extraction network, feature enhancement network and classification and regression network. The basic structure of each part is also similar. The difference is that the backbone extraction network of the detection model is obtained by replacing the SPPF module of the backbone extraction network of the YoloV8-OBB neural network model with the Sim-SPPF module. The rest of the parts are the same. The input image passes through the backbone extraction network of the detection model and outputs three valid features, of which the output ports of two valid features are the same as the output ports of the backbone extraction network of the YoloV8-OBB neural network model, and the output port of the third valid feature is the Sim-SPPF module. The three effective features output by the backbone extraction network of the detection model are input into the feature enhancement network of the detection model; the feature enhancement network of the detection model is a structure formed by the structure of the feature enhancement network part of the YoloV8-OBB neural network model plus three CBAM modules, wherein the data input port of the feature enhancement network of the detection model is the same as the data input port of the feature enhancement network part of the YoloV8-OBB neural network model, and a CBAM module is connected to each of the three data output ports of the feature enhancement network part of the YoloV8-OBB neural network model to form the feature enhancement network of the detection model; the outputs of the three CBAM modules are the three outputs of the feature enhancement network of the detection model; the classification and regression network of the detection model has the same structure as the classification and regression network of the YoloV8-OBB neural network model; The Sim-SPPF module is obtained by changing the SiLU activation function of the SPPF module in the YoloV8-OBB neural network model to the ReLU activation function; The CBAM module is a convolutional attention module that connects the channel attention module and the spatial attention module in series. The specific workflow of the CBAM module is as follows: The feature F input into the CBAM module is first input into the channel attention module. After global maximum pooling and global average pooling, the results are respectively passed through the MLP. The two results are added together, and then the added features are mapped by the Sigmoid activation function to obtain the channel attention map M. C , multiply it element by element with feature F to get feature F'; Then the feature F' is input into the spatial attention module, and is processed by global maximum pooling and global average pooling respectively. The results of global maximum pooling and global average pooling are concatenated in the channel dimension, and then processed by a 7×7 convolution and Sigmoid activation function mapping to obtain the spatial attention map M S , multiply it element-by-element with the feature F' to get the final convolution attention map F"; the specific calculation formula is as follows: Among them, W0 and W1 represent the weights of the two layers of MLP, σ represents the Sigmoid activation function, and f 7×7 represents a 7×7 convolution operation, Represents element-wise multiplication; Same meaning as AvgPool(F), indicating the result of feature F being processed by the global maximum pooling in the channel attention module. Same meaning as MaxPool(F), indicating the result of feature F being processed by global average pooling in the channel attention module; Same meaning as AvgPool(F'), indicating the result of feature F' being processed by the global maximum pooling in the spatial attention module. Same meaning as MaxPool(F'), indicating the result of feature F' being processed by global average pooling in the spatial attention module; Indicates that and Perform stitching in the channel dimension; Step 3: Train the detection model For the detection model architecture based on the improved YoloV8-OBB neural network model in the second step, load the pre-trained weight parameter file, and use the random assignment method to initialize the bias parameters, set the batch size to 16, and the initial learning rate to 1×10 -2 , using SGD optimizer; epochs is set to 500 rounds; a batch of brake pad images in the training set in the first step is input into the detection model, and three regression output features and three category output features are output according to each brake pad image, which are tiled and stacked to obtain a total regression output and a total category output; based on the regression output and category output, the confidence score of a certain category prediction box is calculated; the prediction box containing the confidence score is screened for initial scores and non-maximum suppression is processed, and the obtained results are used to draw the final prediction box to obtain the final brake pad location information and category information; The weights and biases of a detection model are updated using the mean of the training loss of a batch of brake pad images to complete the training of a batch of brake pad images; the network parameters when the previous batch of training is completed are used as the initial network parameters when the next batch of training is completed, and the process is repeated continuously until the training of the last batch of brake pad images in a training set is completed and a round of training is completed; after each round of training, the brake pad images in the validation set in the first step are sequentially input into the detection model, and the mean of the training loss of the detection model for the brake pad images in the validation set during this round of training is calculated based on the output of the detection model; the network parameters when the previous round of training is completed are used as the initial parameters for the next round of training, and the process is repeated continuously until the mean of the training loss of the brake pad images in the validation set for 10 consecutive rounds remains unchanged or the training round reaches the maximum value, then the training of the detection model is completed, and the detection model is saved to obtain the detection model for the brake pad; The loss function for the training loss of a brake pad image is the sum of Bbox_Loss and Cls_Loss: Among them, (x 1 ,y 1 ) is the predicted brake pad center coordinate; (x, y) is the actual brake pad center coordinate; w 1 、h 1 is the predicted brake pad width and height; x, h are the actual brake pad width and height; p c is the true category probability distribution, z c is the original output value of the detection model on category c; cooed is a weight coefficient; z i It is the output value of the detection model on class i, and the value range of i is a positive integer from 1 to C.
2. A detection model for brake pads according to claim 1, characterized in that: In the first step, the preset quantity ratio is 8:
2.
3. A detection model for brake pads according to claim 1, characterized in that: In the first step, the rotation angle refers to the rotation angle at which the outline of the brake pad in the image is rotated to a preset state.
4. A detection model for brake pads according to claim 3, characterized in that: The preset state is a state in which the symmetry line of the outline of the brake pad is parallel to the symmetry line of the size of the brake pad image.
5. A detection model for brake pads according to claim 1, characterized in that: In the third step, λ cooed The value is 0.
5.
6. A sorting system for brake pads, characterized in that: The sorting system includes a detection device, an object conveying device, an action execution device, and a feeding device; the detection device includes a shooting component, a display device, and a control system in which a detection model for a brake pad as described in any one of claims 1 to 5 is deployed; the shooting component includes an industrial camera and a light source; the control system is connected to the industrial camera for communication and is used to obtain the brake pad image captured by the industrial camera; The display device is connected to the control system for displaying the position information and category information obtained after the brake pad is detected; The object conveying device is a device including a conveyor belt and a conveyor belt driving motor, and the brake pad is placed on the conveyor belt; The conveyor belt moves under the drive of the motor, thereby sending the brake pads to the image acquisition area and the action execution area in sequence; the conveyor belt driving motor is connected to the control system through the motor driver; The action execution device is a device including a parallel robot with a gripper and a motor for driving the parallel robot; when the brake pad reaches the action execution area, the parallel robot moves under the drive of the motor, thereby performing the grabbing and placing operations according to the instructions; the motor of the action execution device is connected to the control system through the motor driver, and is used to perform the grabbing and placing operations according to the instructions of the control system; The feeding device is used to place the brake pads on the conveyor belt; wherein the feeding device is a parallel robot with a clamp and a motor for driving the parallel robot, the clamp is used to grab the brake pads, and the parallel robot places the brake pads on the conveyor belt driven by the motor; the motor of the feeding device is connected to the control system through the motor driver; The left and right sides of the conveyor belt of the object conveying device in the length direction are respectively the feeding end and the sorting end of the brake pad, the feeding device and the action execution device are respectively arranged at the feeding end and the sorting end, the shooting component is arranged at the rear of the side of the conveyor belt close to the feeding end thereof, and the camera head of the industrial camera is arranged toward one side of the conveyor belt, and the conveyor belt part located directly in front of the camera head of the industrial camera is within the shooting field of view of the camera head of the industrial camera; The loading point of the loading equipment is located on the conveyor belt. The area of the conveyor belt facing the camera head of the industrial camera is the image acquisition area, the area of the conveyor belt facing the clamping claws of the action execution device is the action execution area, and the horizontal distance between the loading point of the loading equipment and the center point of the image acquisition area and the center point of the action execution area is a preset value.
7. A sorting system for brake pads according to claim 6, characterized in that: The detection system also includes a sensor, which is communicatively connected with the control system; the sensor is used to detect the position of the brake pad to instruct the action execution device to execute a corresponding action.
8. A sorting system for brake pads according to claim 6, characterized in that: The industrial camera is a MV-HS series 2nd generation industrial camera; the control system is an industrial computer, or other devices including a computing device and a controller; the parallel robot is an ABBIRB360 robot; and the display device is a display screen of AOC.
9. A sorting system for brake pads according to claim 6, characterized in that: The shooting component is set.
10. A method for sorting brake pads, the method being implemented by a sorting system according to any one of claims 6 to 9, comprising the following steps: Step 1: Collect brake pad images A brake pad is transported to a loading point by a feeding device, and then the feeding device is turned off; the time for a brake pad to arrive in front of the center point of the camera head of the industrial camera is obtained according to the rotation speed of the conveyor belt drive motor, and when the brake pad arrives in front of the center point of the camera head of the industrial camera, the conveyor belt drive motor is turned off, and the industrial camera takes a picture of the brake pad to obtain an image of the brake pad; Step 2: Get the test results The industrial camera sends the brake pad image in step 1 to the control system, and the control system processes the brake pad image using the detection model for the brake pad deployed internally to obtain the current position information and category information of the brake pad; Step 3: Sorting brake pads The conveyor belt drive motor is turned on, and the time to reach the grasping center point of the action execution device is calculated according to the horizontal distance between the center point of the camera head of the industrial camera and the grasping center point of the action execution device. When the brake pad reaches the grasping center point of the action execution device, the conveyor belt drive motor is turned off; then the action execution device is turned on, and according to the position information and category information of the brake pad sent by the control system, the parallel robot moves under the drive of the motor, and sorts it to the product collection point of the corresponding category according to its category, thereby completing the sorting of the brake pad.
