A digital management and control method, device and medium for quality inspection of apparel fabrics

By employing a digital management and control method for garment fabric quality inspection, and utilizing deep learning models for defect segmentation and adaptive switching of management and control modes, the problems of inconsistent testing standards and inability to quantify defect information in existing technologies have been solved. This has enabled intelligent and digital fabric quality inspection, improving the controllability and management efficiency of fabric production quality.

CN123117897APending Publication Date: 2026-11-17TIANJIN LONGJISHANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611257155.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing fabric quality inspection technologies suffer from inconsistent testing standards, insufficient accuracy in identifying minor defects, inability to quantify defect information, and a single quality control mode that cannot be adaptively switched based on test results. This results in a low level of intelligence and digitalization in fabric production quality control, making it difficult to guarantee the stability and controllability of fabric quality.

Method used

By adopting a digital management and control method for garment fabric quality inspection, the original inspection images are acquired, and a deep learning fabric defect segmentation model is used to segment defects, determine the quality inspection and control mode, and generate a corresponding quality inspection and control instruction set, so as to realize intelligent, dynamic and precise management and control of fabric production quality parameters.

Benefits of technology

It has realized the intelligent and digitalization of fabric quality inspection, which can accurately quantify the defect area, length-to-width ratio, distribution location and number of defects per unit length, improve the accuracy and quantification level of defect identification, realize timely early warning of risk defects and automatic archiving of safety defects, and improve the controllability and management efficiency of fabric production quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123117897A_ABST
    Figure CN123117897A_ABST
Patent Text Reader

Abstract

This invention discloses a digital control method, device, and medium for the quality inspection of apparel fabrics, comprising: acquiring an original inspection image of the fabric to be inspected, the original inspection image being used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area; inputting the original inspection image into a fabric defect segmentation model to determine fabric defect segmentation information, wherein the fabric defect segmentation information includes: risk defect information and safety defect information; based on the fabric defect segmentation information, determining a quality inspection control mode, the quality inspection control mode being used to adjust the fabric production quality parameters to target quality parameters, wherein the quality inspection control mode includes: early warning control mode and archiving control mode; responding to the quality inspection control mode, generating a quality inspection control instruction set, the quality inspection control instruction set being used to control the fabric quality inspection execution agency to perform quality inspection control operations adapted to the target quality parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses a digital management and control method, device and medium for quality inspection of apparel fabrics, belonging to the field of digital management and control technology for quality inspection of apparel fabrics. Background Technology

[0002] With the rapid development of the textile and apparel industry and the increasing demands of consumers for the quality of apparel products, quality inspection during the fabric production process has become a crucial link in ensuring product competitiveness and brand reputation. Currently, most existing fabric quality inspection methods rely on manual visual inspection or traditional image processing technology. Manual visual inspection suffers from drawbacks such as inconsistent inspection standards, highly subjective results, high labor intensity, and difficulty in meeting the real-time inspection needs of high-speed production lines. Traditional image processing technology struggles to effectively handle the complex and varied textures, patterns, and material characteristics of textile fabrics, lacks accuracy in identifying subtle defects, and is susceptible to interference from external factors such as lighting and wrinkles, affecting the robustness of the inspection. Furthermore, traditional inspection methods lack pixel-level quantification capabilities for defect information, failing to accurately obtain key quantitative parameters such as defect area, size, and distribution location, making it difficult to support digital grading and data-driven management of fabric quality. In addition, existing inspection equipment can only identify defects; it cannot adaptively switch between differentiated management modes based on inspection results, nor can it effectively feed inspection data back to the production process to guide process optimization. This results in a low level of intelligence and digitalization in fabric production quality control, making it difficult to guarantee the stability and controllability of fabric quality.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides a digital management and control method, device and medium for the quality inspection of clothing fabrics, which at least solves the technical problems in existing fabric quality inspection technologies, such as inconsistent testing standards, insufficient accuracy in identifying minor defects, inability to quantify defect information, and a single quality inspection and control mode that cannot be adaptively switched according to test results.

[0005] According to one aspect of the present invention, in order to achieve the above objective, a digital management and control method for quality inspection of apparel fabrics is provided, comprising:

[0006] Obtain the original inspection image of the fabric to be inspected. The original inspection image is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area.

[0007] The original detected image is input into the fabric defect segmentation model to determine the fabric defect segmentation information, which includes: risk defect information and safety defect information.

[0008] Based on fabric defect segmentation information, a quality control mode is determined. The quality control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality control mode includes: early warning control mode and archiving control mode.

[0009] In response to the quality inspection and control mode, a quality inspection and control instruction set is generated. The quality inspection and control instruction set is used to control the fabric quality inspection execution agency to perform quality inspection and control operations that are adapted to the target quality parameters.

[0010] Further, determine the fabric defect segmentation information, including:

[0011] Obtain the original detection image and the fabric defect detection model parameters, wherein the fabric defect detection model parameters include at least: model input resolution parameters, segmentation mask output parameters, and defect classification confidence threshold;

[0012] Based on the original detected image and the parameters of the fabric defect detection model, the fabric defect segmentation information is determined.

[0013] Furthermore, based on the original detected image and the fabric defect detection model parameters, fabric defect segmentation information is determined, including:

[0014] The original detection image is preprocessed to obtain the preprocessed detection image;

[0015] The preprocessed detection image is input into the fabric defect segmentation model, and the fabric defect segmentation information is determined based on the parameters of the fabric defect detection model.

[0016] Furthermore, the original detection image is preprocessed to obtain a preprocessed detection image, including:

[0017] The original detection image is processed by Gaussian filtering to obtain the filtered detection image;

[0018] The filtered detection image is then subjected to illumination equalization processing to obtain the illumination-corrected detection image.

[0019] The detected image after illumination correction is normalized to obtain the preprocessed detected image.

[0020] Furthermore, the preprocessed detected image is input into the fabric defect segmentation model to determine the fabric defect segmentation information, including:

[0021] The preprocessed detection image is input into the fabric defect segmentation model to obtain defect segmentation mask data and defect classification data.

[0022] Based on the defect segmentation mask data, the defect quantification parameters are calculated. The defect quantification parameters include at least the following: the actual area of ​​the defect, the length-to-width ratio of the defect, the location of the defect in the fabric area, and the number of defects per unit length of fabric.

[0023] Based on defect quantification parameters and defect classification data, fabric defect segmentation information is determined.

[0024] Furthermore, the fabric defect segmentation model is either the YOLOv8-seg instance segmentation model or the YOLOv11-seg instance segmentation model, and the neck network of the fabric defect segmentation model adopts a bidirectional feature pyramid network structure.

[0025] Furthermore, based on defect quantification parameters and defect classification data, fabric defect segmentation information is determined, including:

[0026] Based on the defect quantification parameters, the quantification value of the severity of fabric defects is determined;

[0027] Based on a preset severity threshold, the severity of fabric defects is quantified to obtain the judgment result;

[0028] In response to the judgment result that the quantitative value of the severity of the fabric defect is greater than the preset severity threshold, the fabric defect segmentation information is determined to be risk defect information.

[0029] If the judgment result is that the quantitative value of the fabric defect severity is less than or equal to the preset severity threshold, the fabric defect segmentation information is determined to be safe defect information.

[0030] Furthermore, based on fabric defect segmentation information, a quality inspection and control model is determined, including:

[0031] When the fabric defect segmentation information is risk defect information, the quality inspection control mode is determined to be the early warning control mode.

[0032] When the fabric defect segmentation information is a safety defect information, the quality inspection control mode is determined to be the archiving control mode.

[0033] According to one embodiment of the present invention, a digital control device for quality inspection of garment fabrics is also provided, comprising:

[0034] The acquisition module is used to acquire the original detection image of the fabric to be inspected. The original detection image is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area.

[0035] The determination module is used to input the original detected image into the fabric defect segmentation model to determine the fabric defect segmentation information, which includes: risk defect information and safety defect information.

[0036] The control module is used to determine the quality control mode based on the fabric defect segmentation information. The quality control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality control mode includes: early warning control mode and archiving control mode.

[0037] The generation module is used to generate a quality inspection and control instruction set in response to the quality inspection and control mode. The quality inspection and control instruction set is used to control the fabric quality inspection execution agency to perform quality inspection and control operations that are adapted to the target quality parameters.

[0038] According to another aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the digital control method for quality inspection of clothing fabrics according to various embodiments of the present invention.

[0039] In this embodiment of the invention, by acquiring the original inspection image of the fabric to be inspected and inputting it into the fabric defect segmentation model, fabric defect segmentation information containing risk defect information and safety defect information is obtained. Based on the fabric defect segmentation information, an early warning control mode or an archiving control mode can be adaptively matched, and a dedicated quality inspection control instruction set can be generated to control the fabric quality inspection execution agency to perform quality inspection control operations adapted to the target quality parameters, thus realizing intelligent, dynamic, and precise control of fabric quality inspection. This control method can accurately quantify key parameters such as defect area, aspect ratio, distribution location, and number of defects per unit length based on the pixel-level segmentation mask output by the fabric defect segmentation model, improving the accuracy and quantification level of defect identification. It can both promptly trigger the early warning control mode for fabrics with risk defects to prevent defective products from entering the next production stage, and automatically execute the archiving control mode for fabrics with safety defects, realizing structured storage and traceable management of quality data. Meanwhile, statistical analysis of the test data can effectively identify the correlation between defects and process parameters, providing data support for production process optimization, realizing the transformation from passive testing to proactive prevention, significantly improving the intelligence and digitalization level of fabric production quality control, effectively reducing fabric quality risks, comprehensively improving the quality controllability and management efficiency of fabric production operations, and solving the technical problems in existing fabric quality inspection technologies such as inconsistent testing standards, insufficient accuracy in identifying minor defects, inability to quantify defect information, and a single quality control mode that cannot be adaptively switched according to test results. Attached Figure Description

[0040] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0041] Figure 1 This is a flowchart of a digital control method for quality inspection of clothing fabrics according to one embodiment of the present invention;

[0042] Figure 2 This is a structural block diagram of a digital control device for quality inspection of clothing fabrics according to one embodiment of the present invention. Detailed Implementation

[0043] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0044] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0045] According to an embodiment of the present invention, a digital control method for quality inspection of clothing fabrics is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer device such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0046] This method embodiment can be executed in an electronic device or similar computing device that includes a memory and a processor. Taking data processing as an example, the data processing may include one or more processors (processors may include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), digital signal processing (DSP) chips, microcontroller units (MCUs), field-programmable gate arrays (FPGAs), neural network processors (NPUs), tensor processors (TPUs), artificial intelligence (AI) type processors, etc.) and a memory for storing data. Optionally, the above data processing may also include transmission devices, input / output devices, and display devices for communication functions. Those skilled in the art will understand that the above structural description is merely illustrative and does not limit the structure of the above data processing. For example, the data processing may include more or fewer components than described above, or have a different configuration than described above.

[0047] The memory can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the digital control method for quality inspection of clothing fabrics in this embodiment of the invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, thereby realizing the aforementioned digital control method for quality inspection of clothing fabrics. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0048] The transmission device is used to receive or send data via a network. Specific examples of the network mentioned above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0049] Display devices can be, for example, touchscreen liquid crystal displays (LCDs) and touch displays (also referred to as "touchscreens" or "touch displays"). The LCD allows users to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows users to interact with the GUI through finger contact and / or gestures on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0050] Figure 1 A digital management and control method for quality inspection of clothing fabrics according to one embodiment of the present invention includes:

[0051] Step S110: Obtain the original inspection image of the fabric to be inspected. The original inspection image is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area. The specific content is as follows:

[0052] In step S110, the quality of the acquired original detection image directly determines the feature extraction effect and defect recognition accuracy of the subsequent defect segmentation model. Therefore, this embodiment constructs a complete image acquisition scheme for the high-speed production line environment of textile fabrics to ensure that the acquired original detection image can truly, comprehensively and clearly reflect the surface texture, color distribution, gloss characteristics and original form of various possible minor defects of the fabric to be detected.

[0053] In one exemplary embodiment, the image acquisition device is deployed within a fabric quality inspection area, which is located at a predetermined station on the fabric production line, such as at the exit of the fabric setting machine, the fabric inspection machine station, or the final inspection station before winding and packaging. The image acquisition device includes at least one high-resolution industrial camera and a matching lens assembly. This industrial camera has imaging capabilities at the megapixel or even tens of millions of pixels. Exemplarily, the industrial camera can be a color CMOS industrial camera with a resolution of at least 12 megapixels and a frame rate of at least 30 frames per second to ensure that the fine texture structure and minor defects of the fabric surface can be clearly captured as the fabric moves continuously through the quality inspection area at a certain speed. The focal length of the industrial camera lens is adaptively adjusted according to the actual working distance and the required inspection field of view. For example, when the industrial camera is installed at a height of 300 mm to 500 mm directly above the fabric, a fixed-focus lens with a focal length of 35 mm to 50 mm can be selected to ensure that the inspection field of view covers the full width of the fabric or the predetermined inspection width, while maintaining sufficient imaging overlap in the fabric movement direction to avoid missed detections.

[0054] To ensure that the industrial camera can capture clear original inspection images during high-speed fabric movement, this embodiment integrates an adjustable illumination module into the image acquisition device. Due to the diverse material types of textile fabrics, different fabrics (such as woven fabrics, knitted fabrics, denim fabrics, etc.) exhibit significant differences in surface reflectivity, gloss, and texture depth. A single illumination method is insufficient to meet the image acquisition needs of all fabric types. Therefore, the illumination module preferably includes multiple illumination modes, such as a uniform diffuse light source, a dark field illumination source, and a structured light projection module. The uniform diffuse light source can employ a ring light source or a diffuse array light source. Its emitted light is uniformly scattered by a diffuser plate before illuminating the fabric surface, providing a uniform illumination environment without shadows or glare. This is suitable for routine imaging of the surface texture and color characteristics of most fabric types, and is particularly beneficial for detecting defects such as stains, color differences, and oil stains that have low contrast with the fabric substrate color. The dark-field illumination source uses low-angle oblique incident light to illuminate the fabric surface, causing the three-dimensional structural features of the fabric surface, such as tiny protrusions, depressions, fuzz, and skipped yarns, which have height or depth variations, to generate high-contrast scattered light signals. This significantly enhances the visual salience of these defects in the original inspection image, improving the subsequent defect segmentation model's ability to identify them. The structured light projection module projects a predetermined pattern (such as a striped grating or coded structured light) onto the fabric surface and uses an industrial camera to acquire structured light deformation images modulated by the fabric surface morphology. Through demodulation analysis of the structured light deformation images, the microscopic morphology data of the fabric surface can be obtained, including three-dimensional structural information such as fabric wrinkle depth and weaving unevenness, providing supplementary depth dimension information for subsequent identification of wrinkle-type defects and weaving unevenness defects. During actual acquisition, different illumination modes can be adaptively selected or combined through the software control interface according to the type and color of the fabric to be inspected and the known common defect categories, to acquire the corresponding original inspection image under optimal illumination conditions, thereby maximizing the highlighting of the visual features of various fabric defects.

[0055] In another exemplary embodiment, to further enhance the ability to capture complex defects, the image acquisition device can also integrate a multispectral imaging unit. The multispectral imaging unit can acquire spectral reflectance images of the fabric outside the visible light band, such as in the near-infrared or ultraviolet bands. For example, for oil stains or color difference defects caused by specific chemical components, these defects often exhibit significantly different spectral reflectance characteristics in the near-infrared band compared to the fabric substrate. This difference may be difficult to discern in conventional visible light images, but the near-infrared images acquired by the multispectral imaging unit can clearly reveal such defects. The multispectral imaging unit and the aforementioned high-resolution industrial camera can be arranged side-by-side, achieving simultaneous imaging of the same fabric area in multiple spectral bands through a beam splitter or independent imaging optical path. The resulting raw detection image includes not only conventional visible light RGB images but also auxiliary spectral images in the near-infrared or ultraviolet bands. These multi-band images collectively constitute the raw detection image, providing richer multidimensional input information for subsequent fabric defect segmentation models.

[0056] In this embodiment, the image acquisition process needs to be closely synchronized with the fabric production line's conveyor. The fabric typically moves continuously through the quality inspection area on the production line. To ensure that the industrial camera can capture original inspection images without motion blur, stretching deformation, and with complete coverage during the fabric's movement, the image acquisition device achieves precise matching with the fabric's movement state through a synchronization signal triggering mechanism. For example, a rotary encoder can be installed on the conveyor rollers of the fabric conveying equipment. This encoder detects the fabric's speed and displacement in real time and generates corresponding pulse trigger signals. Alternatively, a photoelectric sensor can be installed at the entrance of the quality inspection area. When the fabric edge or a pre-set marker on the fabric passes the photoelectric sensor, the industrial camera is triggered to take a picture. Based on the trigger signal, the industrial camera acquires images at precise time intervals or equal spatial displacement intervals, ensuring a predetermined overlap rate (e.g., 10% to 20%) between adjacent frames in the fabric's movement direction, thereby guaranteeing complete coverage of the entire fabric area. Simultaneously, the image acquisition device also adaptively adjusts the industrial camera's exposure time according to the fabric's conveying speed to avoid image blurring due to excessive fabric movement speed. For example, the exposure time of the industrial camera can be dynamically adjusted according to the fabric movement speed V, the camera pixel resolution R, and the maximum allowable number of motion blur pixels M according to a predetermined algorithm to ensure the clarity of the original detection image.

[0057] Furthermore, in this embodiment, each acquired original detection image is associated with and stored with corresponding metadata information. This metadata information includes at least: image acquisition timestamp, fabric production batch number, fabric roll number, inspection station number, fabric type code, fabric width parameters, and current fabric movement speed. This metadata information is transmitted to the computing device along with the original detection image and is associated with and stored as part of the image data, thereby forming an original detection image dataset with complete traceability information. This dataset is preprocessed and input into the fabric defect segmentation model in subsequent steps. Furthermore, when generating fabric defect segmentation information and quality control instruction sets, the metadata information can be associated with the detection results, providing a data foundation for subsequent quality traceability, batch statistical analysis, and process traceability.

[0058] For example, in order to ensure the consistency of the quality of the original inspection images and reduce the interference of ambient light changes on image acquisition, a light shield or darkroom structure can be set up around the fabric quality inspection area where the image acquisition device is located. This isolates the quality inspection area from the ambient light of the workshop, ensuring that the lighting conditions provided by the lighting module are the most important light source for image acquisition. This avoids fluctuations in the brightness, contrast, and color balance of the original inspection images caused by changes in the ambient light of the workshop, thereby ensuring that the distribution of input image data faced by the subsequent defect segmentation model remains stable and improving the reliability and reproducibility of the detection results.

[0059] The raw inspection images obtained through the above methods are raw visual data collected from the fabric to be inspected in the fabric quality inspection area. They contain the fabric's color and texture information, which can truly reflect the quality status of the fabric surface and provide a sufficient raw data foundation for subsequent image preprocessing, defect segmentation model inference, defect quantification, and quality judgment.

[0060] Step S120: Input the original detected image into the fabric defect segmentation model to determine the fabric defect segmentation information. The fabric defect segmentation information includes: risk defect information and safety defect information, the specific contents of which are as follows:

[0061] In step S120, deep learning technology is used to perform pixel-level defect identification and segmentation on the preprocessed detection image to obtain quantitative information characterizing the fabric quality. The fabric defect segmentation model, as the core execution entity of this step, directly affects the accuracy and reliability of subsequent defect quantification, quality judgment, and control mode switching through its selection, configuration, and inference methods.

[0062] In one exemplary implementation, the fabric defect segmentation model employs either the YOLOv8-seg instance segmentation model or the YOLOv11-seg instance segmentation model. Both models are lightweight, single-stage instance segmentation models that can output pixel-level precision defect segmentation masks while maintaining high inference speed, adapting to the dual requirements of real-time performance and accuracy in industrial production lines. Compared to traditional object detection models, instance segmentation models can delineate the complete outline of defect areas with pixel-level precision, rather than simply providing rectangular detection boxes. For irregularly shaped defect types in textile fabrics, such as the smudged edges of stains, the elongated direction of skipped yarns, the irregular boundaries of holes, and the arc-shaped deflection of weft skew, the segmentation mask can accurately fit the true shape of the defect, avoiding quantization errors introduced by including too much background area in the rectangular detection box. The fabric defect segmentation model is preferably deployed on an edge computing device, which is connected to the image acquisition device through a communication network, receives the pre-processed detection image as input, and outputs defect segmentation and classification results in real time.

[0063] In this embodiment, the fabric defect segmentation model comprises three components: a backbone network, a neck network, and a head network. The backbone network performs multi-level feature extraction on the preprocessed input detection image, abstracting layer by layer from shallow features to deep semantic features. Shallow features retain high spatial resolution, including fine structures such as fabric texture details and defect edge information; deep features have a larger receptive field and stronger semantic expression capabilities, capturing the category attributes and overall morphological information of defects. Addressing the characteristics of numerous, densely distributed, and varied minor defects in fabric quality inspection scenarios, the model retains shallow detail feature extraction channels in the backbone network to improve the sensitivity of identifying small target defects such as skipped stitches, fine fuzz, and tiny pinholes. Simultaneously, the backbone network employs an efficient CSP structure to control the number of model parameters, meeting the real-time inference frame rate requirement of no less than 30 frames per second for the production line.

[0064] Between the backbone network and the neck network, the fabric defect segmentation model preferably incorporates a global attention mechanism module. Due to the complex texture of textile fabric backgrounds, the visual differences between some defects and normal textures are extremely subtle. The global attention mechanism module can enhance the model's attention to defect areas from two dimensions: channel attention and spatial attention. Specifically, the channel attention mechanism learns the importance weights of different feature channels, enabling the model to adaptively enhance feature channel responses related to defect types and suppress feature channel responses related to background texture. The spatial attention mechanism learns the attention weight distribution of spatial locations, allowing the model to concentrate computational resources on areas in the image where defects may exist. By introducing the global attention mechanism, the model's defect detection capability against complex texture backgrounds is significantly improved, effectively reducing false positives and false negatives caused by texture interference.

[0065] The neck network employs a bidirectional feature pyramid network structure for multi-scale feature fusion. Fabric defects vary greatly in size, ranging from pinholes less than one millimeter in diameter to stains or weft skew covering several square centimeters. Single-scale feature maps struggle to simultaneously cover all size ranges of defect detection needs. The bidirectional feature pyramid network achieves full fusion between shallow high-resolution detail features and deep strong semantic features by constructing two feature propagation paths: top-down and bottom-up. The top-down path transmits deep semantic information to shallow feature maps, enhancing the semantic guidance of shallow features for defect category classification; the bottom-up path transmits shallow detail information to deep feature maps, supplementing the spatial detail information of deep features. The two paths work synergistically, ensuring that the fused multi-scale feature map retains both fine edge and texture details and accurate category discrimination. Furthermore, the neck network structure has at least four layers to provide sufficient scale adaptability to handle the detection needs of defects of different sizes. Through bidirectional cross-scale connections and weighted fusion strategies, the model suppresses noise interference from complex fabric background textures and reduces false detections caused by texture similarity.

[0066] Between the neck network and the head network, a permutation attention mechanism module is preferably introduced into the model. The permutation attention mechanism module groups the channel dimension into multiple sub-features, processes each sub-feature in parallel to capture feature dependencies in the spatial and channel dimensions, and then realizes information communication between different sub-features through channel permutation operators, thereby improving the model's ability to express flawed features and its discrimination accuracy without significantly increasing computational cost.

[0067] The head network comprises two output branches: a classification branch and a segmentation branch. The classification branch classifies each detected defect instance based on the fused multi-scale feature map, outputting a defect type label and its corresponding confidence score. The segmentation branch generates a pixel-level segmentation mask for each defect instance. This mask is a binarized image matrix corresponding to the resolution of the input detection image, where foreground pixels (e.g., 1) represent pixel positions belonging to the defect region, and background pixels (e.g., 0) represent pixel positions belonging to normal fabric. The boundaries of the segmentation mask precisely match the actual contour of the defect, providing a data foundation for the accurate calculation of subsequent defect quantification parameters. During model inference, when the confidence score output by the classification branch is lower than a preset confidence threshold, the corresponding defect detection result is filtered out to avoid false detections with low confidence interfering with subsequent quality assessments.

[0068] Before inputting the preprocessed detection image into the fabric defect segmentation model, the computing device first adapts the preprocessed detection image to the standard format requirements of the model input. Since the backbone network of the fabric defect segmentation model typically requires a fixed-size input image, such as an RGB three-channel image with a resolution of 640×640 pixels, if the resolution of the preprocessed detection image is inconsistent with this standard input size, it is adjusted to the standard input size using image scaling algorithms such as bicubic interpolation or nearest neighbor interpolation. Simultaneously, the pixel values ​​of the resized detection image are normalized from the integer range to the floating-point range to meet the data format requirements of the model's forward inference. After format adaptation, the computing device inputs the detection image into the fabric defect segmentation model, which has been loaded with model weights and initialized, to perform forward inference calculations.

[0069] Before use, the fabric defect segmentation model needs to undergo training and validation phases. During the training phase, a large number of sample images covering various common fabric defects are first collected. These images come from sources including, but are not limited to, historical images from the production line, standard defect sample images from the laboratory, and synthetic images generated through defect simulation. Common fabric defect types include at least: holes, oil stains, dirt, skipped yarns, broken warp threads, broken weft threads, fuzz, knots, wrinkles, blemishes, color difference patches, and foreign matter attachments. All sample images are annotated with pixel-level masks. Professionally trained annotators use image annotation tools to outline the defect pixels along the true edges of the defect area, generating corresponding true segmentation masks and defect category labels, forming the training dataset. To enhance the model's generalization ability and robustness, various data augmentation techniques were employed during training to expand the training data. These included: randomly adjusting image brightness and contrast to simulate workshop lighting fluctuations; randomly cropping, translating, and flipping images to enhance the model's adaptability to different defect locations and orientations; simulating texture perturbation to mimic slight texture differences during the weaving process, preventing overfitting to fixed texture patterns; and using MixUp and Copy-Paste defect enhancement strategies to mix or copy and paste multiple defect samples onto different background images to address the issues of insufficient defect sample quantity and imbalanced positive and negative samples in industrial scenarios. Model training employed backpropagation and an optimizer, updating network parameters by minimizing a comprehensive loss function that combines classification and segmentation losses, and using weighted cross-entropy loss or FocalLoss to address the imbalance in the number of samples across different defect categories. After training, the model is evaluated on an independent validation dataset. Evaluation metrics include the detection rate of various defects, accuracy, crossover ratio of segmentation masks, and overall detection accuracy. Only models that achieve the predetermined performance metrics can be deployed to the production environment.

[0070] After completing forward inference, the fabric defect segmentation model outputs one or more sets of defect detection results. Each set of defect detection results includes at least the following fields: defect category label, confidence score, detection bounding box coordinates, and pixel-level segmentation mask. After receiving the above output results, the computing device first performs a preliminary screening based on a preset confidence threshold, retaining detection results with confidence scores reaching the threshold for subsequent processing, and filtering out detection results with excessively low confidence to control the false detection rate.

[0071] For the retained defect detection results, the computing device further calculates defect quantification parameters based on the segmentation mask. The calculation of these parameters fully utilizes the pixel-level precision advantage of the segmentation mask. Specifically, the actual defect area is calculated as follows: the total number of foreground pixels in the segmentation mask is counted, and then the total number of foreground pixels is multiplied by the actual physical area corresponding to a single pixel. The physical area corresponding to a single pixel is determined by the spatial resolution calibration value of the image acquisition device. For example, when the physical size corresponding to the detection field of view is 600 mm × 600 mm and the image resolution is 640 × 640 pixels, the physical area corresponding to a single pixel is approximately 0.88 square millimeters. Thus, the pixel area can be converted into an actual physical area in square millimeters. The defect aspect ratio is calculated as follows: based on the minimum bounding rectangle of the segmentation mask or the ratio of length to width along the principal axis. This parameter reflects the morphological characteristics of the defect. For example, defects like skipped stitches typically exhibit a slender shape with an aspect ratio much greater than 1, while defects like holes have an aspect ratio close to 1. The location of the defect in the fabric area is calculated as follows: based on the centroid coordinates or bounding box coordinates of the segmentation mask, combined with the fabric width parameter and the image acquisition area location information, the actual physical location of the defect in the fabric width and length directions is calculated. This location information can be used to determine whether the defect is located in a critical quality area of ​​the fabric (such as the central display area of ​​the fabric or a key part of the cutting and layout). The number of defects per unit length of fabric is calculated as follows: based on the total number of defects within the actual length range of the fabric corresponding to the current detection image, normalization is performed. For example, the frequency of occurrence of various types of defects per meter of fabric is counted. This parameter is an important quantitative indicator for evaluating the batch quality consistency of the fabric. The calculation process of the above defect quantification parameters is automatically executed by the defect quantification module in the computing device without manual intervention, ensuring the objectivity and consistency of the quantification results.

[0072] After calculating the defect quantification parameters, the computing device comprehensively determines the fabric defect segmentation information based on the quantification parameters and defect classification data. The fabric defect segmentation information includes a complete description of each detected defect instance, including defect type, confidence score, precise location coordinates, segmentation mask data, and various defect quantification parameters. Simultaneously, the fabric defect segmentation information also includes a global status label, which indicates whether the fabric area corresponding to the currently detected image is in a safe or risky state. This status label represents the risk defect information or safe defect information in the fabric defect segmentation information. Risk defect information indicates that the current detected image contains defects with a severity exceeding a predetermined standard, or defects exceeding a predetermined threshold, or defects located in critical quality areas of the fabric. Overall, this indicates that the fabric area has quality risks and requires triggering an early warning control mode for manual review or automatic isolation. Safe defect information indicates that the current detected image does not contain defects that meet the risk assessment standard, or only contains extremely minor defects below the risk assessment standard. Overall, this indicates that the fabric area's quality status is normal and it can enter the archiving control mode for data recording and normal flow.

[0073] The determination of risk and safety defect information is achieved by comparing defect quantification parameters with a preset severity threshold. For example, a comprehensive severity quantification value can be calculated based on the defect quantification parameters. This comprehensive severity quantification value can be a weighted sum of the actual defect area, the defect aspect ratio, the defect type weighting coefficient, and the defect location weighting coefficient. The computing device compares the comprehensive severity quantification value with the preset severity threshold: if the comprehensive severity quantification value is greater than the preset severity threshold, the defect is determined to be a severe defect, and the fabric defect segmentation information is marked as risk defect information; if the comprehensive severity quantification value is less than or equal to the preset severity threshold, the defect is determined to be a minor defect, and the fabric defect segmentation information is marked as safety defect information. When multiple defects exist in the same inspection image, the computing device preferably uses the most severe defect as the overall judgment basis for the inspection image. That is, as long as there is one defect that meets the risk judgment standard, the fabric defect segmentation information corresponding to the inspection image is determined to be risk defect information, ensuring the strictness of quality control.

[0074] Furthermore, to improve the reliability of detection results and reduce the interference of false detections in single-frame images on the overall judgment, the computing device preferably performs temporal correlation filtering for defects detected in multiple consecutively acquired detection images of the same roll of fabric. Specifically, the computing device performs correlation matching on defect instances that are close in location, of the same type, and similar in size in adjacent detection images. Only when the same defect is stably detected in consecutive frames is the defect confirmed as a valid defect and included in the defect quantification parameter statistics. For detection results that appear isolated in a single frame and have no matching defects in adjacent frames, they are marked as suspected false detections or transient noise and their confidence weight is reduced. Through the above temporal correlation filtering, the impact of single-frame misjudgments caused by image noise or transient interference on the final quality judgment result is effectively avoided, and the robustness of the detection device is improved.

[0075] Through the above processing flow, the fabric defect segmentation model transforms the original detection image into structured fabric defect segmentation information. This information includes not only pixel-level precision defect segmentation masks and defect category labels, but also quantified defect parameters and comprehensive status labels. This completes the transformation from the original image to structured quality data, providing a quantitative and traceable data foundation for the subsequent determination of quality inspection and control modes and the generation of quality inspection and control instruction sets.

[0076] Step S140: Based on the fabric defect segmentation information, determine the quality control mode. The quality control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality control mode includes: early warning control mode and archiving control mode, the specific contents of which are as follows:

[0077] In step S140, based on the fabric quality status reflected by the fabric defect segmentation information, a differentiated quality control strategy is adaptively matched to achieve precise control of fabric production quality parameters. The fabric defect segmentation information includes defect type, defect quantity, defect quantification parameters (including actual defect area, defect length-to-width ratio, location of the defect in the fabric area, and number of defects per unit length of fabric), and comprehensive risk assessment results. This information collectively constitutes a complete data foundation characterizing the fabric quality status. After acquiring the structured fabric defect segmentation information, the computing device executes a comprehensive quality status assessment logic to determine a quality control mode suitable for the current fabric quality condition.

[0078] In this embodiment, the quality control mode includes at least two types: early warning control mode and archiving control mode. These two modes have clearly defined roles and are adapted to different fabric quality states. The computing device selects the mode based on the comprehensive status label in the fabric defect segmentation information: when the fabric defect segmentation information contains risk defect information, the computing device determines the quality control mode as early warning control mode; when the fabric defect segmentation information contains safety defect information, the computing device determines the quality control mode as archiving control mode. The above mode switching logic is implemented using a threshold judgment method. The judgment benchmark is adapted to the fabric manufacturer's predetermined quality grade standards, ensuring that the judgment results meet the company's actual quality inspection requirements.

[0079] Specifically, the early warning and control mode targets situations where risky defects are present in the fabric defect segmentation information. This means the fabric area corresponding to the currently detected image contains defects exceeding a predetermined standard in severity, or the defect is located in a critical quality area of ​​the fabric, or the overall severity quantification value of the defect exceeds a preset severity threshold. The core function of the early warning and control mode is to trigger an early warning response immediately during production to prevent fabric containing risky defects from flowing into the next production stage or the final product. In this mode, the computing device first generates real-time early warning information, which includes at least the specific type of risky defect, the defect location coordinates, the defect severity assessment value, and the corresponding fabric batch number and roll number. This real-time early warning information is pushed to production management devices via the computing device's communication interface, such as manufacturing execution units, production management dashboards, or the mobile terminals of workshop management personnel. Simultaneously, the computing device also generates corresponding production parameter adjustment suggestions based on the type and severity of the risky defect. For example, when the frequency of a certain type of defect (such as weft breakage) suddenly increases within a short period of time, the device automatically associates the defect type with the weaving equipment parameters in the production process, suggesting inspection and adjustment of loom tension, warp feed speed, or yarn batches. When the detection rate of stain-related defects increases abnormally, the device suggests investigating the cleanliness of the production environment or raw material storage conditions. These adjustment suggestions are automatically generated by the computing device based on the correlation analysis between historical detection data and defect types, providing precise process optimization guidance for production managers in a data-driven manner.

[0080] The quality inspection control instruction set generated under the early warning and control mode includes control instructions for downstream fabric quality inspection execution agencies. For example, when fabric defect segmentation information is determined to be risky defect information, the quality inspection control instruction set generated by the computing device includes, but is not limited to: controlling an automatic marking device set on the fabric transport path to spray identifiable marks or affix electronic tags at corresponding positions on the fabric edge to physically identify the specific location of the defect, facilitating manual verification or automatic removal in subsequent processes; controlling an automatic slitting device set at the fabric winding station to perform slitting or coding operations at the defective area, physically isolating the fabric segment containing the risky defect from the normal fabric segment; or controlling the speed adjustment device of the fabric transport equipment to perform a speed reduction or pause action, so that operators can confirm and handle the defective area on-site. The above control instructions are sent to the corresponding fabric quality inspection execution agencies in a structured data format via a communication network. Each execution agency automatically executes the corresponding operation after receiving the instructions, forming a closed-loop control link from quality inspection to physical disposal.

[0081] The archive management mode addresses situations where safety defects are present in the fabric defect segmentation information. Specifically, the fabric area corresponding to the currently inspected image does not have defects that meet the risk assessment criteria, or only has extremely minor defects below the risk assessment criteria, and the overall fabric quality meets the predetermined quality requirements. The core function of the archive management mode is to complete the structured storage of fabric quality data, providing data support for subsequent quality traceability, batch statistical analysis, and process optimization. In archive management mode, the computing device automatically generates a fabric quality inspection file corresponding to the currently inspected fabric segment based on the defect type, defect quantification parameters (including defect area, length-to-width ratio, location distribution, and number of defects per unit length) and quality grade judgment results in the fabric defect segmentation information. This fabric quality inspection file is stored electronically in the computing device's local database or uploaded to an enterprise-level data server via a communication network. Each roll of fabric has a unique quality file identifier, which can be retrieved and traced using index fields such as fabric batch number, roll number, production date, or inspection station number. Fabric quality inspection files should include at least the following data fields: unique fabric identification information (including production batch number, roll number, width, weight, etc.), inspection timestamp, inspection equipment number, defect segmentation information summary (including defect type distribution statistics, number of various defects, maximum defect area, etc.), defect quantification parameter details (including precise location coordinates, area value, length-width ratio, etc. of each defect), and comprehensive quality grade judgment results.

[0082] In this embodiment, the relationship between fabric production quality parameters and target quality parameters is indirectly achieved through the selection of a quality control mode. Fabric production quality parameters are a comprehensive set of indicators characterizing the quality status of the fabric production process, including but not limited to fabric defect detection rate, defect rate of various defects, number of defects per unit length of fabric, overall fabric grade pass rate, and deviation of key process parameters. Target quality parameters are quality target values ​​or ranges pre-set by the fabric manufacturer based on product quality standards, customer requirements, and industry specifications. When fabric defect segmentation information indicates that the current fabric quality status is normal, the archiving control mode continuously records and accumulates fabric quality data, providing the computing equipment with a data foundation for real-time monitoring of whether fabric production quality parameters are stable within the target quality parameter range. When fabric production quality parameters show an early trend of deviating from the target quality parameters, the historical data accumulated under the archiving control mode can support the device in issuing timely process anomaly warnings. When fabric defect segmentation information indicates that the current fabric quality status is abnormal, the early warning control mode triggers real-time warnings and production parameter adjustment suggestions, guiding operators or automatic control devices to make targeted corrections to relevant process parameters, so that the fabric production quality parameters return to the target quality parameter range.

[0083] In this embodiment, fabric production quality parameters can be understood as a dynamic set of indicators that comprehensively reflect the quality control level of the fabric production process from multiple dimensions. Target quality parameters are preset quality control target values ​​based on fabric type, product grade standards, and customer quality requirements. For example, for a high-end shirt fabric, the preset target quality parameters may include: no more than 2 Class A defects per meter of fabric, no more than 5 Class B defects, no serious defects above Class C, and an overall fabric grade no lower than first-class standard. When the computing device, through statistical analysis of a large amount of accumulated testing data in the archive management mode, discovers that the number of defects per unit length in a batch of fabric, although not yet exceeding the acceptable limit of the quality standard, shows a continuous upward trend, the device can issue a process warning before the actual number of defects exceeds the target quality parameters. This guides production management personnel to proactively intervene and adjust before the quality parameters deviate to an unacceptable range, achieving a shift from passive quality inspection to proactive quality prevention.

[0084] Furthermore, after the quality inspection and control mode is determined, the computing equipment also needs to generate a corresponding quality inspection and control instruction set based on the selected mode. The quality inspection and control instruction set is a structured, executable set of control commands. Its specific content varies depending on the control mode. Each control command includes fields such as target executor identifier, action type code, action parameters, and priority level. For the early warning control mode, the quality inspection and control instruction set focuses on information push instructions to the production management device, action control instructions to the automatic marking or cutting device, and collaborative control instructions to the fabric transfer device. For the archiving control mode, the quality inspection and control instruction set focuses on data write instructions to the database server, data output instructions to the report generation module, and data update instructions to the production management dashboard. All control instructions are encapsulated in a standardized communication protocol format and distributed to the corresponding fabric quality inspection execution agency through the factory's internal network, ensuring the reliability of instruction transmission and the real-time nature of execution.

[0085] In this embodiment, the fabric quality inspection execution mechanism is a general term for various terminal devices distributed on the fabric production line that perform specific physical operations or information processing operations. These include, but are not limited to: automatic marking devices, automatic cutting devices, air-blowing rejection devices, guide roller adjustment devices, fabric conveying speed adjustment devices, and audible and visual alarms installed along the fabric transport path; and production management dashboards, operator terminals, and database servers installed in the central control room. Each execution mechanism executes corresponding operations based on the received quality inspection and control instructions and their corresponding control commands, jointly completing quality inspection and control operations adapted to the target quality parameters. For example, after receiving a marking instruction containing the coordinates of the defect location, the automatic marking device performs inkjet marking or labeling operations when the fabric moves to the corresponding defect location; after receiving a display instruction containing real-time warning information and adjustment suggestions, the production management dashboard highlights the distribution of risky defects and corresponding handling suggestions; and after receiving a data write instruction containing fabric quality inspection files, the database server completes data integrity verification and storage operations.

[0086] In one exemplary embodiment, the computing device also provides a graphical user interface (GUI) for quality management personnel to view the execution status of the current quality inspection and control mode. The GUI includes at least a visual display area for fabric defect segmentation information, a quality inspection and control mode status indicator area, and an execution feedback area for the quality inspection and control instruction set. In the visual display area, the currently detected image is displayed as a thumbnail, and each detected defect area is marked on the image with a segmentation mask of different colors. Different colors correspond to different defect types or different severity levels. Users can click on any defect area to view detailed quantitative parameters of that defect. In the mode status indicator area, the device uses text and color to identify the currently active quality inspection and control mode (early warning control mode is marked in red, and archiving control mode is marked in green), and displays the history of mode switching. In the execution feedback area, the device displays in real time the response status and execution results of each fabric quality inspection execution agency to each control command in the quality inspection and control instruction set, such as displaying feedback information like "Automatic marking device has performed marking operation," "Production management dashboard has updated early warning information," and "Database has written quality inspection files," enabling users to monitor the execution progress and results of control instructions in real time. Users can also configure and adjust preset severity thresholds, confidence thresholds, and quality grade judgment criteria through the graphical user interface to adapt to changes in quality inspection standards for different fabric types, product grades, and customer requirements.

[0087] Through the above methods, the computing device adaptively determines the early warning control mode or the archiving control mode based on the fabric defect segmentation information, realizing the precise matching between the fabric quality status and the quality inspection control strategy. This allows fabrics with quality risks to be detected and isolated on the production line in the first instance, while the quality data of normal fabrics can be completely archived, providing a reliable data foundation for subsequent quality traceability and process optimization, and effectively improving the intelligence level and response speed of fabric production quality control.

[0088] Step S160: In response to the quality inspection and control mode, a quality inspection and control instruction set is generated. The quality inspection and control instruction set is used to control the fabric quality inspection execution agency to perform quality inspection and control operations adapted to the target quality parameters. The specific content is as follows:

[0089] In step S160, the determined quality inspection and control mode is converted into executable control instructions, which drive various actuators on the fabric production line to complete physical operations or information processing operations that are adapted to the fabric quality status, thereby realizing a complete closed loop from quality inspection to quality control.

[0090] After determining the quality control mode based on fabric defect segmentation information, the computing device calls the corresponding instruction generation logic according to the determined mode type to generate a quality control instruction set adapted to that mode. The quality control instruction set is a collection of control commands issued by the computing device to each terminal actuator on the fabric production line. It is encapsulated in a structured data format and contains one or more independent control instructions. Each control instruction includes at least a target actuator identifier field, an action type code field, an action parameter field, and a priority level field. The target actuator identifier field specifies the recipient of the instruction, ensuring that the instruction can be accurately routed to the corresponding terminal device. The action type code field indicates the type of operation the actuator needs to perform. The action parameter field provides the specific parameter values ​​required to perform the operation, such as displacement, speed, marker position coordinates, or data write address. The priority level field indicates the urgency of the instruction's execution, allowing for reasonable ordering of execution when multiple instructions are processed concurrently by the actuator. After the computing device completes the assembly of the instruction set, it sends the quality inspection and control instruction set to the corresponding fabric quality inspection execution agency in the form of data packets through the factory's internal industrial communication network (such as industrial Ethernet, fieldbus, or wireless communication network).

[0091] The fabric quality inspection execution mechanism is a general term for various terminal devices distributed on the fabric production line that receive and execute quality inspection and control instructions. Its specific configuration depends on the automation level of the production line and the quality inspection and control requirements. In this embodiment, the fabric quality inspection execution mechanism includes at least one or more of the following: an automatic marking device, an automatic rejection device, a production management dashboard, a database server, and an audible and visual alarm device. The automatic marking device is located on the fabric transport path and downstream of the image acquisition station. Upon receiving a marking instruction containing the coordinates of the defect location, it performs inkjet marking, labeling, or perforation marking operations when the fabric moves to the corresponding defect location, physically distinguishing the defective area from the normal area for easy manual verification or automatic sorting in subsequent processes. The automatic rejection device is located before the fabric winding station or at the fork in the fabric transport path. Upon receiving a rejection instruction containing the location information of the defective area, it guides the fabric section containing the risky defect to the waste recycling channel or performs a cutting and separation operation to prevent defective fabric from entering the finished product warehouse. Production management dashboards are installed in prominent locations in the workshop control room or on the production line. Upon receiving display commands containing real-time alerts and adjustment suggestions, they visually display the current fabric quality inspection results, including defect distribution maps, quality grade determinations, and anomaly warnings, enabling production managers to monitor the production line's quality status in real time. A database server, upon receiving data write commands containing fabric quality inspection files, performs data integrity verification, format conversion, and archiving. Audible and visual alarm devices are installed at quality inspection stations or key locations in the workshop. Upon receiving alarm commands containing warning levels, they emit audible and visual warning signals of corresponding frequency and color based on the warning level, alerting on-site operators to quality anomalies.

[0092] The specific composition of the quality inspection control instruction set varies depending on the control mode. When the quality inspection control mode determined by the computing device is the early warning control mode, the generated quality inspection control instruction set includes at least the following: a first instruction to push real-time early warning information to the production management dashboard; a second instruction to send an alarm signal to the audible and visual alarm device and control it to provide audible and visual prompts at a frequency and color appropriate to the early warning level; a third instruction to send the defect location coordinates to the automatic marking device and control it to perform marking operations at the corresponding positions on the fabric; and a fourth instruction to send a speed reduction or pause instruction to the speed adjustment device of the fabric conveying equipment to coordinate with the defect handling operations. The quality inspection control instruction set in the early warning control mode focuses on rapid response and physical isolation. Its core objective is to ensure that fabric sections containing risky defects are marked, isolated, or rejected in a timely manner on the production line to prevent defective fabric from flowing into the next production stage or the final product. At the same time, it provides sufficient information to production management personnel so that timely manual review or process adjustment measures can be taken. For example, when a large hole defect is detected in the fabric defect segmentation information and its overall severity quantification value far exceeds the preset severity threshold, the quality control instruction set generated by the computing device includes: controlling the automatic marking device to spray a red mark at the lateral position corresponding to the hole on the fabric edge; controlling the audible and visual alarm device to issue an urgent audible and visual alarm signal; controlling the production management dashboard to display the location and area parameters of the hole in a red highlighted manner; and optionally controlling the automatic slitting device in front of the winding station to perform cutting and separation operations in the hole area.

[0093] When the quality control mode determined by the computing device is the archiving control mode, the generated quality control instruction set includes at least a fifth instruction: sending the fabric quality inspection file to the database server and performing a data write operation; and a sixth instruction: sending a quality data update instruction to the production management dashboard to update the quality statistics of the current batch of fabric. The quality control instruction set in the archiving control mode focuses on data recording and information flow. Its core objective is to ensure that the quality inspection data of each roll of fabric is completely and accurately recorded and stored, forming a structured quality file that can be queried, statistically analyzed, and provided with data support for the digital control and continuous improvement of fabric quality. For example, for a roll of fabric that has passed inspection, the archiving control instruction set generated by the computing device includes: writing the quality inspection file containing defect type distribution statistics, number of defects per unit length, maximum defect area, and overall quality grade to the database server; and updating the pass rate, defect rate statistics, and quality trend chart of the batch of fabric on the production management dashboard. Physical operation instructions (such as marking, rejection, speed reduction, etc.) are typically not triggered in the archiving control mode to ensure the efficient and continuous operation of the production line.

[0094] After the quality inspection and control instruction set is generated, the computing device also receives instruction execution feedback signals from the quality inspection execution agencies of each fabric through the communication network to confirm the execution status of each instruction. The execution feedback signals include at least two types: execution success signals and execution failure signals. An execution success signal indicates that the execution agency has completed the corresponding control operation, while an execution failure signal indicates that the execution agency failed to complete the corresponding control operation due to equipment failure, communication interruption, or abnormal parameters. The computing device updates the instruction execution status record based on the received execution feedback signals and triggers a retransmission mechanism or fault alarm logic when an execution failure signal is detected. For example, when the computing device issues a marking instruction to the automatic marking device, if it does not receive an execution success feedback signal within a predetermined timeout threshold, or receives an execution failure signal, the computing device marks the instruction as execution abnormal, displays the message "Automatic marking device execution abnormal, please check equipment status" on the production management dashboard, and reissues the instruction once. If execution still fails after retransmission, a high-level equipment fault alarm is triggered, notifying equipment maintenance personnel to troubleshoot the fault promptly.

[0095] During the execution of the quality inspection and control instruction set, the computing device preferably also performs a timestamp association operation. Specifically, the computing device associates a unique timestamp identifier with the quality inspection and control instruction set corresponding to each frame of the inspection image, and stores the timestamp in association with the fabric batch number, roll number, and inspection station number, forming a complete instruction execution log. This instruction execution log not only records the content of the issued instructions and the information of the target executing agency, but also records the actual response time and execution results of each executing agency, providing detailed historical data for subsequent equipment status assessment, fault tracing, and equipment optimization.

[0096] In this implementation, the compatibility between fabric production quality parameters and target quality parameters is the core logical basis for generating the quality control instruction set. Target quality parameters are pre-set fabric quality control target values ​​or ranges by fabric manufacturers based on product grade standards, customer quality requirements, and industry specifications. These are stored in the configuration database of the computing device as structured data and can be viewed and modified by authorized users through a graphical user interface. Fabric production quality parameters refer to the actual values ​​of various quality control indicators monitored and recorded in real time during fabric production, including but not limited to fabric defect detection rate, defect rate of various defects, number of defects per unit length of fabric, maximum defect area, overall fabric grade pass rate, and fabric physical performance indicators. The design goal of the quality control instruction set is to adjust the fabric production quality parameters to the range or level specified by the target quality parameters by controlling the fabric quality inspection execution mechanism to perform corresponding operations. In the early warning control mode, this adjustment is achieved through physical isolation of risky defect areas, triggering manual intervention, and adjusting process parameters. Its direct effect is to reduce the proportion of serious defects in the final warehoused fabric to the range allowed by the target quality parameters. Under the archiving and management model, this adjustment is achieved by continuously accumulating quality data, providing process optimization suggestions, and guiding the continuous improvement of production processes. Its long-term effect is to comprehensively improve the overall level of fabric production quality parameters and keep them stably above the target quality parameters.

[0097] Furthermore, in a preferred embodiment, the quality control instruction set also includes differentiated handling strategies for different defect types. The computing device matches the corresponding handling strategy from a pre-set handling strategy library based on the defect type and severity level in the fabric defect segmentation information, and encodes the handling strategy into a corresponding control instruction, incorporating it into the quality control instruction set. For example, the handling strategy library pre-sets: for severe defects such as holes, a three-level linkage handling process of "marking + rejection + alarm" is executed; for moderate defects such as oil stains, a handling process of "marking + manual review" is executed; and for minor defects such as skipped stitches, a handling process of "recording and archiving + no intervention in production" is executed. By introducing differentiated handling strategies, the generation of the quality control instruction set becomes more flexible and refined, minimizing interference with normal production processes while ensuring quality control effectiveness and improving the overall operating efficiency of the production line.

[0098] After completing the entire process of generating and issuing quality control instructions, the computing device preferably also automatically generates a test report corresponding to the batch of fabric. This test report includes at least basic fabric information (batch number, roll number, fabric type, width, production date, etc.), a summary of test results (including total meters tested, total number of defects, number and percentage of various defects, maximum defect area, overall quality grade, etc.), a detailed list of defects (including the type, location coordinates, area, length-to-width ratio, and corresponding handling measures for each defect), and a quality control instruction execution log (including response time, execution results, and anomaly records for each executing agency). The test report is automatically generated in PDF or structured data file format and sent to the production management personnel's email address via communication network or stored in a designated report directory on the enterprise server for subsequent quality audits, customer acceptance, and process analysis.

[0099] In this way, the computing equipment responds to the established quality control mode, generates a set of quality control instructions adapted to the target quality parameters, and distributes the instruction set to each quality control execution agency on the fabric production line. This drives the agencies to collaboratively complete quality control operations such as defect marking, data archiving, early warning notification, and fault isolation, achieving a complete closed loop from fabric defect detection to quality control execution. This process, through a standardized instruction generation and distribution mechanism, ensures consistency between different execution agencies, avoiding response delays and operational errors that may be introduced by manual operation. Simultaneously, the execution feedback mechanism enables real-time monitoring of the execution status of control instructions, ensuring the reliability and traceability of quality control operations. Ultimately, this effectively controls the fabric production quality parameters within the range required by the target quality parameters, improving the overall efficiency and automation level of fabric production quality control.

[0100] Based on steps S110 to S160 above, in this embodiment of the invention, by acquiring the original detection image of the fabric to be inspected and inputting it into the fabric defect segmentation model, fabric defect segmentation information containing risk defect information and safety defect information is obtained. The model can adaptively match either a warning control mode or an archiving control mode based on the fabric defect segmentation information, and generate a dedicated quality inspection control instruction set to control the fabric quality inspection execution agency to perform quality inspection control operations adapted to the target quality parameters, thus realizing intelligent, dynamic, and precise control of fabric quality inspection. This control method can accurately quantify key parameters such as defect area, aspect ratio, distribution location, and number of defects per unit length based on the pixel-level segmentation mask output by the fabric defect segmentation model, improving the accuracy and quantification level of defect identification. It can both promptly trigger the warning control mode for fabrics with risk defects to prevent defective products from entering the next production stage, and automatically execute the archiving control mode for fabrics with safety defects, realizing structured storage and traceable management of quality data. Meanwhile, statistical analysis of the test data can effectively identify the correlation between defects and process parameters, providing data support for production process optimization, realizing the transformation from passive testing to proactive prevention, significantly improving the intelligence and digitalization level of fabric production quality control, effectively reducing fabric quality risks, comprehensively improving the quality controllability and management efficiency of fabric production operations, and solving the technical problems in existing fabric quality inspection technologies such as inconsistent testing standards, insufficient accuracy in identifying minor defects, inability to quantify defect information, and a single quality control mode that cannot be adaptively switched according to test results.

[0101] The method of an embodiment of the present invention for determining fabric defect segmentation information includes: acquiring an original detection image and fabric defect detection model parameters, wherein the fabric defect detection model parameters include at least: model input resolution parameters, segmentation mask output parameters, and defect classification confidence threshold; and determining fabric defect segmentation information based on the original detection image and fabric defect detection model parameters.

[0102] Furthermore, based on the original detection image and the parameters of the fabric defect detection model, the fabric defect segmentation information is determined, including: preprocessing the original detection image to obtain a preprocessed detection image; inputting the preprocessed detection image into the fabric defect segmentation model, and determining the fabric defect segmentation information based on the parameters of the fabric defect detection model.

[0103] Further, the original detection image is preprocessed to obtain a preprocessed detection image, including: performing Gaussian filtering on the original detection image to obtain a filtered detection image; performing illumination equalization on the filtered detection image to obtain an illumination-corrected detection image; and performing size normalization on the illumination-corrected detection image to obtain a preprocessed detection image.

[0104] Further, the preprocessed detection image is input into the fabric defect segmentation model to determine the fabric defect segmentation information, including: inputting the preprocessed detection image into the fabric defect segmentation model to obtain defect segmentation mask data and defect classification data; calculating defect quantification parameters based on the defect segmentation mask data, wherein the defect quantification parameters include at least: the actual area of ​​the defect, the length-to-width ratio of the defect, the location of the defect in the fabric region, and the number of fabric defects per unit length; and determining the fabric defect segmentation information based on the defect quantification parameters and the defect classification data.

[0105] Furthermore, the fabric defect segmentation model is either the YOLOv8-seg instance segmentation model or the YOLOv11-seg instance segmentation model, and the neck network of the fabric defect segmentation model adopts a bidirectional feature pyramid network structure.

[0106] Furthermore, based on defect quantification parameters and defect classification data, fabric defect segmentation information is determined, including: determining the quantification value of fabric defect severity based on defect quantification parameters; judging the quantification value of fabric defect severity based on a preset severity threshold to obtain a judgment result; in response to the judgment result that the quantification value of fabric defect severity is greater than the preset severity threshold, determining the fabric defect segmentation information as risk defect information; in response to the judgment result that the quantification value of fabric defect severity is less than or equal to the preset severity threshold, determining the fabric defect segmentation information as safe defect information.

[0107] Furthermore, based on the fabric defect segmentation information, the quality inspection and control mode is determined, including: when the fabric defect segmentation information is risk defect information, the quality inspection and control mode is determined to be an early warning control mode; when the fabric defect segmentation information is safety defect information, the quality inspection and control mode is determined to be an archiving control mode.

[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0109] This invention also provides a digital control device for the quality inspection of garment fabrics, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0110] Figure 2 According to one embodiment of the present invention, a digital control device for quality inspection of clothing fabrics includes:

[0111] The acquisition module 201 is used to acquire the original detection image of the fabric to be inspected. The original detection image is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area.

[0112] The determination module 202 is used to input the original detection image into the fabric defect segmentation model to determine the fabric defect segmentation information, wherein the fabric defect segmentation information includes: risk defect information and safety defect information;

[0113] The control module 203 is used to determine the quality control mode based on the fabric defect segmentation information. The quality control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality control mode includes: early warning control mode and archiving control mode.

[0114] The generation module 204 is used to generate a quality inspection and control instruction set in response to the quality inspection and control mode. The quality inspection and control instruction set is used to control the fabric quality inspection execution agency to perform quality inspection and control operations that are adapted to the target quality parameters.

[0115] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0116] According to one embodiment of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the above-described digital control method for quality inspection of clothing fabrics.

[0117] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0118] Step S1: Obtain the original detection image of the fabric to be inspected. The original detection image is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area.

[0119] Step S2: Input the original detected image into the fabric defect segmentation model to determine the fabric defect segmentation information, which includes: risk defect information and safety defect information.

[0120] Step S3: Based on the fabric defect segmentation information, determine the quality control mode. The quality control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality control mode includes: early warning control mode and archiving control mode.

[0121] Step S4: In response to the quality inspection and control mode, a quality inspection and control instruction set is generated. The quality inspection and control instruction set is used to control the fabric quality inspection execution agency to perform quality inspection and control operations that are compatible with the target quality parameters.

[0122] According to one embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the storage medium is located to execute the above-described digital control method for quality inspection of clothing fabrics.

[0123] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0124] Step S1: Obtain the original detection image of the fabric to be inspected. The original detection image is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area.

[0125] Step S2: Input the original detected image into the fabric defect segmentation model to determine the fabric defect segmentation information, which includes: risk defect information and safety defect information.

[0126] Step S3: Based on the fabric defect segmentation information, determine the quality control mode. The quality control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality control mode includes: early warning control mode and archiving control mode.

[0127] Step S4: In response to the quality inspection and control mode, a quality inspection and control instruction set is generated. The quality inspection and control instruction set is used to control the fabric quality inspection execution agency to perform quality inspection and control operations that are compatible with the target quality parameters.

[0128] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0129] According to one embodiment of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the above-described digital control method for quality inspection of clothing fabrics.

[0130] Optionally, in this embodiment, the above-mentioned computer program product can be configured as a computer program that performs the following steps:

[0131] Step S1: Obtain the original detection image of the fabric to be inspected. The original detection image is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area.

[0132] Step S2: Input the original detected image into the fabric defect segmentation model to determine the fabric defect segmentation information, which includes: risk defect information and safety defect information.

[0133] Step S3: Based on the fabric defect segmentation information, determine the quality control mode. The quality control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality control mode includes: early warning control mode and archiving control mode.

[0134] Step S4: In response to the quality inspection and control mode, a quality inspection and control instruction set is generated. The quality inspection and control instruction set is used to control the fabric quality inspection execution agency to perform quality inspection and control operations that are compatible with the target quality parameters.

[0135] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0136] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0137] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0138] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0139] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0140] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0141] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A digital management and control method for the quality inspection of garment fabrics, characterized in that, include: Obtain the original inspection image of the fabric to be inspected, which is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area; The original detected image is input into the fabric defect segmentation model to determine the fabric defect segmentation information, wherein the fabric defect segmentation information includes: risk defect information and safety defect information; Based on the fabric defect segmentation information, a quality inspection and control mode is determined. The quality inspection and control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality inspection and control mode includes: an early warning control mode and an archiving control mode. In response to the quality control mode, a quality control instruction set is generated, which is used to control the fabric quality inspection execution agency to perform quality control operations adapted to the target quality parameters.

2. The digital management and control method for quality inspection of garment fabrics according to claim 1, characterized in that, Determining the fabric defect segmentation information includes: Obtain the original detection image and fabric defect detection model parameters, wherein the fabric defect detection model parameters include at least: model input resolution parameters, segmentation mask output parameters, and defect classification confidence threshold; Based on the original detected image and the parameters of the fabric defect detection model, the fabric defect segmentation information is determined.

3. The digital management and control method for quality inspection of garment fabrics according to claim 2, characterized in that, Based on the original detected image and the parameters of the fabric defect detection model, the fabric defect segmentation information is determined, including: The original detection image is preprocessed to obtain a preprocessed detection image; The preprocessed detection image is input into the fabric defect segmentation model, and the fabric defect segmentation information is determined based on the parameters of the fabric defect detection model.

4. The digital control method for quality inspection of garment fabrics according to claim 3, characterized in that, The original detection image is preprocessed to obtain the preprocessed detection image, including: The original detection image is subjected to Gaussian filtering to obtain the filtered detection image; The filtered detection image is subjected to illumination equalization processing to obtain an illumination-corrected detection image; The preprocessed detection image is obtained by performing size normalization processing on the illumination-corrected detection image.

5. The digital management and control method for quality inspection of garment fabrics according to claim 3, characterized in that, The preprocessed detected image is input into the fabric defect segmentation model to determine the fabric defect segmentation information, including: The preprocessed detection image is input into the fabric defect segmentation model to obtain defect segmentation mask data and defect classification data. Based on the defect segmentation mask data, defect quantification parameters are calculated, wherein the defect quantification parameters include at least: the actual area of ​​the defect, the length-to-width ratio of the defect, the location of the defect in the fabric area, and the number of defects per unit length of fabric. Based on the defect quantification parameters and the defect classification data, the fabric defect segmentation information is determined.

6. The digital control method for quality inspection of garment fabrics according to claim 5, characterized in that, The fabric defect segmentation model is either the YOLOv8-seg instance segmentation model or the YOLOv11-seg instance segmentation model, and the neck network of the fabric defect segmentation model adopts a bidirectional feature pyramid network structure.

7. The digital control method for quality inspection of garment fabrics according to claim 5, characterized in that, Based on the defect quantification parameters and the defect classification data, the fabric defect segmentation information is determined, including: Based on the aforementioned defect quantification parameters, the quantification value of the severity of fabric defects is determined; Based on a preset severity threshold, the severity of the fabric defect is quantified to obtain a judgment result; In response to the judgment result that the quantitative value of the severity of the fabric defect is greater than the preset severity threshold, the fabric defect segmentation information is determined to be the risk defect information; In response to the judgment result that the quantified value of the severity of the fabric defect is less than or equal to the preset severity threshold, the fabric defect segmentation information is determined to be the safety defect information.

8. The digital control method for quality inspection of garment fabrics according to claim 1, characterized in that, Based on the fabric defect segmentation information, the quality inspection and control mode is determined, including: When the fabric defect segmentation information is the risk defect information, the quality inspection control mode is determined to be the early warning control mode; When the fabric defect segmentation information is the safety defect information, the quality inspection control mode is determined to be the archiving control mode.

9. A digital control device for quality inspection of garment fabrics, characterized in that, include: The acquisition module is used to acquire the original detection image of the fabric to be inspected, which is used to characterize the texture and color features of the fabric to be inspected located in the fabric quality inspection area. The determination module is used to input the original detected image into the fabric defect segmentation model to determine the fabric defect segmentation information, wherein the fabric defect segmentation information includes: risk defect information and safety defect information; The control module is used to determine the quality control mode based on the fabric defect segmentation information. The quality control mode is used to adjust the fabric production quality parameters to the target quality parameters. The quality control mode includes: early warning control mode and archiving control mode. The generation module is used to generate a quality inspection and control instruction set in response to the quality inspection and control mode. The quality inspection and control instruction set is used to control the fabric quality inspection execution agency to perform quality inspection and control operations that are adapted to the target quality parameters.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device where the computer-readable storage medium is located to perform the digital control method for quality inspection of clothing fabrics as described in any one of claims 1 to 8.