Coating defect analysis method and system based on machine vision

By building and deploying machine vision models on cloud data centers and edge computing gateways, the problems of low analysis efficiency, low accuracy and insufficient real-time analysis in existing coating defect analysis technologies are solved, and efficient, accurate and real-time coating defect analysis is achieved.

CN119722689AActive Publication Date: 2025-03-28SHANGHAI KEWAN MASCH EQUIP TECH SERVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510244850.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-03-28
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

The existing coating defect analysis technology has problems such as low analysis efficiency, low accuracy and insufficient real-time performance. It is necessary to improve analysis efficiency and accuracy while meeting the real-time inspection needs of high-speed production lines.

Method used

Using machine vision-based coating defect analysis method, real-time image preprocessing model and coating defect analysis model are constructed in cloud data centers, and image preprocessing model is deployed on edge computing gateways to realize real-time image preprocessing and defect analysis.

Benefits of technology

It significantly improves analysis efficiency and accuracy, can maintain high accuracy under complex backgrounds and variable lighting conditions, meets the real-time detection requirements of high-speed production lines, and reduces computing complexity and data transmission delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722689A_ABST
    Figure CN119722689A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of machine vision, and discloses a coating defect analysis method and system based on machine vision. The method comprises the following steps: a cloud data center constructs an image preprocessing model and a coating defect analysis model by using an artificial intelligence algorithm, and deploys the image preprocessing model to all edge computing gateways; the edge computing gateway is used for preprocessing the acquired real-time coating image data by using an image preprocessing model and uploading the obtained preprocessed real-time coating image data to the cloud data center; and the cloud data center is used for carrying out coating defect analysis on the preprocessed real-time coating image data by using a coating defect analysis model to obtain a real-time coating defect analysis result. According to the method, the problems of low analysis efficiency, low analysis accuracy and insufficient real-time performance in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of machine vision, and in particular relates to a coating defect analysis method and system based on machine vision. Background Art

[0002] In the manufacturing industry, the main purpose of coating is to provide a protective layer to prevent corrosion of the substrate. Any coating defects may lead to the occurrence of corrosion, which will shorten the service life of the product. The quality of coating is directly related to the appearance and durability of the product. Defect detection ensures that the product meets the predetermined quality standards and maintains the brand image. In some industries (such as automotive and aviation), coating is not only about appearance, but also about the safety performance of the product. For example, coating defects may cause corrosion, which in turn affects the structural strength. Through coating defect analysis, problems in the coating process can be identified, so as to optimize the process flow and improve production efficiency. With the development of automation and machine vision technology, coating defect analysis has become more efficient and accurate, making it more feasible and economical to implement defect analysis.

[0003] The existing coating defect analysis technology has the following defects: 1) Low analysis efficiency: Although the existing coating defect analysis methods use machine vision technology to a certain extent, they require a lot of manual intervention, resulting in low analysis efficiency and high cost investment; 2) Low analysis accuracy: Existing coating defect analysis methods use simple models that cannot identify fine defects in coating images, and the analysis accuracy will be significantly reduced under complex backgrounds or changing lighting conditions; 3) Lack of real-time performance: Existing technologies may have delays when processing large amounts of image data and cannot meet the real-time detection requirements on high-speed production lines. The computational complexity of image preprocessing and defect analysis may be too high, resulting in slow analysis speed. Summary of the invention

[0004] In order to solve the problems of low analysis efficiency, low analysis accuracy and insufficient real-time performance in the prior art, the present invention aims to provide a coating defect analysis method and system based on machine vision.

[0005] The technical solution adopted by the present invention is: A coating defect analysis method based on machine vision comprises the following steps: The cloud data center uses artificial intelligence algorithms to build image preprocessing models and coating defect analysis models, and deploys the image preprocessing models to all edge computing gateways; The edge computing gateway uses an image preprocessing model to preprocess the collected real-time painting image data, and uploads the obtained preprocessed real-time painting image data to the cloud data center; The cloud data center uses the coating defect analysis model to perform coating defect analysis on the preprocessed real-time coating image data to obtain real-time coating defect analysis results.

[0006] Furthermore, the cloud data center uses artificial intelligence algorithms to build image preprocessing models and coating defect analysis models, and deploys the image preprocessing models to all edge computing gateways, including the following steps: The cloud data center uses deep learning and image processing fusion algorithms to build an image preprocessing model based on a number of historical painting image data, and generates a number of preprocessed historical painting image data; Based on several pre-processed historical painting image data, a painting defect analysis model is constructed using image processing and 3D reconstruction fusion algorithms; Extract model metadata of the image preprocessing model and send the model metadata to all edge computing gateways connected to the cloud data center; Receive the model deployment success signal returned by the edge computing gateway. If the model deployment success signal is received from all edge computing gateways, the model deployment is completed.

[0007] Furthermore, the image preprocessing model is constructed based on the CNN-PPO-IPA algorithm, and the image preprocessing model includes a low-level feature extraction module constructed based on the CNN algorithm, an image preprocessing strategy generation module constructed based on the PPO algorithm, and an image preprocessing module constructed based on the IPA algorithm, which are connected in sequence.

[0008] Furthermore, the cloud data center uses a deep learning and image processing fusion algorithm to construct an image preprocessing model based on a number of historical painting image data, and generates a number of preprocessed historical painting image data, including the following steps: The cloud data center collects some historical painting image data and uses the CNN algorithm to build an initial low-level feature extraction module; According to a number of historical painting image data, the initial low-level feature extraction module is optimized and trained to obtain a final low-level feature extraction module, and a number of historical painting image low-level features are generated; Use the PPO algorithm to build the policy network and agent of the image preprocessing strategy generation module, and use the experience replay mechanism to initialize the experience replay pool; Define the state space, action space and reward function of the agent, and obtain the initial image preprocessing strategy generation module based on the strategy network, experience replay pool and agent; According to the low-level features of several historical painting images, the initial image preprocessing strategy generation module is optimized and trained to obtain the final image preprocessing strategy generation module, and several historical image preprocessing strategies are generated; The image preprocessing strategy generation module collects several historical image preprocessing strategy generation experiences during the optimization training process, and stores several historical image preprocessing strategy generation experiences in the experience playback pool; Integrate several different IPA algorithms to obtain an IPA algorithm library, set up an image preprocessing engine, and integrate the IPA algorithm library and the image preprocessing engine to obtain an initial image preprocessing module; According to a number of historical image preprocessing strategies and a number of historical painting image data, an initial image preprocessing module is optimized and trained to obtain a final image preprocessing module, and a number of preprocessed historical painting image data are generated; The final low-level feature extraction module, the final image preprocessing strategy generation module and the final image preprocessing module are integrated to obtain the image preprocessing model.

[0009] Furthermore, the painting defect analysis model is constructed based on the FPN-DBN-3D U2-Net algorithm, and the painting defect analysis model includes a multi-scale fusion feature extraction module constructed based on the FPN algorithm, a three-dimensional reconstruction module constructed based on the DBN algorithm, and a three-dimensional painting defect analysis module constructed based on the 3D U2-Net algorithm, which are connected in sequence.

[0010] Furthermore, based on a number of pre-processed historical painting image data, a painting defect analysis model is constructed using an image processing and three-dimensional reconstruction fusion algorithm, including the following steps: Use the CNN algorithm to build the basic network architecture of the multi-scale fusion feature extraction module; the basic network architecture includes alternately connected convolutional layers and pooling layers; Use the FPN algorithm to construct a feature pyramid, and connect the outputs of all convolutional layers to the feature pyramid horizontally in a top-down order to obtain the initial multi-scale fusion feature extraction module; Use the DBN algorithm to build the initial 3D reconstruction module, and use the 3D U2-Net algorithm to build the initial 3D coating defect analysis module; Integrating an initial multi-scale fusion feature extraction module, an initial three-dimensional reconstruction module, and an initial three-dimensional coating defect analysis module to obtain an initial three-dimensional coating defect analysis module; Using a swarm intelligence optimization algorithm, the initial network parameters of the initial three-dimensional coating defect analysis module are optimized to obtain an optimized three-dimensional coating defect analysis module; the optimized three-dimensional coating defect analysis module includes an optimized multi-scale fusion feature extraction module, an optimized three-dimensional reconstruction module and an optimized three-dimensional coating defect analysis module; According to a number of pre-processed historical painting image data, the optimized multi-scale fusion feature extraction module is trained and optimized to obtain the final multi-scale fusion feature extraction module, and a number of multi-scale fusion features of historical painting images are generated; According to the multi-scale fusion features of the dry historical painting images, the optimized 3D reconstruction module is trained and optimized to obtain the final 3D reconstruction module, and generate a number of historical painting 3D point cloud data; According to a number of historical coating 3D point cloud data, the optimized 3D coating defect analysis module is trained and optimized to obtain the final 3D coating defect analysis module; The final multi-scale fusion feature extraction module, the final 3D reconstruction module and the final 3D coating defect analysis module are integrated to obtain the final coating defect analysis model.

[0011] Furthermore, the initial network parameters of the initial three-dimensional coating defect analysis module are optimized using a swarm intelligence optimization algorithm to obtain an optimized three-dimensional coating defect analysis module, including the following steps: Taking minimizing the model error value as the optimization goal, setting the fitness function, and encoding the initial network parameters of the initial three-dimensional coating defect analysis module into the individual vector format of the swarm intelligence optimization algorithm; According to the fitness function and the individual vector format, initialization is performed to obtain several initial solutions, and the swarm intelligence optimization algorithm is used to iteratively update the initial solutions and retain the optimal individual; If the number of iterations reaches the iteration number threshold or the fitness value of the optimal individual is less than the fitness value threshold, the individual vector of the optimal individual is decoded to obtain the optimal initial network parameters; According to the optimal initial network parameters, the initial three-dimensional coating defect analysis module is optimized to obtain an optimized three-dimensional coating defect analysis module.

[0012] Furthermore, the edge computing gateway uses an image preprocessing model to preprocess the collected real-time painting image data, and uploads the obtained preprocessed real-time painting image data to the cloud data center, including the following steps: Edge computing gateway, collects real-time painting image data and inputs the real-time painting image data into the image preprocessing model; Using the low-level feature extraction module of the image preprocessing model, extracting the low-level features of the real-time painting image data; According to the low-level features of the real-time painting image, the state space of the agent of the image preprocessing strategy generation module of the image preprocessing model is updated to obtain an updated state space; Randomly extract a number of historical image preprocessing strategy generation experiences from the experience playback pool of the image preprocessing strategy generation module, and update the action space of the intelligent agent based on the number of historical image preprocessing strategy generation experiences to obtain an updated action space; According to the reward function, use the agent to control the policy network to generate the probability distribution of all possible actions in the updated action space corresponding to each state in the updated state space; The possible action with the highest probability distribution in the updated action space is taken as the execution action of the state, and the execution actions of all states in the updated state space are integrated to obtain the real-time image preprocessing strategy; According to the real-time image preprocessing strategy, the image preprocessing module of the image preprocessing model is used to preprocess the real-time painting image data to obtain the preprocessed real-time painting image data, and the preprocessed real-time painting image data is uploaded to the cloud data center.

[0013] Further, the cloud data center uses the coating defect analysis model to perform coating defect analysis on the pre-processed real-time coating image data to obtain real-time coating defect analysis results, including the following steps: The cloud data center uses the multi-scale fusion feature extraction module of the coating defect analysis model to extract the real-time coating image multi-scale fusion features of the pre-processed real-time coating image data; Use the 3D reconstruction module of the coating defect analysis model to perform 3D reconstruction on the multi-scale fusion features of the real-time coating image to obtain real-time 3D point cloud data of the coating; The three-dimensional coating defect analysis module of the coating defect analysis model is used to perform three-dimensional coating defect analysis on real-time coating three-dimensional point cloud data to obtain real-time coating defect analysis results.

[0014] A coating defect analysis system based on machine vision is used to implement a coating defect analysis method. The system includes a cloud data center and several edge computing gateways. The several edge computing gateways are respectively communicated with the cloud data center. The cloud data center includes a model building unit and a coating defect analysis unit connected in sequence.

[0015] The beneficial effects of the present invention are: The present invention provides a coating defect analysis method and system based on machine vision, which significantly reduces manual intervention through highly automated processing, thereby greatly improving analysis efficiency. By performing image preprocessing on the edge computing gateway, data transmission delay is reduced, and the analysis speed is further accelerated. The constructed image preprocessing model can effectively improve image quality and provide clearer and more reliable image data for subsequent defect analysis. Through image preprocessing, the model can highlight the characteristics of coating defects, making the subsequent defect analysis process more accurate and effective. The constructed coating defect analysis model can more finely identify defects in coating images, including tiny Cracks, bubbles and stains, etc., improve the accuracy of detection. Through multi-scale fusion feature extraction and 3D reconstruction technology, it can maintain high-accuracy defect detection under complex backgrounds and changing lighting conditions; optimize the image preprocessing and defect analysis algorithms, reduce the computational complexity, and ensure that the real-time detection needs on high-speed production lines are met. The deployment of edge computing gateways enables image data to be processed at a location close to the source, greatly reducing processing delays and improving real-time performance. Through the image preprocessing step, redundant information can be removed and the size of image data can be reduced, thereby reducing the computational complexity of subsequent coating defect analysis and improving the overall analysis speed.

[0016] Other beneficial effects of the present invention will be further described in the specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flowchart of the coating defect analysis method based on machine vision in the present invention.

[0018] Figure 2 It is a structural block diagram of the coating defect analysis system based on machine vision in the present invention. DETAILED DESCRIPTION

[0019] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments.

[0020] Embodiment 1: like Figure 1 As shown, this embodiment provides a coating defect analysis method based on machine vision, comprising the following steps: S1: Cloud data center, using artificial intelligence algorithms to build image preprocessing models and coating defect analysis models, and deploying the image preprocessing models to all edge computing gateways, including the following steps: S1-1: The cloud data center uses deep learning and image processing fusion algorithms to build an image preprocessing model based on a number of historical painting image data, and generates a number of preprocessed historical painting image data; The image preprocessing model is constructed based on the Convolutional Neural Networks (CNN)-Proximal Policy Optimization (PPO)-Image Preprocessing Algorithms (IPA) algorithm, and the image preprocessing model includes a low-level feature extraction module constructed based on the CNN algorithm, an image preprocessing strategy generation module constructed based on the PPO algorithm, and an image preprocessing module constructed based on the IPA algorithm, which are connected in sequence; The low-level feature extraction module is used to extract low-level features of coating image data, including illumination features, noise features, and resolution features. These features provide the basic attributes and context information of the image for the subsequent preprocessing strategy generation, and are used to select the corresponding image preprocessing algorithm and set the preprocessing parameters of the image preprocessing algorithm during image preprocessing; the image preprocessing strategy generation module is used to learn a strategy that can generate a control strategy for the image preprocessing engine based on low-level features, such as contrast adjustment, brightness correction, denoising, etc. It can automatically adjust the preprocessing parameters according to the image content, improve the adaptability of the preprocessing, and use reinforcement learning to generate a control strategy for the image preprocessing engine. , PPO can find the optimal or near-optimal preprocessing strategy, and the automated strategy generation reduces the need for manual parameter adjustment; the image preprocessing module is used to select the corresponding IPA algorithm in the IPA algorithm library according to the control strategy, such as contrast enhancement, brightness adjustment, histogram equalization, filtering, sharpening, etc., which can deal with different image quality problems and automatically adjust the preprocessing parameters to perform automated image preprocessing on the coating image data, ensuring that the strategy generated by PPO can be effectively executed and improving the effect of preprocessing. Through preprocessing, the image quality is improved, laying the foundation for subsequent model analysis and defect identification; The cloud data center uses deep learning and image processing fusion algorithms to build an image preprocessing model based on a number of historical painting image data, and generates a number of preprocessed historical painting image data, including the following steps: S1-1-1: The cloud data center collects some historical painting image data and uses the CNN algorithm to build an initial low-level feature extraction module, initializing a network structure that can recognize basic image features; S1-1-2: Based on several historical painting image data, the initial low-level feature extraction module is optimized and trained, and the network weights are optimized through back propagation and gradient descent algorithms to obtain the final low-level feature extraction module and generate several low-level features of historical painting images; the accuracy and generalization ability of the feature extraction module are improved, and more accurate low-level features of historical painting images are generated; S1-1-3: Use the PPO algorithm to build the policy network and agent of the image preprocessing strategy generation module, and use the experience replay mechanism to initialize the experience replay pool; this provides a reinforcement learning-based framework for the generation of image preprocessing strategies, and the experience replay mechanism helps improve the stability and efficiency of training; S1-1-4: Define the state space, action space and reward function of the agent, and obtain the initial image preprocessing strategy generation module based on the policy network, experience replay pool and agent; the state space defines all states that the agent can observe, including illumination state, noise state and resolution state, etc. The action space defines all possible actions that the agent can take, such as calling contrast enhancement algorithm, calling brightness adjustment algorithm, calling histogram equalization algorithm, calling filtering algorithm, calling sharpening algorithm, setting preprocessing parameters, etc. The reward function is used to evaluate the effect of the agent's actions; the decision scope of the agent in the preprocessing strategy generation process is clarified, and the reward function provides a goal for strategy optimization; S1-1-5: Based on the low-level features of several historical painting images, the initial image preprocessing strategy generation module is optimized and trained to obtain the final image preprocessing strategy generation module, and several historical image preprocessing strategies are generated; S1-1-6: The image preprocessing strategy generation module collects several historical image preprocessing strategy generation experiences during the optimization training process, and stores several historical image preprocessing strategy generation experiences in the experience replay pool; the data in the experience replay pool can be used for subsequent training to improve the robustness of the model; S1-1-7: Integrate several different IPA algorithms to obtain an IPA algorithm library, set up an image preprocessing engine, and integrate the IPA algorithm library and the image preprocessing engine to obtain an initial image preprocessing module; provide a variety of preprocessing algorithms to deal with different image problems, and the image preprocessing engine provides an execution environment for the application of the algorithm; S1-1-8: According to a number of historical image preprocessing strategies and a number of historical painting image data, an initial image preprocessing module is optimized and trained to obtain a final image preprocessing module, and a number of preprocessed historical painting image data are generated; S1-1-9: Integrate the final low-level feature extraction module, the final image preprocessing strategy generation module and the final image preprocessing module to obtain an image preprocessing model; S1-2: Based on several pre-processed historical painting image data, a painting defect analysis model is constructed using image processing and 3D reconstruction fusion algorithms; The coating defect analysis model is constructed based on the Feature Pyramid Networks (FPN)-Deep Belief Network (DBN)-3D Unet with U-shaped architecture (3D U2-Net) algorithm, and the coating defect analysis model includes a multi-scale fusion feature extraction module constructed based on the FPN algorithm, a three-dimensional reconstruction module constructed based on the DBN algorithm, and a three-dimensional coating defect analysis module constructed based on the 3D U2-Net algorithm, which are sequentially connected; The multi-scale fusion feature extraction module extracts hierarchical features in the image through a series of convolutional layers, activation functions and pooling layers, and uses jump connections to fuse feature maps of different levels extracted by CNN. Through upsampling and lateral connections, a feature pyramid is constructed to pass high-level semantic information to low-level layers to enhance the semantic expression ability of low-level features. In this way, low-level detail features and high-level semantic features can be effectively combined to improve the accuracy of multi-scale fusion feature extraction and the expression ability of features. Multi-scale fusion features include texture, color, boundaries, etc.; the three-dimensional reconstruction module is used to process the multi-scale features output by FPN, further extract high-level abstract features, and reconstruct three-dimensional structures, providing three-dimensional information of defects, which helps to more accurately analyze the shape and depth of defects; the three-dimensional coating defect analysis module is a network structure designed for three-dimensional data, with a U-shaped architecture, which can perform effective feature encoding and decoding. The module uses 3D U2-Net to further process the three-dimensional point cloud data output by DBN to achieve accurate segmentation and analysis of defects, and can accurately segment the three-dimensional contours of coating defects. The U-shaped network structure helps to retain the contextual information of defects, and improves the accuracy of defect analysis through deep feature extraction and accurate segmentation; Based on several pre-processed historical painting image data, a painting defect analysis model is constructed using image processing and 3D reconstruction fusion algorithms, including the following steps: S1-2-1: Use the CNN algorithm to build the basic network architecture of the multi-scale fusion feature extraction module; the basic network architecture includes alternating convolutional layers and pooling layers; it provides a basic structure for multi-scale feature extraction, and the combination of convolutional layers and pooling layers can effectively extract hierarchical features of images; S1-2-2: Use the FPN algorithm to construct a feature pyramid, and connect the outputs of all convolutional layers to the feature pyramid in a top-down order to obtain the initial multi-scale fusion feature extraction module; the feature pyramid can fuse features at different levels, improve the semantic expression ability of features, and effectively combine low-level detail features and high-level semantic features; S1-2-3: Use the DBN algorithm to build the initial 3D reconstruction module, and use the 3D U2-Net algorithm to build the initial 3D coating defect analysis module; the 3D reconstruction module provides 3D information of the defect, which helps to analyze more accurately, and the 3D U2-Net module can perform accurate defect segmentation and analysis; S1-2-4: Integrate the initial multi-scale fusion feature extraction module, the initial three-dimensional reconstruction module and the initial three-dimensional coating defect analysis module to obtain an initial three-dimensional coating defect analysis module; S1-2-5: Using the Improved Sparrow Search Algorithm (ISSA) algorithm, the initial network parameters of the initial three-dimensional coating defect analysis module are optimized to obtain an optimized three-dimensional coating defect analysis module, including the following steps: S1-2-5-1: Taking minimizing the model error value as the optimization goal, setting the fitness function, and encoding the initial network parameters of the initial three-dimensional coating defect analysis module into the individual vector format of the swarm intelligence optimization algorithm; The formula of the fitness function is:

[0021] In the formula, ISSA individual The fitness value function of is the model error value; is the ISSA individual variable; c is the ISSA individual indicator; S1-2-5-2: Initialize according to the fitness function and the individual vector format to obtain several initial solutions, and use the swarm intelligence optimization algorithm to iteratively update the initial solutions and retain the optimal individual, including the following steps: S1-2-5-2-1: Use the Circle chaotic mapping sequence for initialization to obtain the initial ISSA population, which includes several initial ISSA individuals; The formula is:

[0022] In the formula, is the initial ISSA individual of Circle chaos mapping; is the randomly generated initial ISSA individual; c is the ISSA individual indicator; To find the remainder function; S1-2-5-2-2: Use the real-time fitness function to obtain the real-time fitness value of each initial ISSA individual in the initial ISSA population; S1-2-5-2-3: Sort the initial ISSA individuals according to their fitness values ​​to obtain the initial discoverers, initial joiners and initial predators; S1-2-5-2-4: update the initial ISSA population to obtain an updated ISSA population; the updated ISSA population includes updated discoverers, updated joiners and updated predators; The update formula of the discoverer is:

[0023] In the formula, Respectively t +1, t The iteration c ISSA individuals who discovered it; is the maximum number of iterations; is a random number between 0 and 1; is a normally distributed random number; for A matrix whose elements are all 1; is the warning value; is the safety threshold; The update formula for the joiner is:

[0024] In the formula, Respectively t +1, t The iteration c ISSA individuals who join; The best position for the exposed person to occupy; is the current worst position; is a random number between 0 and 1; for A matrix whose elements are all 1 or -1; c Indicates the amount for sparrows; is the total number of ISSA individuals; To update the parameters; The update formula of the predator is:

[0025] In the formula, Respectively t +1, t The iteration c predator ISSA individuals; is the step size control parameter, and , is the convergence factor, A positive real number that controls the step size that is not 0; is the current best position; are the current, best and worst fitness of ISSA individuals respectively; is the minimum constant to prevent the denominator from being 0;

[0026] In the formula, is the convergence factor; tanh(.) is the hyperbolic tangent function; , are the maximum and minimum values ​​of the convergence factor, respectively; λ is the deceleration rate parameter, is the decreasing cycle parameter, λ =-2 π , = π ; S1-2-5-2-5: Use the dynamic reverse learning algorithm to perform dynamic reverse learning on the updated ISSA population to generate a dynamic reverse ISSA population; The formula is:

[0027] In the formula, is a dynamically reversed ISSA individual; is the decreasing inertia coefficient; is the upper limit of the search space in the constraints; is the lower limit of the search space in the constraints; For the updated ISSA entity; S1-2-5-2-6: Use the Gaussian mutation algorithm to perform dynamic reverse learning on the updated ISSA population to generate a Gaussian mutated ISSA population; The formula is:

[0028] In the formula, ISSA individuals with Gaussian variation; For the updated ISSA entity; is the Gaussian variation parameter; S1-2-5-2-7: According to the fitness function, calculate the fitness values ​​of all ISSA individuals in the updated ISSA population, the dynamically reversed ISSA population, and the Gaussian mutated ISSA population, and take the ISSA individual with the minimum fitness value as the optimal individual; Improved the training efficiency and performance of the model. Through the swarm intelligence optimization algorithm, a better network parameter configuration was found, avoiding the defect that the model is sensitive to initial values. S1-2-5-3: If the number of iterations reaches the iteration number threshold or the fitness value of the optimal individual is less than the fitness value threshold, the individual vector of the optimal individual is decoded to obtain the optimal initial network parameters; S1-2-5-4: optimizing the initial three-dimensional coating defect analysis module according to the optimal initial network parameters to obtain an optimized three-dimensional coating defect analysis module; the optimized three-dimensional coating defect analysis module includes an optimized multi-scale fusion feature extraction module, an optimized three-dimensional reconstruction module and an optimized three-dimensional coating defect analysis module; S1-2-7: Based on a number of pre-processed historical painting image data, the optimized multi-scale fusion feature extraction module is trained and optimized to obtain the final multi-scale fusion feature extraction module, and a number of multi-scale fusion features of historical painting images are generated; the accuracy and generalization ability of feature extraction are improved; S1-2-8: According to the multi-scale fusion features of the dry historical painting images, the optimized 3D reconstruction module is trained and optimized to obtain the final 3D reconstruction module, and a number of historical painting 3D point cloud data are generated; S1-2-9: training and optimizing the optimized three-dimensional coating defect analysis module according to a number of historical coating three-dimensional point cloud data to obtain a final three-dimensional coating defect analysis module; S1-2-10: Integrate the final multi-scale fusion feature extraction module, the final 3D reconstruction module and the final 3D coating defect analysis module to obtain the final coating defect analysis model; S1-3: extract model metadata of the image preprocessing model and send the model metadata to all edge computing gateways connected to the cloud data center; S1-4: Receive the model deployment success signal returned by the edge computing gateway. If the model deployment success signals of all edge computing gateways are received, the model deployment is completed; S2: The edge computing gateway uses the image preprocessing model to preprocess the collected real-time painting image data, and uploads the preprocessed real-time painting image data to the cloud data center, including the following steps: S2-1: Edge computing gateway, collects real-time painting image data and inputs the real-time painting image data into the image preprocessing model; the preprocessing model can process real-time data and feedback the results in time, which improves the real-time performance and response speed. In addition, the image preprocessing is delegated to the edge computing gateway, avoiding the shortage of computing resources in the cloud data center. S2-2: Use the low-level feature extraction module of the image preprocessing model to extract the low-level features of the real-time painting image data; the low-level features provide necessary information for the subsequent preprocessing strategy generation, which helps the model better understand the image content and prepare for preprocessing; S2-3: According to the low-level features of the real-time painting image, the state space of the intelligent agent of the image preprocessing strategy generation module of the image preprocessing model is updated to obtain an updated state space; this ensures that the preprocessing strategy generation module can be adjusted according to the actual situation of the current image, thereby improving the adaptability and flexibility of the preprocessing strategy; S2-4: Randomly extract several historical image preprocessing strategy generation experiences from the experience playback pool of the image preprocessing strategy generation module, and update the action space of the agent based on the several historical image preprocessing strategy generation experiences to obtain an updated action space; use historical experience to guide the current action selection, improve the efficiency of strategy generation, and update the action space to help the agent better explore and utilize the preprocessing strategy; S2-5: Based on the reward function, the agent is used to control the policy network to generate the probability distribution of all possible actions in the updated action space corresponding to each state in the updated state space; the generation of the action probability distribution enables the agent to select the optimal action according to different states, thereby improving the intelligence and adaptability of the preprocessing strategy generation; S2-6: The possible action with the highest probability distribution in the updated action space is taken as the execution action of the state, and the execution actions of all states in the updated state space are integrated to obtain the real-time image preprocessing strategy; the optimization of the preprocessing strategy is ensured, and the real-time image preprocessing strategy can be customized according to the characteristics of the current image; S2-7: According to the real-time image preprocessing strategy, the image preprocessing module of the image preprocessing model is used to preprocess the real-time painting image data to obtain the preprocessed real-time painting image data, and the preprocessed real-time painting image data is uploaded to the cloud data center; the quality of the preprocessed image data is improved, which is more suitable for subsequent image analysis and defect detection. The real-time upload of data enables the cloud data center to perform further processing and analysis in a timely manner, thereby improving the response speed and efficiency of the entire system; S3: Cloud data center uses the coating defect analysis model to perform coating defect analysis on the pre-processed real-time coating image data to obtain real-time coating defect analysis results, including the following steps: S3-1: Cloud data center, using the multi-scale fusion feature extraction module of the coating defect analysis model to extract the real-time coating image multi-scale fusion features of the pre-processed real-time coating image data; multi-scale feature fusion can capture the detailed information and global structure in the image, which helps to identify defects more accurately and improves the model's detection ability for coating defects, especially defects at different scales and in complex backgrounds; S3-2: Use the 3D reconstruction module of the coating defect analysis model to perform 3D reconstruction on the multi-scale fusion features of the real-time coating image to obtain real-time 3D point cloud data of the coating; 3D reconstruction provides a more intuitive defect representation, making defect analysis more comprehensive and accurate, and can analyze defects from different perspectives, which helps to gain a deeper understanding of the nature and causes of defects; S3-3: Use the three-dimensional coating defect analysis module of the coating defect analysis model to perform three-dimensional coating defect analysis on the real-time coating three-dimensional point cloud data to obtain real-time coating defect analysis results; three-dimensional coating defect analysis can more accurately locate and classify defects, improve the accuracy of defect detection, and for complex shapes and deep-seated defects, three-dimensional analysis has more advantages than two-dimensional analysis and can provide more reliable detection results. Real-time coating defect analysis results help to provide timely feedback to the production line, so as to quickly take measures to reduce the generation of defective products and improve production quality and efficiency.

[0029] Embodiment 2: like Figure 2 As shown, this embodiment provides a coating defect analysis system based on machine vision, which is used to implement a coating defect analysis method. The system includes a cloud data center and several edge computing gateways, and the several edge computing gateways are respectively connected to the cloud data center for communication. The cloud data center includes a model building unit and a coating defect analysis unit connected in sequence; The edge computing gateway is used to pre-process the collected real-time painting image data using an image pre-processing model, and upload the obtained pre-processed real-time painting image data to a cloud data center; A model building unit, which is used to build an image preprocessing model and a coating defect analysis model using an artificial intelligence algorithm, and deploy the image preprocessing model to all edge computing gateways; The coating defect analysis unit is used to use the coating defect analysis model to perform coating defect analysis on the pre-processed real-time coating image data to obtain real-time coating defect analysis results.

[0030] The present invention provides a coating defect analysis method and system based on machine vision, which significantly reduces manual intervention through highly automated processing, thereby greatly improving analysis efficiency. By performing image preprocessing on the edge computing gateway, data transmission delay is reduced, and the analysis speed is further accelerated. The constructed image preprocessing model can effectively improve image quality and provide clearer and more reliable image data for subsequent defect analysis. Through image preprocessing, the model can highlight the characteristics of coating defects, making the subsequent defect analysis process more accurate and effective. The constructed coating defect analysis model can more finely identify defects in coating images, including tiny Cracks, bubbles and stains, etc., improve the accuracy of detection. Through multi-scale fusion feature extraction and 3D reconstruction technology, it can maintain high-accuracy defect detection under complex backgrounds and changing lighting conditions; optimize the image preprocessing and defect analysis algorithms, reduce the computational complexity, and ensure that the real-time detection needs on high-speed production lines are met. The deployment of edge computing gateways enables image data to be processed at a location close to the source, greatly reducing processing delays and improving real-time performance. Through the image preprocessing step, redundant information can be removed and the size of image data can be reduced, thereby reducing the computational complexity of subsequent coating defect analysis and improving the overall analysis speed.

[0031] The present invention is not limited to the above optional implementations, and anyone can derive other various forms of products under the enlightenment of the present invention. The above specific implementations should not be understood as limiting the scope of protection of the present invention. The scope of protection of the present invention should be based on the definition in the claims, and the description can be used to interpret the claims.

Claims

1. A coating defect analysis method based on machine vision, characterized in that: The steps include: The cloud data center uses artificial intelligence algorithms to build image preprocessing models and coating defect analysis models, and deploys the image preprocessing models to all edge computing gateways; The edge computing gateway uses an image preprocessing model to preprocess the collected real-time painting image data, and uploads the obtained preprocessed real-time painting image data to the cloud data center; The cloud data center uses the coating defect analysis model to perform coating defect analysis on the pre-processed real-time coating image data to obtain real-time coating defect analysis results; The cloud data center uses artificial intelligence algorithms to build image preprocessing models and coating defect analysis models, and deploys the image preprocessing models to all edge computing gateways, including the following steps: The cloud data center uses deep learning and image processing fusion algorithms to build an image preprocessing model based on a number of historical painting image data, and generates a number of preprocessed historical painting image data; Based on several pre-processed historical painting image data, a painting defect analysis model is constructed using image processing and 3D reconstruction fusion algorithms; Extract model metadata of the image preprocessing model and send the model metadata to all edge computing gateways connected to the cloud data center; Receive the model deployment success signal returned by the edge computing gateway. If the model deployment success signals of all edge computing gateways are received, the model deployment is completed; The image preprocessing model is constructed based on the CNN-PPO-IPA algorithm, and the image preprocessing model includes a low-level feature extraction module constructed based on the CNN algorithm, an image preprocessing strategy generation module constructed based on the PPO algorithm, and an image preprocessing module constructed based on the IPA algorithm, which are connected in sequence.

2. The coating defect analysis method based on machine vision according to claim 1, characterized in that: The cloud data center uses deep learning and image processing fusion algorithms to build an image preprocessing model based on a number of historical painting image data, and generates a number of preprocessed historical painting image data, including the following steps: The cloud data center collects some historical painting image data and uses the CNN algorithm to build an initial low-level feature extraction module; According to a number of historical painting image data, the initial low-level feature extraction module is optimized and trained to obtain a final low-level feature extraction module, and a number of historical painting image low-level features are generated; Use the PPO algorithm to build the policy network and agent of the image preprocessing strategy generation module, and use the experience replay mechanism to initialize the experience replay pool; Define the state space, action space and reward function of the agent, and obtain the initial image preprocessing strategy generation module based on the strategy network, experience replay pool and agent; According to the low-level features of several historical painting images, the initial image preprocessing strategy generation module is optimized and trained to obtain the final image preprocessing strategy generation module, and several historical image preprocessing strategies are generated; The image preprocessing strategy generation module collects several historical image preprocessing strategy generation experiences during the optimization training process, and stores several historical image preprocessing strategy generation experiences in the experience playback pool; Integrate several different IPA algorithms to obtain an IPA algorithm library, set up an image preprocessing engine, and integrate the IPA algorithm library and the image preprocessing engine to obtain an initial image preprocessing module; According to a number of historical image preprocessing strategies and a number of historical painting image data, an initial image preprocessing module is optimized and trained to obtain a final image preprocessing module, and a number of preprocessed historical painting image data are generated; The final low-level feature extraction module, the final image preprocessing strategy generation module and the final image preprocessing module are integrated to obtain the image preprocessing model.

3. The coating defect analysis method based on machine vision according to claim 1, characterized in that: The coating defect analysis model is constructed based on the FPN-DBN-3D U2-Net algorithm, and the coating defect analysis model includes a multi-scale fusion feature extraction module constructed based on the FPN algorithm, a three-dimensional reconstruction module constructed based on the DBN algorithm, and a three-dimensional coating defect analysis module constructed based on the 3D U2-Net algorithm, which are connected in sequence.

4. The coating defect analysis method based on machine vision according to claim 3 is characterized in that: Based on several pre-processed historical painting image data, a painting defect analysis model is constructed using image processing and 3D reconstruction fusion algorithms, including the following steps: Using the CNN algorithm, a basic network architecture of a multi-scale fusion feature extraction module is constructed; the basic network architecture includes alternately connected convolutional layers and pooling layers; Use the FPN algorithm to construct a feature pyramid, and connect the outputs of all convolutional layers to the feature pyramid horizontally in a top-down order to obtain the initial multi-scale fusion feature extraction module; Use the DBN algorithm to build the initial 3D reconstruction module, and use the 3D U2-Net algorithm to build the initial 3D coating defect analysis module; Integrating an initial multi-scale fusion feature extraction module, an initial three-dimensional reconstruction module, and an initial three-dimensional coating defect analysis module to obtain an initial three-dimensional coating defect analysis module; Using a swarm intelligence optimization algorithm, the initial network parameters of the initial three-dimensional coating defect analysis module are optimized to obtain an optimized three-dimensional coating defect analysis module; the optimized three-dimensional coating defect analysis module includes an optimized multi-scale fusion feature extraction module, an optimized three-dimensional reconstruction module and an optimized three-dimensional coating defect analysis module; According to a number of pre-processed historical painting image data, the optimized multi-scale fusion feature extraction module is trained and optimized to obtain the final multi-scale fusion feature extraction module, and a number of multi-scale fusion features of historical painting images are generated; According to the multi-scale fusion features of the dry historical painting images, the optimized 3D reconstruction module is trained and optimized to obtain the final 3D reconstruction module, and generate a number of historical painting 3D point cloud data; According to a number of historical coating 3D point cloud data, the optimized 3D coating defect analysis module is trained and optimized to obtain the final 3D coating defect analysis module; The final multi-scale fusion feature extraction module, the final 3D reconstruction module and the final 3D coating defect analysis module are integrated to obtain the final coating defect analysis model.

5. The coating defect analysis method based on machine vision according to claim 4 is characterized in that: Using a swarm intelligence optimization algorithm, the initial network parameters of the initial three-dimensional coating defect analysis module are optimized to obtain an optimized three-dimensional coating defect analysis module, including the following steps: Taking minimizing the model error value as the optimization goal, setting the fitness function, and encoding the initial network parameters of the initial three-dimensional coating defect analysis module into the individual vector format of the swarm intelligence optimization algorithm; According to the fitness function and the individual vector format, initialization is performed to obtain several initial solutions, and the swarm intelligence optimization algorithm is used to iteratively update the initial solutions and retain the optimal individual; If the number of iterations reaches the iteration number threshold or the fitness value of the optimal individual is less than the fitness value threshold, the individual vector of the optimal individual is decoded to obtain the optimal initial network parameters; According to the optimal initial network parameters, the initial three-dimensional coating defect analysis module is optimized to obtain an optimized three-dimensional coating defect analysis module.

6. The coating defect analysis method based on machine vision according to claim 2 is characterized in that: The edge computing gateway uses the image preprocessing model to preprocess the collected real-time painting image data, and uploads the obtained preprocessed real-time painting image data to the cloud data center, including the following steps: Edge computing gateway, collects real-time painting image data and inputs the real-time painting image data into the image preprocessing model; Using the low-level feature extraction module of the image preprocessing model, extracting the low-level features of the real-time painting image data; According to the low-level features of the real-time painting image, the state space of the agent of the image preprocessing strategy generation module of the image preprocessing model is updated to obtain an updated state space; Randomly extract a number of historical image preprocessing strategy generation experiences from the experience playback pool of the image preprocessing strategy generation module, and update the action space of the intelligent agent based on the number of historical image preprocessing strategy generation experiences to obtain an updated action space; According to the reward function, use the agent to control the policy network to generate the probability distribution of all possible actions in the updated action space corresponding to each state in the updated state space; The possible action with the highest probability distribution in the updated action space is taken as the execution action of the state, and the execution actions of all states in the updated state space are integrated to obtain the real-time image preprocessing strategy; According to the real-time image preprocessing strategy, the image preprocessing module of the image preprocessing model is used to preprocess the real-time painting image data to obtain the preprocessed real-time painting image data, and the preprocessed real-time painting image data is uploaded to the cloud data center.

7. The coating defect analysis method based on machine vision according to claim 4 is characterized in that: The cloud data center uses the coating defect analysis model to perform coating defect analysis on the pre-processed real-time coating image data to obtain real-time coating defect analysis results, including the following steps: The cloud data center uses the multi-scale fusion feature extraction module of the coating defect analysis model to extract the real-time coating image multi-scale fusion features of the pre-processed real-time coating image data; Use the 3D reconstruction module of the coating defect analysis model to perform 3D reconstruction on the multi-scale fusion features of the real-time coating image to obtain real-time 3D point cloud data of the coating; The three-dimensional coating defect analysis module of the coating defect analysis model is used to perform three-dimensional coating defect analysis on real-time coating three-dimensional point cloud data to obtain real-time coating defect analysis results.

8. A coating defect analysis system based on machine vision, used to implement the coating defect analysis method according to any one of claims 1 to 7, characterized in that: The system includes a cloud data center and several edge computing gateways, wherein the several edge computing gateways are respectively communicated with the cloud data center, and the cloud data center includes a model building unit and a coating defect analysis unit connected in sequence.

Citation Information

Patent Citations

  • Power transformation equipment typical visual defect detection system and method based on edge cloud cooperation

    CN111307823A

  • Equipment anomaly detection system and method based on cloud edge cooperation mode

    CN115098330A

  • Automatic substrate glass surface defect detection method and system based on machine vision

    CN119006469A

  • Intelligent power grid fault early warning and diagnosis system

    CN119471181A

  • Power transmission line defect identification method and system based on edge computing

    WO2023005100A1