Motor assembly defect automatic detection device and method

Through machine vision technology and deep learning algorithms, combined with Doe parameter optimization algorithm, efficient automated detection of motor assembly defects is achieved, solving the problems of low detection efficiency and low accuracy in the existing technology, and improving the efficiency and accuracy of detection.

CN119600006APending Publication Date: 2025-03-11岳阳范斯特机械科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411740408.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The defect detection of existing motor assembly mainly relies on manual visual inspection, resulting in low detection efficiency, low accuracy and influence of personal subjective factors.

Method used

Using machine vision technology and deep learning algorithms, by obtaining color images of motor assembly, using LabelMaster annotation tool for manual annotation, building a DarkNet53 defect detection network model, and optimizing model parameters using Doe parameter optimization algorithm to achieve automated detection.

Benefits of technology

It realizes efficient and automated detection of defects of motor assembly, improves detection efficiency and accuracy, reduces manual intervention, and ensures the consistency and reliability of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600006A_ABST
    Figure CN119600006A_ABST
Patent Text Reader

Abstract

The invention discloses a motor assembly defect automatic detection method, and belongs to the field of motors. The method comprises the steps of obtaining an image, manually marking parts in a motor assembly color image, establishing a motor assembly information identification model by using a deep learning algorithm, optimizing the motor assembly information identification model by using a Doe parameter optimization algorithm, identifying defects in the motor assembly image and the like. The defects of the motor assembly can be automatically detected, an optimization algorithm is used for parameters in the training process, the tedious process of adjusting the parameters is omitted, the model effect reaches an ideal state, an accurate result can be rapidly given through a depth model of the parameter optimization algorithm, and the training efficiency is improved. The invention further discloses a motor assembly defect automatic detection device for implementing the motor assembly defect automatic detection method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motors, and in particular to an automatic detection device and method for defects of a motor assembly. Background Art

[0002] The manufacturing process of motors is complex, and defects may occur in each process. Therefore, defect detection of motor assemblies has become an important part of its production process. The current detection methods are mostly manual visual inspection, which requires high workload, has low accuracy, and personal subjective reasons lead to different product detection results. Therefore, the development of an automated motor assembly detection device has very broad prospects. Summary of the invention

[0003] In order to overcome the deficiencies of the prior art, one of the objectives of the present invention is to provide an automated method for detecting defects of a motor assembly with high detection efficiency and high accuracy.

[0004] In order to overcome the deficiencies of the prior art, a second object of the present invention is to provide an automatic detection device for defects of motor assemblies with high detection efficiency and high accuracy.

[0005] One of the purposes of the present invention is achieved by the following technical solution:

[0006] An automatic detection method for defects of a motor assembly comprises the following steps:

[0007] Acquiring an image: placing the motor assembly on a moving structure, and when the motor assembly moves to below the area array camera, the area array camera takes a photo to collect a color image of the motor assembly;

[0008] Manually labeling the parts in the color image of the motor assembly: resizing the color image, and manually labeling the parts in the motor assembly image using a LabelMaster labeling tool;

[0009] Use deep learning algorithms to establish a motor assembly information recognition model: divide the labeled image data into training sets and validation sets, and build a DarkNet53 defect detection network model;

[0010] Use the Doe parameter optimization algorithm to optimize the motor assembly information recognition model: input the training set and the validation set into the network model for training, select several training parameters, set multiple dimensions for each training parameter, select several groups of different experimental parameters by combining each parameter through the preset Doe orthogonal table, and obtain different experimental return results. Calculate the factor effects of different parameters on this data set through the results of each group of experiments, and obtain a factor response table containing several parameters. Analyze the factor response table. If the numerical value of the factor effect is decreasing, reduce the parameter value. If the numerical value of the factor effect is increasing, increase the parameter value.

[0011] Identify defects in the image of the motor assembly: Use a pt file based on a DarkNet53 deep learning network with optimized parameters to detect the image of the motor assembly, identify part defects in the image, and when a defect is identified, return the position of the defect in the image and output the result to a computer.

[0012] Furthermore, in the step of manually labeling the parts in the color image of the motor assembly, the color image is resized as follows: the size of the original image obtained is 8032×5360, which is adjusted to 416×416.

[0013] Furthermore, in the step of establishing the motor assembly information recognition model using a deep learning algorithm, some images are retained without being labeled as a test set.

[0014] Furthermore, in the step of establishing the motor assembly information recognition model using a deep learning algorithm, the DarkNet53 defect detection network model is built specifically as follows: Darknet, ResNet, and VGG are used as the backbone network for extracting features, and a network is built based on convolutional layers, normalization layers, and activation functions to output the category and location information of the defect.

[0015] Furthermore, building the DarkNet53 defect detection network model also includes: introducing spatial attention mechanism and channel attention mechanism to improve the ability to extract features.

[0016] Furthermore, in the step of optimizing the motor assembly information recognition model using the Doe parameter optimization algorithm, the experimental return results are the recall rate R, the precision rate P and the Map value. The mean y and the variance s of multiple groups of experiments are calculated by the three returned results, and the signal-to-noise ratio S / N of the experiment is calculated by the mean and the variance. The calculation formula of the signal-to-noise ratio is: According to the orthogonal table listed in the implementation, the factor effects of several parameters in multiple dimensions are calculated.

[0017] Furthermore, in the step of identifying defects in the image of the motor assembly, the position of the defect in the image is returned and the result is output to the computer. The result is: the type of defect, the probability of belonging to this defect and the coordinate information of the defect in the image.

[0018] The second object of the present invention is achieved by adopting the following technical solution:

[0019] An automated detection device for defects in a motor assembly is used to implement any one of the automated detection methods for defects in a motor assembly described above. The automated detection device for defects in a motor assembly comprises a moving structure, an image acquisition structure, a controller and a calculator. The motor assembly is placed on the moving structure, and the moving structure drives the motor assembly to move. The image acquisition structure comprises an area array camera, and the area array camera takes a picture of the motor assembly, collects a color image of the motor assembly and transmits the color image to the calculator, and the calculator detects the color image to identify defects in the motor assembly image.

[0020] Furthermore, the motor assembly defect automated detection device also includes a light source, which includes a ring light source and a side light source, the ring light source surrounds the area array camera, the side light source is located on one side of the area array camera, and the ring light source and the side light source emit AOI light sources of different bands.

[0021] Furthermore, the automatic defect detection device for the motor assembly also includes a telecentric lens, which is installed on the area array camera. The telecentric lens focuses on the motor assembly so that the collected color image of the motor assembly is clear.

[0022] Compared with the prior art, the method for automatically detecting defects in motor assemblies of the present invention adopts machine vision technology, which can complete the automatic detection of motor assemblies. An optimization algorithm is used for the parameters in the training process, eliminating the tedious process of adjusting the parameters, so that the model effect reaches an ideal state. The deep model of the parameter optimization algorithm can quickly give accurate results. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A flow chart of the method for automatically detecting defects in a motor assembly according to the present invention;

[0024] Figure 2 Schematic diagram of the automatic defect detection device for motor assembly of the present invention.

[0025] In the figure: 10, moving structure; 11, conveyor belt; 12, first driving member; 30, image acquisition structure; 31, bracket; 32, area array camera; 33, telecentric lens; 40, light source; 41, ring light source; 42, side light source; 50, controller; 60, calculator. DETAILED DESCRIPTION

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

[0027] It should be noted that when a component is referred to as being "fixed to" another component, it may be directly on the other component or there may be another intermediate component through which it is fixed. When a component is considered to be "connected to" another component, it may be directly connected to the other component or there may be another intermediate component at the same time. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be another intermediate component at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0029] Figure 1 The flowchart of the method for automatically detecting defects of a motor assembly according to the present invention is as follows:

[0030] Acquiring an image: placing the motor assembly on the mobile structure 10, and when the motor assembly moves to below the area array camera 32, the area array camera 32 takes a photo to collect a color image of the motor assembly;

[0031] Manually label the parts in the color image of the motor assembly: resize the color image and use the LabelMaster labeling tool to manually label the parts in the motor assembly image;

[0032] Use deep learning algorithms to establish a motor assembly information recognition model: divide the labeled image data into training sets and validation sets, and build a DarkNet53 defect detection network model;

[0033] Use the Doe parameter optimization algorithm to optimize the motor assembly information recognition model: input the training set and the validation set into the network model for training, select several training parameters, set multiple dimensions for each training parameter, select several groups of different experimental parameters by combining each parameter through the preset Doe orthogonal table, and obtain different experimental return results. Calculate the factor effects of different parameters on this data set through the results of each group of experiments, and obtain a factor response table containing several parameters. Analyze the factor response table. If the numerical value of the factor effect is decreasing, reduce the parameter value. If the numerical value of the factor effect is increasing, increase the parameter value.

[0034] Identify defects in motor assembly images: Use the pt file based on the DarkNet53 deep learning network with optimized parameters to detect the motor assembly image and identify part defects in the image. When a defect is identified, return the location of the defect in the image and output the result to the computer.

[0035] The image acquisition steps are as follows: the motor assembly is installed on the mobile structure 10, the first driving member 12 drives the conveyor belt 11 to work, so that the conveyor belt 11 drives the motor assembly to move to the bottom of the array camera 32, and when the motor assembly is transferred to the bottom of the array camera 32, the light source 40 is triggered, and the annular light source 41 and the side light source 42 work. The annular light source 41 and the side light source 42 emit AOI light sources of different bands, and the AOI light source can illuminate the defects of the product. The array camera 32 takes pictures and collects color images of the flexible circuit through the telecentric lens 33. After the camera takes the picture, the taken picture is transmitted to the computer.

[0036] The steps for manual labeling of parts in the color image of the motor assembly are as follows: resize the color image, the overall image is 8032×5360, and the large-size image is segmented by an algorithm. Each segmented small image is 416×416; use the LabelMaster labeling tool to label the segmented small images using the data labeling tool. Each motor assembly contains 12 different components, including capacitors, inductors, resistors, microphones, diodes, speakers, etc. Use the labeling software to label the captured image output. Defects include four main types of defects: original component offset, original component loss, original component damage, and original component surface covering, as well as other defects such as tin beads, scarcity, and solder bridges. When labeling data, use the original name as the prefix of the label and the defect type as the suffix of the label, and finally there are 148 different defect categories.

[0037] The specific steps of using deep learning algorithm to establish the information recognition model of motor assembly are as follows: divide the annotated image data into training set and validation set according to the principle of 7:3, and keep some images without annotation as test set; use Darknet, ResNet, VGG as the backbone network for feature extraction, introduce spatial attention mechanism and channel attention mechanism to improve the ability of feature extraction; build a 252-layer network based on convolution layer, normalization layer and activation function to output the category and location information of defects. After the above steps, a complete Darknet53 defect detection network model is built, and the training set and validation set are input into the network for training. After each training, it is completed after 150 epochs. The model size obtained after training is 357MB.

[0038] The specific steps of using the Doe parameter optimization algorithm to optimize the motor assembly information recognition model are as follows: there are 21 training parameters for the network model, 9 of which are selected, and each training parameter is set to 3 dimensions. 27 different experimental parameters are selected by combining each parameter through the pre-set Doe orthogonal table. After 27 iterations of experiments, 27 different experimental results are obtained. The experimental return results are the recall rate R, the precision rate P, and the Map value. The mean y and variance s of the 27 groups of experiments are calculated from the three returned results, and the signal-to-noise ratio S / N of the experiment is calculated from the mean and variance. The calculation formula for the signal-to-noise ratio is:

[0039]

[0040] After obtaining the signal-to-noise ratio of 27 groups of experiments, the factor effects of 9 parameters at 3 levels are calculated according to the orthogonal table listed in the implementation. For example, for parameter A, the factor effects n at level 1, level 2, and level 3 are calculated respectively. A1 , n A2 , n A3 . A factor response table containing 9 parameters is obtained. After analyzing the factor response table, if the value of the factor effect is decreasing, the parameter value of the column is reduced. If the value of the factor effect is increasing, the parameter value of the column is increased. Finally, the best set of experiments is found based on the results of the first 27 groups of experiments. The 28th set of optimized parameters are obtained based on the adjusted parameters, and finally the optimal model is obtained.

[0041] The specific method of identifying defects in the image of the motor assembly is as follows: the pt file based on the DarkNet53 deep learning network with optimized parameters is used to detect the image of the motor assembly, which can identify the defects of parts in the image. The algorithm returns three result information, namely: the type of defect, the probability of belonging to this type of defect, and the coordinate information of the defect in the image. When there is a detection defect result in the image and the probability is greater than 0.2, the position of the defect in the image is returned, and NG is returned. If there is no defect detection, it is OK; after the model detection, the result is output to the computer. When the received detection result is NG, an alarm message is displayed on the monitor.

[0042] Compared with the prior art, the method for automatically detecting defects in motor assemblies of the present invention adopts machine vision technology, which can complete the automatic detection of motor assemblies. An optimization algorithm is used for the parameters in the training process, eliminating the tedious process of adjusting the parameters, so that the model effect reaches an ideal state. The deep model of the parameter optimization algorithm can quickly give accurate results.

[0043] Please continue reading Figure 2 The present invention also relates to an automatic detection device for defects of a motor assembly, which is used to implement the above-mentioned automatic detection method for defects of a motor assembly. The automatic detection device for defects of a motor assembly includes a moving structure 10, an image acquisition structure 30, a light source 40, a controller 50 and a calculator 60.

[0044] The moving structure 10 includes a conveyor belt 11 and a first driving member 12. The first driving member 12 is electrically connected to the conveyor belt 11, and the first driving member 12 drives the conveyor belt 11 to move.

[0045] The image acquisition structure 30 includes a bracket 31, an array camera 32, and a telecentric lens 33. The bracket 31 is fixed to one side of the mobile structure 10. The array camera 32 is mounted on the bracket 31 and is located above the mobile structure 10. The telecentric lens 33 is mounted on the bottom of the array camera 32, and the telecentric lens 33 focuses on the motor assembly so that the collected color image of the motor assembly is clear.

[0046] The light source 40 includes an annular light source 41 and a side light source 42. The annular light source 41 surrounds the telecentric lens 33, and there are two side light sources 42, which are located on both sides of the telecentric lens 33. The side light sources 42 form a 30° angle with the area array camera 32. The annular light source 41 and the side light source 42 emit AOI light sources of different wavelengths, which can illuminate defects of the product.

[0047] The controller 50 is electrically connected to the first driving member 12, the second driving member 21 and the area array camera 32. The controller 50 controls the conveyor belt 11 to work through the first driving member 12. The controller 50 controls the glass plate 22 to move or squeeze through the second driving member 21. The controller 50 controls the area array camera 32 to work.

[0048] The calculator 60 is electrically connected to the controller 50 and the area array camera 32 . The calculator 60 receives the pictures taken by the area array camera 32 and performs defect analysis.

[0049] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which are equivalent modifications and improvements made to the above embodiments based on the essential technology of the present invention, and all of them belong to the protection scope of the present invention.

Claims

1. A method for automatically detecting defects in a motor assembly, characterized in that: The following steps are involved: Acquiring an image: placing the motor assembly on a moving structure, and when the motor assembly moves to below the area array camera, the area array camera takes a photo to collect a color image of the motor assembly; Manually labeling the parts in the color image of the motor assembly: resizing the color image, and manually labeling the parts in the motor assembly image using a LabelMaster labeling tool; Use deep learning algorithms to establish a motor assembly information recognition model: divide the labeled image data into training sets and validation sets, and build a DarkNet53 defect detection network model; Use the Doe parameter optimization algorithm to optimize the motor assembly information recognition model: input the training set and the validation set into the network model for training, select several training parameters, set multiple dimensions for each training parameter, select several groups of different experimental parameters by combining each parameter through the preset Doe orthogonal table, and obtain different experimental return results. Calculate the factor effects of different parameters on this data set through the results of each group of experiments, and obtain a factor response table containing several parameters. Analyze the factor response table. If the numerical value of the factor effect is decreasing, reduce the parameter value. If the numerical value of the factor effect is increasing, increase the parameter value. Identify defects in the image of the motor assembly: Use a pt file based on a DarkNet53 deep learning network with optimized parameters to detect the image of the motor assembly, identify part defects in the image, and when a defect is identified, return the position of the defect in the image and output the result to a computer.

2. The method for automatically detecting defects in a motor assembly according to claim 1, characterized in that: In the step of manually marking the parts in the color image of the motor assembly, the color image is resized as follows: the size of the original image obtained is 8032×5360, which is adjusted to 416×416.

3. The method for automatically detecting defects of a motor assembly according to claim 1, characterized in that: In the step of establishing the motor assembly information recognition model using a deep learning algorithm, some images are retained without being labeled as a test set.

4. The method for automatically detecting defects in a motor assembly according to claim 1, characterized in that: In the step of establishing the motor assembly information recognition model using a deep learning algorithm, the DarkNet53 defect detection network model is specifically built as follows: Darknet, ResNet, and VGG are used as the backbone network for extracting features, and a network is built based on convolutional layers, normalization layers, and activation functions to output the category and location information of the defect.

5. The method for automatically detecting defects of a motor assembly according to claim 4, characterized in that: Building the DarkNet53 defect detection network model also includes: introducing spatial attention mechanism and channel attention mechanism to improve the ability to extract features.

6. The method for automatically detecting defects of a motor assembly according to claim 1, characterized in that: In the step of optimizing the motor assembly information recognition model using the Doe parameter optimization algorithm, the experimental return results are the recall rate R, the precision rate P and the Map value. The mean y and the variance s of multiple groups of experiments are calculated by the three returned results. The signal-to-noise ratio S / N of the experiment is calculated by the mean and the variance. The calculation formula of the signal-to-noise ratio is: According to the orthogonal table listed in the implementation, the factor effects of several parameters in multiple dimensions are calculated.

7. The method for automatically detecting defects in a motor assembly according to claim 1, characterized in that: In the step of identifying defects in the image of the motor assembly, the position of the defect in the image is returned and the result is output to the computer. The result is: the type of defect, the probability of belonging to this defect and the coordinate information of the defect in the image.

8. An automatic detection device for defects of a motor assembly, used to implement the automatic detection method for defects of a motor assembly as claimed in any one of claims 1 to 7, characterized in that: The automatic defect detection device for a motor assembly includes a mobile structure, an image acquisition structure, a controller and a calculator. The motor assembly is placed on the mobile structure, and the mobile structure drives the motor assembly to move. The image acquisition structure includes an area array camera, and the area array camera takes a picture of the motor assembly, collects a color image of the motor assembly and transmits the color image to the calculator. The calculator detects the color image and identifies defects in the image of the motor assembly.

9. The automatic defect detection device for motor assembly according to claim 8, characterized in that: The motor assembly defect automated detection device also includes a light source, which includes a ring light source and a side light source. The ring light source surrounds the area array camera, and the side light source is located on one side of the area array camera. The ring light source and the side light source emit AOI light sources of different bands.

10. The automatic defect detection device for motor assembly according to claim 8, characterized in that: The automatic defect detection device for the motor assembly further comprises a telecentric lens, which is mounted on the area array camera. The telecentric lens focuses on the motor assembly so that the collected color image of the motor assembly is clear.