A method and system for analyzing painting defects based on machine vision

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

CN119722689BActive Publication Date: 2025-06-24SHANGHAI KEWAN MASCH EQUIP TECH SERVICE CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The existing coating defect analysis technology has problems such as low analysis efficiency, low analysis accuracy and insufficient real-time performance.

Method used

Using a machine vision-based approach, through the collaborative work of cloud data centers and edge computing gateways, an image preprocessing model and coating defect analysis model are constructed using artificial intelligence algorithms to perform image preprocessing and defect analysis.

Benefits of technology

It significantly improves analysis efficiency and accuracy, meets the real-time detection requirements on high-speed production lines, and reduces data transmission delay and computing complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722689B_ABST
    Figure CN119722689B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of machine vision, and discloses a method and system for analyzing painting defects based on machine vision. The method includes the following steps: A cloud data center uses artificial intelligence algorithms to construct an image preprocessing model and a painting defect analysis model, and deploys the image preprocessing model to all edge computing gateways; 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; The cloud data center uses the painting defect analysis model to analyze the preprocessed real-time painting image data to obtain a real-time painting defect analysis result. The present invention solves the problems of low analysis efficiency, low analysis accuracy, and insufficient real-time performance existing in the prior art.
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 particularly relates to a method and system for analyzing coating defects based on machine vision. Background Art

[0002] In the manufacturing industry, the main purpose of coating is to provide a protective layer to prevent the substrate from corrosion. Any coating defect may lead to corrosion, thus shortening the service life of the product. The coating quality 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 not only concerns the appearance but also the safety performance of the product. For example, coating defects may cause corrosion, which in turn affects the structural strength. Through the analysis of coating defects, problems in the coating process can be identified, thereby optimizing the process flow and improving production efficiency. With the development of automation and machine vision technology, the analysis of coating defects has become more efficient and accurate, making the implementation of defect analysis more feasible and economical.

[0003] The existing coating defect analysis technologies have the following defects:

[0004] 1) Low analysis efficiency: Although the existing coating defect analysis methods use machine vision technology to a certain extent, a large amount of manual intervention is required by humans, resulting in low analysis efficiency and high cost investment;

[0005] 2) Low analysis accuracy: The existing coating defect analysis methods adopt simple models and cannot identify fine defect situations in coating images. Moreover, in complex backgrounds or variable lighting conditions, the analysis accuracy will decrease significantly;

[0006] 3) Lack of real-time performance: The existing technologies may have delays in processing a large amount 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

[0007] In order to solve the problems of low analysis efficiency, low analysis accuracy, and lack of real-time performance existing in the prior art, the purpose of the present invention is to provide a method and system for analyzing coating defects based on machine vision.

[0008] The technical solution adopted by the present invention is as follows:

[0009] A method for analyzing coating defects based on machine vision includes the following steps:

[0010] A cloud data center uses artificial intelligence algorithms to construct an image preprocessing model and a coating defect analysis model, and deploys the image preprocessing model to all edge computing gateways;

[0011] An edge computing gateway uses an 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;

[0012] The cloud data center uses a painting defect analysis model to analyze the preprocessed real-time painting image data and obtain the real-time painting defect analysis result.

[0013] Furthermore, the cloud data center uses artificial intelligence algorithms to build an image preprocessing model and a painting defect analysis model, and deploys the image preprocessing model to all edge computing gateways, including the following steps:

[0014] The cloud data center constructs an image preprocessing model according to a number of historical painting image data, using a deep learning and image processing fusion algorithm, and generates a number of preprocessed historical painting image data;

[0015] According to a number of preprocessed historical painting image data, a painting defect analysis model is constructed using an image processing and 3D reconstruction fusion algorithm;

[0016] Extract the model metadata of the image preprocessing model and send the model metadata to all edge computing gateways connected to the cloud data center;

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

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

[0019] Furthermore, the cloud data center constructs an image preprocessing model according to a number of historical painting image data, using a deep learning and image processing fusion algorithm, and generates a number of preprocessed historical painting image data, including the following steps:

[0020] The cloud data center collects a number of historical painting image data and uses the CNN algorithm to construct an initial low-level feature extraction module;

[0021] According to a number of historical painting image data, the initial low-level feature extraction module is optimized and trained to obtain the final low-level feature extraction module, and a number of historical painting image low-level features are generated;

[0022] Using the PPO algorithm, construct the policy network and agent of the image preprocessing strategy generation module, and use the experience replay mechanism to initialize the experience replay pool;

[0023] 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;

[0024] Optimize and train the initial image preprocessing strategy generation module according to the low-level features of several historical painting images to obtain the final image preprocessing strategy generation module, and generate several historical image preprocessing strategies;

[0025] Collect several historical image preprocessing strategy generation experiences during the optimization training process of the image preprocessing strategy generation module, and store the several historical image preprocessing strategy generation experiences in the experience replay pool;

[0026] 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 the initial image preprocessing module;

[0027] Optimize and train the initial image preprocessing module according to several historical image preprocessing strategies and several historical painting image data to obtain the final image preprocessing module, and generate several preprocessed historical painting image data;

[0028] Integrate the final low-level feature extraction module, the final image preprocessing strategy generation module, and the final image preprocessing module to obtain the image preprocessing model.

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

[0030] Furthermore, according to several preprocessed historical painting image data, use the image processing and three-dimensional reconstruction fusion algorithm to construct the painting defect analysis model, including the following steps:

[0031] Use the CNN algorithm to construct the basic network architecture of the multi-scale fusion feature extraction module; the basic network architecture includes alternately connected convolutional layers and pooling layers;

[0032] Use the FPN algorithm to construct a feature pyramid, and horizontally 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;

[0033] Use the DBN algorithm to construct an initial 3D reconstruction module, and use the 3D U2-Net algorithm to construct an initial 3D painting defect analysis module;

[0034] Integrate the initial multi-scale fusion feature extraction module, the initial 3D reconstruction module, and the initial 3D painting defect analysis module to obtain an initial 3D painting defect analysis module;

[0035] Use the swarm intelligence optimization algorithm to optimize the initial network parameters of the initial 3D painting defect analysis module to obtain an optimized 3D painting defect analysis module; the optimized 3D painting defect analysis module includes an optimized multi-scale fusion feature extraction module, an optimized 3D reconstruction module, and an optimized 3D painting defect analysis module;

[0036] According to a number of preprocessed historical painting image data, train and optimize the optimized multi-scale fusion feature extraction module to obtain a final multi-scale fusion feature extraction module, and generate a number of multi-scale fusion features of historical painting images;

[0037] According to the multi-scale fusion features of historical painting images, train and optimize the optimized 3D reconstruction module to obtain a final 3D reconstruction module, and generate a number of historical painting 3D point cloud data;

[0038] According to a number of historical painting 3D point cloud data, train and optimize the optimized 3D painting defect analysis module to obtain a final 3D painting defect analysis module;

[0039] Integrate the final multi-scale fusion feature extraction module, the final 3D reconstruction module, and the final 3D painting defect analysis module to obtain a final painting defect analysis model.

[0040] Furthermore, using the swarm intelligence optimization algorithm to optimize the initial network parameters of the initial 3D painting defect analysis module to obtain an optimized 3D painting defect analysis module includes the following steps:

[0041] Taking the minimization of the model error value as the optimization goal, set the fitness function, and encode the initial network parameters of the initial 3D painting defect analysis module into the individual vector format of the swarm intelligence optimization algorithm;

[0042] According to the fitness function and the individual vector format, perform initialization to obtain a number of initial solutions, and use the swarm intelligence optimization algorithm to iteratively update the number of initial solutions and retain the optimal individual;

[0043] 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, then decode the individual vector of the optimal individual to obtain the optimal initial network parameters;

[0044] Optimize the initial 3D painting defect analysis module according to the optimal initial network parameters to obtain an optimized 3D painting defect analysis module.

[0045] Furthermore, the edge computing gateway uses an 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:

[0046] The edge computing gateway collects real-time painting image data and inputs the real-time painting image data into the image preprocessing model;

[0047] Use the low-level feature extraction module of the image preprocessing model to extract the low-level features of the real-time painting image in the real-time painting image data;

[0048] According to the low-level features of the real-time painting image, update the state space of the agent in the image preprocessing strategy generation module of the image preprocessing model to obtain an updated state space;

[0049] Randomly extract a number of historical image preprocessing strategy generation experiences from the experience replay pool in the image preprocessing strategy generation module, and update the action space of the agent according to the number of historical image preprocessing strategy generation experiences to obtain an updated action space;

[0050] 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;

[0051] Take the possible action with the highest probability distribution in the updated action space as the execution action of the state, and integrate the execution actions of all states in the updated state space to obtain a real-time image preprocessing strategy;

[0052] According to the real-time image preprocessing strategy, use the image preprocessing module of the image preprocessing model to preprocess the real-time painting image data to obtain preprocessed real-time painting image data, and upload the preprocessed real-time painting image data to the cloud data center.

[0053] Furthermore, the cloud data center uses a painting defect analysis model to analyze the preprocessed real-time painting image data to obtain real-time painting defect analysis results, including the following steps:

[0054] The cloud data center uses the multi-scale fusion feature extraction module of the painting defect analysis model to extract the multi-scale fusion features of the real-time painting image in the preprocessed real-time painting image data;

[0055] Use the 3D reconstruction module of the painting defect analysis model to perform 3D reconstruction on the multi-scale fusion features of the real-time painting image, and obtain the real-time painting 3D point cloud data;

[0056] Use the 3D painting defect analysis module of the painting defect analysis model to perform 3D painting defect analysis on the real-time painting 3D point cloud data, and obtain the real-time painting defect analysis result.

[0057] A painting defect analysis system based on machine vision is used to implement the painting defect analysis method. The system includes a cloud data center and several edge computing gateways. The several edge computing gateways are respectively communicatively connected to the cloud data center. The cloud data center includes a model construction unit and a painting defect analysis unit connected in sequence.

[0058] The beneficial effects of the present invention are as follows:

[0059] A painting defect analysis method and system based on machine vision provided by the present invention significantly reduce manual intervention through highly automated processing, thereby greatly improving the analysis efficiency. By performing image preprocessing on the edge computing gateway, the data transmission delay is reduced, and the analysis speed is further accelerated; the constructed image preprocessing model can effectively improve the image quality, providing clearer and more reliable image data for subsequent defect analysis. Through image preprocessing, the model can highlight the characteristics of painting defects, making the subsequent defect analysis process more accurate and effective. The constructed painting defect analysis model can more precisely identify defects in the painting image, including tiny cracks, bubbles, and stains, etc., improving the detection accuracy. Through multi-scale fusion feature extraction and 3D reconstruction technology, high-accuracy defect detection can be maintained under complex backgrounds and changing lighting conditions; the algorithms for image preprocessing and defect analysis are optimized, reducing the computational complexity and ensuring that the real-time detection requirements on high-speed production lines are met. The deployment of the edge computing gateway enables image data to be processed near the source, greatly reducing the processing delay and improving the real-time performance. Through the image preprocessing step, redundant information can be removed, reducing the size of the image data, thereby reducing the computational complexity of subsequent painting defect analysis and improving the overall analysis speed.

[0060] Other beneficial effects of the present invention will be further described in the specific implementation manner. Description of the Drawings

[0061] Figure 1 is the flowchart of the painting defect analysis method based on machine vision in the present invention.

[0062] Figure 2 is the structural block diagram of the painting defect analysis system based on machine vision in the present invention. Specific Implementation Manner

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

[0064] Embodiment 1:

[0065] As Figure 1 shown, this embodiment provides a method for analyzing painting defects based on machine vision, including the following steps:

[0066] S1: The cloud data center uses artificial intelligence algorithms to build an image preprocessing model and a painting defect analysis model, and deploys the image preprocessing model to all edge computing gateways, including the following steps:

[0067] S1-1: The cloud data center builds an image preprocessing model according to a number of historical painting image data using a deep learning and image processing fusion algorithm, and generates a number of preprocessed historical painting image data;

[0068] The image preprocessing model is built based on the Convolutional Neural Networks (CNN)-Proximal Policy Optimization (PPO)-ImagePreprocessing Algorithms (IPA) algorithm, and the image preprocessing model includes a low-level feature extraction module built based on the CNN algorithm, an image preprocessing strategy generation module built based on the PPO algorithm, and an image preprocessing module built based on the IPA algorithm that are connected in sequence;

[0069] The low-level feature extraction module is used to extract the low-level features of the painting image data, including illumination features, noise features, and resolution features, etc. These features provide the basic attributes and context information of the image for the subsequent generation of preprocessing strategies, and are used to select the corresponding image preprocessing algorithms and set the preprocessing parameters of the image preprocessing algorithms during image preprocessing; the image preprocessing strategy generation module is used to learn a strategy that can generate the control strategy of the image preprocessing engine according to the low-level features, such as contrast adjustment, brightness correction, denoising, etc., and can automatically adjust the preprocessing parameters according to the image content to improve the adaptability of the preprocessing. Through reinforcement learning, 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 handle different image quality problems, and automatically adjust the preprocessing parameters to perform automated image preprocessing on the painting image data, ensuring that the strategy generated by PPO can be effectively executed, improving the effect of the preprocessing. Through preprocessing, the image quality is improved, laying a foundation for subsequent model analysis and defect recognition;

[0070] The cloud data center, according to a number of historical painting image data, uses a deep learning and image processing fusion algorithm to construct an image preprocessing model and generate a number of preprocessed historical painting image data, including the following steps:

[0071] S1-1-1: The cloud data center collects a number of historical painting image data and uses the CNN algorithm to construct an initial low-level feature extraction module, initializing a network structure capable of recognizing the basic features of the image;

[0072] S1-1-2: Optimize and train the initial low-level feature extraction module according to a number of historical painting image data, optimize the network weights through algorithms such as backpropagation and gradient descent to obtain the final low-level feature extraction module, and generate a number of low-level features of historical painting images; improve the accuracy and generalization ability of the feature extraction module, and generate more accurate low-level features of historical painting images;

[0073] S1-1-3: Use the PPO algorithm to construct the policy network and agent of the image preprocessing strategy generation module, and use the experience replay mechanism to initialize the experience replay pool; provide a reinforcement learning-based framework for the generation of image preprocessing strategies, and the experience replay mechanism helps to improve the stability and efficiency of training;

[0074] 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 the agent; the state space defines all the 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 the contrast enhancement algorithm, calling the brightness adjustment algorithm, calling the histogram equalization algorithm, calling the filtering algorithm, calling the sharpening algorithm, setting preprocessing parameters, etc., and the reward function is used to evaluate the effect of the agent's actions; it clarifies the decision-making scope of the agent in the process of generating the preprocessing strategy, and the reward function provides the goal for policy optimization;

[0075] S1-1-5: Optimize and train the initial image preprocessing strategy generation module according to the low-level features of several historical painting images to obtain the final image preprocessing strategy generation module, and generate several historical image preprocessing strategies;

[0076] S1-1-6: Collect several historical image preprocessing strategy generation experiences during the optimization training process of the image preprocessing strategy generation module, and store the 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;

[0077] S1-1-7: Integrate several different IPA algorithms to obtain the IPA algorithm library, set up the image preprocessing engine, and integrate the IPA algorithm library and the image preprocessing engine to obtain the initial image preprocessing module; it provides 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 algorithms;

[0078] S1-1-8: Optimize and train the initial image preprocessing module according to several historical image preprocessing strategies and several historical painting image data to obtain the final image preprocessing module, and generate several preprocessed historical painting image data;

[0079] 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 the image preprocessing model;

[0080] S1-2: Construct a painting defect analysis model using the image processing and 3D reconstruction fusion algorithm based on several preprocessed historical painting image data;

[0081] The painting 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. 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;

[0082] The multi-scale fusion feature extraction module extracts hierarchical features in the image through a series of convolutional layers, activation functions, and pooling layers. It fuses feature maps of different levels extracted by the CNN using skip connections, constructs a feature pyramid through upsampling and lateral connections, and transmits high-level semantic information to the low level to enhance the semantic expression ability of low-level features. In this way, it can effectively combine low-level detail features and high-level semantic features, improve the accuracy of multi-scale fusion feature extraction and the expression ability of features. The multi-scale fusion features include texture, color, boundary, etc.; The three-dimensional reconstruction module is used to process the multi-scale features output by the FPN, further extract high-level abstract features, and perform three-dimensional structure reconstruction, providing three-dimensional information of the defects, which helps to more accurately analyze the shape and depth of the defects; The three-dimensional painting 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 further processes the three-dimensional point cloud data output by the DBN using 3D U2-Net to achieve precise segmentation and analysis of the defects, and can accurately segment the three-dimensional contour of the painting defects. The U-shaped network structure helps to retain the context information of the defects, and improves the accuracy of defect analysis through deep feature extraction and precise segmentation;

[0083] According to a number of preprocessed historical painting image data, using the image processing and three-dimensional reconstruction fusion algorithm, construct a painting defect analysis model, including the following steps:

[0084] S1-2-1: Use the CNN algorithm to construct the basic network architecture of the multi-scale fusion feature extraction module; The basic network architecture includes alternately connected convolutional layers and pooling layers; It provides a basic structure for multi-scale feature extraction. The combination of convolutional layers and pooling layers can effectively extract hierarchical features of the image;

[0085] S1-2-2: Use the Feature Pyramid Network (FPN) algorithm to construct a feature pyramid, and horizontally connect the outputs of all convolutional layers to the feature pyramid in a top-down order to obtain an 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 detailed features and high-level semantic features;

[0086] S1-2-3: Use the Deep Belief Network (DBN) algorithm to construct an initial 3D reconstruction module, and use the 3D U2-Net algorithm to construct an initial 3D painting defect analysis module; the 3D reconstruction module provides 3D information of the defects, which helps for more accurate analysis, and the 3D U2-Net module can perform precise defect segmentation and analysis;

[0087] S1-2-4: Integrate the initial multi-scale fusion feature extraction module, the initial 3D reconstruction module, and the initial 3D painting defect analysis module to obtain an initial 3D painting defect analysis module;

[0088] S1-2-5: Use the Improved Sparrow Search Algorithm (ISSA) to optimize the initial network parameters of the initial 3D painting defect analysis module to obtain an optimized 3D painting defect analysis module, including the following steps:

[0089] S1-2-5-1: Take minimizing the model error value as the optimization goal, set the fitness function, and encode the initial network parameters of the initial 3D painting defect analysis module into the individual vector format of the swarm intelligence optimization algorithm;

[0090] The formula of the fitness function is:

[0091]

[0092] In the formula, is the fitness value function of the ISSA individual ; is the model error value; is the ISSA individual variable; c is the ISSA individual indicator;

[0093] S1-2-5-2: According to the fitness function and the individual vector format, perform initialization to obtain several initial solutions, and use the swarm intelligence optimization algorithm to iteratively update the several initial solutions and retain the optimal individual, including the following steps:

[0094] S1-2-5-2-1: Use the Circle chaotic mapping sequence for initialization to obtain an initial ISSA population, and the initial ISSA population includes several initial ISSA individuals;

[0095] The formula is:

[0096]

[0097] Wherein, is the initial ISSA individual of the Circle chaotic map; is the randomly generated initial ISSA individual; c is the ISSA individual indicator; is the remainder function;

[0098] 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;

[0099] S1-2-5-2-3: Sort the initial ISSA individuals according to the fitness values of the initial ISSA individuals to obtain the initial discoverers, initial joiners, and initial predators;

[0100] S1-2-5-2-4: Update the initial ISSA population to obtain the updated ISSA population; The updated ISSA population includes updated discoverers, updated joiners, and updated predators;

[0101] The update formula for the discoverer is:

[0102]

[0103] Wherein, are respectively the t +1, t th iteration of the c th discoverer ISSA individual; is the maximum number of iterations; is a random number between 0 and 1; is a normally distributed random number; is matrix, all of whose elements are 1; is the warning value; is the safety threshold;

[0104] The update formula for the joiner is:

[0105]

[0106] Wherein, are respectively the t +1, t th iteration of the c th joiner ISSA individual; is the best position occupied by the exposed individual; is the current worst position; is a random number between 0 and 1; is a matrix whose elements are all 1 or -1; c is the sparrow indication quantity; is the total number of ISSA individuals; is the update parameter;

[0107] The update formula for the predator is:

[0108]

[0109] In the formula, are respectively the t +1, t th iteration of the c th predator ISSA individual; is the step size control parameter, and , is the convergence factor, is a non-zero positive real number for step size control; is the current best position; are respectively the current, best, and worst fitnesses of the ISSA individual; is the minimum constant to prevent the denominator from being 0;

[0110]

[0111] In the formula, is the convergence factor; tanh(.) is the hyperbolic tangent function; , are respectively the maximum and minimum values of the convergence factor; λ is the decreasing rate parameter, is the decreasing period parameter, λ = -2 π , = π ;

[0112] S1-2-5-2-5: Use the dynamic reverse learning algorithm to perform dynamic reverse learning on the updated ISSA population to generate a dynamically reversed ISSA population;

[0113] The formula is:

[0114]

[0115] In the formula, is the dynamically reversed ISSA individual; is the decreasing inertia coefficient; is the upper limit of the search space in the constraint condition; is the lower limit of the search space in the constraint conditions; is the updated ISSA individual;

[0116] S1-2-5-2-6: Use the Gaussian mutation algorithm to perform dynamic reverse learning on the updated ISSA population to generate the Gaussian-mutated ISSA population;

[0117] The formula is:

[0118]

[0119] In the formula, is the Gaussian-mutated ISSA individual; is the updated ISSA individual; is the Gaussian mutation parameter;

[0120] 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 use the ISSA individual with the minimum fitness value as the optimal individual;

[0121] Improve the training efficiency and performance of the model. Through the swarm intelligence optimization algorithm, better network parameter configurations are found, avoiding the defect that the model is sensitive to the initial values;

[0122] 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, decode the individual vector of the optimal individual to obtain the optimal initial network parameters;

[0123] S1-2-5-4: Optimize the initial three-dimensional painting defect analysis module according to the optimal initial network parameters to obtain the optimized three-dimensional painting defect analysis module; the optimized three-dimensional painting defect analysis module includes an optimized multi-scale fusion feature extraction module, an optimized three-dimensional reconstruction module, and an optimized three-dimensional painting defect analysis module;

[0124] S1-2-7: According to a number of preprocessed historical painting image data, train and optimize the optimized multi-scale fusion feature extraction module to obtain the final multi-scale fusion feature extraction module, and generate a number of multi-scale fusion features of historical painting images; improve the accuracy and generalization ability of feature extraction;

[0125] S1-2-8: According to the multi-scale fusion features of dry historical painting images, train and optimize the optimized three-dimensional reconstruction module to obtain the final three-dimensional reconstruction module, and generate a number of historical painting three-dimensional point cloud data;

[0126] S1-2-9: Optimize and train the optimized 3D painting defect analysis module based on several historical 3D painting point cloud data to obtain the final 3D painting defect analysis module;

[0127] S1-2-10: Integrate the final multi-scale fusion feature extraction module, the final 3D reconstruction module, and the final 3D painting defect analysis module to obtain the final painting defect analysis model;

[0128] S1-3: Extract the model metadata of the image preprocessing model and send the model metadata to all edge computing gateways connected to the cloud data center;

[0129] 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;

[0130] 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:

[0131] S2-1: The edge computing gateway collects real-time painting image data and inputs the real-time painting image data into the image preprocessing model; enabling the preprocessing model to process real-time data and provide timely feedback, improving the real-time performance and response speed, and decentralizing the image preprocessing to the edge computing gateway to avoid computational resource tension in the cloud data center;

[0132] 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 subsequent preprocessing strategy generation, helping the model better understand the image content and prepare for preprocessing;

[0133] S2-3: According to the low-level features of the real-time painting image, update the state space of the agent in the image preprocessing strategy generation module of the image preprocessing model to obtain the updated state space; ensuring that the preprocessing strategy generation module can be adjusted according to the actual situation of the current image, improving the adaptability and flexibility of the preprocessing strategy;

[0134] S2-4: Randomly extract several historical image preprocessing strategy generation experiences from the experience replay pool of the image preprocessing strategy generation module, and update the action space of the agent according to the several historical image preprocessing strategy generation experiences to obtain the updated action space; using historical experience to guide current action selection, improving the efficiency of strategy generation, and the update of the action space helps the agent better explore and utilize preprocessing strategies;

[0135] S2-5: According to the reward function, use the agent to control the policy network to generate the probability distribution of all possible actions 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, improving the intelligence and self-adaptability of the preprocessing strategy generation.

[0136] S2-6: Take the possible action with the highest probability distribution in the updated action space as the execution action of the state, and integrate the execution actions of all states in the updated state space to obtain the real-time image preprocessing strategy; ensure the optimization of the preprocessing strategy, and the real-time image preprocessing strategy can be customized according to the characteristics of the current image.

[0137] S2-7: According to the real-time image preprocessing strategy, use the image preprocessing module of the image preprocessing model to preprocess the real-time painting image data to obtain the preprocessed real-time painting image data, and upload the preprocessed real-time painting image data to the cloud data center; the quality of the preprocessed image data is improved, making it 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, improving the response speed and efficiency of the entire system.

[0138] S3: The cloud data center uses the painting defect analysis model to perform painting defect analysis on the preprocessed real-time painting image data to obtain the real-time painting defect analysis result, including the following steps:

[0139] S3-1: The cloud data center uses the multi-scale fusion feature extraction module of the painting defect analysis model to extract the real-time painting image multi-scale fusion features of the preprocessed real-time painting image data; multi-scale feature fusion can capture the detailed information and global structure in the image, helping to more accurately identify defects and improving the model's detection ability for painting defects, especially for defects at different scales and in complex backgrounds.

[0140] S3-2: Use the 3D reconstruction module of the painting defect analysis model to perform 3D reconstruction on the real-time painting image multi-scale fusion features to obtain the real-time painting 3D point cloud data; 3D reconstruction provides a more intuitive defect representation, making the defect analysis more comprehensive and accurate, and enabling the analysis of defects from different perspectives, which helps to more deeply understand the nature and causes of defects.

[0141] S3-3: Use the three-dimensional painting defect analysis module of the painting defect analysis model to perform three-dimensional painting defect analysis on the real-time painting three-dimensional point cloud data to obtain the real-time painting defect analysis result. Three-dimensional painting defect analysis can more accurately locate and classify defects, improving the accuracy of defect detection. For complex-shaped and deep-layer defects, three-dimensional analysis has more advantages than two-dimensional analysis and can provide more reliable detection results. The real-time painting defect analysis result helps to provide timely feedback to the production line, so as to quickly take measures to reduce the production of defective products and improve production quality and efficiency.

[0142] Embodiment 2:

[0143] As Figure 2 shown, this embodiment provides a painting defect analysis system based on machine vision for implementing the painting defect analysis method. The system includes a cloud data center and several edge computing gateways. The several edge computing gateways are respectively communicatively connected to the cloud data center. The cloud data center includes a model construction unit and a painting defect analysis unit connected in sequence.

[0144] The edge computing gateway is used to preprocess the collected real-time painting image data using the image preprocessing model and upload the preprocessed real-time painting image data to the cloud data center.

[0145] The model construction unit is used to construct the image preprocessing model and the painting defect analysis model using artificial intelligence algorithms and deploy the image preprocessing model to all edge computing gateways.

[0146] The painting defect analysis unit is used to perform painting defect analysis on the preprocessed real-time painting image data using the painting defect analysis model to obtain the real-time painting defect analysis result.

[0147] A method and system for analyzing painting defects based on machine vision provided by the present invention significantly reduce manual intervention through highly automated processing, thus greatly improving the analysis efficiency. By performing image preprocessing on the edge computing gateway, data transmission delay is reduced, further accelerating the analysis speed. The constructed image preprocessing model can effectively improve the image quality, providing clearer and more reliable image data for subsequent defect analysis. Through image preprocessing, the model can highlight the characteristics of painting defects, making the subsequent defect analysis process more accurate and effective. The constructed painting defect analysis model can more precisely identify defects in painting images, including tiny cracks, bubbles, and stains, etc., improving the detection accuracy. Through multi-scale fusion feature extraction and 3D reconstruction technology, high-accuracy defect detection can be maintained under complex backgrounds and variable lighting conditions. The algorithms for image preprocessing and defect analysis are optimized to reduce the computational complexity, ensuring that the real-time detection requirements on high-speed production lines are met. The deployment of the edge computing gateway enables image data to be processed near the source, greatly reducing the processing delay and improving the real-time performance. Through the image preprocessing step, redundant information can be removed, reducing the size of the image data, thereby reducing the computational complexity of subsequent painting defect analysis and improving the overall analysis speed.

[0148] The present invention is not limited to the above optional implementation manners. Any person can obtain other various forms of products under the inspiration of the present invention. The above specific implementation manners should not be construed as limiting the protection scope of the present invention. The protection scope of the present invention should be defined by 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: S1: Cloud data center, using artificial intelligence algorithms to build image preprocessing models and coating defect analysis models, and deploy the image preprocessing models to all edge computing gateways; S2: Edge computing gateway, which 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; S3: Cloud data center, using the coating defect analysis model, performs coating defect analysis on the pre-processed real-time coating image data to obtain real-time coating defect analysis results; S1 includes 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; 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; 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; 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 sequentially connected; The extracted low-level features provide the basic attributes and context information of the image for the generation of preprocessing strategies, which are used to select the corresponding image preprocessing algorithm and set the preprocessing parameters of the image preprocessing algorithm during image preprocessing; The IPA algorithm includes a contrast enhancement algorithm, a brightness adjustment algorithm, a histogram equalization algorithm, a filtering algorithm and a sharpening algorithm.

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

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

    CN115098330A

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

    WO2023005100A1

Cited By

  • Coating quality prediction and optimization method and system based on multi-modal data fusion

    CN121143217A