CN116593475A - YOLOv 5-based motor car part welding crack detection system and method - Google Patents

YOLOv 5-based motor car part welding crack detection system and method Download PDF

Info

Publication number
CN116593475A
CN116593475A CN202310622825.6A CN202310622825A CN116593475A CN 116593475 A CN116593475 A CN 116593475A CN 202310622825 A CN202310622825 A CN 202310622825A CN 116593475 A CN116593475 A CN 116593475A
Authority
CN
China
Prior art keywords
motor car
parts
yolov
welding crack
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310622825.6A
Other languages
Chinese (zh)
Inventor
曾勇
杨冲
乔辉
徐仟祥
卢倩
赵雪雅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yancheng Institute of Technology
Yancheng Institute of Technology Technology Transfer Center Co Ltd
Original Assignee
Yancheng Institute of Technology
Yancheng Institute of Technology Technology Transfer Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yancheng Institute of Technology, Yancheng Institute of Technology Technology Transfer Center Co Ltd filed Critical Yancheng Institute of Technology
Priority to CN202310622825.6A priority Critical patent/CN116593475A/en
Publication of CN116593475A publication Critical patent/CN116593475A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/01Arrangements or apparatus for facilitating the optical investigation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/91Investigating the presence of flaws or contamination using penetration of dyes, e.g. fluorescent ink
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N27/00Investigating or analysing materials by the use of electric, electrochemical, or magnetic means
    • G01N27/72Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating magnetic variables
    • G01N27/82Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating magnetic variables for investigating the presence of flaws
    • G01N27/83Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating magnetic variables for investigating the presence of flaws by investigating stray magnetic fields
    • G01N27/84Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating magnetic variables for investigating the presence of flaws by investigating stray magnetic fields by applying magnetic powder or magnetic ink
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/01Arrangements or apparatus for facilitating the optical investigation
    • G01N2021/0181Memory or computer-assisted visual determination

Landscapes

  • Chemical & Material Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a welding crack detection system and method for motor car parts based on YOLOv5, wherein the detection system comprises a computer, a controller, a suspension type conveying device, a magnetic powder inspection device and a visual detection device; in the invention, when the magnetic powder suspension spraying device and the magnetizing device spray and magnetize the parts, the camera scans and photographs the surfaces and the end surfaces of the parts; the part is driven by the annular bracket to rotate for each rotation setting angle to pause; identifying the welding crack defect of the part by using a YOLOv5 detection method, and judging whether the welding crack has the defect or not; the lifting roller platform lifts the parts, the magnetizing device demagnetizes the parts, and after the cleaning device cleans the parts, the rollers of the lifting roller platform are controlled by the stepping motor to stop rotating, and the lifting roller platform distributes the parts to the qualified or unqualified track. The invention overcomes the defect that the existing fluorescent magnetic powder detection technology is difficult to separate welding cracks from normal welding lines because manual observation is needed for detecting the motor car wire support.

Description

YOLOv 5-based motor car part welding crack detection system and method
Technical Field
The invention relates to image detection equipment and method, in particular to a welding crack detection system and method for a motor car part based on YOLOv 5.
Background
The transportation of the motor car plays an indispensable role in life, and the magnetic powder inspection technology has a long history in the field for the production quality inspection, the use and the maintenance of the motor car wire bracket. The motor car wire support is an important irregular metal part.
The existing magnetic particle inspection and detection equipment can only realize semi-automatic detection, and detection personnel are required to participate all the time, and the detection steps are as follows: 1. the method comprises the steps of workpiece pretreatment, workpiece magnetization, workpiece surface spraying of magnetic suspension, manual visual observation, workpiece demagnetization and post-treatment. Different customized clamps are required to be purchased for different irregular detected articles, so that the use cost is increased, and the automatic detection difficulty is improved.
For fluorescent magnetic powder detection, in order to fully exert fluorescent effect, ultraviolet intensity is required to be not lower than 800 mu w/cm in darkroom environment 2 The detection is carried out under the environment of (1), and the working environment is not friendly to detection personnel, and the detection personnel is easy to visually fatigue. Because the magnetic powder inspection needs to rely on experience and skill of operators, if the operation is improper or experience of detection personnel is insufficient, conditions such as missed detection, misjudgment and the like can occur, so that accuracy of detection results and detection efficiency are affected.
The existing magnetic particle inspection machine has the following defects in working:
(1) Relying on manual manipulation results in the operator's skill level and experience affecting the test results, and also increases the risk of human error. The detection results are different because of different detection personnel.
(2) Only applicable to magnetic materials: the magnetic particle inspection machine is mainly used for detecting defects in magnetic materials and has poor detection effect on non-magnetic materials. Therefore, in the case where it is necessary to detect a non-magnetic material, the magnetic particle inspection machine may not provide accurate results.
(3) Surface cleanliness is dependent: the magnetic particle inspection machine requires cleaning of the surface of the object to be inspected to ensure that magnetic particles are sufficiently adhered to the defect, thereby achieving effective inspection. If dirt, coating or grease is present on the surface, this will affect the detection result or lead to erroneous interpretation.
(4) The detection speed is slower: the inspection speed of the magnetic particle inspection machine is relatively slow compared to some non-contact nondestructive inspection methods. This is due to the need for dusting, cleaning, etc. steps and the need for individual inspection of each object under test. The magnetic particle inspection requires separate processing of each inspected object, and thus requires a lot of time and labor costs. Meanwhile, when a large-area workpiece is detected, the efficiency is limited. Meanwhile, manual visual observation cannot meet the use requirements of a large number of production detection scenes of the motor car wire brackets and detection environment standards. Therefore, a method and a system for detecting welding cracks and magnetic powder of a motor car wire bracket are needed to realize automatic detection.
Disclosure of Invention
The invention aims to: aiming at the defects that the existing fluorescent magnetic powder detection technology is used for detecting the motor car wire support and manual visual observation is needed and the separation of welding cracks and normal welding lines is difficult, the invention provides a motor car part welding crack magnetic powder detection system and method based on YOLOv5, and the distinguishing identification and automatic detection of the motor car wire support welding cracks are realized.
The technical scheme is as follows: the invention discloses a welding crack detection system of a motor car part based on YOLOv5, which comprises a computer, a controller, a suspension type conveying device, a magnetic powder inspection device and a visual detection device, wherein the controller is used for controlling the magnetic powder inspection device to detect the welding crack of the motor car part;
the suspension type conveying device comprises a chain, a sliding frame, an annular bracket, an overhead rail, a driving device, a turnout and a photoelectric sensor; the driving device is connected through a chain, and the turnout steers the carriage;
the magnetic powder inspection device comprises a cleaning device, a magnetic powder suspension spraying device, a lifting roller platform and a magnetizing device; the lifting roller platform bears and rotates the annular bracket;
the vision detection device comprises a camera, an LED black light lamp and a detection lens, wherein the detection lens transmits light reflected by the part to a photosensitive element of the camera.
The welding crack detection method for the motor car part based on the YOLOv5 comprises the following steps:
(1) Fixing the parts in the annular bracket, sending an instruction by the controller, driving the annular bracket by the driving device through a chain, conveying the parts to the magnetic powder inspection device, and judging whether the parts are in place by the photoelectric sensor;
(2) The photoelectric sensor receives the position signal and feeds back to the controller to stop the driving device, and the lifting roller platform pushes the annular support by the air cylinder; the roller on the lifting roller platform is rotated by a stepping motor to drive the annular bracket to rotate; the magnetizing device generates an electromagnetic field to demagnetize the parts, and the cleaning device cleans the parts;
(3) After the magnetic powder suspension spraying device and the magnetizing device spray and magnetize the parts, cameras distributed on the parts emit ultraviolet rays to scan and photograph the surfaces and the end surfaces of the parts; the part is driven by the annular bracket to rotate for every rotation setting angle to pause, and photographing is repeated until stopping; identifying the defects of the welding cracks of the parts by using a YOLOv5 target detection method, judging whether the welding cracks in the image have defects or not, and feeding back the result to the controller;
(4) Lifting the part by the lifting roller platform, demagnetizing the part by the magnetizing device, and stopping rotating the roller of the lifting roller platform under the control of the stepping motor after the part is cleaned by the cleaning device, wherein the lifting roller platform is controlled to descend by the air cylinder; the parts are distributed to pass or fail tracks via switches of a suspended conveyor.
In the step (3) of the welding crack detection method of the motor car part based on YOLOv5, the intensity of ultraviolet rays emitted by the LED black light lamp is not lower than 800 mu w/cm 2
The judging process of the step (3) is as follows: (3.1) data preprocessing; (3.2) feature extraction; (3.3) feature fusion; (3.4) bounding box prediction; (3.5) non-maximum suppression.
The data preprocessing in the step (3.1) is to perform clipping and scaling preprocessing operation on the input image.
The feature extraction process in the step (3.2) is to extract features from the image by using a convolutional neural network, so as to obtain a high-dimensional feature vector.
And (3.3) fusing the characteristics in the step (3) to fuse the characteristic graphs of different layers to obtain the characteristic representation.
The process of bounding box prediction in step (3.4) is to predict the position and size of each target bounding box based on the feature vector and give a probability distribution of the belonging class.
In the step (3.5), the non-maximum value suppression process is to reserve the bounding box with the highest confidence for the overlapped bounding box, remove the redundant result and output the detection result.
In step (3.5), YOLOv5 identifies the crack in the part weld crack photograph and outputs the crack location, size and confidence information.
Working principle: the invention relates to a welding crack detection method of a motor car part based on YOLOv5, which is based on the principle that CSPDarknet-53 of a back bond layer in YOLOv5 is replaced by SheffeNet-v 2, and an A2-Nets (AttentionAugmentedConvolutionalNetworks) attention module is added on the basis. The mish activation function is replaced by a lightweight Hardswish activation function, and the method is combined with a FocalLoss loss function, so that the network is ensured to pay attention to small targets better, the accuracy of detection tasks of the small targets is improved, and the whole network structure is shown in figure 6.
The SheffeNet-v 2 is an efficient lightweight convolutional network architecture design, and the network structure comprises Conv1, maxPool, stage2, stage3, stage4, conv5 and GlobalPool. The basic unit structure of the SheffleNet-v 2 is shown in FIG. 7, where DWConv is a deep convolution. GConv is a group convolution. The start Outputsize parameter is 224×224. The output is changed to 112×112 by Conv1 step, the output is changed to 56×56 by MaxPol step, the Ksize is 3×3, and the stride steps are 2. The step Outputsize was changed to 28X 28, the Stride length was 2 and 28X 28, and the Stride length was 1 through Stage 2. The step Outputsize is changed to 14×14, the Stride length is 2 and 14×14, and the Stride length is 1 through Stage 3. The output putsize was changed to 7×7 by Stage4, 7×7 by Conv5, and the ksize cell size was 1×1. The output size was 1×1 and the ksize size was 7×7 by GlobalPool procedure.
The A2-Net attention module adopted by the invention is a dual attention network. The network first uses Second order attention pooling (Second-orderAttentionPooling, SAP) to group all key features of the entire graph into one set, and then applies these features to each region in the image separately using another attention mechanism. The network structure is shown in fig. 4.
The Hardswick activation function is used to add non-linear factors to increase the expressive power of the network. The Focal Loss function is used to calculate the deviation of the predicted and actual values in each sample.
Taking a motor car wire bracket as an example when detecting a part, firstly acquiring photo data of a part welding crack, and dividing the data into a training set and a verification set; and put forward a training set based on YOLOv5 improved algorithm to train, distinguish with the normal welding line background, carry on the accurate detection to weld the crack; and continuously iterating to reduce the loss function, predicting the verification set by using the training model, and ending training after the loss function converges to the optimal model. The annular support with the gears is used for fixing the parts in the annular support, the annular support is driven to be transported through the suspension type transport mechanism, and the annular support is rotated through the lifting roller platform, so that the omnibearing detection of the motor car wire support is realized. Images are collected on the surface of the motor car part in a partitioning mode, and crack positioning is facilitated. Finally, the automation of magnetic powder detection of the welding cracks of the parts is realized.
The beneficial effects are that: compared with the prior art, the invention has the following advantages:
(1) According to the invention, by means of an improved target detection algorithm based on YOLOv5 and matching with the mechanical device, automatic detection of welding cracks of fluorescent magnetic powder of motor car parts such as wire brackets is realized. The detection personnel can be helped to quickly and accurately find the crack position by collecting the cracks of the motor car part such as the wire bracket in a partitioning manner.
(2) Compared with semi-automatic equipment and visual detection, the invention has the advantages of high detection efficiency, unified detection standard and digitized detection result. The invention reduces the demand on calculation force and the cost of the magnetic particle inspection machine, and improves the detection precision.
Drawings
FIG. 1 is a flowchart of a welding crack detection method for a motor car part based on YOLOv 5;
FIG. 2 is an overall schematic diagram of a welding crack detection system for motor car parts based on YOLOv5 of the present invention;
FIG. 3 is a schematic view of the structure of a ring support in the detection system of the present invention;
FIG. 4 is a diagram of a network structure of an A2-Net attention mechanism used in the detection method of the present invention;
FIG. 5 is a graph showing the comparison of the collected recognition results before (left row) and after (right row);
FIG. 6 is a schematic diagram of an improved Yolov5 target detection algorithm of the present invention;
FIG. 7 is a cut-out basic unit of a SheffeNet-v 2 network of the present invention;
fig. 8 is a graph showing the comparison of weld crack detection accuracy according to the present invention.
Detailed Description
As shown in fig. 1 to 8, in the embodiment of the present invention, a motor car wire support is taken as an example for detection. The invention discloses a YOLOv 5-based motor car part welding crack magnetic powder detection system which comprises an industrial computer, a PLC (programmable logic controller) 1, a suspension type conveying device 2, a magnetic powder inspection device 3 and a visual detection device 4. The industrial computer is used as a system upper computer, is connected with the PLC controller 1 through a TCP/IP protocol, and is used as a carrier of the motor car wire support welding crack magnetic powder detection method based on YOLOv 5.
The PLC controller 1 is connected with the suspension type conveying device 2, the magnetic particle inspection device 3 and the visual inspection device 4 through an IO control bus.
The suspension type conveying device 2 comprises a chain 2-1, a sliding frame 2-2, an annular bracket 2-3, an overhead rail 2-4, a driving device 2-5, a turnout 2-6 and a photoelectric sensor 2-7. The chain 2-1 is a connecting device between the driving device 2-5 and the sliding frame 2-2, and is used for transmitting the kinetic energy of the driving device 2-5 to the sliding frame 2-2. The carriage 2-2 is a connection device between the chain 2-1 and the ring support 2-3. The annular support 2-3 is used as a fixer of the motor car wire support, so that the irregular motor car wire support is fixed and held. The overhead rail 2-4 is used to carry a chain 2-1. The driving device 2-5 drives the chain 2-1 according to the instruction of the PLC controller 1 to provide power for the annular bracket 2-3 of the loading container for conveying the wire bracket of the motor car. The turnout 2-6 steers the sliding frame 2-2, and plays a role in distinguishing motor car wire brackets with different detection results. The photoelectric sensor 2-7 plays a role in positioning the annular bracket 2-3.
The magnetic powder inspection device 3 comprises a cleaning device 3-1, a magnetic powder suspension spraying device 3-2, a lifting roller platform 3-3 and a magnetizing device 3-4. The cleaning device 3-1 sprays high-pressure water flow to clean the motor car wire support, so that the motor car wire support can obtain a clean surface without attachments. The magnetic powder suspension spraying device 3-2 sprays fluorescent magnetic powder suspension on the surface of the magnetized electric wire bracket of the motor car, and as the defect of the electric wire bracket of the motor car, magnetic leakage can be accumulated, so that the effect of highlighting cracks is achieved.
The lifting roller platform 3-3 is used for bearing and rotating the annular bracket 2-3, the roller is rotated by a stepping motor controlled by the PLC controller 1, limiting rings are arranged at two ends of the roller to limit the horizontal displacement of the annular bracket, and the lifting platform is pushed by a telescopic cylinder controlled by the PLC controller 1. The magnetizing device 3-4 is used for magnetizing the motor car wire support.
The visual inspection device 4 comprises an industrial camera 4-1, an LED black light lamp 4-2 and an inspection lens 4-3. The function of the industrial camera 4-1 is to acquire images of motor car wire support defects and to provide image data for algorithmic recognition. The model of the global CMOSS color industrial camera of the GigE gigabit network is MER2-160-75GM by adopting 160 ten thousand pixel CCD visual detection of a large constant image water star. The LED black light lamp 4-2 plays a role of highlighting the fluorescent magnetic powder display effect, thereby highlighting the defect crack. The function of the detection lens 4-3 is to transfer the light reflected from the motor car wire support to the photosensitive element of the industrial camera 4-1. The model of the detection lens 4-3 is ZX-SF0814B, and the detection lens is a fixed-focus 16mm detection lens.
The method for acquiring the image of the motor car wire bracket comprises the following steps: in the process of acquiring the welding seam crack image of the electric wire support of the electric car by the industrial camera 4-1, the roller of the lifting roller platform 3-3 drives the annular support 2-3 to rotate through the gear, and the posture of the electric wire support of the electric car is adjusted, so that the automatic omnibearing photo acquisition of the electric wire support of the electric car is realized.
In the process of acquiring images of the motor car wire support, 2 CCD industrial cameras 4-1 distributed above the motor car wire support, and the intensity of ultraviolet rays radiated by the LED black light lamp 4-2 is not lower than 800 mu w/cm 2 And (3) scanning and photographing the upper surface of the electric wire bracket of the motor car. And 2 CCD industrial cameras 4-1 distributed on two sides scan and photograph two end surfaces of the motor car wire support under the light environment of the LED black light lamp 4-2. After the scanning photographing is finished, the lifting roller platform 3-3 is lifted by the air cylinder controlled by the PLC controller 1, the annular bracket 2-3 is lifted, the stepping motor controlled by the PLC controller 1 drives the roller of the lifting roller platform 3-3 through the gear, the roller drives the annular bracket 2-3 to rotate through the gear, the scanning photographing is repeated after the roller is suspended for 0.3s every 45 degrees of rotation. And stopping and ending scanning and photographing the motor car wire bracket when the motor car wire bracket rotates for the 8 th time. The pictures shot by 2 CCD industrial cameras 4-1 which are distributed above the motor car wire support twice in each rotation are two angles of the same surface, and the pictures are divided into a detection area. A motor car wire support is divided into A, B, C, D and totally 4 areas, 2 CCD industrial cameras 4-1 are distributed on two sides, pictures shot by the left CCD industrial camera are E areas, pictures shot by the right CCD industrial camera are F areas, and cracks are conveniently found after detection is finished.
The welding crack detection method of the motor car part based on YOLOv5 comprises the following steps:
(1) The inspector fixes the motor car parts, such as motor car wire brackets, in the annular bracket 2-3 through the telescopic threaded connecting rod in the annular bracket 2-3. The PLC controller 1 sends a starting instruction, the driving device 2-5 drives the annular support 2-3 through the chain 2-1, the motor car wire support is transmitted to the magnetic particle inspection device 3, and the photoelectric sensor 2-7 judges whether the motor car wire support is in place or not.
(2) The photoelectric sensor 2-7 receives the bit signal and feeds back to the PLC controller 1 to stop the driving device 2-5, and the lifting roller platform 3-3 is pushed by a cylinder controlled by the PLC controller 1 to lift the annular support 2-3. The rollers on the lifting roller platform 3-3 are rotated by a stepping motor controlled by the PLC controller 1 to drive the two annular brackets to rotate at a constant speed of 0.79rad/s through gears. The magnetizing device 3-4 generates an electromagnetic field to demagnetize the motor car wire support, and the cleaning device 3-1 sprays high-pressure water flow to clean the motor car wire support, so that the motor car wire support obtains a surface without attachments.
(3) The magnetic powder suspension spraying device 3-2 and the magnetizing device 3-4 spray and magnetize the motor car wire bracket. After magnetization for 3 seconds, 2 CCD industrial cameras 4-1 distributed above the motor car wire support emit ultraviolet rays with the intensity not lower than 800 mu w/cm under the illumination of an LED black light lamp 4-2 2 And under the environment, scanning and photographing the upper surface of the motor car wire support. 2 CCD industrial cameras 4-1 distributed on two sides start to scan and photograph two end faces of the motor car wire support under the illumination environment of the LED black light lamp 4-2. After each photographing is completed, the motor car wire support is driven by the annular support to rotate for every 45 degrees to pause for 0.3s, and the scanning photographing is repeated. And stopping and ending scanning and photographing the motor car wire bracket when the motor car wire bracket rotates for the 8 th time.
All scanned image information is transmitted to an industrial computer in real time through Ethernet, and the improved YOLOv5 target detection algorithm realizes automatic identification of welding crack defects of the wire support of the motor car. Judging whether the welding crack in the image has a defect or not, and returning the result to the controller; the judging process comprises the following steps: (3.1) data preprocessing: and (3) performing clipping and scaling preprocessing operation on the input image so as to adapt to the input requirement of the model. (3.2) feature extraction: and extracting features from the image by using a convolutional neural network CNN to obtain a high-dimensional feature vector. (3.3) feature fusion: and fusing the feature graphs of different layers to obtain richer feature representations. (3.4) bounding box prediction: based on the feature vectors, the position and size of each target bounding box are predicted, and the probability distribution of the category to which the target bounding box belongs is given. (3.5) non-maximum suppression: and for the overlapped bounding boxes, only the one with the highest confidence coefficient is reserved, redundant results are removed, and detection results are output.
Wherein, the pretreatment in the step (3.1): first, the input image is resized to a specific size (640 x 640) and converted to a tensor format for computer processing. Then, it is normalized, noise removed and accuracy increased. The current data enhancement method mainly comprises the operations of translation, rotation and scaling basic transformation, and the method adds distortion transformation and smearing transformation, so that more abundant and challenging training data are generated, and the robustness of the model is improved.
(3.2) feature extraction: YOLOv5 uses CSPNet (CrossStagePartialNetwork) as a backbone network for feature extraction. The CSPNet structure is mainly composed of two parts: CSPDarknet53 and SPP. The innovation point of this step is: the invention proposes to replace CSPDarknet-53 of the back bond layer in YOLOv5 with SheffeNet-v 2 and add an A2-Nets (AttentionAugmented ConvolutionalNetworks) attention module on the basis. So that the model obtains better performance under fewer parameters.
For the motor car wire rack welding crack photograph, YOLOv5 uses a predefined anchor frame to match the feature map to detect objects. Each anchor box represents a box of a particular size and shape for predicting the position and size of the object.
If YOLOv5 detects that two boxes overlap, they are combined into a single box using a non-maximum suppression (NMS) algorithm. In this photograph, YOLOv5 would merge two cars into one box if they overlap.
Finally, YOLOv5 outputs all objects detected as a list containing all object categories, location, confidence, etc. information. In the motor car wire-holder welding crack photograph, YOLOv5 recognizes the cracks and outputs information of their position, size, confidence, and the like.
As shown in FIG. 8, after the YOLOv5 target detection algorithm is improved and compared in precision, the detection precision mAP_0.5 is improved from 58.02% to 64.83%, and experimental results show that the method and the device improve the recognition precision and accuracy, are flexibly applicable to more application scenes, reduce the calculation force requirement and the use cost, and shorten the detection time.
(4) After the judgment is finished, the motor car wire support is still lifted by the lifting roller platform 3-3, the magnetizing device 3-4 demagnetizes the motor car wire support, and then the cleaning device 3-1 sprays high-pressure water flow to clean the motor car wire support. After demagnetization and cleaning are finished, the roller of the lifting roller platform 3-3 stops rotating by the stepping motor controlled by the PLC controller 1, and the lifting roller platform 3-3 descends under the control of the air cylinder controlled by the PLC controller 1. Are distributed to different tracks via switches 2-6 of the suspended conveyor 2. And (3) judging that the 'OK' motor car wire support is conveyed to the qualified product track, and judging that the 'NG' motor car wire support device is conveyed to the unqualified product track.

Claims (10)

1. YOLOv 5-based motor car part welding crack detection system is characterized in that: comprises a computer, a controller (1), a suspension type conveying device (2), a magnetic particle inspection device (3) and a visual inspection device (4);
the suspension type conveying device (2) comprises a chain (2-1), a sliding frame (2-2), an annular bracket (2-3), an overhead track (2-4), a driving device (2-5), a turnout (2-6) and a photoelectric sensor (2-7); the driving device (2-5) is connected through a chain (2-1), and the turnout (2-6) turns the sliding frame (2-2);
the magnetic particle inspection device (3) comprises a cleaning device (3-1), a magnetic particle suspension spraying device (3-2), a lifting roller platform (3-3) and a magnetizing device (3-4); the lifting roller platform (3-3) carries and rotates the annular bracket (2-3);
the visual detection device (4) comprises a camera (4-1), an LED black light lamp (4-2) and a detection lens (4-3), and the detection lens (4-3) transmits light reflected by the part to a photosensitive element of the camera (4-1).
2. A welding crack detection method for a motor car part based on YOLOv5 is characterized by comprising the following steps: the method comprises the following steps:
(1) Fixing the parts in an annular bracket (2-3), sending a command by a controller (1), driving the annular bracket (2-3) by a driving device (2-5) through a chain (2-1), conveying the parts to a magnetic powder inspection device (3), and judging whether the parts are in place by a photoelectric sensor (2-7);
(2) The photoelectric sensor (2-7) receives the bit signal and feeds back to the controller (1) to stop the driving device (2-5), and the lifting roller platform (3-3) pushes the annular support (2-3) by the air cylinder; the roller on the lifting roller platform (3-3) is rotated by a stepping motor to drive the annular bracket to rotate; the magnetizing device (3-4) generates an electromagnetic field to demagnetize the parts, and the cleaning device (3-1) cleans the parts;
(3) After the magnetic powder suspension spraying device (3-2) and the magnetizing device (3-4) spray and magnetize the parts, the cameras (4-1) distributed on the parts emit ultraviolet rays to scan and photograph the surfaces and the end surfaces of the parts; the part is driven by the annular bracket to rotate for every rotation setting angle to pause, and photographing is repeated until stopping; identifying the defects of the welding cracks of the parts by using a YOLOv5 target detection method, judging whether the welding cracks in the image have defects or not, and returning the result to the controller;
(4) Lifting roller platform (3-3) lifts the part, magnetizing device (3-4) demagnetizes the part, after cleaning device (3-1) cleans the part, the roller of lifting roller platform (3-3) is controlled by stepping motor to stop rotating, lifting roller platform (3-3) is controlled by cylinder to descend; the parts are distributed to the passing or failing track through the turnout (2-6) of the hanging conveying device (2).
3. The YOLOv 5-based motor car part welding crack detection method of claim 2, wherein the method comprises the following steps: in the step (3), the intensity of ultraviolet rays emitted by the LED black light lamp (4-2) is not lower than 800 mu w/cm 2
4. The YOLOv 5-based motor car part welding crack detection method of claim 2, wherein the method comprises the following steps: the judging process of the step (3) is as follows: (3.1) data preprocessing; (3.2) feature extraction; (3.3) feature fusion; (3.4) bounding box prediction; (3.5) non-maximum suppression.
5. The YOLOv 5-based motor car part welding crack detection method of claim 4, wherein the method comprises the following steps of: the data preprocessing in the step (3.1) is to perform clipping and scaling preprocessing operation on the input image.
6. The YOLOv 5-based motor car part welding crack detection method of claim 4, wherein the method comprises the following steps of: the feature extraction process in the step (3.2) is to extract features from the image by using a convolutional neural network, so as to obtain a high-dimensional feature vector.
7. The YOLOv 5-based motor car part welding crack detection method of claim 4, wherein the method comprises the following steps of: and (3.3) fusing the characteristics in the step (3) to fuse the characteristic graphs of different layers to obtain the characteristic representation.
8. The YOLOv 5-based motor car part welding crack detection method of claim 4, wherein the method comprises the following steps of: the process of bounding box prediction in step (3.4) is to predict the position and size of each target bounding box based on the feature vector and give a probability distribution of the belonging class.
9. The YOLOv 5-based motor car part welding crack detection method of claim 4, wherein the method comprises the following steps of: in the step (3.5), the non-maximum value suppression process is to reserve the bounding box with the highest confidence for the overlapped bounding box, remove the redundant result and output the detection result.
10. The YOLOv 5-based motor car part welding crack detection method of claim 4, wherein the method comprises the following steps of: in step (3.5), YOLOv5 identifies the crack in the part weld crack photograph and outputs the crack location, size and confidence information.
CN202310622825.6A 2023-05-30 2023-05-30 YOLOv 5-based motor car part welding crack detection system and method Pending CN116593475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310622825.6A CN116593475A (en) 2023-05-30 2023-05-30 YOLOv 5-based motor car part welding crack detection system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310622825.6A CN116593475A (en) 2023-05-30 2023-05-30 YOLOv 5-based motor car part welding crack detection system and method

Publications (1)

Publication Number Publication Date
CN116593475A true CN116593475A (en) 2023-08-15

Family

ID=87608098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310622825.6A Pending CN116593475A (en) 2023-05-30 2023-05-30 YOLOv 5-based motor car part welding crack detection system and method

Country Status (1)

Country Link
CN (1) CN116593475A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118243692A (en) * 2024-05-28 2024-06-25 武汉工程大学 Device and method for detecting integrity defect of complex curved surface

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118243692A (en) * 2024-05-28 2024-06-25 武汉工程大学 Device and method for detecting integrity defect of complex curved surface
CN118243692B (en) * 2024-05-28 2024-08-30 武汉工程大学 Device and method for detecting integrity defect of complex curved surface

Similar Documents

Publication Publication Date Title
CN109772724B (en) Flexible detection and analysis system for major surface and internal defects of castings
CN103063572B (en) A kind of online vision detects the system of sorting and dressing method thereof automatically
CN116593475A (en) YOLOv 5-based motor car part welding crack detection system and method
CN110420882B (en) Automatic line system and method for crankshaft magnetic powder inspection based on intelligent manufacturing mode
CN105651782A (en) Engine cylinder cover defect automatic detection equipment based on machine vision
CN103207185A (en) Steel coil end portion quality detection system and method thereof
CN103175847B (en) Grating surface defect detecting device
CN108732148B (en) Online detection device and method for fluorescent magnetic particle inspection
CN108844966A (en) A kind of screen detection method and detection system
CN109142509B (en) Round steel magnetic powder flaw detection method and device
CN113189010B (en) Part detection mechanism based on machine vision and use method thereof
CN104655643A (en) Quality detection system for surface welding process of electronic devices
CN113129304B (en) Part detection method based on machine vision
CN208840024U (en) A kind of positive and negative surface defect detection apparatus of lithium battery pole slice
CN208092793U (en) Detection platform for ceramic layer defects
CN106645185A (en) Method and device for intelligently detecting surface quality of industrial parts
CN116448780A (en) Chip defect detection device, method and equipment
CN111307812A (en) Welding spot appearance detection method based on machine vision
CN111790628A (en) Intelligent production line system for polishing, cleaning, drying, detecting and packaging magnetic sheets
CN108615232B (en) Method, device and platform for detecting defects of porcelain layer
CN111207304B (en) Railway tunnel leaky cable vision inspection device and product positioning detection method
WO2019219955A1 (en) Tube inspection system
CN106990113B (en) Visual inspection device for quality of expansion section of automobile connecting rod blank
CN206146851U (en) Intellectual detection system industrial part surface quality's device
CN116643423A (en) Liquid crystal panel fault detection system and detection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination