Defect identification system for printed patterns of inflatable fabric
By adopting an adaptive feature extraction and decoupling recognition scheme, the problem of decreased detection performance of the inflatable fabric printed pattern defect recognition system under different lighting and texture environments was solved, achieving high-precision and stable defect recognition and improving the system's generalization ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGGUAN FENGZE JEWELRY CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-24
AI Technical Summary
Existing defect recognition systems for printed patterns on inflatable fabrics exhibit decreased detection performance under different lighting, texture, and background conditions, failing to adapt effectively and resulting in high false detection rates and poor generalization capabilities, requiring frequent parameter adjustments.
An adaptive feature extraction and decoupling recognition scheme is adopted. Through multi-scale feature extraction, domain adaptive convolutional layers and attention enhancement mechanisms, the feature extraction method is dynamically adjusted to separate content features and domain features, suppress background interference, and improve detection accuracy and robustness.
The system demonstrates good generalization ability in different environments, requiring no frequent parameter adjustments, and significantly improves the accuracy and stability of defect identification.
Smart Images

Figure CN121921287A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect identification, and more particularly to a defect identification system for printed patterns on inflatable fabrics. Background Technology
[0002] While existing defect detection systems for printed patterns on inflatable fabrics have improved in feature extraction and enhancement, their preprocessing stage relies on fixed traditional image processing methods such as filtering, brightness equalization, and contrast equalization. These methods cannot adapt to changes in lighting conditions, fabric texture, and background environment. When deployed on actual production lines, the uneven workshop lighting, diverse fabric types, and complex and variable backgrounds mean that the fixed preprocessing parameters cannot effectively adapt to these changes, leading to a significant decrease in detection performance. Specifically: In areas of strong light or shadow, image details are lost and defect features are masked; For fabrics with different textures (such as plain weave, twill, and jacquard), fixed pretreatment parameters cannot effectively separate texture from defects. Background changes (such as conveyor belt color and equipment reflection) interfere with detection, leading to an increased false detection rate.
[0003] This fundamental problem results in poor generalization ability of the existing system in practical applications, making it difficult to migrate between different production lines and different fabric types, requiring tedious parameter adjustments and data re-labeling for each new environment. Summary of the Invention
[0004] The purpose of this invention is to disclose a defect identification system for printed patterns on inflatable fabrics, thereby solving the technical problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: This invention provides a defect identification system for printed patterns on inflatable fabrics, including an image acquisition module, a preprocessing module, and an identification module; The image acquisition module is used to acquire surface images of the inflatable fabric containing printed patterns; The preprocessing module is used to preprocess the surface image to obtain a preprocessed image; The recognition module is used to input the preprocessed image into the pre-trained recognition model for detection and obtain the detection result. The recognition model first obtains an adaptive feature map based on the preprocessed image, then decouples the adaptive feature map to obtain content features and domain features, then generates an attention-enhanced feature map based on the content features and domain features, and finally performs multi-scale recognition on the attention-enhanced feature map to obtain the final detection result.
[0006] Preferably, the surface image is preprocessed to obtain a preprocessed image, including: The surface image is denoised to obtain a preprocessed image.
[0007] Preferably, the surface image is subjected to noise reduction processing to obtain a preprocessed image, including: The surface image is denoised according to the red, green and blue components in the RGB color space, respectively, to obtain the denoised red component image, green component image and blue component image. The denoised red, green, and blue component images are fused to obtain a preprocessed image.
[0008] Preferably, the surface image is subjected to noise reduction processing to obtain a preprocessed image, including: The surface image is denoised using a wavelet denoising algorithm to obtain a preprocessed image.
[0009] Preferably, the identification module includes an extraction unit, a decoupling unit, a generation unit, and an identification unit; The extraction unit is used to obtain adaptive feature maps based on the preprocessed image; The decoupling unit is used to decouple the adaptive feature map to obtain content features and domain features; The generation unit is used to generate attention-enhanced feature maps based on content features and domain features; The recognition unit is used to perform multi-scale recognition on the attention-enhanced feature map to obtain the final detection result.
[0010] Preferably, obtaining an adaptive feature map based on the preprocessed image includes: S10, input the preprocessed image into a preset feature extraction network of multiple scales for feature extraction to obtain feature information at multiple scales; S11, concatenates feature information from multiple scales along the channel dimension to obtain concatenated features; S12 uses a domain-adaptive convolutional layer to process the concatenated features and obtain an adaptive feature map.
[0011] Preferably, the adaptive feature map is decoupled to obtain content features and domain features, including: The adaptive feature map is processed using a feature decoupling encoder to obtain content feature vectors and domain feature vectors; During the decoupling process, a mutual information loss function is used to constrain the decoupling process, and a feature reconstruction decoder is used to constrain the reconstruction loss.
[0012] Preferably, attention-enhanced feature maps are generated based on content features and domain features, including: S20, reshape the content feature vector into a content feature map; S21, Generate adaptive attention weights based on domain feature vectors; S22, Obtain spatial attention map and channel attention map based on content feature map; S23, use adaptive attention weights to fuse the spatial attention map and the channel attention map to obtain an attention-enhanced feature map.
[0013] Preferably, multi-scale recognition is performed on the attention-enhanced feature map to obtain the final detection result, including: S30: Perform pooling operations at multiple scales on the attention-enhanced feature map to obtain feature maps at multiple scales; S31, Perform the preset detection task on the feature map at each scale respectively, and obtain the detection result of the feature map at each scale; S32 fuses the detection results of feature maps at all scales to obtain the final detection result.
[0014] Preferably, the training process of the recognition module includes: S40, train the recognition module on the publicly available training set and initialize the parameters in the recognition module; S41, Freeze the parameters of other units, train the recognition module using the labeled dataset, and adjust only the parameters of the recognition unit during the training process; S42, the recognition module is trained using the labeled dataset, and the parameters of all units are adjusted during the training process.
[0015] Beneficial effects: This invention provides an inflatable fabric printed pattern defect recognition system. Addressing the problem of decreased detection performance in existing technologies due to fixed preprocessing parameters failing to adapt to varying lighting, textures, and backgrounds, this system proposes an adaptive feature extraction and decoupling recognition scheme. By dynamically adjusting the feature extraction method through multi-scale feature extraction and domain-adaptive convolutional layers, the system can adapt to different lighting conditions and fabric textures. Furthermore, feature decoupling separates content features from domain features, effectively suppressing background interference and texture noise. Combined with a domain-feature-based adaptive attention mechanism, the system dynamically strengthens defect-related features while weakening irrelevant information. Finally, a multi-scale recognition fusion strategy improves the detection accuracy and robustness for defects of varying sizes and shapes. In actual production lines, this system demonstrates excellent generalization ability, eliminating the need for frequent parameter adjustments for different environments and significantly improving the accuracy and stability of defect recognition. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of a defect identification system for printed patterns on inflatable fabrics according to the present invention.
[0018] Figure 2 This is a schematic diagram illustrating the process of obtaining adaptive feature maps based on preprocessed images according to the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0020] like Figure 1 As shown in one embodiment, the present invention provides a defect identification system for printed patterns on inflatable fabrics, including an image acquisition module, a preprocessing module, and an identification module; The image acquisition module is used to acquire surface images of the inflatable fabric containing printed patterns; The preprocessing module is used to preprocess the surface image to obtain a preprocessed image; The recognition module is used to input the preprocessed image into the pre-trained recognition model for detection and obtain the detection result. The recognition model first obtains an adaptive feature map based on the preprocessed image, then decouples the adaptive feature map to obtain content features and domain features, then generates an attention-enhanced feature map based on the content features and domain features, and finally performs multi-scale recognition on the attention-enhanced feature map to obtain the final detection result.
[0021] Preferably, obtaining a surface image of the inflatable fabric containing a printed pattern includes: Lay the inflatable fabric containing the printed pattern flat on the supporting structure; An industrial camera was used to photograph the inflatable fabric on the support structure to obtain a surface image.
[0022] The supporting structure here can be a conveyor belt, a workbench, etc.
[0023] Preferably, the surface image is preprocessed to obtain a preprocessed image, including: The surface image is denoised to obtain a preprocessed image.
[0024] Noise reduction processing can improve image quality, thus resulting in more accurate results in the recognition module.
[0025] Preferably, the surface image is subjected to noise reduction processing to obtain a preprocessed image, including: The surface image is denoised according to the red, green and blue components in the RGB color space, respectively, to obtain the denoised red component image, green component image and blue component image. The denoised red, green, and blue component images are fused to obtain a preprocessed image.
[0026] The fusion process involves merging the channels of the denoised red, green, and blue component images to reconstruct a three-channel color image, resulting in a preprocessed image.
[0027] By denoising each component separately, not only can the multi-channel color information of the image be preserved, but also the noise can be effectively removed.
[0028] Preferably, the surface image is subjected to noise reduction processing to obtain a preprocessed image, including: The surface image is denoised using a wavelet denoising algorithm to obtain a preprocessed image.
[0029] Wavelet denoising is a signal processing technique based on wavelet transform, aiming to extract useful information from noisy signals while minimizing the impact of noise. Its core idea is to use wavelet transform to decompose the signal into components of different frequencies and time scales, remove noise-dominated high-frequency components through thresholding, and then reconstruct the signal.
[0030] Preferably, the identification module includes an extraction unit, a decoupling unit, a generation unit, and an identification unit; The extraction unit is used to obtain adaptive feature maps based on the preprocessed image: The extraction unit dynamically adjusts the feature extraction method through multi-scale feature extraction and domain-adaptive convolutional layers, enabling the system to adapt to different lighting, texture and background environments, thereby improving the robustness and generalization ability of feature representation.
[0031] The decoupling unit is used to decouple the adaptive feature map to obtain content features and domain features: The decoupling unit separates the content features that reflect the essence of defects from the domain features that are affected by the environment, effectively suppressing background interference and texture noise, and enhancing the model's focus on defect features.
[0032] The generating unit is used to generate attention-enhanced feature maps based on content features and domain features: The generation unit dynamically generates attention weights based on domain features, adaptively integrates spatial and channel attention, strengthens defect-related regions and feature channels, and improves the discriminative power of feature representation.
[0033] The recognition unit is used to perform multi-scale recognition on the attention-enhanced feature map to obtain the final detection result.
[0034] The recognition unit achieves comprehensive capture of defects of different sizes and shapes by performing multi-scale pooling and parallel detection on the attention-enhanced feature map, and finally improves detection accuracy and recall by fusing the results.
[0035] Preferably, such as Figure 2 Adaptive feature maps are obtained based on preprocessed images, including: S10: Input the preprocessed image into a preset feature extraction network of multiple scales for feature extraction to obtain feature information at multiple scales.
[0036] Specifically, the preprocessed image is represented as , in: Image height (in pixels); Image width (in pixels).
[0037] Specifically, the feature extraction network can be a convolutional network.
[0038] The following section provides further explanation using feature extraction networks at three different scales: The pre-defined feature extraction networks have convolutional kernel sizes including 1×1, 3×3, and 5×5.
[0039] First, the multi-scale feature extraction network is entered. , It contains three parallel branches, each using convolutional kernels of different sizes (1×1, 3×3, 5×5) to extract multi-scale features: .
[0040] It is a parallel multi-branch convolutional network, not an existing single-network structure, but an architecture specifically designed for this invention. It consists of three parallel convolutional branches, each using convolutional kernels of different sizes to capture feature information at different scales.
[0041] Small-scale branch (1×1 convolution): mainly captures subtle local features, such as the edges and corners of defects. 1×1 convolution is essentially a linear combination of features from each channel, without changing the spatial receptive field.
[0042] Medium-scale branch (3×3 convolution): captures medium-range texture features and structural information. This is the most commonly used scale in convolutional neural networks, balancing receptive field and computational complexity.
[0043] Large-scale branch (5×5 convolution): captures a wider range of contextual information and global features, which helps to understand the relationship between defects and the surrounding fabric texture.
[0044] S11 splices feature information from multiple scales along the channel dimension to obtain spliced features.
[0045] Each branch processes the same input image in parallel, extracting features from different receptive fields, and then fuses these features, enabling the network to simultaneously possess detail perception and contextual understanding capabilities.
[0046] The following explanation uses three scales as examples: Concatenate the feature maps from the three scales along the channel dimension: in: : splicing characteristics; , The height and width of the feature map after convolution; The number of channels after splicing (the sum of the number of channels in the three branches).
[0047] S12 uses a domain-adaptive convolutional layer to process the concatenated features and obtain an adaptive feature map.
[0048] Specifically, the weights of the domain-adaptive convolutional layer are dynamically adjusted based on the domain features of the input image.
[0049] The following explanation uses three scales as examples: in: These are dynamically generated convolutional kernel parameters, generated by the domain feature estimation network.
[0050] For adaptive feature maps, ,in This represents the number of output channels.
[0051] Domain Adaptive Convolutional Layer It is not a standard convolutional layer, but a dynamic convolutional layer. Its core feature is the convolution kernel parameters. It is not fixed, but dynamically generated based on the domain features of the input image.
[0052] Structural composition: Domain Feature Estimation Network: A lightweight network that analyzes the input image and extracts domain features; Parameter generation network: maps domain features to convolutional kernel parameters; Dynamic convolution operation unit: Performs convolution operation using generated parameters.
[0053] Differences from existing structures: The parameters of traditional convolutional layers remain fixed after training, while The parameters can change during each inference, which allows it to adapt to the domain characteristics of different input images.
[0054] A domain feature estimation network is a small convolutional neural network, typically containing 2-3 convolutional layers and fully connected layers. Its input is the original image or shallow features, and its output is a domain feature vector.
[0055] Dynamically generated convolution kernel parameters (parameters) Specifically, it includes: Weight parameters, number of output channels, number of input channels, height and width of the convolution kernel (usually 3×3), bias parameters, etc.
[0056] These parameters are generated in real time by a parameter generation network based on the domain feature vector.
[0057] The process of generating convolution kernel parameters includes: Extracting domain features: Domain feature estimation network analyzes the input image. Output domain feature vector Generate convolution parameters: The parameter generation network (usually a fully connected layer) will Mapped to convolution kernel parameters: =ParameterNet( ) Perform adaptive convolution: Use the generated right Perform convolution operations: Where (i,j) is the spatial location and k is the output channel index.
[0058] m and n represent the offset indices in the height (vertical) and width (horizontal) directions, respectively.
[0059] The essence of adjustment: convolution kernel parameters Become features of the input image domain The function can therefore adaptively adjust the feature extraction method for different domain characteristics (lighting, texture, etc.).
[0060] Preferably, the adaptive feature map is decoupled to obtain content features and domain features, including: The adaptive feature map is processed using a feature decoupling encoder to obtain content feature vectors and domain feature vectors; During the decoupling process, a mutual information loss function is used to constrain the decoupling process, and a feature reconstruction decoder is used to constrain the reconstruction loss.
[0061] Specifically, feature decoupling encoder Decompose the features into two parts: in: Content feature vector, which encodes information related to defects; : Domain feature vectors, encoding environmental information such as lighting, texture, and background; Content feature dimension; : Domain feature dimension.
[0062] The feature decoupling encoder E is not an existing standard encoder, but a network structure specifically designed to achieve feature decoupling.
[0063] The feature decoupling encoder E consists of a backbone network and branch networks; The backbone network consists of convolutional layers (Conv3×3) and batch normalization layers; Convolutional layers are used for Perform convolution processing and output the result to the batch normalization layer; The batch normalization layer is used to process the output of the convolutional layer and output the result to the activation function (ReLU) to obtain the feature map Fshare; The branch network includes a first branch network and a second branch network; The first branch network is used to sequentially perform convolution (Conv1×1) and global average pooling on the content features in Fshare, and then input the result of the global average pooling into a fully connected layer to obtain the content feature vector. ; The second branch network is used to sequentially perform convolution (Conv1×1) and global average pooling on the domain features in Fshare, and then input the result of the global average pooling into a fully connected layer to obtain the domain feature vector. .
[0064] The two branch networks start from a shared feature map Fshare and learn to decompose the features into two independent subspaces through different 1×1 convolutional and fully connected layers. Subsequent mutual information minimization constraints ensure... and Encode different types of information separately.
[0065] To ensure the separation of content features and domain features, a mutual information minimization constraint is introduced: in This represents mutual information, and the loss is minimized through adversarial learning techniques.
[0066] This is commonly referred to as mutual information minimization loss or feature decoupling loss. In the adversarial learning framework, it manifests as an adversarial loss of the encoder relative to the discriminator.
[0067] Adversarial learning framework: It employs the idea of Generative Adversarial Networks (GANs) to minimize mutual information, specifically comprising two components: Discriminator A binary classification neural network, with input being ( , The goal is to determine whether the two features come from the same image.
[0068] If they come from the same image, the discriminator output should be close to 1; If the pairings are random, the discriminator output should be close to 0; Encoder E (Feature Decoupling Encoder): The goal is to generate feature pairs that the discriminator cannot correctly identify.
[0069] Training process: Step 1, Training the discriminator: Fix the encoder E, and train the discriminator. Distinguishing between real pairs and random pairs Step 2, Train the encoder: Fix the discriminator The encoder E is trained to generate feature pairs that can deceive the discriminator; Step 3, Alternate Training: Repeat steps 1 and 2 until the feature pairs generated by the encoder are... and Minimize mutual information.
[0070] Loss function form: Discriminator loss: =-E[logD( , )]-E[log(1-D( t, '))];Encoder loss: =-E[log(1-D( ))]; in 'These are domain features derived from different images.
[0071] Through feature reconstruction decoder Verify the decoupling effect: Calculate the reconstruction loss: Output: Decoupled content characteristics and domain features .
[0072] Feature reconstruction decoder D is based on decoupled features ( , The reconstructed feature map; Yes Approximate reconstruction. If the feature decoupling process does not lose important information, then Should with As similar as possible.
[0073] It is a mapping process that returns the decoupled feature space to the original feature space, and the feature map is reconstructed through a series of upsampling and convolution operations.
[0074] Preferably, attention-enhanced feature maps are generated based on content features and domain features, including: S20, reshape the content feature vector into a content feature map: in: , The height and width of the feature map; The number of channels in the feature map; The reshape operation changes the dimensional arrangement of data without altering the total number of elements or the numerical content. Specifically, in this invention: enter: It is a one-dimensional vector with shape (Dc,), where Dc is the dimension of the content feature; Output: It is a three-dimensional tensor with shape (h, w, c); Transformation relationship: Reshape: → ; The condition Dc = h × w × c must be satisfied, meaning the total number of elements remains unchanged before and after reshaping.
[0075] Specific implementation method: Determine the target shape: Predetermine the values of h, w, and c based on the network design; Rearrange: The Dc elements are filled into the h×w×c array in row-major order; Dimensional Adjustment: Adjusts the filled array into a three-dimensional tensor.
[0076] Example: If Given a one-dimensional vector containing 256 elements, and a target shape of 8×8×4, then: h=8 (feature map height); w=8 (feature map width); c=4 (number of feature map channels).
[0077] Verification: 8×8×4=256=Dc.
[0078] S21, Generate adaptive attention weights based on domain feature vectors: in: Learnable weight matrix; Bias vector; :sigmoid activation function; , and These represent the importance weights of spatial attention and channel attention, respectively.
[0079] and How to obtain and the range of values: How to obtain: Linear transformation: First, the domain features are transformed. A linear transformation is performed using the weight matrix W: u = W· +b∈ℝ 2 Where u=[ , ]ᵀ is the original fraction.
[0080] Sigmoid activation: Apply the Sigmoid function to each element of u: =σ( )=1 / (1+exp(- )), =σ( )=1 / (1+exp(- )); Value range: Since the output range of the Sigmoid function is (0,1), therefore: ∈(0,1); ∈(0,1).
[0081] when When the value approaches 1, spatial attention mechanisms become dominant; when When the value approaches 1, the channel attention mechanism becomes dominant; When both are close to 0.5, the two attention mechanisms contribute in a balanced way.
[0082] S22, Obtain spatial attention map and channel attention map based on content feature map: Spatial attention map :right Average pooling and max pooling are performed along the channel dimension, and the result is generated by convolutional layers after concatenation. Channel attention map :right Global average pooling and global max pooling are performed, generated through a shared fully connected layer.
[0083] Spatial attention map The calculation method is as follows: Calculation steps: Pooling along the channel dimension: Average pooling: Favg = Mean( ,dim=c)∈ ; Max pooling: Fmax = Max( ,dim=c)∈ ; Where dim=c indicates that the operation is performed along the channel dimension (the third dimension).
[0084] Feature concatenation: Fpooled = Concat(Fav, Fmax) ∈ By concatenating the features along the channel dimension, we obtain feature maps for two channels.
[0085] Convolution generates attention maps: =Conv_7×7(Fpooled)∈ Spatial information is fused using 7×7 convolution kernels.
[0086] Sigmoid activation: =σ( ')∈ ; The Sigmoid function restricts the value to the range (0,1).
[0087] This is a spatial attention map, showing the value at each spatial location (i,j). =[i,j]∈(0,1) represents the importance weight of that position.
[0088] Channel attention map The calculation method is as follows: Calculation steps: Global pooling: Global average pooling: zavg = GlobalAvgPool( )∈ ;c indicates The number of channels; Global max pooling: zmax = GlobalMaxPool( )∈ ; Shared fully connected layer processing: Average branch: zavg' = FCshared(zavg) ∈ ; Maximum branch: zmax'=FC_shared(zmax)∈ ; where r is the reduction ratio (usually 16), and FCshared indicates a fully connected layer where two branches share parameters.
[0089] Activation and merging: z'=ReLU(zavg'+zmax')∈ ; The second fully connected layer: '=FC2(z')∈ ; Sigmoid activation: =σ( ')∈ ; It is a channel attention vector, where k is the value of each channel. [k]∈(0,1) represents the importance weight of the channel.
[0090] S23, use adaptive attention weights to fuse the spatial attention map and the channel attention map to obtain an attention-enhanced feature map: This represents element-wise multiplication. (Attention-enhanced feature map) .
[0091] Preferably, multi-scale recognition is performed on the attention-enhanced feature map to obtain the final detection result, including: S30: Perform pre-defined pooling operations at multiple scales on the attention-enhanced feature map to obtain feature maps at multiple scales. right Pooling operations at different scales are performed to obtain feature maps of multiple resolutions, forming a feature pyramid.
[0092] Typical scale settings: set up The original dimensions are h×w×c, and common multi-scale settings include: Original scale: h×w×c (without pooling); 1 / 2 scale: h / 2×w / 2×c (using 2×2 pooling, step size 2); 1 / 4 scale: h / 4×w / 4×c (using 4×4 pooling, stride 4); 1 / 8 scale: h / 8×w / 8×c (using 8×8 pooling with a stride of 8; Pooling operations: Max pooling or average pooling is typically used, with the pooling window size equal to the stride to ensure no overlap.
[0093] S31, perform the preset detection task on the feature map at each scale respectively, and obtain the detection results on the feature map at each scale: For example, the following tasks can be performed in parallel at each scale: a. Defect Classification: Predicting whether defects exist and their types in each spatial location. in This represents the category probability distribution.
[0094] Attention-enhanced feature maps at specific scales; corresponding scale outputs from multi-scale feature pyramids; The classification weight matrix contains learnable parameters, which are learned through training. Initially randomized, the parameters are optimized during training using gradient descent.
[0095] The classification bias vector is a learnable parameter that is learned through training and is usually initially set as a zero vector.
[0096] b. Bounding box regression: Predicting the location and size of defects: .
[0097] Regress stands for bounding box regression, which is a mapping function from feature maps to bounding box parameters.
[0098] Regression is typically implemented using a small convolutional neural network: enter: (hs×ws×c); Convolutional layer 1: Conv3×3 → Output feature map (hs×ws×creg); creg is the number of channels in the output of convolutional layer 1; Convolutional layer 2: Conv1×1 → Output feature map (hs×ws×4); Remodeling: Assign the last four channels to x, y, w, and h respectively; Output: Bpred(hs×ws×4), predicting a bounding box for each spatial location.
[0099] x represents the horizontal coordinate offset of the center point of the bounding box, which is usually normalized to the range of [0,1], indicating the position of the center of the bounding box in the horizontal direction.
[0100] y represents the ordinate offset of the bounding box center point. It is usually normalized to the range [0,1]. represents the vertical position of the bounding box center.
[0101] w represents the width of the bounding box, which is the ratio of the bounding box width to the feature map width.
[0102] h represents the height of the bounding box, and h represents the ratio of the bounding box height to the feature map height.
[0103] S32, fuse the detection results of feature maps at all scales to obtain the final detection result: a set of defect bounding boxes. Each bounding box contains position and size information; N: The total number of defects detected, a non-negative integer; The bounding box of the i-th defect is usually represented as =[ , , , ]; B: The set of all detected defect bounding boxes Defect Category Set , , Number of defect categories; : The category label of the i-th defect; ∈{1,2,...,K} indicates that there are K types of defects.
[0104] For example: 1 = hole, 2 = stain, 3 = color difference, 4 = misalignment of warp and weft threads, etc. Detection confidence set : Detection confidence of the i-th defect.
[0105] Preferably, the training process of the recognition module includes: S40, train the recognition module on the publicly available training set and initialize the parameters in the recognition module; For example, weights pre-trained on ImageNet can be used to initialize parameters. These weights come from publicly available pre-trained models, such as VGG, ResNet, and EfficientNet, which were trained on ImageNet.
[0106] S41, Freeze the parameters of other units, train the recognition module using the labeled dataset, and adjust only the parameters of the recognition unit during the training process; Annotated dataset: This refers to a dataset specifically built for the task of detecting defects in inflatable fabric printing. The images contain the location and category annotations (such as bounding boxes and category labels) of the defect regions, which are used for task adaptation training of the model.
[0107] S42, the recognition module is trained using the labeled dataset, and the parameters of all units are adjusted during the training process.
[0108] The training process described above first initializes the model on a large public dataset (such as ImageNet), enabling it to acquire general visual feature extraction capabilities and avoiding the problem of getting stuck in local optima or failing to converge on limited defect data when training from scratch. Then, complex modules such as feature extraction and decoupling are frozen, and only relatively simple recognition units are trained, quickly adapting the detection head to new tasks. Finally, fine-tuning of all parameters is performed. This strategy significantly reduces the training difficulty and accelerates the convergence process.
[0109] Acquiring specialized labeled data for textile defects is costly and limited in scale. Training the entire complex network directly with a small amount of data can easily lead to overfitting. This method adjusts the final layer only with a small amount of data in the second stage, preserving the general feature representations learned from massive amounts of publicly available data in the front end, thus ensuring the model's learning efficiency and generalization potential under limited specialized data.
[0110] Specifically, in S42, the loss function is: in: For detection loss (this loss is used alone during training in S41). This is the domain-adaptive loss.
[0111] arrive These are the weights for each loss function.
[0112] Detection loss Typically, classification loss and bounding box regression loss are combined, for example: in For cross-entropy loss, For SmoothL1 loss. t represents... The weight.
[0113] This is a normalized value representing the distance between the centers of the true bounding box and the predicted bounding box.
[0114] In the defect identification system of the present invention, cross-entropy loss is used for defect classification tasks, that is, to determine whether there is a defect and its specific category (such as hole, stain, color difference, etc.) at each spatial location.
[0115] Assuming there is a total A defect category (including the "no defect" category) refers to a spatial location on a feature map. Its classification prediction probability distribution is as follows: in ,and The actual label for this location is It is usually a one-hot vector (e.g.) (This represents type 3 defects). The cross-entropy loss is calculated as follows: The total classification loss over the entire feature map if the feature map size is The total classification loss is the average of the losses across all spatial locations: During training, this loss is used to optimize the classification weights. and bias This ensures that the model can accurately identify different categories of defects.
[0116] Domain Adaptive Loss The parameter generation process for constrained domain adaptive convolutional layers can be achieved through domain classification loss or feature distribution alignment loss, for example: in For discriminator, Features from different domains.
[0117] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A defect identification system for printed patterns on inflatable fabrics, characterized in that, It includes an image acquisition module, a preprocessing module, and a recognition module; The image acquisition module is used to acquire surface images of the inflatable fabric containing printed patterns; The preprocessing module is used to preprocess the surface image to obtain a preprocessed image; The recognition module is used to input the preprocessed image into the pre-trained recognition model for detection and obtain the detection result. The recognition model first obtains an adaptive feature map based on the preprocessed image, then decouples the adaptive feature map to obtain content features and domain features, then generates an attention-enhanced feature map based on the content features and domain features, and finally performs multi-scale recognition on the attention-enhanced feature map to obtain the final detection result.
2. The defect identification system for printed patterns on inflatable fabric according to claim 1, characterized in that, The surface image is preprocessed to obtain a preprocessed image, including: The surface image is denoised to obtain a preprocessed image.
3. The defect identification system for printed patterns on inflatable fabric according to claim 2, characterized in that, The surface image is denoised to obtain a preprocessed image, including: The surface image is denoised according to the red, green and blue components in the RGB color space, respectively, to obtain the denoised red component image, green component image and blue component image. The denoised red, green, and blue component images are fused to obtain a preprocessed image.
4. The defect identification system for printed patterns on inflatable fabric according to claim 2, characterized in that, The surface image is denoised to obtain a preprocessed image, including: The surface image is denoised using a wavelet denoising algorithm to obtain a preprocessed image.
5. The defect identification system for printed patterns on inflatable fabric according to claim 1, characterized in that, The recognition module includes an extraction unit, a decoupling unit, a generation unit, and a recognition unit; The extraction unit is used to obtain adaptive feature maps based on the preprocessed image; The decoupling unit is used to decouple the adaptive feature map to obtain content features and domain features; The generation unit is used to generate attention-enhanced feature maps based on content features and domain features; The recognition unit is used to perform multi-scale recognition on the attention-enhanced feature map to obtain the final detection result.
6. The defect identification system for printed patterns on inflatable fabric according to claim 1, characterized in that, Adaptive feature maps are obtained from preprocessed images, including: S10, input the preprocessed image into a preset feature extraction network of multiple scales for feature extraction to obtain feature information at multiple scales; S11, concatenates feature information from multiple scales along the channel dimension to obtain concatenated features; S12 uses a domain-adaptive convolutional layer to process the concatenated features and obtain an adaptive feature map.
7. The defect identification system for printed patterns on inflatable fabric according to claim 1, characterized in that, Decoupling the adaptive feature map yields content features and domain features, including: The adaptive feature map is processed using a feature decoupling encoder to obtain content feature vectors and domain feature vectors; During the decoupling process, a mutual information loss function is used to constrain the decoupling process, and a feature reconstruction decoder is used to constrain the reconstruction loss.
8. The defect identification system for printed patterns on inflatable fabric according to claim 1, characterized in that, Attention-enhanced feature maps are generated based on content features and domain features, including: S20, reshape the content feature vector into a content feature map; S21, Generate adaptive attention weights based on domain feature vectors; S22, Obtain spatial attention map and channel attention map based on content feature map; S23, use adaptive attention weights to fuse the spatial attention map and the channel attention map to obtain an attention-enhanced feature map.
9. A defect identification system for printed patterns on inflatable fabrics according to claim 1, characterized in that, Multi-scale recognition is performed on the attention-enhanced feature maps to obtain the final detection results, including: S30: Perform pooling operations at multiple scales on the attention-enhanced feature map to obtain feature maps at multiple scales; S31, Perform the preset detection task on the feature map at each scale respectively, and obtain the detection result of the feature map at each scale; S32 fuses the detection results of feature maps at all scales to obtain the final detection result.
10. A defect identification system for printed patterns on inflatable fabric according to claim 5, characterized in that, The training process for the recognition module includes: S40, train the recognition module on the existing training set and initialize the parameters in the recognition module; S41, Freeze the parameters of other units, train the recognition module using the labeled dataset, and adjust only the parameters of the recognition unit during the training process; S42, the recognition module is trained using the labeled dataset, and the parameters of all units are adjusted during the training process.