Flexible stone texture defect identification method based on multi-scale convolutional neural network

By combining multi-scale convolutional neural networks with batch configuration parameters and spatial frequency domain feature extraction technology, the problems of low efficiency of manual detection and insufficient feature extraction of single-scale networks in the detection of texture defects in flexible stone are solved, and efficient, accurate identification and adaptive detection of multi-type and multi-scale texture defects are achieved.

CN121074479APending Publication Date: 2025-12-05CHANGZHOU RUIKE MATERIAL TECHNOLOGY CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202511170031.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-20
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing methods for detecting defects in flexible stone textures rely on manual inspection, which is inefficient and inconsistent. Detection based on single-scale convolutional neural networks is prone to insufficient feature extraction when there are large variations in texture details, wide ranges of defect scales, and complex background textures, leading to missed detections and false detections. Furthermore, it fails to adaptively adjust to the image characteristics of different production batches.

Method used

A detection process based on multi-scale convolutional neural networks is constructed by combining production batch configuration parameters with spatial and frequency domain multi-scale feature extraction technology. This process includes batch first sample analysis, fine extraction of texture features, generation of scale control information, weighted fusion of spatial and frequency domain features, and precise localization of candidate regions. This enables efficient identification of multiple types and scale texture defects on the surface of flexible stone from different batches.

Benefits of technology

It improves the automation level and stability of quality control in flexible stone production, and has the advantages of strong adaptability to batch differences, consideration of both texture details and global structure, high defect detection accuracy and fast processing speed, which significantly improves the accuracy and robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074479A_ABST
    Figure CN121074479A_ABST
Patent Text Reader

Abstract

The invention discloses a flexible stone texture defect identification method based on a multi-scale convolutional neural network, and the method comprises the following steps: collecting images of the surface of a flexible stone, and carrying out the batch classification; selecting a first image of each production batch as a batch first sample, and generating batch configuration parameters; performing texture feature extraction by using the batch configuration parameters and the to-be-detected image to generate a texture map; respectively inputting the to-be-detected image into a spatial domain convolution branch and a frequency domain convolution branch of the space-frequency neural network model, and extracting spatial domain features and frequency domain features according to the scale control information; the spatial domain features and the frequency domain features are fused; and generating candidate areas based on the fused features, performing positioning and confidence evaluation, removing the candidate areas with confidence smaller than a preset threshold, and generating a flexible stone texture defect detection result. According to the method, the surface defects of the flexible stone can be accurately detected, the detection efficiency and robustness are improved, and the manual detection cost is reduced.
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 recognition, and in particular to a flexible stone texture defect recognition method based on a multi-scale convolutional neural network. BACKGROUND

[0002] Flexible stone is widely used in building interior and exterior wall decoration and indoor paving scenarios due to its light weight, good flexibility and strong decoration. However, in the actual production process, due to uneven distribution of raw material particles, insufficient mold precision, curing condition fluctuation and differences in pressing process and other factors, color difference, scratches, cracks, bubbles and local texture loss and other defects are easily generated on the surface. The existing flexible stone texture defect detection method mainly relies on manual visual inspection and image analysis technology based on single-scale convolutional neural network. Manual detection relies on the experience of the detection personnel and is greatly disturbed by factors such as light and fatigue, and has low detection efficiency and poor consistency; although the automatic detection based on single-scale convolutional neural network can reduce the manual intervention to a certain extent, it is easy to have insufficient feature extraction in the case of large texture detail change, wide defect scale span and complex background texture, resulting in a high proportion of missed detection and false detection. In addition, the existing detection process is configured with unified parameters, and does not adaptively adjust to the image characteristics of different production batches, ignoring the differences in raw material color difference, texture distribution rule and brightness statistical characteristics between batches, causing deviation in feature matching and decline in model generalization ability.

[0003] Therefore, how to provide a flexible stone texture defect recognition method based on a multi-scale convolutional neural network is a problem that those skilled in the art need to solve. SUMMARY

[0004] An object of the present application is to provide a flexible stone texture defect recognition method based on a multi-scale convolutional neural network. The present application fully combines production batch configuration parameters and spatial and frequency domain multi-scale feature extraction technology to construct a detection process including batch first piece sample analysis, texture feature fine extraction, scale control information generation, spatial and frequency domain feature weighted fusion and candidate region accurate positioning, realizing efficient recognition of multiple types and multiple scales of texture defects on the surface of different batches of flexible stone. The present application has the advantages of strong adaptability to production batch differences, consideration of texture details and global structure, high defect detection precision and fast processing speed, and can significantly improve the automation level and stability of flexible stone production quality control.

[0005] The flexible stone texture defect recognition method based on a multi-scale convolutional neural network according to the embodiment of the present application comprises the following steps:

[0006] Step 1: Collect images of the surface of flexible stone and classify them according to production batches;

[0007] Step two: select the first image of each production batch as a batch first piece sample; and generate batch configuration parameters based on the batch first piece sample;

[0008] Step three: based on the batch configuration parameters and the to-be-detected image, texture extraction is performed to generate a texture map; the to-be-detected image is an image other than the batch first piece sample;

[0009] Step four: divide the texture map into a plurality of grid cells, and determine the activation order of each grid cell based on the batch configuration parameters, and generate scale control information in combination with the stickiness life parameter;

[0010] Step five: respectively input the to-be-detected image into the spatial convolution branch and the frequency convolution branch of the spatial-frequency neural network model, and extract spatial features and frequency features based on the scale control information;

[0011] Step six: fuse the spatial features and the frequency features to obtain fused features;

[0012] Step seven: based on the fused features, perform candidate region positioning and confidence evaluation, and remove candidate regions with confidence less than a preset threshold;

[0013] Step eight: generate a detection result of the flexible stone texture defect based on the screened candidate regions.

[0014] Optionally, the step one is specifically:

[0015] Under the condition of constant color temperature and constant brightness of light, a high-resolution industrial camera is used to perform full-frame imaging collection on the surface of the flexible stone piece by piece;

[0016] During the collection process, the corresponding production date, production line number and product model information are recorded;

[0017] The image data collected is batch-identified according to the production date, production line number and product model, and the image data is classified based on the batch identification to form images of a plurality of production batches.

[0018] Optionally, the step two is specifically:

[0019] The first image is selected as the batch first piece sample from the images of each production batch in the production order;

[0020] Based on the batch first piece sample, histogram normalization processing is performed to map the pixel gray value to a gray scale range of zero to two hundred and fifty-five;

[0021] The batch first piece sample after histogram normalization is subjected to two-dimensional discrete wavelet decomposition, and is decomposed to a preset decomposition level to obtain low-frequency components and high-frequency components, respectively;

[0022] calculate the average gray value and the standard deviation of the low-frequency component, and calculate the energy distribution matrix of the high-frequency component;

[0023] combine the average gray value, the standard deviation and the energy distribution matrix into batch configuration parameters;

[0024] correspond the batch configuration parameters with the corresponding production batch identifier and the parameter database; the parameter database is indexed in the form of key-value pair structure, the key is the production batch identifier, and the value is the batch configuration parameter.

[0025] Optionally, the step three is specifically:

[0026] perform linear color space conversion and white balance processing based on the batch configuration parameters and the to-be-detected image to obtain a luminance matching image;

[0027] perform histogram matching on the luminance matching image and the luminance statistical information in the batch configuration parameters to generate a luminance equalization image;

[0028] perform edge-preserving denoising processing and illumination compensation based on homomorphic filtering on the luminance equalization image to obtain a reflectance component image;

[0029] select a band-pass filter set according to the energy distribution matrix in the batch configuration parameters, and perform convolution operation on the reflectance component image to obtain a multi-band response image;

[0030] calculate the gradient amplitude and the gradient direction of the multi-band response image, and calculate the variance and the energy density in the local neighborhood to obtain a texture feature matrix;

[0031] combine the pixel values of the multi-band response image, the gradient amplitude and the local variance according to a preset weighting coefficient to generate a texture intensity image;

[0032] perform normalization processing and boundary-preserving smoothing processing on the texture intensity image to obtain a texture image.

[0033] Optionally, the step four is specifically:

[0034] divide the texture image into multiple grid cells according to a preset grid division rule in the horizontal direction and the vertical direction;

[0035] determine the priority activation order of each grid cell based on the average gray value of the low-frequency component and the energy distribution matrix of the high-frequency component in the batch configuration parameters;

[0036] in the process of determining the priority activation order, weight and fuse the stickiness lifetime parameter, the local gray mean value, the local contrast and the energy density of the grid cell to obtain a scale priority index;

[0037] arranging the grid cells in descending order according to the scale priority indicators, to generate a grid cell activation sequence;

[0038] jointly encoding the grid cell activation sequence and the stickiness lifetime parameter to obtain scale control information.

[0039] Optionally, the step five is specifically:

[0040] inputting the to-be-detected image into a spatial domain convolution branch of the spatial-frequency neural network model, performing multi-scale spatial domain convolution operation, extracting edge features, texture detail features and structure contour features under different receptive fields, and obtaining a spatial domain feature map;

[0041] inputting the to-be-detected image into a frequency domain convolution branch of the spatial-frequency neural network model, performing fast Fourier transform on the input image to obtain a frequency spectrum map, and performing multi-scale frequency domain convolution operation on the frequency spectrum map to extract low-frequency structure features and high-frequency texture features, and generating a frequency domain feature map;

[0042] inputting the scale control information into the spatial domain convolution branch and the frequency domain convolution branch, adjusting channel weights and spatial weight parameters of the spatial domain feature map and the frequency domain feature map, and generating a weighted spatial domain feature map and a weighted frequency domain feature map;

[0043] performing batch normalization processing and nonlinear activation processing on the weighted spatial domain feature map and the weighted frequency domain feature map respectively, to obtain spatial domain features and frequency domain features.

[0044] Optionally, the spatial-frequency neural network model is specifically:

[0045] The spatial-frequency neural network model comprises a spatial domain convolution branch and a frequency domain convolution branch, the spatial domain convolution branch is sequentially connected by a multi-scale convolution layer, a batch normalization layer, a nonlinear activation layer and a down-sampling layer;

[0046] The multi-scale convolution layer comprises convolution kernel groups with different receptive fields, the convolution kernel sizes are three by three, five by five and seven by seven respectively, and the output results are spliced in the channel dimension to form a multi-scale spatial domain feature map;

[0047] The frequency domain convolution branch comprises a frequency spectrum transformation layer, a frequency domain convolution layer, a batch normalization layer, a nonlinear activation layer and a down-sampling layer, the frequency spectrum transformation layer performs two-dimensional fast Fourier transform on the input image to generate a complex frequency spectrum map, and the amplitude spectrum and the phase spectrum are taken as inputs and sent into the frequency domain convolution layer respectively;

[0048] The frequency domain convolution layer adopts the same multi-scale convolution kernel group structure as the spatial domain convolution branch, respectively performs convolution operations on the amplitude spectrum and the phase spectrum, and splices the operation results in the channel dimension to form a multi-scale frequency domain feature map;

[0049] The outputs of the spatial domain convolution branch and the frequency domain convolution branch are processed by a channel weighting module and a spatial weighting module; the channel weighting module adjusts channel weights according to the scale control information; and the spatial weighting module adjusts spatial position weights according to the scale control information.

[0050] The spatial domain feature map output by the channel weighting module and the spatial weighting module is defined as a spatial domain feature, and the frequency domain feature map is defined as a frequency domain feature.

[0051] Optionally, the step six is specifically:

[0052] The spatial domain feature and the frequency domain feature are respectively input into a feature alignment module to perform size matching and scale normalization processing on the feature map in the channel dimension and the spatial dimension, to obtain an aligned spatial domain feature and an aligned frequency domain feature.

[0053] The aligned spatial domain feature and the aligned frequency domain feature are input into a feature fusion module to perform element-wise weighted summation operation and cross-channel feature splicing operation, to generate a preliminary fusion feature map.

[0054] The preliminary fusion feature map is input into a convolution fusion layer to extract local context information and global correlation information by using a multi-scale convolution kernel group, and a convolution fusion feature map is output.

[0055] The convolution fusion feature map is input into an attention distribution module to calculate weight coefficients in the channel dimension and position weight matrices in the spatial dimension, and the convolution fusion feature map is weighted to obtain a weighted fusion feature map.

[0056] Batch normalization processing and nonlinear activation processing are performed on the weighted fusion feature map to obtain a fusion feature.

[0057] Optionally, the step seven is specifically:

[0058] The fusion feature is input into a candidate region generation module to generate a plurality of candidate regions on the fusion feature map based on a multi-scale anchor box mechanism.

[0059] A classification probability value and a position regression parameter are calculated for each candidate region, the classification probability value represents a confidence value of the candidate region belonging to the flexible stone texture defect category, and the position regression parameter is a regression coefficient for correcting the position of the candidate region boundary box.

[0060] Set an overlap threshold; perform non-maximum suppression processing on the candidate regions, and eliminate candidate regions with an overlap greater than the preset overlap threshold;

[0061] Set a confidence threshold; after the non-maximum suppression processing, screen out candidate regions with a confidence value less than the preset confidence threshold, and retain candidate regions meeting the condition as effective detection regions;

[0062] Input the bounding box coordinates, class label and confidence value of the effective detection region into a defect result generation module.

[0063] Optionally, the step eight is specifically:

[0064] Map the bounding box coordinates of the effective detection region to the pixel coordinate system of the image to be detected to obtain a defect region position;

[0065] Group the defect regions according to the class label to generate a defect class set respectively;

[0066] Crop the corresponding image region for each defect region in the defect class set and save it as a defect sub-image;

[0067] Store the defect sub-image, the corresponding class label, the confidence value and the bounding box coordinates in a detection result file;

[0068] Associate the detection result file with the batch identifier of the image to be detected to generate a flexible stone texture defect detection result data set.

[0069] The present application has the following advantages:

[0070] The present application combines batch first sample feature extraction and parameter database index management, aiming at the problems of brightness difference, spectral distribution change and local texture detail inconsistency of flexible stone surface texture in different production batches, adopts histogram normalization and two-dimensional discrete wavelet decomposition to extract low-frequency brightness feature and high-frequency energy distribution matrix, constructs batch configuration parameters and is used for brightness equalization and multi-band convolution texture enhancement of the image to be detected, combines grid cell activation sequence and viscosity life parameters to form scale control information in the texture map generation link, realizes adaptive adjustment of channel weight and spatial weight of spatial and frequency domain convolution branches. In the feature fusion stage, the local context and global correlation information are extracted by using feature alignment, cross-channel splicing and multi-scale convolution fusion, and the defect related area feature response is strengthened through the attention distribution module, and in the candidate region generation link, the multi-scale anchor box mechanism and non-maximum suppression strategy are combined to realize high-precision defect positioning and low-confidence redundancy elimination, and finally the boundary box coordinates, class label and confidence value of the flexible stone texture defect are output. The method effectively solves the problems of poor adaptability to brightness difference between batches, loss of detail features and insufficient positioning accuracy in traditional single-scale or single-domain feature extraction in texture defect detection, and realizes high-stability detection and rapid identification of multiple types and multiple scales of defects. BRIEF DESCRIPTION OF DRAWINGS

[0071] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, illustrate the present application and are used to explain the present application, and do not constitute a limitation on the present application. In the drawings:

[0072] Figure 1 The flow chart of the flexible stone texture defect recognition method based on multi-scale convolutional neural network proposed by the present application;

[0073] Figure 2 The schematic diagram of extracting spatial and frequency domain features proposed by the present application;

[0074] Figure 3 The structure diagram of the spatial and frequency neural network proposed by the present application. DETAILED DESCRIPTION

[0075] The present application will now be described in further detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, and only illustrate the basic structure of the present application in a schematic manner, and therefore only show the components related to the present application.

[0076] Reference Figures 1-3 The flexible stone texture defect recognition method based on multi-scale convolutional neural network, comprising the following steps:

[0077] Step 1: Collect images of the surface of flexible stone and classify them according to production batches;

[0078] Step two: select the first image of each production batch as a batch first piece sample; and generate batch configuration parameters based on the batch first piece sample;

[0079] Step three: based on the batch configuration parameters and the to-be-detected image, texture extraction is performed to generate a texture map; the to-be-detected image is an image other than the batch first piece sample;

[0080] Step four: divide the texture map into a plurality of grid cells, determine the activation order of each grid cell based on the batch configuration parameters, and generate scale control information in combination with the stickiness life parameter;

[0081] Step five: respectively input the to-be-detected image into the spatial domain convolution branch and the frequency domain convolution branch of the spatial frequency neural network model, and extract spatial domain features and frequency domain features based on the scale control information;

[0082] Step six: fuse the spatial domain features and the frequency domain features to obtain fused features;

[0083] Step seven: based on the fused features, perform candidate region positioning and confidence evaluation, and remove candidate regions with confidence less than a preset threshold;

[0084] Step eight: generate a detection result of the flexible stone texture defect based on the screened candidate regions.

[0085] The embodiment collects original images of the flexible stone surface and forms a batch image set according to the production batch to which the original images belong, selects a first image in each batch image set as a batch first-piece sample, performs color space conversion, brightness histogram statistics and band energy analysis on the batch first-piece sample to generate batch configuration parameters, inputs the batch configuration parameters and a to-be-detected image of the batch into a texture extraction process, sequentially performs color space linearization processing, white balance processing, histogram matching, edge-preserving denoising and illumination compensation based on homomorphic filtering on the to-be-detected image to obtain a reflection component image, performs band-pass filter convolution on the reflection component image according to the energy distribution matrix in the batch configuration parameters, calculates gradient amplitude, gradient direction and local energy density, combines the preset weighting coefficient to generate a texture intensity map, performs normalization processing and boundary-preserving smoothing to output a texture map, divides the texture map into a plurality of grid cells, calculates the priority of each grid cell using the grid weight information in the batch configuration parameters and generates scale control information associated with the grid cell number in combination with the stickiness life parameter, inputs the to-be-detected image into the spatial convolution branch and the frequency convolution branch of the spatial-frequency neural network model according to the activation order of the grid cells and adjusts the feature extraction parameters based on the scale control information, outputs the spatial feature map and the frequency feature map, and fuses the spatial feature map and the frequency feature map to obtain a fused feature, inputs the fused feature into a candidate region generation and evaluation process to locate potential defect regions and calculate confidence values, removes the candidate regions with confidence values less than a preset threshold, and generates a flexible stone texture defect detection result based on the remaining region set and outputs the defect position, defect category and confidence information.

[0086] The embodiment constructs batch configuration parameters through feature extraction of the batch first-piece sample, and realizes adaptive matching of brightness and texture information between batches by using a parameter database, thereby significantly reducing the influence of illumination condition differences and texture feature drift between different production batches on detection accuracy; a spatial and frequency dual-branch structure is introduced in the texture feature extraction stage, and the channel weight and spatial weight are dynamically adjusted in combination with the scale control information, thereby effectively improving the expression ability of multi-scale texture details and structural outlines; the feature fusion module integrates local context and global correlation information, and the multi-scale anchor box mechanism and non-maximum suppression strategy are used in the candidate region generation and screening process, thereby improving the accuracy of defect positioning and the stability of confidence determination; and finally, high-precision detection and rapid identification of multiple types and multiple scales of flexible stone texture defects are realized, which is highly adaptable and robust.

[0087] In the embodiment, the step one is specifically:

[0088] Under the illumination conditions of constant color temperature and constant brightness, a high-resolution industrial camera is used to perform full-frame imaging collection on the flexible stone surface piece by piece;

[0089] In the acquisition process, the corresponding production date, production line number and product model information are recorded;

[0090] The image data obtained by acquisition is batch-identified according to the production date, production line number and product model, and the image data is classified based on the batch identification to form images of multiple production batches.

[0091] In this embodiment, under the light conditions of constant color temperature and constant brightness, the flexible stone surface is imaged and collected in full width by a high-resolution industrial camera, and the corresponding production date, production line number and product model information are recorded synchronously during the acquisition process; the image data obtained by acquisition is batch-identified according to the production date, production line number and product model, and the image data is classified based on the batch identification to form an image set of multiple production batches. Through the above-mentioned manner, the consistency and comparability of the collected images under the light conditions can be ensured, and the texture feature fluctuation caused by external environmental differences can be reduced; at the same time, targeted parameter configuration and model optimization based on batches can be realized in the subsequent processing link, and the stability and accuracy of texture defect recognition can be improved.

[0092] In this embodiment, the step two is specifically:

[0093] According to the production order, the first image from the images of each production batch is selected as a batch first piece sample;

[0094] Based on the batch first piece sample, histogram normalization processing is performed to map the pixel gray value to a gray scale range of zero to two hundred and fifty-five;

[0095] The batch first piece sample after histogram normalization is subjected to two-dimensional discrete wavelet decomposition, and is decomposed to a preset decomposition layer number to obtain low-frequency components and high-frequency components, respectively;

[0096] The average gray value and the standard deviation of the low-frequency components are calculated, and the energy distribution matrix of the high-frequency components is calculated;

[0097] The average gray value, the standard deviation and the energy distribution matrix are combined into batch configuration parameters;

[0098] The batch configuration parameters and the corresponding production batch identification are correspondingly stored in a parameter database; the parameter database is indexed in a key-value pair structure, the key is the production batch identification, and the value is the batch configuration parameter.

[0099] The first image is selected as a first-piece sample from each production batch according to the production sequence in this embodiment, histogram normalization processing is performed on the first-piece sample to map the pixel gray value to the complete gray range of zero to two hundred and fifty-five, so as to eliminate the influence of brightness offset on the texture feature; after the normalization is completed, two-dimensional discrete wavelet decomposition is performed on the first-piece sample to a preset decomposition layer, and the low-frequency component and the high-frequency component are extracted respectively; the average gray value and the standard deviation of the low-frequency component are calculated, and the energy distribution matrix of the high-frequency component is calculated to quantify the frequency domain feature; the average gray value, the standard deviation and the energy distribution matrix are combined to generate a batch configuration parameter, and the batch configuration parameter and the corresponding production batch identifier are mapped and stored in a parameter database, the parameter database is indexed in a key-value pair structure, the key is the production batch identifier, and the value is the batch configuration parameter. Through the above processing mode, it can be ensured that each production batch has a unified brightness and frequency domain statistical benchmark before the texture feature is extracted, and the imaging difference between batches is reduced; meanwhile, the corresponding batch parameters can be directly called in the subsequent detection, the targeted feature extraction and classification are realized, and the detection accuracy and processing efficiency are improved.

[0100] In this embodiment, step three is specifically:

[0101] Based on the batch configuration parameter and the to-be-detected image, linear color space transformation and white balance processing are performed to obtain a brightness matching image;

[0102] The brightness matching image and the brightness statistical information in the batch configuration parameter are subjected to histogram matching to generate a brightness equalization image;

[0103] The brightness equalization image is subjected to edge-preserving denoising processing and illumination compensation based on homomorphic filtering to obtain a reflection component image;

[0104] A band-pass filter set is selected according to the energy distribution matrix in the batch configuration parameter, and the reflection component image is subjected to convolution operation to obtain a multi-band response image;

[0105] The gradient amplitude and the gradient direction of the multi-band response image are calculated, and the variance and the energy density in the local neighborhood are calculated to obtain a texture feature matrix;

[0106] The pixel values of the multi-band response image, the gradient amplitude and the local variance are combined according to a preset weighting coefficient to generate a texture intensity image;

[0107] Normalization processing and boundary-preserving smoothing processing are performed on the texture intensity image to obtain a texture image.

[0108] The embodiment is based on the batch configuration parameter and the image to be detected, and first performs linear color space conversion and white balance processing to convert the color channels of the image to a unified linear color space and eliminate color cast, to obtain a brightness matching image; histogram matching is performed on the brightness matching image and the brightness statistical information in the batch configuration parameter to generate a brightness equalization image; an edge-preserving denoising algorithm is applied to the brightness equalization image to filter out high-frequency noise while retaining edge details, and the same state filtering is performed for illumination compensation to obtain a reflection component image; a corresponding band-pass filter set is selected according to the energy distribution matrix in the batch configuration parameter, and convolution operation is performed on the reflection component image to generate a multi-band response image; the gradient amplitude and gradient direction of the multi-band response image are calculated, and the variance and energy density in the local neighborhood are calculated to form a texture feature matrix; the pixel values of the multi-band response image, the gradient amplitude and the local variance are combined according to the preset weighting coefficient to generate a texture intensity image; the texture intensity image is normalized and boundary-preserving smoothed to finally obtain a texture image. Through the process, the texture information related to defects can be enhanced in the spatial domain and the frequency domain at the same time, and the accuracy of subsequent candidate region positioning is improved; meanwhile, the uneven illumination and noise interference are suppressed on the premise of retaining texture details, and the robustness and stability of defect detection are improved.

[0109] In the embodiment, the step four is specifically:

[0110] The texture image is equally spaced in the horizontal direction and the vertical direction according to a preset grid division rule to obtain a plurality of grid cells;

[0111] Based on the low-frequency component average gray value and the high-frequency component energy distribution matrix in the batch configuration parameter, a priority activation order of each grid cell is determined;

[0112] In the process of determining the priority activation order, the stickiness life parameter is weighted and fused with the local gray mean value, the local contrast and the energy density of the grid cell to obtain a scale priority index;

[0113] The grid cells are arranged from high to low according to the scale priority index to generate a grid cell activation sequence;

[0114] The grid cell activation sequence and the stickiness life parameter are jointly encoded to obtain scale control information.

[0115] In the embodiment, the texture map is equally spaced in the horizontal direction and the vertical direction according to preset grid division rules to obtain a plurality of grid cells; based on the low-frequency component average gray value and the high-frequency component energy distribution matrix in the batch configuration parameter, a priority activation order of each grid cell is determined; in the process of determining the priority activation order, the stickiness life parameter is weighted and fused with the local gray mean value, the local contrast and the energy density of the grid cell to obtain a scale priority index; the grid cells are arranged from high to low according to the scale priority index to generate a grid cell activation sequence; and the grid cell activation sequence and the stickiness life parameter are jointly encoded to generate scale control information. Through the method, grid level dynamic screening based on multi-dimensional texture and energy features can be realized, redundant calculation can be reduced, and potential defect areas can be highlighted; meanwhile, the joint encoding mode of the stickiness life parameter and the local statistical features enhances the adaptive ability of scale control to different batches and different texture flexible stone materials.

[0116] In the embodiment, the step five is specifically:

[0117] The to-be-detected image is input into the spatial domain convolution branch of the spatial-frequency neural network model to perform multi-scale spatial domain convolution operation, extract edge features, texture detail features and structure contour features under different receptive fields, and obtain a spatial domain feature map;

[0118] The to-be-detected image is input into the frequency domain convolution branch of the spatial-frequency neural network model to perform fast Fourier transform on the input image to obtain a frequency spectrum map, and perform multi-scale frequency domain convolution operation on the frequency spectrum map to extract low-frequency structure features and high-frequency texture features, and generate a frequency domain feature map;

[0119] The scale control information is input into the spatial domain convolution branch and the frequency domain convolution branch to adjust the channel weight and the spatial weight parameter of the spatial domain feature map and the frequency domain feature map, and generate a weighted spatial domain feature map and a weighted frequency domain feature map;

[0120] Batch normalization processing and nonlinear activation processing are respectively performed on the weighted spatial domain feature map and the weighted frequency domain feature map to obtain spatial domain features and frequency domain features.

[0121] The embodiment inputs the to-be-detected image into the spatial domain convolution branch of the spatial-frequency neural network model, performs multi-scale spatial domain convolution operation to extract edge features, texture detail features and structure contour features under different receptive fields, and obtains a spatial domain feature map; meanwhile, the to-be-detected image is input into the frequency domain convolution branch, a frequency spectrum map is generated through fast Fourier transform, and multi-scale frequency domain convolution operation is performed on the frequency spectrum map to extract low-frequency structure features and high-frequency texture features, and a frequency domain feature map is obtained; the scale control information is input into the spatial domain convolution branch and the frequency domain convolution branch respectively, and the channel weight and the spatial weight parameter of the spatial domain feature map and the frequency domain feature map are adjusted to generate a weighted spatial domain feature map and a weighted frequency domain feature map; batch normalization processing and nonlinear activation processing are performed on the weighted spatial domain feature map and the weighted frequency domain feature map respectively, and spatial domain features and frequency domain features are obtained. This method can simultaneously retain spatial details and frequency distribution characteristics, ensuring that the feature expression has high-resolution information in the texture and structure layers; through the introduction of scale control information, adaptive enhancement of different batches and different texture complexity flexible stone materials in the feature extraction process is realized.

[0122] In the embodiment, the spatial-frequency neural network model is specifically:

[0123] The spatial-frequency neural network model comprises a spatial domain convolution branch and a frequency domain convolution branch, the spatial domain convolution branch is sequentially connected by a multi-scale convolution layer, a batch normalization layer, a nonlinear activation layer and a down-sampling layer;

[0124] The multi-scale convolution layer comprises a plurality of convolution kernel groups with different receptive fields, the convolution kernel sizes are three by three, five by five and seven by seven respectively, the output results are spliced in the channel dimension to form a multi-scale spatial domain feature map;

[0125] The frequency domain convolution branch comprises a frequency spectrum transformation layer, a frequency domain convolution layer, a batch normalization layer, a nonlinear activation layer and a down-sampling layer, the frequency spectrum transformation layer performs two-dimensional fast Fourier transform on the input image to generate a complex frequency spectrum map, and the amplitude spectrum and the phase spectrum are sent into the frequency domain convolution layer as inputs respectively;

[0126] The frequency domain convolution layer adopts the same multi-scale convolution kernel group structure as the spatial domain convolution branch, performs convolution operation on the amplitude spectrum and the phase spectrum respectively, and splices the operation results in the channel dimension to form a multi-scale frequency domain feature map;

[0127] The outputs of the spatial domain convolution branch and the frequency domain convolution branch are processed by a channel weighting module and a spatial weighting module; the channel weighting module adjusts the channel weight according to the scale control information; and the spatial weighting module adjusts the spatial position weight according to the scale control information;

[0128] The spatial domain feature defined by the spatial domain feature map output by the channel weighting module and the spatial weighting module, and the frequency domain feature defined by the frequency domain feature map output by the spatial weighting module.

[0129] In the embodiment, the spatial-frequency neural network model is composed of a spatial domain convolution branch and a frequency domain convolution branch. The spatial domain convolution branch is sequentially composed of a multi-scale convolution layer, a batch normalization layer, a nonlinear activation layer, and a down-sampling layer. The multi-scale convolution layer contains convolution kernel groups with different receptive fields, and the sizes of the convolution kernels are 3x3, 5x5, and 7x7, respectively. The convolution outputs are spliced in the channel dimension to form multi-scale spatial domain feature maps. The frequency domain convolution branch sequentially includes a spectrum transformation layer, a frequency domain convolution layer, a batch normalization layer, a nonlinear activation layer, and a down-sampling layer. The spectrum transformation layer performs two-dimensional fast Fourier transform on the input image to generate a complex spectrum map, and the amplitude spectrum and the phase spectrum are input into the frequency domain convolution layer, respectively. The frequency domain convolution layer uses the same multi-scale convolution kernel group structure as the spatial domain convolution branch to perform convolution operations on the amplitude spectrum and the phase spectrum, respectively. The operation results are spliced in the channel dimension to form multi-scale frequency domain feature maps. The outputs of the spatial domain convolution branch and the frequency domain convolution branch are both subjected to a channel weighting module and a spatial weighting module. The channel weighting module adjusts the channel weight according to the scale control information, and the spatial weighting module adjusts the spatial position weight according to the scale control information. The spatial domain feature defined by the spatial domain feature map output by the channel weighting module, and the frequency domain feature defined by the frequency domain feature map output by the spatial weighting module. The model can simultaneously retain spatial details and frequency structure information in the spatial domain and the frequency domain, and realize adaptive enhancement of features under different batches and different texture complexity conditions through scale control information, thereby improving the accuracy and stability of flexible stone texture defect detection.

[0130] In the embodiment, the step six is specifically:

[0131] The spatial domain feature and the frequency domain feature are input into a feature alignment module, and size matching and scale normalization processing are performed on the feature maps in the channel dimension and the spatial dimension to obtain aligned spatial domain features and aligned frequency domain features.

[0132] The aligned spatial domain features and the aligned frequency domain features are input into a feature fusion module to perform element-wise weighted summation operation and cross-channel feature splicing operation to generate a preliminary fusion feature map.

[0133] The preliminary fusion feature map is input into a convolution fusion layer to extract local context information and global correlation information using a multi-scale convolution kernel group, and a convolution fusion feature map is output.

[0134] The convolution fusion feature map is input into an attention distribution module to calculate weight coefficients in the channel dimension and position weight matrices in the spatial dimension, and perform weighted operation on the convolution fusion feature map to obtain a weighted fusion feature map.

[0135] perform batch normalization processing and nonlinear activation processing on the weighted fusion feature map to obtain a fusion feature.

[0136] In the embodiment, the spatial domain feature and the frequency domain feature are respectively input into a feature alignment module to perform size matching and scale normalization processing in the channel dimension and the spatial dimension to obtain an aligned spatial domain feature and an aligned frequency domain feature; the aligned spatial domain feature and the aligned frequency domain feature are input into a feature fusion module to perform element-by-element weighted summation operation and cross-channel feature splicing operation to generate a preliminary fusion feature map; the preliminary fusion feature map is input into a convolution fusion layer to simultaneously extract local context information and global correlation information by using a multi-scale convolution kernel group containing different size convolution kernels, and output a convolution fusion feature map; the convolution fusion feature map is input into an attention distribution module to calculate a weight coefficient in the channel dimension, calculate a position weight matrix in the spatial dimension, and perform weighted operation to obtain a weighted fusion feature map; the weighted fusion feature map is subjected to batch normalization processing and nonlinear activation processing to obtain a fusion feature. The fusion process can effectively integrate the complementary feature information of the spatial domain and the frequency domain, and enhance the expression ability of the target region through multi-scale convolution and attention mechanism, thereby improving the accuracy and robustness of the flexible stone texture defect detection.

[0137] In the embodiment, the step seven is specifically:

[0138] The fusion feature is input into a candidate region generation module to generate a plurality of candidate regions on the fusion feature map based on a multi-scale anchor box mechanism;

[0139] A classification probability value and a position regression parameter are calculated for each candidate region, the classification probability value representing a confidence value of the candidate region belonging to the flexible stone texture defect category, and the position regression parameter being a regression coefficient for correcting the position of the candidate region boundary box;

[0140] An overlap threshold is set; non-maximum suppression processing is performed on the candidate regions to remove candidate regions with an overlap degree greater than a preset overlap threshold;

[0141] A confidence threshold is set; candidate regions with a confidence value less than a preset confidence threshold are screened out from the candidate regions subjected to the non-maximum suppression processing, and candidate regions meeting the condition are retained as effective detection regions;

[0142] The boundary box coordinates, the category label, and the confidence value of the effective detection regions are input into a defect result generation module.

[0143] In the embodiment, the fusion feature input candidate region generation module generates a plurality of candidate regions on the fusion feature map based on a multi-scale anchor box mechanism; for each candidate region, a classification probability value and a position regression parameter are calculated, the classification probability value is used to represent the confidence value of the candidate region belonging to the flexible stone texture defect category, and the position regression parameter is a regression coefficient for correcting the position of the candidate region boundary box; a degree of overlap threshold is set, and a non-maximum suppression process is performed on the candidate regions to eliminate candidate regions with a degree of overlap greater than the preset degree of overlap threshold; a confidence threshold is set, and candidate regions with a confidence value less than the preset confidence threshold are screened out from the candidate regions after the non-maximum suppression process, and candidate regions that meet the conditions are retained as effective detection regions; the boundary box coordinates, category label and confidence value of the effective detection regions are input into the defect result generation module, and the detection result of the flexible stone texture defect is output. The processing process can reduce the number of redundant candidate boxes by combining multi-scale anchor boxes with non-maximum suppression, and improve the accuracy and stability of the detection result by confidence screening.

[0144] In the embodiment, step eight is specifically:

[0145] Map the boundary box coordinates of the effective detection region to the pixel coordinate system of the image to be detected to obtain a defect region position;

[0146] Group the defect regions according to the category labels to generate defect category sets respectively;

[0147] For each defect region in the defect category set, crop the corresponding image region and save it as a defect subgraph;

[0148] Store the defect subgraph and the corresponding category label, confidence value and boundary box coordinates in the detection result file;

[0149] Associate the detection result file with the batch identifier of the image to be detected to generate a flexible stone texture defect detection result dataset.

[0150] In the embodiment, the boundary box coordinates of the effective detection region are mapped to the pixel coordinate system of the image to be detected to obtain a defect region position; the defect regions are grouped according to the category labels to generate defect category sets respectively; for each defect region in the defect category set, the corresponding image region is cropped and saved as a defect subgraph; the defect subgraph and the corresponding category label, confidence value and boundary box coordinates are stored in the detection result file; the detection result file is associated with the batch identifier of the image to be detected to generate a flexible stone texture defect detection result dataset. This process can realize accurate mapping of defect detection results and original batch production information, ensure the traceability of the dataset, and improve the availability of defect samples and subsequent analysis efficiency through classification and cropping.

[0151] Example 1

[0152] In order to verify the feasibility of the application in implementation, the application is applied to the quality inspection link of a large flexible stone production enterprise. The enterprise faces the problems of significant texture differences between batches, low efficiency of manual inspection, high rates of missed detection and misdiagnosis, etc. in daily production, especially in the process of large-scale continuous production. Due to the complex morphology, different scales of texture defects and the high similarity of some defects to natural texture, manual detection not only consumes time and effort, but also easily leads to unstable detection results due to subjective judgment differences. The flexible stone texture defect recognition method based on multi-scale convolutional neural network proposed by the application is deployed on the flexible stone production line of the enterprise. After deployment, high-resolution industrial cameras are used to image and collect each piece of stone under constant color temperature and constant brightness lighting conditions. The collected image data is classified by production date, production line number and product model, and the corresponding index is established in the parameter database to ensure data traceability and real-time parameter calling in the detection process.

[0153] In the application process, the first sample is selected from each batch for histogram normalization and two-dimensional discrete wavelet decomposition, and statistical features such as low-frequency average gray value and high-frequency energy distribution matrix are extracted to generate batch configuration parameters, which are stored in key-value pairs with batch identifiers. Batch configuration parameters are used for brightness matching, white balance adjustment, histogram matching and homomorphic filtering-based illumination compensation in subsequent detection to generate texture maps, and the activation order of grid cells is determined according to the energy distribution matrix and stickiness life parameters to form scale control information. The spatial frequency neural network model extracts edge and structure features in the spatial convolution branch and extracts texture detail features of different frequencies in the frequency convolution branch. After fusion, candidate regions are generated, non-maximum suppression and confidence screening are performed, and finally the defect detection results are output and associated with batch identifiers to generate a detection dataset.

[0154] In a batch detection experiment, 1200 pieces of flexible stone from five production batches of three production lines were detected. The comparison results of the manual detection group and the application detection group are shown in Table 1:

[0155] Table 1 Comparison of flexible stone texture defect detection efficiency and accuracy

[0156] Detection method Total time (min) Average time per piece (s) Detection rate (%) False detection rate (%) Missed detection rate (%) Manual detection 420 21.0 88.5 6.8 11.5 The present invention 95 4.75 97.8 2.1 2.2

[0157] As can be seen from Table 1, the method of the present application improves the detection efficiency by about 4.4 times compared with manual detection, the detection rate is increased by about 9.3 percentage points, the false detection rate and the missed detection rate are decreased by 4.7% and 9.3% respectively, and the detection accuracy and stability of the flexible stone texture defects are significantly improved. The total time consumption is reduced by more than 300 minutes, the single piece detection time is shortened by nearly three quarters, which means that the influence of the detection link on the production rhythm is greatly reduced; the detection rate is increased by nearly 10 percentage points, the missed detection rate is decreased by more than 80%, and the false detection rate is decreased by nearly 70%, which reflects the stronger stability of the algorithm in distinguishing normal texture and defect features. The synchronous improvement of efficiency and accuracy makes the method can be directly deployed in the production line online detection, reduces the manual intervention and rework cost.

[0158] In order to further verify the detection performance under different defect categories, classification statistics and precision analysis are carried out on five common defect types (crack, sand eye, color spot, scratch, texture fracture), and the results are shown in Table 2:

[0159] Table 2 Comparison of detection performance of different defect categories

[0160] Defect category Sample number Manual detection rate (%) Invention detection rate (%) Improvement range (%) Crack 120 90.0 98.3 +8.3 Sand hole 100 86.5 97.0 +10.5 Color spot 95 88.4 96.8 +8.4 Scratch 85 87.1 98.0 +10.9 Texture break 100 90.2 97.6 +7.4

[0161] As can be seen from Table 2, the detection accuracy of the present application on the five defect types is significantly higher than that of manual detection, with an improvement of 7.4% to 10.9%, among which the detection of sand eye and scratch is the most significant, which benefits from the high sensitivity of the frequency domain feature branch to high frequency information and the multi-scale analysis ability of the spatial domain feature branch to fine edges. The detection rate of structural defects such as cracks and texture fractures is significantly improved under multi-scale spatial domain convolution feature extraction, the detection rate of high frequency detail defects such as sand eye and scratch is greatly improved due to the feature enhancement of frequency domain convolution branch and energy distribution guidance, and the detection rate of color spot defects is also improved after batch brightness balancing and illumination compensation. Overall, the recognition accuracy of the method on the five typical defects is better than that of manual detection, and the advantage is not only in single class, but also has good class adaptability and stability.

[0162] In summary, the present application not only effectively solves the problems of low efficiency and unstable accuracy of manual detection, but also accurately identifies fine defects in complex texture background, and is suitable for real-time online quality inspection in large-scale flexible stone production process.

[0163] The above is only the preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any skilled person in the art can make equivalent replacement or change according to the technical scheme and inventive concept of the present application within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.

Claims

1. A flexible stone texture defect recognition method based on a multi-scale convolutional neural network, characterized in that, The method comprises the following steps: Step 1: Collecting images of the flexible stone surface and classifying them according to production batches; Step 2: Selecting the first image of each production batch as a batch first-piece sample; and generating batch configuration parameters based on the batch first-piece sample; Step 3: Based on the batch configuration parameters and the to-be-detected image, performing texture extraction to generate a texture map; the to-be-detected image is an image other than the batch first-piece sample; Step 4: Dividing the texture map into multiple grid units, and determining the activation order of each grid unit based on the batch configuration parameters, and combining the adhesion life parameter to generate scale control information; Step 5: Inputting the to-be-detected image into the spatial convolution branch and the frequency convolution branch of the empty frequency neural network model respectively, and extracting spatial features and frequency features based on the scale control information; Step 6: Fusing the spatial features and the frequency features to obtain fused features; Step 7: Based on the fused features, performing candidate region positioning and confidence evaluation, and removing candidate regions with confidence less than a preset threshold; Step 8: Generating a detection result of the flexible stone texture defect based on the screened candidate regions.

2. The method according to claim 1, wherein, The step 1 is specifically: Under the condition of constant color temperature and constant brightness of illumination, using a high-resolution industrial camera to perform full-frame imaging collection on the flexible stone surface piece by piece; During the collection process, record the corresponding production date, production line number and product model information; According to the production date, production line number and product model, the image data obtained by collection is batch identified, and the image data is classified based on the batch identification to form images of multiple production batches. 3.The flexible stone texture defect recognition method based on the multi-scale convolutional neural network according to claim 2, characterized in that, The step 2 is specifically: According to the production order, select the first image from the images of each production batch as a batch first-piece sample; Based on the batch first-piece sample, perform histogram normalization processing to map the pixel gray value to the gray value range of zero to two hundred and fifty-five; Perform two-dimensional discrete wavelet decomposition on the batch first-piece sample after histogram normalization to a preset decomposition layer number to obtain low-frequency components and high-frequency components respectively; Calculate the average gray value and standard deviation of the low-frequency components, and calculate the energy distribution matrix of the high-frequency components; Combine the average gray value, standard deviation and energy distribution matrix into batch configuration parameters; Correspond the batch configuration parameters and the corresponding production batch identification with the parameter database; the parameter database is established in the form of key-value pair structure index, the key is the production batch identification, and the value is the batch configuration parameter.

4. The method according to claim 3, wherein, The step 3 is specifically: Based on the batch configuration parameters and the to-be-detected image, perform linear color space transformation and white balance processing to obtain a brightness matching image; Perform histogram matching on the brightness matching image and the brightness statistical information in the batch configuration parameters to generate a brightness equalization image; Perform edge-preserving denoising processing and illumination compensation based on homomorphic filtering on the brightness equalization image to obtain a reflection component image; According to the energy distribution matrix in the batch configuration parameters, select a band-pass filter set to perform convolution operation on the reflection component image to obtain a multi-band response map; Gradient amplitudes and gradient directions are calculated for the multi-band response map, and local variances and energy densities are calculated in local neighborhoods to obtain a texture feature matrix; Pixel values of the multi-band response map, the gradient amplitudes, and the local variances are combined according to a preset weighting coefficient set to generate a texture intensity map; Normalization processing and boundary-preserving smoothing processing are performed on the texture intensity map to obtain a texture map.

5. The method according to claim 4, wherein, The step four specifically includes: The texture map is equally spaced in the horizontal direction and the vertical direction according to a preset grid division rule to obtain a plurality of grid cells; Based on the low-frequency component average gray value and the high-frequency component energy distribution matrix in the batch configuration parameter, a priority activation order of each grid cell is determined; In the process of determining the priority activation order, a stickiness life parameter is weighted and fused with a local gray mean value, a local contrast, and an energy density of the grid cell to obtain a scale priority index; The grid cells are arranged from high to low according to the scale priority index to generate a grid cell activation sequence; The grid cell activation sequence is jointly encoded with the stickiness life parameter to obtain scale control information. 6.The method of claim 5, wherein, The step five specifically includes: The to-be-detected image is input into a spatial convolution branch of the spatial-frequency neural network model to perform multi-scale spatial convolution operation, and edge features, texture detail features, and structure contour features under different receptive fields are extracted to obtain a spatial feature map; The to-be-detected image is input into a frequency convolution branch of the spatial-frequency neural network model to perform fast Fourier transform on the input image to obtain a frequency spectrum map, and multi-scale frequency convolution operation is performed on the frequency spectrum map to extract low-frequency structure features and high-frequency texture features, thereby generating a frequency feature map; The scale control information is input into the spatial convolution branch and the frequency convolution branch to adjust channel weights and spatial weight parameters of the spatial feature map and the frequency feature map, thereby generating a weighted spatial feature map and a weighted frequency feature map; Batch normalization processing and nonlinear activation processing are respectively performed on the weighted spatial feature map and the weighted frequency feature map to obtain spatial features and frequency features.

7. The method according to claim 6, wherein, The spatial-frequency neural network model specifically includes: The spatial-frequency neural network model includes a spatial convolution branch and a frequency convolution branch, and the spatial convolution branch is sequentially connected by a multi-scale convolution layer, a batch normalization layer, a nonlinear activation layer, and a down-sampling layer; The multi-scale convolution layer includes convolution kernel groups with different receptive fields, and the convolution kernel sizes are three by three, five by five, and seven by seven, respectively. The output results are spliced in the channel dimension to form a multi-scale spatial feature map; The frequency convolution branch includes a frequency spectrum transformation layer, a frequency convolution layer, a batch normalization layer, a nonlinear activation layer, and a down-sampling layer. The frequency spectrum transformation layer performs two-dimensional fast Fourier transform on the input image to generate a complex frequency spectrum map, and the amplitude spectrum and the phase spectrum are transmitted as inputs to the frequency convolution layer; The frequency convolution layer adopts the same multi-scale convolution kernel group structure as the spatial convolution branch, and performs convolution operation on the amplitude spectrum and the phase spectrum, respectively. The operation results are spliced in the channel dimension to form a multi-scale frequency feature map; The outputs of the spatial domain convolution branch and the frequency domain convolution branch are processed by a channel weighting module and a spatial weighting module; the channel weighting module adjusts channel weights according to the scale control information; and the spatial weighting module adjusts spatial position weights according to the scale control information. The spatial domain feature map output by the channel weighting module and the spatial weighting module is defined as a spatial domain feature, and the frequency domain feature map is defined as a frequency domain feature. 8.The flexible stone texture defect recognition method based on the multi-scale convolutional neural network according to claim 7, characterized in that, The step six is specifically as follows: The spatial domain feature and the frequency domain feature are input into a feature alignment module, and size matching and scale normalization processing are performed on the feature maps in the channel dimension and the spatial dimension to obtain an aligned spatial domain feature and an aligned frequency domain feature; The aligned spatial domain feature and the aligned frequency domain feature are input into a feature fusion module to perform element-wise weighted summation operation and cross-channel feature splicing operation to generate a preliminary fusion feature map; The preliminary fusion feature map is input into a convolution fusion layer to extract local context information and global correlation information using a multi-scale convolution kernel group, and a convolution fusion feature map is output; The convolution fusion feature map is input into an attention distribution module to calculate weight coefficients in the channel dimension and position weight matrices in the spatial dimension, and weighted operation is performed on the convolution fusion feature map to obtain a weighted fusion feature map; Batch normalization processing and nonlinear activation processing are performed on the weighted fusion feature map to obtain a fusion feature. 9.The flexible stone texture defect recognition method based on the multi-scale convolutional neural network according to claim 8, characterized in that, The step seven is specifically as follows: The fusion feature is input into a candidate region generation module to generate a plurality of candidate regions on the fusion feature map based on a multi-scale anchor box mechanism; Classification probability values and position regression parameters are calculated for each candidate region, the classification probability value representing a confidence value of the candidate region belonging to the flexible stone texture defect category, and the position regression parameter being a regression coefficient for correcting the position of the candidate region bounding box; An overlap threshold is set; Non-maximum suppression processing is performed on the candidate regions to eliminate candidate regions with an overlap greater than the preset overlap threshold; A confidence threshold is set; for the candidate regions after the non-maximum suppression processing, candidate regions with a confidence value less than the preset confidence threshold are screened out, and candidate regions meeting the conditions are retained as effective detection regions; The bounding box coordinates, category labels and confidence values of the effective detection regions are input into a defect result generation module.

10. The method of claim 9, wherein the method is based on a multi-scale convolutional neural network. The step eight is specifically as follows: The bounding box coordinates of the effective detection regions are mapped to the pixel coordinate system of the image to be detected to obtain defect region positions; The defect regions are grouped according to the category labels to generate defect category sets respectively; For each defect region in the defect category set, the corresponding image region is cropped and saved as a defect sub-image; The defect sub-image, the corresponding category label, the confidence value and the bounding box coordinates are stored in a detection result file; The detection result file is associated with the batch identifier of the image to be detected to generate a flexible stone texture defect detection result dataset.

Citation Information

Cited By

  • Water turbine coating abrasion detection method and system

    CN121353295A

  • Method and system for detecting defects of oxidation film on surface of aluminum material

    CN121582254A

  • Traffic engineering quality detection method and system based on machine vision

    CN121767369A

  • Dam body deformation identification method and system based on image processing

    CN121962938A

  • Connector injection molding surface defect detection method based on multi-scale feature fusion

    CN122066712A