Fabric Defect Detection and Traceability System Based on Edge Computing and Computational Power Scheduling
The fabric defect detection and traceability system, which utilizes edge computing and computing power scheduling, enables efficient identification and traceability of fabric defects. This solves the problems of limited data and delayed feedback in existing systems, and improves the real-time performance and intelligent management of textile production.
Patent Information
- Application Number
- CN202511247312.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-03
AI Technical Summary
Existing textile fabric defect detection systems suffer from problems such as limited data dimensions, separation of detection and traceability, poor model adaptability, and delayed optimization feedback. They struggle to identify minute defect features coupled with material properties and lack the ability to adjust production processes in real time.
A fabric defect detection and traceability system based on edge computing and computing power scheduling is adopted. Data is collected synchronously through multispectral imaging equipment and process parameter sensors. A multimodal feature tensor is constructed by combining a timestamp alignment mechanism. An unsupervised contrastive learning algorithm is used to extract texture patterns, establish a material-adaptive texture dictionary model, and traceability analysis is carried out through a causal inference network. A reinforcement learning-driven process optimization mechanism is introduced.
It enables multimodal synchronous analysis of fabric images and process parameters, improves the ability to model subtle texture differences in different fabric materials, enhances the accuracy of defect identification, and improves the timeliness and intelligence of quality response by optimizing production parameters through real-time causal graphs.
Smart Images

Figure CN120726057B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data management system technology, and in particular to a fabric defect detection and traceability system based on edge computing and computing power scheduling. Background Technology
[0002] In existing technologies, defect detection in textile fabrics mainly relies on manual visual inspection or offline inspection systems based on image processing. Some automated solutions combine computer vision and machine learning technologies, enabling preliminary identification and classification of common defects. Meanwhile, industrial production lines are gradually introducing various sensors to monitor loom status, process parameters, and environmental conditions to improve process controllability and product consistency.
[0003] However, existing detection systems generally suffer from problems such as limited data dimensions, separation of detection and traceability, poor model adaptability, and delayed optimization feedback. On the one hand, there is a lack of unified modeling and synchronous analysis between image data and production process parameters, making it difficult to identify minute defect features coupled with materials. On the other hand, defect detection results often cannot be used to deduce the causes, lack an interpretable analysis mechanism for equipment or environmental factors, and cannot adjust production processes in real time, resulting in delayed quality control response and low efficiency.
[0004] To address the aforementioned issues, there is an urgent need to construct a data-driven intelligent quality management system that is designed for complex production environments and possesses traceability and feedback adjustment capabilities. Summary of the Invention
[0005] This application provides a fabric defect detection and traceability system based on edge computing and computing power scheduling to reduce the compliance management costs of grassroots power supply enterprises.
[0006] This application provides a fabric defect detection and traceability system based on edge computing and computing power scheduling, including:
[0007] The acquisition unit is used to deploy multispectral imaging equipment and process parameter sensors on the textile production line to acquire fabric surface image data and process parameters, respectively. The images and process parameters are time-stamped and aligned through a time synchronization mechanism to construct a multimodal feature tensor dataset corresponding to a unit area of the fabric. An edge computing terminal is configured to perform local preprocessing on the acquired data and dynamically schedule and allocate edge computing resources according to the current data load, the available computing power of the terminal, and the task priority to ensure the real-time performance and stability of the data preprocessing and uploading process.
[0008] The modeling unit receives the multimodal feature tensor dataset output by the acquisition unit, combines it with the fabric material, extracts typical texture patterns through an unsupervised contrastive learning algorithm, establishes an adaptive texture dictionary model for the fabric material, and generates the corresponding texture latent fingerprint vector.
[0009] The detection unit is used to input the potential fingerprint vector output by the modeling unit into a lightweight target detection network with a channel attention mechanism, and output the location coordinates of the suspected defect, the defect type and the severity score.
[0010] The tracing unit is used to trace back the sequence of equipment and environmental parameters within the corresponding time window based on the defect information output by the detection unit, and to analyze the causal weight relationship between each parameter and the identified defect using a time-series causal inference network to construct a causal graph of the defect parameters.
[0011] The optimization unit is used to calculate the defect risk index based on the causal graph and severity score generated by the tracing unit, output the corresponding process optimization vector based on the reinforcement learning model, and display the defect risk status, tracing graph and optimization suggestions through the Web interface. At the same time, the process optimization vector is sent to the edge controller to adjust the production parameters in real time.
[0012] This application has the following beneficial technical effects:
[0013] (1) Multimodal synchronous acquisition and fusion analysis of fabric images and process parameters were realized. Through timestamp alignment mechanism and feature tensor construction, the system can accurately establish the correspondence between fabric unit area and production process, providing a reliable data foundation for subsequent modeling and traceability. (2) A material-adaptive texture modeling method was proposed. Combined with unsupervised contrastive learning and latent fingerprint vector generation mechanism, the system's ability to model subtle texture differences of different fabric materials was effectively improved, thereby enhancing the accuracy of identifying rare or complex defects. (3) Causal reasoning network was integrated to realize interpretable traceability analysis between defects and equipment conditions. By constructing a defect parameter causal graph, the influence path of equipment abnormality on defect formation was clarified, providing a quantitative basis for problem localization and quality management. (4) A reinforcement learning-driven process optimization mechanism was introduced. The parameter adjustment suggestions can be dynamically output according to the real-time defect risk index, and the optimization results can be fed back to the edge controller to build a closed-loop quality control system, which effectively improves the timeliness and intelligence level of quality response. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of a fabric defect detection and traceability system based on edge computing and computing power scheduling provided in the first embodiment of this application. Detailed Implementation
[0015] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0016] The first embodiment of this application provides a fabric defect detection and traceability system based on edge computing and computing power scheduling. Please refer to... Figure 1 This figure is a schematic diagram of the first embodiment of this application. The following is in conjunction with... Figure 1 The first embodiment of this application provides a detailed description of a fabric defect detection and traceability system based on edge computing and computing power scheduling.
[0017] The fabric defect detection and traceability system based on edge computing and computing power scheduling includes a data acquisition unit 101, a modeling unit 102, a detection unit 103, a traceability unit 104, and an optimization unit 105.
[0018] The acquisition unit 101 is used to deploy multispectral imaging equipment and process parameter sensors on the textile production line to acquire fabric surface image data as well as loom speed, roll pressure, tension, temperature and humidity. The images are then time-stamped with the process parameters through a time synchronization mechanism to construct a multimodal feature tensor dataset corresponding to a unit area of the fabric.
[0019] The acquisition unit 101 provides the basic raw data input for the entire system. Its structure and operation must ensure the temporal correspondence and physical consistency between image information and process parameters, thereby enabling downstream analysis units to effectively utilize the data. Specifically, the acquisition unit 101 deploys sensing and imaging equipment at multiple key nodes in the textile production line, mainly including industrial-grade multispectral cameras, high-precision loom status sensors, tension sensors, roll pressure sensors, and ambient temperature and humidity sensors. The multispectral camera is selected to include at least the visible light and near-infrared bands, with a resolution of less than 0.1 mm per pixel to ensure imaging accuracy for minute changes such as fabric texture and weaving defects. The camera should be installed vertically above the fabric running direction, and a synchronization trigger should be used to ensure that the image frame is consistent with the fabric movement rhythm, avoiding image ghosting or misalignment. To capture the process background corresponding to the same fabric area, sensors such as tension, pressure, and rotation speed should be deployed in positions adjacent to the imaging area in the time series and have millisecond-level sampling accuracy.
[0020] Each sensor and camera data acquisition unit is connected to the edge computing module via an edge acquisition node, which integrates time synchronization processing logic. Specifically, a unified clock synchronization mechanism is configured for all acquisition devices. It is recommended to use a time synchronization system based on the IEEE 1588 Precision Time Protocol (PTP) or GNSS to ensure that all types of data have a unified timestamp identifier. Simultaneously with the acquisition of a frame of image data by the imaging device, the system automatically queries the parameter values acquired by various process sensors within the surrounding time period. To avoid data offset caused by different sampling frequencies, the system uses a sliding window interpolation method for time alignment. For example, extending the time period forward and backward by ±0.1 seconds from the image acquisition time, linear interpolation or cubic spline interpolation is performed on continuous tension, rotation speed, and other curves within this interval to obtain a set of process parameters strictly aligned with the image frame.
[0021] After data alignment, the acquisition unit 101 combines each frame of image and its corresponding multidimensional parameters into a fabric unit region data block. This data block contains image channels (such as RGB or multispectral channels) and process feature channels (such as loom speed, tension, temperature, etc.). The data dimension is a three-dimensional tensor: [image pixel height × image pixel width × number of channels], where the number of channels includes the original image channels and the corresponding process parameter channels. To adapt to subsequent modeling and deep network input, the acquisition unit also needs to perform standardization processing on all image data, including illumination normalization (e.g., using histogram equalization or Retinex algorithm), size unification (e.g., adjusting to a fixed 256×256 or 512×512 pixel size), and zero-mean normalization or min-max scaling processing on all process parameters to eliminate dimensional differences.
[0022] After standardization, the fabric unit area data block, along with its time tag and acquisition location tag, will be packaged and encapsulated in a unified tensor format within the acquisition unit 101. The acquisition unit 101 is further configured with an edge computing terminal for local preprocessing of the raw image data and process parameter data during the data acquisition phase. Specifically, the edge computing terminal dynamically executes computing power scheduling and resource allocation strategies based on the currently acquired data load, its own available computing power, and the priority of each task, prioritizing the real-time performance of critical tasks such as data time synchronization processing, image standardization processing, and process parameter interpolation processing. When the system detects a data traffic peak or a shortage of computing resources, the edge computing terminal can delay or shift non-critical processing flows according to the set task priorities, effectively avoiding data processing delays or communication bottlenecks. This ensures that the multimodal feature tensor dataset corresponding to the fabric unit area can be preprocessed and encapsulated within a specified time and stably output to the subsequent modeling unit 102. The fabric unit area data block, after being processed by the edge computing terminal, will be uploaded to a cloud data center or local AI server via a high-speed edge bus or 5G industrial communication module, serving as the input data source for the modeling unit 102. By introducing edge computing and dynamic computing power scheduling mechanisms during the acquisition phase, this system can improve the response speed and resource utilization efficiency of the data processing link, further enhancing real-time perception capabilities and data quality assurance levels in complex production environments. Through the integrated data acquisition and edge preprocessing process described above, the acquisition unit 101 not only completes high-quality raw data perception but also achieves structured fusion of image data and complex process parameters, constructing a high-dimensional, strongly correlated multimodal feature tensor that supports deep learning processing and causal modeling analysis. This provides a solid and stable data foundation for subsequent modeling, detection, tracing, and optimization of the system.
[0023] Furthermore, in the process of constructing the multimodal feature tensor dataset corresponding to the fabric unit area, the acquisition unit adopts a channel expansion mechanism based on local region process parameter mapping. The equipment and environmental parameter data consisting of tension, loom speed, roll pressure, temperature and humidity are broadcast in space and filled with region alignment using the multispectral image channel acquired at the current sampling time as a spatial reference template, forming a process parameter channel with spatial consistency.
[0024] The channel expansion mechanism includes: embedding the average value and fluctuation amplitude of continuous process parameters within a sampling period as a two-dimensional array into the channel, and expanding the parameter values into a matrix representation consistent with the image channel space size through affine interpolation or convolution smoothing, mapping it to the additional channel dimension of the tensor.
[0025] During system operation, the acquisition unit is deployed at the actual location on the textile production line, synchronously acquiring two types of core data in real time: first, image information of the fabric surface, captured by multispectral imaging equipment, including multiple frequency bands such as visible light channels and near-infrared channels; second, equipment and environmental parameters during the process, including tension, loom speed, roll pressure, temperature, and humidity, which are continuously recorded by sensors installed on the production equipment. The system is required not only to synchronously acquire these two types of data, but also to uniformly construct them into a multimodal tensor with consistent structure, coordinates, and channel arrangement, which will be used as input for subsequent modeling units.
[0026] Because image data inherently possesses a two-dimensional spatial structure with clear channel dimensions (e.g., RGB or multispectral extended channels), while process parameter data is originally in time series or scalar form and lacks spatial information, a channel extension mechanism must be used to align and map the process parameters to the image spatial structure. The specific implementation method is as follows.
[0027] At each image frame acquisition moment, the system records the raw values of all process parameters at the current time point while the image sensor completes exposure sampling. For each continuous process parameter, the system does not directly use its instantaneous value, but instead takes a window centered on the current image sampling time and covering the entire sampling period to calculate the average value and fluctuation range (such as standard deviation, range, or variance) of the parameter within that period. The purpose of this is to introduce some temporal background information, thereby improving the stability of parameter characterization and reducing the impact of accidental disturbances on subsequent analysis results.
[0028] Next, the system maps the average value and fluctuation amplitude of each parameter into a two-dimensional matrix. This step is typically achieved through a broadcast mechanism, which copies and expands a single scalar value into a matrix with the same spatial size as the current image frame (e.g., 512×512), making the parameter a "quasi-image channel" with spatial dimensions. To avoid problems such as edge discontinuity and center aggregation caused by hard copying, the system further introduces affine interpolation or convolutional smoothing methods during the expansion process, so that the parameter distribution forms a gradual or continuous diffusion pattern in space. Specifically, Gaussian convolution kernels or local window averaging algorithms can be used to simulate the gradual distribution trend of the process parameter within the actual fabric area.
[0029] All processed process parameter channels will be appended to the image data tensor as additional channel dimensions in a preset order. For example, if the original image has 6 multispectral channels, and the 5 process parameters expand to form 10 channels (mean value + fluctuation value), the final generated tensor will have 16 channels, and its spatial dimension will be the same as the original. Figure 1 For example, 512×512, the data structure is a three-dimensional tensor in a uniform format.
[0030] Through the above processing, each multimodal feature tensor output by the acquisition unit simultaneously possesses an image texture channel and a spatially bound process parameter channel, and this structure is constructed based on the fabric unit region as the spatial reference. Since the process parameter values have been aligned pixel-by-pixel in the tensor, the modeling unit can directly utilize deep neural networks to jointly model the image texture features and equipment status features when receiving this input, uncovering their potential correlations, without needing to separately handle the alignment problem of heterogeneous inputs. This structure not only improves the model's ability to express complex fabric texture changes but also significantly enhances the system's stable recognition capability when facing process disturbances (such as instantaneous tension fluctuations, drastic temperature and humidity changes, etc.), effectively reducing the false detection rate and false negative rate, and improving the overall recognition accuracy.
[0031] Modeling unit 102 is used to receive the multimodal feature tensor dataset output by the acquisition unit, combine it with the fabric material, extract typical texture patterns through unsupervised contrastive learning algorithm, establish a texture dictionary model that is adaptive to the fabric material, and generate the corresponding texture latent fingerprint vector.
[0032] The main function of the modeling unit 102 is to construct a unified and highly distinguishable texture representation based on the image and process information of each fabric sample, as well as its corresponding fabric material label, after the system receives the multimodal feature tensor dataset output by the acquisition unit 101. This provides a high-quality input feature representation for subsequent defect detection and tracing. To achieve this goal, the modeling unit needs to complete a series of rigorous and specific data processing and feature learning processes, and finally output a "texture latent fingerprint vector" that corresponds one-to-one with each fabric unit region.
[0033] First, the modeling unit receives a standardized multimodal tensor dataset from the acquisition unit as input. Each sample of this tensor data represents a small area of fabric, and its structure is a fixed-size three-dimensional tensor, for example, with 12 channels and an image size of 512×512 pixels. These channels include image data from multispectral imaging devices (e.g., RGB and near-infrared channels) as well as production parameters from process sensors, such as tension, loom speed, roll pressure, and temperature and humidity, and their statistical characteristics (e.g., mean and standard deviation). To maintain consistency, these parameters are aligned to a time window matching the image data during the acquisition phase using a time synchronization mechanism, and are populated to a spatial dimension consistent with the image tensor through channel expansion or broadcasting mechanisms, so that the image channels and process parameter channels constitute a unified data input structure.
[0034] Upon receiving this data, the modeling unit first categorizes and groups each sample based on its material label. For example, cotton, polyester, and silk are grouped into different datasets. This is done to enable subsequent feature modeling processes to be trained and optimized specifically for the texture patterns of various fabric materials, avoiding a decrease in discriminative power caused by texture confusion between different materials.
[0035] After grouping, the system performs feature learning on each group of sample data based on an unsupervised contrastive learning algorithm. Contrastive learning refers to constructing "similar" and "dissimilar" relationships between samples without manually labeling categories, guiding the neural network to learn to compress the distance between similar textures and widen the distance between dissimilar textures in the feature space. The modeling unit generates multiple different versions of tensor samples from the same image region through random augmentation. Sample pairs obtained through rotation, cropping, adding noise, or brightness perturbation are considered "similar pairs," while sample pairs sampled from different fabrics or materials are considered "dissimilar pairs." These sample pairs are input into a shared deep feature extraction network, which typically employs a lightweight convolutional neural network structure, such as an encoder containing two layers of convolution, non-linear activation, and pooling, whose output is a vector representation of a uniform dimension (e.g., 256-dimensional). During training, the network optimizes the objective function to minimize the vector distance between "similar pairs" in the output space and maximize the distance between "dissimilar pairs," thereby constructing a material-sensitive texture representation space.
[0036] After training, the network is capable of extracting significant features reflecting the material, structure, and texture of any fabric tensor. The modeling unit then uses this trained network to perform forward inference on each sample tensor in the system. For each sample tensor, the network outputs a fixed-length vector, called the "texture latent fingerprint vector." This vector is a compact representation of the texture features of a unit region of the fabric, including its microstructural variations, material properties, and indirectly embedded process background, exhibiting high discriminability and comparability.
[0037] To enhance the system's adaptability to different materials and its generalization ability to downstream tasks, the modeling unit also constructs a set of typical "texture centers" and forms a "texture dictionary model" based on the feature vector distribution of each material class during training. This dictionary is not a direct output of the modeling unit, but an internal reference structure used to constrain the aggregation structure of the feature space. The generation of fingerprint vectors does not depend on the dictionary lookup process, but is obtained by directly encoding the original tensor by the feature extraction network.
[0038] Ultimately, the output of the modeling unit is a structured set of latent texture fingerprint vectors, with each fingerprint vector corresponding one-to-one with a fabric sample. Each fingerprint vector not only contains a high-dimensional texture representation but also includes its corresponding material label, image location coordinates, and time label, all uniformly transmitted to the detection unit 103 in a dictionary or vector list structure. Through the above process, the modeling unit 102 completes the transformation from the original image and process parameter tensors to unified, standardized, and comparable fingerprint vectors, providing a core foundation for subsequent high-precision defect detection and anomaly recognition based on texture deviation.
[0039] The following is a reference implementation code for the modeling unit:
[0040] import torch
[0041] import torch.nn as nn
[0042] import torch.nn.functional as F
[0043] from torchvision import transforms
[0044] from sklearn.cluster import KMeans
[0045] from collections import defaultdict
[0046] import random
[0047] # Define a fabric sample class, where each sample contains tensor data and related information.
[0048] class FabricSample:
[0049] def __init__(self, tensor, material_label, timestamp, position):
[0050] self.tensor = tensor # Multimodal tensor [12, 512, 512]
[0051] self.material = material_label # Fabric material type, such as 'cotton'
[0052] self.timestamp = timestamp # Collect timestamp
[0053] self.position = position # Image region coordinates (row, column)
[0054] # Lightweight convolutional neural network for feature extraction
[0055] class TextureEncoder(nn.Module):
[0056] def __init__(self, in_channels=12, out_dim=256):
[0057] super().__init__()
[0058] self.conv = nn.Sequential(
[0059] nn.Conv2d(in_channels, 32, 3, padding=1),
[0060] nn.ReLU(),
[0061] nn.MaxPool2d(2),
[0062] nn.Conv2d(32, 64, 3, padding=1),
[0063] nn.ReLU(),
[0064] nn.AdaptiveAvgPool2d((1, 1)) # Global pooling to obtain a generalized representation of the texture. )
[0066] self.fc = nn.Linear(64, out_dim) # Output the latent fingerprint vector
[0067] def forward(self, x):
[0068] x = self.conv(x)
[0069] x = x.view(x.size(0), -1)
[0070] return self.fc(x)
[0071] # Data augmentation function: Constructing "similar pairs"
[0072] def augment_tensor(tensor):
[0073] noise = torch.randn_like(tensor) * 0.05 # Add micro-noise to simulate changes in operating conditions
[0074] return tensor + noise
[0075] # Grouping samples by material
[0076] def group_by_material(samples):
[0077] grouped = defaultdict(list)
[0078] for s in samples:
[0079] grouped[s.material].append(s)
[0080] return grouped
[0081] # Unsupervised contrastive learning training function
[0082] def train_encoder_contrastive(model, samples, optimizer, epochs=10):
[0083] model.train()
[0084] for _ in range(epochs):
[0085] random.shuffle(samples)
[0086] For sample in samples:
[0087] t1 = augment_tensor(sample.tensor).unsqueeze(0)
[0088] t2 = augment_tensor(sample.tensor).unsqueeze(0)
[0089] z1 = model(t1)
[0090] z2 = model(t2)
[0091] loss = F.mse_loss(z1, z2) # Minimize the difference between similar pairs
[0092] optimizer.zero_grad()
[0093] loss.backward()
[0094] optimizer.step()
[0095] # Fingerprint generation function: Extract latent texture fingerprint vector
[0096] def extract_fingerprint(model, sample):
[0097] model.eval()
[0098] with torch.no_grad():
[0099] z = model(sample.tensor.unsqueeze(0)).squeeze().cpu().numpy()
[0100] return {
[0101] 'embedding': z,
[0102] 'material': sample.material,
[0103] 'timestamp': sample.timestamp,
[0104] 'position': sample.position
[0105] }
[0106] # Clustering generates a texture dictionary (one set of centers for each material)
[0107] def build_texture_dictionary(fingerprints, clusters_per_material=10):
[0108] grouped = defaultdict(list)
[0109] For fp in fingerprints:
[0110] grouped[fp['material']].append(fp['embedding'])
[0111] dictionary = {}
[0112] for material, vecs in grouped.items():
[0113] kmeans = KMeans(n_clusters=clusters_per_material)
[0114] kmeans.fit(vecs)
[0115] dictionary[material] = kmeans.cluster_centers_
[0116] return dictionary
[0117] # Main process function: Execute the modeling task and output fingerprint vectors
[0118] def modeling_pipeline(sample_list):
[0119] grouped = group_by_material(sample_list)
[0120] model = TextureEncoder()
[0121] optimizer = torch.optim.Adam(model.parameters(), lr=1e - 3)
[0122] for material, samples in grouped.items():
[0123] train_encoder_contrastive(model, samples, optimizer)
[0124] fingerprints = []
[0125] for samples in grouped.values():
[0126] for sample in samples:
[0127] fp = extract_fingerprint(model, sample)
[0128] fingerprints.append(fp)
[0129] dictionary = build_texture_dictionary(fingerprints) # For internal system calls
[0130] return fingerprints # ← Final output of modeling unit 102 (docking detection unit)
[0131] Furthermore, the modeling unit is specifically used for:
[0132] In the process of generating the texture potential fingerprint vector, a material grouping structured index is constructed based on the material labels corresponding to each fabric unit region in the multimodal feature tensor dataset.
[0133] For each material group, an unsupervised contrastive learning algorithm is used to generate a set of multi-scale enhanced fragments as positive samples in the same tensor through local perturbation operations, with the randomly selected target region as the benchmark. The perturbation operations include brightness perturbation, contrast perturbation and low-amplitude rotation with orientation preservation. At the same time, sample pairs between different material groups or texture fragment pairs with similarity less than a threshold in the same material are set as negative samples.
[0134] The optimization objectives of the contrastive learning algorithm include clustering the latent fingerprint vectors generated by positive samples in the embedding space and minimizing the cosine similarity between them and the latent fingerprint vectors generated by corresponding negative samples, thereby improving the ability of the texture latent fingerprint vectors to distinguish fine-grained material structures and local mutation patterns.
[0135] In actual system operation, the multimodal feature tensor dataset constructed by the acquisition unit not only contains image channel data and process parameter channel data for each fabric unit region, but also includes the fabric material label of the corresponding region, such as cotton, silk, polyester, and blended fabrics. Upon receiving this dataset, the modeling unit first establishes an index structure based on the material label field. Specifically, the system constructs a grouping mapping table for all fabric unit region samples, categorized by material. The tensor data structure within each group remains consistent, and the index facilitates quick access and retrieval by material. This material grouping mechanism allows subsequent models to construct texture comparison relationships between samples of the same material type without introducing interference due to differences in material properties, thereby improving the stability and effectiveness of comparative learning.
[0136] After constructing the material index, the modeling unit performs unsupervised contrastive learning training on each material group. During this process, the system randomly selects a local region of a tensor sample within the group as the target region. Then, based on this target region, it performs a series of local perturbation operations to construct multiple enhanced versions as positive sample pairs. Specific perturbation operations include, but are not limited to, the following: First, brightness perturbation, i.e., adding a small mean shift or standard deviation adjustment to the original image tensor channels to simulate uneven brightness on the finished product surface; then, contrast perturbation, simulating the impact of lighting differences on texture display in real production by stretching or compressing the pixel distribution range; in addition, it performs orientation-preserving low-amplitude rotation processing, such as affine transformations within ±5 degrees, to ensure that the generated samples retain local structural differences without changing the main texture direction. These perturbation results, together with the original target region, constitute the positive sample set, with the intention of enabling the model to learn to extract feature representations that are robust to structure but responsive to material changes from image variations.
[0137] Meanwhile, to ensure the discriminative ability of contrastive learning, the system also constructs negative sample pairs, mainly including two types: one type is any other region taken from different material groups as negative samples. This type has obvious differences and is mainly used to construct material-level distinguishing boundaries; the other type is texture fragments from the same material group but with significant structural differences from the target region. For example, by calculating the local texture gradient vector or local entropy value, when the feature distance between the two is higher than a set threshold (such as cosine similarity less than 0.3), it is marked as a pseudo-negative sample. This design can guide the model to focus on fine-grained variations in the same material, thereby improving the ability to perceive abnormal texture details.
[0138] The entire modeling process is conducted within an unsupervised contrastive learning framework. The training objective is to minimize the Euclidean distance or cosine similarity between the latent fingerprint vectors generated from positive sample pairs, while maximizing the distance between negative sample pairs. The system uses a loss function based on InfoNCE or SimCLR architecture for end-to-end training. All samples are mapped to latent fingerprint vectors of uniform length through a shared convolutional encoder, and then mapped into the contrast space through a projection head to perform positive and negative sample differentiation.
[0139] Through the above design and implementation, the modeling unit not only ensures that the generated texture latent fingerprint vector has good clustering and category separation in the material dimension, but also has the ability to stably identify local abnormal textures, slight variations or complex material combinations, providing high-quality and structurally robust input feature representations for the subsequent detection unit to achieve accurate localization and classification.
[0140] Furthermore, the modeling unit is specifically used for:
[0141] After training and generating the texture latent fingerprint vectors, distribution modeling is performed based on the latent fingerprint vector set corresponding to each type of fabric material. A material adaptive texture dictionary model containing multiple multi-center subspaces is constructed using a density-aware clustering algorithm.
[0142] In this context, the centroid vector of each texture subspace is used to define the typical texture representation paradigm under the material, and serves as a modulation factor in the channel attention allocation mechanism of the lightweight target detection network in the detection unit. Specifically, when the detection unit processes the potential fingerprint vector from a specified fabric unit region, the system automatically finds the nearest typical texture subspace of the vector in the texture dictionary model of its material, and uses the channel response weight mode of the subspace as an initialization condition to guide the detection network to preferentially activate key channels during feature fusion, thereby improving the sensitivity of defect recognition in areas where local anomalies are not obvious.
[0143] This embodiment further extends the collaborative mechanism between the modeling unit and the detection unit, constructing a material-adaptive texture representation dictionary structure. This structure is used to guide the dynamic adjustment of the channel attention mechanism in the object detection network, aiming to improve the detection network's sensitivity in recognizing defects with subtle local variations and low contrast within the same material. This design breaks the constraints of fixed parameters in traditional static attention mechanisms, enabling the detection network to adaptively adjust its perception strategy according to material differences, demonstrating significant technological innovation.
[0144] After the modeling unit completes the training and generation of latent texture fingerprint vectors, the system uses all latent fingerprint vectors corresponding to each material label as input sample sets for separate modeling. To identify typical texture expression patterns for each material, the system employs a density-aware clustering algorithm to perform cluster analysis on each sample set. Unlike traditional methods such as K-means, density-aware clustering considers the non-uniformity and multi-modal structure of sample distribution during clustering, enabling it to identify typical texture subspaces corresponding to multiple locally high-density regions in complex materials. The multiple cluster centers obtained during the modeling process for each material type represent the multi-center structure of that material, and the feature vector of each cluster center is defined as a "centroid vector," representing a representative typical texture paradigm.
[0145] All centroid vectors together constitute the texture dictionary model for this material. The model structure is as follows: each material label corresponds to a set of fingerprint feature centers, each center is represented by a high-dimensional vector with the same dimension as the actual potential fingerprint vector, used for subsequent similarity calculations or for initializing neural network parameters. The system stores this dictionary model as a static resource in a database or cache structure accessible to the detection unit.
[0146] After the detection unit receives the latent texture fingerprint vector of a specific fabric unit region from the modeling unit, it first extracts the material label of the sample and accesses the texture dictionary model of the corresponding material. In this model, the system calculates the cosine similarity or Euclidean distance between the current fingerprint vector and each centroid vector to find its nearest typical texture subspace, thus identifying the standard texture representation of the current fabric region most similar to its material background. Subsequently, the system maps the centroid vector of this typical subspace to a set of channel-level response weights, which are used to initialize the channel attention module of the first-stage feature fusion layer in the lightweight object detection network.
[0147] Specifically, this attention mechanism applies to the feature extraction channels at the network front end, typically implemented by introducing a channel attention weight multiplication operation. By weighting the channel weights with the convolutional layer feature maps channel by channel, the system enhances the network's response to key texture dimensions and suppresses interfering or low-weight texture information. Since the initial weights are not fixed but driven by the matching relationship between the current fabric fingerprint features and their respective dictionaries, each fabric region possesses a personalized channel-aware strategy when entering the detection network. This channel attention modulation method effectively improves the detection network's ability to discriminate defects with consistent materials but extremely weak defect signals or those interfered with by textured backgrounds, making it particularly suitable for identifying micro-texture anomalies, blurred boundaries, or low-contrast defects.
[0148] This mechanism manifests in the system as follows: the modeling unit not only provides individual feature vectors for each sample but also constructs a material-specific expression structure based on overall distribution statistics; the detection unit, in using this expression structure, not only makes judgments based on the current sample but also uses typical expression patterns as a recognition preference strategy, thereby achieving material context-aware channel selection. This structure enables the system to have higher generalization ability and detection sensitivity in real-world industrial scenarios with diverse materials and complex texture variations, ensuring high-precision defect identification in high-speed production environments.
[0149] Through the above mechanism, explicit linkage between the modeling unit and the detection unit is realized. It not only provides static modeling capability for texture vectors, but also directly guides the results to the dynamic structure adjustment of the neural network, so that the entire system forms a closed loop from the data layer, model layer to network behavior layer, realizing a fabric defect identification method with high scalability, accuracy and engineering deployment value.
[0150] The detection unit 103 is used to input the potential fingerprint vector output by the modeling unit into a lightweight target detection network with a channel attention mechanism, and output the location coordinates of the suspected defect, the defect type and the severity score.
[0151] The detection unit 103 identifies defects in the texture latent fingerprint vector output by the modeling unit 102, and outputs whether defects exist in the fabric area, the location coordinates of the defects, the specific type of defects, and a severity score. To achieve this goal, the unit must combine texture feature representation with spatial localization capabilities, utilize a lightweight neural network structure to comprehensively analyze each fabric area, and accurately classify and quantitatively evaluate abnormal areas.
[0152] The detection unit receives texture latent fingerprint vectors output by the modeling unit as input. These vectors are essentially the result of encoding the texture features of each unit fabric region, containing various information such as the region's micro-texture structure, material attribution, and the influence of weaving technology. Although this vector is a compressed feature representation, it retains sufficient discriminability in the dimensional space to identify which regions' texture features fall within the normal fluctuation range and which regions exhibit anomalous variations deviating from typical material texture patterns during subsequent detection.
[0153] To achieve efficient and accurate detection, a lightweight convolutional neural network with a channel attention mechanism is deployed within the detection unit. This network structure maintains computational efficiency while automatically determining the importance of each dimension of features in the current judgment task through the attention mechanism. For example, for some materials, lateral textures may be more stable; while for other materials, subtle color variations may be more sensitive. The attention mechanism automatically learns the weights of each channel, thereby enhancing the network's ability to perceive key texture dimensions and improving recognition accuracy, especially in scenes with minor defects and low-contrast flaws.
[0154] This convolutional network first performs dimensionality upscaling or decoding on the potential fingerprint vectors to recover a certain spatial structure, which is then used to determine the location distribution of potential defects in the fabric area using spatial attention. The network's first stage is a feature fusion stage, using a set of convolutional blocks to expand the vectors into a feature map; the second stage is a candidate region extraction stage, locating potential abnormal regions through a sliding window structure or an anchor-free mechanism; the third stage is a joint classification and regression stage, outputting the defect probability, defect category number (e.g., hole, broken weft, stain, etc.), and location regression results (center coordinates and relative area) for each candidate region. Finally, the network outputs a structured detection result for each fabric area, including whether a defect exists in the area, the relative coordinates of the defect within the area, the defect's classification label, and its severity score. The severity score is achieved through a separate regression branch, outputting a value between 0 and 1 to measure the magnitude of the defect's impact on the overall fabric quality.
[0155] During the detection process, the detection unit also incorporates a material-aware conditional normalization strategy. This involves loading different normalization parameters into the convolutional layer's normalization process based on the material label contained in each fingerprint vector, adapting to differences in statistical features such as texture scale and frequency across different materials. This strategy effectively avoids overfitting or false detections caused by significant differences in texture statistical distribution between materials within a unified model, ensuring the model's universality across multiple material types.
[0156] Each detection result output by the detection unit contains five elements: the image region location corresponding to the fingerprint vector (i.e., the corresponding coordinates in the original acquired tensor), a binary determination of whether a defect exists in that region, a specific type label for the defect, the location coordinates of the defect within the image region (which can be used for heatmap drawing or visualization), and a severity score. These results are packaged into unified structured data and transmitted to the tracing unit 104 for subsequent causal analysis. They can also be directly used in front-end visualization interfaces such as quality reports and online early warning systems.
[0157] This lightweight convolutional neural network is specifically designed for processing textured latent fingerprint vectors, offering high detection accuracy and real-time performance, making it suitable for deployment on edge devices or in online detection scenarios. The network's overall structure can be divided into three consecutive functional modules: a feature reconstruction module, a spatial recognition module, and a discrimination and scoring module. The network's input is the textured latent fingerprint vector output by the modeling unit, and the output includes the presence or absence of defects, the defect's location coordinates, defect type, and severity score.
[0158] The feature reconstruction module is responsible for restoring the latent fingerprint vector into a feature map with spatial structure. Since the modeling unit outputs a one-dimensional vector texture representation, to enable spatial recognition by the convolutional neural network, this module first uses a fully connected layer to map the one-dimensional vector to a low-resolution three-dimensional tensor, typically set to a tensor with a high number of channels (e.g., 64 channels) and a small spatial resolution (e.g., 8×8 or 16×16). Subsequently, this tensor undergoes two deconvolution operations, each doubling the spatial dimension. BatchNorm and ReLU activation functions are used to maintain feature stability and non-linear expression, ultimately outputting a medium-resolution feature map, such as 64 channels and 32×32 in size, for use by the subsequent recognition module.
[0159] The spatial recognition module's task is to identify regions potentially containing defects from the medium-resolution feature map. This module consists of several standard convolutional layers and a feature enhancement structure with a channel attention mechanism. After each convolutional operation, a Squeeze-and-Excitation (SE) channel attention mechanism is added. This mechanism dynamically adjusts the weights of each channel through global average pooling, scaling, and recalibration operations, enabling the network to automatically focus on key texture channels under different samples or materials. This mechanism improves the network's ability to distinguish subtle defects in complex backgrounds. Spatially, each convolutional layer progressively extracts texture information from a larger receptive field, combining it with contextual features to enhance the localization ability of defect regions. Finally, this module outputs a feature map, where each spatial location represents a comprehensive feature description of a candidate region.
[0160] The discrimination and scoring module comprehensively evaluates each candidate region based on the output of the spatial recognition module. This module contains three branches. The first branch is the classification branch, which uses a 1×1 convolutional kernel plus a softmax output layer to predict whether each spatial location is a defect region and further outputs its corresponding defect type label, such as hole, broken latitude, oil stain, etc. The second branch is the location regression branch, which uses two consecutive convolutional layers to predict the relative center position (offset) and width and height information of the defect region in the original image, respectively, to achieve pixel-level localization. The third branch is the severity scoring branch, which uses a separate convolution plus sigmoid output structure to predict the confidence score of each defect region. This score is between 0 and 1, used to represent the degree of impact of the current defect on quality, with higher values indicating greater severity. The number of convolutional kernels, channels, and layers in the entire network structure are kept at a low level, and most of them use depthwise separable convolutional structures, which greatly reduces the number of model parameters and computational complexity, making it suitable for deployment in edge gateways, embedded GPUs, or industrial camera accessories. Each step from input to output involves continuous and differentiable neural computation. Combined with the cross-entropy loss (for classification), smoothing L1 loss (for location regression), and mean squared error loss (for score regression) used in the training phase, a joint optimization objective is formed, ensuring the model has strong end-to-end learning capabilities and stable inference performance. In summary, this lightweight convolutional neural network starts from a high-dimensional fingerprint vector and gradually recovers spatial information, locates potential defects, and outputs classification and scoring results through three stages: reconstruction, recognition, and judgment. It has advantages such as clear structure, low computational cost, and strong adaptability, enabling it to efficiently complete defect recognition tasks without relying on complex image reconstruction, meeting the practical application needs of intelligent textile inspection systems.
[0161] In summary, the detection unit 103 combines a lightweight convolutional neural network with a channel attention mechanism to construct a highly efficient detection module that has both classification and localization capabilities. It can accurately identify fabric areas with quality problems from the high-dimensional texture latent fingerprint vectors provided by the modeling unit and provide quantitative outputs that are comparable and traceable, thus becoming a key node for quality identification and closed-loop control in the entire system.
[0162] Furthermore, the detection unit is also used for:
[0163] After the lightweight target detection network outputs the location coordinates, defect type and severity score of the suspected defect, a thermal region echo map is constructed based on the texture latent fingerprint vector output by the modeling unit. The thermal region echo map performs local clustering analysis on the latent fingerprint vector through a sliding window method to identify texture abnormal density change regions as local hotspots, and calculates the spatial overlap coefficient between the hotspots and the detection area in combination with the defect location coordinates.
[0164] For hotspot areas with an overlap exceeding a set threshold, the detection unit treats them as significant texture offset areas, marks them with a high-response channel in the thermal region echo map, and outputs them. At the same time, the thermal region echo map is transmitted as a structured feature to the tracing unit to enhance the temporal causal inference network's ability to perform parameter causal analysis on the fabric region corresponding to the current defect location. Specifically, during the causal modeling process, the tracing unit regards the process parameter channel corresponding to the thermal region location as a key area of focus, and increases the response weight of the parameter sequence in the attention allocation mechanism.
[0165] The detection unit embeds the hotspot center pattern marked in the thermal region echo map into the subsequent detection of samples of the same material, as the basis for setting the initial weight of the attention mechanism of the lightweight target detection network channel, thereby focusing on potentially error-prone texture regions in advance in future batch detection, and improving the overall detection robustness and foresight.
[0166] During system operation, once the detection unit completes the analysis of the latent texture fingerprint vector of a specific fabric unit area, and the lightweight target detection network outputs the coordinates of suspected defects within that area, defect categories, and severity scores, the system triggers the construction of a heatmap. The goal of this heatmap is to further analyze and quantify the local clustering of abnormal textures in the dimensional space of the texture fingerprint representation, and to feed this structured information back into the source tracing and future detection strategies.
[0167] Specifically, the system first uses the latent texture fingerprint vector of the current fabric unit region as input and performs sliding window processing on it spatially. Each sliding window operation extracts a local segment of the vector, and density clustering analysis is performed within these local segments. The clustering algorithm can employ DBSCAN or probabilistic clustering based on Gaussian mixture models. The aim is to identify regions in the latent texture fingerprint that exhibit abrupt density changes or irregular distributions. These regions typically correspond to potential organizational anomalies, uneven weaving, or other microstructural defects. In the clustering results, regions with significantly higher density than the neighborhood average and exhibiting a locally concentrated pattern in space are marked as anomalous hotspots.
[0168] The spatial locations of these anomalous hotspots are then cross-referenced with the defect coordinate regions output by the lightweight object detection network. The system calculates the spatial overlap coefficient between each hotspot region and the detection region, using metrics such as IoU (Intersection over Union) to determine whether there is significant overlap at the physical coordinate or image pixel level. When the overlap coefficient exceeds a system-preset threshold (e.g., 0.5), the system considers the hotspot a "significant texture offset region" that confirms the detection result and marks the region in the heatmap using a high-response channel. This marking can be output as an image or encoded as a response mask in a tensor channel for subsequent model reading.
[0169] More importantly, the system does not merely use the thermal region echo map for current visualization or diagnostic purposes, but rather passes it as a structured feature input to the temporal causal inference network of the tracing unit. In this network, the model needs to analyze the sequence of process parameters (such as tension changes, temperature and humidity fluctuations, etc.) related to the fabric region within the corresponding time window, based on the detected defect type, coordinates, and score. Since the thermal region echo map provides fingerprint-level spatial anomaly localization information, the system accordingly increases the response weight of its attention mechanism on the parameter channels at the corresponding positions in the process parameter tensor. Even when the overall fluctuation of the parameter sequence is not large, it can focus on the causal contribution analysis of regions with clear texture thermal response, thereby improving the accuracy of causal attribution between parameters and defects.
[0170] Furthermore, the system utilizes the confirmed hotspot center distribution patterns in the current batch's heatmap echo image as the basis for setting the initial channel attention weights for the lightweight target detection network in future batches. This means that when detecting the same type of fabric material, the system will pre-set the channel weight distribution using historically frequent abnormal texture region patterns, allowing the network to focus on more error-prone areas in the next processing round. This strategy enhances the model's foresight through structural initialization, enabling the system to not only have real-time response capabilities but also adaptive capabilities for cross-batch learning and policy transfer, effectively improving the overall detection sensitivity and robustness, especially when dealing with difficult-to-detect targets such as minor flaws and low-contrast damage.
[0171] The tracing unit 104 is used to trace back the sequence of equipment and environmental parameters within the corresponding time window based on the defect information output by the detection unit, and to use a time-series causal reasoning network to analyze the causal weight relationship between each parameter and the identified defect, and to construct a causal graph of the defect parameters.
[0172] The task of the source tracing unit is to trace the changes in equipment status and environmental parameters corresponding to the area in the period before the defect occurred, based on the defect identification results provided by the detection unit. It analyzes the causal relationship between various process parameters and the defect, and outputs a structured causal graph. This unit not only provides a quantitative explanation of the defect source but also provides a traceable and explainable basis for the subsequent process adjustment suggestions generated by the optimization unit.
[0173] When the detection unit outputs that a defect exists in a certain area, the tracing unit first extracts the metadata corresponding to the defect, including the defect's occurrence time, image location coordinates, defect type, and severity score. Based on this information, the system locates the historical process record of that fabric area in the spatiotemporal index structure established in the acquisition unit and sets a backtracking time window, such as 10 minutes or 500 seconds. Within this time window, the system extracts a multi-dimensional time series composed of parameters such as loom speed, tension, roll pressure, temperature, and humidity at a frequency of seconds or higher. This time series has a fixed structure, consistent time dimensions, complete data, and is aligned according to the defect occurrence time, ensuring that all parameter curves are truncated before the defect occurrence point, avoiding causal reversal issues.
[0174] After obtaining the complete time series, the tracing unit models the data using a temporal causal reasoning network. This network is based on a structured time series with multivariate input and has the ability to jointly model and interpret temporal dynamics, parameter interactions, and defect outcomes. The network input is a parameter matrix, where each row represents a time point and each column corresponds to a parameter channel. The network structure consists of three parts: First, a feature encoder layer, which inputs the time series of each parameter into a shared LSTM or GRU encoder to extract its local temporal variation features. Then, all encoded sequences are concatenated along the temporal dimension and fed into an aggregation layer with a parameter attention mechanism to learn the relative contribution of different parameters to the current defect. Finally, the network outputs a defect prediction value, along with a set of normalized parameter weights, representing the causal influence of each process parameter on the occurrence of the defect.
[0175] This causal reasoning process can be accomplished through supervised learning. During the training phase, the network uses actual historical defect samples as supervisory labels to optimize prediction accuracy and the quality of attention distribution. During the inference phase, the model no longer needs labels; it can quantify the causal effects of each parameter solely based on the historical parameter sequence and the time of defect occurrence.
[0176] Finally, based on the results output by the time-series causal inference network, the source tracing unit structures the causal weights corresponding to each parameter to form a defect parameter causal graph. Each node in the graph represents a process parameter, and the size or color intensity of the node represents its causal weight. If certain parameters show a high correlation in history, they are connected by edges in the graph, and the edge weights represent their correlation. This graph can serve as the basic input for subsequent optimization units to adjust the process, and it can also visually present the root causes of problems to operators through a graph visualization interface.
[0177] Through the above process, the traceability unit achieves a closed-loop leap from "detection results" to "explanation of process mechanisms." It not only tells the system "what went wrong," but also answers "why the problem occurred," and quantifies "which variables are most likely the cause." This unit has a clear structure, well-defined data standards, and a reusable model structure, making it easy to deploy and continuously optimize on textile production lines, thus endowing the entire quality management system with causal explainability and traceability.
[0178] Furthermore, the temporal causal reasoning network in the tracing unit specifically includes a bidirectional long short-term memory network with a parameter dimension attention mechanism. The bidirectional long short-term memory network is used to receive the defect type, defect location coordinates, and severity score output by the detection unit, and to backtrack the sequence of equipment and environmental parameters within the time window corresponding to the defect from the multimodal feature tensor dataset constructed by the acquisition unit, and extract the temporal variation features of process parameters including loom speed, roll pressure, tension, temperature, and humidity.
[0179] The parameter dimension attention mechanism dynamically allocates attention weights to parameter channels based on the fluctuation patterns of different process parameters before the occurrence of defects, thereby enhancing the bidirectional long short-term memory network's ability to identify key parameter variation signals. Based on the output results of the joint encoding of forward and reverse time paths, a causal weight vector is generated to describe the strength of the causal relationship between each process parameter and the identified defect. The causal weight vector is used to construct the causal map of the defect parameters.
[0180] In actual operation, after receiving the defect identification results output by the detection unit, the traceability unit acquires the defect type, location coordinates, and severity score corresponding to each defect. The defect type determines the category of fabric defect identified, such as broken weft, stains, or pilling. The defect location coordinates accurately correspond to the index position of the fabric unit area in the dataset. The severity score is a continuous value output by the target detection network of the detection unit, describing the intensity of the defect's impact; it is typically between 0 and 1, with a higher score indicating a greater impact of the defect on product quality.
[0181] Based on the aforementioned defect identification information, the tracing unit uses a time indexing mechanism to trace back to a preset time window before the defect occurred within the multimodal feature tensor dataset constructed by the acquisition unit, and extracts the equipment operating status and environmental parameter sequences associated with the fabric area during the corresponding time period. Specifically, the system extracts historical sampled values of process parameters such as loom speed, roll pressure, tension, temperature, and humidity within the set window range for that area. These values constitute a time series input matrix, with each column representing a process parameter and each row representing a time sampling point. After normalization and missing value completion, the entire time series is input into a time-series causal inference network for modeling and analysis.
[0182] The core structure of the temporal causal reasoning network is a bidirectional long short-term memory network with a parameter-dimensional attention mechanism. This network includes two temporal modeling paths: a forward LSTM and a backward LSTM, used to capture the potential contribution of parameter changes to defects from the past to the present and from the present to the past, respectively. The bidirectional structure helps identify parameter changes with delayed effects or hysteresis feedback characteristics and establishes causal judgment logic from a complete temporal perspective.
[0183] Before the input parameter sequence enters the bidirectional LSTM network, the system introduces a parameter-dimensional attention mechanism to dynamically adjust the weight distribution of each parameter channel during the modeling process. This mechanism typically includes a fully connected attention network or a nested attention gating structure, which analyzes the fluctuation amplitude, direction of change, and gradient trend of each process parameter before the defect occurs, and assigns an attention coefficient based on these statistical characteristics. Parameter channels assigned high weights will have a greater impact on subsequent LSTM state updates, while low-weight channels are weakened to reduce their interference with the output results. This mechanism can improve the model's ability to perceive key anomaly precursor signals, and is particularly suitable for attribution tasks in multi-parameter coupled contexts.
[0184] After receiving parameter-weighted input, the bidirectional LSTM begins modeling the time dimension. The hidden state at each time step is encoded by both the forward and backward paths, forming a unified temporal representation tensor. The final output state vector is projected onto an attribution representation space and normalized to generate causal weight values between each process parameter and the current defect, forming a causal weight vector. Each element in this vector corresponds to a parameter channel; a larger value indicates a more significant causal effect of that parameter on the formation of the current defect.
[0185] Ultimately, the causal weight vector, as one of the outputs of the tracing unit, is used to construct a defect parameter causal graph bound to the current fabric unit area, defect type, and timestamp. Throughout the system workflow, this causal weight vector serves not only as the structured attribution result of the data layer but also as the basic input for the optimization unit to calculate the defect risk index and generate process optimization vectors, directly supporting parameter intervention and adjustment strategy formulation in subsequent control stages. Specifically, the system uses each process parameter in the causal weight vector as a node in the graph, and determines the node's size or color intensity based on the parameter's causal weight value to intuitively reflect its impact on the current defect. This graph is associated with specific fabric areas, defect types, and occurrence times, ensuring that each graph accurately describes the parameter-induced structure behind a defect. This graph not only facilitates an intuitive understanding of defect causes by maintenance personnel but also serves as the basis for the optimization unit to formulate parameter intervention strategies, thereby achieving close linkage between fault tracing and process optimization.
[0186] Furthermore, after generating the causal weight vector, the tracing unit performs causal weight normalization processing on the causal weight vector. The causal weight normalization processing includes: adjusting the normalization amplitude of the causal weights corresponding to each process parameter so that all weight values fall into a preset range and the relative proportions between each weight value remain unchanged.
[0187] After completing the causal weight normalization process, the tracing unit constructs a causal graph of the defect parameters based on the normalized causal weights of each parameter. The size of each parameter node in the causal graph of the defect parameters represents the strength of the normalized causal weight. The causal graph of the defect parameters is used as the basic data source for the optimization unit to calculate the defect risk index and generate the process optimization vector.
[0188] The tracing unit outputs a set of causal weight vectors through the temporal causal inference network, describing the strength of the causal relationship between process parameters and specific defects. Each component in this vector corresponds to a collected parameter, such as loom speed, tension, roll pressure, temperature, or humidity, and its value reflects the relative causal influence of that parameter on the formation of the defect before the current defect occurs. Since these causal weights are calculated in a complex time-series model, there may be inconsistencies in the distribution range of weight values across different parameter dimensions, as well as significant scale differences. Directly using these weights for visualization or optimization decisions could easily lead to judgment bias or misleading control. Therefore, before constructing the graph, the system needs to perform a unified normalization process on the weight vector to improve its consistency and engineering applicability.
[0189] The goal of the causal weight normalization process is to linearly compress the original causal weight values of all process parameters to a set range, typically 0 to 1 or other bounded intervals, facilitating subsequent mapping of graph nodes and calculation of optimization indicators. During processing, the system first traverses the entire set of causal weight vectors, extracting the minimum and maximum values. Then, it performs a normalization transformation on the original weight value of each parameter, ensuring the result falls within the preset range while maintaining the original relative proportions between the parameters. This processing method ensures that the parameter scale is unified without altering the causal structure characteristics, making all parameters operate on the same dimension in visualization and control.
[0190] After normalization, the tracing unit constructs a corresponding defect parameter causal graph based on the normalized causal weights. This graph is a structured data representation model, with its core consisting of multiple nodes. Each node represents a specific process parameter, and the size of the node is dynamically set according to the normalized causal weight value of that parameter. For example, tension nodes with higher causal weight values are represented by larger circles, while temperature and humidity nodes with weaker causal influence are represented by smaller icons, thus visually reflecting the importance of parameter attribution on the graph. Furthermore, during graph generation, the system also binds parameters based on their region of origin, defect type, and timestamp, ensuring that the graph results not only reflect parameter attribution weights but also have contextual relevance, facilitating subsequent querying and tracing.
[0191] The constructed defect parameter causal map, as structured output data, is directly used as input to the optimization unit. Upon receiving the map, the optimization unit calculates the overall defect risk index based on the normalized weights of each process parameter in the map, combined with the severity score provided by the detection unit. This index serves as a quantitative indicator of the potential defect risk per unit area of the fabric under current production conditions. Simultaneously, the optimization unit uses the parameter ranking and weight values in the map as input features to drive the reinforcement learning model for state modeling and strategy evaluation, thereby generating process optimization vectors for production adjustments and enabling proactive adjustment of key parameters.
[0192] The optimization unit 105 is used to calculate the defect risk index based on the causal graph and severity score generated by the tracing unit, output the corresponding process optimization vector based on the reinforcement learning model, and display the defect risk status, tracing graph and optimization suggestions through the Web interface. At the same time, the process optimization vector is sent to the edge controller to adjust the production parameters in real time.
[0193] The optimization unit 105 receives the defect parameter cause-effect graph and defect severity score generated by the tracing unit, quantitatively assesses potential production risks, and outputs real-time and effective process optimization suggestions based on the risk assessment results. These suggestions are directly fed back to the edge controller in the form of optimization vectors, enabling automated adjustment of production line process parameters, thereby constructing a data-driven closed-loop quality control process. The edge controller is located at the production execution end and is responsible for adjusting the operating parameters of the production equipment in real time according to the process optimization vectors output by the optimization unit, thus jointly forming a two-layer edge node system for data processing and production control.
[0194] Upon startup, the optimization unit first receives a causal graph from the tracing unit, which includes the causal weights of various process parameters in the formation of a specific defect, as well as the severity score of the defect in the image region. Based on the causal weights and severity scores of the parameters in the causal graph, the system calculates a defect risk index tied to a specific fabric region. This risk index is a floating-point number between 0 and 1, comprehensively reflecting the defect risk level currently present on the production line. A higher value indicates a greater risk, a more concentrated concentration of parameter anomalies, and poorer production stability. This risk index can not only serve as a basis for process optimization decisions but also for horizontal comparison of risk levels across different batches, different equipment, or different fabric types, enabling visualized risk management.
[0195] Based on the risk assessment, the optimization unit uses a reinforcement learning model to generate parameter adjustment suggestions. The model is designed to learn how to minimize the defect risk index through a series of fine-tuning actions under different initial process parameter states, without introducing other performance degradation or quality fluctuations. The model's input includes the current process parameter state, risk index, parameter causal weights, and recent defect occurrence patterns. The output is a set of suggested parameter adjustment values, forming a vector—the process optimization vector. Each element in this optimization vector represents the direction and magnitude of a specific process parameter's fine-tuning, such as increasing the loom speed by 2 rpm, decreasing the tension by 0.3 N, or keeping the roll pressure unchanged.
[0196] The reinforcement learning model is trained based on historical data and a simulated interactive environment. The system models the results of different process adjustments in historical batches, extracting which parameters and adjustment directions are more conducive to reducing defects. During runtime, the model can quickly evaluate the optimal adjustment strategy based on the current input. To improve the stability of the strategy, the system introduces a certain confidence constraint into the output optimization vector to avoid large jumps or frequent repeated adjustments.
[0197] The generated process optimization vector will then enter two channels simultaneously. On the one hand, it will be displayed to the production line monitoring personnel through the web interface, along with information such as defect location, defect type, and cause-effect graph, in the optimization suggestion dashboard to achieve aggregation and visualization of multi-dimensional information. On the other hand, the vector will be sent to the edge controller in the form of a standard control command structure, which will parse it and directly act on the execution units such as the loom, tension control device, and temperature and humidity control module to achieve automatic parameter adjustment.
[0198] In practical implementation, the optimization unit supports multiple deployment forms, including lightweight models deployed locally on industrial control computers, optimization service modules deployed remotely on cloud platforms for high-frequency calls, and compressed reinforcement learning model replicas deployed on edge devices. In multi-defect scenarios, the system constructs composite optimization objectives based on defect type priority and parameter influence weights, and achieves multi-objective balanced optimization through strategy weight merging, thereby avoiding other anomalies caused by tuning a single parameter.
[0199] In optimization unit 105, the core design of the reinforcement learning model lies in learning an optimization strategy through interaction with the process parameter environment. This strategy can output reasonable parameter adjustment actions based on the current process state and defect information without relying on human experience, thereby reducing the probability of future defects. To ensure the model's feasibility and deployability, this reinforcement learning model adopts an offline reinforcement learning method based on policy gradients, constructs a simulation environment by combining historical process data, and achieves real-time risk suppression and process adjustment in the fabric production process through joint modeling of policy networks and state value functions.
[0200] The model's input state vector consists of several parts, primarily including the standardized values of the current batch's process parameters, the causal weight distribution of each parameter provided by the traceability unit, the defect risk index of the current batch, the average severity, and the category statistics of the most recent N defects. These input items are first encoded into a uniform-length feature representation by a multilayer perceptron to adapt to the input structure of the policy network. The state vector exhibits dynamic change characteristics; each time the model receives a new risk assessment result, it updates the current state and makes new optimization decisions accordingly.
[0201] The model output is a multi-dimensional continuous action vector, where each dimension represents the direction and magnitude of an adjustment to a process parameter. For example, if one dimension in the output vector is -0.02, it means that the process parameter needs to be reduced by 2%; if one dimension is 0, it means that the parameter remains unchanged. To avoid over-adjustment that could cause system oscillation, the action vector passes through an action smoothing module. This is achieved by using a moving average of historical output actions or by retaining the inertia of the previous round of actions through a soft update strategy, ensuring a smooth transition of the control signal.
[0202] In terms of model structure, the core of reinforcement learning consists of two neural networks: a Policy Network and a Value Network. The Policy Network employs a multi-layer fully connected structure, taking the current state vector as input and outputting an action distribution parameter that follows a Gaussian distribution. The model samples the current action from this distribution, thus retaining its exploratory capabilities. The Value Network evaluates the long-term reward expectation of the current state. Its structure is similar to the Policy Network, but its output is a scalar, used to guide the optimization of the Policy Network. The entire model is trained using the Proximal Policy Optimization (PPO) algorithm, which improves training stability by limiting the policy update step size and adapts to the distribution characteristics of offline data.
[0203] The training environment for reinforcement learning is reconstructed from historical process data to build a simulator. The input consists of arbitrary process parameter states and a defect background, and the output is a potential defect risk score for the next step. This simulator is implemented using a supervised learning regression network, whose task is to predict the risk change trend corresponding to a given combination of parameters without actually controlling the production line. This simulator constitutes an environment model, allowing the reinforcement learning model to be iteratively updated using historical data without online trial and error, thus ensuring safety.
[0204] During the actual deployment phase, the optimization unit uses the pre-trained policy network as the inference engine, automatically running once after each batch of production data is updated. The system inputs the current state into the policy network, outputs a new parameter adjustment vector, and generates and issues control commands based on the current production situation. This process requires no manual intervention, and the response speed can be controlled within seconds, meeting the dual requirements of textile production for real-time parameter adjustment and stability.
[0205] To prevent the reinforcement learning model from deviating from the optimal policy during long-term operation, the system is also designed with a policy review mechanism. When the system receives continuous feedback of high-risk defects, it will trigger policy cooling and roll back to the historical optimal version, or automatically switch to empirical rule mode to ensure that the safety boundary of industrial control is not breached.
[0206] Through the aforementioned structure and operational mechanism, the reinforcement learning model truly plays a core decision-making role in the "perception-decision-control" closed loop within the optimization unit. It not only outputs high-quality process adjustment strategies but also possesses adaptive and self-learning capabilities, enabling the entire textile quality control system to exhibit intelligent characteristics of continuous optimization. The model has a clear structure, well-defined inputs and outputs, and a complete training and deployment process, providing a technical foundation for replicable, verifiable, and industrially deployable implementation.
[0207] In summary, the optimization unit 105 not only achieves an intelligent closed loop from data diagnosis to process adjustment, but also introduces continuous adaptive capabilities into the industrial process through reinforcement learning modeling. Its output process optimization vector possesses logical consistency, parameter controllability, and adjustment traceability, enabling real-time guidance for fine-tuning of field equipment and ultimately achieving feedforward suppression of defect risks and dynamic control throughout the entire process. This unit plays a crucial role in the entire system, serving as a core link in achieving data-driven quality management across the entire process from perception and identification to control.
[0208] Furthermore, after calculating the defect risk index based on the causal graph of the defect parameters generated by the tracing unit and the severity score, the optimization unit constructs a state space to drive the reinforcement learning model. The state space includes: the time change sequence of the defect risk index, the normalized causal weights of each process parameter in the causal graph, the current process parameter setting value and the corresponding process allowable range, the statistical distribution of severity scores output by the detection unit in multiple fabric unit areas in the past, and the graph structure embedding vector extracted from the causal graph of the defect parameters. The graph structure embedding vector encodes the connection pattern, causal strength and centrality of each parameter node in the graph into a fixed-length feature vector through a structural compression network, which is used to guide the policy learning process to focus on the structural features of the defect cause pattern.
[0209] The optimization unit trains the policy network in the reinforcement learning model based on the state space and constructs a reward function that integrates the rating gradient during the policy optimization process. The rating gradient is composed of the severity rating changes output by the detection unit in multiple consecutive time steps. If the rating decreases significantly, the system provides positive reinforcement feedback. If the rating tends to stabilize or increase, a penalty factor is introduced, and the penalty weight is positively correlated with the rating gradient.
[0210] The optimization unit introduces a parameter perturbation simulation mechanism during the training process. This mechanism simulates the change in the defect risk index caused by parameter adjustment based on the process optimization vector. It uses a historical defect trend regression model to make short-term predictions of future scoring trends and uses the prediction results as external feedback signals for the reinforcement learning environment model. This forms a parameter policy simulation training process driven by defect risk evolution, thereby improving the stability and effectiveness of the policy network under unknown operating conditions.
[0211] During system operation, the tracing unit outputs a causal graph of defect parameters for each fabric unit area. This graph uses causal modeling network analysis to analyze historical time-series data of equipment and environmental parameters, determining the causal weight of each process parameter on the identified defect, and then normalizing the data to form the weight representation of each parameter node in the graph. Simultaneously, the detection unit outputs the type, location coordinates, and severity score of the specific defect within that area. This score can be used to assess the impact of the current defect on product quality. The optimization unit uses these two types of data as input to calculate the defect risk index for the current fabric unit area, continuously generating a time-varying sequence of the defect risk index as new defect information is updated.
[0212] Based on this, the optimization unit constructs the state space required for the reinforcement learning model. This state space first contains the sequence of changes in the defect risk index over continuous time steps to reflect the risk trend of the current fabric area; it also includes the normalized causal weights of each process parameter in the defect parameter causal graph, which measure the importance of each parameter to the formation of the current defect. Furthermore, the state space also includes the actual set values of all current key process parameters, along with the preset parameter adjustment boundary values (upper and lower limits) in the system, to ensure that the parameter adjustment process always operates within the allowable range of equipment and materials. To enhance the model's context learning capability, the system also statistically analyzes the distribution of severity scores output by the detection unit in multiple fabric unit areas to reflect the overall defect distribution trend and background noise during the production process.
[0213] Specifically, the optimization unit also extracts graph structure embedding vectors from the defect parameter causal graph for structural feature learning in reinforcement learning. This process, through a graph neural compression module or graph convolutional encoder, encodes structural features such as the connection structure of all parameter nodes in the causal graph, the strength of causal weights, and the centrality between nodes into fixed-length high-dimensional vector representations. This enables the policy network to "perceive" the causal network topology hidden behind fabric defects. This structural awareness significantly enhances the policy model's ability to identify the causes of complex defects and provides stronger generalization capabilities in scenarios with highly coupled parameters.
[0214] The constructed state space is used as input to the reinforcement learning model. During training, the optimization unit employs a reward function structure that integrates score gradients. This means that the evaluation criterion is not only the final improvement in defect severity but also the trend of severity scores over multiple consecutive time steps. If a policy adjustment causes a continuous decrease in score, the system provides a positive reinforcement reward; conversely, if the score stagnates or increases, a negative penalty factor is introduced, with the penalty intensity positively correlated with the rate of score increase. This mechanism ensures that the model's learning objective focuses not only on instantaneous score optimization but also encourages long-term, continuous improvement in defect quality.
[0215] To further enhance the robustness of the policy network in real-world production environments, a parameter perturbation simulation mechanism is introduced. During policy training, this mechanism simulates changes in the risk index that parameter adjustments might cause within the system, based on the current process optimization vector output by the policy network. Specifically, the optimization unit calls upon a historical defect evolution trend model, using the adjusted parameter values as input, to make short-term predictions of the severity score trend over several future time steps. These predicted scores are then fed back into the reinforcement learning environment model as alternative signals, thus forming a closed-loop simulation path of parameter perturbation—defect response—policy update. This path not only provides more realistic training feedback than traditional static environments but also ensures that the policy maintains good risk control and defect avoidance performance under unknown operating conditions.
[0216] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
Claims
1. A fabric defect detection and traceability system based on edge computing and computing power scheduling, characterized in that, include: The acquisition unit is used to deploy multispectral imaging equipment and process parameter sensors on the textile production line to acquire fabric surface image data and process parameters respectively. The images and process parameters are time-stamped and aligned through a time synchronization mechanism to construct a multimodal feature tensor dataset corresponding to a unit area of the fabric. Configure edge computing terminals to perform local preprocessing on the collected data, and dynamically schedule and allocate edge computing resources based on the current data load, the available computing power of the terminal, and task priority to ensure the real-time performance and stability of the data preprocessing and uploading process. The modeling unit receives the multimodal feature tensor dataset output by the acquisition unit, combines it with the fabric material, extracts typical texture patterns through an unsupervised contrastive learning algorithm, establishes an adaptive texture dictionary model for the fabric material, and generates the corresponding texture latent fingerprint vector. The detection unit is used to input the potential fingerprint vector output by the modeling unit into a lightweight target detection network with a channel attention mechanism, and output the location coordinates of the suspected defect, the defect type and the severity score. The tracing unit is used to trace back the sequence of equipment and environmental parameters within the corresponding time window based on the defect information output by the detection unit, and to analyze the causal weight relationship between each parameter and the identified defect using a time-series causal inference network to construct a causal graph of the defect parameters. The optimization unit is used to calculate the defect risk index based on the causal graph and severity score generated by the tracing unit, output the corresponding process optimization vector based on the reinforcement learning model, and display the defect risk status, tracing graph and optimization suggestions through the web interface. At the same time, the process optimization vector is sent to the edge controller to adjust the production parameters in real time.
2. The fabric defect detection and traceability system based on edge computing and computing power scheduling according to claim 1, characterized in that, The modeling unit is specifically used for: In the process of generating texture latent fingerprint vectors, a material grouping structured index is constructed based on the material labels corresponding to each fabric unit region in the multimodal feature tensor dataset. For each material group, an unsupervised contrastive learning algorithm is used to generate a set of multi-scale enhanced fragments as positive samples in the same tensor through local perturbation operations, with the randomly selected target region as the benchmark. The local perturbation operations include brightness perturbation, contrast perturbation, and low-amplitude rotation with orientation preservation. At the same time, sample pairs between different material groups or texture fragment pairs with similarity less than a threshold in the same material are set as negative samples. The optimization objectives of the unsupervised contrastive learning algorithm include clustering the latent fingerprint vectors generated by positive samples in the embedding space and minimizing the cosine similarity between them and the latent fingerprint vectors generated by the corresponding negative samples, thereby improving the ability of texture latent fingerprint vectors to discriminate fine-grained material structures and local mutation patterns.
3. The fabric defect detection and traceability system based on edge computing and computing power scheduling according to claim 1, characterized in that, The modeling unit is specifically used for: After training and generating the latent fingerprint vectors of the texture, distribution modeling is performed based on the set of latent fingerprint vectors corresponding to each type of fabric material. A material adaptive texture dictionary model containing multiple multi-center subspaces is constructed through density-aware clustering algorithm. In this context, the centroid vector of each texture subspace is used to define the typical texture representation paradigm under that material, and serves as a modulation factor in the channel attention allocation mechanism of the lightweight object detection network in the detection unit. Specifically, when the detection unit processes the potential fingerprint vector from a specified fabric unit region, the system automatically finds the typical texture subspace that is closest to the vector in the texture dictionary model of its material, and uses the channel response weight mode of that subspace as the initialization condition to guide the lightweight object detection network to prioritize the activation of key channels during feature fusion, thereby improving the sensitivity of defect recognition in areas where local anomalies are not obvious.
4. The fabric defect detection and traceability system based on edge computing and computing power scheduling according to claim 1, characterized in that, The temporal causal reasoning network in the tracing unit specifically includes a bidirectional long short-term memory network with a parameter dimension attention mechanism. The bidirectional long short-term memory network is used to receive the defect type, defect location coordinates and severity score output by the detection unit, and to backtrack the sequence of equipment and environmental parameters within the time window corresponding to the defect from the multimodal feature tensor dataset constructed by the acquisition unit, and extract the temporal variation features of process parameters including loom speed, roll pressure, tension, temperature and humidity. The parameter dimension attention mechanism dynamically allocates attention weights to parameter channels based on the fluctuation patterns of different process parameters before defects occur, thereby enhancing the bidirectional long short-term memory network's ability to identify key parameter variation signals. Based on the output results of the joint encoding of forward and reverse time paths, it generates a causal weight vector to describe the strength of the causal relationship between each process parameter and the identified defects. The causal weight vector is used to construct a causal map of defect parameters.
5. The fabric defect detection and traceability system based on edge computing and computing power scheduling according to claim 4, characterized in that, After generating the causal weight vector, the tracing unit performs causal weight normalization processing on the causal weight vector. The causal weight normalization processing includes: adjusting the normalization amplitude of the causal weights corresponding to each process parameter so that all weight values fall into a preset range and the relative proportions between each weight value remain unchanged. After completing the causal weight normalization process, the tracing unit constructs a causal graph of the defect parameters based on the normalized causal weights of each parameter. The size of each parameter node in the causal graph of the defect parameters represents the strength of the normalized causal weight. The causal graph of the defect parameters is used as the basic data source for the optimization unit to calculate the defect risk index and generate the process optimization vector.
6. The fabric defect detection and traceability system based on edge computing and computing power scheduling according to claim 1, characterized in that, After calculating the defect risk index based on the causal graph and severity score of the defect parameters generated by the tracing unit, the optimization unit constructs a state space to drive the reinforcement learning model. The state space includes: the time change sequence of the defect risk index, the normalized causal weights of each process parameter in the causal graph, the current process parameter setting value and the corresponding process allowable range, the statistical distribution of severity scores output by the detection unit in multiple fabric unit areas in the past, and the graph structure embedding vector extracted from the causal graph of the defect parameters. The graph structure embedding vector encodes the connection pattern, causal strength and centrality of each parameter node in the graph into a fixed-length feature vector through a structural compression network, which is used to guide the policy learning process to focus on the structural features of the defect cause pattern. The optimization unit is based on the policy network in the reinforcement learning model trained in the state space. During the policy optimization process, a reward function that integrates the scoring gradient is constructed. The scoring gradient is composed of the severity score changes output by the detection unit in multiple consecutive time steps. If the score decreases significantly, the system provides positive reinforcement feedback. If the score tends to stabilize or increase, a penalty factor is introduced. The penalty weight is positively correlated with the scoring gradient. The optimization unit introduces a parameter perturbation simulation mechanism during the training process. This mechanism simulates the change in the defect risk index caused by parameter adjustment based on the process optimization vector. It uses a historical defect trend regression model to make short-term predictions of future scoring trends and uses the prediction results as external feedback signals for the reinforcement learning environment model. This forms a parameter policy simulation training process driven by defect risk evolution, thereby improving the stability and effectiveness of the policy network under unknown operating conditions.
7. The fabric defect detection and traceability system based on edge computing and computing power scheduling according to claim 1, characterized in that, In the process of constructing a multimodal feature tensor dataset corresponding to a unit area of the fabric, the acquisition unit adopts a channel expansion mechanism based on local region process parameter mapping. The equipment and environmental parameter data consisting of tension, loom speed, roll pressure, temperature and humidity are broadcast in space and filled with region alignment using the multispectral image channel acquired at the current sampling time as a spatial reference template, forming a process parameter channel with spatial consistency. The channel expansion mechanism includes: embedding the average value and fluctuation amplitude of continuous process parameters within a sampling period as a two-dimensional array into the channel, and expanding the parameter values into a matrix representation consistent with the image channel space size through affine interpolation or convolution smoothing, mapping it to the additional channel dimension of the tensor.
8. The fabric defect detection and traceability system based on edge computing and computing power scheduling according to claim 1, characterized in that, The detection unit is also used for: After the lightweight target detection network outputs the location coordinates, defect type and severity score of suspected defects, a thermal region echo map is constructed based on the texture latent fingerprint vector output by the modeling unit. The thermal region echo map performs local clustering analysis on the latent fingerprint vector through a sliding window method to identify texture abnormal density change regions as local hotspots, and calculates the spatial overlap coefficient between the hotspots and the detection area in combination with the defect location coordinates. For hotspot areas with an overlap exceeding a set threshold, the detection unit treats them as significant texture offset areas, marks them with a high-response channel in the thermal region echo map, and outputs them. At the same time, the thermal region echo map is passed to the source tracing unit as a structured feature to enhance the temporal causal inference network's ability to perform parameter causal analysis on the fabric region corresponding to the current defect location. Specifically, during the causal modeling process, the source tracing unit regards the process parameter channel corresponding to the thermal region location as a key area of focus, and increases the response weight of the parameter sequence in the attention allocation mechanism. The detection unit embeds the hot spot center pattern marked in the thermal region echo map into the subsequent detection of samples of the same material, as the basis for setting the initial weights of the channel attention mechanism of the lightweight target detection network.
Citation Information
Patent Citations
Causal machine learning method for printed fabric defect visual detection
CN116883379A
Battery assembly process defect real-time detection and classification method and system
CN119904704A
Cited By
Method and system for defect detection of multi-textured knitted fabric
CN122367864A