Bearing surface defect detection method, device and equipment based on improved YOLOv8s and storage medium
By improving the defect detection neural network model of YOLOv8s algorithm, the problems of miss detection and low accuracy in bearing surface defect detection are solved, and accurate identification and high accuracy detection of small target defects are achieved.
Patent Information
- Application Number
- CN202411991056.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
AI Technical Summary
The prior art has problems of missed detection and low detection accuracy in the detection of bearing surface defects, especially when dealing with complex textures and small target defects.
Improve the defect detection neural network model of the YOLOv8s algorithm, replace the Bottleneck module of the C2F module in the backbone network as the MSAM module, the SPPF module as the SPPELAN module, and replace the loss function with Shape-IoU.
Accurate identification of small targets on the bearing surface is achieved, reducing the possibility of missed inspection and improving the accuracy and reliability of inspection.
Smart Images

Figure CN119810083A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image data processing technology, and in particular to a bearing surface defect detection method, device, equipment and storage medium based on improved YOLOv8s. Background Art
[0002] Bearings are important parts in mechanical equipment. Their quality directly affects the smoothness and safety of equipment operation. Damage to the bearing surface will reduce its service life and stability. Therefore, bearing surface defect detection is a key quality control step to ensure that the surface quality of bearing products meets the standards.
[0003] At present, as deep learning technology is applied more and more widely, this technology is also used in bearing defect detection and positioning. However, due to the complexity of the bearing surface texture and the relatively small defect size, the existing target detection algorithm has the problem of missing small target defects when detecting bearing defects, resulting in low detection accuracy. Summary of the invention
[0004] The embodiments of this specification provide a bearing surface defect detection method based on improved YOLOv8s to solve the problems of missed detection and low detection accuracy in bearing surface defect detection in the prior art.
[0005] To solve the above technical problems, the embodiments of this specification are implemented as follows: In a first aspect, an embodiment of this specification provides a bearing surface defect detection method based on improved YOLOv8s, including: Acquire image data of the bearing to be inspected; Inputting the image data into a defect detection neural network model based on an improved YOLOv8s algorithm to obtain a bearing surface defect detection result output by the defect detection neural network model; Among them, the defect detection neural network model of the improved YOLOv8s algorithm is to replace the Bottleneck module of the C2F module in the backbone network of the original YOLOv8s algorithm with an MSAM module, and the SPPF module with an SPPELAN module; the loss function is replaced by Shape-IoU.
[0006] In a second aspect, an embodiment of this specification provides a bearing surface defect detection device based on improved YOLOv8s, including: An acquisition module, used for acquiring image data of the bearing to be inspected; A determination module, used to input the image data into a defect detection neural network model based on an improved YOLOv8s algorithm, and obtain a bearing surface defect detection result output by the defect detection neural network model; Among them, the defect detection neural network model of the improved YOLOv8s algorithm is to replace the Bottleneck module of the C2F module in the backbone network of the original YOLOv8s algorithm with an MSAM module, and the SPPF module with an SPPELAN module; the loss function is replaced by Shape-IoU.
[0007] In the third aspect, an embodiment of this specification provides a bearing surface defect detection device based on improved YOLOv8s, including a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the bearing surface defect detection method based on improved YOLOv8s in scheme one.
[0008] In a fourth aspect, an embodiment of the present specification provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the bearing surface defect detection method based on improved YOLOv8s in solution one is implemented.
[0009] An embodiment of the present specification can achieve the following beneficial effects: by improving the defect detection neural network model of the YOLOv8s algorithm, defect information in image data is identified to realize the detection of bearing surface defects. The defect detection neural network model replaces the Bottleneck module of the C2F module in the backbone network of the original YOLOv8s algorithm with an MSAM module, the SPPF module is replaced with an SPPELAN module, and the loss function is replaced with Shape-IoU. It can realize accurate recognition of small targets on the bearing surface, reduce the possibility of missed detection, and improve the accuracy and reliability of bearing surface detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0011] Figure 1 A flow chart of a bearing surface defect detection method based on improved YOLOv8s provided in an embodiment of this specification; Figure 2 A schematic diagram of the improved YOLOv8s network structure provided in the embodiments of this specification; Figure 3 A schematic diagram of the structure of the MSAM-C2f module provided in the embodiments of this specification; Figure 4A schematic diagram of the structure of the SPPELAN module provided in the embodiments of this specification; Figure 5 A schematic diagram of an application scenario of a bearing surface defect detection method based on an improved YOLOv8s provided in an embodiment of this specification, wherein (a) is a schematic diagram of a coordinate loss curve during training, (b) is a schematic diagram of a classification loss curve during training, (c) is a schematic diagram of a confidence loss curve during training, (d) is a schematic diagram of a coordinate loss curve during verification, (e) is a schematic diagram of a classification loss curve during verification, and (f) is a schematic diagram of a confidence loss curve during verification; Figure 6 A schematic diagram of the structure of a bearing surface defect detection device based on improved YOLOv8s provided in an embodiment of this specification; Figure 7 A structural schematic diagram of a bearing surface defect detection device based on improved YOLOv8s provided in an embodiment of this specification. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of one or more embodiments of this specification.
[0013] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0014] A bearing surface defect detection method based on improved YOLOv8s provided in the embodiment of the specification is specifically described in conjunction with the accompanying drawings.
[0015] Figure 1 A flow chart of a bearing surface defect detection method based on improved YOLOv8s provided in an embodiment of this specification.
[0016] like Figure 1 As shown, the method may include the following steps: Step 110: Acquire image data of the bearing to be inspected.
[0017] In the embodiments of this specification, image data including videos, pictures, etc. are collected by a camera, and defects may include scratches, abrasions, grooves, etc. The bearing surface defect detection result may include defect type and defect location, and the defect location may be displayed in the form of a marked box.
[0018] Step 120: inputting the image data into a defect detection neural network model based on an improved YOLOv8s algorithm to obtain a bearing surface defect detection result output by the defect detection neural network model; Among them, the defect detection neural network model of the improved YOLOv8s algorithm is to replace the Bottleneck module of the C2F module in the backbone network of the original YOLOv8s algorithm with an MSAM module, and the SPPF module with an SPPELAN module; the loss function is replaced by Shape-IoU.
[0019] In the embodiments of this specification, the original YOLOv8s algorithm is improved, the Bottleneck module of the C2F module in the backbone network is replaced with the MSAM module, and this combined module is named the MSAM-C2F module. The MSAM module can enable the channel attention to have multi-scale performance, thereby enhancing the network's ability to extract image detail features, especially improving the sensitivity to tiny defects, enhancing the detection capability of small targets, and reducing missed detections.
[0020] The SPPELAN module is a multi-scale feature fusion structure that combines SPP and ELAN. The SPPELAN module captures different spatial context information of the input data through parallel multi-scale maximum pooling operations, and then fuses this information with richer features. Each maximum pooling layer has a different spatial receptive field. The SPPELAN module can enhance the algorithm's feature representation ability and the ability to detect objects of different scales, thereby improving the robustness of the model.
[0021] The loss function is used to measure the degree of deviation of the model's prediction from the true value. The loss function of YOLOv8s is divided into three parts: confidence loss, coordinate loss and classification loss. The coordinate loss is calculated using the CIOU loss function, and the confidence loss and classification loss are calculated using the Shape-IoU loss function. loss The calculation formula is: , where
[0022]
[0023]
[0024] Among them, b is the parameter of the center coordinate of the predicted bounding box, b gtis the parameter of the center coordinate of the true bounding box, ρ is the Euclidean distance between the predicted bounding box and the true bounding box, c is the diagonal length of the minimum circumscribed rectangle that completely encloses the predicted bounding box and the true bounding box, w is the width of the predicted bounding box, h is the height of the predicted bounding box, and W gt is the width of the true bounding box, h gt is the height of the true bounding box, and v is used to measure the proportional consistency between the predicted box and the true box.
[0025] The Shape-IoU loss function is used to calculate the loss by focusing on the shape and scale of the bounding box itself, making the bounding box regression more accurate, which is particularly important for small target defect detection of bearings. shape-IoU The calculation formula is: , where
[0026]
[0027]
[0028]
[0029]
[0030]
[0031] Among them, B is the predicted bounding box; B gt is the true bounding box; x c is the x coordinate of the center point of the prediction box; y c is the y coordinate of the center point of the prediction box; x c gt is the x coordinate of the center point of the real frame; y c gt is the y coordinate of the center point of the real frame; C is the coordinate of the center point; Ω shape To quantify the shape difference between the predicted box and the real box; t represents the independent variable, taking values of w and h; The width difference between the predicted box and the real box is calculated using relative size; is the height difference between the predicted box and the real box, calculated using relative size; scale is the scale factor, which is related to the scale of the target in the dataset, ww is the weight coefficient in the horizontal direction, and hh is the weight coefficient in the vertical direction. The values of ww and hh are related to the shape of the gt box; is the intermediate amount introduced.
[0032] It should be understood that the order of some steps in the methods described in one or more embodiments of this specification can be interchanged according to actual needs, or some steps can be omitted or deleted.
[0033] In this application, the defect detection neural network model of the YOLOv8s algorithm is improved to identify defect information in image data and realize the detection of bearing surface defects. The defect detection neural network model replaces the Bottleneck module of the C2F module in the backbone network of the original YOLOv8s algorithm with the MSAM module, the SPPF module is replaced with the SPPELAN module, and the loss function is replaced with Shape-IoU. It can realize the accurate recognition of small targets on the bearing surface, reduce the possibility of missed detection, and improve the accuracy and reliability of bearing surface detection.
[0034] based on Figure 1 The method in this specification also provides some specific implementation plans of the method, which are described below.
[0035] Optionally, before inputting the image data into a defect detection neural network model based on an improved YOLOv8s algorithm and obtaining a bearing surface defect detection result output by the defect detection neural network model in the embodiments of this specification, the following may be included: Obtain an image dataset of a bearing; Annotating defects in the image dataset; The defect detection neural network model of the improved YOLOv8s algorithm is trained using the labeled image data set.
[0036] In the embodiments of this specification, labelimg can be used to annotate defects in all collected image data. Labelimg is an open source graphic image annotation tool that annotates the defect type of each defect and the position of each defect in the image.
[0037] The annotated images are input into the defect detection neural network model of the improved YOLOv8s algorithm for training to obtain the final detection model. The model can be trained to have sufficient recognition capabilities by collecting image datasets of real scenes.
[0038] During the model training phase, the features of the target are extracted and learned, and then the identified target is verified and tested based on the learned features. The model is continuously optimized based on specific parameters to ultimately achieve detection and recognition of the target.
[0039] Optionally, obtaining the image data set of the bearing in the embodiments of this specification may specifically include: Acquire multiple raw image data of the bearing; Selecting a preset number of original image data for splicing processing to obtain target image data; Using the target image data, an image data set of the bearing is established.
[0040] In the embodiments of the present specification, image data of bearings containing defects are collected by a camera. In order to increase data diversity and generate more training samples, a preset number of original image data can be spliced into target image data. For example, 4 original image data can be spliced together. Each image will have a greater probability of containing a small target, which is beneficial to improving the detection performance of small targets.
[0041] Optionally, before selecting a preset number of original image data for stitching processing in the embodiments of this specification, the following may be included: The plurality of original image data are enhanced; the enhancement processing comprises at least one of rotation, cropping, mirroring, and noise addition.
[0042] In the embodiments of the present specification, before the original image data is spliced, each image may be resized and scaled, and spliced in a random arrangement.
[0043] In practical applications, you can use Mosaic data enhancement to stitch four random images into one image as a training sample, or you can stitch a selected image and three random images into one image as a training sample to increase data diversity and improve the robustness of the model. By combining four images with different semantic information, more training samples can be generated. Mixing the information of the four images allows the model to detect targets beyond the conventional context. Since the enhanced image is stitched together from four original images, each image has a greater probability of containing small targets, which is beneficial to improving the detection performance of small targets.
[0044] In practical applications, the Hikvision MV-CE200-10GC industrial camera can be used with the MVL-KF1628M-12MP fixed-focus industrial lens and LED ring white light fill light to complete the image acquisition of the bearing to be tested. The number of images of the original bearing dataset collected is 1841, and the image size is 416×416. Each image contains scratches, abrasions, grooves and other types of bearing defects.
[0045] Because various factors in the on-site environment often cause noise to be mixed into the image during the acquisition of bearing defect images, the median filter method is used to reduce the noise of the image. Subsequently, the data set is expanded using data enhancement methods, such as rotation, mirroring, random addition of white noise, etc. The number of expanded data sets is 5824. Finally, labelimg software is used to mark each image, annotate the defect type and defect location, and output the corresponding label file, which is used to train the defect detection neural network model.
[0046] Figure 2 A schematic diagram of the improved YOLOv8s network structure provided in the embodiments of this specification.
[0047] like Figure 2 As shown in the figure, the image data of the bearing to be detected is input into the backbone network (Backbone) of the improved YOLOv8s model for feature extraction, and then input into the head network (Head) for feature fusion and target detection and classification.
[0048] In the backbone network, the feature map first undergoes two convolution (Conv) operations for simple feature extraction, and then the feature map is input into the MSAM-C2f module for further feature extraction. The MSAM-C2f module focuses on multi-scale feature extraction and optimizes the feature map by enhancing the multi-scale attention mechanism of the model, thereby enhancing the model's ability to capture key information in the input image, especially the sensitivity to small defects in bearings. Finally, the convolution (Conv) and MSAM-C2f modules are arranged alternately to greatly improve the model's feature extraction ability. In the last layer of the backbone network, the SPPELAN multi-scale feature fusion structure receives and processes the feature map input by the MSAM-C2f module. These feature maps first enter a CBS module that integrates convolutional layers and local attention mechanisms to preliminarily extract features and highlight key information. Then, three maximum pooling layers (MaxPool2d) are used to reduce the dimension of the feature map, retain important feature information, and reduce data redundancy and computation. Subsequently, they are recombined into a new feature map through the Concat module. Finally, after further refinement by another CBS module, the concatenated features are converted into an output feature map, which facilitates feature fusion in the subsequent head network (Head).
[0049] After the backbone network is processed, the feature map enters the head network for subsequent feature fusion, target detection and classification tasks. In this process, the loss function is adjusted to Shape IoU to increase the model's attention to the shape and scale of the small target detection box, so that the network pays more attention to the learning of small defects during training, thereby improving the detection accuracy of small target defects in bearings.
[0050] The embodiment of the present application can first obtain image data of the bearing to be inspected, wherein the image data is an image sequence extracted by a camera, and then input it into the defect detection neural network model based on the improved YOLOv8s algorithm in the embodiment of the present application. After the input part of the defect detection neural network model based on the improved YOLOv8s algorithm receives the image information, the neural network model is used to extract features, fuse, and predict results of the input image, and the final detection result is output. Finally, the recognition result of the image data is to detect and mark all target images and the positions of the target images in the detected image.
[0051] The MSAM-C2f attention mechanism, SPPELAN multi-scale feature fusion structure and Shape-IoU loss function are introduced into the original YOLOv8s network to improve YOLOv8s and construct an improved defect detection neural network model (MSS-YOLOv8s). In order to verify the effectiveness of the improvement, ablation experiments are carried out. The experimental results are shown in Table 1.
[0052]
[0053] As can be seen from Table 1, the average accuracy of the original YOLOv8s is 0.844. YOLOv5+Shape-IoU is a YOLOv8s network that only adjusts the loss function, and the average accuracy is improved by 1.3%, because Shape-IoU is suitable for solving the class imbalance problem in classification problems, so that the model pays more attention to difficult-to-classify samples during training, which is especially important for small target defect detection of bearings, because small targets are often difficult-to-classify samples. YOLOv8s+MSAM-C2f is a YOLOv8s network that only adds the MSAM-C2f attention module to the Backbone, and the average accuracy is improved by 2.2%, because the MSAM-C2f attention module can enhance the network's ability to extract image detail features, especially improve the sensitivity to tiny defects, and enhance the network's ability to learn small target features, thereby improving the feature expression ability of the convolutional neural network and improving the performance and accuracy of the model. YOLOv8s+SPPELAN is a YOLOv8s network that only adds the SPPELAN module to the Backbone, and the average accuracy is improved by 2.0%, because the SPPELAN network module can extract the multi-scale information of the input feature map through pooling operations at different scales, and generate feature maps with stronger semantic information, thereby enhancing the robustness of the model and the ability to detect targets of different scales. In this application, after introducing the adjustment loss function, the MSAM-C2f attention module and the SPPELAN network module in the original YOLOv8s network, the average accuracy is improved by 2.7%, and the speed is 72.50, which meets the requirements of real-time detection.
[0054] The MSS-YOLOv8s used in the application was compared with the YOLOv3-Tiny, YOLOv5, and YOLOv8s networks to verify their accuracy and effectiveness. The YOLOv3-Tiny, YOLOv7, and YOLOv8s networks were built with the same parameters as the MSS-YOLOv8s, and the same training, validation, and test sets were used in the models. The accuracy and speed of different network models are shown in Table 2.
[0055]
[0056] As can be seen from Table 2, first of all, from the key indicator of average accuracy, the MSS-YOLOv8s used in this application has improved by 4.4, 2.1 and 2.2 percentage points compared with YOLOv3-Tiny, YOLOv5 and YOLOv8s, respectively. Secondly, from the key indicator of accuracy of different defect types, the MSS-YOLOv8s used in this application has improved the accuracy of scratch defects by 2.3 percentage points, the accuracy of scratch defects by 2 percentage points, and the accuracy of groove defects by 5.8 percentage points compared with the YOLOv8s model. Especially in the monitoring of inconspicuous defects such as scratches, the MSS-YOLOv8s used in this application has the highest detection accuracy. Finally, the speed of MSS-YOLOv8s in this application is 72.50, which meets the requirements of real-time detection.
[0057] Therefore, the MSS-YOLOv8s used in this application has higher accuracy while meeting the real-time detection requirements, and can more accurately identify defects such as abrasions, scratches, and grooves of the bearing.
[0058] Figure 3 This is a schematic diagram of the structure of the MSAM-C2f module provided in the embodiments of this specification.
[0059] like Figure 3 As shown, the MSAM-C2f module includes two Conv modules, one Split module, one Concat module and three MSAM modules.
[0060] The input feature map first enters the Conv module for preliminary feature extraction and transformation, and then the Split module divides the feature map into two routes for independent processing to improve the model's parallel processing capabilities. The feature map then passes through three MSAM modules. The MSAM module can enable channel attention to have multi-scale performance and enhance the model's multi-scale attention mechanism, so that the model can better capture the key information in the input image, especially improve the sensitivity to tiny defects in bearings. Finally, the feature maps of the two routes are recombined into a new feature map through the Concat module, enriching the feature representation, improving the model's target detection capability, and reducing missed detection.
[0061] Figure 4 A schematic diagram of the structure of the SPPELAN module provided in the embodiments of this specification.
[0062] like Figure 4 As shown in the figure, the input feature map first enters a CBS module (CV1), which integrates convolutional layers and local attention mechanisms to initially extract features and enhance key information. The feature map then enters three maximum pooling layers (Maxppol2d) for processing (CV2-CV4), which reduces the dimension of the feature map while retaining the most important feature information, reducing data redundancy and computation. Next, the Concat module is used to recombine the features of all parallel branches into a unified feature map, ensuring that the information extracted by each module can complement each other and enrich the feature representation. Finally, after another CBS module (CV5), the spliced features are further refined and the feature map is output for use in subsequent network layers.
[0063] Figure 5 A schematic diagram of an application scenario of a bearing surface defect detection method based on an improved YOLOv8s provided in an embodiment of this specification, wherein (a) is a schematic diagram of a coordinate loss curve during training, (b) is a schematic diagram of a classification loss curve during training, (c) is a schematic diagram of a confidence loss curve during training, (d) is a schematic diagram of a coordinate loss curve during verification, (e) is a schematic diagram of a classification loss curve during verification, and (f) is a schematic diagram of a confidence loss curve during verification.
[0064] After the model training is completed, three types of loss curves are obtained, namely coordinate loss (box_loss), classification loss (cls_loss) and confidence loss (dfl_loss). Among them, the smaller the coordinate loss, the more accurate the algorithm can predict the location of the target; the smaller the classification loss, the more accurate the algorithm classification; the smaller the confidence loss, the more accurate the algorithm can correctly identify the target in the image.
[0065] The data loss curve of the defect detection neural network model of the improved YOLOv8s algorithm during training and verification is as follows Figure 5 As shown, it can be seen that with the increase of the number of training times on the horizontal axis, the data loss curve shows a continuous downward trend, especially in the first 50 training times at the beginning of training, the loss curve decreases rapidly, indicating that the model quickly learns and effectively reduces the prediction error at this stage. When the number of training times reaches about 100 times, the loss curve tends to be stable, which means that the defect detection neural network model can achieve fast and stable convergence in both training and verification stages, with good training effect, which can ensure the accuracy of bearing defect detection.
[0066] Figure 6 This is a structural schematic diagram of a bearing surface defect detection device based on improved YOLOv8s proposed in an embodiment of this specification.
[0067] The bearing surface defect detection device based on improved YOLOv8s described in the embodiments of this specification may include: An acquisition module 602 is used to acquire image data of the bearing to be inspected; A determination module 604 is used to input the image data into a defect detection neural network model based on an improved YOLOv8s algorithm to obtain a bearing surface defect detection result output by the defect detection neural network model; Among them, the defect detection neural network model of the improved YOLOv8s algorithm is to replace the Bottleneck module of the C2F module in the backbone network of the original YOLOv8s algorithm with an MSAM module, and the SPPF module with an SPPELAN module; the loss function is replaced by Shape-IoU.
[0068] Optionally, before inputting the image data into a defect detection neural network model based on an improved YOLOv8s algorithm and obtaining a bearing surface defect detection result output by the defect detection neural network model in the embodiments of this specification, the device may further include: Obtain an image dataset of a bearing; Annotating defects in the image dataset; The defect detection neural network model of the improved YOLOv8s algorithm is trained using the labeled image data set.
[0069] Optionally, obtaining the image data set of the bearing in the embodiments of this specification may specifically include: Acquire multiple raw image data of the bearing; Selecting a preset number of original image data for splicing processing to obtain target image data; Using the target image data, an image data set of the bearing is established.
[0070] Optionally, before selecting a preset number of original image data for stitching processing in the embodiments of this specification, the device may further include: The plurality of original image data are enhanced; the enhancement processing comprises at least one of flipping, cropping, scaling, and adding noise.
[0071] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0072] Figure 7 A structural schematic diagram of a bearing surface defect detection device based on improved YOLOv8s provided in an embodiment of this specification.
[0073] like Figure 7 As shown, an embodiment of this specification provides a bearing surface defect detection device 700 based on improved YOLOv8s, including a memory 730, a processor 710 and a computer program 720 stored in the memory, and the processor 710 executes the computer program 720 to implement the bearing surface defect detection method based on improved YOLOv8s described in any of the above embodiments.
[0074] A bearing surface defect detection device based on improved YOLOv8s provided in an embodiment of this specification may include a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the bearing surface defect detection method based on improved YOLOv8s described in any of the above embodiments.
[0075] An embodiment of this specification provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the bearing surface defect detection method based on improved YOLOv8s described in any of the above embodiments can be implemented.
[0076] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 7 As for the device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0077] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with hardware entity modules. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0078] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0079] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0080] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0081] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0083] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0085] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0086] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0087] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0088] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0089] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0090] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0091] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A bearing surface defect detection method based on improved YOLOv8s, characterized in that: include: Acquire image data of the bearing to be inspected; Inputting the image data into a defect detection neural network model based on an improved YOLOv8s algorithm to obtain a bearing surface defect detection result output by the defect detection neural network model; Among them, the defect detection neural network model of the improved YOLOv8s algorithm is to replace the Bottleneck module of the C2F module in the backbone network of the original YOLOv8s algorithm with an MSAM module, and the SPPF module with an SPPELAN module; the loss function is replaced by Shape-IoU.
2. The method according to claim 1, characterized in that Before inputting the image data into a defect detection neural network model based on an improved YOLOv8s algorithm to obtain a bearing surface defect detection result output by the defect detection neural network model, the method further includes: Obtain an image dataset of a bearing; Annotating defects in the image dataset; The defect detection neural network model of the improved YOLOv8s algorithm is trained using the labeled image data set.
3. The method according to claim 2, characterized in that The step of obtaining the image data set of the bearing specifically includes: Acquire multiple raw image data of the bearing; Selecting a preset number of original image data for splicing processing to obtain target image data; Using the target image data, an image data set of the bearing is established.
4. The method according to claim 3, characterized in that: Before selecting a preset number of original image data for splicing processing, the method further includes: The plurality of original image data are enhanced; the enhancement processing comprises at least one of rotation, cropping, mirroring, and noise addition.
5. A bearing surface defect detection device based on improved YOLOv8s, characterized in that: include: An acquisition module, used for acquiring image data of the bearing to be inspected; A determination module, used to input the image data into a defect detection neural network model based on an improved YOLOv8s algorithm, and obtain a bearing surface defect detection result output by the defect detection neural network model; Among them, the defect detection neural network model of the improved YOLOv8s algorithm is to replace the Bottleneck module of the C2F module in the backbone network of the original YOLOv8s algorithm with an MSAM module, and the SPPF module with an SPPELAN module; the loss function is replaced by Shape-IoU.
6. The device according to claim 5, characterized in that Before inputting the image data into a defect detection neural network model based on an improved YOLOv8s algorithm to obtain a bearing surface defect detection result output by the defect detection neural network model, the device further includes: Obtain an image dataset of a bearing; Annotating defects in the image dataset; The defect detection neural network model of the improved YOLOv8s algorithm is trained using the labeled image data set.
7. The device according to claim 6, characterized in that The step of obtaining the image data set of the bearing specifically includes: Acquire multiple raw image data of the bearing; Selecting a preset number of original image data for splicing processing to obtain target image data; Using the target image data, an image data set of the bearing is established.
8. The device according to claim 7, characterized in that Before selecting a preset number of original image data for splicing processing, the device further includes: The plurality of original image data are enhanced; the enhancement processing comprises at least one of flipping, cropping, scaling, and adding noise.
9. A bearing surface defect detection device based on improved YOLOv8s, comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Cited By
Farmland obstacle lightweight detection method and device based on RMS and YOLOv11
CN122493278A