Aluminum material defect detection method, device and equipment based on improved YOLOv8 and storage medium

By enhancing the YOLOv8n algorithm with FasterNet, a P2 layer, RepViT Block, and DySample upsampling, the method addresses deployment and accuracy issues in mobile aluminum defect detection, enabling efficient real-time detection on mobile devices.

CN119168998APending Publication Date: 2024-12-20FUJIAN UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411402568.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Existing aluminum defect detection technologies face challenges in deploying on mobile embedded detection equipment due to high memory usage and issues with false positives and false negatives in small target defect detection.

Method used

The method involves improving the YOLOv8n algorithm by replacing its backbone network with FasterNet, adding a P2 layer to the neck network, replacing the C2f module with a RepViT Block module, and using a DySample upsampling operator, which reduces memory footprint and enhances small target defect detection accuracy.

Benefits of technology

This improvement allows for real-time detection of aluminum defects on mobile embedded equipment with reduced memory usage and improved accuracy, minimizing false alarms and missed detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168998A_ABST
    Figure CN119168998A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an aluminum material defect detection method, device and equipment based on improved YOLOv8 and a storage medium, and relates to the technical field of computer vision. The scheme can comprise the following steps: acquiring image data of a to-be-detected aluminum material; inputting the image data into a defect detection neural network model based on an improved YOLOv8n algorithm to obtain an aluminum defect detection result output by the defect detection neural network model; wherein the defect detection neural network model of the improved YOLOv8n algorithm is characterized in that a backbone network of an original YOLOv8n algorithm is replaced by a Faster Net network, and the Faster Net network comprises a Faster Net Block module; a P2 layer is added in a neck network, a C2f module is replaced by a RepViT Block module, an original up-sampling layer of YOLOv8 is replaced by a DySample up-sampling operator, and on the basis of being applied to mobile embedded detection equipment, the detection precision of small target aluminum material defects is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to an aluminum material defect detection method, device, equipment and storage medium based on improved YOLOv8. Background Art

[0002] As an indispensable basic material in industrial production, aluminum plays an important role and has been widely used in various fields. At present, aluminum surface defect detection is a key quality control step to ensure that the surface quality of aluminum products meets the standards.

[0003] At present, as deep learning technology is increasingly used, many researchers are also using it in aluminum defect detection and location. Through the network model, the detection accuracy can be effectively improved, but the existing network model takes up a lot of memory and cannot be deployed in mobile embedded detection equipment. At the same time, there are false positives and false negatives in the detection of small target defects.

[0004] Therefore, how to improve the detection accuracy of small target aluminum defects based on the application of mobile embedded detection equipment has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of this specification provide an aluminum material defect detection method based on improved YOLOv8 to solve the problem that the prior art cannot be deployed on mobile embedded detection equipment and there are false positives and missed positives in small target defect detection.

[0006] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0007] In a first aspect, an aluminum material defect detection method based on improved YOLOv8 is provided in an embodiment of this specification, comprising:

[0008] Acquire image data of the aluminum material to be inspected;

[0009] Inputting the image data into a defect detection neural network model based on an improved YOLOv8n algorithm to obtain an aluminum material defect detection result output by the defect detection neural network model;

[0010] Among them, the defect detection neural network model of the improved YOLOv8n algorithm is to replace the backbone network of the original YOLOv8n algorithm with a FasterNet network, and the FasterNet network includes a FasterNet Block module; a P2 layer is added to the neck network, the C2f module is replaced by a RepViT Block module, and the upsampling layer of the original YOLOv8 is replaced by a DySample upsampling operator.

[0011] In a second aspect, an aluminum material defect detection device based on improved YOLOv8 is provided in an embodiment of this specification, comprising:

[0012] An acquisition module, used for acquiring image data of the aluminum material to be inspected;

[0013] A determination module, used for inputting the image data into a defect detection neural network model based on an improved YOLOv8n algorithm to obtain an aluminum material defect detection result output by the defect detection neural network model;

[0014] Among them, the defect detection neural network model of the improved YOLOv8n algorithm is to replace the backbone network of the original YOLOv8n algorithm with a FasterNet network, and the FasterNet network includes a FasterNet Block module; a P2 layer is added to the neck network, the C2f module is replaced by a RepViT Block module, and the upsampling layer of the original YOLOv8 is replaced by a DySample upsampling operator.

[0015] In a third aspect, an embodiment of this specification provides an aluminum defect detection device based on improved YOLOv8, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the aluminum defect detection method based on improved YOLOv8 in scheme one.

[0016] 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 aluminum defect detection method based on improved YOLOv8 in solution one is implemented.

[0017] An embodiment of the present specification can achieve the following beneficial effects: by improving the defect detection neural network model of the YOLOv8n algorithm, defect information in image data is identified to realize the detection of surface defects of aluminum materials. The defect detection neural network model replaces the backbone network of the original YOLOv8n algorithm with the FasterNet network, adds a P2 layer to the neck network, replaces the C2f module with the RepViT Block module, and replaces the original YOLOv8 upsampling layer with the DySample upsampling operator, thereby reducing the memory space occupied by the model, facilitating deployment on mobile embedded detection equipment, and improving the detection accuracy of small target aluminum defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] 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.

[0019] Figure 1 A schematic diagram of a flow chart of an aluminum material defect detection method based on improved YOLOv8 provided in an embodiment of this specification;

[0020] Figure 2 A schematic diagram of the improved YOLOv8n network structure provided in the embodiments of this specification;

[0021] Figure 3 A schematic diagram of the structure of the FasterNetBlock module provided in the embodiments of this specification;

[0022] Figure 4 A schematic diagram of the structure of the PConv module provided in the embodiments of this specification;

[0023] Figure 5 A schematic diagram of the structure of the Dysample module provided in the embodiments of this specification;

[0024] Figure 6 A schematic diagram of the structure of the RepViT Block module provided in the embodiments of this specification;

[0025] Figure 7 A schematic diagram of the structure of an aluminum material defect detection device based on improved YOLOv8 provided in an embodiment of this specification;

[0026] Figure 8 A schematic diagram of the structure of an aluminum defect detection device based on improved YOLOv8 provided in an embodiment of this specification. DETAILED DESCRIPTION

[0027] 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.

[0028] At present, as the application scenarios of deep learning technology become more and more extensive, many researchers have also applied this technology to the defect detection and positioning of aluminum materials. Aluminum target detection algorithms based on deep learning can be divided into two categories. The first category is based on a two-stage target detection network. The aluminum image first passes through the candidate frame generation network to obtain a large number of candidate frames, and then locates the aluminum defect position from these suggested frames. The second category is based on a single-stage target detection network. The input aluminum image directly passes through the convolutional neural network, and the position and category information are generated at the same time. Only one step is required to achieve target detection.

[0029] Among them, the first type is based on the two-stage target detection algorithm and is applied to aluminum defect detection with good detection accuracy, but it has disadvantages such as poor real-time performance and large number of parameters, making it difficult to deploy it on mobile embedded devices. The second type is based on the single-stage target detection algorithm and is applied to aluminum defect detection with high detection speed, but the feature extraction capability for small target objects is weak.

[0030] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0031] An aluminum material defect detection method based on improved YOLOv8 provided in the embodiment of the specification is specifically described in conjunction with the accompanying drawings.

[0032] Figure 1 A flowchart of an aluminum material defect detection method based on improved YOLOv8 is provided in an embodiment of this specification.

[0033] like Figure 1 As shown, the method may include the following steps:

[0034] Step 110: Acquire image data of the aluminum material to be inspected.

[0035] Step 120: inputting the image data into a defect detection neural network model based on an improved YOLOv8n algorithm to obtain an aluminum material defect detection result output by the defect detection neural network model;

[0036] Among them, the defect detection neural network model of the improved YOLOv8n algorithm is to replace the backbone network of the original YOLOv8n algorithm with a FasterNet network, and the FasterNet network includes a FasterNet Block module; a P2 layer is added to the neck network, the C2f module is replaced by a RepViT Block module, and the upsampling layer of the original YOLOv8 is replaced by a DySample upsampling operator.

[0037] In the embodiments of this specification, image data including videos, pictures, etc. are collected by a camera, and defects may include non-conductivity, scratches, dents, orange peel, bottom leakage, paint bubbles, jets, cracks, dirty spots, pits, etc. Among them, non-conductivity defects refer to the situation where the electroplating layer fails to cover during the electroplating process of aluminum materials, and bottom leakage defects refer to the situation where the paint fails to cover during the spraying process. The aluminum material defect detection results may include the defect type and defect location, and the defect location is displayed in the form of a marked box.

[0038] In practical applications, the original YOLOv8n algorithm is improved, and the backbone network is replaced with the FasterNet network. The FasterNet network consists of FasterNetBlock modules, which simplifies the model and improves the inference speed of the defect detection neural network model. The neck network adds a P2 small target detection layer, which greatly improves the model's small target detection effect by extracting more obvious small target feature information from a larger feature map; the lightweight upsampling operator DySample replaces the original ordinary upsampling operator. The lightweight upsampling operator DySample can reduce the computational burden during training, better capture important features in the data, and improve the efficiency of model training; the original C2f module is replaced by RepViT Block. The visual transformer architecture of RepViT Block can extract and utilize multi-level feature representations to effectively capture complex features and relative position relationships in the image. The improved neck network can improve the detection effect of small target aluminum defects without affecting the fusion of feature information.

[0039] 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.

[0040] In this application, the defect detection neural network model of the YOLOv8n algorithm is improved to identify defect information in image data and realize the detection of aluminum surface defects. The defect detection neural network model replaces the backbone network of the original YOLOv8n algorithm with the FasterNet network, adds a P2 layer to the neck network, replaces the C2f module with the RepViT Block module, and replaces the original YOLOv8 upsampling layer with the DySample upsampling operator, thereby reducing the memory space occupied by the model and facilitating deployment on mobile embedded detection equipment. At the same time, it improves the detection accuracy of small target aluminum defects, so that real-time detection of aluminum defects can be completed on the aluminum production line.

[0041] based on Figure 1 The method in this specification also provides some specific implementation plans of the method, which are described below.

[0042] Optionally, before inputting the image data into a defect detection neural network model based on an improved YOLOv8n algorithm and obtaining the aluminum material defect detection result output by the defect detection neural network model in the embodiments of this specification, the following may be included:

[0043] Obtain an image dataset of aluminum materials;

[0044] Annotating defects in the image dataset;

[0045] The defect detection neural network model of the improved YOLOv8n algorithm is trained using the labeled image data set.

[0046] 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.

[0047] The annotated images are input into the defect detection neural network model of the improved YOLOv8n algorithm for training to obtain the final detection model. The model can be trained to have sufficient recognition capabilities by collecting image data sets of real scenes.

[0048] 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.

[0049] Optionally, the acquisition of the image data set of aluminum material in the embodiments of this specification may specifically include:

[0050] Acquire multiple original image data of aluminum material;

[0051] Selecting a preset number of original image data for splicing processing to obtain target image data;

[0052] An image data set of aluminum material is established by using the target image data.

[0053] In the embodiments of this specification, a data set of an existing data innovation competition is used or image data of aluminum materials containing defects is collected by a camera. In order to increase data diversity and generate more training samples, images with different semantic information can be combined, and 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.

[0054] Optionally, before the splicing of the preset number of original image data in the embodiments of this specification may include:

[0055] Perform enhancement processing on the plurality of original image data; the enhancement processing includes at least one of random arrangement, random scaling, and cropping processing.

[0056] 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.

[0057] In practical applications, Mosaic data enhancement can be used to stitch four random images into one image as a training sample, or a selected image and three random images can be stitched into one image as a training sample to increase data diversity and improve the robustness of the model. Randomly select the coordinates of the image stitching reference point, and randomly select four images, resize and scale each image, and then place them in the upper left, upper right, lower left, and lower right positions of a large image of a specified size. According to the size transformation method of each image, the mapping relationship is mapped to the image label, the large image is stitched, and the detection box coordinates that exceed the boundary are processed.

[0058] 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 normal context. Since the enhanced image is composed of four original images, each image has a greater probability of containing small targets, which is conducive to improving the detection performance of small targets.

[0059] Optionally, the defect detection neural network model of the improved YOLOv8n algorithm described in the embodiments of this specification replaces the standard convolution kernel in the original YOLOv8n algorithm with the PConv of the FasterNet Block module.

[0060] In the embodiments of this specification, in order to reduce computational redundancy and the number of memory accesses, the standard convolution kernel in the original YOLOv8n algorithm is replaced with PConv of the FasterNet Block module, which effectively improves the inference speed of the model.

[0061] In practical applications, the backbone network extracts features from input images. The backbone network includes Conv module, FasterNet Block module and SPPF module. FasterNetBlock module includes PConv convolution module. After the backbone network, three feature maps of different scales are output to the next part of the network.

[0062] The neck network includes the RepViT Block module, which is used to fuse the feature maps output by the backbone network, that is, to fuse the features extracted from the three different scales through upsampling.

[0063] Finally, the features extracted by the neck network are sent to the prediction layer for final regression detection.

[0064] Figure 2 A schematic diagram of the improved YOLOv8n network structure provided in the embodiments of this specification.

[0065] like Figure 2 As shown in the figure, the image data of the aluminum material to be detected is input into the FasterNet Block module of the improved YOLOv8n backbone network to extract features and obtain feature maps. The feature maps have high similarity between different channels. The PConv convolution used in the FasterNet Block module only needs to apply the conventional Conv to a part of the input channel for spatial feature extraction, and keep the remaining channels unchanged, so as to achieve an average accuracy close to that of the ordinary convolution. The total number of floating-point operations (FLOPs) of PConv is only 1 / 16 of that of the ordinary convolution, and the number of floating-point operations per second (FLOPS) of the ordinary Conv used by PConv is larger than that of the depth-separable convolution (DWConv) used by the FPS module. Because FLOPs become smaller and FLOPS become larger, the computational redundancy and the number of memory accesses are reduced, which effectively improves the inference speed of the model.

[0066]

[0067] The feature map extracted by the backbone network is input into the neck network for further feature extraction. The neck network of YOLOv8n before the improvement only has three detection layers: P3 (feature map size 80×80×256), P4 (feature map size 40×40×512), and P5 (feature map size 20×20×512). Because the extracted feature map has poor effect on the detection of small target defects in the image data of aluminum materials, the improved YOLOv8n neck network adds a P2 (feature map size 160×160×128) small target detection layer. By extracting more obvious small target feature information in a larger feature map, the model greatly improves the detection effect of small target defects. The lightweight upsampling operator DySample can be used to select samples from areas with large differences through differential selection, which can reduce the computational burden during training, better capture important features in the data, and improve the efficiency of model training. The improved YOLOv8n neck network uses RepViTBlock to replace the original C2f module. The visual transformer architecture of RepViTBlock can extract and utilize multi-level feature representations to effectively capture complex features and relative position relationships in images. The application of deep convolution makes RepViTBlock require less computing resources and further improves the inference speed.

[0068] To facilitate understanding, a specific example is introduced below to illustrate the execution process of the embodiment of the present application.

[0069] based on Figure 1 In the embodiment of the present application, the image data of the aluminum material to be inspected can be first obtained, wherein the image data is an image sequence extracted by a camera, and then input into the defect detection neural network model based on the improved YOLOv8n algorithm in the embodiment of the present application. After the input part of the defect detection neural network model based on the improved YOLOv8n 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.

[0070] The improved defect detection neural network model reduces the memory space occupied, making it easier to deploy on mobile embedded detection equipment. It also improves the detection accuracy of small target aluminum defects, reduces the possibility of false alarms and missed alarms, and enables real-time detection of aluminum defects on aluminum production lines.

[0071] Figure 3 This is a schematic diagram of the structure of the FasterNetBlock module provided in the embodiments of this specification.

[0072] like Figure 3As shown, the FasterNetBlock module includes two Conv modules and one PConv module.

[0073] Figure 4 This is a schematic diagram of the structure of the PConv module provided in the embodiments of this specification.

[0074] like Figure 4 As shown, the FLOPs of PConv is h×w×k 2 ×C p 2 , where w is the width of the feature map, h is the height of the feature map, k is the size of the convolution kernel, and C p is the number of channels for conventional convolution. Where C is the total number of channels, so the FLOPs of PConv is only 1 / 16 of that of regular convolution.

[0075] Figure 5 This is a schematic diagram of the structure of the Dysample module provided in the embodiments of this specification.

[0076] like Figure 5 As shown, set a feature map X of size H×W×C and a sampling set S of sH×sW×2g. The grid_samp le function uses the positions in S to resample the assumed bilinear interpolation X to generate X′ of sH×sW×C.

[0077] Figure 6 This is a schematic diagram of the structure of the RepViT Block module provided in the embodiments of this specification.

[0078] like Figure 6 As shown in the figure, 1×1 dilated convolution and 1×1 projection layers are used to realize the interaction between channels (i.e., channel mixer), and 3×3 depthwise convolution (DW) is used for the fusion of spatial information (i.e., token mixer). RepViT Block moves the DW upward, and optionally the squeeze and excitation (SE) layer is also moved up after the DW convolution, successfully separating the token mixer and the channel mixer. Further, a reparameterization technique is adopted for the DW layer (residual connection of 3×3DW, 1×1DW and direct mapping of the original feature map) to enhance model learning during training. Due to the structural reparameterization technique, the computational and memory costs associated with skip connections during inference can be eliminated, which is particularly beneficial for mobile devices. The RepViT Block module uses a design that uses a DW layer first and then a 1×1 ordinary convolution, which requires less computing resources and further improves the inference speed.

[0079] Figure 7This is a schematic diagram of the structure of an aluminum material defect detection device based on improved YOLOv8 proposed in an embodiment of this specification.

[0080] The aluminum material defect detection device based on improved YOLOv8 described in the embodiments of this specification may include:

[0081] An acquisition module 702 is used to acquire image data of the aluminum material to be inspected;

[0082] A determination module 704 is used to input the image data into a defect detection neural network model based on an improved YOLOv8n algorithm to obtain an aluminum material defect detection result output by the defect detection neural network model;

[0083] Among them, the defect detection neural network model of the improved YOLOv8n algorithm is to replace the backbone network of the original YOLOv8n algorithm with a FasterNet network, and the FasterNet network includes a FasterNet Block module; a P2 layer is added to the neck network, the C2f module is replaced by a RepViT Block module, and the upsampling layer of the original YOLOv8 is replaced by a DySample upsampling operator.

[0084] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0085] Figure 8 A schematic diagram of the structure of an aluminum defect detection device based on improved YOLOv8 provided in an embodiment of this specification.

[0086] like Figure 8 As shown, an aluminum defect detection device based on improved YOLOv8 provided in an embodiment of this specification includes a memory 830, a processor 810 and a computer program 820 stored in the memory, and the processor 810 executes the computer program 820 to implement the aluminum defect detection method based on improved YOLOv8 described in any of the above embodiments.

[0087] An aluminum defect detection device based on improved YOLOv8 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 aluminum defect detection method based on improved YOLOv8 described in any of the above embodiments.

[0088] 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 aluminum defect detection method based on improved YOLOv8 described in any of the above embodiments can be implemented.

[0089] 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 8 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.

[0090] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to 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 an improvement in a method flow cannot be implemented using a hardware entity module. 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 a chip manufacturer to design and produce a dedicated integrated circuit chip. 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 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.

[0091] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed 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 controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can 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, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0092] 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.

[0093] 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.

[0094] Those skilled in the art will appreciate 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. Moreover, 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.

[0095] 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.

[0096] 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 comprising 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.

[0097] 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.

[0098] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0099] 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.

[0100] 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.

[0101] 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.

[0102] 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 adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt 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.) that contain computer-usable program code.

[0103] 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.

[0104] 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 method for aluminum defect detection based on improved YOLOv8, characterized in that: include: Acquire image data of the aluminum material to be inspected; Inputting the image data into a defect detection neural network model based on an improved YOLOv8n algorithm to obtain an aluminum material defect detection result output by the defect detection neural network model; Among them, the defect detection neural network model of the improved YOLOv8n algorithm is to replace the backbone network of the original YOLOv8n algorithm with a FasterNet network, and the FasterNet network includes a FasterNet Block module; a P2 layer is added to the neck network, the C2f module is replaced by a RepViT Block module, and the upsampling layer of the original YOLOv8 is replaced by a DySample upsampling operator.

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 YOLOv8n algorithm to obtain an aluminum material defect detection result output by the defect detection neural network model, the method includes: Obtain an image dataset of aluminum materials; Annotating defects in the image dataset; The defect detection neural network model of the improved YOLOv8n algorithm is trained using the labeled image data set.

3. The method according to claim 2, characterized in that The step of obtaining an image data set of aluminum materials specifically includes: Acquire multiple original image data of aluminum material; Selecting a preset number of original image data for splicing processing to obtain target image data; An image data set of aluminum material is established by using the target image data.

4. The method according to claim 3, characterized in that Before the preset number of original image data are stitched together, the method includes: Perform enhancement processing on the plurality of original image data; the enhancement processing includes at least one of random arrangement, random scaling, and cropping processing.

5. The method according to claim 1, characterized in that The method also includes: the defect detection neural network model of the improved YOLOv8n algorithm replaces the standard convolution kernel in the original YOLOv8n algorithm with the PConv of the FasterNet Block module.

6. An aluminum material defect detection device based on improved YOLOv8, characterized in that: include: An acquisition module, used for acquiring image data of the aluminum material to be inspected; A determination module, used for inputting the image data into a defect detection neural network model based on an improved YOLOv8n algorithm to obtain an aluminum material defect detection result output by the defect detection neural network model; Among them, the defect detection neural network model of the improved YOLOv8n algorithm is to replace the backbone network of the original YOLOv8n algorithm with a FasterNet network, and the FasterNet network includes a FasterNet Block module; a P2 layer is added to the neck network, the C2f module is replaced by a RepViT Block module, and the upsampling layer of the original YOLOv8 is replaced by a DySample upsampling operator.

7. The device according to claim 1, characterized in that Before inputting the image data into a defect detection neural network model based on an improved YOLOv8n algorithm to obtain an aluminum material defect detection result output by the defect detection neural network model, the method includes: Obtain an image dataset of aluminum materials; Annotating defects in the image dataset; The defect detection neural network model of the improved YOLOv8n algorithm is trained using the labeled image data set.

8. An aluminum material defect detection device based on improved YOLOv8, 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 5.

9. 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 5 are implemented.

Citation Information

Cited By

  • Train pantograph catenary arc discharge identification method, device and system and storage medium

    CN119888605A