Welding quality detection method, device and equipment and storage medium

The pre-trained welding point detection model is used to automatically detect welding points, which solves the problems of low manual detection efficiency and poor accuracy, and achieves efficient and accurate quality inspection of the welding area.

CN118735838APending Publication Date: 2024-10-01BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310332662.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing welding joint quality inspection mainly relies on manual labor, which has problems of missed detection and false detection. In addition, the detection efficiency is low in low light or blocked conditions, which wastes manpower and material resources.

Method used

The pre-trained welding point detection model is used to process the detection image, and the welding quality is judged by the ratio of the number of target welding points to the actual number of welding points, and the relationship between the coordinates of the welding points and the coordinates of the key points is used for query, and the quality of the welding area is automatically detected. .

Benefits of technology

It realizes automated welding point quality inspection, reduces the error rate of manual inspection, saves manpower and material resources, and improves the inspection efficiency and accuracy of the welding area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735838A_ABST
    Figure CN118735838A_ABST
Patent Text Reader

Abstract

The invention relates to a welding quality detection method, device and equipment and a storage medium. In the embodiment of the invention, firstly, a detection image corresponding to a to-be-detected area is obtained; then, processing the detection image by using a pre-trained welding point detection model to obtain the number of target welding points included in the detection image; then, whether the target welding point number is consistent with the actual welding point number or not is judged, finally, based on the quantitative relation between the target welding point number and the actual welding point number, query is conducted in the corresponding relation between the quantitative relation and the welding quality, and the welding quality of the to-be-detected area is obtained. Whether all welding points are welded normally or not and whether the welded studs fall off or not are detected in an automatic mode, the problems of missing detection or false detection and the like of a welding area are solved, and a large amount of manpower and material resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle detection technology, and in particular to a welding quality detection method, device, equipment and storage medium. Background Art

[0002] During the vehicle production process, it is necessary to manage the materials or data involved in each process. For example, after the vehicle completes the welding procedures of all stud welding points in the welding workshop, all stud welding points need to be inspected. For example, whether there are any abnormal conditions such as missing welding studs or whether welding studs have fallen off.

[0003] In the related art, the quality inspection method of welding points is manual inspection, which wastes a lot of manpower and material resources. In addition, in actual scenarios, due to the possible existence of weak light, occlusion and other problems, it is easy for inspectors to miss or mis-inspect welding points. Summary of the invention

[0004] The present invention provides a welding quality detection method, device, equipment and storage medium, which can realize automatic detection of welding point quality in a welding area, solve the problems of missed detection or false detection in the welding area, and save a lot of manpower and material resources.

[0005] In a first aspect, an embodiment of the present disclosure provides a welding quality detection method, the method comprising:

[0006] Obtain a detection image corresponding to the area to be detected;

[0007] Processing the detection image using a pre-trained welding point detection model to obtain the number of target welding points included in the detection image;

[0008] Determining whether the target number of welding points is consistent with the actual number of welding points;

[0009] Based on the quantitative relationship between the target number of welding points and the actual number of welding points, a query is performed in the corresponding relationship between the quantitative relationship and the welding quality to obtain the welding quality of the area to be inspected.

[0010] In one embodiment of the present disclosure, the process of processing the detection image using the pre-trained welding point detection model to obtain the number of target welding points included in the detection image includes:

[0011] Performing position detection on the detection image to obtain a welding point coordinate set included in the detection image;

[0012] The number of welding points included in the welding point coordinate set is counted as the target welding point number.

[0013] In one embodiment of the present disclosure, based on the quantitative relationship between the target number of welding points and the actual number of welding points, querying in the corresponding relationship between the quantitative relationship and the welding quality to obtain the welding quality of the area to be inspected includes:

[0014] If the target number of welding points is consistent with the actual number of welding points, it is determined that the welding quality of the area to be inspected is qualified;

[0015] If the target number of welding points is inconsistent with the actual number of welding points, determining whether the target number of welding points is less than the actual number of welding points;

[0016] If the target number of welding points is less than the actual number of welding points, determining that the welding quality of the area to be inspected is unqualified;

[0017] If the target number of welding points is greater than the actual number of welding points, the welding quality of the area to be inspected is determined according to the relationship between the welding point coordinate set and the key point coordinates.

[0018] In one embodiment of the present disclosure, determining the welding quality of the area to be inspected according to the relationship between the welding point coordinate set and the key point coordinates includes:

[0019] Determining whether the welding point coordinate set includes key point coordinates;

[0020] If the welding point coordinate set includes key point coordinates, determining that the welding quality of the area to be inspected is qualified;

[0021] If the welding point coordinate set does not include key point coordinates, it is determined that the welding quality of the area to be inspected is unqualified.

[0022] In one embodiment of the present disclosure, the method further includes: marking the welding point coordinate information included in the welding point coordinate set in the detection image; and displaying the marked detection image.

[0023] In one embodiment of the present disclosure, the performing position detection on the detection image to obtain a welding point coordinate set included in the detection image includes:

[0024] Performing position detection on the detection image to obtain coordinate information of each detection welding point in the detection image;

[0025] Acquire the template image corresponding to the area to be detected and the coordinate information of the template welding points in the template image;

[0026] For each template welding point, the Euclidean distance between the template welding point and each detection welding point is calculated based on the coordinate information of the template welding point and the coordinate information of the detection welding point to obtain a plurality of distance values;

[0027] Compare the multiple distance values ​​to obtain a minimum distance value;

[0028] Taking the detected welding point corresponding to the minimum distance value as the target welding point;

[0029] The obtained coordinate information corresponding to at least one or more target welding points is used as a welding point coordinate set included in the detection image.

[0030] In one embodiment of the present disclosure, the training process of the welding point detection model includes:

[0031] Acquire a plurality of sample images, wherein the sample images include annotated coordinate information of welding points;

[0032] The sample image is input into a welding point detection network to obtain detection coordinate information of welding points in the sample image; for the detection coordinate information of each welding point, when the distance between the detection coordinate information and the marked coordinate information is less than or equal to a distance threshold, the parameter value of each network node in the welding point detection network is saved to obtain a trained welding point detection model.

[0033] In a second aspect, an embodiment of the present disclosure provides a welding quality detection device, the device comprising:

[0034] An image acquisition module is used to acquire a detection image corresponding to the area to be detected;

[0035] A welding point quantity determination module, used to process the detection image using a pre-trained welding point detection model to obtain the number of target welding points included in the detection image;

[0036] A quantity determination module, used to determine whether the target welding point quantity is consistent with the actual welding point quantity;

[0037] The welding quality determination module is used to query the corresponding relationship between the quantity relationship and the welding quality based on the quantity relationship between the target welding point quantity and the actual welding point quantity, so as to obtain the welding quality of the area to be detected.

[0038] In one embodiment of the present disclosure, a welding point quantity determination module includes: a welding point coordinate set determination unit, which is used to perform position detection on the detection image to obtain a welding point coordinate set included in the detection image; and a welding point quantity determination unit, which is used to count the number of welding points included in the welding point coordinate set as the target welding point quantity.

[0039] In one embodiment of the present disclosure, the welding quality determination module includes: a first determination unit, which is used to determine that the welding quality of the area to be inspected is qualified if the target number of welding points is consistent with the actual number of welding points; a first judgment unit, which is used to judge whether the target number of welding points is less than the actual number of welding points if the target number of welding points is inconsistent with the actual number of welding points; a second determination unit, which is used to determine that the welding quality of the area to be inspected is unqualified if the target number of welding points is less than the actual number of welding points; and a third determination unit, which is used to determine the welding quality of the area to be inspected according to the relationship between the welding point coordinate set and the key point coordinates if the target number of welding points is greater than the actual number of welding points.

[0040] In one embodiment of the present disclosure, the third determination unit includes: a coordinate judgment subunit, used to determine whether the welding point coordinate set includes key point coordinates; a first determination subunit, used to determine that the welding quality of the area to be inspected is qualified if the welding point coordinate set includes key point coordinates; and a second determination subunit, used to determine that the welding quality of the area to be inspected is unqualified if the welding point coordinate set does not include key point coordinates.

[0041] In one embodiment of the present disclosure, the device further includes: a coordinate marking module for marking the welding point coordinate information included in the welding point coordinate set in the detection image; and an image display module for displaying the marked detection image.

[0042] In one embodiment of the present disclosure, the welding point coordinate set determination unit includes: a detection welding point coordinate information determination subunit, which is used to perform position detection on the detection image to obtain the coordinate information of each detection welding point in the detection image; a template welding point coordinate information determination subunit, which is used to obtain the template image corresponding to the area to be detected and the coordinate information of the template welding points in the template image; a distance value calculation subunit, which is used to calculate the Euclidean distance between the template welding point and each detection welding point for each template welding point based on the coordinate information of the template welding point and the coordinate information of the detection welding point to obtain multiple distance values; a distance value comparison subunit, which is used to compare the multiple distance values ​​to obtain a minimum distance value; a target welding point determination subunit, which is used to use the detection welding point corresponding to the minimum distance value as the target welding point; and a welding point coordinate set determination subunit, which is used to use the obtained coordinate information corresponding to at least one or more target welding points as the welding point coordinate set included in the detection image.

[0043] In one embodiment of the present disclosure, the device also includes: a model training module, which is used to execute the training process of the welding point detection model: the model training module includes: a sample image acquisition unit, which is used to acquire multiple sample images, wherein the sample images include annotated coordinate information of the welding points; a model training unit, which is used to input the sample images into a welding point detection network to obtain the detection coordinate information of the welding points in the sample images; for the detection coordinate information of each welding point, when the distance between the detection coordinate information and the annotated coordinate information is less than or equal to a distance threshold, the parameter values ​​of each network node in the welding point detection network are saved to obtain a trained welding point detection model.

[0044] In a third aspect, an embodiment of the present disclosure provides an electronic device, the electronic device comprising:

[0045] one or more processors;

[0046] A storage device for storing one or more programs;

[0047] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of the above-mentioned first aspects.

[0048] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a method as described in any one of the above-mentioned first aspects.

[0049] The welding quality detection method, device, equipment and storage medium provided by the embodiments of the present disclosure include: obtaining a detection image corresponding to the area to be detected; processing the detection image using a pre-trained welding point detection model to obtain the number of target welding points included in the detection image; judging whether the number of target welding points is consistent with the actual number of welding points; based on the quantitative relationship between the number of target welding points and the actual number of welding points, querying the corresponding relationship between the quantitative relationship and the welding quality to obtain the welding quality of the area to be detected. The embodiments of the present disclosure obtain the number of target welding points in the detection image through a pre-trained welding point detection model, and judge whether the quality of the welding points is qualified according to the quantitative relationship between the number of detected target welding points and the actual number of welding points. By automatically detecting whether all welding points are welded normally and whether the welded studs have fallen or other abnormal conditions, the problems of missed detection or false detection of welding areas are solved, saving a lot of manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0052] Figure 1 A schematic diagram of a welding quality detection method provided in an embodiment of the present disclosure;

[0053] Figure 2a A location map of actual welding points in a template image provided in an embodiment of the present disclosure;

[0054] Figure 2b A position map of a predicted welding point in a detection image provided in an embodiment of the present disclosure;

[0055] Figure 3 A flow chart of a welding point detection model training method provided in an embodiment of the present disclosure;

[0056] Figure 4 A schematic diagram of sample image annotation information provided in an embodiment of the present disclosure;

[0057] Figure 5 A schematic diagram of a model training process and a use process provided in an embodiment of the present disclosure;

[0058] Figure 6 A structural schematic diagram of a welding quality detection device provided in an embodiment of the present disclosure;

[0059] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0060] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0061] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0062] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0063] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0064] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0065] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0066] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0067] The following embodiments describe in detail the welding quality detection method provided in the embodiments of the present disclosure in conjunction with the accompanying drawings.

[0068] Figure 1 The figure is a flow chart of a welding quality detection method in an embodiment of the present disclosure. The embodiment can be applied to the situation of detecting the quality of welding points in a region. The welding quality detection method is executed by a welding quality detection device. The welding quality detection device can be implemented in software and / or hardware, and the welding quality detection device can be configured in an electronic device.

[0069] For example: the electronic device can be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet, an Internet module, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination thereof, including accessories and peripherals of these devices or any combination thereof.

[0070] For another example: the electronic device may be a server, wherein the server may be a physical server or a cloud server, and the server may be a server or a server cluster.

[0071] Specifically, Figure 1 As shown, the welding point detection method provided by the embodiment of the present disclosure mainly includes steps S101-S104.

[0072] S101, obtaining a detection image corresponding to the area to be detected.

[0073] The area to be inspected can be understood as an area where the quality of the stud welding points in the area needs to be inspected. Furthermore, the area to be inspected can be a part of a device or an object, or the entire visible area of ​​a device or an object. For example, the area to be inspected can be the bottom area of ​​a vehicle, or the area to be inspected can be the wheel hub area of ​​a vehicle. For another example, the area to be inspected can be a circuit board with welding points.

[0074] In one embodiment of the present disclosure, the detection image corresponding to the area to be detected refers to the image obtained after the acquisition device shoots the area to be detected, wherein the detection image can be a two-dimensional image or a three-dimensional image, which is not specifically limited in the embodiment of the present disclosure.

[0075] In one embodiment of the present disclosure, information on the area to be inspected and corresponding quality inspection information of the vehicle are obtained, and location information of an image acquisition device is obtained based on the information on the area to be inspected. The information is sent to a corresponding image acquisition device, so that after the image acquisition device receives the information, an image acquisition instruction is generated to control the image acquisition device to shoot the area to be inspected to obtain a detection image.

[0076] S102: Process the detection image using a pre-trained welding point detection model to obtain the number of target welding points included in the detection image.

[0077] In the disclosed embodiment, the welding point detection model refers to a pre-trained network model that can perform feature extraction and image recognition on the detection image and identify the number of welding points in the image.

[0078] In one embodiment of the present disclosure, after the detection image is input into the welding point detection model, the value output by the welding point detection model is used as the number of target welding points included in the detection image.

[0079] In one embodiment of the present disclosure, the detection image is processed using a pre-trained welding point detection model to obtain the target number of welding points included in the detection image, including: performing position detection on the detection image to obtain a welding point coordinate set included in the detection image; and counting the number of welding points included in the welding point coordinate set as the target number of welding points.

[0080] In one embodiment of the present disclosure, after the detection image is input into the welding point detection model, the coordinate information of each detected welding point is obtained, and the number of coordinate information is counted to obtain the number of target welding points.

[0081] In one embodiment of the present disclosure, the number of statistical coordinate information may be achieved by the output layer of the welding point detection model, that is, the output layer of the welding point detection model is a network structure with a specific information statistical function.

[0082] In one embodiment of the present disclosure, a counter may be connected to the output end of the welding point detection model to count the number of coordinate information, and the counter is used to count the number of coordinate information to obtain the target welding point number.

[0083] S103: Determine whether the target welding point quantity is consistent with the actual welding point quantity.

[0084] The actual number of welding points refers to the number of welding points that should actually exist in the area to be detected. The area to be detected and the actual number of welding points are in a one-to-one correspondence. In other words, each area has its corresponding actual number of welding points, and different areas correspond to different or the same actual number of welding points. For example, the actual number of welding points corresponding to the bottom of the vehicle is 7, and the actual number of welding points corresponding to the wheel hub area of ​​the vehicle is 5.

[0085] Further, the target area identifier of the area to be detected is determined, and based on the target area identifier, a query is performed in the pre-set correspondence between the area identifier and the number of welding points, and the number of welding points queried is used as the actual number of welding points. The target area identifier can be a unique identification code of the acquisition device or a code customized by the staff, which is not specifically limited in the embodiments of the present disclosure.

[0086] In one embodiment of the present disclosure, judging whether the target number of welding points is consistent with the actual number of welding points is to judge whether the target number of welding points is equal to the actual number of welding points. The method for judging whether the number is consistent is not specifically limited in the embodiment of the present disclosure.

[0087] S104: Based on the quantitative relationship between the target number of welding points and the actual number of welding points, query the corresponding relationship between the quantitative relationship and the welding quality to obtain the welding quality of the area to be inspected.

[0088] In one embodiment of the present disclosure, if the target number of welding points is consistent with the actual number of welding points, it is determined that the welding quality of the area to be inspected is qualified.

[0089] In the disclosed embodiment, the number of target welding points is consistent with the number of actual welding points, which indicates that there are no leaking welding, missing welding, falling welding, etc. in the welding points in the area to be inspected, that is, the welding quality of the area to be inspected is determined to be qualified. For example: in the inspection image corresponding to the bottom area of ​​the vehicle, the number of target welding points obtained is 7, and the number of actual welding points corresponding to the bottom of the vehicle is 7. If the two are the same, it indicates that there are no leaking welding, missing welding, falling welding, etc. in the welding points in the bottom area of ​​the vehicle, and the welding point quality is qualified.

[0090] In one embodiment of the present disclosure, if the target number of welding points is inconsistent with the actual number of welding points, it is determined whether the target number of welding points is less than the actual number of welding points; if the target number of welding points is less than the actual number of welding points, it is determined that the welding quality of the area to be inspected is unqualified.

[0091] In the embodiment of the present disclosure, if the number of target welding points is inconsistent with the number of actual welding points, it indicates that there may be abnormalities in the welding points in the area to be detected. In the case that there may be abnormalities in the welding points in the area to be detected, the size relationship between the number of target welding points and the actual number of welding points is further determined, and whether the quality of the welding points is qualified is further determined based on the size relationship.

[0092] In one embodiment of the present disclosure, the target number of welding points is less than the actual number of welding points, which indicates that the welding points in the area to be inspected may have leakage, missing welding, falling off, etc., that is, the welding quality of the area to be inspected is determined to be unqualified.

[0093] In one embodiment of the present disclosure, if the target number of welding points is greater than the actual number of welding points, it indicates that an error may have occurred in the welding point detection model during the welding point detection process, resulting in the number of welding points detected being greater than the actual number of welding points. At this time, the welding quality of the area to be detected is determined based on the relationship between the welding point coordinate set and the key point coordinates.

[0094] In one embodiment of the present disclosure, determining the welding quality of the area to be inspected based on the relationship between the welding point coordinate set and the key point coordinates includes: judging whether the welding point coordinate set includes the key point coordinates; if the welding point coordinate set includes the key point coordinates, determining that the welding quality of the area to be inspected is qualified; if the welding point coordinate set does not include the key point coordinates, determining that the welding quality of the area to be inspected is unqualified.

[0095] The key point coordinates refer to the coordinates of the welding points that should actually exist in the area to be detected in the detection image.

[0096] In the embodiment of the present disclosure, judging whether the welding point coordinate set includes key point coordinates includes: for each key point coordinate, judging whether there is a coordinate identical to the key point coordinate in the welding point coordinate set, and if so, determining that the key point coordinate has a corresponding welding point coordinate, and if not, determining that the key point coordinate does not have a corresponding welding point coordinate. If all key point coordinates have corresponding welding point coordinates, it is determined that the welding point coordinate set includes the key point coordinates, and if any key point coordinate does not have a corresponding welding point coordinate, it is determined that the welding point coordinate set does not include the key point coordinates.

[0097] In one embodiment of the present disclosure, since the detection image is obtained by taking an image acquisition device, there may be a situation where the welding point coordinates are inconsistent with the key point coordinates. Therefore, judging whether the welding point coordinate set includes the key point coordinates includes: for each key point coordinate, judging whether there is a coordinate in the welding point coordinate set whose Euclidean distance is less than a distance threshold, if so, determining that the key point coordinate has a corresponding welding point coordinate, if not, determining that the key point coordinate does not have a corresponding welding point coordinate. The calculation method of the Euclidean distance between the coordinates is described in the following embodiment, and will not be repeated in the embodiment of the present disclosure.

[0098] In one embodiment of the present disclosure, if the welding point coordinate set includes key point coordinates, the welding quality of the area to be inspected is determined to be qualified; if the welding point coordinate set does not include key point coordinates, the welding quality of the area to be inspected is determined to be unqualified.

[0099] In one embodiment of the present disclosure, when the welding quality of the area to be inspected is unqualified, a prompt message may be generated to prompt the staff that the inspection result is unqualified, so that the staff can perform repair welding on the welding points in the area to be inspected.

[0100] On the basis of the above-mentioned embodiments, in order to avoid errors in the welding point detection model, the welding point obtained by the welding point detection model is further optimized in the embodiments of the present disclosure to eliminate the possibility of misdetection of welding points.

[0101] In one embodiment of the present disclosure, the performing position detection on the detection image to obtain a set of welding point coordinates included in the detection image includes: performing position detection on the detection image to obtain coordinate information of each detection welding point in the detection image; acquiring a template image corresponding to the area to be detected and coordinate information of template welding points in the template image; for each template welding point, calculating the Euclidean distance between the template welding point and each detection welding point based on the coordinate information of the template welding point and the coordinate information of the detection welding point to obtain multiple distance values; comparing the multiple distance values ​​to obtain a minimum distance value; using the detection welding point corresponding to the minimum distance value as a target welding point; and using the obtained coordinate information corresponding to at least one or more target welding points as the set of welding point coordinates included in the detection image.

[0102] In the disclosed embodiment, after the detection image is input into the welding point detection model, the welding point detection model outputs the coordinate information of multiple welding points, that is, the welding points corresponding to the coordinate information output by the welding point detection model are used as the detection welding points. Further, a template image corresponding to the area to be detected is obtained, wherein the coordinate information of the actual welding points in the area is marked in the template image, that is, the welding points corresponding to the coordinate information of the actual welding points are used as the template welding points.

[0103] In the disclosed embodiment, for each template welding point, the distance between the template welding point and each detection welding point is calculated to obtain multiple distance values, and the multiple distance values ​​are compared, and the detection welding point corresponding to the minimum distance value is used as the target welding point. In this way, a target welding point can be determined according to each template welding point, eliminating the situation where an actual welding point is detected twice.

[0104] In one embodiment of the present disclosure, counting the number of the selected target welding points as the number of target welding points includes: counting the number of the target welding points based on the coordinate information corresponding to the target welding points. Specifically, if the coordinate information of one or more target welding points is the same, the target welding points corresponding to the coordinate information are counted only once. This avoids the situation where a welding point corresponding to one position information is counted multiple times.

[0105] In the embodiments of the present disclosure, Figure 2a and 2b As shown, the position information of the welding point is represented by a square frame. For example, the coordinate value of the upper left vertex and the coordinate value of the lower right vertex of the square frame can be used to represent the coordinate information of the welding point.

[0106] In one embodiment of the present disclosure, when calculating the Euclidean distance between welding points, the coordinate information of the welding point can be represented by a coordinate point in a square frame, for example, it can be represented by the center point coordinate of the square frame, or it can be represented by the vertex of the square frame. In the embodiment of the present disclosure, taking the center point coordinate as an example to represent the coordinate information of the welding point, the Euclidean distance between the template welding point and the detection welding point is calculated.

[0107] In one embodiment of the present disclosure, Figure 2a As shown, the template welding point ROI included in the template image t0 and ROI t1 .like Figure 2b As shown, the detection welding point ROI in the detection image d0 , ROI d1 and ROI d2 . Calculate and detect the welding point ROI respectively dn (n=0,1,2) and template welding point ROI tm (m=0,1) between the Euclidean distance L(n,m){(n,m)|n=0,1,2,m=0,1}; for each template welding point ROItm(m=0,1), select the detection welding point ROI corresponding to its minimum Euclidean distance dn (n=0,1,2) as the target welding spot ROI after global optimization odm , namely: ROI odm =argmin(L(n,m)){(n,m)|n=0,1,2,m=0,1}; Due to the template welding point ROI in the template image tm There are only two, so the ROI after global optimization odm The number is also two, the detection welding point ROI in the welding point detection model output result d2 Filtered; target welding point ROI obtained after statistical optimization odm The number of target welding points is used as the number of target welding points, and the ROI of each target welding point is obtained. odm The coordinate information is used as the final output result of the welding point detection model.

[0108] The welding quality detection method provided by the embodiment of the present disclosure includes: obtaining a detection image corresponding to the area to be detected; processing the detection image using a pre-trained welding point detection model to obtain the number of target welding points included in the detection image; judging whether the number of target welding points is consistent with the actual number of welding points; based on the quantitative relationship between the number of target welding points and the actual number of welding points, querying the corresponding relationship between the quantitative relationship and the welding quality to obtain the welding quality of the area to be detected. The embodiment of the present disclosure obtains the number of target welding points in the detection image through a pre-trained welding point detection model, and judges whether the quality of the welding points is qualified according to the quantitative relationship between the number of detected target welding points and the actual number of welding points. By automatically detecting whether all welding points are welded normally and whether the welded studs have fallen off or other abnormal conditions, the problems of missed detection or false detection of welding areas are solved, saving a lot of manpower and material resources.

[0109] Based on the above embodiment, the method further includes: marking the welding point coordinate information included in the welding point coordinate set in the detection image; and displaying the marked detection image.

[0110] In the disclosed embodiment, the area corresponding to the coordinate information in the detection image is marked, and the marked detection image is displayed for viewing by the staff, so that the staff can further manually check the condition of the welding point to improve the accuracy of welding quality detection. In addition, when there is a leak or a drop in the welding point in the area to be detected, the staff can intuitively view the welding point with abnormal conditions, which is convenient for the staff to perform repair welding operations.

[0111] Based on the above embodiments, the present disclosure provides a training process for a welding point detection model. Figure 3 As shown in the figure, the training process of the welding point detection model mainly includes the following steps:

[0112] S201. Acquire a plurality of sample images, wherein the sample images include annotated coordinate information of welding points.

[0113] In the embodiment of the present disclosure, a certain number of images containing stud welding point areas are collected as sample images. A typical range of the number of sample images is 100-1000. The typical range of the number of stud welding point ROIs contained in each image is 0-50. The image content includes the studs in the stud welding point area and the black welding mark area. Figure 4 As shown, there are five welding points included in the sample image.

[0114] The annotated coordinate information of the welding point includes: the category of the welding point, and the upper left corner two-dimensional coordinates (u0, v0) and the lower right corner two-dimensional coordinates (u1, v1) of each welding point area, such as Figure 4 The two-dimensional coordinates of the last and lowest welding point are listed as the upper left corner two-dimensional coordinate (u0=385, v0=375) and the lower right corner two-dimensional coordinate (u1=450, v1=500).

[0115] S202: Input the sample image into a welding point detection network to obtain detection coordinate information of welding points in the sample image.

[0116] In the disclosed embodiment, the currently existing CNN-based detection network is selected as the welding point detection network, wherein the detection network includes but is not limited to RCNN, Faster RCNN, SSD, Yolo series, CornerNet, and Swin-Transformer.

[0117] In one embodiment of the present disclosure, the sample image is input into a welding point detection network to obtain coordinate information of each welding point in the sample image.

[0118] The detection network in the disclosed embodiment is preferably a 2D detection network, which needs to perform position detection on targets of different scales. The features of targets of different scales will be highlighted on feature maps of different scales after convolution. Therefore, the detection network often adopts fusion methods such as multi-scale feature map splicing and averaging to retain the features corresponding to targets of different sizes, ensuring that the position feature information of target images of different scales can have a greater impact on the weight of each neuron during the training process.

[0119] Furthermore, the above-mentioned 2D detection network ultimately needs to output the 2D position information of the area where all welding points are located. Therefore, the last layer of the entire network will give 2D coordinate predictions for all possible welding points in some form; based on this, the last layer of the detection network often uses a fully connected or convolutional layer to ensure that the prediction result is the coordinate information of the 2D box.

[0120] S203, for the detection coordinate information of each welding point, when the distance between the detection coordinate information and the marked coordinate information is less than or equal to a distance threshold, saving the parameter value of each network node in the welding point detection network to obtain a trained welding point detection model.

[0121] On the basis of the above embodiment, when the distance between the detected coordinate information and the marked coordinate information is greater than a distance threshold, the parameter value of each node of the welding point detection network is adjusted based on error back propagation until the distance between the detected position and the marked position is less than or equal to the distance threshold.

[0122] In the disclosed embodiment, the detection network is trained using the sample images under the established training framework. By correcting the parameter value of each node in the detection network based on error back propagation (BP) or other similar methods, the welding point category and the coordinate information corresponding to each welding point outputted in each training round are closer and closer when the detection network takes the sample image as input. When the degree of closeness reaches a preset threshold, the detection network training is considered to be completed. When the training is completed, the structure of the detection network and the parameter value of each node in the structure are saved, and a trained welding point detection model is obtained.

[0123] In the disclosed embodiment, a stud welding quality inspection method based on 2D machine vision is proposed. The stud welding points are detected by an artificial intelligence method based on big data, and the inspection results are globally optimized by template comparison to eliminate possible misdetected welding points. Then, it is judged whether there are abnormal conditions such as leaking welds and stud falling in the optimized welding point frame.

[0124] The welding quality detection method provided in the embodiment of the present disclosure needs to first train the stud welding detection model through a large number of trainable pictures containing the stud welding point area, then use the trained welding point detection model to detect the detection pictures, and then globally optimize the results of the welding point detection model. Therefore, the method mainly includes two parts: training and detection. Figure 5 As shown in the figure, the training process mainly includes five steps: the acquisition of two-dimensional sample images in the welding point area, information annotation of the two-dimensional sample images, the construction of the detection network, the training of the detection network, and the generation of the detection model. The use process mainly includes five steps: the acquisition of images in the welding point area, the inference of the detection model, and the optimization of the detection model.

[0125] Figure 6 1 is a schematic diagram of the structure of a welding quality detection device in an embodiment of the present disclosure. This embodiment can be applied to the situation of detecting the quality of welding points in a region. The welding quality detection device can be implemented in software and / or hardware, and the welding quality detection device can be configured in an electronic device.

[0126] like Figure 6 As shown, the welding quality detection device 60 provided in the embodiment of the present disclosure includes: an image acquisition module 61, a welding point quantity determination module 62, a quantity judgment module 63 and a welding quality determination module 64.

[0127] Among them, the image acquisition module 61 is used to acquire the detection image corresponding to the area to be inspected; the welding point quantity determination module 62 is used to process the detection image using a pre-trained welding point detection model to obtain the target welding point quantity included in the detection image; the quantity judgment module 63 is used to judge whether the target welding point quantity is consistent with the actual welding point quantity; the welding quality determination module 64 is used to query the corresponding relationship between the quantity relationship and the welding quality based on the quantitative relationship between the target welding point quantity and the actual welding point quantity, so as to obtain the welding quality of the area to be inspected.

[0128] In one embodiment of the present disclosure, a welding point quantity determination module includes: a welding point coordinate set determination unit, which is used to perform position detection on the detection image to obtain a welding point coordinate set included in the detection image; and a welding point quantity determination unit, which is used to count the number of welding points included in the welding point coordinate set as the target welding point quantity.

[0129] In one embodiment of the present disclosure, the welding quality determination module includes: a first determination unit, which is used to determine that the welding quality of the area to be inspected is qualified if the target number of welding points is consistent with the actual number of welding points; a first judgment unit, which is used to judge whether the target number of welding points is less than the actual number of welding points if the target number of welding points is inconsistent with the actual number of welding points; a second determination unit, which is used to determine that the welding quality of the area to be inspected is unqualified if the target number of welding points is less than the actual number of welding points; and a third determination unit, which is used to determine the welding quality of the area to be inspected according to the relationship between the welding point coordinate set and the key point coordinates if the target number of welding points is greater than the actual number of welding points.

[0130] In one embodiment of the present disclosure, the third determination unit includes: a coordinate judgment subunit, used to determine whether the welding point coordinate set includes key point coordinates; a first determination subunit, used to determine that the welding quality of the area to be inspected is qualified if the welding point coordinate set includes key point coordinates; and a second determination subunit, used to determine that the welding quality of the area to be inspected is unqualified if the welding point coordinate set does not include key point coordinates.

[0131] In one embodiment of the present disclosure, the device further includes: a coordinate marking module for marking the welding point coordinate information included in the welding point coordinate set in the detection image; and an image display module for displaying the marked detection image.

[0132] In one embodiment of the present disclosure, the welding point coordinate set determination unit includes: a detection welding point coordinate information determination subunit, which is used to perform position detection on the detection image to obtain the coordinate information of each detection welding point in the detection image; a template welding point coordinate information determination subunit, which is used to obtain the template image corresponding to the area to be detected and the coordinate information of the template welding points in the template image; a distance value calculation subunit, which is used to calculate the Euclidean distance between the template welding point and each detection welding point for each template welding point based on the coordinate information of the template welding point and the coordinate information of the detection welding point to obtain multiple distance values; a distance value comparison subunit, which is used to compare the multiple distance values ​​to obtain a minimum distance value; a target welding point determination subunit, which is used to use the detection welding point corresponding to the minimum distance value as the target welding point; and a welding point coordinate set determination subunit, which is used to use the obtained coordinate information corresponding to at least one or more target welding points as the welding point coordinate set included in the detection image.

[0133] In one embodiment of the present disclosure, the device also includes: a model training module, which is used to execute the training process of the welding point detection model: the model training module includes: a sample image acquisition unit, which is used to acquire multiple sample images, wherein the sample images include annotated coordinate information of the welding points; a model training unit, which is used to input the sample images into a welding point detection network to obtain the detection coordinate information of the welding points in the sample images; for the detection coordinate information of each welding point, when the distance between the detection coordinate information and the annotated coordinate information is less than or equal to a distance threshold, the parameter values ​​of each network node in the welding point detection network are saved to obtain a trained welding point detection model.

[0134] Figure 6 The welding quality detection device of the illustrated embodiment is used to execute the welding quality detection method in the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0135] Figure 7 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 7 , which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure. The electronic device 700 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable terminal devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 7The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0136] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703 to implement the welding quality detection method of the embodiment described in the present disclosure. In RAM 703, various programs and data required for the operation of the terminal device 700 are also stored. The processing device 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0137] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 705. The communication device 707 may allow the terminal device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The terminal device 700 is shown to have various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0138] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the welding quality detection method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 704, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above functions defined in the method of the embodiment of the present disclosure are executed.

[0139] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0140] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperTextTransferProtocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an adhoc peer-to-peer network), as well as any currently known or future developed network.

[0141] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0142] The computer-readable medium carries one or more programs. When the one or more programs are executed by the terminal device, the terminal device implements the method described in any one of the embodiments.

[0143] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0144] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0145] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0146] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0147] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0148] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0149] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0150] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A welding quality detection method, characterized in that: The method comprises: Obtain a detection image corresponding to the area to be detected; Processing the detection image using a pre-trained welding point detection model to obtain the number of target welding points included in the detection image; Determining whether the target number of welding points is consistent with the actual number of welding points; Based on the quantitative relationship between the target number of welding points and the actual number of welding points, a query is performed in the corresponding relationship between the quantitative relationship and the welding quality to obtain the welding quality of the area to be inspected.

2. The method according to claim 1, characterized in that: The method of processing the detection image using the pre-trained welding point detection model to obtain the number of target welding points included in the detection image includes: Performing position detection on the detection image to obtain a welding point coordinate set included in the detection image; The number of welding points included in the welding point coordinate set is counted as the target welding point number.

3. The method according to claim 1, characterized in that The step of querying the corresponding relationship between the quantity relationship and the welding quality based on the quantity relationship between the target welding point quantity and the actual welding point quantity to obtain the welding quality of the area to be inspected includes: If the target number of welding points is consistent with the actual number of welding points, it is determined that the welding quality of the area to be inspected is qualified; If the target number of welding points is inconsistent with the actual number of welding points, determining whether the target number of welding points is less than the actual number of welding points; If the target number of welding points is less than the actual number of welding points, determining that the welding quality of the area to be inspected is unqualified; If the target number of welding points is greater than the actual number of welding points, the welding quality of the area to be inspected is determined according to the relationship between the welding point coordinate set and the key point coordinates.

4. The method according to claim 3, characterized in that Determining the welding quality of the area to be inspected according to the relationship between the welding point coordinate set and the key point coordinates includes: Determining whether the welding point coordinate set includes key point coordinates; If the welding point coordinate set includes key point coordinates, determining that the welding quality of the area to be inspected is qualified; If the welding point coordinate set does not include key point coordinates, it is determined that the welding quality of the area to be inspected is unqualified.

5. The method according to claim 2, characterized in that: The method further comprises: Marking the welding point coordinate information included in the welding point coordinate set in the detection image; The marked detection image is displayed.

6. The method according to claim 2, characterized in that The performing position detection on the detection image to obtain a welding point coordinate set included in the detection image includes: Performing position detection on the detection image to obtain coordinate information of each detection welding point in the detection image; Acquire the template image corresponding to the area to be detected and the coordinate information of the template welding points in the template image; For each template welding point, the Euclidean distance between the template welding point and each detection welding point is calculated based on the coordinate information of the template welding point and the coordinate information of the detection welding point to obtain a plurality of distance values; Compare the multiple distance values ​​to obtain a minimum distance value; Taking the detected welding point corresponding to the minimum distance value as the target welding point; The obtained coordinate information corresponding to at least one or more target welding points is used as a welding point coordinate set included in the detection image.

7. The method according to claim 1, characterized in that The training process of the welding point detection model includes: Acquire a plurality of sample images, wherein the sample images include annotated coordinate information of welding points; Inputting the sample image into a welding point detection network to obtain detection coordinate information of the welding points in the sample image; For the detection coordinate information of each welding point, when the distance between the detection coordinate information and the marked coordinate information is less than or equal to the distance threshold, the parameter value of each network node in the welding point detection network is saved to obtain a trained welding point detection model.

8. A welding quality detection device, characterized in that: The device comprises: An image acquisition module is used to acquire a detection image corresponding to the area to be detected; A welding point quantity determination module, used to process the detection image using a pre-trained welding point detection model to obtain the number of target welding points included in the detection image; A quantity determination module, used to determine whether the target welding point quantity is consistent with the actual welding point quantity; The welding quality determination module is used to query the corresponding relationship between the quantity relationship and the welding quality based on the quantity relationship between the target welding point quantity and the actual welding point quantity, so as to obtain the welding quality of the area to be detected.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.