Textile garment-oriented intelligent inspection system and inspection method thereof
Patent Information
- Application Number
- CN202611220757.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-30
AI Technical Summary
[0002]随着纺织服装产业向智能制造方向发展,服装质量检验逐渐由传统人工目检方式向自动化、智能化检测方式转变,现有纺织服装智能检验方法通常依赖机器视觉检测技术,通过采集服装图像并利用图像识别模型进行缺陷检测,由于纺织服装表面纹理复杂,缺陷类型具有尺度变化大、边界不明显以及局部特征差异小等特点,现有方法容易受到光照变化、采集噪声以及织物纹理干扰影响,导致细微缺陷区域识别准确率不足;现有检测方法通常针对单一类型检测数据进行分析,缺少对视觉检测数据、材料检测数据以及工艺过程数据等多源质量信息的可信度评估机制,无法根据不同检测数据的可靠程度进行动态调整,使得部分异常或低可靠数据容易影响最终检验结果
[0070](1)本发明通过构建基于多维可信评价的质量数据增强机制,对不同来源的纺织服装检测数据进行可信程度分析,并依据不同检测模态的数据稳定性、跨模态一致性以及数据完整程度确定对应可信程度,使不同质量数据在融合过程中能够根据自身可靠性进行动态调整,避免因单一检测模态存在噪声、异常或信息缺失导致整体检验结果偏差的问题,提高了多源质量信息融合过程中的有效性和可靠性;
Smart Images

Figure CN123014791A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial quality inspection, specifically to an intelligent inspection system and method for textiles and apparel. Background Technology
[0002] As the textile and apparel industry moves towards intelligent manufacturing, garment quality inspection is gradually shifting from traditional manual visual inspection to automated and intelligent testing methods. Existing intelligent inspection methods for textiles and apparel typically rely on machine vision inspection technology, which collects garment images and uses image recognition models to detect defects. However, due to the complex surface texture of textiles and apparel, defect types are characterized by large scale variations, indistinct boundaries, and small differences in local features. Existing methods are easily affected by changes in lighting, acquisition noise, and interference from fabric texture, resulting in insufficient accuracy in identifying subtle defect areas. Furthermore, existing testing methods usually analyze single-type inspection data and lack a reliability assessment mechanism for multi-source quality information such as visual inspection data, material inspection data, and process data. They cannot dynamically adjust based on the reliability of different inspection data, making it easy for some abnormal or low-reliability data to affect the final inspection results. Summary of the Invention
[0003] To address the above issues and overcome the shortcomings of existing technologies, this invention provides an intelligent inspection system and method for textiles and apparel. This invention constructs a quality data enhancement mechanism based on multi-dimensional reliability evaluation, analyzes the reliability of textile and apparel inspection data from different sources, and determines the corresponding reliability level based on the data stability, cross-modal consistency, and data completeness of different detection modalities. This allows different quality data to dynamically adjust according to their own reliability during the fusion process, avoiding the problem of overall inspection result deviation caused by noise, anomalies, or missing information in a single detection modality, thus improving the effectiveness and reliability of multi-source quality information fusion. Furthermore, this invention constructs a multi-modal quality feature enhancement method guided by reliability weights, specifically enhancing low-reliability quality features and adaptively fusing them with different modal reliability levels. This enables visual inspection information, material attribute information, and process information to form a more complete quality characterization, improving the ability to express quality features in complex textile and apparel production environments and solving the problems of independent different inspection data and insufficient utilization of quality information in existing technologies.
[0004] The technical solution adopted in this invention is as follows: This invention provides an intelligent inspection system for textiles and apparel, including a multi-source quality data acquisition module, a multi-source quality data reliability enhancement module, a defect area intelligent identification module, a quality feature correlation analysis module, a quality status prediction and evaluation module, and an inspection result feedback optimization module, specifically including the following:
[0005] The multi-source quality data acquisition module collects multi-source inspection data corresponding to the textiles and garments to be inspected, including garment visual inspection data, fabric structure inspection data, material property inspection data, and production process data, and performs preliminary processing on the collected data to form the original quality dataset of textiles and garments.
[0006] The multi-source quality data credibility enhancement module performs feature extraction, noise suppression, and reliability analysis based on the original quality dataset of textiles and apparel. By constructing a multi-modal data credibility evaluation mechanism, it determines the credibility weights corresponding to different detection modalities and adaptively fuses the features of different modalities according to the credibility weights to obtain fused quality feature data.
[0007] The defect area intelligent recognition module enhances and finely segments the potential defect area on the surface of the garment based on the fused quality feature data and the corresponding garment image data, and extracts the texture features, morphological features and local spatial features corresponding to the defect area to obtain garment defect feature data.
[0008] The quality feature correlation analysis module constructs a quality status correlation model that includes spatial correlation of clothing regions and temporal correlation of the detection process based on the fused quality feature data and clothing defect feature data. It analyzes the correlation between defect features in different regions and the trend of quality change to obtain the spatiotemporal correlation features of clothing quality.
[0009] The quality status prediction and evaluation module constructs a quality status prediction model based on the spatiotemporal correlation characteristics of quality, historical quality inspection data, and production process parameter data. It predicts the current quality status of textiles and apparel and the future quality change trend, and obtains quality evaluation results and defect risk prediction results.
[0010] The inspection result feedback optimization module optimizes and adjusts the model parameters, detection strategies, and feature analysis processes in the intelligent inspection process based on the quality evaluation results and defect risk prediction results, and outputs the final intelligent inspection results for textiles and apparel.
[0011] Furthermore, the multi-source quality data credibility enhancement module, by constructing a multi-modal data credibility evaluation mechanism, determines the credibility weights corresponding to different detection modalities, and adaptively fuses the features of different modalities based on the credibility weights, specifically including the following steps:
[0012] Step M1: Based on the textile and apparel inspection data acquired by the multi-source quality data acquisition module, feature extraction is performed on different modal data to obtain a multimodal quality feature set, as shown below:
[0013] ;
[0014] in, Represents a set of multimodal quality features. Indicates the first The quality features corresponding to each detection modality include image texture features, color features, material property features, and process parameter features. Indicates the number of data modalities;
[0015] Step M2: Based on the multimodal quality feature set, perform reliability analysis on different modal quality features, calculate the stability index, consistency index, and integrity index corresponding to each modal quality feature, and obtain the modal credibility parameter based on the multidimensional evaluation index:
[0016] ;
[0017] in, Indicates the first The reliability parameters of modal quality characteristics, Indicates the first Stability index of modal quality characteristics Indicates the first Cross-modal consistency index of modal quality characteristics Indicates the first The integrity index of modal quality characteristics, where α, β, and γ represent the corresponding index weight coefficients;
[0018] Step M3: Enhance the quality features of different modalities according to the confidence parameters, input each quality feature into a quality feature denoising network based on an encoding-reconstruction structure, and obtain the denoised and reconstructed quality features through encoding mapping and feature reconstruction.
[0019] ;
[0020] in, Represents the encoding function. Indicates the decoding function. Indicates the first Denoising and reconstruction quality features corresponding to each mode;
[0021] The original quality features and the denoised reconstructed quality features are fused based on the modal confidence parameter:
[0022] ;
[0023] in, Indicates the enhanced first Modal quality characteristics;
[0024] Step M4: Calculate the fusion weights for different modalities based on the enhanced quality feature set and corresponding confidence parameters.
[0025] ;
[0026] in, Indicates the first Multimodal quality feature fusion weights, Indicates the contribution of defect detection;
[0027] Multimodal feature fusion is performed based on the fusion weights:
[0028] ;
[0029] Where Fc represents the obtained trusted fusion quality characteristics.
[0030] Furthermore, step M2 specifically includes the following steps:
[0031] Step M21: Based on the multimodal quality feature set, perform historical state migration analysis on each modal quality feature, calculate the stability index of different modal quality features, and then use the current detection time to obtain the first... The current quality feature is compared with the corresponding modal feature under historical normal detection conditions to obtain the degree of deviation of the current quality feature relative to the historical stable state, and a stability index is determined based on the degree of deviation.
[0032] ;
[0033] in, Indicates the first Stability index of modal quality characteristics Indicates the current detection time. Modal quality characteristics, Indicating the first under normal historical conditions Mean of modal quality characteristics, This indicates the calculation of the L2 norm. This represents a small constant to prevent the denominator from being zero;
[0034] Step M22: Based on the correlation between different modal quality features, calculate the cross-modal consistency index, perform correlation matching on different modal quality features, and calculate the first... The similarity between a modal quality feature and other modal quality features is used to obtain the corresponding consistency index:
[0035] Different modal quality features are mapped to a unified quality feature space through a shared mapping network, represented as follows: ;
[0036] ;
[0037] in, Indicates the first Cross-modal consistency index of modal quality characteristics Indicates the total number of modes. Indicates the first Modal quality characteristics, This represents the function for calculating feature similarity.
[0038] Step M23: Calculate the data integrity index based on the data completeness of each modality's quality data. Determine the corresponding data integrity index based on the missing data ratio, outlier ratio, and valid data ratio in the different modality detection data:
[0039] ;
[0040] in, Indicates the first Modal quality data integrity index Indicates the first The number of missing modal quality data. Indicates the first Number of anomalies in modal quality data Indicates the first Total number of modal quality data;
[0041] Step M24: Based on the stability index, consistency index, and integrity index, calculate the credibility parameters corresponding to each modal quality characteristic, and perform weighted fusion of the evaluation indices to obtain the first... Reliability of modal quality features:
[0042] ;
[0043] in, Indicates the first The reliability parameters of modal quality characteristics Indicates stability index, Indicates cross-modal consistency index, Indicators representing data integrity This represents the weighting coefficient of the corresponding indicator.
[0044] Based on the above calculation process, the modal confidence set is obtained:
[0045] ;
[0046] The modal credibility set is then input into the quality feature enhancement process.
[0047] Furthermore, the intelligent defect area recognition module, based on the fused quality feature data and corresponding garment image data, performs enhancement processing and refined segmentation on potential defect areas on the garment surface, specifically including the following steps:
[0048] Step N1: Construct a defect detection enhancement representation based on the reliable fusion quality features. Based on the texture change features of different regions in the clothing image, a texture enhancement method based on local neighborhood weighting is adopted to suppress the noise region in the image and retain the texture information of the defect edge to obtain the enhanced defect texture representation.
[0049] Step N2: Perform fine segmentation of the defect region based on the defect detection enhancement representation. Extract image features at different scales and adjust feature weights according to the importance of feature channels and spatial location response to obtain defect region features. Generate a defect region mask based on the defect region features.
[0050] Step N3: Construct a defect spatial association graph based on the defect region segmentation results.
[0051] Based on the defect region segmentation mask, the detection area is divided into multiple defect feature regions, and a defect spatial association map is constructed based on the positional relationship, texture similarity relationship and boundary connection relationship between the defect regions.
[0052] The defect space correlation diagram is represented as follows: ;
[0053] in, Represents the defect spatial correlation diagram. Represents the set of nodes in the defect region. This represents the set of associated edges between defective regions;
[0054] Each defect region node corresponds to a local defect feature, represented as follows: ;
[0055] in, Indicates the first Locational characteristics of each defect area Indicates the first Texture features of each defective region Indicates the first Size characteristics of each defect area;
[0056] Step N4: Perform feature aggregation based on the defect spatial association graph. Based on the defect spatial association graph, aggregate features related to the relationships between adjacent defect regions to obtain defect spatial association features. Calculate the node aggregation weight based on the degree of association between defect nodes, using the following formula:
[0057] ;
[0058] in, Indicates the first The adjacent defect region affects the first... The influence weight of each defect area This represents the function for calculating the similarity of defect features. Indicates the relationship with the first A set of neighboring regions associated with a defective region;
[0059] The neighborhood defect features are aggregated based on the weights:
[0060] ;
[0061] in, Indicates the first The updated association features of each defect region Represents the feature mapping matrix, Represents a nonlinear mapping function;
[0062] Step N5: Identify defect categories based on defect association features. Based on defect spatial association features, classify and identify textile and apparel defect types to obtain defect detection results.
[0063] This invention provides an intelligent inspection method for textiles and apparel, specifically including the following steps:
[0064] Step S1: Collect multi-source quality inspection data for textiles and apparel, perform preprocessing, and construct the original quality dataset for textiles and apparel.
[0065] Step S2: Based on the original quality dataset, perform feature extraction and credibility analysis on the quality data of different modalities, and enhance and fuse the quality features according to the modal credibility to obtain credible fused quality features;
[0066] Step S3: Based on the trusted fusion quality features and clothing image data, enhance the identification and fine segmentation of the defect area on the clothing surface, extract the features of the defect area, and obtain the defect detection result;
[0067] Step S4: Based on the trusted fusion quality characteristics and defect detection results, combined with historical quality data and production process data, predict and evaluate the quality status of textiles and apparel to obtain quality evaluation results;
[0068] Step S5: Based on the quality evaluation results, optimize the testing process by adjusting the quality testing parameters and analysis strategies, and output the intelligent inspection results for textiles and apparel.
[0069] The beneficial effects achieved by the present invention using the above solution are as follows:
[0070] (1) This invention constructs a quality data enhancement mechanism based on multidimensional reliability evaluation, analyzes the reliability of textile and apparel testing data from different sources, and determines the corresponding reliability based on the data stability, cross-modal consistency and data completeness of different testing modalities. This enables different quality data to be dynamically adjusted according to their own reliability during the fusion process, avoiding the problem of deviation in the overall inspection results due to noise, anomalies or missing information in a single testing modal, and improving the effectiveness and reliability of the multi-source quality information fusion process.
[0071] (2) This invention constructs a multimodal quality feature enhancement method based on trusted weights to perform targeted enhancement processing on low-reliability quality features, and combines different modal trust levels for adaptive fusion, so that visual inspection information, material property information and process information can form a more complete quality characterization, improve the quality feature expression ability in complex textile and garment production environment, and solve the problems of different inspection data being independent of each other and insufficient utilization of quality information in the prior art. Attached Figure Description
[0072] Figure 1 This is a schematic diagram of an intelligent inspection system for textiles and apparel proposed in this invention.
[0073] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0074] The present invention will be described in detail below with reference to the accompanying drawings and embodiments to further understand the technical solution of the present invention. It should be noted that the embodiments described only illustrate one implementation of the technical solution of the present invention, and the present invention is not limited to this implementation. All adjustments, modifications, or substitutions made based on the technical concept of the present invention without changing the core technical solution should fall within the protection scope of the present invention.
[0075] Example 1, see Figure 1 This invention provides an intelligent inspection system for textiles and apparel, comprising a multi-source quality data acquisition module, a multi-source quality data reliability enhancement module, a defect area intelligent identification module, a quality feature correlation analysis module, a quality status prediction and evaluation module, and an inspection result feedback optimization module, specifically including the following:
[0076] The multi-source quality data acquisition module collects multi-source inspection data corresponding to the textiles and garments to be inspected, including garment visual inspection data, fabric structure inspection data, material property inspection data, and production process data, and performs preliminary processing on the collected data to form the original quality dataset of textiles and garments.
[0077] The multi-source quality data credibility enhancement module performs feature extraction, noise suppression, and reliability analysis based on the original quality dataset of textiles and apparel. By constructing a multi-modal data credibility evaluation mechanism, it determines the credibility weights corresponding to different detection modalities and adaptively fuses the features of different modalities according to the credibility weights to obtain fused quality feature data.
[0078] The defect area intelligent recognition module enhances and finely segments the potential defect area on the surface of the garment based on the fused quality feature data and the corresponding garment image data, and extracts the texture features, morphological features and local spatial features corresponding to the defect area to obtain garment defect feature data.
[0079] The quality feature correlation analysis module constructs a quality status correlation model that includes spatial correlation of clothing regions and temporal correlation of the detection process based on the fused quality feature data and clothing defect feature data. It analyzes the correlation between defect features in different regions and the trend of quality change to obtain the spatiotemporal correlation features of clothing quality.
[0080] The quality status prediction and evaluation module constructs a quality status prediction model based on the spatiotemporal correlation characteristics of quality, historical quality inspection data, and production process parameter data. It predicts the current quality status of textiles and apparel and the future quality change trend, and obtains quality evaluation results and defect risk prediction results.
[0081] The inspection result feedback optimization module optimizes and adjusts the model parameters, detection strategies, and feature analysis processes in the intelligent inspection process based on the quality evaluation results and defect risk prediction results, and outputs the final intelligent inspection results for textiles and apparel.
[0082] Example 2: Based on the above examples, the multi-source quality data credibility enhancement module determines the credibility weights corresponding to different detection modalities by constructing a multi-modal data credibility evaluation mechanism, and adaptively fuses the features of different modalities according to the credibility weights. Specifically, it includes the following steps:
[0083] Step M1: Based on the textile and apparel inspection data acquired by the multi-source quality data acquisition module, feature extraction is performed on different modal data to obtain a multimodal quality feature set, as shown below:
[0084] ;
[0085] in, Represents a set of multimodal quality features. Indicates the first The quality features corresponding to each detection modality include image texture features, color features, material property features, and process parameter features. Indicates the number of data modalities;
[0086] Step M2: Based on the multimodal quality feature set, perform reliability analysis on different modal quality features, calculate the stability index, consistency index, and integrity index corresponding to each modal quality feature, and obtain the modal credibility parameter based on the multidimensional evaluation index:
[0087] ;
[0088] in, Indicates the first The reliability parameters of modal quality characteristics, Indicates the first Stability index of modal quality characteristics Indicates the first Cross-modal consistency index of modal quality characteristics Indicates the first The integrity index of modal quality characteristics, where α, β, and γ represent the corresponding index weight coefficients;
[0089] Step M3: Enhance the quality features of different modalities according to the confidence parameters, input each quality feature into a quality feature denoising network based on an encoding-reconstruction structure, and obtain the denoised and reconstructed quality features through encoding mapping and feature reconstruction.
[0090] ;
[0091] in, Represents the encoding function. Indicates the decoding function. Indicates the first Denoising and reconstruction quality features corresponding to each mode;
[0092] The original quality features and the denoised reconstructed quality features are fused based on the modal confidence parameter:
[0093] ;
[0094] in, Indicates the enhanced first Modal quality characteristics;
[0095] Step M4: Calculate the fusion weights for different modalities based on the enhanced quality feature set and corresponding confidence parameters.
[0096] ;
[0097] in, Indicates the first Multimodal quality feature fusion weights, Indicates the contribution of defect detection;
[0098] Multimodal feature fusion is performed based on the fusion weights:
[0099] ;
[0100] Where Fc represents the obtained trusted fusion quality characteristics.
[0101] Example 3, based on the above examples, specifically includes the following steps in step M2:
[0102] Step M21: Based on the multimodal quality feature set, perform historical state migration analysis on each modal quality feature, calculate the stability index of different modal quality features, and then use the current detection time to obtain the first... The current quality feature is compared with the corresponding modal feature under historical normal detection conditions to obtain the degree of deviation of the current quality feature relative to the historical stable state, and a stability index is determined based on the degree of deviation.
[0103] ;
[0104] in, Indicates the first Stability index of modal quality characteristics Indicates the current detection time. Modal quality characteristics, Indicating the first under normal historical conditions Mean of modal quality characteristics, This indicates the calculation of the L2 norm. This represents a small constant to prevent the denominator from being zero;
[0105] Step M22: Based on the correlation between different modal quality features, calculate the cross-modal consistency index, perform correlation matching on different modal quality features, and calculate the first... The similarity between a modal quality feature and other modal quality features is used to obtain the corresponding consistency index:
[0106] Different modal quality features are mapped to a unified quality feature space through a shared mapping network, represented as follows: ;
[0107] ;
[0108] in, Indicates the first Cross-modal consistency index of modal quality characteristics Indicates the total number of modes. Indicates the first Modal quality characteristics, This represents the function for calculating feature similarity.
[0109] Step M23: Calculate the data integrity index based on the data completeness of each modality's quality data. Determine the corresponding data integrity index based on the missing data ratio, outlier ratio, and valid data ratio in the different modality detection data:
[0110] ;
[0111] in, Indicates the first Modal quality data integrity index Indicates the first The number of missing modal quality data. Indicates the first Number of anomalies in modal quality data Indicates the first Total number of modal quality data;
[0112] Step M24: Based on the stability index, consistency index, and integrity index, calculate the credibility parameters corresponding to each modal quality characteristic, and perform weighted fusion of the evaluation indices to obtain the first... Reliability of modal quality features:
[0113] ;
[0114] in, Indicates the first The reliability parameters of modal quality characteristics Indicates stability index, Indicates cross-modal consistency index, Indicators representing data integrity This represents the weighting coefficient of the corresponding indicator.
[0115] Based on the above calculation process, the modal confidence set is obtained:
[0116] ;
[0117] The modal credibility set is then input into the quality feature enhancement process.
[0118] In this embodiment, a batch of cotton knitted garments from a textile and apparel production line is used as the inspection object. The reliability of data from different inspection modalities is evaluated through a multi-source quality data reliability enhancement module. The specific implementation process is as follows:
[0119] During the garment quality inspection process, the multi-source quality data acquisition module acquires multi-source test data corresponding to the garment to be inspected, including garment surface image data, fabric structure test data, material performance test data, and production process parameter data.
[0120] The garment surface image data includes information on color distribution, texture variation, and edge structure; the fabric structure detection data includes fabric density and yarn arrangement; the material performance detection data includes fiber strength and abrasion resistance; and the production process parameter data includes dyeing temperature, processing time, and equipment operating status.
[0121] Feature extraction is performed on the above-mentioned different modal detection data to obtain corresponding quality features. Image texture feature vector F1 is extracted from clothing surface image data, structural feature vector F2 is extracted from fabric structure detection data, material feature vector F3 is extracted from material performance detection data, and process feature vector F4 is extracted from production process parameter data, forming a multimodal quality feature set. Historical state offset analysis is performed on each modal quality feature.
[0122] In this embodiment, the system stores the quality characteristic data corresponding to the historical normal production state of the production line, and compares the currently detected quality characteristics with the corresponding characteristics under the historical normal state.
[0123] In the current batch of tests, the texture features obtained by detecting clothing images do not deviate from the texture features under normal historical conditions, indicating that the current image acquisition state is stable, thus obtaining a high stability index.
[0124] During the production process parameter detection process, temperature fluctuations during equipment operation cause the current process parameter characteristics to deviate from the historical stable state, thus obtaining a lower stability index.
[0125] Through the above calculations, the stability indices corresponding to the image mode, fabric structure mode, material property mode, and process parameter mode are obtained respectively.
[0126] The consistency between different modal quality characteristics is analyzed, different modal quality characteristics are mapped to a unified quality characteristic space, and the degree of correlation between different modal characteristics is calculated;
[0127] When clothing image detection detects abnormal fabric texture in a certain area, and at the same time the fabric structure detection results show that the fabric density in that area is reduced, and the material performance detection results show that the fiber strength is reduced, then there is a high correlation and consistency among the above multiple detection modes.
[0128] If the image detection results of the garment show abnormal color, but the dyeing process parameters and material performance test data are within the normal range, then the consistency between the image modal detection results and other modalities is considered to be low.
[0129] Based on the correlation between different modal features, cross-modal consistency indices are obtained for each modality.
[0130] Data integrity index was calculated based on the completeness of the detection data for each modality. During the detection process, 1,000 sets of clothing image data were collected completely without any missing data. Due to a brief malfunction of the sensing equipment, some detection records of the fabric structure detection data were missing. Some abnormal records were found in the production process parameter data.
[0131] Based on the number of missing data, outliers, and valid data in different modal data, the corresponding data integrity index is calculated. The stability index, cross-modal consistency index, and data integrity index are weighted and fused to obtain the credibility parameter for each modality.
[0132] The calculations obtained in this embodiment are as follows:
[0133] The modal confidence level of the clothing image is Q1=0.86;
[0134] The fabric structure modal confidence level Q2 = 0.91;
[0135] Material property modal reliability Q3 = 0.88;
[0136] The modal reliability of the production process parameters is Q4=0.76.
[0137] Based on the above calculation results, a modal confidence set is formed:
[0138] Q = {Q1, Q2, Q3, Q4};
[0139] Subsequently, the modal confidence set is input into the quality feature enhancement process. The subsequent feature enhancement ratio is adjusted according to the confidence level of different modal data. For fabric structure features and material performance features with high confidence, more original detection information is retained. For production process parameter features with low confidence, the impact of abnormal data on the quality judgment results is reduced through enhancement processing.
[0140] Example 4: Based on the above examples, the intelligent defect area recognition module enhances and finely segments potential defect areas on the garment surface according to the fused quality feature data and corresponding garment image data. Specifically, it includes the following steps:
[0141] Step N1: Construct a defect detection enhancement representation based on the reliable fusion quality features. Based on the texture change features of different regions in the clothing image, a texture enhancement method based on local neighborhood weighting is adopted to suppress the noise region in the image and retain the texture information of the defect edge to obtain the enhanced defect texture representation.
[0142] Step N2: Perform fine segmentation of the defect region based on the defect detection enhancement representation. Extract image features at different scales and adjust feature weights according to the importance of feature channels and spatial location response to obtain defect region features. Generate a defect region mask based on the defect region features.
[0143] Step N3: Construct a defect spatial association graph based on the defect region segmentation results.
[0144] Based on the defect region segmentation mask, the detection area is divided into multiple defect feature regions, and a defect spatial association map is constructed based on the positional relationship, texture similarity relationship and boundary connection relationship between the defect regions.
[0145] The defect space correlation diagram is represented as follows: ;
[0146] in, Represents the defect spatial correlation diagram. Represents the set of nodes in the defect region. This represents the set of associated edges between defective regions;
[0147] Each defect region node corresponds to a local defect feature, represented as follows: ;
[0148] in, Indicates the first Locational characteristics of each defect area Indicates the first Texture features of each defective region Indicates the first Size characteristics of each defect area;
[0149] Step N4: Perform feature aggregation based on the defect spatial association graph. Based on the defect spatial association graph, aggregate features related to the relationships between adjacent defect regions to obtain defect spatial association features. Calculate the node aggregation weight based on the degree of association between defect nodes, using the following formula:
[0150] ;
[0151] in, Indicates the first The adjacent defect region affects the first... The influence weight of each defect area This represents the function for calculating the similarity of defect features. Indicates the relationship with the first A set of neighboring regions associated with a defective region;
[0152] The neighborhood defect features are aggregated based on the weights:
[0153] ;
[0154] in, Indicates the first The updated association features of each defect region Represents the feature mapping matrix, Represents a nonlinear mapping function;
[0155] Step N5: Identify defect categories based on defect association features. Based on defect spatial association features, classify and identify textile and apparel defect types to obtain defect detection results.
[0156] In this embodiment, the implementation code used is as follows:
[0157] import cv2
[0158] import numpy as np
[0159] import torch
[0160] import torch.nn.functional as F
[0161] # N1: Texture enhancement based on local neighborhood weighting
[0162] def texture_enhancement(image):
[0163] gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
[0164] # Local texture enhancement
[0165] local_mean = cv2.blur(gray, (5, 5))
[0166] # Calculate the degree of texture variation
[0167] texture_difference = cv2.absdiff(gray, local_mean)
[0168] # Preserve edge texture
[0169] enhanced = cv2.addWeighted(
[0170] gray,
[0171] 0.7,
[0172] texture_difference,
[0173] 0.3, 0 )
[0176] return enhanced
[0177] # N2: Fine segmentation of defect areas
[0178] def defect_segmentation(enhanced_image):
[0179] # Adaptive threshold for obtaining defect area
[0180] mask = cv2.adaptiveThreshold(
[0181] enhanced_image,
[0182] 255,
[0183] cv2.ADAPTIVE_THRESH_GAUSSIAN_C,
[0184] cv2.THRESH_BINARY,
[0185] 31, 5 )
[0188] # Remove minor noise
[0189] kernel = np.ones((3,3), np.uint8)
[0190] mask = cv2.morphologyEx(
[0191] mask,
[0192] cv2.MORPH_OPEN,
[0193] kernel )
[0195] return mask
[0196] # N3: Construct a spatial correlation diagram based on the defect area
[0197] def build_defect_graph(mask, image):
[0198] contours, _ = cv2.findContours(
[0199] mask,
[0200] cv2.RETR_EXTERNAL,
[0201] cv2.CHAIN_APPROX_SIMPLE )
[0203] nodes = []
[0204] # Building Defect Nodes
[0205] For contour in contours:
[0206] area = cv2.contourArea(contour)
[0207] if area < 20:
[0208] continue
[0209] x,y,w,h = cv2.boundingRect(contour)
[0210] # Location Features
[0211] position = np.array( [
[0213] x,
[0214] y ] )
[0217] # Texture features
[0218] region = image[y:y+h,x:x+w]
[0219] texture = np.mean(region)
[0220] # Size characteristics
[0221] size = np.array( [
[0223] w,
[0224] h ] )
[0227] node_feature=np.concatenate( [
[0229] position,
[0230] [texture],
[0231] size ] )
[0234] nodes.append(node_feature)
[0235] # Construct node-associated edges
[0236] edges=[]
[0237] for i in range(len(nodes)):
[0238] for j in range(i+1,len(nodes)):
[0239] # Calculate node similarity
[0240] similarity = cosine_similarity(
[0241] nodes[i],
[0242] nodes[j] )
[0244] if similarity > 0.6:
[0245] edges.append( (
[0247] i,
[0248] j,
[0249] similarity ) )
[0252] return nodes, edges
[0253] # Defect Node Similarity Calculation
[0254] def cosine_similarity(a,b):
[0255] return np.dot(a,b) / (
[0256] np.linalg.norm(a)
[0257] *
[0258] np.linalg.norm(b)
[0259] +
[0260] 1e-8 )
[0262] # N4: Feature aggregation based on defect space correlation graph
[0263] def graph_feature_aggregation(nodes,edges):
[0264] node_features = np.array(nodes)
[0265] new_features=[
[0266] for i,node in enumerate(node_features):
[0267] neighbor=[]
[0268] for edge in edges:
[0269] if edge[0]==i:
[0270] neighbor.append(
[0271] node_features[edge[1]] )
[0273] elif edge[1]==i:
[0274] neighbor.append(
[0275] node_features[edge[0]] )
[0277] # No adjacent nodes
[0278] if len(neighbor) == 0:
[0279] new_features.append(node)
[0280] continue
[0281] neighbor = np.array(neighbor)
[0282] # Calculate association weights
[0283] weights=[]
[0284] for n in neighbor:
[0285] sim=cosine_similarity(
[0286] node,
[0287] n )
[0289] weights.append(
[0290] np.exp(sim) )
[0292] weights = np.array(weights)
[0293] weights=weights / np.sum(weights)
[0294] # Feature Aggregation
[0295] aggregate = np.sum(
[0296] neighbor*weights.reshape(-1,1),
[0297] axis=0 )
[0299] # Integrating its own characteristics
[0300] feature=0.5*node+0.5*aggregate
[0301] new_features.append(feature)
[0302] return np.array(new_features)
[0303] # N5: Defect Category Identification
[0304] def defect_classification(features):
[0305] results=[]
[0306] for feature in features:
[0307] texture_value=feature[2]
[0308] size_value=feature[3]*feature[4]
[0309] if texture_value>150:
[0310] defect="color anomaly"
[0311] elif size_value>500:
[0312] defect="fabric damage"
[0313] else:
[0314] defect="texture anomaly"
[0315] results.append(
[0316] defect )
[0318] return results
[0319] # ===============================
[0320] # Main Process
[0321] # ===============================
[0322] if __name__=="__main__":
[0323] # Input clothing detection image
[0324] image = cv2.imread(
[0325] "clothes_test.jpg" )
[0327] # N1
[0328] enhanced=texture_enhancement(
[0329] image )
[0331] # N2
[0332] mask=defect_segmentation(
[0333] enhanced )
[0335] # N3
[0336] nodes,edges=build_defect_graph(
[0337] mask,
[0338] image )
[0340] # N4
[0341] defect_features=graph_feature_aggregation(
[0342] nodes
[0343] edges )
[0345] # N5
[0346] result=defect_classification(
[0347] defect_features )
[0349] print(
[0350] "Defect detection results:",
[0351] result
[0352] ).
[0353] Example 5: Based on the above examples, the quality feature correlation analysis module constructs a quality correlation model based on multi-source quality feature correlation relationships to analyze the correlation between defect features and quality status. Specifically, it includes the following steps:
[0354] Step P1: Based on the trusted fusion quality features output by the trusted quality data enhancement module and the defect features output by the defect area intelligent identification module, quality information from different sources is uniformly represented, and a set of quality-related features is constructed, including quality status features, defect area features, material property features, and process features.
[0355] Step P2: Based on the set of quality-related features, analyze the correlation between different quality features, construct a quality feature correlation network, take different types of quality features as correlation nodes, establish node connection relationships based on the spatial relationship, attribute similarity relationship and influence relationship between features, and form a quality correlation network containing defect information, material information and process information;
[0356] Step P3: Based on the quality feature association network, analyze the degree of influence between different quality factors, determine the association weight between different quality features, and enhance the important features that affect the current quality status and weaken the features with low association degree according to the degree of association between defect area features and other quality features, thereby obtaining dynamic quality association relationships.
[0357] Step P4: Based on the dynamic quality association relationship, perform information interaction and feature fusion on the quality features in the association network to obtain quality association state features;
[0358] Step P5: Generate quality correlation analysis results based on the quality correlation status characteristics. The quality correlation analysis results include defect influencing factors, quality correlation degree, and quality status correlation characteristics.
[0359] Example 6: Based on the above examples, this example provides an intelligent inspection method for textiles and apparel, specifically including the following steps:
[0360] Step S1: Collect multi-source quality inspection data for textiles and apparel, perform preprocessing, and construct the original quality dataset for textiles and apparel.
[0361] Step S2: Based on the original quality dataset, perform feature extraction and credibility analysis on the quality data of different modalities, and enhance and fuse the quality features according to the modal credibility to obtain credible fused quality features;
[0362] Step S3: Based on the trusted fusion quality features and clothing image data, enhance the identification and fine segmentation of the defect area on the clothing surface, extract the features of the defect area, and obtain the defect detection result;
[0363] Step S4: Based on the trusted fusion quality characteristics and defect detection results, combined with historical quality data and production process data, predict and evaluate the quality status of textiles and apparel to obtain quality evaluation results;
[0364] Step S5: Based on the quality evaluation results, optimize the testing process by adjusting the quality testing parameters and analysis strategies, and output the intelligent inspection results for textiles and apparel.
[0365] It should be noted that the terms "first" and "second" used in this application are only used to distinguish different technical features, steps or objects, and do not indicate that there is a specific sequential relationship between the relevant technical features, steps or objects, nor are they used to limit their actual quantity or importance.
[0366] Furthermore, the terms "including," "comprising," "having," and similar expressions used in this application are all open-ended definitions, meaning that they cover the technical content explicitly stated in the described technical solution, while allowing for the existence of other technical features, components, or equivalent structures that can be understood by those skilled in the art that are not explicitly listed.
[0367] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Those skilled in the art, based on their understanding of the technical concept of the present invention, may adjust, substitute, combine, or make equivalent transformations to the technical features in the above embodiments without departing from the core ideas and technical effects of the present invention; such adjustments should be included within the scope of protection defined by the claims of the present invention.
[0368] It should be understood that the content shown in the accompanying drawings is only one specific embodiment of the present invention, and adjustments can be made according to the specific application environment, equipment conditions, and implementation requirements in actual applications. The scope of protection of the present invention shall be determined by the scope defined in the claims. All equivalent substitutions or conventional changes made based on the technical concept of the present invention shall fall within the scope of protection of the present invention.
Claims
1. An intelligent inspection system for textiles and apparel, characterized in that: It includes a multi-source quality data acquisition module, a multi-source quality data reliability enhancement module, a defect area intelligent identification module, a quality feature correlation analysis module, a quality status prediction and evaluation module, and an inspection result feedback optimization module, specifically including the following: The multi-source quality data acquisition module collects multi-source detection data corresponding to the textiles and garments to be inspected, and performs preliminary processing on the collected data to form the original quality dataset of textiles and garments. The multi-source quality data credibility enhancement module performs feature extraction, noise suppression, and reliability analysis based on the original quality dataset of textiles and apparel. By constructing a multi-modal data credibility evaluation mechanism, it obtains fused quality feature data. The defect area intelligent recognition module enhances and finely segments the potential defect area on the surface of the garment based on the fused quality feature data and the corresponding garment image data, and extracts the texture features, morphological features and local spatial features corresponding to the defect area to obtain garment defect feature data. The quality feature correlation analysis module constructs a quality status correlation model that includes spatial correlation of clothing regions and temporal correlation of the detection process based on the fused quality feature data and clothing defect feature data. It analyzes the correlation between defect features in different regions and the trend of quality change to obtain the spatiotemporal correlation features of clothing quality. The quality status prediction and evaluation module constructs a quality status prediction model based on the spatiotemporal correlation characteristics of quality, historical quality inspection data, and production process parameter data. It predicts the current quality status of textiles and apparel and the future quality change trend, and obtains quality evaluation results and defect risk prediction results. The inspection result feedback optimization module optimizes and adjusts the model parameters, detection strategies, and feature analysis processes in the intelligent inspection process based on the quality evaluation results and defect risk prediction results, and outputs the final intelligent inspection results for textiles and apparel.
2. The intelligent inspection system for textiles and apparel according to claim 1, characterized in that: The multi-source quality data credibility enhancement module determines the credibility weights corresponding to different detection modalities by constructing a multi-modal data credibility evaluation mechanism, and adaptively fuses features of different modalities based on the credibility weights. Specifically, this includes the following steps: Step M1: Based on the textile and apparel inspection data acquired by the multi-source quality data acquisition module, feature extraction is performed on different modal data to obtain a multimodal quality feature set, as shown below: ; in, Represents a set of multimodal quality features. Indicates the first The quality features corresponding to each detection modality include image texture features, color features, material property features, and process parameter features. Indicates the number of data modalities; Step M2: Based on the multimodal quality feature set, perform reliability analysis on different modal quality features, calculate the stability index, consistency index, and integrity index corresponding to each modal quality feature, and obtain the modal credibility parameter based on the multidimensional evaluation index: ; in, Indicates the first The reliability parameters of modal quality characteristics, Indicates the first Stability index of modal quality characteristics Indicates the first Cross-modal consistency index of modal quality characteristics Indicates the first The integrity index of modal quality characteristics, where α, β, and γ represent the corresponding index weight coefficients; Step M3: Enhance the quality features of different modalities according to the confidence parameters, input each quality feature into a quality feature denoising network based on an encoding-reconstruction structure, and obtain the denoised and reconstructed quality features through encoding mapping and feature reconstruction. ; in, Represents the encoding function. Indicates the decoding function. Indicates the first Denoising and reconstruction quality features corresponding to each mode; The original quality features and the denoised reconstructed quality features are fused based on the modal confidence parameter: ; in, Indicates the enhanced first Modal quality characteristics; Step M4: Calculate the fusion weights for different modalities based on the enhanced quality feature set and corresponding confidence parameters. ; in, Indicates the first Multimodal quality feature fusion weights, Indicates the contribution of defect detection; Multimodal feature fusion is performed based on the fusion weights: ; Where Fc represents the obtained trusted fusion quality characteristics.
3. The intelligent inspection system for textiles and apparel according to claim 2, characterized in that: Step M2 specifically includes the following steps: Step M21: Based on the multimodal quality feature set, perform historical state migration analysis on each modal quality feature, calculate the stability index of different modal quality features, and then use the current detection time to obtain the first... The current quality feature is compared with the corresponding modal feature under historical normal detection conditions to obtain the degree of deviation of the current quality feature relative to the historical stable state, and a stability index is determined based on the degree of deviation. ; in, Indicates the first Stability index of modal quality characteristics Indicates the current detection time. Modal quality characteristics, Indicating the first under normal historical conditions Mean of modal quality characteristics, This indicates the calculation of the L2 norm. This represents a small constant to prevent the denominator from being zero; Step M22: Based on the correlation between different modal quality features, calculate the cross-modal consistency index, perform correlation matching on different modal quality features, and calculate the first... The similarity between a modal quality feature and other modal quality features is used to obtain the corresponding consistency index: Different modal quality features are mapped to a unified quality feature space through a shared mapping network, which is represented as follows: ; ; in, Indicates the first Cross-modal consistency index of modal quality characteristics Indicates the total number of modes. Indicates the first Modal quality characteristics, This represents the function for calculating feature similarity. Step M23: Calculate the data integrity index based on the data completeness of each modality's quality data. Determine the corresponding data integrity index based on the missing data ratio, outlier ratio, and valid data ratio in the different modality detection data: ; in, Indicates the first Modal quality data integrity index Indicates the first The number of missing modal quality data. Indicates the first Number of anomalies in modal quality data Indicates the first Total number of modal quality data; Step M24: Based on the stability index, consistency index, and integrity index, calculate the credibility parameters corresponding to each modal quality characteristic, and perform weighted fusion of the evaluation indices to obtain the first... Reliability of modal quality features: ; in, Indicates the first The reliability parameters of modal quality characteristics Indicates stability index, Indicates cross-modal consistency index, Indicators representing data integrity This represents the weighting coefficient of the corresponding indicator. Based on the above calculation process, the modal confidence set is obtained: ; The modal credibility set is then input into the quality feature enhancement process.
4. The intelligent inspection system for textiles and apparel according to claim 1, characterized in that: The intelligent defect area recognition module enhances and finely segments potential defect areas on the garment surface based on fused quality feature data and corresponding garment image data. Specifically, it includes the following steps: Step N1: Construct a defect detection enhancement representation based on the reliable fusion quality features. Based on the texture change features of different regions in the clothing image, a texture enhancement method based on local neighborhood weighting is adopted to suppress the noise region in the image and retain the texture information of the defect edge to obtain the enhanced defect texture representation. Step N2: Perform fine segmentation of the defect region based on the defect detection enhancement representation. Extract image features at different scales and adjust feature weights according to the importance of feature channels and spatial location response to obtain defect region features. Generate a defect region mask based on the defect region features. Step N3: Construct a defect spatial association graph based on the defect region segmentation results. Based on the defect region segmentation mask, the detection area is divided into multiple defect feature regions, and a defect spatial association map is constructed based on the positional relationship, texture similarity relationship and boundary connection relationship between the defect regions. The defect space correlation diagram is represented as follows: ; in, Represents the defect spatial correlation diagram. Represents the set of nodes in the defect region. This represents the set of associated edges between defective regions; Each defect region node corresponds to a local defect feature, represented as follows: ; in, Indicates the first Locational characteristics of each defect area Indicates the first Texture features of each defective region Indicates the first Size characteristics of each defect area; Step N4: Perform feature aggregation based on the defect spatial association graph. Based on the defect spatial association graph, aggregate features related to the relationships between adjacent defect regions to obtain defect spatial association features. Calculate the node aggregation weight based on the degree of association between defect nodes, using the following formula: ; in, Indicates the first The adjacent defect region affects the first... The influence weight of each defect area This represents the function for calculating the similarity of defect features. Indicates the relationship with the first A set of neighboring regions associated with a defective region; The neighborhood defect features are aggregated based on the weights: ; in, Indicates the first The updated association features of each defect region Represents the feature mapping matrix, Represents a nonlinear mapping function; Step N5: Identify defect categories based on defect association features. Based on defect spatial association features, classify and identify textile and apparel defect types to obtain defect detection results.
5. The present invention provides an intelligent inspection method for textiles and apparel, based on claims 1-4, characterized in that: Specifically, the following steps are included: Step S1: Collect multi-source quality inspection data for textiles and apparel, perform preprocessing, and construct the original quality dataset for textiles and apparel. Step S2: Based on the original quality dataset, perform feature extraction and credibility analysis on the quality data of different modalities, and enhance and fuse the quality features according to the modal credibility to obtain credible fused quality features; Step S3: Based on the trusted fusion quality features and clothing image data, enhance the identification and fine segmentation of the defect area on the clothing surface, extract the features of the defect area, and obtain the defect detection result; Step S4: Based on the reliable fusion quality characteristics and defect detection results, combined with historical quality data and production process data, predict and evaluate the quality status of textiles and apparel to obtain quality evaluation results; Step S5: Based on the quality evaluation results, optimize the testing process by adjusting the quality testing parameters and analysis strategies, and output the intelligent inspection results for textiles and apparel.