Multi-task collaborative textile defect rapid detection method under high resolution
By employing a multi-task collaborative method for textile defect detection, and utilizing high-inference-speed networks and feature optimization techniques, the contradiction between detection speed and accuracy of minute defects in high-resolution textile images is resolved, achieving efficient and accurate defect identification and production optimization.
Patent Information
- Application Number
- CN202511618118.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-02-03
AI Technical Summary
Existing technologies struggle to simultaneously guarantee the accuracy and speed of identifying minute defects in high-resolution textile image detection, leading to high false negative rates or low processing efficiency.
A multi-task collaborative detection method is adopted, including coarse screening and fine inspection tasks. The coarse screening network with a high inference speed network architecture is used to screen suspected defects. The feature optimization, downsampling enhancement, upsampling reconstruction and lightweight small target detection head are combined to achieve high-precision defect localization and classification.
It enables efficient and accurate identification of minute defects on textile production lines, reduces computational load and memory usage, ensures a balance between detection speed and accuracy, and optimizes production processes through defect data feedback.
Smart Images

Figure CN121458675A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated inspection technology, specifically to a rapid method for detecting textile defects under high resolution and multi-task collaboration. Background Technology
[0002] In the modern textile industry, automated quality control is a crucial link in ensuring product competitiveness. Utilizing machine vision technology for automated online detection of surface defects in textiles has become a mainstream trend replacing traditional manual inspection. With advancements in production processes and increasingly stringent market demands for product quality, the ability to identify minute defects (such as small yarn breaks, minor oil stains, or minute weaving node anomalies) has become a core indicator of a detection system's performance. To effectively capture these extremely small defects, image acquisition systems must employ high-resolution industrial cameras, leading to a dramatic increase in the amount of data per frame. In recent years, deep learning, especially convolutional neural networks (CNNs), has demonstrated performance advantages far exceeding traditional image processing algorithms in textile defect detection due to its powerful feature self-learning and generalization capabilities. However, directly applying existing deep learning detection algorithms to high-resolution textile images faces an inherent and seemingly irreconcilable contradiction.
[0003] On the one hand, to ensure the detection accuracy of minute defects, the algorithm model needs to process high-resolution input and maintain sufficient resolution in the internal feature maps to preserve the detailed information of the defects. This usually means using complex network structures with large depth and width, but this brings huge computational overhead and memory consumption, resulting in a significant decrease in detection speed (i.e., inference speed), making it difficult to meet the high-speed inspection cycle usually required by textile production lines. On the other hand, to meet the speed requirements of online detection, existing technologies often adopt some compromise solutions. A common practice is to perform significant downsampling before feeding the image into the network to reduce the data dimensionality and accelerate model inference. However, the cost of this approach is that the effective information of minute defects in the image is severely blurred or even completely lost, directly leading to an unacceptable false negative rate, defeating the original purpose of high-resolution imaging. Another strategy is to use sliding window or block methods to cut the original high-resolution image into multiple sub-images for separate detection. While this method preserves the resolution of local areas, it not only introduces a large amount of redundant calculations, greatly reducing the overall processing efficiency, but also makes it difficult to fully identify defects that cross the boundaries of sub-images, affecting the stability and accuracy of detection. In summary, existing technologies have consistently failed to effectively resolve the fundamental conflict between detection accuracy and processing speed when processing high-resolution textile images, and have also failed to transform isolated defect detection results into effective data that guides production processes, indicating a significant technical bottleneck. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a rapid detection method for textile defects using multi-task collaboration at high resolution. In online detection scenarios of high-resolution textile images, this invention addresses the technical contradiction between the slow detection speed caused by ensuring the accuracy of identifying minute defects and the high false negative rate caused by sacrificing accuracy to improve speed.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a rapid detection method for textile defects using multi-task collaboration at high resolution, comprising the following steps: S1: Perform a coarse screening task. The high-resolution images of the textiles to be inspected are processed by a coarse screening network based on a high inference speed network architecture to screen out textiles suspected of containing defects. S2: Perform a detailed inspection task. Using a textile defect detection algorithm in a high-resolution scenario, process the textiles suspected of containing defects to locate and classify the defects and obtain defect data. S3: Perform the quality improvement task, analyze the defect data, and feed back the analysis results to optimize the textile manufacturing process.
[0006] As a preferred technical solution of the present invention, in step S1, the high inference speed network architecture is a feature extraction network architecture based on FasterNet. FasterNet introduces partial convolution to replace standard convolution, performing convolution calculation only on a portion of the channels of the input feature map, while keeping the remaining channels unchanged. This significantly reduces computational cost (FLOPs) and memory access cost while effectively extracting features, thus significantly improving the network speed during forward inference. This makes it very suitable as the infrastructure for coarse screening tasks with extremely high real-time requirements.
[0007] As a preferred embodiment of the present invention, in step S1, the recall rate of textiles suspected of containing defects is improved by lowering the confidence threshold of the coarse screening network in the coarse screening task. In industrial inspection scenarios, the loss caused by missed detections far outweighs that of false detections (over-detection). By actively lowering the confidence threshold, more low-probability prediction boxes can be retained, ensuring that potentially difficult-to-identify defective products are sent to the subsequent fine inspection stage, thereby minimizing missed detections. This "better to kill the innocent than let the guilty go free" strategy is ensured by a high-precision fine inspection task to guarantee the final accuracy.
[0008] As a preferred technical solution of the present invention, in step S2, the textile defect detection algorithm under high resolution constructs a complete technical system of "feature optimization - downsampling enhancement - upsampling reconstruction - high-precision detection", specifically including: First, multi-scale feature fusion is performed on the high-resolution image using a lightweight channel compression feature fusion network; Secondly, downsampling is performed using a multi-directional anti-scratching downsampling module; Next, upsampling reconstruction is performed using the anti-fake image upsampling module; Finally, a lightweight, small-target inspection head is used to locate and classify defects.
[0009] As a further refinement of the above technical solution, the lightweight channel compression feature fusion network compresses feature maps of different scales to a unified channel dimension through attention-guided feature projection convolution (ProjConv), and dynamically filters cross-layer features before feature fusion. Specifically, for feature maps of different scales from the backbone network (such as layers P3, P4, and P5), 1x1 convolutions are first used for projection to uniformly compress their channel number to a lower dimension (such as 256). Subsequently, an SE (Squeeze-and-Excitation) channel attention mechanism is introduced, which generates weight coefficients for each channel through global average pooling (Squeeze) and a two-layer fully connected network (Excitation). The calculation process is as follows:
[0010] in, For the first input feature map One channel, and The weights of the fully connected layer, It is the ReLU activation function. This is a sigmoid activation function. By multiplying the weight coefficients channel-by-channel with the projected feature map, it enhances defect-related features and suppresses irrelevant features such as background texture. This design significantly reduces the computational cost and memory usage in the multi-scale feature fusion process while improving the feature representation quality.
[0011] As a further refinement of the above technical solution, the multi-directional anti-blurring downsampling module employs a windmill convolution (PSConv) structure to extract multi-directional edge gradient features and integrates a Laplacian edge enhancement module to enhance the gradient response of minor imperfections. The windmill convolution extracts features in four directions using four parallel 1D convolution kernels that slide only in the horizontal or vertical direction. To prevent the edge information of minor imperfections from being blurred during downsampling, a high-frequency enhancement module is introduced. This module uses a fixed Laplacian convolution kernel to extract high-frequency components (i.e., edges and details) of the feature map and uses a learnable parameter... The weighted features are then added back to the original downsampled features. The entire process can be represented as: ; in,
[0012] Based on the features of the downsampled output, This module extracts high-frequency features using the Laplacian operator. It effectively preserves sub-pixel-level defect contour integrity during downsampling.
[0013] As a further refinement of the above technical solution, the anti-artifact upsampling module constructs a collaborative mechanism of dynamic pooling kernel and sub-pixel aligned sampling. It generates upsampling coordinates and resamples the feature map based on these coordinates to achieve pixel-level reconstruction. Unlike traditional interpolation methods, this solution borrows the idea of Pixel Shuffle, but instead of directly rearranging feature values, it first generates a coordinate grid representing the sampling position of the source feature map, upsamples this grid, and then uses bilinear sampling functions such as `grid_sample` to sample from the original, low-resolution feature map based on the refined upsampled coordinates, thereby generating a high-resolution feature map. This process avoids artifacts such as checkerboard patterns or blurring caused by interpolation algorithms, and can accurately reconstruct the geometric features of imperfections.
[0014] As a further refinement of the above technical solution, the lightweight small target detection head adds a P2 layer detection head for capturing tiny targets (e.g., smaller than 16x16 pixels), and constructs a dual-branch architecture by combining depthwise separable convolution (DWConv) and an efficient multi-scale attention (EMA) mechanism. The P2 layer detection head makes predictions on shallower, higher-resolution feature maps, making it naturally suitable for detecting tiny targets. Internally, DWConv replaces standard convolution, decoupling spatial convolution from channel convolution, significantly reducing the number of parameters and computational cost. Simultaneously, the EMA attention mechanism is introduced, capturing long-distance spatial dependencies through parallel 1xN and Nx1 convolution kernels and facilitating information interaction between feature groups at different scales, effectively enhancing the saliency of tiny defects in complex backgrounds and improving the accuracy of localization and classification.
[0015] As a preferred technical solution of the present invention, in step S3, the defect data includes the type of defect (such as holes, stains, snagging, etc.), the precise location coordinates on the textile, and size information.
[0016] As a preferred embodiment of the present invention, the optimized textile manufacturing process includes: adjusting process parameters, providing equipment maintenance warnings, or tracing raw materials based on the type and distribution of the defect data. For example, if the system continuously detects a specific type of periodic defect, it can trigger a maintenance warning for the corresponding loom; if a large area of weft skew is detected, it can guide the adjustment of the loom's tension parameters; if the defect characteristics of a batch are significantly different from historical data, it can be used to trace the raw material supplier in reverse.
[0017] This invention provides a rapid method for detecting textile defects using multi-task collaboration at high resolution. It offers the following advantages: 1. The core innovation of this invention lies in the introduction of a multi-task collaborative mechanism of "coarse screening-fine inspection". In a real textile production environment, the vast majority of image fields are flawless. The coarse screening network of this scheme (step S1) "releases" these qualified images with extremely high inference speed, submitting only a very small number of "suspected defective" images to the subsequent fine inspection algorithm (step S2). This design avoids the huge waste of computing power caused by "processing all images with high-precision complex algorithms" in traditional methods, enabling the total system throughput to strictly match the production line rhythm, while ensuring that the algorithm has sufficient resources to "meticulously refine" those truly suspicious areas.
[0018] 2. To address the pain point of easily losing minute defects during downsampling in the precision detection algorithm (step S2), this invention designs a "multi-directional anti-blurring downsampling module." This module innovatively uses Laplacian convolution kernels in parallel to extract and retain high-frequency edge details. This ensures that even the finest broken yarn remains clearly discernible in the deeper layers of the network.
[0019] 3. A closed-loop quality control system has been established, moving from "passive quality inspection" to "proactive quality improvement." Traditional inspection systems stop at "finding defects," while the "quality improvement task" (step S3) added in this invention represents a key upgrade. It no longer passively rejects defective products but proactively mines data from the inspection results (such as the type, density, and distribution patterns of defects). For example, when the system detects that "the weft yarn breakage rate in area 3 of the loom has increased by 20% in the past hour," it can generate quality improvement suggestions to feed back to the process control team. This transforms inspection data from isolated data into effective intelligence that drives process optimization.
[0020] 4. This invention achieves efficient deployment of high-precision algorithms on cost-controlled industrial equipment. The "lightweight small target detection head" design of the precision detection algorithm fully considers deployment costs. By extensively using depthwise separable convolution (DWConv) in key feature extraction layers and introducing an efficient multi-scale attention (EMA) mechanism on high-resolution P2 feature maps, it significantly reduces the computational cost (FLOPs) and parameter count of the model while ensuring extremely high sensitivity to small targets. This allows the entire high-precision algorithm to run smoothly on conventional industrial control computers and even edge computing devices, lowering the hardware barrier for technology implementation.
[0021] 5. The system design ensures precise synchronization and stable operation between the detection system and the high-speed dynamic production line. Through hard synchronization with the production line encoder, the system ensures that the image acquisition unit is always triggered at a precise predetermined position during textile movement, physically eliminating image overlap or omissions caused by speed variations. Simultaneously, millisecond-level communication between the detection results and the process control system (PLC) guarantees immediate response to subsequent rejection or alarm actions. This tight hardware and software integration is the fundamental guarantee for the high reliability of this solution in a high-speed dynamic environment. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the system structure of the present invention; Figure 2 This is a schematic diagram of the detection method of the present invention; Figure 3 This is a schematic diagram of the internal process of the precision detection algorithm of the present invention; Figure 4 This is a schematic diagram of the lightweight small target detection head structure of the present invention. Detailed Implementation
[0023] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Please see the appendix Figure 1 To be continued Figure 4 This invention provides a high-resolution, multi-task collaborative method for rapid defect detection in textiles. The invention also provides a detection system deployed on a textile production line for real-time, high-precision defect detection of rapidly moving fabric. At the hardware level, the system mainly includes an image acquisition unit, a processing unit, and a communication unit.
[0025] The image acquisition unit is responsible for acquiring high-resolution digital images of the textiles to be inspected. It consists of high-frame-rate linear or area-array industrial cameras and a dedicated light source providing uniform, shadowless illumination, ensuring clear capture of sub-millimeter level details of even the smallest defects. The processing unit is the core of the system's computation, typically an industrial control computer equipped with a high-performance graphics processing unit (GPU). Its powerful parallel computing capabilities provide the computational power for subsequent complex image processing and deep learning model inference. The communication unit is responsible for the system's interaction with external devices, such as receiving synchronization signals from the production line encoders and sending inspection results or stop commands to the production line's process control system (PLC).
[0026] The system's core software runs on the processing unit and establishes a multi-task collaborative workflow. As the textiles flow beneath the image acquisition unit, the system captures a high-resolution image, which is first sent to the data interface module for necessary format conversion and normalization.
[0027] The task scheduling module first invokes the coarse-screening network module to perform the coarse-screening task. The purpose of this module is to determine the presence of suspected defects in images at extremely high speed, thereby filtering out a massive number of flawless images. To achieve this, the coarse-screening network module employs a high-inference-speed network architecture, such as FasterNet, which significantly reduces computational cost by introducing partial convolutions. This module operates with a low confidence threshold to maximize recall, ensuring that any suspicious features are captured, even if this introduces some false positives.
[0028] If the coarse screening network module does not find any suspected defects, the task scheduling module directly determines the image as qualified and completes the current detection cycle. If the coarse screening network module marks areas with suspected defects in the image, the task scheduling module immediately forwards the original high-resolution image and the coordinate information of the suspected areas to the fine inspection algorithm module to perform the fine inspection task.
[0029] The precision inspection algorithm module is the core of achieving high-precision defect localization and classification. It doesn't prioritize extreme speed, but rather focuses on accurately analyzing suspected defects without losing subtle features. This module integrates a dedicated algorithm optimized for high-resolution images. First, a lightweight channel compression feature fusion network extracts and optimizes multi-scale features from the image. This network utilizes attention-guided feature projection convolution (ProjConv) to compress feature maps from different network layers into a unified low-dimensional space. It then leverages the Squeeze-and-Excitation (SE) channel attention mechanism to dynamically weight feature channels related to defects, suppressing interference from background textures. The SE mechanism generates weight coefficients for each channel. The process can be represented by the following formula:
[0030] in, The first part representing the input feature map One channel; and These are the height and width of the feature map, respectively; and These represent the learnable weights of two fully connected layers; It is the ReLU activation function; It is the Sigmoid activation function.
[0031] Next, to reduce feature map resolution while preserving details, the fine-detection algorithm module employs a multi-directional anti-blurring downsampling module. This module innovatively combines windmill convolution (PSConv) for extracting multi-directional edge features with a Laplacian edge enhancement unit. While downsampling, the Laplacian operator is used to extract high-frequency components of the image (i.e., edges and contours of blemishes), and these are then weighted and fused back into the main feature map using learnable coefficients. This enhancement process can be represented as:
[0032] in, It is the enhanced output feature; These are features obtained from the basic downsampling operation; These are high-frequency detail features extracted by the Laplacian operator; It is a learnable scaling parameter used to adaptively adjust the enhancement intensity of edge information.
[0033] When resolution needs to be restored in deeper layers of the network, the anti-artifact upsampling module is invoked. This module dynamically generates an upsampling coordinate grid and performs sub-pixel aligned bilinear resampling on the low-resolution feature map based on this refined coordinate, thereby generating a clear, checkerboard-free high-resolution feature map and accurately reconstructing the geometry of the flaws.
[0034] Finally, a lightweight detection head designed specifically for small targets analyzes the reconstructed feature map, outputting the precise bounding box and category of the defect (such as broken yarn, stain, pinhole, etc.). This detection head not only performs predictions at shallower network layers (such as the P2 layer) to match the scale of small targets, but also extensively uses depthwise separable convolution (DWConv) and efficient multi-scale attention (EMA) mechanisms. This greatly reduces computational complexity while enhancing the network's ability to perceive global context, thereby improving the recognition accuracy of small, low-contrast defects.
[0035] The precise defect data (including type, location, and size information) output by the precision inspection algorithm module is used for final product quality assessment and also fed into the quality improvement analysis module. This module is responsible for statistically analyzing historical defect data to uncover potential patterns in defect occurrence. For example, detecting periodic yarn breaks can infer a problem with a specific knitting needle or spindle. The analysis results generate structured recommendations, which are fed back to the production management system or equipment maintenance platform via a communication unit. This provides data support for process parameter optimization, preventative equipment maintenance, and raw material quality traceability, thus constructing a closed-loop quality control system from "detection" to "feedback" to "improvement."
[0036] This method can be run in the detection system described in the foregoing embodiments, and its execution process mainly includes three core steps: coarse screening, fine inspection, and quality improvement.
[0037] Before implementing this method, the high-resolution textile images acquired from the image acquisition unit can be preprocessed, including distortion correction, brightness equalization, and image normalization, to eliminate interference introduced by the optical system and changes in ambient light, and to provide standardized input data for subsequent stable detection.
[0038] The first step is S1, the coarse screening task. The core objective of this step is to utilize extremely high processing speed to quickly scan each frame of images on the production line, rapidly eliminating the vast majority of qualified product images that do not contain any defects. In this embodiment, this task is accomplished by a coarse screening network based on a high-inference-speed network architecture. This network, such as FasterNet, is designed with the key feature of introducing a partial convolution mechanism. Unlike standard convolution, which computes all channels of the input feature map, partial convolution only performs convolution operations on a subset of channels, leaving the remaining channels unchanged. This strategy effectively utilizes the redundancy between feature map channels, significantly reducing floating-point operations (FLOPs) and memory access overhead with almost no loss in feature extraction capabilities, thus giving the network extremely fast forward inference speed.
[0039] To ensure that the coarse screening task does not miss any potential defects, this step employs a high recall strategy. Specifically, this is achieved by actively lowering the confidence threshold of the coarse screening network. For example, the confidence threshold commonly used for object detection is lowered from a high value (e.g., 0.5) to a low value (e.g., 0.25). This means that even if the network's prediction confidence regarding whether a region is a defect is very low, that region will still be classified as a "suspected defect" and sent to the next stage. This "better safe than sorry" strategy essentially entrusts the final judgment accuracy to the subsequent fine screening task, while the sole objective of the current task is to minimize missed detections.
[0040] The method proceeds to step S2, the fine inspection task, only when the coarse screening task identifies a suspected defect. This step receives the original high-resolution image and the suspected region locations provided by the coarse screening, and initiates a deep learning algorithm specifically designed for high-precision defect analysis. This algorithm integrates four tightly linked modular designs: feature optimization, downsampling enhancement, upsampling reconstruction, and high-precision detection.
[0041] At the entry point of the precision detection algorithm, a lightweight channel-compressed feature fusion network first processes the high-resolution image. This network aims to efficiently fuse multi-scale features from different layers of the backbone network. It uses attention-guided feature projection convolution (ProjConv) to first project feature maps with varying numbers of channels from different layers (e.g., P3, P4, P5) onto a lower common dimension using 1x1 convolutions. Subsequently, a Squeeze-and-Excitation (SE) channel attention mechanism is introduced to dynamically weight the projected feature channels. The SE mechanism generates an importance weight for each channel using global information. The calculation process is as follows:
[0042] in, For the first input feature map One channel; and The height and width of the feature map; and Here are the weights of the two fully connected layers; represents the ReLU activation function. This represents the Sigmoid activation function. Through this mechanism, key feature channels related to defects are enhanced, while redundant channels related to background texture are suppressed.
[0043] When a network needs to reduce the resolution of feature maps, a multi-directional anti-blurring downsampling module replaces traditional pooling or strided convolution. The core of this module lies in its ability to preserve the edge and contour information of minute imperfections during downsampling. It combines two components in parallel: first, a windmill convolution (PSConv) structure that extracts gradient features in the horizontal, vertical, and diagonal directions using four different one-dimensional convolutional kernels; second, a Laplacian edge enhancement unit that uses a fixed Laplacian convolution kernel as a high-pass filter to extract high-frequency details from the feature map. These high-frequency details are filtered through a learnable parameter. After scaling, the result is added back to the base downsampling result. The entire process can be represented as: in, This is the final output feature map; The result of the base downsampling operation; High-frequency components extracted from the Laplacian operator; As a learnable adaptive weight, it allows the network to autonomously determine the strength of edge enhancement based on the input.
[0044] When the network needs to recover details from low-resolution feature maps for precise localization, it invokes an anti-artifact upsampling module. This module abandons deconvolution, which easily produces checkerboard artifacts, and instead borrows the idea of pixel rearrangement, but with a more sophisticated implementation. Instead of directly rearranging pixel values, it first predicts and generates a high-resolution sampling coordinate grid, and then uses functions such as bilinear interpolation to resample from the original low-resolution feature map based on this refined coordinate grid. This coordinate-aligned sampling mechanism can generate high-resolution feature maps with sharp edges and accurate geometry.
[0045] Finally, a lightweight detection head specifically designed for detecting tiny targets is responsible for the final defect localization and classification on the reconstructed high-resolution feature map. A key design feature of this detection head is the addition of a prediction branch on the relatively shallow, high-resolution P2 feature layer of the network, specifically for matching tiny defects. Internally, it extensively employs depthwise separable convolutions (DWConv) instead of standard convolutions, decoupling spatial filtering and channel fusion, thereby drastically reducing the number of parameters while maintaining the receptive field. Simultaneously, it combines an efficient multi-scale attention (EMA) mechanism, using parallel strip convolutional kernels to capture long-range spatial dependencies, effectively enhancing the saliency of tiny defects against the background of complex textiles, ensuring the final detection accuracy.
[0046] After the detailed inspection task is completed, all confirmed defects, along with their precise types, two-dimensional coordinates on the fabric, and length and width dimensions, will be transferred to step S3, the quality improvement task. The core of this step is to transform isolated inspection results into insights that guide the production process. For example, by performing time-series analysis on defect coordinates, if a periodic distribution of defect points is found in the horizontal or vertical direction of the fabric, the system can infer that a specific mechanical component (such as the heald frame, reed, or warp roller of the loom) is malfunctioning, triggering an equipment maintenance warning. Furthermore, through long-term statistical analysis of defect types, if the frequency of a certain type of defect (such as stains or oil stains) is found to be continuously increasing, the system can make suggestions to the Production Management System (MES) to check the corresponding process steps or trace the quality of related batches of raw materials. This achieves a shift from passive inspection to proactive prevention, forming a closed loop in quality management.
[0047] The electronic device is configured to perform the detection process described in the foregoing method embodiments. The electronic device can be embodied as an industrial control computer, server, embedded system, or any other computing device integrated with data processing capabilities.
[0048] The electronic device internally includes at least one processor and a memory communicatively connected to the processor. A computer program, consisting of a series of executable instructions, is stored or loaded on the memory. When the electronic device is started and running, the processor reads and executes these instructions from the memory, thereby controlling the electronic device to implement all the steps of the high-resolution, multi-task collaborative rapid textile defect detection method described in the foregoing embodiments. This includes, but is not limited to: receiving high-resolution textile images, performing a high-speed coarse screening task, deciding whether to initiate a fine inspection task based on the coarse screening results, executing a high-precision fine inspection algorithm to locate and classify suspected defects, and performing statistical analysis on the detected defect data to generate feedback information for optimizing production processes.
[0049] The storage medium stores computer programs or instructions and can be any non-volatile physical medium capable of carrying program code. For example, it can be a semiconductor device, such as a read-only memory (ROM), flash memory, or a solid-state drive (SSD); it can also be a magnetic medium, such as a hard disk drive; or an optical medium, such as a CD-ROM or DVD.
[0050] When the computer program or instructions stored on the computer-readable storage medium are loaded and executed by a processor in a computing device (such as the electronic device in the foregoing embodiments), the device will be guided and controlled to orderly execute all or part of the steps detailed in the foregoing method embodiments. This enables any general-purpose or special-purpose computing device loaded with this storage medium or with the program installed thereon to be transformed into a textile defect detection device that implements the technical solution of the present invention, thereby completing the full functions from image acquisition, multi-task collaborative processing to data analysis and feedback.
[0051] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A rapid detection method for textile defects using multi-task collaboration at high resolution, characterized in that, Includes the following steps: S1: Perform a coarse screening task. The high-resolution images of the textiles to be inspected are processed by a coarse screening network based on a high inference speed network architecture to screen out textiles suspected of containing defects. S2: Perform a detailed inspection task. Using a textile defect detection algorithm in a high-resolution scenario, process the textiles suspected of containing defects to locate and classify the defects and obtain defect data. S3: Perform the quality improvement task, analyze the defect data, and feed back the analysis results to optimize the textile manufacturing process.
2. The method according to claim 1, characterized in that, The high inference speed network architecture is a feature extraction network architecture based on FasterNet.
3. The method according to claim 1, characterized in that, In the coarse screening task, the recall rate of textiles suspected of containing defects is improved by lowering the confidence threshold of the coarse screening network.
4. The method according to claim 1, characterized in that, The high-resolution textile defect detection algorithm includes: Multi-scale feature fusion is performed on the high-resolution image using a lightweight channel compression feature fusion network. Downsampling is performed using a multi-directional anti-smearing downsampling module; Upsampling reconstruction is performed using an anti-fake image upsampling module; and Defects are located and classified using a lightweight, small-target inspection head.
5. The method according to claim 4, characterized in that, The lightweight channel compression feature fusion network compresses feature maps of different scales to a unified channel dimension through attention-guided feature projection convolution, and dynamically filters cross-layer features before feature fusion.
6. The method according to claim 4, characterized in that, The multi-directional anti-blurring downsampling module uses a windmill convolution structure to extract multi-directional edge gradient features and integrates a Laplacian edge enhancement module to enhance the gradient response of minor imperfections.
7. The method according to claim 4, characterized in that, The anti-artifact upsampling module constructs a collaborative mechanism of dynamic pooling kernel and sub-pixel aligned sampling. By generating upsampling coordinates and resampling the feature map based on the coordinates, pixel-level reconstruction is achieved.
8. The method according to claim 4, characterized in that, The lightweight small target detection head adds a P2 layer detection head for capturing tiny targets, and combines depthwise separable convolution and an efficient multi-scale attention mechanism to build a dual-branch architecture.
9. The method according to claim 1, characterized in that, The defect data includes information on the type, location, and size of the defect.
10. The method according to claim 1, characterized in that, The optimized textile manufacturing process includes: adjusting process parameters, providing equipment maintenance warnings, or tracing raw materials based on the type and distribution of the defect data.