Sealing pin welding defect detection method, storage medium and electronic device

Through multi-model fusion and 2D image detection, combined with multi-stage and small model combination, the problem of low accuracy and insufficient flexibility in sealing nail welding defect detection is solved, achieving high-precision and flexible defect detection to adapt to different defects. standard.

CN116630264BActive Publication Date: 2024-10-29ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310581810.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-21
Publication Date
2024-10-29
Estimated Expiration
2043-05-21

AI Technical Summary

Technical Problem

In the existing technology, the accuracy of sealing nail welding defect detection is low, and the coupling of the defect model is low, making it difficult to quickly iterate and customize. 3D point cloud imaging is not effective in detecting small defects and lacks flexibility.

Method used

A multi-model fusion method is used to perform defect detection, instance segmentation and classification through 2D images, decoupling model tasks, improving detection accuracy and flexibility, and combining multi-stage, small model combination methods to enhance small defect detection capabilities.

Benefits of technology

It improves the accuracy and flexibility of sealing nail welding defect detection, reduces the impact between different processing tasks, enhances the detection capability of small defects, meets the detection requirements of multiple defect standards, and improves the reliability of the detection system. Customization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116630264B_ABST
    Figure CN116630264B_ABST
Patent Text Reader

Abstract

The present application discloses a method, storage medium and electronic device for detecting welding defects of sealing pins. The method comprises: obtaining an original image; performing defect detection, instance segmentation and defect classification on the original image respectively to obtain an initial detection result, an initial segmentation result and an initial classification result, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing pin, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation and defect classification are different; the initial detection result, initial segmentation result and initial classification result are summarized to obtain the defect detection result of the original image. The present application solves the technical problem of low accuracy in detecting welding defects of sealing pins in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of sealing pin welding defect detection, and in particular, to a sealing pin welding defect detection method, storage medium and electronic device. Background Art

[0002] Currently, when detecting sealing pin welding defects, the 3D point cloud of the sealing pin welding is directly detected through the defect detection model. The defect detection model is generally a model obtained by coupling models corresponding to different types of defects. When a certain type of defect in the defect detection model is updated, it will affect the detection accuracy of the defect detection model for other types of defects, resulting in low accuracy in detecting sealing pin welding defects.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method for detecting welding defects of sealing pins, a storage medium, and an electronic device, so as to at least solve the technical problem of low accuracy in detecting welding defects of sealing pins in the related art.

[0005] According to one aspect of an embodiment of the present application, a method for detecting welding defects of sealing pins is provided, comprising: acquiring an original image, wherein the original image is used to characterize an image obtained by photographing an area where a sealing pin is welded; performing defect detection, instance segmentation, and defect classification on the original image, respectively, to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing pin, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; and the initial detection result, the initial segmentation result, and the initial classification result are summarized to obtain a defect detection result of the original image.

[0006] According to another aspect of an embodiment of the present application, a method for detecting welding defects of sealing pins is also provided, including: acquiring an original image, wherein the original image is used to characterize an image obtained by photographing an area where a sealing pin is welded; using multiple models to perform defect detection, instance segmentation, and defect classification on the original image, respectively, to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing pin, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; the initial detection result, the initial segmentation result, and the initial classification result are summarized to obtain a defect detection result of the original image.

[0007] According to another aspect of an embodiment of the present application, a method for detecting welding defects of sealing pins is also provided, characterized in that it includes: responding to an input instruction acting on an operation interface, displaying an original image on the operation interface, wherein the original image is used to represent an image obtained by photographing an area where a sealing pin is welded; responding to a welding defect detection instruction acting on the operation interface, displaying a defect detection result of the original image on the operation interface, wherein the defect detection result is obtained by summarizing an initial detection result, an initial segmentation result, and an initial classification result, and the initial detection result, the initial segmentation result, and the initial classification result are obtained by performing defect detection, instance segmentation, and defect classification on the original image, respectively, the initial detection result is used to represent whether there is a first welding defect in the original image, the initial segmentation result is used to represent a first area corresponding to the welding position of the sealing pin, and the initial classification result is used to represent whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different.

[0008] According to another aspect of an embodiment of the present application, a method for detecting welding defects of sealing pins is also provided, including: obtaining an original image by calling a first interface, wherein the first interface includes a first parameter, and the parameter value of the first parameter is the original image, and the original image is used to characterize an image obtained by photographing an area where a sealing pin is welded; performing defect detection, instance segmentation, and defect classification on the original image respectively to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing pin, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; summarizing the initial detection result, initial segmentation result, and initial classification result to obtain a defect detection result of the original image; outputting the defect detection result by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the defect detection result.

[0009] In an embodiment of the present application, an original image is acquired, wherein the original image is used to characterize an image obtained by photographing an area welded with a sealing nail; defect detection, instance segmentation, and defect classification are performed on the original image respectively to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to characterize whether a first welding defect exists in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing nail, and the initial classification result is used to characterize whether a second welding defect exists in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; the initial detection result, the initial segmentation result, and the initial classification result The defect detection results of the original image are summarized to obtain the defect detection results of the original image, thereby improving the accuracy of the detection of sealing pin welding defects. It is easy to notice that by obtaining the 2D original image, a relatively good detection effect can be achieved for small-scale defects, and the original image can be respectively subjected to defect detection, instance segmentation and defect classification, thereby maintaining the unity of different processing tasks, reducing the mutual influence between different processing tasks, and reducing the influence of detecting other types of defects when a certain type of defect is updated, thereby improving the accuracy of sealing pin welding defect detection, thereby solving the technical problem of low accuracy in detecting sealing pin welding defects in related technologies.

[0010] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0012] Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for detecting sealing pin welding defects according to an embodiment of the present application;

[0013] Figure 2 is a flow chart of a method for detecting sealing pin welding defects according to Example 1 of the present application;

[0014] Figure 3 is a schematic diagram of a sealing nail according to an embodiment of the present application;

[0015] Figure 4 is a schematic diagram of a lithium battery sealing nail welding defect detection system based on multi-model fusion according to an embodiment of the present application;

[0016] Figure 5 is a detection flow chart of a defect detection module according to an embodiment of the present application;

[0017] Figure 6 is a flow chart of a method for detecting sealing pin welding defects according to Example 2 of the present application;

[0018] Figure 7 is a flow chart of a method for detecting sealing pin welding defects according to Example 3 of the present application;

[0019] Figure 8 is a flow chart of a method for detecting sealing pin welding defects according to Example 4 of the present application;

[0020] Fig. 9 is a schematic diagram of a sealing pin welding defect detection device according to Example 5 of the present application;

[0021] Fig.10 is a schematic diagram of a sealing pin welding defect detection device according to Example 6 of the present application;

[0022] Fig.11 is a schematic diagram of a sealing pin welding defect detection device according to Example 7 of the present application;

[0023] Fig.12 is a schematic diagram of a sealing pin welding defect detection device according to Example 8 of the present application;

[0024] Fig.13 It is a structural block diagram of a computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0028] Intersection Over Union (IOU) is the ratio of the area of ​​the intersection of two rectangular boxes (usually the predicted box and the true bounding box) to the area of ​​the union of the two rectangular boxes.

[0029] Region of Interest (ROI), during the sealing pin welding process, the region of interest can be the weld bead, ear, and tail point of the sealing pin;

[0030] Sealing nails are a type of fixing element used to seal objects. They usually consist of two main parts, the head and the handle. The head is usually used to provide a flat, pressed surface on the surface to ensure sealing performance and provide a mounting point to install other parts. The handle is a reinforcement structure, usually with threads or fixed teeth to screw it into the required fine hole and ensure that it will not move.

[0031] Example 1

[0032] According to an embodiment of the present application, an embodiment of a method for detecting sealing pin welding defects is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for detecting sealing pin welding defects according to an embodiment of the present application. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0034] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0035] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for detecting the welding defects of the sealing nails in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned method for detecting the welding defects of the sealing nails is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0036] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0038] It should be noted that, in some optional embodiments, the above Figure 1 The computer device (or mobile device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the above-described computer device (or mobile device).

[0039] Under the above operating environment, this application provides Figure 2 The detection method of sealing pin welding defects is shown. Figure 2 1 is a flow chart of a method for detecting sealing pin welding defects according to Example 1 of the present application. Figure 2 As shown, the method may include the following steps:

[0040] Step S202, obtaining the original image.

[0041] The original image is used to represent an image obtained by photographing an area where sealing pins are welded.

[0042] In an optional embodiment, the user can directly photograph the area where the sealing nails are welded by a photographing device to obtain multiple photographed images. The user can select a photographed image with higher clarity and a relatively complete area where the sealing nails are welded from the multiple photographed images, and use the photographed image as the above-mentioned original image. If there is no photographed image with higher clarity and a relatively complete area where the sealing nails are welded among the multiple photographed images, the photographing device can be used to re-photograph the area where the sealing nails are welded to obtain the above-mentioned original image.

[0043] In another optional embodiment, after the original image is acquired, a preliminary inspection can be performed on the original image to determine whether the original image can be used for defect detection of sealing nails, that is, whether the original image is clear. If the original image is unclear or blurred, it means that the area where the sealing nails are welded can be re-photographed to obtain a clear original image. Optionally, the original image can be sent to the user, who can determine whether the original image is qualified. If the original image is qualified, subsequent operations can be performed on the original image. If the original image is unqualified, the area where the sealing nails are welded can be re-photographed to obtain a qualified original image.

[0044] Step S204 , performing defect detection, instance segmentation and defect classification on the original image respectively, to obtain an initial detection result, an initial segmentation result and an initial classification result.

[0045] Among them, the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing pin, and the initial classification result is used to characterize whether there is a second welding defect in the original image. The sizes of images processed by defect detection, instance segmentation and defect classification are different.

[0046] The above-mentioned first welding defect can be a welding slag defect and a small non-welding slag defect. The above-mentioned second welding defect can be a large non-welding slag defect, such as melted nails, no nails, no welding, etc. The second welding defect is generally a defect with a relatively large area and is relatively obvious. Generally, there is no need to obtain the position, and the defect category can be directly obtained.

[0047] The above-mentioned welding positions can be welds, ears, etc.

[0048] The first area mentioned above may be an effective area on the welding position of the sealing pin that may contain welding defects.

[0049] In an optional embodiment, different models can be used to perform defect detection, instance segmentation and defect classification on the original image to obtain initial detection results, initial segmentation results and initial classification results. Optionally, a multi-stage model combination can be used to first perform defect detection, then classify and segment the defects, and finally filter the defects based on the first area so as to filter out areas that do not contain welding defects. Maintaining the singularity of tasks at different stages can effectively improve the accuracy of using models at different stages, thereby making the detection accuracy of the entire sealing pin welding defect higher. In order to reduce the mutual influence between different stages, the training data corresponding to the models at different stages can remain independent and not directly associated with upstream and downstream data. Generally, data is transferred from top to bottom during the test phase.

[0050] In another optional embodiment, when using the model to perform defect detection on the original image, the model can be decoupled into multiple small models to make the model's task simpler, improve the model's accuracy and update speed, and increase the flexibility of the sealing pin welding defect detection method.

[0051] Step S206, summarizing the initial detection result, the initial segmentation result and the initial classification result to obtain the defect detection result of the original image.

[0052] In an optional embodiment, the first welding defect that is not in the effective area in the initial detection result can be filtered according to the effective area obtained from the initial segmentation result, the second welding defect can be obtained according to the initial classification result, and the first welding defect and the second welding defect in the effective area can be merged to obtain the above-mentioned defect detection result.

[0053] In another optional embodiment, the initial detection results, initial segmentation results and initial classification results can be sent to the user. After the user confirms that they are correct, the initial detection results, initial segmentation results and initial classification results are summarized to obtain the defect detection results of the original image. If the user thinks that there is an error, the initial detection results, initial segmentation results and initial classification results can be adjusted to obtain the defect detection results of the original image based on the adjusted results.

[0054] In an embodiment of the present application, an original image is acquired, wherein the original image is used to characterize an image obtained by photographing an area welded with a sealing nail; defect detection, instance segmentation, and defect classification are performed on the original image respectively to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to characterize whether a first welding defect exists in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing nail, and the initial classification result is used to characterize whether a second welding defect exists in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; the initial detection result, the initial segmentation result, and the initial classification result The defect detection results of the original image are summarized to obtain the defect detection results of the original image, thereby improving the accuracy of the detection of sealing pin welding defects. It is easy to notice that by obtaining the 2D original image, a relatively good detection effect can be achieved for small-scale defects, and the original image can be respectively subjected to defect detection, instance segmentation and defect classification, thereby maintaining the unity of different processing tasks, reducing the mutual influence between different processing tasks, and reducing the influence of detecting other types of defects when a certain type of defect is updated, thereby improving the accuracy of sealing pin welding defect detection, thereby solving the technical problem of low accuracy in detecting sealing pin welding defects in related technologies.

[0055] In the above embodiments of the present application, defect detection, instance segmentation and defect classification are performed on the original image respectively to obtain initial detection results, initial segmentation results and initial classification results, including: using a target detection model to perform defect detection on the original image to obtain an initial detection result; using an instance segmentation model to perform instance segmentation on the original image to obtain an initial segmentation result; using a first classification model to perform defect classification on the original image to obtain an initial classification result.

[0056] The above instance segmentation model can be used to obtain the three effective areas of the weld bead, ear, and tail of the sealing nail in the original image, which are used for subsequent filtering of welding defects based on the effective areas. It should be noted that the objects of instance segmentation are not limited to the three effective areas of the sealing nail mentioned above, and the objects that need to be instance segmented in the original image can also be limited according to the actual scene.

[0057] The first classification model mentioned above can be used to classify large defects in the original image, for example, large and obvious defects. For such defects, the defect category can be obtained without obtaining the location of the defect, such as serious defects such as molten nails, no nails, and no welding. The first classification model can be used directly to classify large defects in the entire image. The task is simple and the accuracy is high. The first classification model can be a residual network (Resnet18, Resnet34) or a lightweight convolutional neural network model (Mobilenet), but is not limited to this and can be set according to actual conditions.

[0058] The above-mentioned target detection model can be a one-time detection series (You Only Look Once, referred to as YOLO), a single-stage object detection model based on full convolution (Fully Convolutional One-Stage Object Detection, referred to as FCOS), a lightweight YOLO model (damoYOLO, YOLOv4) and other types of lightweight models. The target monitoring model can also be a two-stage solution (two-stage), for example: Faster Convolutional Neural Network (FasterRCNN), Cascade Convolutional Neural Network (Cascade RCNN), etc., but not limited to this, and can be set according to actual conditions.

[0059] The instance segmentation model can be a single-stage method, such as: single-stage instance segmentation network (SOLO, SOLOv2), instance segmentation based on deep learnable detection and feature reconstruction (YOLACT), polar coordinate mask network (PolarMask), occlusion extraction model (BlendMask), etc.; it can also be a multi-stage method, such as: object detection and instantiation mask prediction convolutional neural network (MaskRCNN), neural network model for object detection tasks (Hybrid Task Cascade Algorithm, referred to as HTC).

[0060] The above-mentioned various models can be determined according to their different tasks and combined with computing power. However, it is not limited to this and can be set according to actual conditions. The core of selecting the above-mentioned models is to meet the requirements of accuracy and speed.

[0061] In the above embodiments of the present application, the first welding defect includes at least: a welding slag defect and at least one welding defect other than the welding slag defect, wherein defect detection is performed on the original image using the target detection model to obtain an initial detection result, including: using the first detection model in the target detection model to detect whether there is a welding slag defect in the original image to obtain a welding slag detection result; using at least one second detection model in the target detection model to detect whether there is at least one welding defect in the original image to obtain other defect detection results; and fusing the welding slag detection result and other defect detection results to obtain an initial detection result.

[0062] The above-mentioned welding slag defects refer to defects formed by coating materials produced during welding remaining in the weld or on the surface. These residues may affect the welding strength and corrosion resistance, leading to part failure.

[0063] The at least one welding defect mentioned above may be a blowout, a pinhole, a bulge, a cold weld, etc.

[0064] The first detection model and the second detection model mentioned above may have the same model structure or different model structures, and may be set according to actual conditions.

[0065] The first detection model is used to detect welding slag defects in the original image, and the second detection model is used to detect other welding defects except welding slag defects. For example, it can detect welding defects such as blowouts, pinholes, protrusions, and cold welds.

[0066] In an optional embodiment, at least one second detection model in the target detection model may be used to detect valid areas in the original image to determine whether at least one welding slag defect exists in the original image.

[0067] In an optional embodiment, since welding slag has the property of spattering and may appear at any position of the original image, when welding slag detection is required, the original image can be directly input into the first detection model or the original image can be enlarged in size and input into the first detection model to obtain the welding slag detection result.

[0068] The at least one second detection model mentioned above can correspond to other welding defects except welding slag defects. A second detection model can be used to detect at least one welding defect except welding slag defects, and second detection models corresponding to different welding defects can be used to detect different welding defects, thereby reducing the impact of defect standards or defect data iterations, thereby improving the accuracy of detection; at the same time, different training parameters can be used for the second detection models of different defects to better improve the accuracy of the model.

[0069] In an optional embodiment, when it is necessary to detect welding defects such as blowholes, pinholes, protrusions, and cold welds, a second detection model can be used to detect welding defects such as blowholes, pinholes, protrusions, and cold welds. Explosions can also be detected by a second detection model for detecting blowholes, pinholes can be detected by a second detection model for detecting pinholes, protrusions can be detected by a second monitoring model for detecting protrusions, and cold welds can be detected by a second detection model for detecting cold welds.

[0070] Furthermore, the welding slag detection results and other defect detection results can be integrated to obtain an initial detection result of the welding defect. After obtaining the initial detection result, the initial detection result can be sent to the user so that the user can check whether the initial detection result is accurate. If it is inaccurate, the initial detection result can be manually adjusted, and the model parameters of the first detection model and / or the second detection model can be updated according to the adjusted initial detection result, thereby improving the detection accuracy of the first detection model and / or the second detection model.

[0071] In the above embodiments of the present application, at least one second detection model in the target detection model is used to detect whether there is at least one welding defect in the original image to obtain other defect detection results, including: using the third detection model in the target detection model to extract the second area in the original image, wherein the second area is used to characterize the area corresponding to the at least one welding defect; using at least one second detection model to detect whether there is at least one welding defect in the second area to obtain other defect detection results.

[0072] The third detection model mentioned above may have the same model structure as the first detection model and the second detection model, or may be different. There is no specific limitation here and it can be set according to actual conditions.

[0073] The second area at least includes a weld bead, an ear, and a tail point, and the range of the second area can be adjusted according to actual conditions. The second area can be an area of ​​interest, which means selecting a part of an area of ​​interest in the image for processing, analysis, or obtaining related information according to specific needs.

[0074] Figure 3 is a schematic diagram of a sealing nail according to an embodiment of the present application, such as Figure 3 As shown, the second area may be an effective area where non-weld slag defects are located, and the second area may include a weld bead, two ears, and a tail point of a sealing pin.

[0075] The above-mentioned second area may be an area where at least one welding defect may be located. Among general welding defects, except for welding slag that may fall on areas other than the area where the sealing pins are located, other welding defects generally exist in the area where the sealing pins are located. Therefore, when detecting at least one welding defect other than the welding slag defect, the size of the original image can be adjusted to reduce the area of ​​the defect to be detected and remove the area where the defect does not exist, so as to reduce background interference.

[0076] In an optional embodiment, by extracting the second area in the original image, background interference can be reduced, the range to be detected can be narrowed, and the detection accuracy of at least one second detection model can be improved.

[0077] In the above embodiment of the present application, at least one welding defect includes at least: a third welding defect, and the method also includes: subtracting the original image based on the welding slag detection result and other defect detection results to obtain a target image, wherein the target image contains welding slag defects or at least one welding defect; using the second classification model to identify whether there is a third welding defect in the target image to obtain a defect recognition result of the target image; fusing the welding slag detection result, other defect detection results and defect recognition results to obtain an initial detection result.

[0078] The third welding defect mentioned above may be a welding defect with too many false detections, for example, a pinhole type defect, which is not specifically limited here and may be set according to actual conditions.

[0079] In an optional embodiment, the area where the welding defect is located in the original image can be subtracted according to the detection rectangle of the welding slag detection results and other defect detection results to obtain a target image. When subtracting the target image from the original image, the length and width directions of the detection rectangle are generally appropriately expanded to fully retain the outline of the welding defect and the surrounding image features. For example, the expansion can be 20%. The expansion ratio is not specifically limited here and can be adjusted according to actual conditions.

[0080] For defect categories with more false detections, a second classification model can be used to reduce false detections. For some smaller defect types detected upstream, the results tend to be detected, which will lead to too many false detections. By adding a second classification model, a larger-sized defect local map can be used to obtain richer features, which can greatly reduce false detections.

[0081] In another optional embodiment, the size of the target image input to the second classification model can be adjusted to improve the classification accuracy of the second classification model. The size of the target image input to the second classification model can be set according to the size of the welding defect. For example, the size of the target image input to the second classification model can be set to 200*200. This is only an example and is not specifically limited. The size of the target image input to the second classification model can be set according to actual conditions.

[0082] In the above embodiment of the present application, the method also includes: subtracting the original image based on the welding slag detection results and other defect detection results to obtain a target image, wherein there is a welding slag defect or at least one welding defect in the target image; using a contour segmentation model to perform contour segmentation on the target image to obtain a contour segmentation result of the target image, wherein the contour segmentation result is used to characterize the contour information of the area where the target welding defect in the target image is located; fusing the welding slag detection results, other defect detection results and contour segmentation results to obtain an initial detection result.

[0083] The above-mentioned target welding defects can be various types of welding defects, for example, slag defects, small non-slag defects and large non-slag defects, wherein small non-slag defects can be blowouts, pinholes, protrusions, cold welds, etc., and large non-slag defects can be molten nails, no nails, no welding, etc.

[0084] In an optional embodiment, the contour segmentation model can be used to segment the contour of the welding defect in the target image to obtain the contour segmentation result of the target image. In the process of segmenting the contour of the welding defect in the target image, there is no need to consider the category of the welding defect, and the foreground and background of the welding defect in the target image can be segmented.

[0085] In another optional embodiment, the welding slag detection results, other defect detection results and contour segmentation results may be combined, and the combined results may be mapped back to the original coordinate system of the original image to obtain an initial detection result.

[0086] When training the contour segmentation model, it can be trained based on the local image of welding defects extracted from the target image. The size of the target image input to the contour segmentation model can be set to 96*96. This is only an example and is not specifically limited. The size of the target image input to the contour segmentation model can be set according to actual conditions.

[0087] In the above embodiment of the present application, the welding slag detection results and other defect detection results are integrated to obtain an initial detection result, including: merging the welding slag detection results and other defect detection results to obtain a combined detection result; mapping the combined detection result to the original coordinate system of the original image to obtain an initial detection result.

[0088] For different welding defects in the original image, the present application detects different welding defects through different models. Therefore, after obtaining the welding slag detection results and other defect detection results, the welding slag detection results and other defect detection results can be merged to obtain a merged detection result. The merged detection result can be mapped to the original coordinate system of the original image so that it can be filtered according to the category of welding defects later. For example, welding slag defects can be not filtered, and non-welding slag defects can be filtered according to the position.

[0089] By mapping the merged detection results to the original coordinate system of the original image, the preliminary detection results of the original image can be obtained. The area of ​​the welding defect in the merged detection results in the original image can be calculated, and the exact size and shape of the welding defect can be further inferred, which is convenient for subsequent fine-grained defect filtering control of the original image based on the preliminary detection results of the original image, thereby improving the accuracy of defect detection.

[0090] In the above embodiments of the present application, the initial detection results, initial segmentation results and initial classification results are summarized to obtain the defect detection results of the original image, including: filtering other defect detection results in the initial detection results based on the initial segmentation results to obtain filtered detection results; summarizing the filtered detection results and the initial classification results to obtain the defect detection results.

[0091] In an optional embodiment, non-welding slag defects that are not in the effective area in the initial detection results can be filtered out according to the initial segmentation results, thereby reducing false detection of non-welding slag defects and obtaining filtered detection results; different filtering rules can be used for filtering different effective areas such as welds, ears, tail points, etc., to achieve fine-grained control of filtering welding defects.

[0092] In another optional embodiment, other detection results in the initial detection result can be filtered according to the IOU of the area between the prediction box of the initial segmentation result and the target box in the initial detection result to obtain the filtered detection result, for example, if IOU < 0.1.

[0093] In the above embodiments of the present application, the filtered detection results and the initial classification results are summarized to obtain defect detection results, including: filtering the filtered detection results and the initial classification results based on preset filtering conditions to obtain defect detection results.

[0094] The above-mentioned preset filtering conditions include but are not limited to the area, length and width, confidence level, category, etc. of the welding defects.

[0095] In an optional embodiment, filtering conditions such as area, length and width, confidence, and category can be set to achieve more accurate welding defect detection and reduce false detection of welding defects.

[0096] In another optional embodiment, the contour segmentation model can be used to obtain the precise contour of the welding defect, and the precise area can be obtained based on the contour. At the same time, the circumscribed rectangle of the contour, i.e., the length and width, can be obtained. In the absence of defect segmentation, the detection frame and confidence of the slag detection results and other defect detection results can be obtained according to the first detection model and the second detection model. The confidence and defect category information of the welding defect can also be obtained according to the first classification model. The filtered detection results and the initial classification results can be filtered according to the above conditions to obtain the defect detection results. For example, a burst welding defect can be detected in a welding defect with an area greater than 30 and a confidence higher than 0.6. This is only an example for explanation without specific limitation, and can be set according to actual conditions.

[0097] With the rapid growth of new energy vehicles, the production of power batteries has also entered a stage of rapid growth. As the power source of new energy vehicles, the safety of power batteries has attracted much attention. In the entire production process of power batteries, the welding of sealing nails is mainly used in the midstream production of power batteries. After the electrolyte is injected into the battery module, laser welding is used to fill the gap between the sealing nails and the lithium battery shell to ensure the sealing. Due to the influence of production materials, processes, equipment, environment, etc., some quality problems are often prone to occur during laser welding, such as pinholes, welding slag, explosion holes, molten nails, welding deviation and other defects, which will seriously affect the safety of the battery.

[0098] Artificial intelligence technology has been extensively verified in the field of industrial quality inspection. It can effectively solve many problems that traditional visual methods cannot solve. It can achieve a relatively high level of defect recognition in complex scenes, greatly improving production efficiency, while improving product quality control and enhancing the value of the entire industry.

[0099] There are currently some sealing nail welding defect detection methods based on deep learning methods as follows:

[0100] Solution 1 can combine 2D algorithm and 3D algorithm modules to comprehensively identify the type and location of defects. The 2D vision uses the YOLOv5 model for defect identification, and the 3D point cloud algorithm detects and classifies defects based on the defect area, defect shape, defect image grayscale information and deep learning algorithm; the post-comprehensive identification module performs logical judgment. There are two problems with this solution. First, the original image scale of 2592*1944 is resized to 640*640*3, which will lead to missed detection of smaller defects, such as pinhole-type defects; second, a single YOLOv5 model is used to detect different defect types, and coupling models of different defects will lead to more restricted model iteration and low flexibility. In addition, different defects are placed in the same model and are prone to data imbalance and other problems, which will affect the recognition results.

[0101] Solution 2 uses a rotary scanning weld inspection method that quickly locates the center of rotation, uses deep learning prediction and classification on 2D machine vision image data, determines whether the weld image data contains small defects such as small pinholes, small pits and cracks, and obtains the point cloud data of the weld in real time by rotary scanning, and converts the point cloud data into depth image data to determine whether there are defects. This method mainly relies on 3D point cloud images, which is different from the 2D-based method in this application; this method adds 3D recognition on the basis of 2D recognition, which increases the possibility of false detection, and also has the problem of inflexibility in the iteration of defect models.

[0102] Solution three uses line scan 3D images and 2D images, combined with AI deep learning algorithms, to detect defects. The core is to establish a plane equation, calculate the sealing nail data and the plane equation to determine whether the sealing nail is intact or poorly placed; perform differential segmentation on the weld area, obtain the flatness of the segmented area, obtain the abnormal points in the area of ​​abnormal flatness, and train the AI ​​model to identify and detect them. This method focuses on defect detection from the perspective of flatness, which is fundamentally different from the 2D image detection method used in this application, and uses flatness calculation, which can easily cause missed detection of defects with small flatness differences.

[0103] The above three solutions all have great limitations for sealing pin welding defect detection. Different sealing pin welding processes and different defect standards of different factories require more flexibility and customization of the detection solution. Otherwise, it is impossible to achieve a more universal sealing pin welding defect detection system.

[0104] In summary, the existing sealing nail welding defect detection methods have the following main problems: first, low flexibility. Different defect models are coupled, and no flexible solution is formed. Customization and model iteration cannot be quickly performed. Second, the limitations of 3D point clouds. For pinhole-type defects, the imaging of 3D point clouds is not good for pinholes with uncertain angles and extremely small apertures on curved surfaces, which can easily lead to missed detections. Third, for small defect recognition, the scaling of the image affects the detection of small defects.

[0105] In response to the above shortcomings, this application focuses on improving the flexibility and customizability of the sealing nail welding defect detection method and system from the perspective of multi-model fusion, and adopts a multi-stage and small model combination approach to improve the detection capability of small defects, so as to meet the task indicator requirements of defect detection.

[0106] This application can use multi-model fusion to improve the accuracy and flexibility of sealing nail welding defect detection. Through decoupling, the defect model can be divided into multiple small models, and combined with the method of detecting small defects in stages, a 2D image detection solution is finally formed. It can serve as a powerful supplement to 3D detection, greatly improving the detection accuracy of defects and the delivery speed of different production lines.

[0107] Figure 4 is a schematic diagram of a lithium battery sealing nail welding defect detection system based on multi-model fusion according to an embodiment of the present application, such as Figure 4 As shown, the system includes a sealing nail area image acquisition module, a defect detection module, and a task rule filtering module.

[0108] The sealing nail area image acquisition module first locates the sealing nail area, and can use a 2D camera to capture the image of the sealing nail area. For example, the size of the captured image can be 2448*2048. This is only an example. The image acquisition device can be adjusted according to actual needs, and 2K, 4K, 8K and other cameras can be used.

[0109] The defect detection module is the core algorithm module. It can preprocess the collected images first, and then use detection, classification, segmentation and other models to identify defects and effective areas. It can obtain the defect category, area, confidence, etc., and filter the defects to obtain the filtered detection results.

[0110] The task rule filtering module can set different filtering rules, such as confidence filtering, area filtering, and other filtering, according to the output results of the defect detection module and the task requirements of the actual production line, to detect defective products.

[0111] Figure 5 is a detection flow chart of a defect detection module according to an embodiment of the present application, such as Figure 5 As shown, the method includes:

[0112] Step S501, obtaining an original image;

[0113] Step S502, preprocessing the original image, and then executing steps S503 to S506;

[0114] Optionally, the original image can be preprocessed to adjust the size of the original image. Different sizes can be selected for different downstream modules. A large image can be used for welding slag detection, a small image can be used to extract the area of ​​interest, and a medium-scale image can be used to segment the effective area. The size of the large image can be 1536*1536, the size of the small image can be 512*512, and the size of the medium-scale image can be 1024*1024.

[0115] Step S503, welding slag detection, and executing step S508;

[0116] The first detection model in the target detection model can be used for welding slag detection. Since welding slag is spattery and can appear at any position in the entire image, the welding slag of the entire image needs to be monitored. The input image of welding slag detection can be close to the size of the original image. The scale of welding slag varies greatly. In order to detect small welding slag, a large-scale image is required.

[0117] Step S504, extracting the region of interest, and executing step S507;

[0118] The rectangular area where the non-welding slag defect is located can be obtained to further reduce background interference, narrow the area of ​​defects to be detected, and remove the area without defects, which can increase the effective area of ​​the downstream defect recognition model and make the downstream model detection more accurate. The above-mentioned area of ​​interest includes at least the weld bead, ear, and tail point.

[0119] Step S505, segment the effective area and execute step S512;

[0120] The effective area can be segmented through the instance segmentation model to obtain the three effective areas of the welding bead, ear and tail point of the sealing pin in the original image, which are used for subsequent filtering of non-welding slag defects based on the effective areas. After obtaining the initial segmentation result of the effective area, the initial segmentation result can be mapped back to the coordinate system of the original image.

[0121] Step S506, classifying large welding defects, and executing step S513;

[0122] For defects that are relatively large and obvious, the category of the defect can be obtained without the need to obtain the location. For example, for serious defects such as molten nails, no nails, and unwelded parts, the first classification model can be used to classify the entire image. The task is simple and the accuracy is high.

[0123] Step S507, detecting non-welding slag defects;

[0124] In addition to welding slag, welding defects such as blast holes, pinholes, bulges, and cold welds are mainly concentrated on welds, ears, and tail points. The second detection model is used for identification. Different defects can be split into different models for identification, reducing the impact of defect standards or defect data iterations, that is, decoupling the second detection model to improve the flexibility of the defect detection system. At the same time, different training parameters can be used for different defects to better improve the accuracy of the model.

[0125] Step S508, deduct the welding defects, and execute steps S509 and S510;

[0126] The welding defect area image can be subtracted based on the rectangular frame obtained from the welding defect detection, which can be used for downstream classification and segmentation modules. The subtracted defects will usually be moderately expanded in the length and width directions to fully retain the defect contour and surrounding image features.

[0127] Step S509, classifying welding defects;

[0128] Defects can be classified according to actual needs. For welding defect categories with more false detections, classification models can be used to reduce false detections. By adding classification models, larger defect local images can be used to obtain richer features, thereby reducing false detections.

[0129] Step S510, segmenting welding defects;

[0130] In order to obtain a more accurate defect area, the contour segmentation model can be used to obtain the contour of the welding defect.

[0131] Step S511, merging welding defects;

[0132] The welding slag detection result and other defect detection results can be combined to obtain a combined detection result, and the combined detection result can be mapped to the original coordinate system of the original image to obtain an initial detection result.

[0133] Step S512, filtering the position of the valid area;

[0134] The above-mentioned effective areas refer to the three areas of the weld bead, ear, and tail point. The intersection-over-union ratio between the IOU prediction box and the target box can be used to filter out non-welding slag defects that are not in the effective area, thereby reducing the false detection of non-welding slag defects.

[0135] Step S513, detecting welding defects using preset filtering conditions;

[0136] Step S514, outputting defect detection results.

[0137] In an optional embodiment, the models used for defect detection can be appropriately increased or decreased according to actual image features and tasks. For example, when the sealing nail area accounts for a large proportion of the original image, the third detection model used to detect the area of ​​interest can be removed. For welding defects that do not require precise segmentation, the contour segmentation model can also be removed, thereby reducing the model's occupancy in computing resources.

[0138] Optionally, in the sealing pin welding defect detection method provided above in the present application, the modules that generally cannot be deleted are welding slag detection, effective area segmentation, large defect classification, non-welding slag defect detection, defect fusion, effective area position filtering and preset filtering condition detection; the modules that can be reduced are RoI extraction, defect classification, defect deduction and defect segmentation.

[0139] The multi-stage model combination in this application connects RoI area detection, defect detection, defect classification, defect segmentation, and effective area filtering in series, maintaining the simplicity of model tasks at different stages, while maintaining the independence of model training at different stages, reducing the impact between stages, and greatly improving the accuracy of the system; a single large target detection model is decoupled into multiple small detection models to reduce the impact between defects, keep the tasks of a single model simple, and reduce the problem of other categories being affected by the update of a certain type of defect, thereby obtaining higher accuracy; at the same time, the purpose of fast iteration of different types of defects is achieved with high flexibility; small-scale defect detection can first obtain RoI in a small-scale image, deduct regional image defect detection, and then deduct the defect area for defect classification and defect segmentation. By using images of a more appropriate scale, the accuracy and detection speed of defect recognition can be comprehensively improved.

[0140] This application mainly solves the problem of accurate identification of welding defects of lithium battery sealing nails by means of multi-model combination. Through different types of models such as classification, detection, and segmentation, combined with the detection requirements of different defects in the detection task, a targeted solution is formed to achieve classification, location, and segmentation of multiple defects. At the same time, based on the solution provided by this application, it can be adaptively adjusted according to changes in the requirements of the detection task to support different defect standards. It can also be further combined with a 3D vision solution to solve defects that rely on depth information for identification.

[0141] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0142] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0144] Example 2

[0145] According to an embodiment of the present application, a method for detecting sealing pin welding defects is also provided. It should be noted that the flowchart in the accompanying drawings shows that the steps can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0146] Figure 6 is a flow chart of a method for detecting sealing pin welding defects according to Example 2 of the present application, such as Figure 6 As shown, the method comprises the following steps:

[0147] Step S602, obtaining the original image.

[0148] The original image is used to represent an image obtained by photographing an area where sealing pins are welded.

[0149] Step S604, using multiple models to perform defect detection, instance segmentation and defect classification on the original image respectively, to obtain initial detection results, initial segmentation results and initial classification results.

[0150] Among them, the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing pin, and the initial classification result is used to characterize whether there is a second welding defect in the original image. The sizes of images processed by defect detection, instance segmentation and defect classification are different.

[0151] Step S606, summarizing the initial detection result, the initial segmentation result and the initial classification result to obtain the defect detection result of the original image.

[0152] Through the above steps, an original image is obtained, wherein the original image is used to represent an image obtained by photographing an area welded with a sealing nail; multiple models are used to perform defect detection, instance segmentation and defect classification on the original image, respectively, to obtain an initial detection result, an initial segmentation result and an initial classification result, wherein the initial detection result is used to represent whether there is a first welding defect in the original image, the initial segmentation result is used to represent the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to represent whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation and defect classification are different; the initial detection result, initial segmentation result and initial classification result are respectively processed by the image segmentation method, the image segmentation method and the image classification method, and the image segmentation method and the image classification method. The results are summarized to obtain the defect detection results of the original image, thereby improving the accuracy of sealing pin welding defect detection; it is easy to notice that by obtaining the 2D original image, a relatively good detection effect can be achieved for small-scale defects, and the original image can be subjected to defect detection, instance segmentation and defect classification respectively, thereby maintaining the unity of different processing tasks, reducing the mutual influence between different processing tasks, and reducing the influence of detecting other types of defects when a certain type of defect is updated, thereby improving the accuracy of sealing pin welding defect detection, and thus solving the technical problem of low accuracy in detecting sealing pin welding defects in related technologies.

[0153] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0154] Example 3

[0155] According to an embodiment of the present application, a method for detecting sealing pin welding defects is also provided. It should be noted that the flowchart in the accompanying drawings shows that the steps can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0156] Figure 7 is a flow chart of a method for detecting sealing pin welding defects according to Example 3 of the present application, such as Figure 7 As shown, the method comprises the following steps:

[0157] Step S702: In response to an input instruction on the operation interface, the original image is displayed on the operation interface.

[0158] The original image is used to represent an image obtained by photographing an area where sealing pins are welded.

[0159] The above-mentioned operation interface may be an operation interface of a smart device, wherein the smart device includes but is not limited to a mobile terminal, a computer terminal, a smart wearable device, a smart speaker, etc.

[0160] Step S704, in response to the welding defect detection instruction on the operation interface, the defect detection result of the original image is displayed on the operation interface.

[0161] Among them, the defect detection result is obtained by summarizing the initial detection result, initial segmentation result and initial classification result, and the initial detection result, initial segmentation result and initial classification result are obtained by performing defect detection, instance segmentation and defect classification on the original image respectively. The initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to characterize whether there is a second welding defect in the original image. The sizes of images processed by defect detection, instance segmentation and defect classification are different.

[0162] The above-mentioned welding defect detection instruction may be an instruction generated by operating relevant controls of the operation interface or other methods when the user needs to detect the area where the sealing pins are welded in the original image.

[0163] Through the above steps, in response to the welding defect detection instruction acting on the operation interface, the defect detection result of the original image is displayed on the operation interface, wherein the defect detection result is obtained by summarizing the initial detection result, the initial segmentation result and the initial classification result, and the initial detection result, the initial segmentation result and the initial classification result are obtained by respectively performing defect detection, instance segmentation and defect classification on the original image, the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of the images processed by defect detection, instance segmentation and defect classification are different, thereby achieving the improvement of the accuracy of detecting the welding defects of the sealing nails; it is easy to notice that by acquiring the 2D original image, a relatively good detection effect can be achieved for small-scale defects, and the original image can be respectively defect detected, instance segmented and defect classified, thereby maintaining the singularity of different processing tasks, reducing the mutual influence between different processing tasks, and reducing the influence of detecting other types of defects when a certain type of defect is updated, thereby improving the accuracy of detecting the welding defects of the sealing nails, thereby solving the technical problem of low accuracy in detecting the welding defects of the sealing nails in the related art.

[0164] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0165] Example 4

[0166] According to an embodiment of the present application, a method for detecting sealing pin welding defects is also provided. It should be noted that the flowchart in the accompanying drawings shows that the steps can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0167] Figure 8 is a flow chart of a method for detecting sealing pin welding defects according to Example 4 of the present application, such as Figure 8 As shown, the method comprises the following steps:

[0168] Step S802: Acquire the original image by calling the first interface.

[0169] The first interface includes a first parameter, the parameter value of the first parameter is an original image, and the original image is used to represent an image obtained by photographing an area where sealing nails are welded.

[0170] The first interface in the above steps may be an interface for data interaction between the cloud server and the client. The client may pass the original image into the interface function as the first parameter of the interface function to achieve the purpose of uploading the original image to the cloud server.

[0171] Step S804 , performing defect detection, instance segmentation and defect classification on the original image respectively, to obtain an initial detection result, an initial segmentation result and an initial classification result.

[0172] Among them, the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing pin, and the initial classification result is used to characterize whether there is a second welding defect in the original image. The sizes of images processed by defect detection, instance segmentation and defect classification are different.

[0173] Step S806, summarizing the initial detection result, the initial segmentation result and the initial classification result to obtain the defect detection result of the original image.

[0174] Step S808: output the defect detection result by calling the second interface.

[0175] The second interface includes a second parameter, and a parameter value of the second parameter is a defect detection result.

[0176] The above-mentioned second interface can be an interface for data interaction between the cloud server and the client. The cloud server can pass the defect detection result to the interface function as the second parameter of the interface function to achieve the purpose of sending the defect detection result to the client.

[0177] Through the above steps, the original image is obtained by calling the first interface, wherein the first interface includes a first parameter, the parameter value of the first parameter is the original image, and the original image is used to characterize the image obtained by photographing the area welded with the sealing nail; defect detection, instance segmentation and defect classification are performed on the original image respectively to obtain an initial detection result, an initial segmentation result and an initial classification result, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of the images processed by the defect detection, instance segmentation and defect classification are different; the initial detection result, the initial segmentation result and the initial classification result are summarized to obtain the original image. The defect detection result of the original image is obtained; the defect detection result is output by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the defect detection result, thereby improving the accuracy of detecting sealing pin welding defects; it is easy to notice that by obtaining the 2D original image, a relatively good detection effect can be achieved for small-scale defects, and the original image can be respectively subjected to defect detection, instance segmentation and defect classification, thereby maintaining the unity of different processing tasks, reducing the mutual influence between different processing tasks, and reducing the influence of detecting other types of defects when a certain type of defect is updated, thereby improving the accuracy of detecting sealing pin welding defects, thereby solving the technical problem of low accuracy in detecting sealing pin welding defects in related technologies.

[0178] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0179] Example 5

[0180] According to an embodiment of the present application, a sealing pin welding defect detection device for implementing the above-mentioned sealing pin welding defect detection method is also provided. Fig. 9 is a schematic diagram of a sealing nail welding defect detection device according to Example 5 of the present application, such as Fig. 9 As shown, the device 900 includes: an acquisition module 902 , a processing module 904 , and a summary module 906 .

[0181] Among them, the acquisition module is used to acquire the original image, wherein the original image is used to characterize the image obtained by photographing the area where the sealing nail is welded; the processing module is used to perform defect detection, instance segmentation and defect classification on the original image respectively, and obtain the initial detection result, the initial segmentation result and the initial classification result, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of the images processed by defect detection, instance segmentation and defect classification are different; the summary module is used to summarize the initial detection result, the initial segmentation result and the initial classification result to obtain the defect detection result of the original image.

[0182] It should be noted that the acquisition module 902, the processing module 904, and the summary module 906 correspond to steps S202 to S206 in Example 1, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules may also be part of the device and may be run in the computer terminal 10 provided in Example 1.

[0183] In the above embodiments of the present application, the processing module is also used to perform defect detection on the original image using the target detection model to obtain an initial detection result, perform instance segmentation on the original image using the instance segmentation model to obtain an initial segmentation result, and perform defect classification on the original image using the first classification model to obtain an initial classification result.

[0184] In the above embodiment of the present application, the first welding defect at least includes: a welding slag defect and at least one welding defect other than the welding slag defect. The processing module is also used to use the first detection model in the target detection model to detect whether there is a welding slag defect in the original image to obtain a welding slag detection result, and use at least one second detection model in the target detection model to detect whether there is at least one welding defect in the original image to obtain other defect detection results, and fuse the welding slag detection result and other defect detection results to obtain an initial detection result.

[0185] In the above embodiments of the present application, the processing module is also used to extract a second area in the original image using a third detection model in the target detection model, wherein the second area is used to characterize an area corresponding to at least one welding defect, and at least one second detection model is used to detect whether there is at least one welding defect in the second area to obtain other defect detection results.

[0186] In the above embodiments of the present application, at least one welding defect includes at least a third welding defect. The processing module is also used to subtract the original image based on the welding slag detection results and other defect detection results to obtain a target image, wherein there is a welding slag defect or at least one welding defect in the target image. The second classification model is used to identify whether there is a third welding defect in the target image to obtain a defect recognition result of the target image, and the welding slag detection results, other defect detection results and defect recognition results are fused to obtain an initial detection result.

[0187] In the above embodiment of the present application, the device is also used to deduct the original image based on the welding slag detection results and other defect detection results to obtain a target image, wherein there is a welding slag defect or at least one welding defect in the target image, and the target image is contour segmented using a contour segmentation model to obtain a contour segmentation result of the target image, wherein the contour segmentation result is used to characterize the contour information of the area where the target welding defect in the target image is located, and the welding slag detection results, other defect detection results and contour segmentation results are fused to obtain an initial detection result.

[0188] In the above embodiment of the present application, the processing module is also used to merge the welding slag detection results and other defect detection results to obtain a combined detection result, and map the combined detection result to the original coordinate system of the original image to obtain an initial detection result.

[0189] In the above embodiments of the present application, the summary module is also used to filter other defect detection results in the initial detection results based on the initial segmentation results to obtain filtered detection results, and summarize the filtered detection results and the initial classification results to obtain defect detection results.

[0190] In the above embodiments of the present application, the summary module is also used to filter the filtered detection results and the initial classification results based on preset filtering conditions to obtain defect detection results.

[0191] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0192] Example 6

[0193] According to an embodiment of the present application, a sealing pin welding defect detection device for implementing the above-mentioned sealing pin welding defect detection method is also provided. Fig.10 is a schematic diagram of a sealing nail welding defect detection device according to Example 6 of the present application, such as Fig.10 As shown, the device 1000 includes: an acquisition module 1002 , a processing module 1004 , and a summary module 1006 .

[0194] Among them, the acquisition module is used to acquire the original image, wherein the original image is used to characterize the image obtained by photographing the area where the sealing nails are welded; the processing module is used to use multiple models to perform defect detection, instance segmentation and defect classification on the original image respectively, and obtain initial detection results, initial segmentation results and initial classification results, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of the images processed by defect detection, instance segmentation and defect classification are different; the summary module is used to summarize the initial detection results, initial segmentation results and initial classification results to obtain the defect detection result of the original image.

[0195] It should be noted that the acquisition module 1002, the processing module 1004, and the summary module 1006 correspond to steps S602 to S606 in Example 2, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules may also be part of the device and may be run in the computer terminal 10 provided in Example 1.

[0196] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0197] Example 7

[0198] According to an embodiment of the present application, a sealing pin welding defect detection device for implementing the above-mentioned sealing pin welding defect detection method is also provided. Fig.11 is a schematic diagram of a sealing pin welding defect detection device according to Example 7 of the present application, such as Fig.11 As shown, the device 1100 includes: a first display module 1102 and a second display module 1104 .

[0199] Among them, the first display module is used to respond to the input instruction acting on the operation interface, and display the original image on the operation interface, wherein the original image is used to represent the image obtained by photographing the area where the sealing nail is welded; the second display module is used to respond to the welding defect detection instruction acting on the operation interface, and display the defect detection result of the original image on the operation interface, wherein the defect detection result is obtained by summarizing the initial detection result, initial segmentation result and initial classification result, and the initial detection result, initial segmentation result and initial classification result are obtained by performing defect detection, instance segmentation and defect classification on the original image respectively, the initial detection result is used to represent whether there is a first welding defect in the original image, the initial segmentation result is used to represent the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to represent whether there is a second welding defect in the original image, and the sizes of the images processed by defect detection, instance segmentation and defect classification are different.

[0200] It should be noted that the first display module 1102 and the second display module 1104 correspond to steps S702 to S702 in Example 3, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules may also be part of the device and may be run in the computer terminal 10 provided in Example 1.

[0201] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0202] Example 8

[0203] According to an embodiment of the present application, a sealing pin welding defect detection device for implementing the above-mentioned sealing pin welding defect detection method is also provided. Fig.12 is a schematic diagram of a sealing nail welding defect detection device according to Example 8 of the present application, such as Fig.12 As shown, the device 1200 includes: an acquisition module 1202 , a processing module 1204 , a summary module 1206 , and an output module 1208 .

[0204] Among them, the acquisition module is used to obtain the original image by calling the first interface, wherein the first interface includes a first parameter, the parameter value of the first parameter is the original image, and the original image is used to characterize the image obtained by photographing the area welded with the sealing nail; the processing module is used to perform defect detection, instance segmentation and defect classification on the original image respectively, to obtain the initial detection result, the initial segmentation result and the initial classification result, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of the images processed by the defect detection, instance segmentation and defect classification are different; the summary module is used to summarize the initial detection result, the initial segmentation result and the initial classification result to obtain the defect detection result of the original image; the output module is used to output the defect detection result by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the defect detection result.

[0205] It should be noted that the acquisition module 1202, the processing module 1204, the summary module 1206, and the output module 1208 correspond to steps S802 to S808 in Example 4, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules can also be part of the device and can be run in the computer terminal 10 provided in Example 1.

[0206] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0207] Example 9

[0208] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.

[0209] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.

[0210] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the method for detecting sealing pin welding defects: obtaining an original image, wherein the original image is used to represent an image obtained by photographing an area where a sealing pin is welded; performing defect detection, instance segmentation, and defect classification on the original image respectively to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to represent whether there is a first welding defect in the original image, the initial segmentation result is used to represent the first area corresponding to the welding position of the sealing pin, and the initial classification result is used to represent whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; the initial detection result, initial segmentation result, and initial classification result are summarized to obtain a defect detection result of the original image.

[0211] Optionally, Fig.13 is a structural block diagram of a computer terminal according to an embodiment of the present application. Fig.13 As shown, the computer terminal A may include: one or more (only one is shown in the figure) processors 102, a memory 104, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.

[0212] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for detecting the welding defects of the sealing nails in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method for detecting the welding defects of the sealing nails. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0213] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the original image, wherein the original image is used to represent the image obtained by photographing the area where the sealing nail is welded; perform defect detection, instance segmentation and defect classification on the original image respectively to obtain initial detection results, initial segmentation results and initial classification results, wherein the initial detection result is used to represent whether there is a first welding defect in the original image, the initial segmentation result is used to represent the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to represent whether there is a second welding defect in the original image, and the sizes of the images processed by defect detection, instance segmentation and defect classification are different; the initial detection result, initial segmentation result and initial classification result are summarized to obtain the defect detection result of the original image.

[0214] Optionally, the processor may also execute the program code of the following steps: using the target detection model to perform defect detection on the original image to obtain an initial detection result; using the instance segmentation model to perform instance segmentation on the original image to obtain an initial segmentation result; using the first classification model to perform defect classification on the original image to obtain an initial classification result.

[0215] Optionally, the processor may also execute the program code of the following steps: using the first detection model in the target detection model to detect whether there is a welding slag defect in the original image to obtain a welding slag detection result; using at least one second detection model in the target detection model to detect whether there is at least one welding defect in the original image to obtain other defect detection results; fusing the welding slag detection result with other defect detection results to obtain an initial detection result.

[0216] Optionally, the processor may also execute the program code of the following steps: extracting a second area in the original image using a third detection model in the target detection model, wherein the second area is used to characterize an area corresponding to at least one welding defect; and detecting whether there is at least one welding defect in the second area using at least one second detection model to obtain other defect detection results.

[0217] Optionally, the processor may also execute the program code of the following steps: subtracting the original image based on the slag detection results and other defect detection results to obtain a target image, wherein a slag defect or at least one welding defect exists in the target image; using a second classification model to identify whether a third welding defect exists in the target image to obtain a defect recognition result of the target image; fusing the slag detection results, other defect detection results and defect recognition results to obtain an initial detection result.

[0218] Optionally, the processor may also execute the program code of the following steps: subtracting the original image based on the welding slag detection results and other defect detection results to obtain a target image, wherein there is a welding slag defect or at least one welding defect in the target image; performing contour segmentation on the target image using a contour segmentation model to obtain a contour segmentation result of the target image, wherein the contour segmentation result is used to characterize the contour information of the area where the target welding defect in the target image is located; fusing the welding slag detection results, other defect detection results and contour segmentation results to obtain an initial detection result.

[0219] Optionally, the processor may also execute the program code of the following steps: merging the welding slag detection result and other defect detection results to obtain a combined detection result; mapping the combined detection result to the original coordinate system of the original image to obtain an initial detection result.

[0220] Optionally, the processor may also execute the following program code: filtering other defect detection results in the initial detection results based on the initial segmentation results to obtain filtered detection results; and summarizing the filtered detection results and the initial classification results to obtain defect detection results.

[0221] Optionally, the processor may also execute a program code of the following steps: filtering the filtered detection results and the initial classification results based on preset filtering conditions to obtain defect detection results.

[0222] By using an embodiment of the present application, an original image is obtained, wherein the original image is used to represent an image obtained by photographing an area where a sealing nail is welded; defect detection, instance segmentation, and defect classification are performed on the original image respectively to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to represent whether there is a first welding defect in the original image, the initial segmentation result is used to represent the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to represent whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; the initial detection result, initial segmentation result, and initial classification result The defect detection results of the original image are summarized to obtain the defect detection results of the original image, thereby improving the accuracy of the detection of sealing pin welding defects. It is easy to notice that by obtaining the 2D original image, a relatively good detection effect can be achieved for small-scale defects, and the original image can be respectively subjected to defect detection, instance segmentation and defect classification, thereby maintaining the unity of different processing tasks, reducing the mutual influence between different processing tasks, and reducing the influence of detecting other types of defects when a certain type of defect is updated, thereby improving the accuracy of sealing pin welding defect detection, thereby solving the technical problem of low accuracy in detecting sealing pin welding defects in related technologies.

[0223] It can be understood by those skilled in the art that Fig.13 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.13 It does not limit the structure of the above electronic device. For example, the computer terminal A may also include Fig.13 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.13 Different configurations are shown.

[0224] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0225] Example 10

[0226] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the sealing pin welding defect detection method provided in the first embodiment.

[0227] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0228] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: obtaining an original image, wherein the original image is used to characterize an image obtained by photographing an area where a sealing pin is welded; performing defect detection, instance segmentation, and defect classification on the original image, respectively, to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to characterize whether a first welding defect exists in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing pin, and the initial classification result is used to characterize whether a second welding defect exists in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; the initial detection result, initial segmentation result, and initial classification result are summarized to obtain a defect detection result of the original image.

[0229] Optionally, the storage medium is also configured to store program codes for executing the following steps: performing defect detection on the original image using a target detection model to obtain an initial detection result; performing instance segmentation on the original image using an instance segmentation model to obtain an initial segmentation result; and performing defect classification on the original image using a first classification model to obtain an initial classification result.

[0230] Optionally, the storage medium is also configured to store program codes for executing the following steps: using a first detection model in the target detection model to detect whether there is a welding slag defect in the original image to obtain a welding slag detection result; using at least one second detection model in the target detection model to detect whether there is at least one welding defect in the original image to obtain other defect detection results; fusing the welding slag detection result with other defect detection results to obtain an initial detection result.

[0231] Optionally, the storage medium is also configured to store program codes for executing the following steps: extracting a second area in the original image using a third detection model in the target detection model, wherein the second area is used to characterize an area corresponding to at least one welding defect; and detecting whether there is at least one welding defect in the second area using at least one second detection model to obtain other defect detection results.

[0232] Optionally, the storage medium is also configured to store program codes for executing the following steps: subtracting the original image based on the slag detection results and other defect detection results to obtain a target image, wherein a slag defect or at least one welding defect exists in the target image; using a second classification model to identify whether a third welding defect exists in the target image to obtain a defect recognition result of the target image; fusing the slag detection results, other defect detection results and defect recognition results to obtain an initial detection result.

[0233] Optionally, the storage medium is also configured to store program codes for executing the following steps: subtracting the original image based on the slag detection results and other defect detection results to obtain a target image, wherein there is a slag defect or at least one welding defect in the target image; performing contour segmentation on the target image using a contour segmentation model to obtain a contour segmentation result of the target image, wherein the contour segmentation result is used to characterize the contour information of the area where the target welding defect is located in the target image; fusing the slag detection results, other defect detection results and contour segmentation results to obtain an initial detection result.

[0234] Optionally, the storage medium is also configured to store program codes for executing the following steps: merging the welding slag detection results and other defect detection results to obtain a combined detection result; mapping the combined detection result to the original coordinate system of the original image to obtain an initial detection result.

[0235] Optionally, the storage medium is also configured to store program codes for executing the following steps: filtering other defect detection results in the initial detection results based on the initial segmentation results to obtain filtered detection results; and summarizing the filtered detection results and the initial classification results to obtain defect detection results.

[0236] Optionally, the storage medium is further configured to store a program code for executing the following steps: filtering the filtered detection results and the initial classification results based on preset filtering conditions to obtain defect detection results.

[0237] By using an embodiment of the present application, an original image is obtained, wherein the original image is used to represent an image obtained by photographing an area where a sealing nail is welded; defect detection, instance segmentation, and defect classification are performed on the original image respectively to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to represent whether there is a first welding defect in the original image, the initial segmentation result is used to represent the first area corresponding to the welding position of the sealing nail, and the initial classification result is used to represent whether there is a second welding defect in the original image, and the sizes of images processed by defect detection, instance segmentation, and defect classification are different; the initial detection result, initial segmentation result, and initial classification result By summarizing, the defect detection results of the original image are obtained, and the accuracy of the detection of sealing pin welding defects is improved; it is easy to notice that by obtaining the 2D original image, a relatively good detection effect can be achieved for small-scale defects, and the original image can be respectively subjected to defect detection, instance segmentation and defect classification, thereby maintaining the unity of different processing tasks, reducing the mutual influence between different processing tasks, and reducing the influence of detecting other types of defects when a certain type of defect is updated, thereby improving the accuracy of sealing pin welding defect detection, and thus solving the technical problem of low accuracy in detecting sealing pin welding defects in related technologies. The above serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.

[0238] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0239] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0240] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0241] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0242] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0243] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for detecting sealing pin welding defects, characterized in that: include: Acquire an original image, wherein the original image is used to represent an image obtained by photographing an area where sealing pins are welded; Performing defect detection, instance segmentation, and defect classification on the original image respectively to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to characterize whether a first welding defect exists in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing pin, and the initial classification result is used to characterize whether a second welding defect exists in the original image, and the sizes of images processed by the defect detection, the instance segmentation, and the defect classification are different, and the first welding defect includes at least: a welding slag defect and at least one welding defect other than the welding slag defect, and the welding slag defect is a defect formed by residues generated during the welding process; The initial detection result, the initial segmentation result and the initial classification result are summarized to obtain the defect detection result of the original image, wherein the defect detection result is used to summarize the filtered detection result and the initial classification result, and the filtered detection result is obtained by filtering non-welding slag defects that are not in the effective area in the initial detection result based on the initial segmentation result, and different types of effective areas are filtered using different filtering rules.

2. The method according to claim 1, characterized in that: Defect detection, instance segmentation and defect classification are performed on the original image respectively to obtain initial detection results, initial segmentation results and initial classification results, including: Performing defect detection on the original image using the target detection model to obtain the initial detection result; Performing instance segmentation on the original image using an instance segmentation model to obtain the initial segmentation result; The first classification model is used to perform defect classification on the original image to obtain the initial classification result.

3. The method according to claim 2, characterized in that The first welding defect at least includes: a welding slag defect and at least one welding defect other than the welding slag defect, wherein the defect detection is performed on the original image using the target detection model to obtain the initial detection result, including: Using the first detection model in the target detection model to detect whether the welding slag defect exists in the original image, and obtaining a welding slag detection result; Using at least one second detection model in the target detection model to respectively detect whether the at least one welding defect exists in the original image, and obtain other defect detection results; The welding slag detection result and the other defect detection results are merged to obtain the initial detection result.

4. The method according to claim 3, characterized in that Using at least one second detection model in the target detection model to respectively detect whether the at least one welding defect exists in the original image, and obtaining other defect detection results, including: Extracting a second region in the original image using a third detection model in the target detection model, wherein the second region is used to characterize a region corresponding to the at least one welding defect; The at least one second detection model is used to detect whether the at least one welding defect exists in the second area to obtain the other defect detection results.

5. The method according to claim 3, characterized in that: The at least one welding defect comprises at least a third welding defect, and the method further comprises: Subtracting the original image based on the welding slag detection result and the other defect detection results to obtain a target image, wherein the welding slag defect or the at least one welding defect exists in the target image; Using the second classification model to identify whether the third welding defect exists in the target image, and obtaining a defect recognition result of the target image; The welding slag detection result, the other defect detection results and the defect identification result are integrated to obtain the initial detection result.

6. The method according to claim 3, characterized in that The method further comprises: Subtracting the original image based on the welding slag detection result and the other defect detection results to obtain a target image, wherein the welding slag defect or the at least one welding defect exists in the target image; Performing contour segmentation on the target image using a contour segmentation model to obtain a contour segmentation result of the target image, wherein the contour segmentation result is used to characterize contour information of an area where a target welding defect existing in the target image is located; The welding slag detection result, the other defect detection results and the contour segmentation result are fused to obtain the initial detection result.

7. The method according to claim 3, characterized in that The welding slag detection result and the other defect detection results are integrated to obtain the initial detection result, including: Combining the welding slag detection result and the other defect detection results to obtain a combined detection result; The combined detection result is mapped to the original coordinate system of the original image to obtain the initial detection result.

8. The method according to claim 1, characterized in that: The initial detection result, the initial segmentation result and the initial classification result are summarized to obtain a defect detection result of the original image, including: Filtering other defect detection results in the initial detection result based on the initial segmentation result to obtain a filtered detection result; The filtered detection results and the initial classification results are summarized to obtain the defect detection results.

9. The method according to claim 8, characterized in that Summarizing the filtered detection results and the initial classification results to obtain the defect detection results, including: The filtered detection result and the initial classification result are filtered based on a preset filtering condition to obtain the defect detection result.

10. A method for detecting sealing pin welding defects, characterized in that: include: Acquire an original image, wherein the original image is used to represent an image obtained by photographing an area where sealing pins are welded; Using multiple models to perform defect detection, instance segmentation and defect classification on the original image respectively, to obtain an initial detection result, an initial segmentation result and an initial classification result, wherein the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing pin, and the initial classification result is used to characterize whether there is a second welding defect in the original image, the sizes of images processed by the defect detection, the instance segmentation and the defect classification are different, and the first welding defect includes at least: a welding slag defect and at least one welding defect other than the welding slag defect, and the welding slag defect is a defect formed by residues generated during the welding process; The initial detection result, the initial segmentation result and the initial classification result are summarized to obtain the defect detection result of the original image, wherein the defect detection result is used to summarize the filtered detection result and the initial classification result, and the filtered detection result is obtained by filtering non-welding slag defects that are not in the effective area in the initial detection result based on the initial segmentation result, and different types of effective areas are filtered using different filtering rules.

11. A method for detecting sealing pin welding defects, characterized in that: include: In response to an input instruction acting on the operation interface, an original image is displayed on the operation interface, wherein the original image is used to represent an image obtained by photographing the area where the sealing nails are welded; In response to a welding defect detection instruction acting on the operation interface, a defect detection result of the original image is displayed on the operation interface, wherein the defect detection result is obtained by summarizing an initial detection result, an initial segmentation result, and an initial classification result, and the initial detection result, the initial segmentation result, and the initial classification result are obtained by performing defect detection, instance segmentation, and defect classification on the original image, respectively, and the initial detection result is used to characterize whether there is a first welding defect in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing nail, and the initial classification result is used to characterize whether there is a second welding defect in the original image, and the sizes of images processed by the defect detection, the instance segmentation, and the defect classification are different, and the first welding defect includes at least: a welding slag defect and at least one welding defect other than the welding slag defect, and the welding slag defect is a defect formed by residues generated during the welding process, wherein the defect detection result is used to summarize the filtered detection result and the initial classification result, and the filtered detection result is obtained by filtering non-welding slag defects that are not in a valid area in the initial detection result based on the initial segmentation result, and different types of the valid areas are filtered using different filtering rules.

12. A method for detecting sealing pin welding defects, characterized in that: include: Acquire an original image by calling a first interface, wherein the first interface includes a first parameter, a parameter value of the first parameter is the original image, and the original image is used to represent an image obtained by photographing an area welded with sealing nails; Performing defect detection, instance segmentation, and defect classification on the original image respectively to obtain an initial detection result, an initial segmentation result, and an initial classification result, wherein the initial detection result is used to characterize whether a first welding defect exists in the original image, the initial segmentation result is used to characterize a first area corresponding to a welding position of the sealing pin, and the initial classification result is used to characterize whether a second welding defect exists in the original image, and the sizes of images processed by the defect detection, the instance segmentation, and the defect classification are different, and the first welding defect includes at least: a welding slag defect and at least one welding defect other than the welding slag defect, and the welding slag defect is a defect formed by residues generated during the welding process; Summarizing the initial detection result, the initial segmentation result, and the initial classification result to obtain a defect detection result of the original image; The defect detection result is output by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter is the defect detection result, wherein the defect detection result is used to summarize the filtered detection results and the initial classification results, and the filtered detection result is obtained by filtering non-welding slag defects that are not in the effective area in the initial detection results based on the initial segmentation result, and different types of effective areas are filtered using different filtering rules.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 12.

14. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 12 when running.

Citation Information

Patent Citations

  • Model training method, welding spot defect detection method and device, and electronic equipment

    CN111696108A