Printing test method, device and equipment for three-dimensional image and storage medium

By obtaining the disparity feature map of the 3D image, constructing a feature pool and using a lightweight convolutional network and a deep residual network for detection, a quality feature map and a defect type distribution map are generated, which solves the problem of insufficient quality assessment in 3D image printing and realizes efficient quality control and improvement measures.

CN120689294AInactive Publication Date: 2025-09-23DONGGUAN XIANGQI PRINTING PROD CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510770663.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the 3D image printing process, inadequate image quality assessment can lead to printing failures, resulting in waste of materials and time, and may also cause customer dissatisfaction and financial losses.

Method used

By obtaining the disparity feature map of the three-dimensional image, constructing a feature pool for non-local attention calculation, generating structural consistency evaluation indicators, using lightweight convolutional networks and deep residual networks for coarse and fine detection, generating comprehensive quality feature maps and defect type distribution maps, and combining the preset evaluation indicator library to determine the quality level.

Benefits of technology

Provides clear and intuitive quality evaluation criteria to help users identify abnormal areas and take corrective measures to improve printing quality and reduce the risk of printing failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689294A_ABST
    Figure CN120689294A_ABST
Patent Text Reader

Abstract

The invention provides a printing test method, device and equipment for a three-dimensional image and a storage medium. The method comprises the steps that a parallax feature map of a printing sample of the three-dimensional image is acquired; constructing a feature pool according to the parallax feature map, and performing non-local attention calculation on features in the feature pool to obtain a structural consistency evaluation index; generating a comprehensive quality feature map according to the parallax feature map and the structural consistency evaluation index; performing coarse detection on the comprehensive quality feature map by using a preset lightweight convolutional network to obtain an abnormal region mark map, and performing fine detection on the abnormal region mark map by using a preset deep residual network to obtain a defect type distribution map; and determining a quality grade evaluation result according to the defect type distribution diagram and a preset evaluation index library.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image quality analysis, and in particular to a printing test method, device, equipment and storage medium for three-dimensional images. Background Art

[0002] Currently, three-dimensional image printing is a major innovation in modern printing technology, widely used in fields such as advertising, design, medicine, and education. However, the high cost of 3D image printing has become a major obstacle to its widespread application. The production process of 3D images is complex, involving image acquisition, processing, and printing output, each of which requires high-precision operations and high-quality materials. Especially in the printing process, if image quality is not properly assessed, any slight error will be magnified in the final product, resulting in irreversible printing failure. Printing failure not only means a waste of materials and time, but also may lead to customer dissatisfaction and financial losses. Summary of the Invention

[0003] The present application provides a three-dimensional image printing test method, device, equipment and storage medium for evaluating the quality of three-dimensional images before printing to improve printing quality.

[0004] In a first aspect, an embodiment of the present application provides a method for printing a three-dimensional image, the method comprising: obtaining a disparity feature map of a printed sample of a three-dimensional image; constructing a feature pool according to the disparity feature map, performing non-local attention calculation on the features in the feature pool, and obtaining a structural consistency evaluation index; generating a comprehensive quality feature map according to the disparity feature map and the structural consistency evaluation index; Using a preset lightweight convolutional network to perform a coarse detection on the comprehensive quality feature map to obtain an abnormal area marking map, and using a preset deep residual network to perform a fine detection on the abnormal area marking map to obtain a defect type distribution map; The quality grade assessment result is determined based on the defect type distribution map and the preset evaluation index library.

[0005] In a second aspect, an embodiment of the present application provides a three-dimensional image printing test device, the device comprising: A feature extraction module, for obtaining a disparity feature map of a printed sample of a three-dimensional image; An indicator generation module is used to construct a feature pool based on the disparity feature map, perform non-local attention calculation on the features in the feature pool, and obtain a structural consistency evaluation indicator; A feature analysis module, configured to generate a comprehensive quality feature map based on the disparity feature map and the structural consistency evaluation index; An image detection module is configured to perform a coarse detection on the comprehensive quality feature map using a preset lightweight convolutional network to obtain an abnormal area marking map, and perform a fine detection on the abnormal area marking map using a preset deep residual network to obtain a defect type distribution map; The result output module is used to determine the quality grade assessment result according to the defect type distribution map and the preset evaluation index library.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device including a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the three-dimensional image printing test method as described in any one of the embodiments of the present application when executing the computer program.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the three-dimensional image printing test method as described in any one of the embodiments of the present application.

[0008] An embodiment of the present application provides a printing test method for a three-dimensional image, the method comprising: obtaining a disparity feature map of a printed sample of the three-dimensional image; constructing a feature pool based on the disparity feature map, performing non-local attention calculation on features in the feature pool, and obtaining a structural consistency evaluation index; generating a comprehensive quality feature map based on the disparity feature map and the structural consistency evaluation index; performing a coarse detection on the comprehensive quality feature map using a preset lightweight convolutional network to obtain an abnormal area marking map, and performing a fine detection on the abnormal area marking map using a preset deep residual network to obtain a defect type distribution map; and determining a quality grade assessment result based on the defect type distribution map and a preset evaluation index library. In the above method, disparity feature maps are extracted through multi-view image datasets, and structural consistency evaluation is performed using the disparity feature maps to effectively identify and quantify the three-dimensional structural characteristics and consistency of printed samples. A non-local attention mechanism and feature fusion technology are used to obtain a comprehensive quality feature map, and a preset lightweight convolutional network is used for coarse detection to quickly locate possible abnormal areas. Subsequently, a deep residual network is used for fine detection to further refine the defect type distribution. The quality grade assessment results are determined based on the defect type distribution map and the preset evaluation index library. This can provide users with clear and intuitive quality evaluation standards, making it easier for users to understand and take corresponding improvement measures. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic flow chart of a three-dimensional image printing test method provided in an embodiment of the present application; Figure 2 A schematic block diagram of a three-dimensional image printing test device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0011] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0012] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0013] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0014] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0015] See also Figure 1 , Figure 1 This is a schematic flow chart of a three-dimensional image printing test method provided by an embodiment of the present application. Figure 1 The printing test method of the three-dimensional image shown includes the following steps: S101-S105.

[0016] S101 , obtaining a disparity feature map of a printed sample of a three-dimensional image.

[0017] For example, a high-precision industrial camera array is used to collect three-dimensional image printed samples from multiple angles. The camera array consists of 7 industrial cameras with a resolution of 4096×3072 pixels, arranged in a semicircle. The angle between adjacent cameras is maintained at 15° to ensure that the surface information of the sample is captured in all directions. During the acquisition process, the sample is placed on a precision rotating platform and rotated 360° at a constant speed of 5° / second. The camera collects synchronously at a frequency of 30 frames / second, and a total of approximately 2520 high-resolution images are acquired. Multi-scale convolutional decomposition is performed on the collected multi-view image dataset. The convolution kernel sizes are set to 3×3, 5×5, and 7×7, respectively, with a step size of 1, to generate feature atlases of three different scales. The global correlation matrix of the feature atlas is then calculated, and the correlation threshold is set to 0.75 to extract the correspondence between different regions. Based on the correspondence, the disparity between adjacent view images is calculated to generate a disparity map. The disparity map is segmented by adaptive thresholding. The threshold parameters are dynamically calculated by the OTSU algorithm to obtain a map of significant disparity change areas. The boundaries are then extracted by the Canny edge detection algorithm (the high threshold is set to 100 and the low threshold is set to 30). A 4-connected domain analysis is performed to generate a disparity feature map with key area markings.

[0018] S102: construct a feature pool based on the disparity feature map, perform non-local attention calculation on the features in the feature pool, and obtain a structural consistency evaluation index.

[0019] For example, the disparity feature map is scanned horizontally and vertically with a step size of 8 pixels. At each step position, a pixel offset vector is calculated using a gradient operator and then L2 normalized to construct a set of 64 sampling directions. A 7×7 sampling grid is constructed based on the sampling direction set. A circular receptive field with a radius of 15 pixels is set for each sampling point in the disparity feature map. Within the receptive field, sine and cosine functions are used to encode spatial positions with an encoding dimension of 128, generating a sequence of feature blocks containing spatial coordinates and feature values. A feature index table is constructed using a KD tree structure with a node splitting threshold of 0.01 and a feature dimension of 256. The cosine distance matrix between feature blocks is calculated with a threshold of 0.85. Strongly correlated feature pairs are selected to form a correlation strength matrix. Based on the correlation strength matrix, an attention computation graph is constructed. A softmax operation with weight decay (attenuation factor of 0.7) is performed on the attention computation graph to obtain an attention coefficient matrix. The feature block sequence is weighted and summed according to the attention coefficient matrix, with weights ranging from 0 to 1. The ReLU nonlinear transformation function is applied to the weighted result. Spatial reconstruction is performed through skip connections and channel rearrangement (the number of channels is expanded from 64 to 128) to generate a global feature map. A feature association map is constructed within each 32×32 region of the global feature map. Graph convolution operations (with a kernel size of 3×3) are performed to calculate feature matching coefficients and obtain a similarity matrix. A multidimensional analysis of edge continuity, surface smoothness, and corner correspondence is used to determine structural consistency evaluation indicators.

[0020] S103: Generate a comprehensive quality feature map based on the disparity feature map and the structural consistency evaluation index.

[0021] For example, a stereo effect analysis is performed on the disparity feature map, calculating the direction and magnitude distribution of the disparity gradient within the local region. The gradient calculation uses the Sobel operator (kernel size 5×5) to extract depth variation features, forming the first feature branch. A structural quality analysis is performed on the structural consistency assessment indicators. Principal component analysis (PCA) is used for dimensionality reduction, retaining the principal components with a contribution rate of 95%. Structural deformation and consistency features are extracted to form the second feature branch. Color and texture analysis is performed on the multi-view image dataset. Color analysis is performed in the HSV color space, calculating statistical features of the hue, saturation, and brightness channels, including mean, variance, skewness, and kurtosis. Texture analysis uses the gray-level co-occurrence matrix (GLCM) method to calculate four statistical measures: contrast, correlation, energy, and homogeneity. Angles are set to 0°, 45°, 90°, and 135°, and distance parameters are 1, 3, and 5 pixels, forming the third feature branch. The three feature branches are fused using an adaptive weighting mechanism. The weight coefficients are dynamically adjusted based on the discriminability of each branch. The weight of the first branch is 0.4, the weight of the second branch is 0.35, and the weight of the third branch is 0.25. A weighted average method is used to obtain the initial fused features. The fused features are then nonlinearly transformed and normalized using the sigmoid function to enhance the expressiveness of the features and generate a comprehensive quality feature map containing multidimensional quality information.

[0022] S104. Use a preset lightweight convolutional network to perform a coarse detection on the comprehensive quality feature map to obtain an abnormal area marking map, and use a preset deep residual network to perform a fine detection on the abnormal area marking map to obtain a defect type distribution map.

[0023] For example, a multi-scale pyramid decomposition is performed on the comprehensive quality feature map, constructing a four-level scale pyramid with a scaling factor of 0.75, resulting in a multi-scale feature map. A sliding window scan is performed at each scale level with a window size of 64×64 pixels and a stride of 32 pixels to extract a set of sliding window feature blocks. Local gradients are calculated for each feature block, and the first-order central difference method is used to obtain the gradient components in the x and y directions, which are then synthesized into a gradient feature map. The gradient features are directional normalized, quantized into eight principal directions, to form a normalized gradient feature map. The normalized gradient feature map is then fed into a lightweight convolutional network consisting of three convolutional layers (with kernel sizes of 5×5, 3×3, and 3×3, and channels of 32, 64, and 128, respectively) and two max pooling layers (with kernel size of 2×2 and stride of 2). The activation function is LeakyReLU (negative slope of 0.1), resulting in a labeling map for abnormal regions. The abnormal region marker map is segmented and bounding extracted using a segmentation threshold of 0.65 and a bounding width of 2 pixels, resulting in a preliminary segmented region map. A residual learning module is constructed within each segmented region, consisting of two parallel paths: a primary path consisting of three consecutive convolutional layers (with a 3×3 kernel size and 256 output channels each), and a secondary path consisting of a 1×1 convolutional layer (with 256 output channels). This generates a preliminary residual feature map. This preliminary residual feature map is then subjected to 18 layers of depthwise convolution, each consisting of batch normalization (with a momentum parameter of 0.9), ReLU activation, and convolution (with a 3×3 kernel size). Global average pooling is then performed to generate a 2048-dimensional deep feature vector. This feature vector is then fed into fully connected layers (with 512, 256, and 8 neurons, respectively) and combined with a softmax classifier to generate a distribution map encompassing eight defect types.

[0024] S105. Determine the quality grade assessment result based on the defect type distribution map and the preset evaluation index library.

[0025] For example, a regional statistical analysis is performed on the defect type distribution map to calculate the number, area percentage, and spatial distribution density of different types of defects. The percentage threshold is set to 0.5%, and the density calculation uses the kernel density estimation method with a bandwidth parameter of 15 pixels. The location distribution characteristics of the defects are extracted, including the centroid coordinates, nearest neighbor distance, and spatial aggregation index, to construct a parameter set for the defect area and location distribution. The parameter set is compared with the standards in the preset evaluation index library. The evaluation index library contains reference standards for five quality levels. Each level defines the allowable range of defect type, number, area, and distribution. The Mahalanobis distance is used to measure the similarity between the sample and the standard to obtain a preliminary evaluation result. The five quality indicators in the preliminary evaluation results (print clarity, color consistency, three-dimensional effect, surface smoothness, and structural integrity) are weighted averaged, with weight coefficients of 0.15, 0.20, 0.25, 0.15, and 0.25, respectively, to calculate the overall quality evaluation score in the range of 0-100. The quality grade assessment results determined based on the scoring range classification standard (90-100 points for excellent quality, 80-89 points for good, 70-79 points for qualified, 60-69 points for defective, and below 60 points for unqualified) provide a decision-making basis for printing quality control and process optimization.

[0026] An embodiment of the present application provides a printing test method for a three-dimensional image, the method comprising: obtaining a disparity feature map of a printed sample of the three-dimensional image; constructing a feature pool based on the disparity feature map, performing non-local attention calculation on features in the feature pool, and obtaining a structural consistency evaluation index; generating a comprehensive quality feature map based on the disparity feature map and the structural consistency evaluation index; performing a coarse detection on the comprehensive quality feature map using a preset lightweight convolutional network to obtain an abnormal area marking map, and performing a fine detection on the abnormal area marking map using a preset deep residual network to obtain a defect type distribution map; and determining a quality grade assessment result based on the defect type distribution map and a preset evaluation index library. In the above method, disparity feature maps are extracted through multi-view image datasets, and structural consistency evaluation is performed using the disparity feature maps to effectively identify and quantify the three-dimensional structural characteristics and consistency of printed samples. A non-local attention mechanism and feature fusion technology are used to obtain a comprehensive quality feature map, and a preset lightweight convolutional network is used for coarse detection to quickly locate possible abnormal areas. Subsequently, a deep residual network is used for fine detection to further refine the defect type distribution. The quality grade assessment results are determined based on the defect type distribution map and the preset evaluation index library. This can provide users with clear and intuitive quality evaluation standards, making it easier for users to understand and take corresponding improvement measures.

[0027] In order to more clearly introduce the technical solution of the present application, the technical solution of the present application will be introduced through specific embodiments below. It should be noted that the specific embodiments are used to expand the technical solution of the present application, but are not intended to limit the present application.

[0028] In some embodiments, obtaining a disparity feature map of a printed sample of a three-dimensional image includes: S1011 - S1018 .

[0029] S1011 , collecting a multi-view image dataset of a printed sample of a three-dimensional image.

[0030] For example, a high-resolution industrial camera array was used to capture multi-angle images of a 3D printed sample. The camera array consisted of eight industrial cameras with a resolution of 4096×3072 pixels, spaced evenly at 45-degree intervals. The cameras had a focal length of 50mm, an aperture of F8.0, and an exposure time of 1 / 1000 second. During the capture process, the sample was placed on a precision rotating platform that rotated at a constant rate of 15 degrees per second. Each camera captured 24 images per rotation of the sample, resulting in a total of 192 high-resolution, multi-view images, forming a complete image dataset.

[0031] S1012. Perform multi-scale convolution on adjacent view images in the multi-view image dataset to obtain feature atlases of different scales.

[0032] For example, a five-layer pyramid structure is applied to the collected multi-view images for multi-scale decomposition, with each layer using 3×3 convolution kernels for feature extraction. The first layer uses 32 convolution kernels to extract edge texture features, the second layer uses 64 convolution kernels to extract local structural features, the third layer uses 128 convolution kernels to extract medium-scale features, the fourth layer uses 256 convolution kernels to extract large-scale features, and the fifth layer uses 512 convolution kernels to extract global semantic features. The feature maps in each layer are nonlinearly mapped using the ReLU activation function to generate a set of feature maps at different scales.

[0033] S1013. Perform global correlation calculation on the feature atlas to obtain a correlation matrix, where the correlation matrix includes correspondences between different regions.

[0034] For example, a non-local self-attention mechanism is used to calculate the correlation between different regions in the feature atlas. Attention calculations are implemented using a scaled dot product approach, with the query and key dimensions set to 128 and the value dimension set to 256. Attention weights are normalized using a softmax function, resulting in a 512×512 correlation matrix. Each element in the matrix represents the degree of similarity between the features of two regions, with values ​​ranging from 0 to 1. A higher correlation indicates a more likely correspondence between the two regions.

[0035] S1014 , performing disparity calculation on adjacent view images according to the correlation matrix to obtain a disparity map.

[0036] For example, a cost volume is constructed based on the correlation matrix. The size of the cost volume is height × width × maximum disparity value, with the maximum disparity value set to 192 pixels. A 3D convolutional network is used to extract features and calculate matching costs for the cost volume. The network consists of four 3D convolutional layers with a kernel size of 3×3×3. A soft argmin operation is used to calculate the optimal disparity value for each pixel, generating a disparity map with a disparity accuracy of 0.1 pixel.

[0037] S1015 , performing statistical analysis based on the distribution characteristics of the disparity values ​​in the disparity map to obtain a disparity distribution histogram, performing interval division and probability density calculation on the disparity distribution histogram to obtain an adaptive threshold parameter.

[0038] For example, a statistical analysis of the disparity values ​​in the disparity map is performed. The disparity value interval is set to 0-192 pixels with a step size of 1 pixel. The number of pixels in each interval is counted, and a disparity distribution histogram is plotted. An adaptive Gaussian mixture model is used to fit the histogram to determine the main disparity distribution intervals and calculate the probability density of each interval. Based on the peak and valley positions of the probability density curve, the OTSU algorithm is used to determine the optimal segmentation threshold and obtain the adaptive threshold parameters.

[0039] S1016 , performing region segmentation on the disparity map according to the adaptive threshold parameter to obtain a significant disparity change region map, performing boundary extraction and connected domain analysis on the significant disparity change region map to obtain a key region marker map.

[0040] For example, the disparity map is segmented using region growing based on adaptive threshold parameters, with the seed point selected as the local disparity extreme point. The variance of the disparity values ​​within the region is calculated during segmentation, and growth is stopped when the variance exceeds the threshold. The segmentation results are morphologically processed, using the Canny operator to extract region boundaries with a width of 3 pixels. Connected regions are identified through 8-neighborhood connectivity analysis, and regions with an area smaller than 100 square pixels are filtered out to produce a key region marker map.

[0041] S1017. Calculate feature weight coefficients based on the key area marking map, adjust the weights of features in corresponding areas in the feature atlas, and obtain an enhanced feature atlas.

[0042] For example, the region importance weight is calculated based on the key region marker map. The weight calculation takes into account three factors: region area, boundary complexity, and parallax change amplitude. The area weight is logarithmically related to the number of pixels in the region, the boundary complexity weight is obtained by calculating the boundary curvature, and the parallax change weight is proportional to the standard deviation of the parallax within the region. The three weights are weighted and summed to obtain the feature weight coefficient, which ranges from 0.5 to 2. The corresponding region in the feature atlas is weightedly enhanced according to the feature weight coefficient to obtain the enhanced feature atlas.

[0043] S1018. Perform multi-scale feature fusion processing on the enhanced feature atlas, select and combine features based on the complementarity of features at different scales, and obtain a disparity feature map.

[0044] For example, a feature pyramid network architecture is used to fuse the enhanced multi-scale features. The top-down feature maps undergo channel rescaling via 1×1 convolutions, are upsampled, and then element-wise summed with the feature maps below. Features at different scales are adaptively selected using an attention gating module with a gating threshold set to 0.3. The output disparity feature map contains rich multi-scale information, has a feature dimension of 256 channels, and has the same resolution as the input image.

[0045] In some embodiments, a feature pool is constructed based on the disparity feature map, and non-local attention calculation is performed on the features in the feature pool to obtain a structural consistency evaluation index, including: S1021-S1027.

[0046] S1021. Perform horizontal and vertical step scans on the disparity feature map, calculate the pixel offset at each step scan position, perform directional vector decomposition and normalization on the pixel offset, and obtain a sampling direction set.

[0047] Exemplarily, a bidirectional scanning strategy is used to process the disparity feature map, with the horizontal scanning step size set to 8 pixels and the vertical scanning step size set to 12 pixels. The displacement difference between adjacent pixels is calculated at each scanning position. A vector decomposition algorithm is applied to the obtained pixel offset to decompose it into horizontal and vertical components, and normalized by the L2 norm so that the vector modulus is 1. The normalized direction vector constitutes a sampling direction set, which contains the main structural direction information in the image. Density clustering analysis is performed on the sampling direction set, with the cluster radius set to 0.2 and the minimum number of samples set to 10, to identify the dominant direction and secondary direction. Based on the recognition results, a direction histogram is constructed, with the number of histogram bins being 36, each bin corresponding to a 10-degree angle range, and the feature distribution in each direction is statistically analyzed. The histogram data is Gaussian smoothed with a smoothing window size of 3 to eliminate the influence of noise and obtain a continuous direction distribution curve.

[0048] S1022. Construct a sampling grid according to the sampling direction set, set a receptive field range for each sampling point in the disparity feature map, perform spatial position encoding within the receptive field range, and obtain a feature block sequence, where the feature block sequence includes pixel position coordinates and corresponding feature values.

[0049] For example, a regular 16×16 sampling grid is constructed based on the set of sampling directions, and a 32×32 pixel receptive field is set for each sampling point in the disparity feature map. A position encoding algorithm is used within the receptive field to generate a spatial position encoding vector with a dimension of 128, containing both relative and absolute position information. The encoding result is combined with the original feature values ​​to form a sequence of feature blocks, each of which contains normalized pixel coordinates (x, y) and a 256-dimensional feature vector. Principal component analysis is applied to the feature vectors for dimensionality reduction, retaining principal components that explain 95% of the variance and reducing data redundancy. The reduced features are then nonlinearly transformed using a multi-layer perceptron with a hidden layer dimension of [128, 64], a LeakyReLU activation function, and a learning rate of 0.001. The transformed features are weightedly fused with the position encoding, and the fusion weights are adaptively learned using an attention mechanism to obtain an enhanced feature representation that combines local texture information and spatial position information.

[0050] S1023. Establish a feature index table for the feature block sequence, use the feature index table to calculate the cosine distance between each feature block and other feature blocks, calculate the correspondence between the feature blocks based on the cosine distance, and obtain a correlation strength matrix.

[0051] For example, a feature index table with a hash table structure is constructed, where the index key is the spatial position code of the feature block and the index value is the corresponding feature vector. The cosine similarity between feature blocks is calculated using the index table, and the calculation window size is set to 7×7 with a step size of 2. For each pair of feature blocks, the cosine distance is calculated by dot product operation and vector modulus normalization, and the distance value range is between [-1, 1]. The correspondence between feature blocks is screened based on the distance threshold of 0.85, and an N×N association strength matrix is ​​constructed, where N is the total number of feature blocks. The spectral clustering algorithm is applied to the association strength matrix, and the number of eigenvalues ​​is set to 8 to group the feature blocks into clusters. The centrality indicators, including degree centrality and eigenvector centrality, are calculated within each cluster to identify key feature blocks. A hierarchical feature description structure is constructed based on the key feature blocks to capture feature association patterns at different scales.

[0052] S1024. Construct an attention calculation graph based on the association strength matrix, perform a weighted-attenuated softmax operation on the attention calculation graph based on the pixel position, and obtain an attention coefficient matrix.

[0053] For example, the association strength matrix is ​​converted into an attention calculation graph with a sparse graph structure, in which the nodes represent feature blocks and the edge weights represent the association strength. A Gaussian weight decay function based on pixel distance is applied to the attention calculation graph, and the decay coefficient σ is set to 15 pixels. A softmax operation with a temperature parameter of 0.1 is performed to normalize the edge weight distribution and generate an attention coefficient matrix. This matrix reflects the attention allocation weights between different feature blocks and effectively captures long-range dependencies. The attention coefficient matrix is ​​sparsified, retaining the maximum weight values ​​of the top 20% and resetting the remaining weights to zero to reduce computational complexity. A multi-head attention mechanism is adopted with the number of heads set to 8, and each attention head independently learns different feature patterns. Residual connections and layer normalization are used to ensure the effective transmission of feature information and numerical stability.

[0054] S1025. Perform weighted summation on the feature block sequence according to the attention coefficient matrix, perform nonlinear transformation and residual connection operations on the weighted summation results, rearrange channels and spatially reconstruct the connected features to obtain a global feature map.

[0055] For example, the attention coefficient matrix is ​​used to perform a weighted combination of the feature block sequence, and the matrix multiplication of the weights and features is performed to obtain the fused features. The fused features are nonlinearly transformed using the ReLU activation function, and the transformed features are residually connected with the original features. The connection results undergo a channel rearrangement operation to reorganize the 256-dimensional features into a 16×16-dimensional feature map, which is then upsampled using a bilinear interpolation algorithm to restore the original spatial resolution. Adaptive instance normalization is applied to the upsampling results, and the mean and variance of each feature channel are calculated to perform feature statistical normalization. A deformable convolutional network is used to extract local features with a convolution kernel size of 3×3 and an offset field learning rate of 0.01 to enhance the geometric adaptability of feature extraction. Multi-scale features are then fused through skip connections to obtain a global feature map that retains detail information.

[0056] S1026. Construct a feature association graph in each calculation area of ​​the global feature map, perform graph convolution operation and feature matching calculation on the feature association graph, and obtain a similarity matrix.

[0057] For example, a 64×64 pixel overlapping calculation area is divided on the global feature map, and the overlap rate of adjacent areas is 0.5. A feature association graph is constructed in each calculation area, in which nodes represent local features and edges represent the spatial relationship between features. A three-layer graph convolutional network is applied to the feature association graph, with a convolution kernel size of 3×3 and output channels of 128, 64, and 32, respectively. Feature matching is performed using the cosine distance metric, with the matching threshold set to 0.8, to generate a similarity matrix for feature points in the area. The similarity matrix is ​​subjected to singular value decomposition to extract the main feature patterns, retaining singular values ​​with a cumulative explained variance of 90%. The feature consistency score is calculated based on the decomposition result, and the score ranges from 0 to 1. Local sensitive hashing is used for fast approximate nearest neighbor search, with 10 hash tables and a projection dimension of 8 for each hash function to improve feature matching efficiency.

[0058] S1027. Analyze edge continuity, surface smoothness, and corner point correspondence of the similarity matrix to obtain a structural consistency evaluation index.

[0059] For example, a multi-dimensional structural analysis is performed on the similarity matrix, and the continuity score of the edge pixels is calculated, with a threshold of 0.9. The curvature analysis method is used to evaluate the surface smoothness, and the local curvature change rate is calculated, with the smoothness threshold set to 0.05. FAST corner points are extracted and correspondences are established, with the corner point matching accuracy required to be greater than 95%. The RANSAC algorithm is applied to the corner point matching results for geometric verification, with the inner point ratio threshold set to 0.8 and the maximum number of iterations set to 1000. The affine transformation matrix between the matching point pairs is calculated to evaluate the consistency of the transformation. Morphological operations are used to extract contour features, with a structural element size of 5×5, and opening and closing operations are performed to remove noise. The Hausdorff distance is calculated based on the contour features to evaluate the edge alignment accuracy. Combining these analysis results, a structural consistency evaluation index between 0 and 1 is obtained by weighted averaging, which reflects the overall structural quality of the 3D printed sample.

[0060] In some embodiments, edge continuity, surface smoothness, and corner point correspondence analysis are performed on the similarity matrix to obtain a structural consistency evaluation index, including: S271-S276.

[0061] S271. Calculate the gradient difference and direction consistency between adjacent pixels based on the similarity matrix to obtain an edge continuity feature map.

[0062] For example, gradient analysis is performed on adjacent pixel points based on the similarity matrix, and the Sobel operator is used to calculate the gradient values ​​in the horizontal and vertical directions. The gradient threshold is set to 0.15, and the directional consistency measure is obtained by calculating the angle between the gradient vectors of adjacent pixel points. The gradient difference is Gaussian smoothed with a smoothing radius of 3 pixels and a standard deviation of 1.2 to generate an edge continuity feature map. The pixel values ​​in the feature map range from 0 to 1, and the larger the value, the better the edge continuity. In the edge continuity feature extraction process, a multi-scale analysis method is adopted, and three different feature extraction scales are set, namely 1×1, 3×3 and 5×5 pixel areas. The features at each scale are weighted and fused, and the weight coefficient is determined by the cross-validation method. At the same time, a local contrast enhancement mechanism is introduced, and the enhancement coefficient is set to 1.5 to effectively improve the feature expression ability of the edge area.

[0063] S272. Calculate the variance and curvature change of pixel values ​​of the edge continuity feature map within a preset sampling area to obtain a surface smoothness distribution map.

[0064] For example, in the surface smoothness analysis, the sampling area size is set to 15×15 pixels, the sampling step is 5 pixels, and the statistical variance of the pixel values ​​in each sampling area is calculated. The curvature estimation algorithm is applied, and the quadratic surface fitting method is used to calculate the principal curvature and Gaussian curvature. The curvature calculation radius is 7 pixels. The surface smoothness distribution map is generated by combining the variance and curvature features. The distribution map uses pseudo-color coding to display the smoothness changes. In the smoothness analysis process, an adaptive threshold mechanism is introduced to dynamically adjust the threshold parameters according to the grayscale distribution characteristics of the local area. The threshold adjustment range is 0.05 to 0.25. For the detected abnormal areas, the morphological processing method is used for boundary optimization. The structural element size is 3×3 pixels and the number of iterations is 2 times to ensure the accuracy of the abnormal area boundary.

[0065] S273. Calculate Harris response values ​​and local extreme value features of feature points based on surface smoothness to obtain a candidate corner point set, where the candidate corner point set includes multiple corner point descriptors.

[0066] For example, the improved Harris corner detection algorithm is applied to the surface smoothness data, the response function parameter k is set to 0.04, and the non-maximum suppression window size is 5×5 pixels. The scale-adaptive LOG operator is used to extract local extreme value features, with a scale range from 1.0 to 3.0, and a total of 5 scale levels. For each detected corner point, the SIFT descriptor is calculated to generate a 128-dimensional feature vector to form a set of candidate corner points. Each corner point descriptor contains position coordinates, response values ​​and direction information. In the feature extraction process, a pyramid layering strategy is adopted to construct a 4-layer image pyramid with a sampling ratio of 0.5. Each layer of the image is Gaussian blurred with a blur kernel size of 5×5 pixels and a standard deviation that increases layer by layer from 0.8 to 1.6. The scale invariance of the features is improved through multi-layer feature extraction.

[0067] S274. Calculate the Euclidean distance and spatial position constraints of the corner descriptors to obtain a corner correspondence matrix.

[0068] For example, the Euclidean distance between corner descriptors is calculated, the distance threshold is set to 0.6, and the K nearest neighbor algorithm is used for feature matching, with the K value set to 2. Spatial position constraints are introduced, and the position offset threshold is set to 20 pixels, and the direction difference threshold is set to 30 degrees. Through distance ratio testing and position constraint screening, the correspondence between corner points is established, and an N×N correspondence matrix is ​​generated, where N is the total number of corner points and the matrix element value represents the credibility of the correspondence. For the matching results, a local consistency verification method is used, and the verification window size is set to 25×25 pixels. The spatial distribution consistency of the matching point pairs in the window is calculated, and the matching pairs that do not conform to the spatial distribution law are eliminated. At the same time, a two-way matching strategy is introduced, requiring the feature point pairs to be optimally matched in both forward and reverse matching.

[0069] S275. Perform local affine transformation and geometric consistency constraints according to the corner point correspondence matrix to obtain a structural deformation measurement map.

[0070] For example, a local affine transformation model is constructed based on the corner correspondence matrix, the transformation window size is set to 31×31 pixels, and the affine parameters are estimated using the least squares method. Geometric consistency constraints are applied, the reprojection error threshold is set to 2.5 pixels, and the RANSAC algorithm is used to remove abnormal matching pairs. The degree of deformation of the local area is calculated, including scale change, rotation angle, and shear deformation, and a structural deformation metric map is generated. The metric map reflects the degree of structural deformation of each area of ​​the image. During the deformation analysis process, a block processing strategy is adopted to divide the image into multiple overlapping sub-areas with an overlap rate of 30%. The deformation parameters are calculated independently for each sub-area, and the calculation results of adjacent areas are fused by a weighted average method. The weight coefficient is proportional to the degree of regional overlap.

[0071] S276. Perform weighted fusion on the edge continuity feature map, the surface smoothness distribution map, and the structural deformation measurement map to obtain a structural consistency evaluation index.

[0072] For example, the three feature maps are normalized and the pixel values ​​are mapped to the range of 0-1. The weighting coefficients are set, the edge continuity feature weight is 0.35, the surface smoothness distribution weight is 0.3, and the structural deformation measurement weight is 0.35. The weighted average method is used for feature fusion, and the fusion result is mapped to the sigmoid function to obtain the structural consistency evaluation index, which comprehensively reflects the image's edge preservation, surface quality, and structural deformation characteristics. In the feature fusion process, a local adaptive weight adjustment mechanism is introduced to dynamically adjust the weight coefficient according to the significance of the regional features. The significance calculation is based on the local entropy value, and the entropy value calculation window size is 9×9 pixels. For areas with unclear features, their weight contribution in the fusion process is appropriately reduced to improve the reliability of the evaluation results.

[0073] In some embodiments, generating a comprehensive quality feature map according to the disparity feature map and the structural consistency evaluation index includes: S1031-S1034.

[0074] S1031 , performing stereo effect analysis on the disparity feature map to obtain a first feature branch.

[0075] For example, a multi-scale disparity consistency detection algorithm is applied to analyze and process the disparity feature map, and the detection window size is set to 5×5, 10×10 and 15×15 pixels, and the local directional consistency of the disparity gradient vector field is calculated at each scale. The system uses a Gaussian pyramid structure to downsample the original disparity map into three different resolution levels, extracting depth edge features respectively. The edge detection operator uses an improved Canny operator, with the low threshold set to 0.05 and the high threshold set to 0.15 to effectively identify the disparity mutation area. During the stereo effect analysis process, the deviation between the disparity value of each pixel and the theoretical expected disparity value is calculated to generate a disparity deviation map, and the weighted sliding window method (the weight coefficient decays exponentially from the center to the outside) is used to statistically analyze the disparity consistency distribution in the local area. The first feature branch contains three sub-channels: depth jump feature, disparity continuity index and disparity accuracy score. The depth jump feature reflects the sharpness of the three-dimensional edge of the printed sample, the disparity continuity index represents the gradient quality of the smooth transition area, and the disparity accuracy score quantifies the consistency between the actual disparity and the designed disparity.

[0076] S1032. Perform a structural quality analysis on the structural consistency evaluation index to obtain a second feature branch.

[0077] For example, a hierarchical structure descriptor network is constructed to perform multi-level decomposition and reorganization of structural consistency evaluation indicators. Topology preservation is calculated at three spatial scales (macro, meso, and micro). The macroscale focuses on overall geometric shape preservation, the mesoscale focuses on local feature group structure, and the microscale assesses detailed texture layout. An adaptive receptive field adjustment mechanism is introduced during the structural analysis process. The receptive field size dynamically changes based on the complexity of the local structure, with a small receptive field (radius of 3 pixels) used in complex areas and a large receptive field (radius of 9 pixels) used in simple areas. Singular value decomposition is performed on the structural consistency matrix to extract the main structural eigenvectors. The top K eigenvectors with energy exceeding 95% are retained to form the structural representation space. The second feature branch consists of three key dimensions: contour integrity, internal structure preservation, and geometric shape variation. Contour integrity assesses the coherence of the external boundary, internal structure preservation measures the relative positional offset between internal elements, and geometric shape variation quantifies the degree of nonlinear deformation of the local region. The network adopts a residual connection architecture to enhance feature extraction capabilities. The number of residual blocks is 4, each containing two 3×3 convolutional layers.

[0078] S1033. Perform color and texture analysis on the multi-view image dataset to obtain a third feature branch.

[0079] For example, a color space adaptive conversion module is constructed to map RGB color space data to Lab color space for analysis. The system extracts a three-layer Gabor texture feature map for each view image. The Gabor filter parameters are set to five orientations (0°, 36°, 72°, 108°, and 144°), four frequencies (0.05, 0.1, 0.2, and 0.4), and a Gaussian envelope standard deviation of 2.0, forming a 20-dimensional texture feature vector. The color analysis process uses local color moment statistics to calculate the first-order moment (mean), second-order moment (variance), and third-order moment (skewness) within each local area (9×9 pixel block) to construct a color distribution feature vector. The texture analysis component introduces gray-level co-occurrence matrix (GLCM) technology to calculate four statistical measures: contrast, uniformity, energy, and correlation, with a distance parameter of 2 and orientations of 0°, 45°, 90°, and 135°. The system combines the color consistency between multi-view images with the color stability within a single-view image to establish a color stability scoring mechanism. The third feature branch integrates three sub-features: color accuracy, texture reproduction, and view-dependent variation, and adopts a multi-resolution analysis framework to quantify feature performance at different spatial scales.

[0080] S1034: Perform weighted fusion on the first feature branch, the second feature branch, and the third feature branch to obtain a comprehensive quality feature map.

[0081] For example, an adaptive feature importance assessment module is designed to dynamically adjust the weight coefficients of the three feature branches based on the printed sample type and application scenario. The system employs a multi-feature fusion network based on the attention mechanism. The network comprises a channel attention module and a spatial attention module. The channel attention module extracts channel descriptors using global average pooling and max pooling operations, which are then processed by a shared multi-layer perceptron to generate channel weight vectors. The spatial attention module generates a spatial weight map through convolution operations. The fusion process incorporates a cross-scale feature aggregation strategy, aligning feature maps of different resolutions to a unified spatial dimension (256×256 pixels) through upsampling or downsampling operations. The system assigns initial weights of 0.35, 0.4, and 0.25 to the stereo effect feature branch, structural quality feature branch, and color and texture feature branch, respectively. During training, the weight assignment is optimized using a backpropagation algorithm. The loss function uses a combination of weighted mean squared error and structural similarity loss. The comprehensive quality feature map uses pseudo-color mapping to visualize the quality distribution, with high-quality areas appearing blue, medium-quality areas appearing green, and low-quality areas appearing red. The feature map resolution is set to 1 / 4 of the original image to balance computational efficiency and feature representation accuracy. The fusion module adopts a residual connection structure to ensure the effective transmission of information in the deep network and prevent the gradient disappearance problem.

[0082] In some embodiments, a preset lightweight convolutional network is used to perform a rough detection on the comprehensive quality feature map to obtain an abnormal area marking map, including: S1041-S1044.

[0083] S1041. Perform multi-scale pyramid decomposition and sliding window scanning on the comprehensive quality feature map, perform local feature statistics in each scanning window, and obtain a feature measurement sequence. The feature measurement sequence includes: local mean, variance, skewness, and kurtosis.

[0084] Exemplarily, the Gaussian-Laplacian pyramid algorithm is used to decompose the comprehensive quality feature map into 5 layers to form feature representations of different resolutions. A sliding window of size 16×16 pixels is set on each layer of the feature map with a step size of 8 pixels to ensure that there is a 50% overlap between windows to improve detection sensitivity. Statistical moments of order 2 and above are calculated for each window area, where the mean reflects the overall brightness level of the area, the variance characterizes the degree of fluctuation of pixel intensity in the area, the skewness describes the asymmetry of the distribution, and the kurtosis quantifies the sharpness of the distribution. In the feature metric calculation process, the Tukey double weight function is applied to suppress the influence of outliers, and local contrast normalization is introduced to ensure the robustness of the feature description. The calculation results form a four-dimensional feature vector to form a feature metric sequence. Each element in the sequence maintains a strict spatial correspondence with the specific area position in the original feature map, establishing a spatial reference system for subsequent analysis.

[0085] S1042. Construct a feature description table based on the feature metric sequence, calculate the Mahalanobis distance between each local region and a preset reference template using the feature description table, calculate the regional anomaly degree based on the Mahalanobis distance, and obtain an anomaly intensity matrix.

[0086] Exemplarily, reorganize the feature metric sequence into an N×4-dimensional feature description table, where N is the total number of sliding windows. The reference template is selected from the feature set of the same position region of high-quality printed samples, and 5 standard templates are set for each category. The Mahalanobis distance calculation uses the Euclidean distance formula weighted by the inverse covariance matrix, and the calculation formula is d=(x - μ)^T·Σ^(-1)·(x - μ), where x is the feature vector of the待测区域 (to-be-tested region), μ is the mean vector of the reference template, and Σ is the feature covariance matrix. The feature covariance matrix is optimized for the condition number through singular value decomposition, removing singular values close to zero to improve the numerical stability of the Mahalanobis distance calculation. The distance calculation result is mapped to the [0,1] interval through the hyperbolic tangent function to form an anomaly intensity matrix with the same size as the original feature map. Each element value in the matrix represents the anomaly degree of the corresponding position, and the value closer to 1 indicates a greater possibility of anomaly, providing an initial probability field for the region growing algorithm.

[0087] S1043. Construct a region growing map based on the anomaly intensity matrix, perform a region growing operation with an adaptive threshold on the region growing map according to local statistical features, and obtain a set of candidate anomaly regions.

[0088] Exemplarily, apply a median filter smoothing process to the anomaly intensity matrix, with the filter window size of 5×5, to eliminate isolated noise points. Convert the smoothed matrix into a region growing map, and set the seed point selection threshold to 0.75, that is, pixel points with an anomaly intensity greater than 0.75 are used as initial seed points. Dynamically adjust the growth threshold during the region growing process, and the adjustment formula is T = T_base - (σ_local / σ_global)×δ, where T_base is the base threshold 0.6, σ_local is the local region standard deviation, σ_global is the global standard deviation, and δ is the adjustment coefficient 0.15. The growth condition judgment considers both the pixel intensity difference and the gradient direction consistency. Growth expansion is allowed when adjacent pixels satisfy |I1 - I2| < T and the gradient direction difference is less than 30°. After the region growing is completed, apply a morphological opening operation to clean up small noise points, use a 3×3 disk-shaped kernel as the structural element, and the connected region labeling algorithm assigns a unique identifier to each continuous anomaly region to form a set of candidate anomaly regions. The set contains information such as the position, area, boundary contour, and average anomaly intensity of each anomaly region.

[0089] S1044. Construct an attention mask region based on the set of candidate anomaly regions, perform a cascaded calculation of channel attention and spatial attention on the attention mask region, and perform feature enhancement and spatial reconstruction on the attention calculation result to obtain an anomaly region marking map.

[0090] For example, an attention mask is constructed by expanding the boundary of the candidate anomaly region by 1.5 times its center to preserve contextual information. A squeeze-and-excitation (SE) module is applied to the mask region to calculate channel attention weights, using a channel compression ratio of 16:1. Global average pooling is used to extract channel descriptors, and a two-layer fully connected network learns inter-channel dependencies. The spatial attention mechanism uses non-local operations to calculate spatial correlations between pixels. A Gaussian kernel is used as the kernel function, with a temperature parameter of 0.07. Channel attention and spatial attention are applied in tandem, with the channel attention output serving as the input to the spatial attention. The attention calculation results are fused with the original features via a residual connection with a fusion coefficient of 0.8. Bilinear upsampling is applied to the fused features to restore them to their original spatial resolution, and the features are mapped to the [0, 1] interval using a sigmoid function to generate an anomaly region labeling map. Each pixel value in the labeling map represents the confidence level that the location belongs to the anomaly region. High-confidence regions are presented as heat maps, providing accurate guidance for subsequent precision inspection and defect location.

[0091] In some embodiments, a preset deep residual network is used to perform precise detection on the abnormal area marking map to obtain a defect type distribution map, including: S1045-S1046.

[0092] S1045. Construct a residual learning module in each marked area of ​​the abnormal area marking map, perform multi-layer convolution operations and feature extraction calculations on the residual learning module, and obtain a deep feature vector.

[0093] For example, an 18-layer deep residual network architecture is used for the labeled region. Each residual learning module consists of two 3×3 convolutional layers and a short-circuit connection. The number of output channels of the convolutional layers is 64, 128, 256, and 512, respectively, with a stride of 2. Batch normalization and ReLU activation functions are used. The residual learning module achieves identity mapping through short-circuit connections, effectively alleviating network degradation. An attention mechanism is introduced in each residual block to calculate spatial attention weights and channel attention weights. Feature statistics are generated using global average pooling and maximum pooling, respectively. Attention coefficients are obtained through a multi-layer perceptron. Multi-scale fusion is performed on the extracted features, and dense connections are established between feature maps at different levels. 1×1 convolution is used for channel dimensionality reduction, combined with a spatial pyramid pooling module to capture multi-scale contextual information. During feature extraction, dilated convolution is used to expand the receptive field, with dilation ratios set to {1, 2, 4, 8}. This maintains feature map resolution while capturing a wider range of contextual dependencies. In order to enhance the discriminative ability of features, an auxiliary supervision branch is added to the network, and feature maps are extracted from the middle layer for additional classification tasks, guiding the network to learn more discriminative feature representations. In the feature fusion stage, an adaptive feature reweighting strategy is adopted to dynamically adjust the weight coefficients of features at different levels according to their importance. By calculating the statistical moments of the feature maps, the reliability of the features is estimated, and features with large noise or high uncertainty are suppressed. During the training process, online difficult example mining technology is used to dynamically select challenging samples for key learning, thereby improving the model's recognition ability for difficult samples. At the same time, a multi-task learning framework is introduced, and edge detection branches and semantic segmentation branches are added to the backbone network to improve the generalization ability of the model by sharing feature representations. Through residual learning and multi-level feature extraction, a 2048-dimensional deep feature vector is finally obtained. This feature vector contains rich local texture information and global semantic information, providing a reliable feature representation for subsequent defect classification.

[0094] S1046. Calculate the probability distribution of different defect types based on the depth feature vector, and perform label smoothing and post-processing in combination with spatial position constraints to obtain a defect type distribution map.

[0095] For example, the extracted 2048-dimensional deep feature vector is input into a fully connected layer, passing through two hidden layers with 1024 and 512 neurons, respectively. Dropout regularization is used to prevent overfitting, with a dropout rate of 0.5. The output layer uses a Softmax function to calculate the probability distribution of each defect type, including common defect categories such as bubbles, wrinkles, fractures, and deformations. Spatial position constraints are introduced based on the probability distribution, and a conditional random field model is constructed to capture the dependencies between pixel-level labels. The potential function consists of a unary potential term and a binary potential term. The unary potential term is determined by the probability distribution obtained from the deep feature vector, while the binary potential term calculates the label compatibility of adjacent pixels using a Gaussian kernel function. Mean field inference is performed on the conditional random field, and the resulting label assignment is iteratively optimized. In the post-processing stage, morphological operations are applied to refine the segmentation boundaries, with a structuring element size of 3×3. Opening and closing operations are performed to remove noise and fill holes. A region growing algorithm is used to merge similar regions, with a similarity threshold of 0.85. Region similarity is determined by calculating the Euclidean distance between color and texture features. To improve the robustness of classification results, a multimodal feature fusion strategy is introduced. In addition to deep features, traditional hand-crafted features such as local binary patterns (LBP), gray-level co-occurrence matrices (GLCMs), and Gabor filter features are integrated. These features are adaptively weighted using an attention mechanism to highlight highly expressive feature channels. During label smoothing, label knowledge distillation is employed to leverage soft labels from a pre-trained model to guide model learning and mitigate overfitting caused by hard labels. An uncertainty estimation module is also introduced, generating multiple predictions through Monte Carlo dropout sampling and calculating the variance of the predictions as an uncertainty measure. For regions with high uncertainty, labels are corrected using local consistency constraints to ensure spatial continuity of the predictions. In the boundary optimization phase, an active contour model and a level set method are combined to achieve accurate boundary localization by minimizing an energy function. Contour extraction and area filtering are performed on the merged regions, removing areas smaller than 50 square pixels and retaining the main defect areas. Multi-scale posteriori processing is then used to verify the consistency of the classification results at different resolutions and eliminate isolated erroneous predictions. After label smoothing and post-processing, an accurate defect type distribution map is generated, clearly identifying the spatial distribution of different types of defects.

[0096] See also Figure 2 , Figure 2 This is a schematic block diagram of a 3D image printing test device provided in an embodiment of the present application. The 3D image printing test device 200 is used to perform the aforementioned 3D image printing test method. The 3D image printing test device 200 can be configured in a server.

[0097] Among them, the server can be an independent server, a server cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0098] like Figure 2 As shown, the three-dimensional image printing test device 200 includes: a feature extraction module 201 , an index generation module 202 , a feature analysis module 203 , an image detection module 204 and a result output module 205 .

[0099] The feature extraction module 201 is used to obtain a disparity feature map of a printed sample of a three-dimensional image.

[0100] The index generation module 202 is used to construct a feature pool according to the disparity feature map, perform non-local attention calculation on the features in the feature pool, and obtain a structural consistency evaluation index.

[0101] The feature analysis module 203 is configured to generate a comprehensive quality feature map based on the disparity feature map and the structural consistency evaluation index.

[0102] The image detection module 204 is used to use a preset lightweight convolutional network to perform a rough detection on the comprehensive quality feature map to obtain an abnormal area marking map, and use a preset deep residual network to perform a fine detection on the abnormal area marking map to obtain a defect type distribution map.

[0103] The result output module 205 is used to determine the quality grade evaluation result according to the defect type distribution map and the preset evaluation index library.

[0104] An embodiment of the present application provides an electronic device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement a three-dimensional image printing test method as described in any one of the embodiments of the present application when executing the computer program.

[0105] An embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements a three-dimensional image printing test method as described in any one of the embodiments of the present application.

[0106] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A printing test method for a three-dimensional image, characterized in that: The method comprises: obtaining a disparity feature map of a printed sample of a three-dimensional image; constructing a feature pool according to the disparity feature map, performing non-local attention calculation on the features in the feature pool, and obtaining a structural consistency evaluation index; generating a comprehensive quality feature map according to the disparity feature map and the structural consistency evaluation index; Using a preset lightweight convolutional network to perform a coarse detection on the comprehensive quality feature map to obtain an abnormal area marking map, and using a preset deep residual network to perform a fine detection on the abnormal area marking map to obtain a defect type distribution map; The quality grade assessment result is determined based on the defect type distribution map and the preset evaluation index library.

2. The printing test method of a three-dimensional image according to claim 1, wherein: The method of obtaining a disparity feature map of a printed sample of a three-dimensional image includes: Acquiring a multi-view image dataset of a printed sample of a three-dimensional image; Performing multi-scale convolution decomposition on adjacent view images in the multi-view image dataset to obtain feature atlases of different scales; Performing global correlation calculation on the feature atlas to obtain a correlation matrix, wherein the correlation matrix includes: correspondences between different regions; performing disparity calculation on the adjacent perspective images according to the correlation matrix to obtain a disparity map; performing statistical analysis on the distribution characteristics of the disparity values ​​in the disparity map to obtain a disparity distribution histogram, performing interval division and probability density calculation on the disparity distribution histogram to obtain an adaptive threshold parameter; performing region segmentation on the disparity map according to the adaptive threshold parameter to obtain a significant disparity change region map, performing boundary extraction and connected domain analysis on the significant disparity change region map to obtain a key region marker map; Calculating feature weight coefficients based on the key area marking map, and adjusting the weights of features of corresponding areas in the feature atlas to obtain an enhanced feature atlas; Multi-scale feature fusion processing is performed on the enhanced feature atlas, and feature selection and combination are performed according to the complementarity of features at different scales to obtain a disparity feature map.

3. The printing test method of a three-dimensional image according to claim 1, wherein: The step of constructing a feature pool according to the disparity feature map, performing non-local attention calculation on the features in the feature pool, and obtaining a structural consistency evaluation index includes: Performing a horizontal step scan and a vertical step scan on the disparity feature map, calculating a pixel offset at each step scan position, performing a direction vector decomposition and normalization process on the pixel offset to obtain a sampling direction set; constructing a sampling grid according to the sampling direction set, setting a receptive field range for each sampling point in the disparity feature map, performing spatial position encoding within the receptive field range, and obtaining a feature block sequence, wherein the feature block sequence includes pixel position coordinates and corresponding feature values; Establishing a feature index table for the feature block sequence, calculating the cosine distance between each feature block and other feature blocks using the feature index table, calculating the correspondence between the feature blocks based on the cosine distance, and obtaining a correlation strength matrix; Constructing an attention calculation graph according to the association strength matrix, performing a weight-decayed softmax operation on the attention calculation graph according to the pixel position to obtain an attention coefficient matrix; Performing weighted summation on the feature block sequence according to the attention coefficient matrix, performing nonlinear transformation and residual connection operation on the weighted summation result, and performing channel rearrangement and spatial reconstruction on the connected features to obtain a global feature map; Constructing a feature association graph in each calculation area of ​​the global feature map, performing a graph convolution operation and a feature matching calculation on the feature association graph to obtain a similarity matrix; The edge continuity, surface smoothness and corner point correspondence relationship of the similarity matrix are analyzed to obtain a structural consistency evaluation index.

4. The printing test method of a three-dimensional image according to claim 3, wherein: The edge continuity, surface smoothness and corner point correspondence analysis of the similarity matrix is ​​performed to obtain a structural consistency evaluation index, including: Calculating the gradient difference and direction consistency between adjacent pixels based on the similarity matrix to obtain an edge continuity feature map; Calculating the variance and curvature change of pixel values ​​of the edge continuity feature map within a preset sampling area to obtain a surface smoothness distribution map; Calculating Harris response values ​​and local extreme value features of feature points according to the surface smoothness to obtain a candidate corner point set, wherein the candidate corner point set includes multiple corner point descriptors; Calculating the Euclidean distance and spatial position constraints of the corner descriptors to obtain a corner correspondence matrix; Performing local affine transformation and geometric consistency constraints according to the corner point correspondence matrix to obtain a structural deformation metric map; The edge continuity feature map, the surface smoothness distribution map and the structural deformation measurement map are weightedly fused to obtain a structural consistency evaluation index.

5. The printing test method of a three-dimensional image according to claim 1, wherein: Generating a comprehensive quality feature map according to the disparity feature map and the structural consistency evaluation index includes: Performing a stereo effect analysis on the disparity feature map to obtain a first feature branch; Performing a structural quality analysis on the structural consistency evaluation index to obtain a second feature branch; Performing color and texture analysis on the multi-view image dataset to obtain a third feature branch; The first feature branch, the second feature branch and the third feature branch are weightedly fused to obtain a comprehensive quality feature map.

6. The printing test method of a three-dimensional image according to claim 1, wherein: The method of using a preset lightweight convolutional network to perform a rough detection on the comprehensive quality feature map to obtain an abnormal area marking map includes: Performing multi-scale pyramid decomposition and sliding window scanning on the comprehensive quality feature map, performing local feature statistics in each scanning window, and obtaining a feature measurement sequence, wherein the feature measurement sequence includes: local mean, variance, skewness, and kurtosis; Constructing a feature description table according to the feature measurement sequence, calculating the Mahalanobis distance between each local region and a preset reference template using the feature description table, calculating the degree of regional anomaly according to the Mahalanobis distance, and obtaining an anomaly intensity matrix; constructing a region growth map according to the anomaly intensity matrix, and performing a region growing operation with an adaptive threshold on the region growth map according to the local statistical features to obtain a set of candidate anomaly regions; An attention mask region is constructed based on the candidate abnormal region set, a cascade calculation of channel attention and spatial attention is performed on the attention mask region, and feature enhancement and spatial reconstruction are performed on the attention calculation results to obtain an abnormal region marking map.

7. The printing test method of a three-dimensional image according to claim 1, wherein: The method of using a preset deep residual network to perform precise detection on the abnormal area marker map to obtain a defect type distribution map includes: Constructing a residual learning module in each marked area of ​​the abnormal area marking map, performing multi-layer convolution operations and feature extraction calculations on the residual learning module to obtain a deep feature vector; The probability distribution of different defect types is calculated based on the depth feature vector, and label smoothing and post-processing are performed in combination with spatial position constraints to obtain a defect type distribution map.

8. A three-dimensional image printing test device, characterized in that: The three-dimensional image printing test device includes: A feature extraction module, for obtaining a disparity feature map of a printed sample of a three-dimensional image; An indicator generation module is used to construct a feature pool based on the disparity feature map, perform non-local attention calculation on the features in the feature pool, and obtain a structural consistency evaluation indicator; A feature analysis module, configured to generate a comprehensive quality feature map based on the disparity feature map and the structural consistency evaluation index; An image detection module is configured to perform a coarse detection on the comprehensive quality feature map using a preset lightweight convolutional network to obtain an abnormal area marking map, and perform a fine detection on the abnormal area marking map using a preset deep residual network to obtain a defect type distribution map; The result output module is used to determine the quality grade assessment result according to the defect type distribution map and the preset evaluation index library.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the three-dimensional image printing test method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the three-dimensional image printing test method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Aviation equipment detection and maintenance method and equipment based on target detection and medium

    CN121033016A

  • An aerial equipment detection maintenance method and device based on target detection and a medium

    CN121033016B

  • Quality evaluation method, device and equipment for defect image of integrated circuit and medium

    CN121685389A