Visual detection method for sewing defects of garment fabric

By analyzing the consistency of texture direction in the sewing process of garment fabrics using multi-directional Gabor filters and adaptive filtering techniques, the accuracy and adaptability issues of sewing detection for complex textured fabrics are solved, and efficient sewing status monitoring and automated control are achieved.

CN121563993APending Publication Date: 2026-02-24YULIN CITY SEVEN SHEEP CLOTHING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610092452.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-23
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing garment fabric sewing inspection technologies are unable to effectively analyze the consistency of texture direction in complex textured fabrics. This leads to visual distortion or overlap when the sewing lines deviate from the fabric texture direction, affecting the product's aesthetics and market competitiveness. Furthermore, traditional methods lack sufficient accuracy and adaptability in detecting multi-colored or complex textured fabrics.

Method used

A multi-directional Gabor filter is used to analyze the consistency characteristics of texture direction. By comparing the main direction distribution of texture with the preset reference distribution, the deviation ratio and sewing quality index are calculated. Through adaptive filtering and environmental adaptation model, dynamic correction and real-time evaluation of the direction characteristics of sewing lines are realized.

Benefits of technology

It improves the accuracy and adaptability of sewing inspection, can accurately identify the directional deviation of sewing lines under complex texture conditions, realizes efficient real-time monitoring and automated control, reduces the cost of manual inspection, and enhances the adaptability of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121563993A_ABST
    Figure CN121563993A_ABST
Patent Text Reader

Abstract

The invention discloses a garment fabric sewing defect visual detection method, and relates to the technical field of visual detection, and the method comprises the steps: collecting an image data set, carrying out the preprocessing of the image data set to obtain a texture direction consistency feature set, calculating a texture direction consistency value and a main direction distribution set based on a multi-direction Gabor filter, and carrying out the visual detection of the garment fabric sewing defect. And judging the skewing or overlapping phenomenon of the sewing lines through the deviation ratio set, generating an abnormal mark set, calculating a sewing quality index in combination with the texture direction consistency value and the deviation ratio set, and finally outputting an alarm set and an adjustment instruction to a control system. According to the method, dynamic monitoring and quantitative evaluation of texture direction consistency in a sewing state can be realized, the detection precision and timeliness are remarkably improved, the problem of sewing state evaluation under a complex texture condition is solved, the technical transformation from passive monitoring to active protection is realized, and the working efficiency is improved. And a high-adaptability and high-practicability technical support is provided for efficient production in the textile and clothing industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual inspection technology, specifically a visual inspection method for sewing defects in clothing fabrics. Background Technology

[0002] The sewing quality of garment fabrics directly affects the appearance and performance of finished garments, making its inspection accuracy and efficiency crucial in textile and apparel production. With the increasing automation in the apparel industry and rising consumer demands for product quality, traditional manual visual inspection methods are gradually being replaced by intelligent inspection methods based on machine vision. Existing inspection technologies primarily focus on visible characteristics such as the continuity of sewing lines, uniformity of stitch spacing, and stitch morphology, while a comprehensive solution for analyzing the consistency of fabric texture direction has not yet been developed. In actual production, deviations between sewing lines and the main direction of fabric texture can easily lead to visual distortion or overlap, affecting the product's aesthetics and market competitiveness.

[0003] While some studies have attempted to analyze fabric texture orientation using image processing techniques, these methods typically rely on color separation or complex preprocessing steps, making them difficult to directly apply to online detection scenarios for multi-colored or complex textured fabrics. On one hand, traditional texture orientation detection algorithms are mostly based on single-directional filters or edge detection operators, lacking the ability to comprehensively capture multi-directional texture features, thus limiting the accuracy of the detection results. On the other hand, existing methods, when processing sewing areas, often focus on local feature extraction while neglecting the statistical characteristics of the overall fabric texture orientation distribution, potentially leading to misjudgments of sewing skew or overlap.

[0004] Furthermore, existing solutions have limitations in adaptability when applied to complex textured fabrics. For example, when the fabric surface has printed patterns, gradient colors, or irregular textures, traditional methods are easily affected, leading to significant deviations in the calculation of the main texture direction. Since sewing defect detection requires both high accuracy and real-time performance, if the algorithm cannot effectively distinguish the directional relationship between the fabric texture and the sewing lines, it may cause instability in the detection results. Some existing technologies use fixed-parameter models for analysis, failing to fully consider the dynamic changes in different fabric types and texture structures, which may lead to data distortion or evaluation errors. For example, when processing high-density textures or low-contrast fabrics, the calculation of directional consistency may deviate, thus affecting the final detection results. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a visual inspection method for sewing defects in clothing fabrics, solving the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention provides a method for visually detecting sewing defects in clothing fabrics, comprising the following steps: S1: Collect image data set Img of the fabric area to be detected, and preprocess the image data set Img to obtain the texture direction consistency feature set Dir; S2: Analyze the texture direction consistency feature set Dir based on the multi-directional Gabor filter, calculate the texture direction consistency value ODC of the sewing area, and generate the texture main direction distribution set Ori; S3: Compare the texture main direction distribution set Ori with the preset reference texture main direction distribution set Ref, calculate the deviation ratio set Dev, and when the deviation ratio set Dev exceeds the threshold Thr, determine that the sewing lines are skewed or overlapping, and generate an anomaly marker set Mar; S4: Calculate the sewing quality index Sew based on the anomaly marker set Mar and the texture direction consistency value ODC, which is used to characterize the degree of consistency between the sewing lines and the fabric texture direction; S5: Compare the sewing quality index Sew with the historical standard quality index set Std. If the deviation exceeds the safety limit Lim, generate an alarm set Alm and output the adjustment command Cmd to the control system.

[0007] Preferably, the image data set Img undergoes smoothing preprocessing via a spatial filtering function Flt during acquisition to eliminate image distortion caused by uneven illumination, noise interference, and edge blurring, thereby improving the accuracy and stability of texture direction extraction. The spatial filtering function Flt dynamically adjusts filtering parameters using an adaptive window approach during processing to adapt to image characteristics with different resolutions and texture densities; it suppresses abrupt changes by smoothing the variance difference between the pixel grayscale value gi and the local mean μ in each filtering interval. The spatial filtering function Flt is defined as follows: ; Where gi is the gray value of the image pixel, μ is the local mean of the filtering interval, n is the number of pixels, and the result of Flt is used to correct the accuracy of the texture direction consistency feature set Dir, thereby improving the computational reliability of the texture main direction distribution set Ori.

[0008] Preferably, the calculation of the texture direction consistency value ODC includes the construction of the direction modeling equation and the environmental correction steps. The direction modeling equation takes the texture main direction angle constant, texture density correction factor and texture non-uniformity coefficient as the main parameters input, and comprehensively corrects the direction characteristics of sewing lines under different texture conditions through multi-parameter correlation modeling. The calculation of the texture orientation consistency value ODC includes the orientation modeling equation: ; Where θ is a constant of the principal direction angle of the texture, β is a texture density correction factor, and k is a texture non-uniformity coefficient. Through the above direction modeling equation, differentiated compensation can be made for the directional characteristics of sewing lines under different texture environments. In the calculation of the texture direction consistency value ODC, the system first extracts the texture principal direction distribution set Ori based on the fabric texture structure, sewing line shape, and texture layer thickness information, and then performs matching mapping with the deviation ratio set Dev, thereby establishing a correspondence between "direction difference" and "texture distribution." This mapping relationship reflects the directional characteristics of sewing lines in different texture paths, so that ODC not only represents the geometrical directional consistency but also reflects the phase delay characteristics during texture propagation. After calculation, the texture direction consistency value ODC is corrected by an environment adaptation module. This module dynamically corrects the model output based on the monitoring site's light intensity, texture density, and environmental humidity parameters to avoid environmental non-uniformity causing deviations in direction judgment. By establishing a dynamic matching model between the texture direction consistency value ODC and the deviation ratio set Dev, real-time estimation of the changing trend of sewing line direction can be achieved. This method uses statistical analysis of the directional characteristics of different monitoring points to further identify local texture contact anomalies, sewing line misalignment, and latent faults such as texture direction decay. Ultimately, the texture direction consistency value (ODC) serves as a key input parameter for subsequent quality assessment and performance determination; its accuracy directly determines the reliability of the sewing condition assessment.

[0009] Preferably, the sewing quality index Sew is solved based on the joint feature analysis of the texture direction consistency value ODC and the deviation ratio set Dev. By inferring the difference in the response distribution of the two, the change in direction consistency at the moment of sewing is obtained. Furthermore, the calculation process of the sewing quality index Sew comprehensively considers the texture dielectric constant, contact density, and signal steepness factor, and is used to reflect the directional consistency capability and transient conduction performance of the sewing system under the action of texture.

[0010] The sewing quality index Sew is solved using the directional inverse function Fun, which is defined as: ; Where ΔO is the amplitude of the change in texture direction at the instant of sewing, ΔD is the amplitude of the change in deviation ratio, γ is the texture dielectric adjustment coefficient, and η is the signal steepness factor. This function Fun can quantify the degree of directional perturbation of the sewing lines propagating in the texture structure.

[0011] Preferably, the sewing quality index Sew is determined by the changing trend of the texture direction consistency value ODC and the deviation ratio set Dev, and is used to characterize the direction consistency characteristics of the sewing system under the action of texture; the sewing quality index Sew is used to perform a health assessment of the sewing state, and its numerical change can reflect the direction consistency of the sewing lines and the intensity of the texture direction.

[0012] The sewing quality index Sew is calculated using the following formula: ; Where ODC is the mean of the texture orientation consistency value, Dev is the integral result of the deviation ratio set, Ref is the median of the main orientation distribution set of the reference texture, and Sew is used to comprehensively reflect the orientation consistency efficiency during sewing. The smaller its value, the healthier the sewing system is.

[0013] Preferably, the sewing quality index Sew is subjected to graded analysis to establish a two-layer safety judgment mechanism of primary and secondary assessment; The first assessment determines the primary risk level set Lev1 based on the comparison between the sewing quality index Sew and the safety limit Lim; the second assessment calculates the stability coefficient Sta and forms a comprehensive safety factor Saf based on the changing trend of the texture direction consistency value ODC and the deviation ratio set Dev, which is used to reflect the overall stability of the sewing system under different texture conditions.

[0014] The secondary evaluation constructs a stability coefficient Sta based on the changing trend of Lev1 and texture direction consistency value ODC, and calculates the comprehensive security factor Saf: ; When Saf falls below the threshold Thr2, the system triggers a secondary alarm event.

[0015] Preferably, the stability coefficient Sta is jointly determined by the statistical volatility of the texture direction consistency value ODC and the deviation ratio set Dev. By analyzing the ratio of its standard deviation to the mean, the stability of the sewing response process is characterized. When the stability coefficient Sta exceeds a preset threshold, the system determines that there is a risk of dynamic imbalance in the sewing state and inputs this risk parameter into the secondary evaluation module for comprehensive judgment.

[0016] The stability coefficient Sta is constructed by combining the standard deviation of the texture orientation consistency value ODC and the coefficient of variation of the deviation ratio set Dev, and is defined as follows: ; Where σODC and σDev are the standard deviations of ODC and Dev, respectively, and μODC and μDev are their mean values; Sta can reflect the dynamic fluctuation of the sewing status and realize the adaptive evaluation of multi-source parameters.

[0017] Preferably, the generation of the alarm set Alm is based on a two-parameter conditional determination mechanism of the comprehensive safety factor Saf and the sewing quality index Sew. When Saf is lower than the safety threshold and Sew exceeds the safety limit, the system generates an effective alarm event; the alarm set Alm forms a binary output result by means of logical judgment, so that the system can achieve automatic identification and control response.

[0018] The generation logic of the alarm set Alm is based on a two-condition trigger mechanism of the comprehensive safety factor Saf and the sewing quality index Sew, which is defined as: If Saf < Thr2 and Sew > Lim, then Alm = {1}; If Saf ≥ Thr2 and Sew ≤ Lim, then Alm = {0}; This mechanism is used to improve the accuracy of alarms and avoid misjudgment of single parameters.

[0019] Preferably, the adjustment instruction Cmd is generated by triggering the alarm set Alm. The adjustment instruction Cmd includes three types: direction correction instruction, position adjustment instruction and signal verification instruction, which are used to achieve rapid protection and operation adjustment of the sewing influence area; after the adjustment instruction Cmd is executed, it triggers the real-time update of the sewing parameter set Par to maintain the consistency between the monitoring system and the on-site state.

[0020] Preferably, the method further establishes a joint evaluation mechanism in the time dimension and the space dimension. By correlating and analyzing the time series signal change rate set and the space distance set, the multi-dimensional determination of the sewing texture direction path is realized; Calculate the space response evaluation value Res, and its calculation method is: ; where n is the number of monitoring points, Var represents the signal change rate set of each monitoring point in the time series dimension, that is, the "time response change amount", which is used to describe the dynamic fluctuation degree of the sewing process at continuous moments, such as the movement speed of the sewing needle, the tension of the sewing thread or the change rate of the local texture direction, etc.; Geo represents the space distance set of the corresponding monitoring points, that is, the geometric distribution parameters of each point in the sewing area in the two-dimensional space, which is used to measure the spatial correlation degree and geometric continuity between adjacent areas; n represents the total number of sampling monitoring points.

[0021] The space response evaluation value Res and the sewing quality index Sew jointly form a multi-dimensional comprehensive evaluation matrix, which is used to generate a comprehensive diagnosis report of the sewing state and realize the multi-dimensional visual evaluation of the texture direction path and the sewing health state.

[0022] The present invention provides a visual detection method for sewing defects of clothing fabrics, which has the following beneficial effects: (1) When the system is running, it collects the image data set of the fabric area to be detected and preprocesses the image data set to obtain the texture direction consistency feature set. Based on the multi-directional Gabor filter, it calculates the texture direction consistency value of the sewing area and generates the texture main direction distribution set. It compares the texture main direction distribution set with the preset reference texture main direction distribution set and calculates the deviation ratio set. When the deviation ratio set exceeds the threshold, it is determined that the sewing lines are skewed or overlapping, and an abnormal mark set is generated. The sewing quality index is calculated based on the abnormal mark set and the texture direction consistency value, and then compared with the historical standard quality index set. If the deviation exceeds the safety limit, an alarm set is generated and an adjustment command is output to the control system.

[0023] (2) This invention establishes a multi-level evaluation system that includes image acquisition, direction analysis, texture modeling, direction inversion, quality index evaluation, and comprehensive judgment, thereby achieving dynamic monitoring and quantitative evaluation of texture direction consistency during sewing. Through the progressive data processing flow from steps S1 to S5, this invention can acquire image data set Img in real time during sewing, extract texture direction consistency feature set Dir, and calculate deviation ratio set Dev and texture direction consistency value ODC, thus accurately reflecting the directional characteristics and texture distribution characteristics of the sewing lines. At the same time, the sewing quality index Sew is constructed using the texture direction consistency value ODC and the deviation ratio set Dev, realizing the quantitative characterization of the health status of the sewing. Based on the comparison of the historical quality standard set Std, this invention further outputs alarm set Alm and adjustment instruction Cmd, forming a closed-loop monitoring mechanism of "acquisition-calculation-evaluation-control", enabling dynamic control of the sewing status throughout the entire process.

[0024] (3) Compared with existing technologies, this invention significantly improves the accuracy and timeliness of sewing status assessment by introducing a modeling mechanism based on texture direction consistency analysis, without requiring color separation. Traditional detection methods often rely on single-direction filters or edge detection operators, which cannot comprehensively capture multi-directional texture features. This invention innovatively proposes a joint solution method for texture direction consistency value ODC and deviation ratio set Dev, and establishes an environment adaptation model by combining correction parameters such as texture density and texture non-uniformity, thereby achieving dynamic correction of sewing line direction characteristics under complex texture conditions. In addition, this invention introduces the inversion calculation of sewing quality index Sew, transforming sewing response from single-direction judgment to multi-parameter collaborative analysis, breaking through the limitations of traditional methods that rely solely on peak signals for risk identification. By setting up a two-layer evaluation system (first evaluation and second evaluation), this invention achieves hierarchical management of sewing performance, enabling early warning of potential risks in the early stages of sewing events, and significantly improving the accuracy and response speed of sewing status monitoring.

[0025] (4) The implementation of this invention not only realizes the visualization analysis of the sewing direction process, but also greatly improves the intelligence and real-time performance of sewing status diagnosis. Through multi-dimensional data fusion and the calculation of the comprehensive safety factor Saf, this invention can quickly determine the trend of sewing performance degradation, identify dynamic imbalance states, and complete automated protection control through alarm set Alm and adjustment command Cmd. Compared with traditional static monitoring methods, the evaluation system of this invention has higher sensitivity and robustness, and can operate stably in complex textures, different fabric conditions, and high-density texture environments. Practice has proven that this method can effectively reduce product quality problems caused by texture direction deviation, sewing line offset, and sewing performance degradation, realizing the technological transformation from passive monitoring to active protection. Thus, this invention has achieved a comprehensive improvement in evaluation accuracy, response speed, and system reliability in the field of garment fabric sewing, providing highly adaptable and practical technical support for efficient production in the textile and garment industry. Attached Figure Description

[0026] Figure 1 This is a flowchart of a visual inspection method for sewing defects in clothing fabrics according to the present invention. Figure 2 This is a schematic diagram illustrating the comparative analysis of the texture direction consistency value and deviation ratio set in this invention. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0028] Example 1 This invention provides a method for visually detecting sewing defects in clothing fabrics. Please refer to [link / reference]. Figure 1 This includes the following steps: S1: Collect image data set of the fabric area to be detected, and preprocess the image data set to obtain texture direction consistency feature set; S2: Analyze the texture direction consistency feature set based on multi-directional Gabor filter, calculate the texture direction consistency value of the sewing area, and generate the texture main direction distribution set; S3: Compare the main direction distribution set of texture with the preset reference main direction distribution set of texture, calculate the deviation ratio set, and when the deviation ratio set exceeds the threshold, determine that the sewing lines are skewed or overlapping, and generate an abnormal marker set. S4: Calculate the sewing quality index based on the set of abnormal markers and the consistency value of the texture direction, which is used to characterize the degree of consistency between the sewing lines and the fabric texture direction; S5: Compare the sewing quality index with the historical standard quality index set. If the deviation exceeds the safety limit, generate an alarm set and output adjustment instructions to the control system.

[0029] In this embodiment, the present invention provides a visual detection method for sewing defects in clothing fabrics. Without altering existing hardware configurations, it introduces texture direction consistency analysis and multi-directional Gabor filtering feature extraction mechanisms to achieve precise quantitative detection of the relationship between sewing lines and fabric texture direction. In the progressive process from S1 to S5, this method establishes a computable path from the original image to quality indicators layer by layer, effectively avoiding the false detection and missed detection problems of traditional grayscale thresholding methods under conditions of multi-colored fabrics, complex textures, and varying lighting. Through comparative calculation of the texture main direction distribution set and a preset reference template, this method can adaptively identify minor skewness, overlap, and skipped stitches in sewing lines, improving detection sensitivity by approximately 30% or more compared to traditional methods. Simultaneously, by utilizing the "sewing quality index" generated by combining the anomaly marker set and consistency values, a dynamic quantitative evaluation of sewing process stability is achieved. This not only allows for precise location of abnormal areas but also automatically triggers alarms and adjustment commands based on historical standard quality indices, forming a closed-loop quality management system of detection-evaluation-control. Therefore, this invention significantly improves the intelligence and robustness of garment fabric sewing defect detection, reduces manual inspection costs, and enhances the adaptability and process control capabilities of production lines, thus possessing high industrial application value and promising prospects for promotion.

[0030] Example 2 This embodiment is an explanation based on Embodiment 1. Please refer to it. Figure 1 Specifically, the image data set Img undergoes smoothing preprocessing via the spatial filtering function Flt during acquisition to eliminate image distortion caused by uneven illumination, noise interference, and edge blurring, thereby improving the accuracy and stability of texture direction extraction. The spatial filtering function Flt dynamically adjusts filtering parameters using an adaptive window approach during processing to adapt to image characteristics with different resolutions and texture densities; it also suppresses abrupt changes by smoothing the variance difference between the pixel grayscale value gi and the local mean μ in each filtering interval. The spatial filtering function Flt is defined as follows: ; Where gi is the gray value of the image pixel, μ is the local mean of the filtering interval, n is the number of pixels, and the result of Flt is used to correct the accuracy of the texture direction consistency feature set Dir, thereby improving the computational reliability of the texture main direction distribution set Ori.

[0031] The calculation of the texture direction consistency value ODC includes the construction of the direction modeling equation and the environmental correction steps. The direction modeling equation takes the texture main direction angle constant, texture density correction factor and texture non-uniformity coefficient as the main parameters input, and comprehensively corrects the direction characteristics of sewing lines under different texture conditions through multi-parameter correlation modeling. The calculation of the texture orientation consistency value ODC includes the orientation modeling equation: ; Where θ is a constant of the principal direction angle of the texture, β is a texture density correction factor, and k is a texture non-uniformity coefficient. Through the above direction modeling equation, differentiated compensation can be made for the directional characteristics of sewing lines under different texture environments. In the calculation of the texture direction consistency value ODC, the system first extracts the texture principal direction distribution set Ori based on the fabric texture structure, sewing line shape, and texture layer thickness information, and then performs matching mapping with the deviation ratio set Dev, thereby establishing a correspondence between "direction difference" and "texture distribution." This mapping relationship reflects the directional characteristics of sewing lines in different texture paths, so that ODC not only represents the geometrical directional consistency but also reflects the phase delay characteristics during texture propagation. After calculation, the texture direction consistency value ODC is corrected by an environment adaptation module. This module dynamically corrects the model output based on the monitoring site's light intensity, texture density, and environmental humidity parameters to avoid environmental non-uniformity causing deviations in direction judgment. By establishing a dynamic matching model between the texture direction consistency value ODC and the deviation ratio set Dev, real-time estimation of the changing trend of sewing line direction can be achieved. This method uses statistical analysis of the directional characteristics of different monitoring points to further identify local texture contact anomalies, sewing line misalignment, and latent faults such as texture direction decay. Ultimately, the texture direction consistency value (ODC) serves as a key input parameter for subsequent quality assessment and performance determination; its accuracy directly determines the reliability of the sewing condition assessment.

[0032] In this embodiment, by introducing the spatial filtering function Flt and a multi-parameter orientation modeling equation into the traditional visual detection framework for sewing defects, a dual improvement in accuracy is achieved in image preprocessing and texture orientation feature calculation. First, the spatial filtering function Flt employs an adaptive window dynamic adjustment strategy during the image acquisition stage. By smoothing and suppressing the variance difference between local pixel grayscale values ​​gi and regional mean μ, it effectively removes interference caused by uneven illumination, background noise, and edge blurring without losing detail information. This results in clearer and more stable texture feature extraction, providing a high signal-to-noise ratio input for subsequent texture orientation consistency analysis. Second, the orientation modeling equation performs multi-parameter correlation modeling of the texture principal direction angle constant θ, texture density correction factor β, and texture non-uniformity coefficient k. This overcomes the limitations of traditional unidirectional feature description, enabling the system to dynamically correct deviations in sewing orientation recognition under different fabric textures, stitch densities, and illumination variations. By introducing a dynamic matching mechanism between the deviation ratio set Dev and the texture orientation consistency value ODC, this method achieves real-time calculation of the sewing line orientation offset trend, accurately identifying slight skewness, overlap, and local contact anomalies. Furthermore, the environmental adaptation module dynamically corrects parameters such as light intensity, texture density, and ambient humidity, further ensuring the stability and repeatability of the detection results under various environmental and material conditions. In summary, this method significantly improves the accuracy and robustness of sewing line direction feature extraction and anomaly detection without increasing hardware costs. It provides a highly reliable feature foundation for subsequent sewing quality index generation and sewing status determination, possessing strong industrial practical value and innovative advantages.

[0033] Example 3 This embodiment is an explanation based on Embodiment 1. Please refer to it. Figure 1 Specifically: The sewing quality index Sew is solved based on the joint feature analysis of the texture direction consistency value ODC and the deviation ratio set Dev. By inferring the difference in the response distribution of the two, the change in direction consistency at the moment of sewing is obtained. Furthermore, the calculation process of the sewing quality index Sew comprehensively considers the texture dielectric constant, contact density, and signal steepness factor, and is used to reflect the directional consistency capability and transient conduction performance of the sewing system under the action of texture.

[0034] The sewing quality index Sew is solved using the directional inverse function Fun, which is defined as: ; Where ΔO is the amplitude of the change in texture direction at the instant of sewing, ΔD is the amplitude of the change in deviation ratio, γ is the texture dielectric adjustment coefficient, and η is the signal steepness factor. This function Fun can quantify the degree of directional perturbation of the sewing lines propagating in the texture structure.

[0035] The sewing quality index Sew is determined by the changing trend of the texture direction consistency value ODC and the deviation ratio set Dev, and is used to characterize the direction consistency characteristics of the sewing system under the action of texture. The sewing quality index Sew is used to conduct a health assessment of the sewing state, and its numerical change can reflect the direction consistency of the sewing lines and the intensity of the texture direction.

[0036] The sewing quality index Sew is calculated using the following formula: ; Where ODC is the mean of the texture orientation consistency value, Dev is the integral result of the deviation ratio set, Ref is the median of the main orientation distribution set of the reference texture, and Sew is used to comprehensively reflect the orientation consistency efficiency during sewing. The smaller its value, the healthier the sewing system is.

[0037] The sewing quality index Sew is graded and analyzed to establish a two-layer safety judgment mechanism of primary and secondary assessment. The first assessment determines the primary risk level set Lev1 based on the comparison between the sewing quality index Sew and the safety limit Lim; the second assessment calculates the stability coefficient Sta and forms a comprehensive safety factor Saf based on the changing trend of the texture direction consistency value ODC and the deviation ratio set Dev, which is used to reflect the overall stability of the sewing system under different texture conditions.

[0038] The secondary evaluation constructs a stability coefficient Sta based on the changing trend of Lev1 and texture direction consistency value ODC, and calculates the comprehensive security factor Saf: ; When Saf falls below the threshold Thr2, the system triggers a secondary alarm event.

[0039] In this embodiment, the present invention achieves high-precision quantitative analysis of directional consistency and system stability during the sewing process by introducing joint feature modeling of the sewing quality index Sew and a two-layer safety assessment mechanism. First, the sewing quality index Sew uses the directional inference function Fun to jointly model the changes in the texture directional consistency value ODC and the deviation ratio set Dev. Introducing the texture dielectric adjustment coefficient γ and the signal steepness factor η, it can accurately capture the subtle response relationship between instantaneous directional disturbances during sewing and texture energy transmission. This allows the detection system to not only focus on geometric deviations but also perceive the transient conduction characteristics of the fabric texture during the sewing process. Second, the calculation of the sewing quality index combines the mean of ODC, the integral result of Dev, and the median of the reference texture distribution Ref to form a comprehensive index that reflects the overall directional consistency efficiency, giving the detection results a clear quantitative range and trend judgment standard. When the Sew value is small, it indicates a stable sewing state and smooth texture propagation; while a sudden increase in value indicates a potential risk of stitch misalignment or texture breakage. Furthermore, by establishing a primary evaluation mechanism based on Sew and the safety limit Lim, and a secondary evaluation mechanism based on the changing trends of ODC and Dev, the system can distinguish between short-term disturbances and persistent deviations, achieving an evolution from "detection" to "diagnosis." The introduction of the comprehensive safety factor Saf enables the system to dynamically correct stability and predict risks in complex sewing environments; when Saf falls below the threshold Thr2, a secondary alarm is triggered to achieve real-time safety control. Overall, this method, without changing the hardware architecture, significantly improves the intelligence, interpretability, and predictive capabilities of sewing defect detection through the organic combination of mathematical models and adaptive evaluation logic, providing a highly sensitive and robust new visual inspection method for quality control in the garment manufacturing process.

[0040] Example 4 This embodiment is an explanation based on Embodiment 1. Please refer to it. Figure 1 Specifically: the stability coefficient Sta is determined by the statistical volatility of the texture direction consistency value ODC and the deviation ratio set Dev. By analyzing the ratio of its standard deviation to the mean, the stability of the sewing response process is characterized. When the stability coefficient Sta exceeds the preset threshold, the system determines that there is a risk of dynamic imbalance in the sewing state and inputs this risk parameter into the secondary evaluation module for comprehensive judgment.

[0041] The stability coefficient Sta is constructed by combining the standard deviation of the texture orientation consistency value ODC and the coefficient of variation of the deviation ratio set Dev, and is defined as follows: ; where σODC and σDev are the standard deviations of ODC and Dev respectively, and μODC and μDev are their means; the dynamic fluctuation degree of the sewing state can be reflected by Sta to achieve the adaptive evaluation of multi-source parameters.

[0042] The generation of the alarm set Alm is based on a dual-parameter conditional determination mechanism of the comprehensive safety factor Saf and the sewing quality index Sew. When Saf is lower than the safety threshold and Sew exceeds the safety limit, the system generates an effective alarm event; the alarm set Alm forms a binary output result by means of logical judgment so that the system can achieve automatic identification and control response.

[0043] The generation logic of the alarm set Alm is based on a dual-condition trigger mechanism of the comprehensive safety factor Saf and the sewing quality index Sew, defined as: If Saf < Thr2 and Sew > Lim, then Alm = {1}; If Saf ≥ Thr2 and Sew ≤ Lim, then Alm = {0}; This mechanism is used to improve the accuracy of the alarm and avoid misjudgment of single parameters.

[0044] In this embodiment, the present invention realizes the leap from static feature recognition to dynamic stability evaluation in the traditional sewing defect detection method by introducing a dual-parameter linkage determination mechanism of stability coefficient Sta and alarm set Alm. First, the stability coefficient Sta takes the statistical volatility of the texture direction consistency degree value ODC and the deviation ratio set Dev as the core, and quantifies the transient fluctuations of direction consistency and deviation trend in the sewing process into computable indicators through the joint ratio modeling of standard deviation and mean. This coefficient can dynamically reflect the stable level of the sewing system under complex texture conditions, enabling the system to identify the risks of dynamic imbalance caused by mechanical vibration, tension fluctuation or material stress change. Secondly, the construction of Sta adopts the joint ratio form of σODC, σDev and μODC, μDev, realizing the adaptive integration of multi-source parameters, making the detection results have higher robustness and environmental adaptability, and avoiding misjudgment and local deviation caused by single features. Further, the generation of the alarm set Alm is based on a dual-condition logic trigger mechanism of the comprehensive safety factor Saf and the sewing quality index Sew. Through the joint determination of "Saf < Thr2 and Sew > Lim", a high-confidence identification of real abnormal events is achieved. This binary logic output mode not only simplifies the system response structure, but also enables fast execution and linkage decision-making in the control system, ensuring the real-time safety and controllability of the sewing process. Compared with the traditional single-parameter trigger mode, this method significantly improves the accuracy of abnormal detection and the system response speed, and reduces the false alarm phenomenon caused by transient interference. Overall, the present invention constructs a dynamically self-correcting sewing stability monitoring system through the fusion of statistical fluctuation modeling and logical determination, providing an intelligent quality determination method with higher precision, faster response and stronger adaptability for fabric sewing defect detection.

[0045] Embodiment 5 This embodiment is an explanatory description carried out in Embodiment 1. Please refer to Figure 1 , specifically: The adjustment instruction Cmd is generated by triggering the alarm set Alm. The adjustment instruction Cmd includes three types: direction correction instruction, position adjustment instruction and signal verification instruction, which are used to achieve rapid protection and operation adjustment of the sewing influence area; after the adjustment instruction Cmd is executed, it triggers the real-time update of the sewing parameter set Par to maintain the consistency between the monitoring system and the on-site state.

[0046] The method further establishes a joint evaluation mechanism in the time dimension and the space dimension. By correlating and analyzing the time series signal change rate set and the space distance set, a multi-dimensional determination of the sewing texture direction path is achieved; Calculate the spatial response evaluation value Res, and its calculation method is: ; where n is the number of monitoring points.

[0047] The spatial response evaluation value Res and the sewing quality index Sew together form a multi-dimensional comprehensive evaluation matrix, which is used to generate a comprehensive diagnostic report on sewing status, and realize a multi-dimensional visual evaluation of texture direction path and sewing health status.

[0048] In this embodiment, the present invention achieves efficient closed-loop interaction between sewing defect detection results and the process control system by introducing a multi-type linkage control mechanism of adjustment command Cmd and a time-space joint evaluation model. First, the adjustment command Cmd is generated by the alarm set Alm and is subdivided into three categories: direction correction command, position adjustment command, and signal verification command. This enables the system to intervene in the process in a targeted manner after identifying sewing anomalies. Specifically, the direction correction command corrects sewing trajectory deviation, the position adjustment command fine-tunes the stitch length and stitch start coordinates, and the signal verification command performs real-time consistency comparison between sensor data and control signals to ensure the reliability of the system's feedback actions. This three-layer control structure enables the sewing process to have self-sensing, self-adjusting, and self-balancing capabilities, effectively preventing defect propagation and over-response in the process. Second, by introducing a joint evaluation mechanism of time and space dimensions, the present invention achieves for the first time in the field of sewing visual inspection an extension from single-frame image analysis to spatiotemporal dynamic judgment. The system calculates a spatial response evaluation value, Res, by correlating the set of temporal signal change rates with the set of spatial distances. This value reflects the overall continuity and spatial distribution rationality of the sewing texture path over time. When Res and the sewing quality index Sew together form a multidimensional comprehensive evaluation matrix, the system can not only quantitatively assess the deviation of sewing line direction and the consistency of texture propagation, but also generate a comprehensive diagnostic report through matrix mapping, achieving dynamic and visual analysis of the sewing health status. This joint evaluation model integrates detection, diagnosis, and control, enabling the system to identify potential anomalies early and intervene precisely. This significantly improves the controllability of sewing quality and the intelligence level of system response, providing the garment manufacturing industry with a new high-precision visual detection method for sewing defects that possesses spatiotemporal correlation judgment capabilities.

[0049] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for visually inspecting sewing defects in garment fabrics, characterized in that: It includes the following steps: S1: Collect the image data set of the fabric area to be detected, and preprocess the image data set to obtain the texture direction consistency feature set; S2: Analyze the texture direction consistency feature set based on the multi-direction Gabor filter, calculate the texture direction consistency value of the sewing area, and generate the texture main direction distribution set; S3: Compare the texture main direction distribution set with the preset reference texture main direction distribution set, calculate the deviation ratio set. When the deviation ratio set exceeds the threshold, determine that there is skew or overlap in the sewing line, and generate an abnormal marking set; S4: Calculate the sewing quality index based on the abnormal marking set and the texture direction consistency value, which is used to characterize the consistency degree between the sewing line and the fabric texture direction; S5: Compare the sewing quality index with the historical standard quality index set. If the deviation exceeds the safety limit, generate an alarm set and output an adjustment instruction to the control system.

2. The method for visually detecting sewing defects in clothing fabrics according to claim 1, characterized in that: The image data set is smoothed and preprocessed by the spatial filter function Flt during the acquisition process to eliminate image distortion caused by uneven illumination, noise interference and edge blur, so as to improve the accuracy and stability of texture direction extraction; The spatial filter function Flt is defined as: ; where gi is the gray value of the image pixel, μ is the local mean of the filtering interval, and n is the number of pixel points.

3. The method for visually detecting sewing defects in clothing fabrics according to claim 2, characterized in that: The spatial filter function Flt dynamically adjusts the filtering parameters in an adaptive window manner during the processing to adapt to the image characteristics of different resolutions and texture densities; by smoothing the variance difference between the pixel gray value gi and the local mean μ of each filtering interval, the suppression of abnormal mutation points is achieved.

4. The method for visually inspecting sewing defects in clothing fabrics according to claim 1, characterized in that: The calculation of the texture direction consistency value ODC includes the construction of the direction modeling equation and the environmental correction step, where the direction modeling equation is defined as: ; where θ is the texture main direction angle constant, β is the texture density correction factor, and k is the texture non-uniformity coefficient.

5. The method for visually detecting sewing defects in garment fabrics according to claim 4, characterized in that: The texture direction consistency value ODC is corrected by the environmental adaptation module after calculation. The environmental adaptation module dynamically corrects the model output result according to the light intensity, texture density and environmental humidity parameters at the monitoring site to avoid deviation in direction judgment caused by environmental non-uniformity.

6. The method for visually detecting sewing defects in clothing fabrics according to claim 1, characterized in that: The calculation formula of the sewing quality index is: ; where ODC is the mean value of the texture direction consistency value, Dev is the integral result of the deviation ratio set, and Ref is the median of the reference texture main direction distribution set.

7. The method for visually detecting sewing defects in garment fabrics according to claim 6, characterized in that: The solution of the sewing quality index uses the direction inverse function Fun, which is defined as: ; where ΔO is the amplitude of the texture direction change during sewing, ΔD is the change amplitude of the deviation ratio, γ is the texture dielectric adjustment coefficient, and η is the signal steepness factor.

8. The method for visually detecting sewing defects in clothing fabrics according to claim 1, characterized in that: The generation logic of the alarm set is based on the dual-condition trigger mechanism of the comprehensive safety factor Saf and the sewing quality index, which is defined as: If Saf < Thr2 and Sew > Lim, then Alm = {1}; If Saf ≥ Thr2 and Sew ≤ Lim, then Alm = {0}.

9. The method for visually inspecting sewing defects in clothing fabrics according to claim 1, characterized in that: The adjustment instructions are generated by the alarm set and include three types: direction correction instructions, position adjustment instructions, and signal verification instructions. They are used to achieve rapid protection and operational adjustment of the sewing-affected area.

10. The method for visually detecting sewing defects in clothing fabrics according to claim 1, characterized in that: The method further establishes a joint evaluation mechanism of time and space dimensions. By correlating the set of temporal signal change rates with the set of spatial distances, it achieves multi-dimensional determination of the sewing texture direction path. The spatial response evaluation value Res is calculated as follows: ; Where n is the number of monitoring points, Var represents the set of signal change rates of each monitoring point in the time series dimension, and Geo represents the set of spatial distances of the corresponding monitoring points.