A machine vision network cabinet appearance flaw tracing method
Patent Information
- Application Number
- CN202611053978.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]现有技术中,有方案通过采集通信柜表面图像,基于图像中像素点的梯度幅值绘制梯度幅值直方图获取阈值,筛选出疑似边缘点进行缺陷检测;也有方案通过获取机柜的三维点云数据建立点云模型,结合机器视觉实现机柜轮廓的快速检测,进而识别形状缺陷;然而,现有机器视觉检测方案的核心功能是识别机柜表面是否存在划痕、凹坑、流挂等外观缺陷,但对于更深层次的溯源需求,主要根据经验确定,这导致企业在发现缺陷后仍需依靠人工经验逐一排查各道工序,溯源效率低、准确率差,难以满足现代智能制造对质量闭环管控的要求;因此,如何能够同时实现网络机柜外观瑕疵的高精度检测、定位瑕疵的产生工序、具体参数成因判断以及工艺参数定量反演是本发明要解决的根本问题之一
[0029] I. This invention constructs a hierarchical dynamic Bayesian network that includes an observation layer, a process hidden layer, and a parameter cause hidden layer. The detected defect feature tensor is used as the observation input, and variational Bayesian inference is used to output the posterior probability of the defect belonging to each process such as stamping, welding, painting, and assembly. For the first time in the field of network cabinet appearance inspection, a complete closed loop from defect detection to process traceability has been realized, enabling enterprises to directly locate the responsible process after discovering a defect, and significantly shortening the investigation cycle of quality problems.
Smart Images

Figure CN122928756A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of machine vision inspection and industrial production quality control technology, and in particular to a machine vision-based method for tracing the source of appearance defects in network cabinets. Background Technology
[0002] As a core infrastructure in data centers, communication base stations, and various electronic equipment integrated systems, the appearance quality of network cabinets directly affects the protective performance and installation compatibility of the equipment. The production of network cabinets typically involves multiple processes such as sheet metal stamping, welding, pre-painting treatment, electrostatic spraying, and assembly. Each process may introduce different types of appearance defects, such as stamping scratches and burrs, welding slag and deformation, paint runs and orange peel, and assembly bumps and scratches. How to efficiently and accurately detect these appearance defects and trace the processes and specific process parameter anomalies that caused them has become a core challenge for the quality control of network cabinet manufacturers.
[0003] In existing technologies, some solutions acquire images of the communication cabinet surface, draw gradient magnitude histograms based on the gradient magnitude of pixels in the image to obtain thresholds, and filter out suspected edge points for defect detection. Other solutions acquire 3D point cloud data of the cabinet to build a point cloud model, and combine machine vision to achieve rapid detection of the cabinet outline, thereby identifying shape defects. However, the core function of existing machine vision inspection solutions is to identify whether there are appearance defects such as scratches, dents, and drips on the cabinet surface. For deeper traceability needs, they are mainly determined based on experience. This means that after a defect is discovered, enterprises still need to rely on manual experience to check each process step by step. The traceability efficiency is low and the accuracy is poor, which makes it difficult to meet the requirements of modern intelligent manufacturing for closed-loop quality control. Therefore, how to simultaneously achieve high-precision detection of appearance defects in network cabinets, locate the processes that cause defects, determine the causes of specific parameters, and quantitatively invert process parameters is one of the fundamental problems that this invention aims to solve. Summary of the Invention
[0004] To simultaneously achieve high-precision detection of appearance defects in network cabinets, process location, determination of specific parameter causes, and quantitative inversion of process parameters, this application provides a machine vision-based method for tracing the source of appearance defects in network cabinets, employing the following technical solution:
[0005] A machine vision-based method for tracing the source of appearance defects in network cabinets includes:
[0006] Multiple frames of images of the network cabinet surface under multi-angle light sources are acquired. The normal vector and albedo map of each point on the surface are solved based on the photometric stereo vision algorithm. The absolute height map of the surface is reconstructed through the Poisson equation.
[0007] A fusion response map is constructed based on the absolute height map and albedo map. The fusion response map is then processed and adhesion defects are separated to output a set of instance regions for each independent defect.
[0008] Extract the source feature tensor for each individual defect region;
[0009] A hierarchical dynamic Bayesian network is constructed, which includes an observation layer, a process hidden layer, and a parameter cause hidden layer. The source feature tensor is used as the observation input, and the variational Bayesian expectation-maximization algorithm is used to decompose and iteratively solve the joint posterior probability. The posterior probability of the defect belonging to each production process and the posterior probability of it belonging to each specific parameter cause under the given process conditions are output. According to the maximum posterior criterion, the process and parameter cause with the highest posterior probability are selected as the localization result.
[0010] After identifying the specific cause of the parameter, an inverse physical mapping model is established for the production process corresponding to the cause. A regularized inverse problem is constructed, and the geometric quantitative index of the defect is used as input to solve the quantitative deviation of the process parameter in the current process from the standard value.
[0011] Calculate the source tracing confidence of the current source tracing result and update the prior distribution of the dynamic Bayesian network based on the source tracing results of historical batches.
[0012] Optionally, the process of solving for the normal vector includes:
[0013] Using light sources from at least three different directions, establish a set of reflection intensity equations for each pixel. , , Let L be the brightness vector, and L be the light source direction matrix where the light source direction vectors are stacked row by row. For combined vectors, Albedo, It is the normal vector;
[0014] The combined vector is obtained by solving using the least squares method. The albedo of a pixel is obtained by taking the magnitude of the combined vector. Obtain the albedo map and normal vector. ;
[0015] Calculating the surface gradient field from the normal vector , By solving the Poisson equation The absolute height map Z(x,y) of the surface is reconstructed.
[0016] Optionally, the source feature tensor includes deep geometric features extracted based on the height map, surface texture features extracted based on the albedo map, and topological location features extracted based on prior network cabinet structure.
[0017] The deep geometric features include the maximum depression depth of the defect area, the defect volume, the Gaussian curvature histogram entropy value, and the edge slope angle;
[0018] The surface texture features include albedo variance and local binary pattern uniformity;
[0019] The topological location features include the normalized offset of the defect relative to the center of the standard U-hole of the network cabinet and the weighted distance from the defect to the bend edge of the cabinet.
[0020] Optionally, observation layer The traceability feature tensor for the current batch; hidden process layer Includes stamping, welding, painting, and assembly processes; parameter formation hidden layer This includes abnormal states of multiple specific process parameters under each process step;
[0021] With variational distribution Approximate replacement of exact joint posterior probability ,Will Decomposed into Through iterative formula and Update until Convergence is determined when the maximum change is less than a preset convergence threshold, and the independent posterior probabilities of each cause are output, where, Represents latent variables that cause parameters Find the mathematical expectation of all possible discrete states. Representing implicit variables for process Find the mathematical expectation of all possible discrete states. is the joint log-likelihood of the current observation and the combination of latent variables, and c is a constant term that is independent of the current variable to be optimized.
[0022] Optionally, the parameter origination hidden layer Abnormal process parameters during the spraying process include: excessively high electrostatic voltage, excessively fast conveyor chain speed, low paint viscosity, and excessively high ambient humidity.
[0023] Optionally, when the electrostatic voltage is too high, a positive model between electrostatic voltage and roughness is established. Given the actual observed roughness, a regularized inverse problem is constructed to inversely deduce the voltage deviation.
[0024] Optionally, when the conveyor chain speed is too fast, a positive model between the chain speed and the albedo deviation is established. Given the actual observed albedo deviation, a regularized inverse problem is constructed to infer the chain speed deviation.
[0025] Optionally, when the paint viscosity is low, a positive model is established between the sag length and the spray flow rate, paint viscosity, and chain speed. Given the actual observed sag length and standard process parameters, a regularized inverse problem is constructed to inversely deduce the quantitative deviation value of the paint viscosity.
[0026] Optionally, in the case of excessive ambient humidity, a positive model between ambient relative humidity and sensitive indicators can be established. Given the measured sensitive indicators of the current defective area, a regularized inverse problem can be constructed to infer the ambient humidity deviation.
[0027] Optionally, the source tracing confidence is determined based on the noise standard deviation of the height map reconstruction, the maximum depth of the defect, and the signal-to-noise ratio of the input image. When the source tracing confidence is lower than a preset threshold, the system outputs a low confidence prompt and suggests manual review.
[0028] In summary, this application includes at least one of the following beneficial technical effects:
[0029] I. This invention constructs a hierarchical dynamic Bayesian network that includes an observation layer, a process hidden layer, and a parameter cause hidden layer. The detected defect feature tensor is used as the observation input, and variational Bayesian inference is used to output the posterior probability of the defect belonging to each process such as stamping, welding, painting, and assembly. For the first time in the field of network cabinet appearance inspection, a complete closed loop from defect detection to process traceability has been realized, enabling enterprises to directly locate the responsible process after discovering a defect, and significantly shortening the investigation cycle of quality problems.
[0030] Second, the present invention decouples the physical shape signal of each pixel from the surface material signal from the original image through the process of obtaining absolute height map and albedo map. The absolute height map reconstructed on this basis is a pure depth geometry signal, which is completely unaffected by the color, gloss and illumination angle of the cabinet surface. This enables the subsequent detection algorithm to reduce the influence of reflection and directly touch the real physical deformation of the metal sheet metal, which greatly improves the detection rate of stamping scratches and welding pits under harsh lighting conditions. Attached Figure Description
[0031] Figure 1 This is a flowchart of the steps in the machine vision-based method for tracing the source of appearance defects in network cabinets in this invention. Detailed Implementation
[0032] The embodiments of this application are described in detail below, and examples of the embodiments are shown in the accompanying drawings.
[0033] In the description of this specification, the references to "certain embodiments," "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples" refer to specific features, structures, materials, or characteristics described in connection with the described embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0034] Please see Figure 1 This application discloses a machine vision-based method for tracing the source of appearance defects in network cabinets, comprising:
[0035] 01. Collect multiple frames of images of the network cabinet surface under multiple light sources, solve the normal vector and albedo map of each point on the surface based on the photometric stereo vision algorithm, and reconstruct the absolute height map of the surface through the Poisson equation.
[0036] 02. Construct a fusion response map based on the absolute height map and albedo map, process the fusion response map and separate adhesion defects, and output the set of instance regions for each independent defect;
[0037] 03. Extract the source feature tensor for each individual defect region;
[0038] 04. Construct a hierarchical dynamic Bayesian network, which includes an observation layer, a process hidden layer, and a parameter cause hidden layer. The source feature tensor is used as the observation input. The variational Bayesian expectation-maximization algorithm is used to decompose and iteratively solve the joint posterior probability. The posterior probability of the defect belonging to each production process and the posterior probability of belonging to each specific parameter cause under the condition of a given process are output. According to the maximum posterior criterion, the process and parameter cause with the highest posterior probability are selected as the localization result.
[0039] 05. After identifying the specific cause of the parameter, establish an inverse physical mapping model for the production process corresponding to the cause, construct a regularized inverse problem, take the geometric quantitative index of the defect as input, and inversely solve the quantitative deviation of the process parameter in the current process that deviates from the standard value.
[0040] 06. Calculate the source tracing confidence of the current source tracing result, and update the prior distribution of the dynamic Bayesian network based on the source tracing results of historical batches.
[0041] This invention constructs a hierarchical dynamic Bayesian network comprising an observation layer, a process hidden layer, and a parameter cause hidden layer. The detected defect feature tensor is used as the observation input, and variational Bayesian inference is used to output the posterior probability of the defect belonging to each process, such as stamping, welding, painting, and assembly. For the first time in the field of network cabinet appearance inspection, a complete closed loop from defect detection to process traceability has been achieved, enabling enterprises to directly locate the responsible process after discovering a defect, and significantly shortening the investigation cycle of quality problems.
[0042] In one embodiment, the process of solving for the normal vector includes:
[0043] Using light sources from four different directions, a set of equations for reflection intensity is established for each pixel. , , Let L be the brightness vector, and L be the light source direction matrix where the light source direction vectors are stacked row by row. For combined vectors, Albedo, The normal vector is used; the system of equations is solved using the least squares method. Obtain the combined vector Take the magnitude of the combined vector. Obtain the albedo of the pixel. Obtain the albedo map and normal vector. Normal vector .
[0044] Calculating the surface gradient field from the normal vector , By solving the Poisson equation The absolute height map Z(x,y) of the surface is reconstructed.
[0045] It should be noted that the reflection intensity equations are based on the Lambertian reflection model; in the Poisson equation, p is a shorthand for p(x,y), q is a shorthand for q(x,y), and Z is a shorthand for Z(x,y). ,Right now The three components in the spatial rectangular coordinate system are denoted as follows: .
[0046] This embodiment obtains the physical shape signal (normal vector) of each pixel through the process of acquiring absolute height map and albedo map. ) and surface material signal (albedo) The image is decoupled from the original image; the reconstructed absolute height map is a pure depth geometry signal, completely unaffected by the color, gloss, and lighting angle of the cabinet surface; this allows subsequent detection algorithms to reduce the influence of reflections and directly access the actual physical deformation of the metal sheet, greatly improving the detection rate of stamping scratches and welding pits under harsh lighting conditions.
[0047] In one embodiment, the process of constructing the fused response graph includes: through Obtain the fusion response map ;in, The gradient magnitude of the heightmap. The mean local background albedo is obtained by applying a 50×50 pixel window mean filter to the albedo map. The absolute deviation of the albedo from the background mean; , The weighting coefficients are selected by offline grid search calibration with the goal of maximizing the F1-Score for defect detection.
[0048] The process of processing the fused response map and separating adhesion defects includes: binarizing the fused response map, using distance transform combined with watershed segmentation to separate adhesion defects, and outputting a set of instance regions for each independent defect. The process of separating adhering defects is as follows: For each foreground pixel after binarization, calculate its Euclidean distance to the nearest background pixel. The larger the Euclidean distance, the farther the pixel is from the defect edge. If the distance between two local maxima is less than a preset minimum spacing threshold, they are merged into the same marker. Extract the local maxima of the Euclidean distance map as the forced seed markers of the watershed (in this embodiment, "local" refers to the neighborhood set of 8). Treat the negative values of the distance map as topological topography maps, execute the immersion watershed algorithm, and output the marker map. Extract the pixel coordinate set of each independent defect region based on the marker map. .
[0049] It should be noted that the watershed segmentation method is existing technology, and its specific implementation process will not be described in detail.
[0050] This embodiment significantly improves the overall detection rate of various defects and reduces the risk of missed and false detections by multimodal fusion of the height map and albedo map obtained from photometric stereo vision. Through the process of separating adherent defects, it achieves accurate instance-level separation of adherent defects, ensuring the physical purity of subsequent feature extraction and source tracing inference. By selecting only local maxima points in the distance map that are significantly higher than the local neighborhood as forced seed markers before watershed transformation, the number of catchment basins is fundamentally limited to be equal to the number of actual physical defects, rather than the number of all the tiny fluctuations in the image. This makes the defect reports output by the production line no longer filled with a lot of invalid noise, and the readability and credibility are significantly improved.
[0051] In one embodiment, the source feature tensor includes deep geometric features extracted based on the height map, surface texture features extracted based on the albedo map, and topological location features extracted based on prior knowledge of the network cabinet structure; wherein, the deep geometric features include the maximum indentation depth of the defective region. Defective volume Gaussian curvature histogram entropy value and edge slope angle ;in, A collection of defective areas. The ideal reference plane height corresponding to the defective area (determined by fitting the defect-free area). Let b be the number of pixels whose Gaussian curvature values fall within the interval b, where B = 64 and b is the index of B. The equivalent radius of the defective area. A represents the area of the defective region.
[0052] Surface texture features include albedo variance (in ) and local binary mode uniformity ,in, P is the number of neighboring points, and p is the index of P. , U is the albedo value of the neighboring pixels, and U() represents the number of transitions in the LBP mode.
[0053] Topological location features include the normalized offset of defects relative to the center of the standard U-hole in the network cabinet. , , , This indicates the location of the center of gravity of the defective area in the image. These are the minimum and maximum X coordinates of the panel in the image coordinate system. The minimum and maximum Y coordinates of the panel in the image coordinate system; the weighted distance from the defect to the bend edge of the cabinet. , This is the edge weighting coefficient, with a value ranging from 0 to 1. This is the Euclidean distance to the nearest edge.
[0054] Observation layer The traceability feature tensor for the current batch; hidden process layer Includes stamping, welding, painting, and assembly processes; parameter formation hidden layer It includes abnormal states of multiple specific process parameters under each process step; in the form of variational distribution. Approximate replacement of exact joint posterior probability ,Will Decomposed into Through iterative formula and Update until Convergence is determined when the maximum change is less than the preset convergence threshold, and the independent posterior probabilities of each cause are output.
[0055] in, Represents latent variables that cause parameters Find the mathematical expectation of all possible discrete states. Representing implicit variables for process Find the mathematical expectation of all possible discrete states. The joint log-likelihood of the current observation and the combination of latent variables is expanded into the product of the observation probability and the state transition probability according to the first-order Markov assumption: ,in, To measure the Mahalanobis distance between the observation input (source feature tensor) and the standard features corresponding to the historical causes of the processes, and These are the process transition probability matrix and the causal transition probability, respectively. Represented using a 4×4 Markov transition matrix, corresponding to the stamping, welding, painting, and assembly processes, the matrix elements are... Satisfy row normalization constraints And the probability of continuation of the same process The default value is 0.85, and the default value for jumping between non-adjacent processes is 0.01.
[0056] Cause transition probability use 1-order matrix representation, The total number of parameter causes under the nth process, matrix elements Satisfy line normalization And the probability of continuation of the same cause The default value is 0.75.
[0057] The iterative process is as follows:
[0058] S1. Determine if historical batch data exists:
[0059] If it exists, then take the posterior probability of the previous batch after convergence as the initial value of the current batch;
[0060] If it does not exist, initialize. It is a uniform distribution;
[0061] S2, will Substitute into the iterative formula Calculate the unnormalized log probability of each process. After exponential normalization After the update ;
[0062] S3, will Substitute into the iterative formula Calculate the unnormalized log probability of the cause of each parameter. After exponential normalization After the update ;
[0063] S4. Repeat steps S2 and S3 until the interval between two iterations. The change is less than a preset threshold, which in this embodiment is . .
[0064] It should be noted that c is a constant term that is independent of the current variable to be optimized; this constant term includes the entropy term of the variational distribution and the normalization denominator, which will be automatically canceled out in the subsequent exponential normalization operation.
[0065] This invention decomposes the joint posterior probability into mean-field theory. Given the observed defect features Under these conditions, the reasoning at the process level and the reasoning at the causal level are mathematically decoupled, allowing the system to independently output the posterior probability of each process. The posterior probability of the causes of each parameter For example, when the total posterior probability of the spraying process... When the value is 0.92, the system can further output... =0.87, thus precisely pinpointing the root cause as excessively low paint viscosity, rather than a general spraying anomaly; through an iterative process, this can typically be achieved within 5 to 15 iterations. The convergence accuracy is high, and the time for a single inference can be controlled within 50ms, fully meeting the real-time requirements of online detection on the production line.
[0066] In one embodiment, the parameter-genetic hidden layer Abnormal process parameters during the spraying process include: excessively high electrostatic voltage, excessively high conveyor chain speed, low paint viscosity, and excessively high ambient humidity. Specifically, in the case of excessively high electrostatic voltage, a relationship between electrostatic voltage U and surface roughness is established. The positive model between them is as follows: , , Standard process voltage, The reference roughness under standard voltage, These are the equipment characteristic coefficients, which are obtained in advance through historical calibration experiments; For observation noise; given the actual observation roughness. Construct a regularized inverse problem to inversely deduce the voltage deviation. The inverse regularization problem is: The first item Transforming complex absolute value optimization into convex quadratic form optimization ensures that the objective function has a globally unique minimum value within its domain, enabling gradient descent to converge quickly and stably; the second term The squaring operation in the model imposes a smoothness constraint on the deviation, effectively suppressing non-physical extreme inversion results caused by image noise or model calibration errors, and ensuring that the output quantitative deviation value has engineering credibility. Here is a regularization parameter for voltage. To prevent large non-physical deviations caused by noise interference, Let represent the independent variable that makes the function reach its minimum value. This represents taking the square of the L2 norm; in this embodiment, it is solved quickly using gradient descent or analytical differentiation (setting the derivative to zero and taking the positive root), outputting the quantitative deviation value. .
[0067] When the conveyor chain speed is too high, establish the chain speed. deviation from albedo The positive model between them ,in, The overall coefficient of the merged equipment was pre-calibrated through spraying experiments at different chain speeds on a standard template. , Given the standard chain speed and the actual observed albedo deviation. To construct the regularized inverse problem and inversely deduce the chain speed deviation, the regularized inverse problem is as follows: The constraints are , Here is a regularization parameter related to chain speed. It is obtained through offline calibration, and is set by... This allows for the imposition of a smoothness constraint on the inversion results, ensuring that even in industrial environments with an image signal-to-noise ratio of only 30dB, the output remains smooth. It continues to converge stably to near the true deviation value; The preset alarm tolerance threshold for process parameters is determined based on the engineering standards of the network cabinet coating process and the normal fluctuation range in historical production data. This embodiment uses Newton's method for iterative solution, outputting a quantitative deviation value. .
[0068] Establish the sagging length when the paint viscosity is low. With spraying flow rate Paint viscosity Chain speed The positive model between k is the equipment coefficient, which is determined by a standard calibration experiment before the equipment is put into production (using standard viscosity paint, standard chain speed, and standard flow rate to spray a sample, measuring the sag length, and then inferring the equipment coefficient k based on the sag length). Let g be the density of the paint (which is unrelated to albedo), g be the acceleration due to gravity, and the actual observed sag length be given. and standard process parameters To construct the inverse regularization problem and deduce the quantitative deviation value of paint viscosity, the inverse regularization problem is as follows: ,in, The regularization parameter for paint viscosity is obtained through offline calibration; this embodiment uses Newton's method iteratively to solve for the parameter and outputs a quantitative deviation value. .
[0069] In situations of excessively high ambient humidity, establish the relationship between ambient relative humidity (H) and sensitive indicators. A positive model between them, where the sensitive indicators ,in, , The normalized weighting coefficients were determined from historical fault data through principal component analysis; D represents the bubble pit surface density within the defective region (Gaussian high-pass filtering was applied to the height map to extract isolated minimum points with amplitudes greater than a preset depth threshold, and the number of pits per unit area was counted as the bubble pit surface density); CV represents the local coefficient of variation of albedo within the defective region (the ratio of the standard deviation of albedo to the mean); the forward model is: ,in, The standard ambient humidity is set to 60% in this embodiment. This is the baseline index value under standard humidity conditions. The time constant is the humidity-sensitive value. , This is the magnification factor. , and Pre-calibrated using historical batch data through nonlinear least squares fitting; given the measured sensitivity index of the current defect area. To construct the regularized inverse problem to inversely deduce the environmental humidity deviation, the regularized inverse problem is as follows: ,in, This is a regularization parameter related to relative humidity, obtained through offline calibration; in this embodiment, Newton's method is used for iterative solution, outputting a quantitative deviation value. .
[0070] It should be noted that the above regularization parameters were calibrated offline using the L-curve criterion. Specifically, in an offline environment, multiple sets of defect samples with known actual process deviation values were extracted from the historical database. For each candidate regularization parameter λ, its inversion deviation value was solved by substituting it into the inverse regularization problem, and the data fitting residual norm corresponding to the solution was calculated. reconciliation norm ,Will and An L-curve is plotted in a two-dimensional coordinate system, and the λ corresponding to the point of maximum curvature on the curve is taken as the optimal regularization parameter for the model. If the inverted physical quantity corresponding to this optimal value violates the aforementioned preset physical boundary constraints, then the λ corresponding to the constraint boundary is taken as the final selected value. This calibration process is performed offline once before the equipment is put into production or after a major overhaul. It does not need to be repeated during online production line testing, thus not increasing the computational burden of online real-time inference.
[0071] This embodiment establishes independent forward models and regularized inverse problem-solving frameworks for the four main causes of anomalies in the spraying process. It can deduce specific process parameter deviation values from the geometric quantitative indicators of defects (roughness, run length, albedo deviation, bubble pit surface density, etc.), providing production line engineers with directly executable quantitative adjustment suggestions and significantly improving the engineering practical value of the traceability results.
[0072] In one embodiment, source tracing confidence Noise standard deviation reconstructed from height map The deepest flaw The signal-to-noise ratio (SNR) of the input image is determined, and is expressed as: If the source tracing confidence level When the confidence level falls below the preset threshold of 0.6, the system outputs a low-confidence warning and suggests manual verification. The process of updating the prior distribution of the dynamic Bayesian network based on historical batch tracing results includes: through... To be updated, among which, Let be the prior distribution of the processes in batch t+1. Let be the prior distribution of the process in batch t. Forgetting factor, In this embodiment, it is set to 0.8; W is the width of the sliding window. For the process location result of the i-th batch, the high-confidence batches within the N sliding window ( The number of valid samples, Let be the indicator function, if the location result of the i-th batch If the probability is equal to the process state S currently being calculated, return 1; otherwise, return 0.
[0073] In this embodiment, through the process of obtaining traceability confidence, the system automatically isolates unreliable traceability results caused by low-quality inputs or minor defects from the automatic decision-making chain, avoiding false alarms that may mislead production line operators due to sensor noise, ambient light interference, or model boundary condition failure. Through the process of updating the prior distribution, the Bayesian prior can dynamically evolve with the detection results of new batches, always maintaining the best representation of the current production line status.
[0074] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A machine vision-based method for tracing the source of appearance defects in network cabinets, characterized in that, include: Multiple frames of images of the network cabinet surface under multi-angle light sources are acquired. The normal vector and albedo map of each point on the surface are solved based on the photometric stereo vision algorithm. The absolute height map of the surface is reconstructed through the Poisson equation. A fusion response map is constructed based on the absolute height map and albedo map. The fusion response map is then processed and adhesion defects are separated to output a set of instance regions for each independent defect. Extract the source feature tensor for each individual defect region; A hierarchical dynamic Bayesian network is constructed, which includes an observation layer, a process hidden layer, and a parameter cause hidden layer. The source feature tensor is used as the observation input, and the variational Bayesian expectation-maximization algorithm is used to decompose and iteratively solve the joint posterior probability. The posterior probability of the defect belonging to each production process and the posterior probability of it belonging to each specific parameter cause under the given process conditions are output. According to the maximum posterior criterion, the process and parameter cause with the highest posterior probability are selected as the localization result. After identifying the specific cause of the parameter, an inverse physical mapping model is established for the production process corresponding to the cause. A regularized inverse problem is constructed, and the geometric quantitative index of the defect is used as input to solve the quantitative deviation of the process parameter in the current process from the standard value. Calculate the source tracing confidence of the current source tracing result and update the prior distribution of the dynamic Bayesian network based on the source tracing results of historical batches.
2. The method for tracing the source of appearance defects in a network cabinet using machine vision according to claim 1, characterized in that, The process of solving for the normal vector includes: Using light sources from at least three different directions, establish a set of reflection intensity equations for each pixel. , , Let L be the brightness vector, and L be the light source direction matrix where the light source direction vectors are stacked row by row. For combined vectors, Albedo, It is the normal vector; The combined vector is obtained by solving using the least squares method. The albedo of a pixel is obtained by taking the magnitude of the combined vector. Obtain the albedo map and normal vector. ; Calculating the surface gradient field from the normal vector , By solving the Poisson equation The absolute height map Z(x,y) of the surface is reconstructed.
3. The method for tracing the source of appearance defects in a network cabinet using machine vision according to claim 1, characterized in that, The source-tracing feature tensor includes deep geometric features extracted based on the height map, surface texture features extracted based on the albedo map, and topological location features extracted based on prior knowledge of the network cabinet structure. The deep geometric features include the maximum depression depth of the defect area, the defect volume, the Gaussian curvature histogram entropy value, and the edge slope angle; The surface texture features include albedo variance and local binary pattern uniformity; The topological location features include the normalized offset of the defect relative to the center of the standard U-hole of the network cabinet and the weighted distance from the defect to the bend edge of the cabinet.
4. The machine vision-based method for tracing the source of appearance defects in network cabinets according to claim 1, characterized in that, Observation layer The traceability feature tensor for the current batch; hidden process layer Includes stamping, welding, painting, and assembly processes; parameter formation hidden layer This includes abnormal states of multiple specific process parameters under each process step; With variational distribution Approximate replacement of exact joint posterior probability ,Will Decomposed into Through iterative formula and Update until Convergence is determined when the maximum change is less than a preset convergence threshold, and the independent posterior probabilities of each cause are output, where, Represents latent variables that cause parameters Find the mathematical expectation of all possible discrete states. Representing implicit variables for process Find the mathematical expectation of all possible discrete states. is the joint log-likelihood of the current observation and the combination of latent variables, and c is a constant term that is independent of the current variable to be optimized.
5. The machine vision-based method for tracing the source of appearance defects in network cabinets according to claim 1, characterized in that, The parameter origin hidden layer Abnormal process parameters during the spraying process include: excessively high electrostatic voltage, excessively fast conveyor chain speed, low paint viscosity, and excessively high ambient humidity.
6. The machine vision-based method for tracing the source of appearance defects in network cabinets according to claim 5, characterized in that, Under conditions of excessively high electrostatic voltage, a positive model between electrostatic voltage and roughness is established. Given the actual observed roughness, a regularized inverse problem is constructed to inversely deduce the voltage deviation.
7. The machine vision-based method for tracing the source of appearance defects in a network cabinet according to claim 5, characterized in that, When the conveyor chain speed is too high, a positive model between the chain speed and the albedo deviation is established. Given the actual observed albedo deviation, a regularized inverse problem is constructed to infer the chain speed deviation.
8. A machine vision-based method for tracing the source of appearance defects in network cabinets according to claim 5, characterized in that, When the paint viscosity is low, a positive model is established between the sag length and the spray flow rate, paint viscosity, and chain speed. Given the actual observed sag length and standard process parameters, a regularized inverse problem is constructed to inversely deduce the quantitative deviation value of the paint viscosity.
9. A machine vision-based method for tracing the source of appearance defects in a network cabinet according to claim 5, characterized in that, In the case of excessive ambient humidity, a positive model is established between relative ambient humidity and sensitive indicators. Given the measured sensitive indicators of the current defective area, a regularized inverse problem is constructed to infer the ambient humidity deviation.
10. A machine vision-based method for tracing the source of appearance defects in a network cabinet according to claim 1, characterized in that, The source tracing confidence level is determined based on the noise standard deviation of the height map reconstruction, the maximum depth of the defect, and the signal-to-noise ratio of the input image. When the source tracing confidence level is lower than a preset threshold, the system outputs a low confidence level prompt and suggests manual review.