A method for appearance inspection of engine bracket assembly quality based on machine vision
Through machine vision technology, adaptive algorithms and improved YOLOv9 models are used to detect the assembly quality of engine bracket assemblies, which solves the shortcomings of manual visual inspection methods, realizes efficient and accurate inspection and quality traceability, and reduces costs.
Patent Information
- Application Number
- CN202411077811.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-08-07
AI Technical Summary
In the existing technology, the appearance inspection of the assembly quality of the engine bracket assembly mainly relies on manual visual inspection, which has the problems of strong subjectivity, low efficiency, high cost and difficulty in meeting the rapid inspection requirements of large-scale production lines.
A machine vision-based inspection method is adopted, through adaptive algorithm intelligent sampling, standard template library production, GAN model combined with data enhancement, HAT attention mechanism and Ghost convolution to improve the YOLOv9 model, to achieve part target detection and quality traceability, combined with a continuous learning process to improve inspection accuracy and efficiency.
It has achieved comprehensive and accurate testing of the assembly quality of the engine bracket assembly, improved testing accuracy and efficiency, reduced labor costs, and established an effective quality traceability and continuous optimization mechanism.
Smart Images

Figure CN119048442B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a computer image recognition technology, in particular to a product assembly quality appearance detection technology, specifically to a method for engine bracket assembly quality appearance detection based on machine vision. Background Art
[0002] The engine mount assembly is a crucial component in the automotive engine system, supporting and securing the engine. It generally consists of several key parts: the mount body, fasteners such as bolts and nuts, and vibration-damping elements such as rubber pads and hydraulic shock absorbers. Some engine mount assemblies may be equipped with adjustment mechanisms, such as adjustable support arms and height-adjustment bolts. Visual inspection is a crucial step in engine mount assembly quality control. This step effectively identifies assembly defects such as mis-installation, missing components, or multiple components, as well as other potential issues within the engine mount assembly. If these defects and issues are not promptly detected and corrected, they will directly threaten the stability and reliability of the engine mount, ultimately impacting the overall safety and driving experience of the vehicle. Currently, manufacturers primarily rely on manual visual inspection to visually inspect the assembly quality of engine mount assemblies. However, manual visual inspection is highly subjective, and results are easily affected by factors such as the inspector's experience and vision. Furthermore, it is inefficient and cannot meet the rapid inspection requirements of large-scale production lines. Furthermore, labor costs are high. Summary of the Invention
[0003] The purpose of the present invention is to address the problem that the existing engine bracket assembly mainly adopts manual visual inspection method to perform assembly quality appearance inspection. However, the manual visual inspection method is highly subjective, and the inspection results are easily affected by factors such as the inspection personnel's experience and eyesight. In addition, the efficiency is low, and it is difficult to meet the rapid inspection needs of large-scale production lines. At the same time, there is a problem of labor cost. Therefore, a method for appearance inspection of assembly quality of engine bracket assembly based on machine vision is invented. It realizes comprehensive and accurate inspection of assembly quality of engine bracket assembly through intelligent sampling, standard template library production, data set enhancement, model improvement, assembly quality assessment, quality traceability and continuous learning, thereby improving inspection accuracy and efficiency and reducing labor costs.
[0004] The technical solution of the present invention is:
[0005] A machine vision-based appearance inspection method for the assembly quality of an engine bracket assembly is implemented through the following steps: intelligent sampling using an adaptive algorithm, preparation of a standard template library for the engine bracket assembly, dataset preparation using a GAN model combined with data augmentation technology, YOLOv9 model improvement using the HAT attention mechanism and Ghost convolution, improved model target detection, assembly quality assessment based on inspection results, a quality traceability mechanism, and a continuous learning automation process. This method achieves comprehensive and accurate appearance inspection of the assembly quality of the engine bracket assembly, improves the accuracy and efficiency of assembly status inspection of parts such as engine brackets, fasteners, and shock-absorbing elements, reduces labor costs, and enables effective traceability of engine bracket assembly quality issues and continuous improvement and learning of appearance inspection accuracy.
[0006] The specific steps are:
[0007] Step 1: Develop an intelligent sampling plan, using an adaptive sampling algorithm based on surface curvature and part density, taking into account camera parameters while combining the engine bracket assembly CAD model or actual scan data, and adding sampling points A for key parts assembly areas, parts assembly dense areas and complex surfaces. i , formulate an intelligent sampling scheme A(A0,A1,……A m ).
[0008] Step 2: Establish a standardized template library. Establish a standard template library for engine bracket assemblies that includes various models, batches, and production lines. Each template contains detailed information such as the size (W, H), position (U, V), and part type C of the engine bracket assembly. i The jth part parameter is denoted as T ij (C ij ,(W ij ,H ij ),(U ij ,V ij )), when sampling point A i When the total number of parts is n, the sampling point A i The standard assembly template is denoted as N i (T i1 , T i2 ,……T in ). At the same time, a template update tool was introduced to allow production personnel to fine-tune the template according to actual production conditions, ensuring that the template is synchronized with the actual product.
[0009] Step 3: Dataset creation: Collect and annotate images of the engine bracket assembly under multiple lighting, angles, and backgrounds. Use the annotated real images to train the GAN model, and use the GAN model to generate a large number of high-quality synthetic images. These images are then incorporated into the dataset and annotated.
[0010] Step 4: Data enhancement of the training dataset. Data enhancement methods such as image rotation, scaling, cropping, color jittering and Gaussian filtering are used to enhance the dataset.
[0011] Step 5: Model improvement. Based on the YOLOv9 algorithm, the HAT attention mechanism module is introduced to extract comprehensive part features, and Ghost convolution is introduced to replace some of the original convolution modules to reduce the computational complexity of the model.
[0012] Step 6: Model training: Continuously adjust the hyperparameters of the target detection model training through the hyperparameter evolution strategy until the model recognition and classification accuracy is optimal.
[0013] Step 7: Image acquisition, using the camera light source adaptive algorithm to automatically adjust the camera and light source parameters according to image characteristics and lighting conditions.
[0014] Step 8: YOLOv9 improved model target detection: Input the collected image into the YOLOv9 improved model for part target detection classification and pixel coordinate positioning. Record the detection result R of each part at each sampling point. R includes part type RC, part pixel size (RW, RH), part pixel coordinate system positioning (RU, RV) and other part parameters. The i-th sampling point A i The test result is recorded as M i (R i1 , R i2 , ... R in ).
[0015] Step 9: Assembly quality assessment: Compare the test result M with the standard template T. By comparing indicators such as part size, position, and type, and combining a custom assembly status formula to calculate the relevant errors, the qualified part assembly is determined. Introducing data visualization technology, a detailed and intuitive appearance quality inspection report is produced.
[0016] Step 10: Quality traceability: Link each test result with product information to establish a quality traceability mechanism. When quality issues occur, they can be quickly traced back to the specific production process and cause.
[0017] Step 11: Continuous learning, regularly triggering the continuous learning automation process of collecting actual data, evaluating performance, updating parameters and retraining, so that the YOLOv9 improved model can be continuously iterated and optimized to gradually adapt to various complex scenarios and target types.
[0018] In step 1: Surface curvature: Curvature reflects the degree of curvature of the surface. The greater the curvature, the more complex the surface. Part density: represents the number of parts in the area near the surface. The adaptive sampling algorithm is mainly divided into the following steps: 1. Data input: The adaptive sampling algorithm first needs to obtain the geometric data of the engine bracket assembly, including CAD model files. Actual scanning data (such as point cloud data) or other forms of geometric representation. These data should contain the detailed size, position, shape information of the engine bracket assembly and its parts, and whether they are key parts. 2. Sampling point initialization: The algorithm preliminarily determines the number and approximate distribution of sampling points based on the overall size and complexity of the engine bracket assembly geometric data. 3. Sampling point adjustment based on key parts assembly area: Based on the geometric data, sampling points are added to the part area where key parts exist. 4. Sampling point adjustment based on curvature: The algorithm defines the grid parameters based on the geometric data of the engine bracket assembly, performs semi-automatic grid division on the geometric data, and after passing the grid quality check, uses numerical analysis or geometric processing algorithms to calculate the curvature of the surface grid points of the engine bracket assembly, and adds sampling points on the surface grid points with larger curvature. 5. Adjust sampling points based on part density: Calculate the relative position, overlap, or occupied space between parts to achieve part density calculation, and add sampling points in areas with high part density.
[0019] In step 2, the order of the part records in the standard assembly template N of each sampling point is arranged in ascending order according to the x-axis coordinate of the part pixel. If the x-axis coordinates are the same, they are arranged in ascending order according to the y-axis coordinate. The part type C is mapped and represented by increasing positive integers. Each positive integer C a Represents a type of part.
[0020] In step 3, the dataset generated includes at least 100 images for each part category and at least 50 images for each sampling point. For color detection requirements, images of other colors should be included to ensure that the dataset includes images of all lighting backgrounds and detection conditions. Side and surface images of the same part are each classified separately. Different fasteners and damping components are divided into multiple categories based on their type and characteristics, and different unbolted holes and slots are classified based on their characteristics.
[0021] In step 5: the YOLOv9 improved model network structure parameter information table is shown in Table 1, where HAT represents the introduced hybrid attention mechanism HAT (Hybrid Attention Transformer), and GS_Conv represents lightweight Ghost convolution.
[0022] Table 1 YOLOv9 improved model network structure parameter information table
[0023]
[0024]
[0025] In step 6, the hyperparameter evolution strategy primarily adjusts hyperparameters such as the model batch size, initial learning rate, and epoch value. This strategy is implemented using a genetic algorithm, mimicking the selection, crossover, and mutation processes of biological evolution. The best performing hyperparameter combinations are selected from each of the multiple combinations, crossovered to generate new hyperparameter combinations, and then some hyperparameter values are mutated within these new hyperparameter combinations. This process continuously evolves hyperparameter combinations and explores the optimal solution, ultimately generating a high-precision parts assembly inspection and positioning model with the highest average accuracy across all classifications.
[0026] In step 7: the specific implementation process of the camera light source adaptive algorithm is as follows: 1. According to the sampling point A i Standard template information sets camera parameters: including exposure time, white balance, focal length, etc. i Standard template information sets light source parameters: including light intensity, direction, color temperature, etc. The current image obtained from the camera. 2. Feature extraction of the captured image, including key features such as brightness, contrast, and clarity, and use image processing techniques (such as histogram analysis, edge detection, etc.) to quantify these features. 3. Use image analysis to evaluate the current lighting conditions, including light intensity, direction, and color temperature. 4. Based on the extracted image features and lighting conditions, formulate an adjustment strategy for camera and light source parameters. 5. Implement parameter adjustment through the API or control interface of the camera and light source. 6. Perform quality assessment on the adjusted image. Image quality assessment algorithms (such as SSIM, PSNR, etc.) can be used to quantify image quality to ensure that the image quality meets the requirements. 7. Iterate optimization. If the image quality does not meet the requirements, re-extract image features and evaluate lighting conditions, and adjust parameters.
[0027] In step 9, assembly quality assessment, the test result M is compared with the standard template T. By comparing indicators such as part size, position, and type, and combining a custom assembly status formula to calculate the relevant errors, the qualified part assembly is determined. Data visualization technology is introduced to produce a detailed and intuitive appearance quality inspection report.
[0028] Since the sampling points established in step 1 are fixed, the surface positions taken are the same, so according to the standard assembly template N i , for each part's standard assembly template T ij (C ij ,(W ij ,H ij ),(U ij , V ij )) and test results Mi The actual assembly status of each part R ij (RC ij ,(RW ij ,RH ij ),(RU ij , RV ij ) for comparison. When the custom assembly state formula (1) is satisfied, the jth part of the i-th sampling point is considered to be qualified DR ij =1, otherwise the part is considered unqualified DR ij =0.
[0029]
[0030] Where i represents the sampling point number in step 1, and j represents the number of the part record in N in step 2. i∈[1,m],j∈[1,n](i,j∈N). α, β, γ, and δ are all initial preset constants representing the tolerance constants. α represents the tolerance for part width, β represents the tolerance for part height (length), γ represents the tolerance for the x-axis coordinate of the part center pixel, and δ represents the tolerance for the y-axis coordinate of the part center pixel.
[0031] After the comparison is completed, proceed to the next sampling point A i+1 Image acquisition and target detection are performed until all sampling points are inspected. The assembly information of parts inspected at all sampling points is summarized. An interactive report on the appearance quality inspection of the engine bracket assembly is produced through visualization technologies such as image overlay annotation, heat maps and error maps, data tables and statistical charts.
[0032] In step 10: the quality traceability mechanism first performs an appearance inspection to establish a database for storing product information, test results, and evaluation results, wherein the product information includes unique identifiers such as batch number, serial number, production date, and production line number, which are used to uniquely identify each engine bracket assembly. After each inspection is completed, the test results and related product information are automatically entered into the database. The product information, test records, and result evaluation table are associated through unique identifiers to form a complete quality traceability chain. Parts or assemblies that fail the inspection are specially marked so that they can be focused on in subsequent production or quality control processes. A data query interface is provided to allow quality management personnel to quickly retrieve relevant quality traceability information based on product information or test records.
[0033] In step 11, the specific steps of the continuous learning automation process include: regularly collecting and labeling actual engine bracket assembly image data on the production line, deploying the model for testing and analysis on the actual collected data set, adjusting parameters and retraining the model based on the analysis, testing and verifying the performance of the model after learning and optimization on the validation set, and deploying it to the production environment if the model performance is better. The entire process is logged, and the above steps are executed in a timed loop, with regular manual supervision and assistance.
[0034] The beneficial effects of the present invention are:
[0035] The present invention ensures that key assembly areas and complex surfaces are adequately sampled through the formulation of an intelligent sampling scheme, thereby improving the accuracy and reliability of detection. The establishment of a standardized template library ensures that the detection standards are synchronized with the actual product, improving the versatility and flexibility of detection. The introduction of the GAN model and data enhancement technology when preparing the dataset can effectively solve the problem of insufficient image data diversity caused by lighting conditions, shooting angles and background differences. Based on the YOLOv9 algorithm, the HAT attention mechanism module is introduced and lightweight Ghost convolution is used. The HAT attention mechanism combines the advantages of self-attention, channel attention and spatial attention, and can more comprehensively capture and utilize key information in the image, enabling the model to more accurately locate and identify the assembly status of parts, thereby improving the accuracy and reliability of detection. Ghost convolution is an efficient convolution method that reduces the complexity and computational complexity of the model by reducing redundant calculations in the convolution operation. The application of Ghost convolution in YOLOv9 can enable the model to achieve faster inference speed while maintaining high-precision detection, meeting real-time requirements. The image acquisition camera light source adaptive algorithm is used to effectively solve the problem of poor image quality caused by changing lighting conditions and improper camera parameter settings. The quality traceability mechanism effectively addresses the difficulty in tracing quality issues. Continuous learning improves the adaptability, accuracy, and generalization capabilities of the engine bracket assembly appearance inspection model, reduces manual intervention, and supports continuous model optimization and improvement. In summary, this invention, through a series of innovative technical approaches, comprehensively improves the efficiency and accuracy of engine bracket assembly quality inspection, reduces inspection costs, and establishes a comprehensive quality traceability and continuous optimization mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is the initial configuration flow chart of the present invention.
[0037] Figure 2 This is a product testing workflow diagram for an engine bracket assembly according to the present invention. DETAILED DESCRIPTION
[0038] The present invention will be further described in detail below with reference to the accompanying drawings and implementation examples.
[0039] like Figure 1 and Figure 2 shown.
[0040] A machine vision-based visual inspection method for the assembly quality of engine bracket assemblies consists of two main parts: the first is the initial configuration of the method, and the second is the inspection of the engine bracket assembly product. First, based on the geometric data of the engine bracket assembly, an intelligent sampling scheme is developed using an adaptive sampling algorithm based on surface curvature and part density, and a standard template library for engine bracket assemblies covering multiple models, batches, and production lines is established. Images of engine bracket assembly parts under multiple lighting, angles, and backgrounds are then collected and annotated. A GAN model is trained and used to produce synthetic images. These images are merged to generate a training dataset, and other data augmentation operations are performed on the dataset. A YOLOv9 model, improved with the HAT attention mechanism and lightweight convolution, is then trained on this dataset. After completing the initial configuration, the actual inspection process for the engine bracket assembly product can begin. The second part involves product inspection of the engine bracket assembly. First, a camera-light source adaptive algorithm automatically adjusts camera and light source parameters before image acquisition. Then, an improved YOLOv9 model is used on all images to detect and identify part targets and locate pixel coordinates. The inspection results are then compared with standard template parameters and, using a custom assembly status formula, determine if the part assembly is qualified. Finally, data visualization technology is incorporated to produce a detailed and intuitive appearance quality inspection report. Based on a quality traceability mechanism, each inspection result is linked to product information and stored in a database. This process is then triggered periodically to collect actual data, evaluate performance, update parameters, and retrain the continuous learning automated process.
[0041] Figure 1 The flowchart of the initial configuration work of the method of the present invention specifically includes steps 1-6:
[0042] Step 1: Develop an intelligent sampling plan, using an adaptive sampling algorithm based on surface curvature and part density. Based on the overall size and complexity of the actual geometric data of a certain type of engine bracket assembly, preliminarily determine the number and approximate distribution of sampling points, and add sampling points to the key parts assembly area based on the part information in the geometric data. Then, define the grid parameters based on the geometric data of the engine bracket assembly, and perform semi-automatic grid division. After passing the grid quality inspection, use numerical analysis or geometric processing algorithms to calculate the curvature of the surface grid points of the engine bracket assembly, and add sampling points to the surface grid points with larger curvature. Then, calculate the relative position, degree of overlap or occupied space between parts to achieve part density, and add sampling points in areas with high part density. Finally, formulate an intelligent sampling plan A (A0, A1, ... A m ).
[0043] Step 2: Establish a standardized template library. Establish a standard template library for engine bracket assemblies that includes various models, batches, and production lines. Each template contains the detailed size (W, H), position (U, V), and part type C of a certain sampling point of the engine bracket assembly. i The jth part parameter is denoted as T ij (C ij ,(W ij ,H ij ),(U ij ,V ij )), when sampling point A i When the total number of parts is n, the sampling point A i The standard assembly template is denoted as N i (T i1 , T i2 ,……T in ). The order of the part records in the standard assembly template N of each sampling point is arranged in ascending order according to the x-axis coordinate of the part pixel. If the x-axis coordinates are the same, they are arranged in ascending order according to the y-axis coordinate. The part type C is mapped and represented by increasing positive integers. Each positive integer C a Represents a type of part. A template update tool was also introduced to allow production personnel to fine-tune the template based on actual production conditions, ensuring that the template information is synchronized with the qualified assembly standards of the sampling point products.
[0044] Step 3: Dataset creation, collect images of the engine bracket assembly parts during assembly under multiple lighting, multiple angles and multiple backgrounds, and annotate them. Use the annotated real images to train the GAN model, and use the GAN model to generate a large number of high-quality synthetic images, merge these images into the dataset and annotate them. In the dataset created, at least 100 images are required for each part classification, and at least 50 images are collected for each sampling point. For those with color detection requirements, some images of other colors need to be introduced into the dataset to ensure that the dataset contains images of all light backgrounds and detection conditions. The side images and surface images of the same part are each classified into one category. Different fasteners and shock-absorbing components are divided into multiple categories according to their types and characteristics, and are classified accordingly according to the characteristics of different holes and slots without bolts.
[0045] Step 4: Data enhancement of the training dataset. Data enhancement methods such as image rotation, scaling, cropping, color jittering and Gaussian filtering are used to enhance the dataset.
[0046] Step 5: Model Improvement: Based on the YOLOv9 algorithm, we introduced the HAT attention mechanism module to extract comprehensive part features and introduced Ghost convolution to replace some of the original convolution modules to reduce the model's computational complexity. The detailed network structure and parameters of the improved YOLOv9 model are shown in Table 1.
[0047] Step 6: Model training: Using a hyperparameter evolution strategy, continuously adjust hyperparameters such as the batch size, initial learning rate, and epoch value until the model generates an engine bracket assembly detection model with the highest average accuracy across all classifications.
[0048] Figure 2 This is a flow chart for testing the engine bracket assembly product of the present invention, specifically including steps 7-11:
[0049] Step 7: Image acquisition, using the camera light source adaptive algorithm, first according to the sampling point A i The standard template information sets the camera parameters: including exposure time, white balance, focal length, etc., and then according to the sampling point A i The standard template information sets the light source parameters: including light intensity, direction, color temperature, etc. Then use the camera to capture the image. Feature extraction is then performed on the captured image, including key features such as brightness, contrast, and clarity, and image processing techniques (such as histogram analysis, edge detection, etc.) are used to quantify these features. Next, image analysis is used to evaluate the current lighting conditions, including light intensity, direction, and color temperature. Based on the extracted image features and lighting conditions, a strategy for adjusting the camera and light source parameters is formulated. Parameter adjustment is then implemented through the API or control interface of the camera and light source, and the quality of the adjusted image is evaluated. Image quality assessment algorithms (such as SSIM, PSNR, etc.) can be used to quantify the image quality to ensure that the image quality meets the requirements. Finally, if the image quality does not meet the requirements, the image features are re-extracted, the lighting conditions are evaluated, and the parameters are adjusted and optimized iteratively.
[0050] Step 8: YOLOv9 improved model target detection: Input the preprocessed image into the YOLOv9 improved model for part target detection classification and pixel coordinate positioning. Record the detection result R of each part at each sampling point. R includes part type RC, part pixel size (RW, RH), part pixel coordinate system positioning (RU, RV) and other part parameters. The i-th sampling point A i The test result is recorded as M i (R i1 , R i2 , ... R in ). The recording order of R in M is the same as the template recording standard.
[0051] Step 9: Since the sampling points established in step 1 are fixed, the surface positions taken are the same, so according to the standard assembly template N i , for each part's standard assembly template T ij (C ij ,(W ij ,H ij ),(U ij , V ij )) and test results M i The actual assembly status of each part R ij (RC ij ,(RW ij ,RH ij ),(RU ij , RV ij ) for comparison. When the custom assembly state formula (1) is satisfied, the jth part of the i-th sampling point is considered to be qualified DR ij =1, otherwise the part is considered unqualified DR ij =0.
[0052]
[0053] After the comparison is completed, proceed to the next sampling point A i+1 Image acquisition and target detection are performed until all sampling points are inspected. The assembly information of the parts inspected at all sampling points is summarized. Through visualization technologies such as image overlay annotation, heat maps and error maps, data tables and statistical charts, an interactive report on the appearance quality inspection of the engine bracket assembly is produced. The step jump is as follows:
[0054] if(i <m):
[0055] Save sampling point A i Parts detection information, enter sampling point A i+1 The image acquisition step is skipped to step 7.
[0056] else:
[0057] After creating the interactive report on the appearance quality inspection of the engine bracket assembly, the procedure jumps to step 10.
[0058] Step 10: Quality traceability. First, create a database to store product information, test results, and evaluation results. Product information includes unique identifiers such as batch number, serial number, production date, and production line number to uniquely identify each engine bracket assembly. After each test is completed, the test results and related product information are automatically entered into the database. Product information, test records, and result evaluation tables are linked using unique identifiers to form a complete quality traceability chain. Parts or assemblies that fail the test are specially marked to ensure that they are focused during subsequent production or quality control. A data query interface is provided, allowing quality management personnel to quickly retrieve relevant quality traceability information based on product information or test records, thus establishing a quality traceability mechanism.
[0059] Step 11: Continuous learning: Regularly collect and annotate actual engine bracket assembly image data on the production line. Then, test and analyze the deployed model on the actual collected data set. Adjust parameters and retrain the model based on the analysis. Test the performance of the optimized model on the validation set. If the model performance is better, deploy it to the production environment. Record the entire process in a log. Execute the above steps in a timed loop with regular manual supervision and assistance. Iterate and optimize the model performance so that the improved YOLOv9 model can gradually adapt to various complex scenarios and target types.
[0060] The parts not involved in the present invention are the same as the existing technology or can be implemented by using the existing technology.
Claims
1. A method for visual inspection of the assembly quality of an engine bracket assembly based on machine vision, characterized by: It includes the following steps: Step 1: Develop an intelligent sampling plan: Using an adaptive sampling algorithm, combined with camera hardware parameter analysis and the engine bracket assembly CAD model or actual scan data, determine the sampling point locations and develop an intelligent sampling plan; Step 2: Establish a standardized template library: Create a standard template library for engine bracket assemblies covering multiple models, batches, and production lines, and introduce a template update tool to ensure that the templates are synchronized with the actual products; Step 3: Training dataset creation: Collect and annotate images of the engine bracket assembly under multiple lighting, angles, and backgrounds, train the GAN model to generate synthetic images, and then merge them into a dataset and re-annotate them; Step 4: Data enhancement of training dataset: Data enhancement of dataset is performed by image rotation, scaling, cropping, color jittering and Gaussian filtering data enhancement methods; Step 5: Model Improvement: Based on YOLOv9, we introduce attention mechanisms and lightweight convolutions to improve the model. The improved attention mechanism model introduces the HAT attention mechanism (Hybrid Attention Transformer), which combines the advantages of multiple attention mechanisms. The attention mechanism includes self-attention, channel attention, and spatial attention. The improved lightweight convolution model replaces some convolutions in YOLOv9 with lightweight Ghost convolutions. Step 6: Model training: Continuously adjust the hyperparameters of the target detection model training through the hyperparameter evolution strategy until the model recognition and classification accuracy is optimal, generating the optimal accuracy part assembly detection and positioning model; Step 7: Image acquisition: Use the camera light source adaptive algorithm to automatically adjust the camera and light source parameters; Step 8: Target detection: Input the preprocessed image into the YOLOv9 improved model for part target detection, classification and pixel coordinate positioning; Step 9: Assembly quality assessment: Compare the test results with the standard template, determine whether the assembly is qualified based on the customized assembly status formula, and introduce data visualization technology to produce a detailed and intuitive appearance quality inspection report; Step 10: Continuous Learning: Regularly trigger the continuous learning automation process of collecting real data, evaluating performance, updating parameters, and retraining; Step 11: Quality traceability: Link the results of each test with product information and establish a quality traceability mechanism.
2. The method according to claim 1, characterized in that The adaptive sampling algorithm described in step 1 is specifically an adaptive sampling algorithm based on surface curvature and part density. It needs to combine the engine bracket assembly CAD model or actual scan data, and then consider the camera's field of view, resolution, focal length, and core hardware parameters. It optimizes and adds sampling points for key parts assembly areas, parts-intensive assembly areas, and complex surfaces, thereby formulating an intelligent sampling plan.
3. The method according to claim 1, characterized in that The templates described in step 2 are specifically, each template corresponds to the standard qualified assembly information such as detailed size, position and assembly type of the parts in the sampling point of the engine bracket assembly.
4. The method according to claim 1, wherein Step 9 describes comparing the test results with the standard template. Specifically, by comparing the part size, position and type, and combining the custom assembly status formula to calculate the relevant errors, it is determined whether the part assembly is qualified.
5. The method according to claim 1, wherein The quality traceability mechanism in step 11 is specifically to use a database to store product information, test records, and result evaluations; the product information should include a unique identifier such as batch number, serial number, production date, and production line number; After each test is completed, the test results and related product information are automatically entered into the database; at the same time, parts or assemblies that fail the test are specially marked, and the specific reasons and manifestations of the failure are recorded; the test results include images, coordinate positions, and test classifications.
6. The method according to claim 1, characterized in that The continuous learning automation process described in step 10 specifically includes regular actual image acquisition and annotation, model deployment and testing and analysis on actual data sets, parameter updates and model retraining, model verification, and logging. The above cycle is triggered regularly, and manual supervision and assistance are performed regularly.
Citation Information
Patent Citations
Lightweight multi-scale aluminum profile surface defect detection method
CN117911399A
Power transmission line construction machinery inspection method based on MDALF-Net
CN117911862A