An AI vision-based textile dyeing defect intelligent detection method and system
By combining multimodal image acquisition and adaptive processing with a dual-feature separation network, the problem of misjudgment in textile dyeing defect detection is solved, achieving efficient and accurate differentiation between wrinkles and dyeing defects, thus improving the detection efficiency and quality control of the production line.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU XIN SI LU TEXTILE TECH CO LTD
- Filing Date
- 2025-11-17
- Publication Date
- 2026-05-29
AI Technical Summary
Existing textile dyeing defect detection technologies are inefficient, have poor adaptability, and have a high false positive rate. They are also difficult to distinguish between wrinkles and dyeing defects, leading to increased production costs and reduced efficiency.
An AI visual inspection method is adopted, which involves multimodal image acquisition, adaptive image preprocessing, and dual-feature separation, recognition and classification. Images are acquired through a multi-angle industrial camera array and a multispectral light source. Combined with adaptive threshold segmentation, edge detection and texture direction filtering, a dual-feature separation network is used to accurately distinguish between wrinkles and staining defects. Interference is shielded through a mutual exclusion attention mechanism to complete defect localization and result output.
It achieves high-precision, low-false-judgment-rate dyeing defect detection, adapts to various fabrics and dyeing processes, improves the detection efficiency and quality control of the production line, and provides rich data support to optimize the production process.
Smart Images

Figure CN121504871B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of textile quality inspection technology, specifically to an AI-based intelligent detection method and system for textile dyeing defects. Background Technology
[0002] As a crucial step in the textile production process, the dyeing process directly impacts the quality and market value of the final product. During the dyeing process, fluctuations in process parameters, such as improper control of dye concentration, temperature, and time, can easily lead to various dyeing defects, such as color spots, color differences, and uneven dyeing. At the same time, during the transport and processing of fabrics, wrinkles can easily form due to mechanical action and tension changes. These dyeing defects and wrinkles not only reduce the aesthetics of textiles but also affect their physical properties, causing products to fail to meet quality standards and resulting in economic losses for manufacturing enterprises.
[0003] Currently, existing textile dyeing defect detection technologies have significant limitations. Manual inspection relies heavily on the experience of inspectors, which is not only inefficient but also highly susceptible to subjective factors, resulting in poor stability and failing to meet the demands of rapid and accurate inspection on large-scale production lines. While traditional machine vision inspection technology has improved efficiency to some extent, it typically employs fixed algorithms, which are not adaptable to different fabric textures and dyeing processes. Differences in the texture characteristics, fiber structure, and dyeing processes of different fabrics can lead to deviations in feature extraction and defect identification. Furthermore, existing technologies cannot effectively distinguish between wrinkles and dyeing defects. Since wrinkles and dyeing defects may exhibit similar features in images, traditional technologies are prone to misclassifying wrinkles as dyeing defects or vice versa, leading to misjudgments. Such misjudgments result in the missorting of non-conforming products or the omission of qualified products, increasing production costs, reducing production efficiency, and failing to meet the high quality inspection requirements of modern textile production. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide an AI-based intelligent detection method and system for textile dyeing defects. It can acquire comprehensive and high-quality basic data through multimodal image acquisition, optimize image quality and fuse multimodal information using adaptive image preprocessing, reduce subsequent computation by extracting defect candidate regions, and accurately distinguish between wrinkles and dyeing defects by using dual-feature separation recognition and classification. Finally, it completes defect localization and result output, effectively solving the problems of low efficiency, poor adaptability and high misjudgment rate of traditional technologies, and can meet the real-time control needs of dyeing production lines for various fabrics.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: an AI-based intelligent detection method and system for textile dyeing defects, the method comprising the following specific steps:
[0006] Multimodal image acquisition: Deploy a multi-angle industrial camera array and a multispectral light source containing white light, blue light, and near-infrared light at the inspection station on the production line. Dynamically match the acquisition frame rate and light source brightness through synchronous control components to synchronously acquire and form a multimodal raw image set;
[0007] Adaptive image preprocessing: By performing three-level preprocessing operations, including median filtering, adaptive histogram equalization, and feature point matching, on the multimodal original image set, image denoising, feature enhancement, and pixel-level alignment of multimodal images are achieved.
[0008] Defect candidate region extraction: After adaptive threshold segmentation, edge detection and textile texture direction screening, candidate regions containing only suspected dyeing defects and wrinkles are purified.
[0009] Dual-feature separation recognition and classification: The geometric morphological features of folds and the color and texture features of staining defects are extracted by two branches respectively. Interference is shielded by a mutual attention mechanism. The trained network outputs the feature type, confidence score and precise coordinates.
[0010] Defect location and result output: Convert the pixel coordinates of dyeing defects into actual locations, generate inspection reports by associating them with production information, trigger audible and visual warnings for non-conforming products and automatic sorting, and store data to support export and query.
[0011] Furthermore, in the adaptive image preprocessing step, a three-level preprocessing operation is performed on the multimodal original image set: First, median filtering is used to dynamically adjust the size of the filtering window based on the local texture complexity of the image, removing Gaussian noise and salt-and-pepper noise while retaining the detailed features of dyeing defects and wrinkles; second, adaptive histogram equalization technology is used to specifically stretch the local gray-level range of the image, enhancing the gray-level difference between dyeing defects, wrinkles and normal fabric; finally, feature point matching is used to achieve pixel-level precise alignment between visible light images and near-infrared images, fusing complementary information from the two types of images to form the basis of feature representation.
[0012] Furthermore, in the defect candidate region extraction step, foreground-background segmentation is performed on the preprocessed fused image based on the adaptive threshold method to initially screen out suspected regions with gray-level anomalies, including dyeing defects and wrinkles; then, edge detection is used to extract the edge contours of the suspected regions, and combined with the textile texture direction features, false edges caused by the normal texture of the fabric are eliminated; finally, candidate regions containing only suspected dyeing defects and wrinkles are obtained.
[0013] Furthermore, in the dual-feature separation, recognition, and classification steps, the candidate region is input into the trained fold-dyeing defect dual-feature separation network. The dual-feature separation network includes a dual-branch feature extraction structure, a mutual exclusion attention mechanism, and a classification and regression structure. In the dual-branch feature extraction structure, the fold feature branch first extracts basic features and then calculates the geometric shape feature vector related to the fold through geometric parameters. The dyeing defect feature branch extracts features through multi-scale convolution and then combines color space transformation and texture analysis to obtain color texture feature vectors. The mutual exclusion attention mechanism generates mask weight matrices for the two types of features, which suppress the color texture channel in the fold features and the geometric shape channel in the dyeing defect features, respectively, to achieve feature interference shielding. The classification and regression structure outputs the dyeing defect type, fold identifier, and corresponding confidence score through parallel fully connected layers, and obtains the precise feature coordinates by combining bounding box regression. The network training is based on a dual-feature sample library. After data augmentation, the dual branches are initialized with a pre-trained model, and the training is completed using a joint loss function to ensure accurate recognition and mutual differentiation of dyeing defects and folds.
[0014] Furthermore, in the dual-feature separation, recognition, and classification steps, the formula for calculating the geometric feature vector in the dual-branch feature extraction structure is: ,in, It is the feature vector of the geometric shape of the folds. , , These are geometric feature weights, used to balance the contributions of angle, continuity, and curvature to wrinkle recognition. It is the angle of the crease, indicating the direction of the fold. It is the length of the crease continuity, representing the degree of continuity of the folds. It is the maximum crease length, the upper limit of crease length statistically determined by a dual-feature sample library. It is the crease curvature, which characterizes the degree of curvature of the fold.
[0015] Furthermore, in the dual-feature separation, recognition, and classification steps, the staining defect feature branch extracts features through multi-scale convolution, and then combines color space transformation and texture analysis to obtain a color texture feature vector. The calculation formula is as follows: ,in, It is a feature vector of color texture due to staining defects. , It is the weight of color and texture features. It is the color shift gradient of the CIELAB color space, and ASM is the second angular moment of the gray-level co-occurrence matrix.
[0016] Furthermore, in the dual-feature separation, recognition, and classification step, the mutual-exclusive attention mechanism generates mask weight matrices for the two types of features, respectively suppressing the color texture channel in the wrinkle feature and the geometric shape channel in the staining defect feature. The matrices are as follows: ,in, It is a mutual exclusion mask for the wrinkle feature. It is a mutual exclusion mask for staining defect features. It is the suppression intensity coefficient. It is the similarity of feature channels. It is the color texture channel component in the fold feature. It is the color texture channel component in the characteristics of dyeing defects. It is the geometrical channel component in the staining defect characteristics. It is the geometric channel component in the fold feature.
[0017] Furthermore, in the dual-feature separation, recognition, and classification steps, a joint loss function is used for training to ensure accurate identification and differentiation of staining defects and folds. The function formula is as follows: ,in, It is the joint loss value. It uses cross-entropy loss to optimize the accuracy of classifying staining defects and wrinkles. , It is the mutual exclusion loss weight, sum( It is a vector element summation operation.
[0018] Furthermore, in the defect localization and result output step, based on the identification results, the pixel coordinates corresponding to the dyeing defects are selected. Combined with the production line transmission parameters and camera installation space parameters, a coordinate transformation algorithm is used to map the pixel coordinates to physical location information in the actual production scene, achieving precise defect localization. The algorithm formula is as follows: ,in, These are the actual coordinates of the defects in the production environment. These are the pixel coordinates of the defect in the image. These are the coordinates of the principal point in the camera image. It refers to the camera mounting height; It is the focal length of the camera lens; It is the angle between the camera's optical axis and the vertical direction. It is the time difference between the image acquisition time and the arrival of the defect at the inspection station. Then, the defect type, location, confidence level are associated with production information such as production batch and inspection time. At the same time, statistical information such as the number and distribution density of wrinkles are recorded to generate a comprehensive inspection report that includes defect image annotation, wrinkle distribution visualization chart and quality statistics. For the identified non-conforming products, the sound and light warning device is triggered to issue a prompt signal, and at the same time, the production line sorting device is linked to realize the automatic separation of non-conforming products.
[0019] On the other hand, an AI-based intelligent detection method and system for textile dyeing defects, the system comprising:
[0020] Image acquisition unit: Composed of a multi-angle camera array, a multispectral light source and a synchronization control component, to realize synchronous acquisition of multimodal images;
[0021] Data processing unit: Employs industrial-grade embedded processors and hardware acceleration technology to perform three-level preprocessing operations on the multimodal raw image set and refine it to obtain candidate regions;
[0022] Model inference unit: Equipped with high-performance computing components and deployed with a dual-feature separation network to support real-time inference of batch images;
[0023] Result output unit: includes display component, early warning component and storage component, to realize visualization of detection information, early warning of non-conforming products and data retention;
[0024] Self-learning update unit: Collects new samples through the network interface and executes incremental training strategies to update the sample library and network parameters.
[0025] Compared with existing technologies, this AI-based intelligent detection method and system for textile dyeing defects has the following advantages:
[0026] I. This invention employs a combination of a dual-feature separation network and a mutually exclusive attention mechanism to deeply mine the geometric features of folds and the color and texture features of dyeing defects, respectively. The mutually exclusive attention mechanism effectively shields the interference channels between the two types of features by generating a dedicated mask weight matrix, thereby achieving feature separation. This enables the system to accurately distinguish between folds and dyeing defects, significantly reducing the risk of misjudgment. At the same time, the synergistic effect of multimodal image acquisition, adaptive image preprocessing, and targeted feature extraction further improves the high accuracy and stability of dyeing defect identification, reduces missed detections, and provides a reliable guarantee for textile quality control.
[0027] Second, this invention combines adaptive algorithms with incremental training strategies, enabling the system to adapt to various fabrics and dyeing processes without frequent manual parameter adjustments. The system can automatically optimize image acquisition, preprocessing, and feature extraction parameters based on the texture characteristics of different fabrics and dyeing process requirements, ensuring the stability of the detection results. In addition, while completing the detection of dyeing defects, the system simultaneously realizes wrinkle recognition and statistics, providing rich data support for production process optimization. By recording statistical information such as the number and distribution density of wrinkles, it can help manufacturing enterprises analyze the problematic links in the production process, thereby adjusting the leveling process parameters and improving overall production efficiency and product quality.
[0028] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0030] Figure 1 A flowchart of an AI-based vision-based intelligent detection method for textile dyeing defects;
[0031] Figure 2 This is a structural block diagram of an AI-based vision-based intelligent detection system for textile dyeing defects. Detailed Implementation
[0032] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0033] Example 1
[0034] At the inspection station of the pure cotton plain weave fabric dyeing production line, a multi-angle array of multiple industrial cameras and a multi-spectral light source are deployed. The light source includes three types of spectra: white light, blue light, and near-infrared light. The synchronous control components are deeply linked with the production line transmission system to capture the fabric transmission status in real time. The camera acquisition frame rate is flexibly adjusted through dynamic parameter matching logic to ensure that each frame of image completely covers the inspection area. At the same time, considering the natural fuzz attached to the surface of the pure cotton fabric and the light beige appearance after dyeing, the light intensity is precisely controlled through adaptive brightness adjustment logic. This avoids local scattering and reflection caused by fuzz and prevents the loss of details in light-colored areas due to insufficient light. Finally, visible light images and near-infrared images of the fabric are acquired simultaneously to form a multimodal raw image set. The images clearly show the overall color after dyeing, potential color spots, and natural wrinkles caused by tension changes in the fabric during transmission.
[0035] like Figure 1As shown, a three-stage coherent preprocessing was performed on the multimodal raw image set: First, median filtering was used, taking into account the texture regularity and local complexity of the pure cotton plain weave fabric. The processing window was adjusted by dynamic filtering window logic to efficiently filter out noise from the camera sensor and noise interference from lint, while fully preserving the irregular edges of color defects and the clear creases of wrinkles, avoiding feature blurring. Next, adaptive histogram equalization was used to specifically stretch the gray-level difference range between color defects, wrinkles and normal fabric in the image, making the originally indistinct color boundary and wrinkle shadow easier to distinguish, while strictly avoiding the excessive enhancement and distortion of plain weave texture that may be caused by global equalization. Finally, feature point matching was used to achieve pixel-level precise alignment of visible light and near-infrared images, combining the advantages of the two types of images. The visible light image highlights the color difference of color defects, and the near-infrared image enhances the depth contour of wrinkles, forming a more information-rich multimodal fusion image, laying a high-quality data foundation for subsequent detection stages.
[0036] A progressive strategy of segmentation-screening-purification is adopted to extract candidate regions: First, foreground-background segmentation is performed on the fused image based on an adaptive thresholding method. Gray-level differences are used to initially delineate suspected gray-level anomalies containing color defects and natural wrinkles, quickly eliminating large areas of normal fabric background without defects. Then, the edge contours of the suspected regions are extracted to clarify the diffuse boundaries of color defects and the linear extension edges of wrinkles, making the morphology of the two types of features clearer. Finally, combined with the inherent warp and weft texture direction of pure cotton plain weave fabric, texture matching and morphological analysis are used to accurately eliminate false edges caused by regular textures formed by weaving, avoiding misjudging normal plain weave structures as abnormal features. In the end, only candidate regions containing suspected color defects and natural wrinkles are obtained, and all potential anomalies are accurately covered, effectively reducing the invalid computational burden of subsequent model inference.
[0037] The purified candidate regions are input into the trained fold-staining defect dual-feature separation network. The network performs targeted feature extraction through a dual-branch feature extraction structure. The fold feature branch first captures the basic image features of the candidate regions, and then calculates the fold-related geometric morphology feature vector through geometric parameters. The calculation formula is as follows: ,in, It is the feature vector of the geometric shape of the folds. , , These are geometric feature weights, used to balance the contributions of angle, continuity, and curvature to wrinkle recognition. It is the angle of the crease, indicating the direction of the fold. It is the length of the crease continuity, representing the degree of continuity of the folds. It is the maximum crease length, the upper limit of crease length statistically determined by a dual-feature sample library. It is the crease curvature, which characterizes the degree of curvature of the fold and comprehensively describes the physical morphological properties of natural folds; the staining defect feature branch extracts image information at different levels through multi-scale convolution, and obtains the color texture feature vector by combining color space transformation and texture analysis. Its calculation formula is: ,in, It is a feature vector of color texture due to staining defects. , It is the weight of color and texture features. This is the color shift gradient in the CIELAB color space. ASM is the second angular moment of the gray-level co-occurrence matrix, accurately representing the core characteristics of staining anomalies. Subsequently, a mutual exclusion attention mechanism is used to generate mask weight matrices for two types of features, suppressing the color texture channel in the wrinkle features and the geometric shape channel in the staining defect features, respectively. The matrices are as follows: ,in, It is a mutual exclusion mask for the wrinkle feature. It is a mutual exclusion mask for staining defect features. It is the suppression intensity coefficient. It is the similarity of feature channels. It is the color texture channel component in the fold feature. It is the color texture channel component in the characteristics of dyeing defects. It is the geometrical channel component in the staining defect characteristics. It is the geometric shape channel component in the fold feature, which completely shields the mutual interference between the two types of features. Finally, it outputs a clear detection result through classification and regression logic, successfully identifying dyeing defects and natural folds on the fabric, without any mutual misjudgment. The two types of features have extremely high distinguishability.
[0038] Based on the identification results, the image pixel locations corresponding to the dyeing defects are selected. Combining the production line transmission status and the spatial layout of the camera installation, a coordinate transformation algorithm is used to map the pixel locations to their actual physical locations in the production scene, achieving precise defect localization. The algorithm formula is as follows: ,in, These are the actual coordinates of the defects in the production environment. These are the pixel coordinates of the defect in the image. These are the coordinates of the principal point in the camera image. It refers to the camera mounting height; It is the focal length of the camera lens; It is the angle between the camera's optical axis and the vertical direction. It is the time difference between image acquisition and the arrival of the defect at the inspection station. It correlates the defect type, actual location, and identification confidence level with key production data such as the production batch information and inspection time of the fabric batch. At the same time, it records the distribution of wrinkles and overall statistical information in detail, and generates a comprehensive inspection report including defect image annotation, wrinkle distribution heat map and batch quality statistics. For the identified non-conforming products, it triggers the sound and light warning component to issue a clear prompt signal, and links the automatic sorting device on the production line to complete accurate separation when the defective fabric is transported to the sorting station. All inspection data and reports are stored in real time to a dedicated storage component, supporting export in multiple formats and historical data traceability, providing direct data support for subsequent process improvements such as optimizing dye ratios and adjusting production tension.
[0039] Example 2
[0040] At the inspection station of the polyester fiber fabric dyeing production line, an image acquisition unit is deployed. This unit consists of a multi-angle array of multiple industrial cameras, a multi-spectral light source including white light, blue light, and near-infrared light, and a synchronization control component. The synchronization control component communicates with the production line transmission system in real time to accurately capture the fabric transmission status. Through dynamic parameter matching logic, the camera acquisition frame rate is flexibly adjusted to ensure that image acquisition and fabric transmission are completely synchronized, with no missed shots or overlaps. At the same time, considering the characteristics of polyester fiber fabrics, such as smooth surface, strong reflectivity, and dark dyeing, the light source of the image acquisition unit optimizes the light intensity through brightness adaptive adjustment logic, effectively suppressing the image overexposure problem caused by surface mirror reflection, and avoiding the concealment of subtle defects caused by light absorption in dark areas. Finally, the image acquisition unit simultaneously acquires visible light images and near-infrared images of the fabric to form a multimodal raw image set, clearly presenting the overall state of dark dyed areas, potential stains and color difference defects, as well as indentations and wrinkles caused by pressure rollers during the production process.
[0041] The data processing unit receives the multimodal raw image set transmitted by the image acquisition unit. This unit uses an industrial-grade embedded processor and performs a three-stage coherent preprocessing operation through hardware acceleration technology: First, median filtering is used to combine the fine and regular texture characteristics and local complexity of polyester fiber fabric. The processing window is adjusted through dynamic filtering window logic to efficiently filter out noise from camera circuitry and noise interference caused by reflections from the smooth surface of the fabric, while fully preserving the outline details of stains, the boundary transitions of color differences, and the clear creases of indentations and wrinkles. Next, adaptive histogram equalization technology is used to specifically stretch the grayscale differences between defects, wrinkles, and normal fabric in the image, making it easier to identify slight stains and subtle color differences on dark fabrics, while avoiding the excessive highlighting of fine textures caused by global equalization. Finally, feature point matching technology is used to achieve pixel-level precise alignment of visible light and near-infrared images, combining the advantages of the two types of images. The visible light image highlights the color differences of stains and color differences, while the near-infrared image penetrates the surface of the fabric and clearly presents the depth structure of indentations and wrinkles, forming an optimized multimodal fused image, providing high-quality data support for subsequent stages.
[0042] The data processing unit continues to function. Based on the preprocessed fused image, it first performs foreground-background segmentation using an adaptive thresholding method. By utilizing grayscale differences, it initially delineates suspected grayscale anomalies, including stains, color difference defects, and indentations / wrinkles, quickly eliminating defect-free, normally dyed backgrounds. Then, it extracts the edge contours of the suspected areas, clarifying the irregular boundaries of stains, the gradual transition zones of color differences, and the linear edges of indentations / wrinkles. Finally, combining the inherent fine warp and weft texture of the polyester fabric, it accurately eliminates false edges caused by regular textures formed by weaving through texture matching and morphological analysis, avoiding misjudging normal fabric structures as abnormal features. Ultimately, the data processing unit outputs only candidate areas containing suspected dyeing defects and indentations / wrinkles, accurately capturing all potential anomalies and significantly reducing the computational burden of subsequent model inference.
[0043] like Figure 2As shown, the data processing unit transmits the purified candidate regions to the model inference unit. This unit is equipped with high-performance computing components and deploys a trained fold-dye defect dual-feature separation network. The network performs targeted feature extraction through a dual-branch feature extraction structure: the fold feature branch first captures the basic image features of the candidate region, and then extracts core morphological features such as the angle, continuity, and curvature of the indentation fold through geometric parameter calculation logic; the dye defect feature branch extracts image information at different levels through multi-scale convolution, and then combines color space transformation and texture analysis logic to capture color shift changes in stains and color differences. The model identifies differences in dyeing uniformity and then generates a unique mask weight logic through a mutual exclusion attention mechanism to completely shield the mutual interference between the two types of features. Finally, a classification and regression logic is used to output a clear detection result. The self-learning update unit has collected a large number of dyeing defect samples, indentation and wrinkle samples, and mixed samples of polyester fiber fabrics through the network interface. After labeling, the dual-feature sample library is updated. The network parameters are fine-tuned through an incremental training strategy, which greatly improves the model's adaptability to polyester fiber fabrics and its recognition accuracy. This detection successfully identified various dyeing defects and indentation and wrinkles on the fabric without any misjudgments, meeting the standards for industrial applications.
[0044] The model inference unit transmits the recognition results to the result output unit, which includes a display component, an early warning component, and a storage component. First, the result output unit combines the production line transmission status and the spatial layout of the camera installation, using coordinate transformation logic to map the pixel position of the dyeing defect to the actual physical position in the production scene, achieving precise defect localization. Then, it correlates the defect type, actual position, recognition confidence with production information such as the production batch and inspection time of the fabric, while recording the distribution and statistical information of indentations and wrinkles in detail, generating a comprehensive inspection report including defect image annotations, a wrinkle distribution heat map, and batch quality statistics. This report is displayed to the staff in real time through the display component. For identified non-conforming products, the early warning component immediately issues a clear audio-visual alert, and simultaneously links the automatic sorting device on the production line to complete the precise separation of non-conforming fabrics. All inspection data and reports are stored in real time through the storage component, supporting export in multiple formats and historical data query. Throughout the process, each unit is seamlessly connected through an industrial-grade communication network, ensuring an efficient and smooth inspection process. In addition, the inspection data recorded by the result output unit can be synchronously fed back to the self-learning update unit, providing data support for subsequent sample library supplementation and model optimization, continuously improving the system's adaptability.
[0045] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. An AI-based intelligent detection method for textile dyeing defects, characterized in that, The method includes the following specific steps: Multimodal image acquisition: Deploy a multi-angle industrial camera array and a multispectral light source containing white light, blue light, and near-infrared light at the inspection station on the production line. Dynamically match the acquisition frame rate and light source brightness through synchronous control components to synchronously acquire and form a multimodal raw image set; Adaptive image preprocessing: By performing three-level preprocessing operations, including median filtering, adaptive histogram equalization, and feature point matching, on the multimodal original image set, image denoising, feature enhancement, and pixel-level alignment of multimodal images are achieved. Defect candidate region extraction: After adaptive threshold segmentation, edge detection and textile texture direction screening, candidate regions containing only suspected dyeing defects and wrinkles are purified. Dual-feature separation recognition and classification: The candidate region is input into the trained fold-dyeing defect dual-feature separation network. The dual-feature separation network includes a dual-branch feature extraction structure, a mutual exclusion attention mechanism, and a classification and regression structure. In the dual-branch feature extraction structure, the fold feature branch first extracts basic features, and then calculates the fold-related geometric morphology feature vector through geometric parameters. The calculation formula is as follows: ,in, It is the feature vector of the fold geometry. , , These are geometric feature weights, used to balance the contributions of angle, continuity, and curvature to wrinkle recognition. It is the angle of the crease, indicating the direction of the fold. It is the length of the crease continuity, representing the degree of continuity of the folds. It is the maximum crease length, the upper limit of crease length statistically determined by a dual-feature sample library. The curvature of the crease represents the degree of bending of the fold. After extracting features from the dyeing defect feature branch through multi-scale convolution, the color texture feature vector is obtained by combining color space transformation and texture analysis. The calculation formula is as follows: ,in, It is a feature vector of color texture of staining defects. , It is the weight of color and texture features. The color shift gradient is the CIELAB color space, and ASM is the angular second moment of the gray-level co-occurrence matrix. The mutual exclusion attention mechanism generates mask weight matrices for two types of features, suppressing the color texture channel in the wrinkle feature and the geometric shape channel in the dyeing defect feature, respectively. The matrices are as follows: ,in, It is a mutual exclusion mask for the wrinkle features. It is a mutual exclusion mask for staining defect features. It is the suppression intensity coefficient. It is the similarity of feature channels. It is the color texture channel component in the fold feature. It is the color texture channel component in the characteristics of dyeing defects. It is the geometrical channel component in the staining defect characteristics. It is the geometric morphology channel component in the wrinkle feature to achieve feature interference shielding; the classification and regression structure outputs the staining defect type, wrinkle identifier and corresponding confidence score through parallel fully connected layers, and obtains the accurate feature coordinates by combining bounding box regression; the network training is based on a dual feature sample library, and after data augmentation, the dual branches are initialized with a pre-trained model, and the joint loss function is used to complete the training to ensure accurate identification and mutual differentiation of staining defects and wrinkles. Defect localization and result output: Based on the identification results, the pixel coordinates corresponding to the dyeing defects are selected. Combining the production line transmission parameters and camera installation space parameters, a coordinate transformation algorithm is used to map the pixel coordinates to physical location information in the actual production scene, achieving accurate defect localization. The algorithm formula is as follows: ,in, These are the actual coordinates of the defects in the production environment. These are the pixel coordinates of the defect in the image. These are the coordinates of the principal point in the camera image. It refers to the camera mounting height; It is the focal length of the camera lens; It is the angle between the camera's optical axis and the vertical direction. It is the time difference between the image acquisition time and the arrival of the defect at the inspection station. Then, the defect type, location, confidence level are associated with production batch, inspection time and production information. At the same time, the number of wrinkles and distribution density statistics are recorded to generate a comprehensive inspection report that includes defect image annotation, wrinkle distribution visualization chart and quality statistics. For the identified non-conforming products, the sound and light warning device is triggered to issue a prompt signal, and at the same time, the production line sorting device is linked to realize the automatic separation of non-conforming products.
2. The AI-based intelligent detection method for textile dyeing defects according to claim 1, characterized in that, In the adaptive image preprocessing step, a three-level preprocessing operation is performed on the multimodal original image set: First, median filtering is used to dynamically adjust the size of the filtering window based on the local texture complexity of the image, removing Gaussian noise and salt-and-pepper noise while retaining the detailed features of dyeing defects and wrinkles; second, adaptive histogram equalization technology is used to specifically stretch the local gray-level range of the image, enhancing the gray-level difference between dyeing defects, wrinkles and normal fabric; finally, feature point matching is used to achieve pixel-level precise alignment between visible light images and near-infrared images, fusing complementary information from the two types of images to form the basis of feature representation.
3. The AI-based intelligent detection method for textile dyeing defects according to claim 1, characterized in that, In the defect candidate region extraction step, the foreground-background segmentation of the preprocessed fused image is performed based on the adaptive threshold method to initially screen out suspected regions with gray-level anomalies, including dyeing defects and wrinkles; then, edge detection is used to extract the edge contours of the suspected regions, and combined with the textile texture direction features, false edges caused by the normal texture of the fabric are excluded; finally, candidate regions containing only suspected dyeing defects and wrinkles are obtained.
4. The intelligent detection method for textile dyeing defects using AI vision according to claim 1, characterized in that, In the dual-feature separation, recognition, and classification step, a joint loss function is used for training to ensure accurate identification and differentiation of staining defects and wrinkles. The function formula is as follows: ,in, It is the joint loss value. It uses cross-entropy loss to optimize the accuracy of classifying staining defects and wrinkles. , It is the mutual exclusion loss weight, sum( It is a vector element summation operation.
5. An AI-based intelligent detection system for textile dyeing defects, the system being applicable to the AI-based intelligent detection method for textile dyeing defects according to any one of claims 1-4, characterized in that, The system includes: Image acquisition unit: Composed of a multi-angle camera array, a multispectral light source and a synchronization control component, to realize synchronous acquisition of multimodal images; Data processing unit: Employs industrial-grade embedded processors and hardware acceleration technology to perform three-level preprocessing operations on the multimodal raw image set and refine it to obtain candidate regions; Model inference unit: Equipped with high-performance computing components and deployed with a dual-feature separation network to support real-time inference of batch images; Result output unit: includes display component, early warning component and storage component, to realize visualization of detection information, early warning of non-conforming products and data retention; Self-learning update unit: Collects new samples through the network interface and executes incremental training strategies to update the sample library and network parameters.