Weld defect recognition and classification method based on machine vision
The welding seam defect identification module identifies the welding video data and intercepts the cleaning benchmark data, which solves the problem of too much data in the welding seam repair and cleaning judgment model, improves the efficiency and intelligence of the model, and ensures the quality of the cleaning strategy.
Patent Information
- Application Number
- CN202410215133.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-02-27
AI Technical Summary
In the existing technology, the real-time video data input into the weld repair and cleaning judgment model is not reduced, resulting in excessive server operations and reduced model output rate, affecting the intelligence of use.
Use the welding seam defect identification module to identify defects in welding video data, select retrospective interception units or classified storage based on the identification results, intercept the cleaning baseline video data and input it into the cleaning strategy generation model, reducing invalid data input and improving model efficiency and quality.
It effectively reduces the amount of data input to the cleanup strategy generation model, improves model recognition efficiency and intelligence, reduces server calculations, and ensures the quality and maintainability of the cleanup strategy.
Smart Images

Figure CN117994704B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of weld defect recognition, and in particular to a weld defect recognition and classification method based on machine vision. Background Art
[0002] A weld is a connection point formed during the welding process, which connects two or more metal components or parent materials together through a process of heating and cooling. Weld repair is a common welding operation used to repair weld damage caused by various reasons;
[0003] Before performing weld repair, it is necessary to clean and prepare it to ensure that the weld is not affected. As for the determination of the cleaning strategy before weld repair, one current method is based on a weld repair cleaning determination model. The real-time video data in the welding process is input into the weld repair cleaning determination model, and the corresponding cleaning strategy is output with the help of the model. In this way, the cleaning strategy of the corresponding weld repair can be accurately obtained, avoiding the occurrence of weld repair failure caused by unnecessary factors. However, the real-time video data input into the weld repair cleaning determination model is not useful for every frame. Too much useless video data input into the weld repair cleaning determination model will not only cause excessive calculations on the server equipped with the model, but also affect the output rate of the model, resulting in unintelligent use of the model.
[0004] In order to solve the above problems, the present invention proposes a solution. Summary of the invention
[0005] The purpose of the present invention is to provide a weld defect recognition and classification method based on machine vision, in order to solve the problem that in the prior art, real-time video data in the welding process is input into the weld repair cleaning judgment model without reducing the real-time video data, resulting in too much useless video data being input into the weld repair cleaning judgment model, which will not only cause excessive calculation of the server equipped with the model but also affect the output rate of the model, resulting in the problem of unintelligent use of the model;
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] The weld defect recognition and classification method based on machine vision includes the following steps:
[0008] Step 1: After the welding of the current workpiece is completed, the welding video data thereof is collected by the welding monitoring module;
[0009] Step 2: The weld defect recognition module inputs the received transmitted welding video data of the current workpiece into the weld defect recognition model to obtain the defect recognition result data of the current workpiece, wherein the defect recognition result data of the current workpiece includes a defect recognition signal, and the defect recognition signal is a number "1" or "0", "1" means that the weld defect is recognized, and "0" means that the weld defect is not recognized;
[0010] Step 3: The weld defect recognition module determines whether the defect recognition signal in the current workpiece defect recognition result data is "0" or "1", and based on the determination result, selects whether to transmit the current workpiece defect recognition result data and the welding video data to the retrospective interception unit or the classification storage module;
[0011] Step 4: If the backtracking interception unit receives the transmitted current workpiece defect recognition result data and welding video data, it intercepts the cleaned reference video data from the current workpiece welding video data according to the preset backtracking interception rule;
[0012] Step 5: The repair strategy generation unit inputs the received cleaning reference video data of the current workpiece into the cleaning strategy generation model to obtain the cleaning strategy corresponding to the current workpiece.
[0013] Furthermore, in the above step three, if the defect recognition signal in the current workpiece defect recognition result data is "1", the current workpiece defect recognition result data and the welding video data are transmitted to the retrospective interception unit, otherwise, they are transmitted to the classification storage module for storage.
[0014] Further, the analysis and processing module analyzes and processes the welding video data, defect recognition result data and pre-cleaning area of all workpieces whose defect recognition signals are "1" in the past according to the preset analysis and processing steps, as follows:
[0015] S21: firstly, a workpiece of a specification is selected as the workpiece to be processed, and a weld defect corresponding to the workpiece to be processed is selected as the defect to be processed;
[0016] S22: Obtain all workpieces to be processed that are identified as defects to be processed within a processing cycle, and mark them as A1, A2, ..., Aa in sequence, where a≥1;
[0017] S23: acquiring the shooting time corresponding to the first frame of the image from the defect annotation video data constituting the workpiece A1 to be processed, and marking it as the tracing time of the workpiece A1 to be processed;
[0018] S24: Calculate and obtain the post-processing traceability time of the workpiece A1 to be processed according to the preset post-processing rule;
[0019] S25: Calculate and obtain the leading traceability time of the workpiece A1 to be processed according to the preset leading rule;
[0020] S26: According to S22 to S26, the leading traceability time of the workpieces A1, A2, ..., Aa to be processed is calculated in sequence and their averages are calculated by using the addition and averaging formula, and the averages are recalibrated as the leading traceability time of the workpiece to be processed based on the defect to be processed;
[0021] The post-tracing time of the workpieces A1, A2, ..., Aa to be processed is calculated in sequence and the average is calculated using the addition and averaging formula, which is recalibrated as the post-tracing time of the workpiece to be processed based on the defect to be processed;
[0022] S26: all weld defects corresponding to the workpiece to be processed are selected in sequence as defects to be processed, and the pre-backtracking time and post-backtracking time of the workpiece to be processed based on all the weld defects corresponding to the workpiece to be processed are calculated in sequence according to S22 to S25, and a workpiece backtracking table of the workpiece to be processed is generated based on the pre-backtracking time and post-backtracking time of the workpiece to be processed;
[0023] S27: According to S21 to S26, all kinds of workpieces are selected in sequence as workpieces to be processed, and their workpiece backtracking tables are obtained by calculation.
[0024] Beneficial effects of the present invention:
[0025] The present invention acquires the welding video data of the current workpiece by collecting it, and uses the welding defect recognition model to identify and judge it. Based on the situation that the defect recognition signal contained in the recognition and judgment result data is "1", the welding video data, defect recognition result data and pre-cleaning area of all the workpieces whose defect recognition signals are "1" in the past are analyzed and processed periodically to obtain the pre-backtracking time and post-backtracking time of the weld defect corresponding to each specification of the workpiece. Taking the tracing time of the current workpiece as the base point, the cleaning reference video data is intercepted from its welding video data, and input into the cleaning strategy generation model to obtain the cleaning strategy corresponding to the current workpiece. In this way, the excessive and unnecessary video data in the welding video data of the workpiece is reduced, which not only greatly reduces the data input into the cleaning strategy generation model, but also improves the recognition efficiency of the cleaning strategy generation model. In addition, the necessary video data is retained in the reduction process, the quality of model recognition is guaranteed, and the computing amount of the server equipped with the model is further reduced, so that the use of the cleaning strategy generation model is more intelligent.
[0026] The present invention classifies and processes the welding video data, defect identification result data and pre-cleaning areas of all workpieces whose defect identification signals were "1" in the past according to the weld defect types contained in the defect identification result data. This can help to periodically analyze the pre-traceback time and post-traceback time of the weld defects corresponding to each specification of workpiece, improve the efficiency of the analysis, and classify and process them for easier maintenance and updating. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention will be further described below in conjunction with the accompanying drawings.
[0028] Figure 1 is a system block diagram of the present invention;
[0029] Figure 2 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] like Figure 1 As shown, a weld defect recognition and classification method based on machine vision is performed according to a weld defect recognition and classification system based on machine vision, which includes a weld monitoring module, a weld defect recognition module, a preparatory repair module, a storage classification module and a data analysis module;
[0032] The weld monitoring module is used to perform video monitoring on the welding process of the workpiece. After the welding of the current workpiece is completed, the weld monitoring module collects the video monitoring data of the welding process and generates the welding video data of the current workpiece based on the data, and transmits the data to the weld defect recognition module. The welding video data of the current workpiece fully records the completion process of the metal melting and connecting at the joint of the workpiece to form a weld.
[0033] The weld defect recognition module is used to recognize defects in the weld of the workpiece, and a trained weld defect recognition model is pre-stored in the weld defect recognition module;
[0034] The weld defect recognition model is used to recognize the weld appearance defects of the workpiece according to the welding video data of the workpiece and output the defect recognition result data of the workpiece, wherein the output defect recognition result data of the workpiece at least includes a defect recognition signal;
[0035] In this embodiment, the defect recognition signal may be a number "0" or a number "1", where the number "0" represents no defect and the number "1" represents a defect. When the defect recognition signal is a number "1", the output workpiece defect recognition result data also includes defect annotation video data and weld defect type;
[0036] The defect annotated video data is a section of video data containing a weld defect extracted from the welding video data of the workpiece by the weld defect recognition model, wherein the weld defect exists in each frame of the extracted video data, and the weld defect is marked with a red circle in each frame of the image;
[0037] After receiving the welding video data of the current workpiece transmitted by the weld monitoring module, the weld defect recognition module inputs the data into the weld defect recognition model, and the weld defect recognition model outputs the output result data of the current workpiece, and determines the defect recognition signal contained therein. If the defect recognition signal therein is "0", the welding video data of the current workpiece is transmitted to the classification storage module; if the defect recognition signal therein is "1", the welding video data of the current workpiece and the defect recognition result data are transmitted together to the preparatory repair module;
[0038] The preparatory repair module is used to identify the pre-cleaning area of the workpiece that needs to be repaired.
[0039] The preparatory patching module includes a backtracking interception unit and a patching strategy generation unit;
[0040] If the preparatory repair module receives the welding video data and defect recognition result data of the current workpiece transmitted by the weld defect recognition module, it transmits them to the retrospective interception unit, and the retrospective interception unit intercepts its cleaning reference video data from its welding video data according to the preset retrospective interception rules, which are as follows:
[0041] S11: based on the weld defect type included in the current workpiece defect recognition result data, find the corresponding pre-backtracking time length M1 and post-backtracking time length M2 in the workpiece backtracking table of all specifications of workpieces stored in the backtracking interception unit;
[0042] S12: Obtaining the shooting time corresponding to the first frame of the image from the defect annotation video data constituting the workpiece, and marking it as the backtracking reference time of the workpiece;
[0043] S13: based on the preceding backtracking time length M1 and the following backtracking time length M2 corresponding to the workpiece, and according to the backtracking reference time of the workpiece, a section of video data is intercepted from the welding video data of the workpiece, and the intercepted section of video data is used as the cleaning reference video data of the current workpiece;
[0044] The shooting time corresponding to the intercepted video data segment includes the retrospective reference time of the current workpiece, and the start time and the end time of the video data segment are respectively separated from the retrospective reference time of the current workpiece by M1 and M2 in time;
[0045] The retrospective interception unit transmits the cleaning reference video data of the workpiece to the repair strategy generation unit, and the repair strategy generation unit stores a trained cleaning strategy generation model;
[0046] After receiving the cleaning reference video data of the current workpiece transmitted by the retrospective interception unit, the repair strategy generation unit inputs the data into the cleaning strategy generation model to obtain a cleaning strategy corresponding to the current workpiece, wherein the cleaning strategy of the current workpiece includes a pre-cleaning area of the current workpiece and a corresponding cleaning method;
[0047] The corresponding cleaning personnel shall clean the pre-cleaning area of the current workpiece according to their cleaning method to prevent the quality of the weld repair from being affected during the weld repair process;
[0048] After the repair strategy generation unit obtains the cleaning strategy corresponding to the current workpiece, it transmits it together with the welding video data and defect recognition result data of the current workpiece to the classification storage module;
[0049] The classification storage module is used to classify and store the data of the workpiece;
[0050] If the classification storage module receives the transmitted welding video data of the current workpiece, it stores the welding video data of the current workpiece and all other workpieces without weld defects together;
[0051] If the classification storage module receives the cleaning strategy, welding video data and defect recognition result data corresponding to the transmitted current workpiece, it will store its cleaning strategy, welding video data and defect recognition result data together with the cleaning strategy, welding video data and defect recognition result data of the workpiece with the same weld defect type and the same rule according to the corresponding weld defect type and the rule to which it belongs;
[0052] The analysis and processing module is used to periodically analyze and process the welding video data of all weld repaired workpieces. The specific steps are as follows:
[0053] S21: firstly, a workpiece of a specification is selected as the workpiece to be processed, and a weld defect corresponding to the workpiece to be processed is selected as the defect to be processed;
[0054] S22: Obtain all workpieces to be processed that are identified as defects to be processed within a processing cycle, and mark them as A1, A2, ..., Aa in sequence, where a≥1;
[0055] S23: acquiring the shooting time corresponding to the first frame of the image from the defect annotation video data constituting the workpiece A1 to be processed, and marking it as the tracing time of the workpiece A1 to be processed;
[0056] S24: Calculate and obtain the post-processing traceability time of the workpiece A1 to be processed according to the preset post-processing rule, as follows:
[0057] S241: Obtain all images whose shooting time is after the tracing time of the workpiece A1 to be processed from all the frame images constituting the video monitoring data of the workpiece A1 to be processed, and mark these images as B1, B2, ..., Bb in order from far to near according to the order of the shooting time corresponding to these images from the current time, where b≥1;
[0058] S242: Obtain the pre-cleaning area C1 corresponding to the workpiece A1 to be processed, and sequentially obtain multiple images whose image contents completely include the pre-cleaning area C1 from images B1, B2, ..., Bb, and re-label them as D1, D2, ..., Dd, 1≤d≤b;
[0059] S243: Obtain pixel values of all pixels constituting the pre-cleaning area C1 in the image D1 and mark them as E1, E2, ..., Ee in sequence, where e≥1; obtain pixel values of all pixels constituting the pre-cleaning area C1 in the image D2 and mark them as F1, F2, ..., Fe in sequence;
[0060] It should be noted here that the obtained pixel values E1 and F1, E2 and F2, ..., Ee and Fe correspond to each other, that is, the positions of two corresponding pixel points on the pre-cleaning area C1 are consistent;
[0061] S244: Utilize formula ,g=1, 2, ..., e calculates and obtains the pixel values E1 and F1, E2 and F2, ..., Ee and Fe, and the pixel proportions G1, G2, ..., Ge;
[0062] S245: If the pixel proportions G1, G2, ..., Ge meet the post-determination condition: the difference between any two pixel proportions is less than P1, then the image D1 is temporarily used as the post-tracing image, where P1 is a preset post-pixel difference threshold; otherwise, the image D2 is temporarily used as the post-tracing image;
[0063] S246: According to S242 to S245, the pixel ratios of all pixel values constituting the pre-cleaning area C1 in the post-tracing image and the image D3 are calculated, and it is determined whether the post-tracing condition is satisfied. Based on the determination result, it is determined whether to update the post-tracing image. That is, if the post-tracing condition is satisfied, the post-tracing image is still the image 1 and is not updated. If it is not satisfied, the post-tracing image is temporarily updated to the image 3.
[0064] S247: According to S246, in the order of images D3, D4, ..., Dd, the pixel ratios of all pixel values constituting the pre-cleaning area C1 in the post-tracing image and the images D3, D4, ..., Dd are sequentially determined to determine whether they meet the post-tracing condition, and based on the determination result, the final post-tracing image is updated;
[0065] Obtain the interval between the shooting time corresponding to the final post-tracing image and the tracing time of the workpiece A1 to be processed, and mark it as the post-tracing time of the workpiece A1 to be processed;
[0066] S25: Calculate and obtain the leading traceability time of the workpiece A1 to be processed according to the preset leading calculation rule, as follows:
[0067] S251: Obtain all images whose shooting time is before the tracing time of the workpiece A1 to be processed from all frame images constituting the video monitoring data, and mark these images as H1, H2, ..., Hh in order from far to near according to the order of the shooting time corresponding to these images from the current time, where h≥1;
[0068] S252: sequentially obtain multiple images whose image contents completely include the pre-cleaned area C1 from the images H1, H2, ..., Hh, and re-label them as I1, I2, ..., Ii, 1≤i≤h;
[0069] S253: Obtain pixel values J1, J2, ..., Je of all pixel points constituting the pre-cleaning area C1 in the image I1;
[0070] Obtain pixel values K1, K2, ..., Ke of all pixels constituting the pre-cleaning area C1 in the image I2;
[0071] It should be noted here that the obtained pixel values J1 and K1, J2 and K2, ..., Je and Ke correspond to each other;
[0072] S254: Calculate and obtain pixel proportions L1, L2, ..., Le of pixel values J1 and K1, J2 and K2, ..., Je and Ke using the same calculation formula as S244;
[0073] S255: If the pixel proportions L1, L2, ..., Le meet the pre-determination condition: the difference between any two pixel proportions is less than P2, then the image I2 is temporarily used as the pre-tracing image, otherwise, the image I1 is used as the final pre-tracing image, and P2 is the preset pre-pixel difference threshold;
[0074] If in S255, image I2 is temporarily used as the pre-tracing image, then the pixel ratios of the pre-tracing image and all pixel values constituting the pre-cleaning area C1 in the images I3, I4, ..., I5 are calculated in sequence, and it is determined whether the pre-tracing condition is met, so as to obtain the final pre-tracing image;
[0075] Obtain the interval between the shooting time corresponding to the final preceding traceability image and the traceability time of the workpiece A1 to be processed, and mark it as the preceding traceability time of the workpiece A1 to be processed;
[0076] S26: According to S22 to S26, the leading traceability time of the workpieces A1, A2, ..., Aa to be processed is calculated in sequence and their averages are calculated by using the addition and averaging formula, and the averages are recalibrated as the leading traceability time of the workpiece to be processed based on the defect to be processed;
[0077] The post-tracing time of the workpieces A1, A2, ..., Aa to be processed is calculated in sequence and the average is calculated using the addition and averaging formula, which is recalibrated as the post-tracing time of the workpiece to be processed based on the defect to be processed;
[0078] S27: all weld defects corresponding to the workpiece to be processed are selected in sequence as defects to be processed, and the pre-backtracking time and post-backtracking time of the workpiece to be processed based on all the weld defects corresponding to the workpiece to be processed are calculated in sequence according to S22 to S26, and a workpiece backtracking table of the workpiece to be processed is generated based on the pre-backtracking time and post-backtracking time of the workpiece to be processed;
[0079] The workpiece backtracking table of the workpiece to be processed includes a specification field, a weld defect type field, a pre-backtracking duration field, and a post-backtracking duration field, wherein the specification field stores the specifications of the workpiece to be processed, the weld defect type field stores all weld defects corresponding to the workpiece to be processed, and the pre-backtracking duration field and the post-backtracking duration field respectively store the pre-backtracking duration and the post-backtracking duration of the workpiece to be processed based on all weld defects;
[0080] S28: selecting all kinds of workpieces as workpieces to be processed in sequence according to S21 to S27, and calculating and obtaining their workpiece backtracking tables;
[0081] The analysis and processing module transmits the workpiece backtracking table of all workpieces to the backtracking interception unit for updating and storage;
[0082] In the description of the specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0083] The above contents are merely examples and explanations of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the invention or exceed the scope defined by the claims, they shall all fall within the protection scope of the present invention.
[0084] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A weld defect recognition and classification method based on machine vision, characterized in that: The following steps are involved: Step 1: After the welding of the current workpiece is completed, the welding video data thereof is collected by the welding monitoring module; Step 2: The weld defect recognition module inputs the received transmitted welding video data of the current workpiece into the weld defect recognition model to obtain the defect recognition result data of the current workpiece, wherein the defect recognition result data of the current workpiece includes a defect recognition signal, and the defect recognition signal is a number "1" or "0", "1" means that the weld defect is recognized, and "0" means that the weld defect is not recognized; Step 3: The weld defect recognition module determines whether the defect recognition signal in the current workpiece defect recognition result data is "0" or "1", and based on the determination result, selects whether to transmit the current workpiece defect recognition result data and welding video data to the retrospective interception unit or the classification storage module; Step 4: If the backtracking interception unit receives the transmitted current workpiece defect recognition result data and welding video data, it intercepts the cleaned reference video data from the current workpiece welding video data according to the preset backtracking interception rule; Step 5: The repair strategy generation unit inputs the received cleaning reference video data of the current workpiece into the cleaning strategy generation model to obtain a cleaning strategy corresponding to the current workpiece, wherein the cleaning strategy corresponding to the current workpiece includes a pre-cleaning area of the current workpiece and a corresponding cleaning method; The analysis and processing module analyzes and processes the welding video data, defect recognition result data and pre-cleaning area of all workpieces whose defect recognition signals are "1" in the past according to the preset analysis and processing steps, as follows: S21: firstly, a workpiece of a specification is selected as the workpiece to be processed, and a weld defect corresponding to the workpiece to be processed is selected as the defect to be processed; S22: Obtain all workpieces to be processed that are identified as defects to be processed within a processing cycle, and mark them as A1, A2, ..., Aa in sequence, where a≥1; S23: acquiring the shooting time corresponding to the first frame of the image from the defect annotation video data constituting the workpiece A1 to be processed, and marking it as the tracing time of the workpiece A1 to be processed; S24: Calculate and obtain the post-processing traceability time of the workpiece A1 to be processed according to the preset post-processing rule; S25: Calculate and obtain the leading traceability time of the workpiece A1 to be processed according to the preset leading rule; S26: According to S22 to S26, the leading traceability time of the workpieces A1, A2, ..., Aa to be processed is calculated in sequence and their averages are calculated by using the addition and averaging formula, and the averages are recalibrated as the leading traceability time of the workpiece to be processed based on the defect to be processed; The post-tracing time of the workpieces A1, A2, ..., Aa to be processed is calculated in sequence and the average is calculated using the addition and averaging formula, which is recalibrated as the post-tracing time of the workpiece to be processed based on the defect to be processed; S26: all weld defects corresponding to the workpiece to be processed are selected in sequence as defects to be processed, and the pre-backtracking time and post-backtracking time of the workpiece to be processed based on all the weld defects corresponding to the workpiece to be processed are calculated in sequence according to S22 to S25, and a workpiece backtracking table of the workpiece to be processed is generated based on the pre-backtracking time and post-backtracking time of the workpiece to be processed; S27: According to S21 to S26, all kinds of workpieces are selected in sequence as workpieces to be processed, and their workpiece backtracking tables are obtained by calculation.
2. The method for identifying and classifying weld defects based on machine vision according to claim 1, characterized in that: In the above step three, if the defect recognition signal in the current workpiece defect recognition result data is "1", the current workpiece defect recognition result data and welding video data are transmitted to the retrospective interception unit, otherwise, they are transmitted to the classification storage module for storage.
3. The method for identifying and classifying weld defects based on machine vision according to claim 1, characterized in that: The classification storage module stores the welding video data, defect recognition result data and pre-cleaning area of all workpieces whose defect recognition signals are "1" in the past.
4. The method for identifying and classifying weld defects based on machine vision according to claim 1, characterized in that: When the defect recognition signal is "1", the defect recognition result data output by the weld defect recognition model also includes defect standard video data and weld defect type.
5. The method for identifying and classifying weld defects based on machine vision according to claim 3, characterized in that: The classification storage module classifies the welding video data, defect recognition result data and pre-cleaning area of all workpieces whose defect recognition signals were "1" in the past according to the weld defect types contained in the defect recognition result data.
6. The method for weld defect recognition and classification based on machine vision according to claim 1, characterized in that: In S24, the preset post-positioning rule for calculating the post-positioning tracing time of the workpiece A1 to be processed is specifically as follows: S241: Obtain all images whose shooting time is after the tracing time of the workpiece A1 to be processed from all the frame images constituting the video monitoring data of the workpiece A1 to be processed, and mark these images as B1, B2, ..., Bb in order from far to near according to the order of the shooting time corresponding to these images from the current time, where b≥1; S242: Obtain the pre-cleaning area C1 corresponding to the workpiece A1 to be processed, and sequentially obtain multiple images whose image contents completely include the pre-cleaning area C1 from images B1, B2, ..., Bb, and re-label them as D1, D2, ..., Dd, 1≤d≤b; S243: Obtain pixel values of all pixels constituting the pre-cleaning area C1 in the image D1 and mark them as E1, E2, ..., Ee in sequence, where e≥1; obtain pixel values of all pixels constituting the pre-cleaning area C1 in the image D2 and mark them as F1, F2, ..., Fe in sequence; S244: Utilize formula ,g=1, 2, ..., e calculates and obtains the pixel values E1 and F1, E2 and F2, ..., Ee and Fe, and the pixel proportions G1, G2, ..., Ge; S245: If the pixel proportions G1, G2, ..., Ge meet the post-determination condition: the difference between any two pixel proportions is less than P1, then the image D1 is temporarily used as the post-tracing image, where P1 is a preset post-pixel difference threshold; otherwise, the image D2 is temporarily used as the post-tracing image; S246: According to S242 to S245, the pixel ratios of all pixel values constituting the pre-cleaning area C1 in the post-tracing image and the image D3 are calculated, and it is determined whether the post-tracing condition is satisfied. Based on the determination result, it is determined whether to update the post-tracing image; S247: According to S246, in the order of images D3, D4, ..., Dd, the pixel ratios of all pixel values constituting the pre-cleaning area C1 in the post-tracing image and the images D3, D4, ..., Dd are sequentially determined to determine whether they meet the post-tracing condition, and based on the determination result, the final post-tracing image is updated; The interval between the shooting time corresponding to the final post-tracing image and the tracing time of the workpiece A1 to be processed is obtained, and is calibrated as the post-tracing time of the workpiece A1 to be processed.
7. The method for identifying and classifying weld defects based on machine vision according to claim 1, characterized in that: The preset backtracking interception rules for intercepting the cleanup reference video data from the current workpiece welding video data are as follows: S11: based on the weld defect type of the workpiece, obtaining the corresponding pre-backtracking time M1 and post-backtracking time M2; S12: Obtaining the shooting time corresponding to the first frame of the image from the defect annotation video data constituting the workpiece, and marking it as the backtracking reference time of the workpiece; S13: Based on the preceding backtracking time length M1 and the post-backtracking time length M2 corresponding to the workpiece, and according to the backtracking reference time of the workpiece, a section of video data is intercepted from the welding video data of the workpiece, and the intercepted section of video data is used as the cleaning reference video data of the workpiece.
Citation Information
Patent Citations
Video detection method and device
CN101894251A
Connector welding intelligent supervision system based on artificial intelligence
CN117548911A
Cited By
A desoldering detection method based on unmanned aerial vehicle (UAV) acquisition of photovoltaic module images
CN118657784B
