Valve support quality detection method based on image recognition
By establishing a temperature-image relationship model and defect recognition model, combined with multi-sensor fusion technology, the detection accuracy and crack propagation monitoring of the valve bracket in high-temperature environments are solved, and efficient and automated quality detection and early warning are achieved.
Patent Information
- Application Number
- CN202510253320.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-07-18
AI Technical Summary
Traditional valve bracket quality detection methods are low in efficiency and low in high temperature environments, and image recognition technology is severely affected by temperature fluctuations, making it difficult to achieve real-time and accurate defect recognition.
By establishing a temperature-image relationship model, image compensation and defect recognition model are built, combined with convolutional neural network and timing causal analysis, detection accuracy is optimized, and crack expansion prediction model is constructed using multi-sensor fusion.
Accurate quality detection in complex high temperature environments is achieved, detection efficiency and reliability are improved, robustness to noise is enhanced, and potential crack risks can be warned in advance, solving the problem of the traditional methods' reduction in accuracy and difficult to monitor crack propagation under temperature fluctuations.
Smart Images

Figure CN120336891A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of valve bracket quality detection, and more specifically, to a valve bracket quality detection method based on image recognition. Background Art
[0002] In industrial production, valve brackets are widely used in various pipeline systems as important load-bearing components, and they undertake key functions such as support, fixation and sealing. Since valve brackets usually work in high temperature and complex environments, the stability of their quality is crucial to the safety and reliability of the entire pipeline system; traditional valve bracket quality inspection methods rely on manual inspection or the use of traditional physical inspection equipment. These methods often have problems such as low efficiency, low detection accuracy, and manual operation that easily leads to errors, which makes it difficult to meet the needs of modern industry for efficient and accurate inspection.
[0003] With the continuous improvement of industrial automation, valve bracket quality inspection based on image recognition technology has gradually become a mainstream solution. However, in practical applications, image sensors are affected by temperature fluctuations in high temperature environments, resulting in serious degradation of image quality. Drastic changes in temperature may not only affect the brightness, contrast and clarity of the camera, but may also introduce noise, resulting in errors in defect recognition. Traditional image processing methods are difficult to effectively deal with these problems, especially in industrial environments with unstable temperatures. Existing temperature compensation technologies often cannot achieve real-time and accurate image optimization and defect recognition. Summary of the invention
[0004] In order to overcome the above-mentioned defects of the prior art, the present invention provides a valve bracket quality detection method based on image recognition, which solves the problems raised in the above-mentioned background technology by establishing a temperature-image relationship model, compensating images, building and adjusting a defect recognition model, and using temporal causal analysis to predict image quality degradation and optimize detection accuracy.
[0005] To achieve the above object, the present invention provides the following technical solution: a valve bracket quality detection method based on image recognition, comprising the following steps:
[0006] Step 1: Real-time temperature monitoring and sensor calibration: collect real-time temperature data (from temperature sensor) and image data (from image sensor) of the valve bracket quality inspection process; output the temperature-image relationship model (the temperature-image relationship model includes the coefficients of brightness, contrast, and noise changing with temperature) through joint calibration of the temperature sensor and the image sensor;
[0007] Step 2. Image quality assessment and preliminary compensation: Compensate the valve support image data based on the real-time temperature data and the temperature-image relationship model, and output the preliminarily compensated valve support image (the image with adjusted brightness and contrast);
[0008] Step 3. Construction of temperature adaptive defect recognition model: Based on the convolutional neural network and the valve image at the reference temperature, construct the initial defect recognition model; Use the time-series causal relationship model to predict the degradation of image quality and adjust the model parameters in advance, and output the trained defect recognition model (obtain a defect detection model that can adapt to different temperature environments); The model parameters refer to the temperature adaptive detection network, which is used to control the receptive field and feature fusion coefficient of the defect recognition model; The feature fusion coefficient is used to adjust the feature fusion weights at each scale;
[0009] Use cluster analysis to manage the training priority and optimize the detection accuracy of the temperature anomaly area.
[0010] Preferably, the temperature-image relationship model I final (x, y, T) satisfies the following formula:
[0011] I final (x, y, T) = (I0(x, y)·α(T) + β(T)) + C(x, y, T)
[0012] α(T) = 1 + η α ·(T - T ref )
[0013] β(T) = β0 + η β ·(T - T ref )
[0014] C(x, y, T) = γ(T)·(I brightness (x, y, T) - I brightness (x - 1, y - 1, T))
[0015] where I0(x, y) represents the original image pixel value at the reference temperature T ref ; α(T) represents the temperature-related brightness gain coefficient, which describes the influence of temperature on image brightness; T represents the current temperature; η α represents the increase ratio of brightness when the temperature changes by 1°C; x, y represent pixel coordinates;
[0016] β(T) represents the brightness offset term, which describes the brightness offset caused by temperature change; β0 is the brightness offset at the reference temperature (usually zero); η β is the temperature gain coefficient of brightness offset, which represents the influence of temperature on brightness offset;
[0017] C(x, y, T) represents the temperature-related contrast adjustment term, reflecting the adjustment of temperature on the image contrast; γ(T) represents the influence of temperature change on the image contrast; I brightness (x, y, T) - I brightness (x - 1, y - 1, T) represents the contrast difference in the adjacent area.
[0018] Preferably, the preliminary compensation process of the valve bracket image is as follows: According to the real-time temperature data and the temperature-image relationship model, predict the influence of the current temperature on the valve bracket image data; conduct real-time quality assessment on the collected valve bracket image data to identify the brightness and contrast changes caused by temperature fluctuations; use the adaptive image enhancement algorithm to perform preliminary adjustment on the valve bracket image to compensate for uneven illumination and contrast imbalance.
[0019] Preferably, the process of obtaining the trained defect recognition model includes:
[0020] Take the real-time temperature data and the preliminarily compensated image as inputs to construct a training data set, and each set of training data includes manually marked defect information;
[0021] Obtain the initial temperature adaptive detection network from the initial defect recognition model;
[0022] Adjust the initial temperature adaptive detection network based on the change features (such as noise, texture, and boundary sharpness) in the preliminarily compensated image;
[0023] By analyzing the influence of temperature change on the defect detection accuracy, optimize the parameters of the temperature adaptive detection network to make it adaptively adjust the detection sensitivity in different temperature environments;
[0024] Take the minimum of the defect detection accuracy loss rate and the adaptation speed to temperature change as the goal, and perform iterative training on the temperature adaptive detection network;
[0025] Train until the loss function meets the requirements or the maximum number of iterations, and when the training ends, output the trained defect recognition model.
[0026] Preferably, it includes a test and warning step for testing, evaluating, and judging the trained defect recognition model, including collecting valve bracket images at different temperatures in a real environment for testing, and conducting comparative analysis to evaluate the temperature adaptive performance coefficient of the defect recognition model, judging the relationship between the temperature adaptive performance coefficient and the preset value, and taking measures based on the judgment results, including:
[0027] Obtain the preliminarily compensated valve bracket image and mark the actual defect information; divide it into several temperature regions according to the temperature gradient and temperature change rate, and number them;
[0028] Based on the output of the trained defect recognition model, the predicted defect information is obtained. By comparing the actual defect information with the predicted defect information, the defect detection accuracy is obtained, and the average position similarity and the average category similarity of each temperature region are obtained.
[0029] The way to obtain the position similarity is as follows: Use the edge detection algorithm to obtain the defect edge, and calculate the intersection over union (IoU) of the predicted defect box and the actual defect edge. The position similarity is proportional to the IoU value, and is 0 when it is lower than the threshold. The way to obtain the category similarity is as follows: According to the matching degree between the predicted defect category and the actual defect category, the position similarity is 1 when they are completely matched, 0.5 when they are partially matched, and 0 when they are completely unmatched.
[0030] Based on the average position similarity, the average category similarity, and the temperature adaptation weight of each temperature region, they are multiplied and then normalized to obtain the temperature adaptive performance coefficient.
[0031] If the temperature adaptive performance coefficient is lower than the preset value, the receptive field and the feature fusion coefficient of each temperature region are stored in the database for quick call in subsequent operations.
[0032] If the temperature adaptive performance coefficient is lower than the preset value, a warning is sent out, indicating that the detection accuracy of the defect recognition model is abnormal under the current temperature conditions, and it is recommended to adjust the dynamic parameters or retrain according to the real-time data to optimize the model adaptability.
[0033] Preferably, the steps of using clustering analysis to manage the training priority include:
[0034] Multidimensional data is collected in real time through temperature sensors and image sensors, including temperature values, average image brightness, noise variance, and defect detection confidence.
[0035] The collected multidimensional data is standardized to construct a time series feature vector.
[0036] A density-based clustering algorithm (such as DBSCAN) is used to perform clustering analysis on the feature vector to identify temperature abnormal regions, that is, time periods when the temperature fluctuation exceeds the normal range.
[0037] For each temperature abnormal region, calculate the weight of the abnormal data points. The weight formula is:
[0038]
[0039] Where, W a is the abnormal weight, Di is the Euclidean distance from the data point to the cluster center, D th is the distance threshold, and λ is the adjustment coefficient.
[0040] Adjust the training priority of the temperature adaptive detection network according to the anomaly weight, and preferentially optimize the receptive field and feature fusion coefficient corresponding to the anomaly area to improve the defect detection accuracy under temperature anomaly conditions.
[0041] Preferably, the temporal causal relationship model is also used to predict the degradation of image quality, and the model parameters are adjusted in advance, including:
[0042] Collect temperature data and image data within consecutive time periods, and extract temporal features, including temperature change rate, brightness change rate, and noise level change rate;
[0043] Construct a temporal causal relationship model, and use Granger causality test to analyze the causal impact of temperature change rate on image quality degradation, and output the causal intensity coefficient G;
[0044] If G exceeds the preset threshold, predict the trend of image quality degradation within the future time window. The prediction formula is
[0045] Q t+1 =Q t ·(1 - k·ΔT t + η·N t
[0046] where Q t+1 is the image quality at the next moment, Q t is the current quality, ΔT t is the temperature change rate, k is the degradation coefficient, N t is the noise level at the current moment, and η is the noise impact factor;
[0047] Adjust the parameters of the temperature adaptive detection network (such as brightness gain and contrast adjustment coefficient) in advance according to the prediction result to reduce the interference of image quality degradation on defect detection.
[0048] Preferably, it also includes a defect saliency enhancement step, including:
[0049] Perform multi-scale decomposition on the preliminarily compensated valve support image (such as using wavelet transform), and extract feature maps at different scales, including low-frequency background features and high-frequency detail features;
[0050] Evaluate the saliency of the defect area according to the magnitude of the information entropy. Areas with lower entropy values are regarded as the background, and areas with higher entropy values are regarded as potential defect areas;
[0051] Increase the weight of the feature fusion coefficient for the feature map with a higher entropy value, and reduce the weight for the feature map with a lower entropy value to generate an enhanced multi-scale feature map;
[0052] Input the enhanced feature map into the temperature adaptive defect recognition model to improve the accuracy of defect detection and the anti-interference ability to noise.
[0053] Preferably, it includes a detection step based on a crack propagation prediction model, including:
[0054] Step 101, data acquisition: Install vibration sensors, high-resolution image acquisition devices (such as high-definition cameras or infrared imaging systems), and ultrasonic detection devices to synchronously capture the dynamic load data, real-time images, and ultrasonic detection data of the valve bracket; the vibration sensor is responsible for real-time monitoring of the vibration frequency and amplitude on the bracket and recording the load changes; the image acquisition device is responsible for monitoring the surface state of the valve bracket for subsequent crack and change identification; the ultrasonic detection device detects the internal crack depth information;
[0055] Step 102, data preprocessing: Preprocess the acquired data and output the preprocessed vibration frequency data, image enhancement results, and ultrasonic detection data enhancement results; perform denoising through high-pass and low-pass filters, and use the histogram equalization algorithm to improve the crack contrast, extract vibration frequency, vibration acceleration features, and correlate ultrasonic detection data with image data through feature matching methods, and output the timing data of crack edge features and crack propagation speed;
[0056] Step 103, crack analysis: Weightedly fuse the preprocessed vibration features and crack edge features through the random forest algorithm to construct a crack propagation prediction model; input the dynamic load data into the crack propagation prediction model and output the crack propagation trend and prediction results;
[0057] Step 104, through real-time monitoring of sensor data (including real-time vibration data of dynamic loads and real-time crack propagation speed) and the crack propagation prediction model, combined with the set threshold, perform real-time diagnosis of dynamic loads and crack propagation. When the crack propagation speed exceeds the preset threshold, trigger an alarm and generate a fault prediction report to ensure timely identification of potential crack propagation problems and make early responses.
[0058] Preferably, the training process of the crack propagation prediction model includes the following steps:
[0059] Step 201, construct a training set and a test set;
[0060] Collect historical data with synchronized time, including dynamic load data (vibration frequency and acceleration), real-time image data, and ultrasonic detection data; ensure the consistency of historical data and real-time data through data standardization processing, extract features including vibration frequency, vibration acceleration, crack edge features, and crack propagation speed, and manually mark the crack propagation speed; divide the training set and the test set according to a ratio (such as 7:3);
[0061] Step 202: Build an initial crack propagation prediction model. Input the training set into the initial crack propagation prediction model, with the minimum prediction deviation as the loss function. Optimize the parameters through iterative training until the loss function is minimized or the maximum number of iterations is reached, and output the trained crack propagation prediction model.
[0062] Step 203: Deploy the trained crack propagation prediction model to actual monitoring. Input the dynamic load conditions (such as vibration frequency, vibration acceleration, etc.) and crack image information of the valve support in real time, predict the crack propagation trend and speed, and update the fault prediction report according to the prediction results.
[0063] The technical effects and advantages of the present invention:
[0064] (1) The method for quality inspection of valve supports based on image recognition provided by the present invention establishes a temperature-image relationship model through real-time temperature monitoring and sensor calibration, and builds an image preliminary compensation and temperature adaptive defect recognition model based on this, realizing accurate quality inspection of valve supports in high-temperature complex environments, and solving the problem of reduced accuracy of traditional inspection methods due to temperature fluctuations. This method uses a convolutional neural network to dynamically adjust the receptive field and feature fusion coefficient, enhancing the robustness of the model to noise. At the same time, the performance is optimized in a timely manner through a test warning mechanism to ensure detection stability. Compared with the detection methods relying on manual or traditional physical devices, the present invention significantly improves the detection efficiency and reliability, adapts to the temperature change requirements in the industrial environment, and provides an efficient and automated solution for the quality control of valve supports.
[0065] (2) The method for quality inspection of valve supports based on image recognition provided by the present invention enhances defect saliency through multi-scale entropy analysis, predicts image quality degradation through time-series causal analysis, and constructs a crack propagation prediction model through multi-sensor fusion, realizing the improvement of detection accuracy and the early warning of potential crack risks, and solving the problems of high-temperature noise interference and difficult monitoring of crack propagation. This method optimizes the training of abnormal regions through clustering, adjusts network parameters for prediction, and analyzes multi-source data, not only improving the anti-noise ability of defect detection, but also realizing the real-time diagnosis of crack propagation trends. Brief Description of the Drawings
[0066] Figure 1 It is a flow chart of the method for quality inspection of valve supports based on temperature adaptability of the present invention.
[0067] Figure 2 It is a structural block diagram for optimizing the robustness of the quality inspection of valve supports of the present invention.
[0068] Figure 3 It is a structural block diagram for predicting and diagnosing the propagation speed of crack x of the present invention. Detailed Embodiments
[0069] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0070] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn in actual proportional relationships.
[0071] The following description of at least one exemplary embodiment is actually merely illustrative and in no way limits the present application and its application or use.
[0072] Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the said technologies, methods, and devices should be regarded as part of the specification.
[0073] Embodiment 1, referring to Figure 1 the flowchart of the method for detecting the quality of a valve bracket based on temperature adaptation, the present invention provides a method for detecting the quality of a valve bracket based on image recognition as shown in Figure 1 Figure, including:
[0074] Step 1, Real-time temperature monitoring and sensor calibration: Collect real-time temperature data (from a temperature sensor) and image data (from an image sensor) during the quality detection process of the valve bracket; through the joint calibration of the temperature sensor and the image sensor, output a temperature-image relationship model (the temperature-image relationship model includes coefficients of brightness, contrast, and noise varying with temperature);
[0075] Step 2, Image quality evaluation and preliminary compensation: Based on the real-time temperature data and the temperature-image relationship model, compensate the valve bracket image data, and output a preliminarily compensated valve bracket image (an image with adjusted brightness and contrast);
[0076] Step 3, Building a temperature-adaptive defect recognition model: Based on a convolutional neural network and a valve image at a reference temperature, build an initial defect recognition model; based on the real-time temperature data and the preliminarily compensated image, adjust the model parameters, and output a trained defect recognition model (obtain a defect detection model that can adapt to different temperature environments); The model parameters refer to a temperature-adaptive detection network, which is used to control the receptive field and feature fusion coefficient of the defect recognition model; The feature fusion coefficient is used to adjust the feature fusion weights at each scale;
[0077] Explanation: The defect recognition model takes the valve bracket image as input and outputs the corresponding defect information. However, the higher the temperature, the more noise appears in the preliminarily compensated image, resulting in a decrease in the defect recognition accuracy of the defect recognition model. By increasing the receptive field to include more background information, expanding the area of the convolution operation, the robustness of the defect recognition model to noise is increased. When the receptive field increases, the features at the detail scale are "diluted" by the larger background information. By increasing the feature fusion coefficient at the detail scale, the influence of the detail features is ensured, thereby reducing the interference of the large-range background information on the defect judgment.
[0078] In the embodiments of the present invention, it needs to be further explained that the temperature-image relationship model I final (x, y, T) satisfies the following formula:
[0079] I final (x, y, T) = (I0(x, y)·α(T) + β(T)) + C(x, y, T)
[0080] α(T) = 1 + η α ·(T - T ref )
[0081] β(T) = β0 + η β ·(T - T ref )
[0082] C(x, y, T) = γ(T)·(I brightness (x, y, T) - I brightness (x - 1, y - 1, T))
[0083] Among them, I0(x, y) represents the original image pixel value at the reference temperature T ref ; α(T) represents the temperature-related brightness gain coefficient, describing the influence of temperature on image brightness; T represents the current temperature; η α represents the increase ratio of brightness when the temperature changes by 1°C; x, y represent pixel coordinates;
[0084] β(T) represents the brightness offset term, describing the brightness offset caused by temperature change; β0 is the brightness offset at the reference temperature (usually zero); η β is the temperature gain coefficient of brightness offset, representing the influence of temperature on brightness offset;
[0085] C(x, y, T) represents the temperature-related contrast adjustment term, reflecting the adjustment of temperature on image contrast; γ(T) represents the influence of temperature change on image contrast; I brightness (x, y, T) - I brightness (x - 1, y - 1, T) represents the contrast difference in the adjacent area.
[0086] In the embodiments of the present invention, it needs to be further explained that the preliminary compensation process of the valve bracket image is as follows: According to the real-time temperature data and the temperature-image relationship model, predict the influence of the current temperature on the valve bracket image data; conduct real-time quality assessment on the collected valve bracket image data to identify the brightness and contrast changes caused by temperature fluctuations; use an adaptive image enhancement algorithm to perform preliminary adjustment on the valve bracket image to compensate for uneven illumination and contrast imbalance.
[0087] In the embodiments of the present invention, it needs to be further explained that the acquisition process of the trained defect recognition model includes:
[0088] Use the real-time temperature data and the preliminarily compensated image as inputs to construct a training data set, and each group of training data includes manually marked defect information;
[0089] Explanation: By data augmentation techniques such as rotating, flipping, and cropping images, simulate different perspectives and environmental conditions to expand the training data set and construct a more abundant data set; that is, obtain a training data set containing valve bracket images with different temperatures, different illuminations, and different materials, and refine the defect types into more specific categories (such as cracks, dents, rust, etc.).
[0090] Obtain an initial temperature adaptive detection network from the initial defect recognition model;
[0091] Adjust the initial temperature adaptive detection network based on the change features (such as noise, texture, and boundary sharpness) in the preliminarily compensated image;
[0092] By analyzing the influence of temperature changes on the defect detection accuracy, optimize the parameters of the temperature adaptive detection network to make it adaptively adjust the detection sensitivity in different temperature environments;
[0093] Take the minimum of the defect detection accuracy loss rate and the adaptation speed to temperature changes as the goal, and perform iterative training on the temperature adaptive detection network;
[0094] Train until the loss function meets the requirements or the maximum number of iterations, and when the training ends, output the trained defect recognition model.
[0095] In the embodiments of the present invention, it needs to be further explained that the method includes a test and warning step for testing, evaluating, and judging the trained defect recognition model, including collecting valve bracket images at different temperatures in a real environment for testing, and conducting comparative analysis to evaluate the temperature adaptive performance coefficient of the defect recognition model, judging the relationship between the temperature adaptive performance coefficient and the preset value, and taking measures based on the judgment result, including:
[0096] Obtain the valve bracket image after obtaining the preliminary compensation, and mark the actual defect information; divide it into several temperature regions according to the temperature gradient and temperature change rate, and number them;
[0097] Based on the trained defect recognition model, output the predicted defect information, compare the actual defect information and the predicted defect information to obtain the defect detection accuracy, and obtain the average position similarity and the average category similarity of each temperature region;
[0098] The method for obtaining the position similarity is as follows: use the edge detection algorithm to obtain the defect edge, and calculate the intersection over union of the predicted defect box and the actual defect edge; the position similarity is proportional to the intersection over union IoU value and is 0 when it is lower than the threshold; the method for obtaining the category similarity is as follows: according to the matching degree between the predicted defect category and the actual defect category, the position similarity is 1 when it is completely matched, 0.5 when it is partially matched, and 0 when it is completely unmatched;
[0099] Based on the average position similarity, the average category similarity and the temperature adaptation weight of each temperature region, multiply them and normalize to obtain the temperature adaptive performance coefficient;
[0100] If the temperature adaptive performance coefficient is lower than the preset value, store the receptive field and feature fusion coefficient of each temperature region in the database for quick call in subsequent operations;
[0101] If the temperature adaptive performance coefficient is lower than the preset value, send out a warning, indicating that the detection accuracy of the defect recognition model is abnormal under the current temperature conditions, and it is recommended to perform dynamic parameter adjustment or retraining according to real-time data to optimize the model adaptability.
[0102] In a possible embodiment, the temperature adaptive performance coefficient S w Satisfies the following formula;
[0103] Suppose it is divided into n temperature regions, and i represents the sequential number;
[0104]
[0105] Among them, xw i Represents the average position similarity corresponding to the i-th temperature region; xl i Represents the average category similarity corresponding to the i-th temperature region; Represents the temperature adaptation weight corresponding to the i-th temperature region; T i Represents the i-th temperature interval; T mid Represents the central temperature of the temperature interval; σ represents the sensitivity constant of the temperature deviation.
[0106] Explanation: The Gaussian function maintains a high weight within the ideal temperature range. As the temperature deviates, the weight gradually decreases, avoiding the drastic impact of temperature fluctuations on accuracy evaluation and adapting to the flexibility of temperature changes in the actual environment. By adjusting the standard deviation σ, the influence of temperature changes on the weight can be flexibly controlled. A smaller σ makes the system more sensitive to temperature changes, while a larger σ indicates that the system is more tolerant of temperature changes. This temperature-adaptive weight performs well in balancing accuracy requirements and the feasibility of actual operations and can effectively handle various temperature changes without affecting the overall performance.
[0107] Summary: In Embodiment 1 of the present invention, through real-time temperature monitoring and sensor calibration, image quality evaluation and preliminary compensation, and the establishment of a temperature-adaptive defect recognition model, the quality inspection of valve brackets in different temperature environments is realized, solving the problem of low detection accuracy of traditional methods in high-temperature environments. Specifically, this embodiment uses temperature sensors and image sensors to collect real-time data, establishes a temperature-image relationship model that quantifies the changes of brightness, contrast, and noise with temperature, and based on this, performs preliminary compensation on the image and outputs the adjusted image. Subsequently, an initial defect recognition model is established through a convolutional neural network, and the model parameters (such as receptive fields and feature fusion coefficients) are adjusted by combining real-time temperature data and compensated images, and a defect detection model adapted to temperature fluctuations is trained. In addition, the performance of the model is evaluated through the test and warning steps, and the parameters are dynamically optimized when the accuracy is insufficient. This embodiment effectively addresses the problem of increased image noise caused by rising temperatures, enhances robustness by increasing the receptive field and adjusts the feature fusion coefficient to retain detailed features, significantly improving the detection accuracy and solving the problem that traditional image recognition technologies fail due to temperature fluctuations in industrial environments, providing an efficient and stable basic solution for the quality inspection of valve brackets.
[0108] Embodiment 2, refer to Figure 2 The robustness optimization structure block diagram of the valve bracket quality inspection of the present invention. The difference between this embodiment of the present invention and Embodiment 1 is that the step of using clustering analysis to manage the training priority in the method includes:
[0109] Multidimensional data is collected in real time through temperature sensors and image sensors, including temperature values, average image brightness, noise variance, and defect detection confidence;
[0110] The collected multidimensional data is standardized to construct a time series feature vector;
[0111] A density-based clustering algorithm (such as DBSCAN) is used to perform clustering analysis on the feature vector to identify temperature anomaly regions, that is, time periods when the temperature fluctuation exceeds the normal range;
[0112] For each temperature anomaly region, calculate the weight of the abnormal data points. The weight formula is:
[0113]
[0114] Among them, W a is the anomaly weight, Di is the Euclidean distance from the data point to the cluster center, and D th is the distance threshold, and λ is the adjustment coefficient;
[0115] Adjust the training priority of the temperature adaptive detection network according to the anomaly weight, and preferentially optimize the receptive field and feature fusion coefficient corresponding to the anomaly region to improve the defect detection accuracy under temperature anomaly conditions.
[0116] In the embodiments of the present invention, it needs to be further explained that the method also uses a temporal causal relationship model to predict image quality degradation, and the steps of pre-adjusting the model parameters include:
[0117] Collect temperature data and image data within a continuous time period, and extract temporal features, including temperature change rate, brightness change rate, and noise level change rate;
[0118] Construct a temporal causal relationship model, and use Granger causality test to analyze the causal impact of temperature change rate on image quality degradation, and output the causal intensity coefficient G;
[0119] If G exceeds the preset threshold, predict the trend of image quality degradation within the future time window, and the prediction formula is
[0120] Q t+1 = Q t ·(1 - k·ΔT t ) + η·N t
[0121] Among them, Q t+1 is the image quality at the next moment, Q t is the current quality, ΔT t is the temperature change rate, k is the degradation coefficient, N t is the noise level at the current moment, and η is the noise impact factor;
[0122] Adjust the parameters of the temperature adaptive detection network (such as brightness gain and contrast adjustment coefficient) in advance according to the prediction result to reduce the interference of image quality degradation on defect detection.
[0123] In the embodiments of the present invention, it needs to be further explained that the method also includes a defect saliency enhancement step, including:
[0124] Perform multi-scale decomposition on the preliminarily compensated valve bracket image (such as using wavelet transform), and extract feature maps at different scales, including low-frequency background features and high-frequency detail features;
[0125] Evaluate the significance of the defect area according to the magnitude of the information entropy. The area with a lower entropy value is regarded as the background, and the area with a higher entropy value is regarded as the potential defect area;
[0126] Increase the weight of the feature fusion coefficient for the feature map with a higher entropy value, and decrease the weight for the feature map with a lower entropy value to generate an enhanced multi-scale feature map;
[0127] Input the enhanced feature map into the temperature adaptive defect recognition model to improve the accuracy of defect detection and the anti-interference ability against noise.
[0128] Summary: In Embodiment 2 of the present invention, through steps of training priority management, image quality degradation prediction, and defect significance enhancement, the accuracy and robustness of defect detection are improved under complex temperature conditions, solving the problems of high-temperature noise interference and insufficient adaptability to abnormal environments. Based on Embodiment 1, this embodiment first identifies the temperature anomaly area through cluster analysis, and optimizes the training priority of the temperature adaptive detection network according to the anomaly weight, and preferentially adjusts the receptive field and feature fusion coefficient under abnormal conditions. Secondly, uses temporal causal analysis to predict the trend of image quality degradation, and adjusts network parameters (such as the size of the receptive field) in advance to reduce the interference of noise on detection. In addition, enhances defect significance through multi-scale decomposition and information entropy analysis, increases the weight of the feature map with a high entropy value, and generates an optimized feature map to input into the model. These measures work together to enable the detection system to maintain high accuracy in a high-temperature fluctuating or high-noise environment, solving the problem of performance degradation of general models under non-ideal conditions, and providing strong technical support for the reliable detection of valve brackets in industrial applications.
[0129] Embodiment 3. The difference between the embodiment of the present invention and Embodiments 1 and 2 is that the method for detecting the quality of valve brackets based on image recognition includes a detection step based on a crack propagation prediction model. Refer to Figure 3 the block diagram of the crack propagation speed prediction and diagnosis shown, specifically including:
[0130] Step 101, data acquisition: Install vibration sensors, high-resolution image acquisition devices (such as high-definition cameras or infrared imaging systems), and ultrasonic detection devices to synchronously capture the dynamic load data, real-time images, and ultrasonic detection data of the valve bracket; the vibration sensor is responsible for monitoring the vibration frequency and amplitude on the bracket in real time and recording the load change; the image acquisition device is responsible for monitoring the surface state of the valve bracket for subsequent crack and change identification; the ultrasonic detection device detects the internal crack depth information;
[0131] Step 102, Data preprocessing: Preprocess the collected data, and output the preprocessed vibration frequency data, image enhancement results, and ultrasonic detection data enhancement results; perform denoising processing through high-pass and low-pass filters, and use the histogram equalization algorithm to improve the crack contrast, extract vibration frequency and vibration acceleration features, and associate ultrasonic detection data with image data through feature matching methods, and output the crack edge features and the time series data of the crack propagation speed;
[0132] Explanation: The feature matching method aligns the internal crack position detected by ultrasonic detection with the crack edge of the surface image through spatial coordinate alignment, and calculates the crack propagation speed;
[0133] Step 103, Crack analysis: Weightedly fuse the preprocessed vibration features and crack edge features through the random forest algorithm to construct a crack propagation prediction model; input the dynamic load data into the crack propagation prediction model, and output the crack propagation trend and prediction results;
[0134] Explanation, which is used to characterize the relationship between the crack propagation speed and the dynamic load; calculate the propagation direction and speed increment based on the crack edge features, and then combine the vibration features to train the model;
[0135] Step 104, Through real-time monitoring of sensor data (including real-time vibration data and real-time crack propagation speed of dynamic load) and the crack propagation prediction model, combine the set threshold to perform real-time diagnosis of dynamic load and crack propagation. When the crack propagation speed exceeds the preset threshold, trigger an alarm and generate a fault prediction report to ensure timely identification of potential crack propagation problems and make early responses.
[0136] In the embodiments of the present invention, it needs to be further explained that through the supervised learning method, use the labeled data set to train the initial crack propagation prediction model, adopt cross-validation to evaluate the model performance, prevent overfitting, and during the training process, use appropriate loss functions and optimization algorithms, such as cross-entropy loss function and Adam optimization algorithm, to generate the trained crack propagation prediction model; the training process of the crack propagation prediction model includes the following steps:
[0137] Step 201, Construct a training set and a test set;
[0138] Collect historical data with synchronized acquisition time, including dynamic load data (vibration frequency and acceleration), real-time image data, and ultrasonic detection data; ensure the consistency of historical data and real-time data through data standardization processing, extract features including vibration frequency, vibration acceleration, crack edge features, and crack propagation speed, and manually mark the crack propagation speed; divide the training set and the test set according to a ratio (such as 7:3);
[0139] Step 202: Build an initial crack propagation prediction model. Input the training set into the initial crack propagation prediction model, with the minimum prediction deviation as the loss function. Optimize the parameters through iterative training until the loss function is minimized or the maximum number of iterations is reached, and output the trained crack propagation prediction model.
[0140] Step 203: Deploy the trained crack propagation prediction model to actual monitoring. Input the dynamic load conditions (such as vibration frequency, vibration acceleration, etc.) and crack image information of the valve support in real time, predict the crack propagation trend and speed, and update the fault prediction report according to the prediction results.
[0141] Summary: In Embodiment 3 of the present invention, through the construction of multi-sensor data fusion and a crack propagation prediction model, the real-time monitoring and prediction of the crack propagation trend of the valve support are realized, solving the problem that the traditional detection method cannot identify potential crack risks in advance. On the basis of Embodiment 1, in this embodiment, a vibration sensor, an image acquisition device, and an ultrasonic detection device are used to synchronously collect dynamic load, image, and ultrasonic data, and the crack edge features and propagation speed are extracted through preprocessing. The random forest algorithm is used to fuse vibration and image features to build a crack propagation prediction model, predict the relationship between the crack propagation speed and the load, and trigger an alarm when the speed exceeds the threshold. The model is trained through supervised learning and cross-validation to ensure prediction accuracy and stability. This embodiment uses multi-source data and machine learning technology to not only detect surface defects but also analyze the dynamics of internal cracks, solving the limitation that a single image detection cannot evaluate crack propagation, providing an accurate and timely solution for the safety assessment of valve supports, and significantly improving the fault warning ability of industrial equipment.
[0142] Finally: The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for quality inspection of valve brackets based on image recognition, characterized in that, Including: Collecting real-time temperature data and image data during the quality inspection process of the valve support; Outputting a temperature-image relationship model through the joint calibration of a temperature sensor and an image sensor; Compensating the valve support image data based on the real-time temperature data and the temperature-image relationship model, and outputting the preliminarily compensated valve support image; Building an initial defect recognition model based on a convolutional neural network and a valve image at a reference temperature; Adjusting the model parameters based on the real-time temperature data and the preliminarily compensated image, predicting the image quality degradation using a temporal causal relationship model, adjusting the model parameters in advance, and outputting a trained defect recognition model; The model parameters refer to a temperature adaptive detection network, which is used to control the receptive field and feature fusion coefficient of the defect recognition model; The feature fusion coefficient is used to adjust the feature fusion weights at each scale; Using clustering analysis to manage the training priority and optimizing the detection accuracy of temperature anomaly regions.
2. The method for detecting the quality of a valve bracket based on image recognition according to claim 1, wherein The temperature-image relationship model I final (x, y, T) satisfies the following formula: I final (x,y,T) = (I0(x,y)·α(T) + β(T)) + C(x,y,T) α(T) = 1 + η α ·(T - T ref ) β(T) = β0 + η β ·(T - T ref ) C(x,y,T) = γ(T)·(I brightness (x,y,T) - I brightness (x - 1,y - 1,T)) Among them, I0(x, y) represents the original image pixel value at the reference temperature T ref ; α(T) represents the temperature-related brightness gain coefficient, which describes the influence of temperature on image brightness; T represents the current temperature; η α represents the increase ratio of brightness when the temperature changes by 1°C; x, y represent pixel coordinates; β(T) represents the luminance offset term, which describes the luminance offset caused by temperature changes; β0 is the luminance offset at the reference temperature; η β is the temperature gain coefficient of the luminance offset, indicating the influence of temperature on the luminance offset; C(x, y, T) represents the temperature-related contrast adjustment term, reflecting the adjustment of the image contrast by temperature; γ(T) represents the influence of temperature change on the image contrast; I brightness (x, y, T) - I brightness (x - 1, y - 1, T) represents the contrast difference in the neighboring region.
3. The method for detecting the quality of a valve bracket based on image recognition according to claim 1, wherein The preliminary compensation process of the valve support image is as follows: According to the real-time temperature data and the temperature-image relationship model, predict the influence of the current temperature on the valve support image data; Conduct a real-time quality assessment of the collected valve support image data, and identify the brightness and contrast changes caused by temperature fluctuations; Use an adaptive image enhancement algorithm to preliminarily adjust the valve support image to compensate for uneven illumination and contrast imbalance.
4. The method for detecting the quality of a valve bracket based on image recognition according to claim 1, wherein The acquisition process of the trained defect recognition model includes: Taking the real-time temperature data and the preliminarily compensated image as inputs, constructing a training dataset, where each group of training data includes manually marked defect information; Obtaining an initial temperature adaptive detection network from the initial defect recognition model; Adjusting the initial temperature adaptive detection network based on the changing features in the preliminarily compensated image; By analyzing the influence of temperature changes on the defect detection accuracy, optimizing the parameters of the temperature adaptive detection network to make it adaptively adjust the detection sensitivity in different temperature environments; Taking the minimum of the defect detection accuracy loss rate and the adaptation speed to temperature changes as the goal, iteratively training the temperature adaptive detection network; Training until the loss function meets the requirements or the maximum number of iterations, and outputting the trained defect recognition model when the training ends.
5. The method for detecting the quality of a valve bracket based on image recognition according to claim 1, wherein Including a test and warning step for testing, evaluating, and judging the trained defect recognition model, including collecting valve support images at different temperatures in a real environment for testing, and conducting a comparative analysis to evaluate the temperature adaptive performance coefficient of the defect recognition model, judging the relationship between the temperature adaptive performance coefficient and a preset value, and taking measures based on the judgment result, including: Obtaining the preliminarily compensated valve support image and marking the actual defect information; Dividing it into several temperature regions according to the temperature gradient and temperature change rate, and numbering them; Based on the trained defect recognition model, outputting predicted defect information, comparing the actual defect information and the predicted defect information to obtain the defect detection accuracy, and obtaining the average position similarity and average category similarity of each temperature region; The method for obtaining the location similarity is as follows: Use the edge detection algorithm to obtain the defect edge, and calculate the intersection over union (IoU) of the predicted defect box and the actual defect edge; the location similarity is proportional to the IoU value, and is 0 when it is lower than the threshold; the method for obtaining the category similarity is as follows: According to the matching degree between the predicted defect category and the actual defect category, the location similarity is 1 when they are completely matched, 0.5 when they are partially matched, and 0 when they are completely unmatched; Based on the average value of the location similarity, the average value of the category similarity, and the temperature adaptation weight of each temperature region, multiply them and then normalize to obtain the temperature adaptive performance coefficient; If the temperature adaptive performance coefficient is lower than the preset value, store the receptive field and feature fusion coefficient of each temperature region in the database for quick call in subsequent operations; If the temperature adaptive performance coefficient is lower than the preset value, send out a warning, indicating that the detection accuracy of the defect recognition model is abnormal under the current temperature conditions, and it is recommended to perform dynamic parameter adjustment or retraining according to real-time data to optimize the model adaptability.
6. The method for detecting the quality of a valve bracket based on image recognition according to claim 1, wherein The steps of using clustering analysis to manage the training priority include: Collect multi-dimensional data in real time through temperature sensors and image sensors, including temperature values, average image brightness, noise variance, and defect detection confidence; Perform standardization processing on the collected multi-dimensional data to construct a time series feature vector; Use the density-based clustering algorithm to perform clustering analysis on the feature vector to identify temperature abnormal regions, that is, time periods when the temperature fluctuation exceeds the normal range; For each temperature abnormal region, calculate the weight of the abnormal data points. The weight formula is: Among them, W a is the anomaly weight, Di is the Euclidean distance from the data point to the cluster center, D th is the distance threshold, and λ is the adjustment coefficient; Adjust the training priority of the temperature adaptive detection network according to the abnormal weight, and give priority to optimizing the receptive field and feature fusion coefficient corresponding to the abnormal region to improve the defect detection accuracy under temperature abnormal conditions.
7. The method for detecting the quality of a valve bracket based on image recognition according to claim 1, wherein The steps of using the time series causal relationship model to predict image quality degradation and adjust model parameters in advance include: Collect temperature data and image data within a continuous time period, and extract time series features, including temperature change rate, brightness change rate, and noise level change rate; Construct a time series causal relationship model, and use Granger causality test to analyze the causal impact of the temperature change rate on image quality degradation, and output the causal intensity coefficient G; If G exceeds the preset threshold, predict the trend of image quality degradation within the future time window. The prediction formula is Q t+1 = Q t ·(1 - k·ΔT t ) + η·N t Among them, Q t+1 is the image quality at the next moment, Q t is the current quality, ΔT t is the temperature change rate, k is the degradation coefficient, N t is the noise level at the current moment, and η is the noise influence factor; Adjust the parameters of the temperature adaptive detection network in advance according to the prediction result to reduce the interference of image quality degradation on defect detection.
8. The method for detecting the quality of a valve bracket based on image recognition according to claim 1, wherein It also includes the defect saliency enhancement steps, including: Perform multi-scale decomposition on the preliminarily compensated valve support image, and extract feature maps at different scales, including low-frequency background features and high-frequency detail features; Evaluate the saliency of the defect region according to the size of the information entropy. Regions with lower entropy values are regarded as the background, and regions with higher entropy values are regarded as potential defect regions; Increase the weight of the feature fusion coefficient for the feature map with a higher entropy value, and reduce the weight for the feature map with a lower entropy value to generate an enhanced multi-scale feature map; Input the enhanced feature map into the temperature adaptive defect recognition model to improve the accuracy of defect detection and the anti-interference ability to noise.
9. The method for detecting the quality of a valve bracket based on image recognition according to claim 1, characterized in that, It includes the detection steps based on the crack propagation prediction model, including: Step 101, Data Acquisition: Install vibration sensors, high-resolution image acquisition devices, and ultrasonic detection devices to synchronously capture the dynamic load data, real-time images, and ultrasonic detection data of the valve bracket; the vibration sensors are responsible for monitoring the vibration frequency and amplitude on the bracket in real time and recording the load changes; the image acquisition devices are responsible for monitoring the surface state of the valve bracket for subsequent crack and change identification; the ultrasonic detection devices detect the internal crack depth information; Step 102, Data Preprocessing: Preprocess the collected data and output the preprocessed vibration frequency data, image enhancement results, and ultrasonic detection data enhancement results; perform denoising processing through high-pass and low-pass filters, and use the histogram equalization algorithm to improve the crack contrast, extract vibration frequency and vibration acceleration features, and correlate the ultrasonic detection data with the image data through feature matching methods to output the time-series data of crack edge features and crack propagation speed; Step 103, Crack Analysis: Use the random forest algorithm to perform weighted fusion of the preprocessed vibration features and crack edge features to construct a crack propagation prediction model; input the dynamic load data into the crack propagation prediction model and output the crack propagation trend and prediction results; Step 104, Through real-time monitoring of sensor data and the crack propagation prediction model, combined with the set threshold, perform real-time diagnosis of dynamic load and crack propagation. When the crack propagation speed exceeds the preset threshold, trigger an alarm and generate a fault prediction report to ensure timely identification of potential crack propagation problems and make early responses.
10. The method for detecting the quality of a valve bracket based on image recognition according to claim 9, characterized in that, The training process of the crack propagation prediction model includes the following steps: Collect historical dynamic load, image, and ultrasonic data, extract features and mark the crack propagation speed, and divide the training set and test set; Adopt supervised learning to train the model, aiming at the minimum prediction deviation, and optimize until the loss function converges or reaches the upper limit of the number of iterations; Deploy the crack propagation prediction model to real-time monitoring, input dynamic load and image data, and predict the crack propagation trend.
Citation Information
Patent Citations
Automatic control method and system for battery film production based on visual inspection
CN119229372A
Valve life prediction method and system based on big data analysis
CN119249370A
Transmission line defect identification method based on saliency map and semantic-embedded feature pyramid
US20230360390A1
Cited By
Surface crack intelligent identification method in radiator vibration test
CN120782775A
Forging defect identification data processing method and system based on surface migration prediction
CN121074028A
Surface migration prediction-based forging defect identification data processing method and system
CN121074028B
Intelligent inspection method and system based on AI image recognition
CN121686252A
Intelligent inspection method and system based on AI image recognition
CN121686252B