Sewing product defect management method and electronic equipment thereof

By performing quality detection and preprocessing of the image data of sewing products, and using preset defect detection algorithm to identify defect features, the problem of inaccurate detection results in the prior art is solved, and the automated identification and management of defects of sewing products is realized, and the detection accuracy and production quality inspection efficiency are improved.

CN120411005APending Publication Date: 2025-08-01DONGGUAN STEADY CONTROL AUTOMATION TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510483442.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing sewing product defect management methods rely on simple image acquisition and classification judgment, and lack a screening mechanism for image quality, resulting in inaccurate detection results and difficult to meet the stability and consistency requirements of modern industrial production.

Method used

By acquiring image data in the sewing area, performing quality detection and preprocessing, using preset defect detection algorithms to identify defect features and categories, and performing defect management and feedback, including multi-angle image acquisition, image fusion, clarity and exposure detection, to eliminate image quality interference and achieve automated identification and management.

Benefits of technology

It improves the accuracy and efficiency of sewing product defect detection, realizes an intelligent and closed-loop quality inspection process from image acquisition to quality decision-making, and ensures the accuracy of the inspection results and the stability of production quality inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411005A_ABST
    Figure CN120411005A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a sewing product defect management method, device and system. The method comprises the following steps: acquiring image data of a sewing area to be detected; performing quality detection on the image data of the to-be-detected sewing area, and determining image data of a target sewing area; detecting the image data of the target sewing area through a preset defect detection algorithm to obtain data of at least one defect; and executing corresponding defect management and defect feedback according to at least one defect data. By automatically identifying and managing various defects such as broken threads, skipping stitches and irregular stitches in the sewing product and detecting the image quality before detection, the interference of the image quality is eliminated, and the detection precision of the sewing defects in the sewing product is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent defect detection, and in particular to a sewing product defect management method, device, system, electronic device and storage medium thereof. Background Art

[0002] Sewn products (such as clothing and textile accessories) often exhibit various quality defects during the production process, such as thread breakage, skipped stitches, abnormal stitch density, and irregular stitching. If these issues go undetected, they can directly impact the appearance and durability of the final product. Traditional quality inspection methods generally rely on manual visual inspection, which is not only inefficient and inaccurate, but also susceptible to subjective judgment by inspectors, making it difficult to meet the stability and consistency requirements of modern industrialized sewing production.

[0003] Therefore, the existing sewing product defect management is limited to simple image acquisition and classification judgment, lacks a screening mechanism for image quality itself, and is difficult to guarantee defect detection results. Summary of the Invention

[0004] The embodiment of the present invention provides a sewing product defect management method to solve the problem that the existing sewing product defect management is limited to simple image acquisition and classification judgment, lacks a screening mechanism for image quality itself, and is difficult to guarantee defect detection results.

[0005] In a first aspect, an embodiment of the present invention provides a method for managing defects in sewn products, the method comprising the following steps: Acquiring image data of the sewing area to be measured; Performing quality inspection on the image data of the sewing area to be tested to determine the image data of the target sewing area; Detecting and processing the image data of the target sewing area using a preset defect detection algorithm to obtain at least one defect data; According to at least one of the defect data, corresponding defect management and defect feedback are performed.

[0006] Optionally, obtaining image data of the sewing area to be measured includes: Performing multi-angle detection on the sewing product using a preset image acquisition device and a preset image edge algorithm to obtain a plurality of images of the first sewing area to be detected; Determining a plurality of second sewing area images to be measured by performing boundary calculation on the plurality of first sewing area images to be measured; The plurality of second images of the sewing area to be measured are processed by an image fusion algorithm to obtain image data of the sewing area to be measured.

[0007] Optionally, the quality inspection of the image data of the sewing area to be measured to determine the image data of the target sewing area includes: Based on a preset gray-scale processing model, calculate the clarity of the image data of the sewing area to be measured to determine the pre-clear image data of the sewing area to be measured; Based on a preset ambient light change threshold, perform exposure detection on the pre-clear image data to determine the image data of the target sewing area.

[0008] Optionally, the quality inspection of the image data of the sewing area to be measured to determine the image data of the target sewing area, the method further includes: Based on the clarity data of the pre-clear image data, determine a plurality of consecutive sewing areas; Based on the exposure data of the plurality of consecutive sewing areas, connect the plurality of consecutive sewing areas in series to obtain the target sewing area.

[0009] Optionally, the defect data includes defect features and defect categories. The detection and processing of the image data of the target sewing area through a preset defect detection algorithm to obtain at least one piece of defect data includes: Perform preprocessing on the image data of the target sewing area to obtain target image data; Perform stitch area detection and segmentation processing on the target image data to obtain pre-defect detection image data; Perform defect feature recognition on the pre-defect detection image data to determine at least one corresponding defect category and defect feature.

[0010] Optionally, the execution of corresponding defect management and defect feedback according to at least one piece of the defect data includes: According to the defect features and defect categories, perform defect marking in the target sewing area to obtain the marking data of the corresponding defect in the target sewing area; Determine the occurrence frequency of the at least one piece of defect data; Based on the occurrence frequency, perform early warning prompts and quality feedback on the corresponding defect data.

[0011] In a second aspect, an embodiment of the present invention further provides a sewing product defect management device, and the sewing product defect management device includes: A first acquisition module for acquiring image data of a sewing area to be measured; A first determination module for performing quality inspection on the image data of the sewing area to be measured to determine the image data of the target sewing area; The first processing module is configured to detect and process the image data of the target sewing area through a preset defect detection algorithm to obtain at least one piece of defect data; The first execution module is configured to execute corresponding defect management and defect feedback according to at least one piece of the defect data.

[0012] In a third aspect, an embodiment of the present invention provides a sewing product defect management system, which includes: a sewing product defect management device, a server, and a sewing machine table device.

[0013] In a fourth aspect, an embodiment of the present invention provides an electronic device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps in the sewing product defect management method provided by the embodiment of the present invention are implemented.

[0014] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the sewing product defect management method provided by the embodiment of the invention are implemented.

[0015] In the embodiment of the present invention, the image data of the sewing area to be measured is obtained; the quality of the image data of the sewing area to be measured is detected to determine the image data of the target sewing area; the image data of the target sewing area is detected and processed through a preset defect detection algorithm to obtain at least one piece of defect data; corresponding defect management and defect feedback are executed according to at least one piece of the defect data. Through the automatic identification and management of various defects such as broken threads, skipped stitches, and irregular stitches in sewing products, and by detecting the image quality before detection, the interference of the image itself quality is excluded, and the detection accuracy of sewing defects in sewing products is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 is a system architecture diagram of a sewing product defect management system provided by an embodiment of the present invention; Figure 2 is a flowchart of a sewing product defect management method provided by an embodiment of the present invention; Figure 3It is a schematic structural diagram of another sewing product defect management device provided in an embodiment of the present invention; Figure 4 It is a schematic structural diagram of an electronic device provided in an embodiment of the present invention. Detailed implementation manners

[0018] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0019] As Figure 1 shown, Figure 1 It is an architecture diagram of a sewing product defect management system 100 provided in an embodiment of the present invention. The sewing product defect management system includes: a sewing product defect management device 300, a server 101, and a sewing machine table device 102. Among them, the above-mentioned sewing product defect management device 300 further includes a first acquisition module, which can be used to acquire image data of a sewing area to be measured; a first determination module, which can be used to perform quality detection on the image data of the sewing area to be measured and determine the image data of the target sewing area; a first processing module, which can be used to perform detection processing on the image data of the target sewing area through a preset defect detection algorithm to obtain at least one defect data; a first execution module, which can be used to execute corresponding defect management and defect feedback according to at least one defect data.

[0020] Specifically, the above-mentioned sewing machine table device can perform sewing in any form and is a workbench unit used to perform sewing operations during the production of sewing products. Generally speaking, it can include but is not limited to core structures such as a sewing machine body, a needle assembly, a feeding mechanism, and an electric control system. In this embodiment, the above-mentioned sewing machine table device is also integrated with an image acquisition component, such as an industrial camera or a vision sensor, for image acquisition of the product sewing area before, during, or after sewing.

[0021] The above-mentioned sewing area to be measured can refer to the sewing part area that is currently covered by the acquired image and needs to be defect-identified, and usually can include the fabric surface and the formed stitch trajectory. Specifically, this area may be either a key node position (such as cuffs, trouser legs, side seams) in the whole sewing product, or a specific detection window segmented by the above-mentioned sewing product defect management system. For example, when detecting whether the shoulder seam of a shirt is off-track, the above-mentioned sewing product defect management system identifies the fabric area corresponding to the shoulder seam as the "sewing area to be measured".

[0022] The aforementioned image data can be digital image information corresponding to the sewing area, captured by a camera or visual sensor. It is typically stored in the form of a pixel matrix and can include grayscale images or color images (RGB channels). Image data is the fundamental carrier for subsequent quality judgment and defect analysis. For example, a JPEG image captured by a camera showing a trouser seam area, where the seam is dark and the fabric has a light background, is a valid set of image data. It should be noted that the corresponding image data varies at different inspection stages. Image data prior to defect detection, i.e., image data of the sewing area to be tested, may have quality issues such as unclear clarity and substandard grayscale.

[0023] In a possible embodiment, the sewing product defect management system performs a preliminary technical evaluation on the acquired image data to determine whether it meets the imaging quality requirements required for subsequent defect detection, thereby realizing a quality inspection process for the image data. This mainly includes image clarity judgment (such as whether it is blurred), exposure detection (whether it is too bright or too dark), and area integrity judgment (whether the seam area appears completely in the image). For example, if an image has severe seam ghosting and blurred edges due to autofocus failure, the sewing product defect management system will mark the image as unqualified and trigger processing mechanisms such as reshooting, cropping, or abandonment.

[0024] The target sewing area can refer to an area with clear, moderately bright, and complete image data after passing the aforementioned quality inspection steps. Specifically, it can be an image corresponding to an area that meets the input criteria of the defect detection algorithm. For example, if five images in a batch of acquired images are discarded due to overexposure or cropping, the remaining three clear and complete images are the "target sewing area image data."

[0025] The above-mentioned preset defect detection algorithm can be any deep learning algorithm that can perform feature recognition, defect classification, etc. on sewing defects in image data, and can include but is not limited to image processing algorithms (such as Canny edge detection, Hough transform), machine learning models (such as support vector machine SVM) or deep learning models (such as U-Net, YOLO, etc.). In a possible implementation method, in order to detect "stitch deviation", the above-mentioned sewing product defect management system can use Hough transform to identify the stitch direction and compare it with the standard reference line. If an angle deviation is found, the output is abnormal.

[0026] In another possible embodiment, the above sewing product defect management system realizes the process of detecting and processing the image data of the target sewing area by inputting the image data into a preset defect detection algorithm, performing operations such as image segmentation, feature extraction, and anomaly judgment, and outputting structured defect results. It should be noted that this process can be carried out on the local sewing machine equipment or completed remotely through the client connected to the server.

[0027] In this embodiment, when detecting "skipped stitches", the algorithm first extracts the stitch skeleton, then identifies the break points in the skeleton, and judges whether the distance between the break points is greater than the preset threshold. If so, it is marked as a skipped stitch.

[0028] The above defect data can include, but is not limited to, structured data such as defect features and defect categories for distinguishing sewing defects, and can also include information such as defect position coordinates, the image number it belongs to, time stamps, confidence scores, etc. The above structured data can be expressed in the form of a stack. For example, {type: skipped stitch, position: (x = 123, y = 456), confidence: 93%, image ID: IMG_0235}.

[0029] The above defect management can be the whole process of the above sewing product defect management system systematically collecting, classifying, storing, statistically analyzing, and managing the identified defect data, realizing the traceability, analyzability, and comparability of sewing defects. The above management content can include, but is not limited to, database records, type classification, trend chart generation, repeated defect detection, etc. For example, in a workshop, 10 similar "too long thread ends" defects are detected cumulatively within 3 consecutive hours. The above sewing product defect management system takes this as an abnormal trend, automatically marks it as a "repeated defect warning", and feeds it back to the client or adjusts the sewing of the above sewing machine equipment.

[0030] The above defect feedback can be that the above sewing product defect management system pushes the detection results and defect information to the user terminal, quality inspection terminal, or upstream system (such as the MES system) for operation reminder, production adjustment, or model training. Specifically, the feedback form can be interface display, report output, email notification, or entering the sample data into the model optimization process.

[0031] In a possible embodiment, the above sewing product defect management system obtains the image data of the sewing area to be measured, evaluates and screens the image quality, uses a preset defect detection algorithm to identify multiple types of defects such as thread breakage and skipped stitches, classifies and records the recognition results, visualizes the annotations, and conducts statistical analysis, and transmits the quality inspection information to the client or production system through the defect feedback mechanism, realizing an intelligent and closed-loop sewing quality inspection process from image acquisition to quality decision-making.

[0032] Through the above method steps, the automatic recognition and closed-loop management of sewing defects are realized, effectively improving the detection accuracy and production quality inspection efficiency.

[0033] As Figure 2 shown, Figure 2 is a flowchart of a sewing product defect management method provided by an embodiment of the present invention. The sewing product defect management method includes the steps of: 201. Obtain image data of the sewing area to be measured.

[0034] In an embodiment of the present invention, the above sewing product defect management method can be applied to a sewing product defect management system. The above sewing product defect management system has functions such as sewing defect data processing, sewing defect data sending and receiving, and sewing defect data memory storage, and can be constructed based on a server or a server cluster. The above server or server cluster can be an electronic device with the ability to process sewing defect data.

[0035] The above sewing area to be measured may refer to the sewing part area that needs to be defect-identified and is covered by the currently collected image, usually including the fabric surface and the formed stitch trajectory. Specifically, this area may be either a key node position (such as cuffs, trouser legs, side seams) in the whole sewing product, or a specific detection window segmented by the above sewing product defect management system. For example, when detecting whether the shoulder seam of a shirt is off-track, the above sewing product defect management system identifies the fabric area corresponding to the shoulder seam as the "sewing area to be measured".

[0036] The above image data may be digital image information corresponding to the sewing area collected by a camera or a vision sensor, usually stored in the form of a pixel matrix, and may include grayscale images or color images (RGB channels). The image data is the basic carrier for subsequent quality judgment and defect analysis. For example, a JPEG image showing the trouser seam area collected by a camera, where the stitch color is darker and the fabric has a light background, is a set of valid image data. It should be noted that the image data corresponding to different detection stages is different. The image data before defect detection, that is, the image data of the sewing area to be measured, may have quality problems such as unclear clarity and unqualified gray level.

[0037] In a possible embodiment, the sewing product defect management system performs a preliminary technical evaluation on the acquired image data to determine whether it meets the imaging quality requirements required for subsequent defect detection, thereby realizing a quality inspection process for the image data. This mainly includes image clarity judgment (such as whether it is blurred), exposure detection (whether it is too bright or too dark), and area integrity judgment (whether the seam area appears completely in the image). For example, if an image has severe seam ghosting and blurred edges due to autofocus failure, the sewing product defect management system will mark the image as unqualified and trigger processing mechanisms such as reshooting, cropping, or abandonment.

[0038] 202. Perform quality inspection on the image data of the sewing area to be tested, and determine the image data of the target sewing area.

[0039] In embodiments of the present invention, the target sewing area may refer to an area that has clear, moderately bright, and complete image data after passing the aforementioned quality inspection steps. Specifically, it may be an image corresponding to an area that meets the input criteria of the defect detection algorithm. For example, if five images in a batch of acquired images are discarded due to overexposure or cropping, the remaining three clear and complete images constitute the "target sewing area image data."

[0040] 203. Detect and process the image data of the target sewing area using a preset defect detection algorithm to obtain at least one defect data.

[0041] In an embodiment of the present invention, the above-mentioned preset defect detection algorithm can be any deep learning algorithm that can perform feature recognition, defect classification, etc. on sewing defects in image data, and can include but is not limited to image processing algorithms (such as Canny edge detection, Hough transform), machine learning models (such as support vector machine SVM) or deep learning models (such as U-Net, YOLO, etc.). In a possible implementation method, in order to detect "stitch deviation", the above-mentioned sewing product defect management system can use Hough transform to identify the stitch direction and compare it with the standard reference line. If an angle deviation is found, the output is abnormal.

[0042] In another possible embodiment, the sewing product defect management system detects and processes image data of a target sewing area by inputting the image data into a preset defect detection algorithm, performing image segmentation, feature extraction, anomaly detection, and other operations, and generating structured defect results. It should be noted that this process can be performed locally on a sewing machine or remotely via a client connected to a server.

[0043] 204. Perform corresponding defect management and defect feedback based on at least one defect data.

[0044] In an embodiment of the present invention, when performing "skipped stitch" detection, the algorithm first extracts the stitch skeleton, then identifies the breakpoints in the skeleton, and determines whether the distance between the breakpoints is greater than a preset threshold. If so, it is marked as a skipped stitch.

[0045] The above defect data may include, but are not limited to, structured data such as defect features and defect categories for distinguishing sewing defects, and may also include information such as defect position coordinates, the image number where it is located, timestamp, confidence score, etc. The above structured data can be expressed in the form of a stack. For example, {type: skipped stitch, position: (x = 123, y = 456), confidence: 93%, image ID: IMG_0235}.

[0046] The above defect management may be the entire process of the above sewing product defect management system systematically collecting, classifying, storing, statistically analyzing, and managing the identified defect data, realizing the traceability, analyzability, and comparability of sewing defects. The above management content may include, but is not limited to, database records, type classification, trend chart generation, repeated defect detection, etc. For example, in a workshop, 10 defects of the same type of "too long thread ends" are detected cumulatively within 3 consecutive hours. The above sewing product defect management system takes this as an abnormal trend, automatically marks it as a "repeated defect warning", and feeds it back to the client or adjusts the sewing of the above sewing machine equipment.

[0047] The above defect feedback may be that the above sewing product defect management system pushes the detection results and defect information to the user terminal, quality inspection terminal, or upstream system (such as the MES system) for operation reminder, production adjustment, or model training. Specifically, the feedback form may be interface display, report output, email notification, or entering the model optimization process as sample data.

[0048] In a possible embodiment, the above sewing product defect management system acquires image data of the sewing area to be measured. After evaluating and screening the image quality, it uses a preset defect detection algorithm to identify multiple types of defects such as thread breakage and skipped stitches, and classifies, visually annotates, and statistically analyzes the identification results. Through the defect feedback mechanism, it transmits the quality inspection information to the client or the production system, realizing an intelligent and closed-loop sewing quality inspection process from image acquisition to quality decision-making.

[0049] In an embodiment of the present invention, image data of a sewing area to be measured is acquired; the quality of the image data of the sewing area to be measured is detected to determine the image data of the target sewing area; at least one defect data is obtained by detecting and processing the image data of the target sewing area through a preset defect detection algorithm; and corresponding defect management and defect feedback are executed according to the at least one defect data. Through the automatic identification and management of various defects such as broken threads, skipped stitches, and irregular stitches in sewing products, and by detecting the image quality before detection, the interference of the image itself quality is excluded, and the detection accuracy of sewing defects in sewing products is improved.

[0050] Optionally, in the step of acquiring the image data of the sewing area to be measured, multiple first images of the sewing area to be measured can also be obtained by detecting the sewing product from multiple angles through a preset image acquisition device according to a preset image edge algorithm; multiple second images of the sewing area to be measured are determined by performing boundary calculation on the multiple first images of the sewing area to be measured; and the image data of the sewing area to be measured is acquired by processing the multiple second images of the sewing area to be measured through an image fusion algorithm.

[0051] In an embodiment of the present invention, the above-mentioned preset image acquisition device can be a hardware module pre-configured for image acquisition of sewing products, and can include multiple fixed industrial cameras, rotating pan-tilt cameras, mobile rail camera modules, etc., for realizing multi-angle and multi-view area imaging.

[0052] The above-mentioned preset image edge algorithm can be an image processing algorithm for extracting the suture boundary or contour in an image, such as the Canny algorithm, Sobel operator, Laplace operator, etc., for extracting the suture boundary features.

[0053] In this embodiment, the above-mentioned sewing product defect management system can acquire images of the same sewing area by changing the camera perspective or using multiple shooting directions, so as to avoid misdetection problems caused by single-angle images due to light, occlusion, or perspective distortion. For example, the collar area may be occluded when photographed from directly above due to its curved structure. Therefore, the above-mentioned sewing product defect management system takes supplementary photos from different directions to form complete visual data.

[0054] The above-mentioned first images of the sewing area to be measured can be the original sewing image data collected at each shooting angle, which are the primary input images for subsequent boundary extraction and fusion processing.

[0055] The above-mentioned boundary calculation can extract the effective boundary information of the sewing area in the image through methods such as edge detection algorithms and image contour analysis, and perform coordinate mapping and alignment processing of the boundary with other images.

[0056] The above-mentioned second image of the sewing area to be measured can be a unified structure image obtained by standardizing the first image through boundary calculation, with aligned boundary information, laying a foundation for image fusion.

[0057] The above-mentioned image fusion algorithm can be an algorithm process for integrating multiple images with different perspectives or states into a single image with better quality, including pixel-level, feature-level, or semantic-level fusion technologies, which can enhance image clarity, reduce redundancy and occlusion.

[0058] In this embodiment, a unified, high-quality, and complete image to be measured can be generated by applying a fusion algorithm to multiple second images to be measured.

[0059] Specifically, in a possible embodiment, the Canny method can be used to perform edge detection on the image to extract the outer contour of the sewing area. By selecting the largest closed contour among all the contours, the corresponding sewing area is considered; the circumscribed rectangle of the largest contour is obtained, and the center coordinates, width, and height dimensions are calculated; it is determined whether the circumscribed rectangle falls within the tolerance range of the image center; it is determined whether the circumscribed rectangle touches the image boundary to avoid cropping; it is determined whether the contour area is within a set reasonable range to prevent abnormal dimensions. It should be noted that if the position of the above-mentioned main contour / template exceeds the preset boundary, it is regarded as offset or incomplete.

[0060] Optionally, in the step of performing quality detection on the image data of the sewing area to be measured and determining the image data of the target sewing area, it further includes calculating the clarity of the image data of the sewing area to be measured based on a preset gray-scale processing model to determine the pre-clear image data of the sewing area to be measured; performing exposure detection on the pre-clear image data based on a preset ambient light change threshold to determine the image data of the target sewing area.

[0061] In the embodiment of the present invention, the above-mentioned preset gray-scale processing model can be an image preprocessing model for converting a color image into a gray-scale image. Usually, the weighted method (for example, 0.299×R + 0.587×G + 0.114×B) is used to map a three-channel RGB image into a single-channel gray-scale image, retaining structural and texture information, which is beneficial to the unified analysis of edges, clarity, and brightness in the subsequent process. Generally speaking, an RGB image of gray stitches on a dark blue fabric can be converted into a gray-scale image through the above-mentioned preset gray-scale processing model to enhance the contrast between the stitches and the background. More specifically, the image can be converted into a gray-scale image; the Laplace operator is used to perform edge enhancement processing on the image; the variance value of the Laplace image is calculated as an image clarity scoring index; the clearer the image, the higher the variance value, and the variance value of a blurred image is significantly lower.

[0062] In one embodiment, a batch of N images can be collected from the normal production state. These images are labeled images that have been confirmed to be "qualified in quality" and are used as a reference sample library for sharpness evaluation. Then, the sample images during the generation process are processed. Among them, the images can be converted into grayscale images, ; use the Laplace convolution kernel to perform convolution on the grayscale image to obtain , where represents a two-dimensional convolution operation, is the Laplace kernel; take all the pixel values in , denoted as the set , with a total of N pixel values. Calculate the average grayscale value ; calculate the variance of the pixel values ; for all N sharpness scores , calculate the mean value and the standard deviation ; where , ; the final image sharpness judgment threshold is , where is an adjustment coefficient (ranging from 1.0 to 2.0). If the variance value is lower than the set threshold, it is determined as a blurred image.

[0063] The above sharpness calculation can refer to evaluating the sharpness of the details of an image. Usually, the Laplace operator is used to perform convolution on the image to extract the high-frequency edge response in the image, and it is determined whether the image is clear by calculating the variance of the transformed pixel values.

[0064] The above pre-sharpened image data can refer to the grayscale images that have been screened out through the sharpness calculation step and determined to meet the sharpness threshold requirements. It is the first screening result before the formal image quality is qualified and waits for the next exposure detection.

[0065] The above preset ambient light change threshold can be the brightness judgment range preset according to the actual shooting environment conditions. For example, it is set that the average grayscale value needs to fall between [70, 180] as the normal light range, and if it exceeds, it is abnormal.

[0066] The above exposure detection can be based on the brightness distribution of the grayscale image to identify whether there are exposure problems in the image, including overexposure (too bright resulting in loss of details) and underexposure (too dark resulting in information loss). Usually, it is achieved by calculating the full-image brightness histogram or the average brightness value. Specifically, extract all the grayscale values of the pixels in the grayscale image , denoted as calculate the average grayscale value of the image ; combine the grayscale histogram distribution to judge whether the brightness is uniform and concentrated.

[0067] In this embodiment, the upper and lower exposure threshold values can be adjusted in real time according to the changes in the current production data of the production environment:

[0068] Among them: The adjustment coefficient is used to expand or shrink the tolerance interval. If exceeds the interval, the image is determined to be abnormally exposed. is the central brightness value of the image, is the brightness fluctuation amplitude within the sliding window.

[0069] More specifically, due to the significant differences in light reflection, color difference, and image clarity among different sewing materials (such as fabrics, stitches), and due to different production requirements, different requirements for the speed of operations such as thread feeding and thread discharging during sewing may all cause changes in image quality, resulting in errors in the judgment of image quality. Therefore, the adjustment coefficient is introduced to dynamically adjust the current production data of the production environment. Among them, the above adjustment coefficient can be dynamically adjusted according to the current production data. That is, this adjustment coefficient can be dynamically adjusted according to the properties of the production materials required in the current production batch, the changes in the production environment light, production efficiency, production techniques, production speed, and other production data. For example, the above adjustment coefficient can be obtained through the following formula:

[0070] Among them, is the initial exposure tolerance reference value, which can be set and adjusted according to the model and production purpose of the current production sewing machine equipment. Generally, it is 0.5 - 0.8 and is used for initial determination in the standard environment; M is the total number of material categories involved in the current production sewing task. For example, the number of fabric types + the number of thread types, is the i-th fabric type, is the j-th thread type, such as "dark blue fabric" "light gray thread". Generally, it can be used for the production line for mixed sewing; is the k-th vertical pixel block or image feature unit, is the l-th longitudinal pixel block or image feature unit, such as the gray block, texture block, etc. in the ROI area. Generally, it can be used for the production line for multi-color mixed sewing; and are the number of feature blocks extracted from each type of material, which can be the longitudinal number and the horizontal number respectively; For the similarity between image blocks (the similarity is calculated based on color / brightness / texture), generally, it can be measured by methods such as SSIM, cosine similarity, and grayscale difference; For the overall adjustment sensitivity parameter, generally, it can be used to expand or compress the adjustment range of the final result. Generally, it can also be adjusted according to the production age of the current sewing machine equipment. Generally speaking, the older the production age of the sewing machine equipment, the greater the error, that is it can be appropriately increased. It can be understood that due to different environmental light conditions, different wire materials and different fabrics have different degrees of radiation to the current environmental light. Therefore, for the above setting of the adjustment coefficient can be considered as dynamic configuration, and for the reflection ability values of different fabrics and different wire materials under different environmental light conditions at different times, they can all be stored in the database corresponding to the above sewing product defect management system.

[0071] In a possible embodiment, in order to adapt to the significant differences in light reflection, color difference, and image clarity among different sewing materials (such as fabrics, stitches), the above sewing product defect management system adjusts the above adjustment coefficient through a dynamic exposure adjustment method based on the image feature similarity between material categories to improve the accuracy and adaptability of overexposure and underexposure determination.

[0072] By dynamically adjusting the above adjustment coefficient, the entire dynamic adjustment mechanism is closed-loop, enabling the above sewing product defect management system to perceive the structural differences and similarity degrees between different materials in the image, thereby dynamically adjusting the exposure determination criteria and improving the stability and adaptability of exposure anomaly determination under high-complexity backgrounds.

[0073] Optionally, in the step of performing quality inspection on the image data of the sewing area to be measured and determining the image data of the target sewing area, it further includes determining multiple consecutive sewing areas based on the clarity data of the pre-cleared image data; and connecting the multiple consecutive sewing areas in series based on the exposure data of the multiple consecutive sewing areas to obtain the target sewing area.

[0074] In the embodiment of the present invention, the above consecutive sewing areas may refer to sewing image areas that are determined to belong to the same sewing trajectory or sewing path segment through geometric features such as the position of the sewing thread and the structural trend in multiple adjacent image frames or image blocks. It can be understood that these areas are coherent in space or time, manifested as the continuation of the sewing thread or the gradual offset of the position. For example, when sewing a trouser hem, in the continuously captured images, the starting point of the left end of the sewing thread moves frame by frame to the right, and the stitch features are consistent, then these image frames can be regarded as "consecutive sewing areas".

[0075] The above exposure data can be quantitative index data used to evaluate the brightness state of an image, usually including information such as the average brightness value, brightness variance, and brightness histogram distribution, and is used to determine whether the image is in a normal exposure, overexposure, or underexposure state.

[0076] In a possible embodiment, the above sewing product defect management system can combine, splice, and integrate multiple consecutive image regions according to their image content or structural coherence in the image processing process to form a sewing region image with a larger range and complete expression for overall analysis and defect recognition.

[0077] In this embodiment, the above sewing product defect management system continuously captures the target fabric area during the sewing operation, performs image grayscale conversion and sharpness calculation on the collected image sequence to obtain a series of image frames that meet the sharpness requirements as pre-sharpened image data, and then analyzes the spatial continuity of the starting and ending positions of the sewing lines between adjacent image frames in the image coordinate domain to identify several consecutive sewing regions with structural continuity and spatial coherence. Perform exposure analysis on the image frames corresponding to these continuous sewing regions, extract exposure data such as the mean value of the brightness histogram and local area contrast to determine whether each region is within a unified and acceptable brightness condition range. If the exposure parameters of all image frames in a certain continuous region sequence are within the preset threshold interval, it is determined that the sequence has exposure consistency, and multiple image regions that meet sharpness continuity and exposure consistency are processed in series, that is, the image content is spliced or fused in the spatial dimension or time dimension into a logically continuous sewing trajectory region as a complete target sewing region image data for subsequent defect detection and structural analysis.

[0078] Optionally, in the step of detecting and processing the image data of the target sewing region through a preset defect detection algorithm to obtain at least one defect data, it further includes preprocessing the image data of the target sewing region to obtain target image data; performing stitch region detection and segmentation processing on the target image data to obtain pre-defect detection image data; and performing defect feature recognition on the pre-defect detection image data to determine at least one corresponding defect category and defect feature.

[0079] In the embodiment of the present invention, the above preprocessing may refer to basic image enhancement operations performed on the original image data, including but not limited to image grayscale conversion (removing color interference), denoising (Gaussian filtering or median filtering), contrast enhancement (histogram equalization), and region of interest extraction (ROI cropping) to improve the image quality and the recognition accuracy of subsequent algorithms.

[0080] The above target image data can be a pre - processed image with better contrast, edge sharpness, and content purity, and can be used as the standard input image for the defect recognition module.

[0081] In a possible embodiment, the above - mentioned sewing product defect management system can identify the area where the sewing thread is located in the image data. Generally, it can extract the approximate contour or area range of the sewing thread according to methods such as edge detection, color distribution analysis, or structure prediction. For example, a continuous dark thin line slightly to the right of the center can be detected in an image as the stitch path.

[0082] The above - mentioned defect data can include but is not limited to defect features and defect categories. The above - mentioned defect features can be detailed description data of specific defects, usually including structural parameters such as coordinate positions, defect areas, angular deviations, thread width change values, break lengths, etc., which are used to quantitatively describe abnormal phenomena.

[0083] In this embodiment, the operation of separating the stitch area from the background can also be performed. Common methods include image threshold segmentation, connected - component segmentation, or pixel - level segmentation with the help of a deep neural network. For example, using U - Net to extract the fine area of the stitch, one or more image data containing only stitch information and with clear structures, that is, pre - defect detection image data, can be obtained.

[0084] The above - mentioned defect categories can include but are not limited to broken threads, skipped stitches, too - long thread ends, off - track stitches, uneven stitch tightness, etc. They are semantic markers for abnormal patterns. Specifically, for skipped - stitch detection, its corresponding defect feature is that the sewing thread is locally discontinuous with obvious gaps. The judgment method can be based on the connectivity of the stitch skeleton; calculate the distance between each line segment, and if it is greater than the set threshold, it is judged as a skipped stitch; combine Hough line detection to judge whether there is a "break - reconnect" jump behavior in the stitch segment; For broken line detection, its corresponding defect feature is that the sewing thread is completely interrupted and there is no continuous thread path. The judgment method can identify the complete break point in the starting or middle section area of the sewing thread; confirm the broken line area by combining edge information and intensity change; if there is no continuous sewing thread trajectory after the break point, it is marked as a broken line. The specific judgment of the break point can be obtained through the following steps: 1. Use the thinning algorithm (Medial Axis Transform) to extract the skeleton from the sewing thread area and transform it into a single-pixel-wide path; 2. Conduct connected component analysis on the skeleton graph. If there are more than two discontinuous path segments in the same sewing trajectory, it indicates that the sewing thread is interrupted; 3. Find the endpoints for all skeleton segments, that is, the starting point and the ending point of each path segment. If the path is not connected to other paths, the number of endpoints will be more; 4. Find the two endpoints closest to the broken area and denote them as A and B; judge whether these two endpoints should be connected (based on the expected trajectory of the original sewing path); if it holds, the area between A and B is the break point pair; take its center point or the line connecting the two endpoints as the break point position annotation.

[0085] For uneven stitch tightness detection, its corresponding defect feature is that the stitch is wavy or has a varying height and is not tightly stitched. The corresponding judgment method is to calculate the standard deviation of the width of the stitch edge; use Fourier transform or directional gradient change to analyze the jitter amplitude of the stitch; compare with the standard stitch model to identify abnormal swings.

[0086] For too long or too short thread end detection, its corresponding defect feature is the appearance of an abnormal thread tail or no thread end in the starting and ending areas of the stitch. The corresponding judgment method is to extract the thread end length in the two end areas of the image; compare with the upper and lower limits of the preset thread end length to judge whether it is abnormal; if there is no obvious thread pixel distribution, it is marked as too short thread end. The specific judgment method for too long or too short thread end can be obtained through the following steps: 1. Trace the two ends (starting point and ending point) of the sewing thread skeleton; record its coordinates and direction in the image; 2. Perform a linear extended area search within a certain range in the ending direction; use texture features (slender, curly) to enhance recognition; 3. Measure its continuous length (pixels) along the skeleton from the ending point to the thread end direction; if the tail thread is in a curved shape, first fit the broken line and then calculate the total curved path length; 4. Abnormal thread end: The length of the tail thread is not within the preset interval.

[0087] For abnormal stitch density detection, its corresponding defect feature is that the sewing thread is too sparse or too dense, affecting the sewing strength. The corresponding judgment method is to count the number of stitch pixels in the stitch area per unit length; calculate the deviation ratio of the stitch density from the standard density. If it exceeds the limit, it is judged as abnormal.

[0088] For the detection of irregular stitch paths, the corresponding defect feature is that the stitch trajectory deviates from the ideal line type and the stitch path is unstable. The judgment method is to use the Hough transform to extract the stitch direction and compare it with the standard direction; count the abnormal points of the stitch angle change rate or curvature; detect irregular stitch forms such as zigzags, unevenness, and offsets.

[0089] Optionally, in the step of performing corresponding defect management and defect feedback according to at least one defect data, it further includes defect annotation in the target sewing area according to the defect feature and defect category to obtain the annotation data of the corresponding defect in the target sewing area; determining the occurrence frequency of at least one defect data; based on the occurrence frequency, performing early warning prompts and quality feedback on the corresponding defect data.

[0090] In the embodiment of the present invention, the above-mentioned defect annotation can clearly mark the identified defect area and category in the target image in a graphical or text manner, making the defect position and type clear at a glance. Generally speaking, the break point area can be marked in the image by means of frame selection, and the word "broken thread" can be marked.

[0091] The above-mentioned annotation data can refer to the structured data set generated by the defect annotation operation, usually including information such as defect type, the number of the image where the defect is located, the coordinates of the defect area, annotation time, annotation graphic shape and style, etc., which can be used for front-end display, database storage or subsequent model training.

[0092] The above-mentioned occurrence frequency can refer to the number of repeated occurrences of a certain type of defect in the statistical period or image sequence, which is used to measure the severity or regularity of the defect in the production process, usually expressed in terms of the number of times, percentage or average occurrence interval. For example, in the production of a batch, the needle defect appears 12 times in 100 images, and the occurrence frequency is 12%.

[0093] The above-mentioned early warning prompt can refer to an alarm mechanism automatically triggered when the defect occurrence frequency exceeds the system-set threshold. Usually, the problem is feedback in the form of icon flashing, pop-up window prompt, email / system notification, etc., and sewing adjustment is performed on the current sewing machine equipment.

[0094] In a possible embodiment, the defect detection results and statistical analysis conclusions can be sorted out and sent to the quality control personnel or the superior system for guiding manual review, system parameter adjustment or production strategy optimization, usually accompanied by visual content such as text description, charts, and abnormal trend charts, so as to achieve the purpose of sewing quality feedback.

[0095] As Figure 3 shown, the embodiment of the present invention further provides a sewing product defect management device 300, and the sewing product defect management device 300 includes: A first acquisition module 301, configured to acquire image data of a sewing area to be measured; The first determination module 302 is configured to perform quality detection on the image data of the sewing area to be measured, and determine the image data of the target sewing area; The first processing module 303 is configured to perform detection processing on the image data of the target sewing area through a preset defect detection algorithm to obtain at least one piece of defect data; The first execution module 304 is configured to perform corresponding defect management and defect feedback according to at least one piece of the defect data.

[0096] Optionally, the above first acquisition module 301 includes: The first detection sub-module is configured to perform multi-angle detection on the sewing product through a preset image acquisition device according to a preset image edge algorithm to obtain a plurality of the first images of the sewing area to be measured; The first determination sub-module is configured to determine a plurality of second images of the sewing area to be measured by performing boundary calculation on the plurality of the first images of the sewing area to be measured; The first acquisition sub-module is configured to process the plurality of second images of the sewing area to be measured through an image fusion algorithm to obtain the image data of the sewing area to be measured.

[0097] Optionally, the above first determination module 302 includes: The second determination sub-module is configured to calculate the clarity of the image data of the sewing area to be measured based on a preset gray-scale processing model to determine the pre-clear image data of the sewing area to be measured; The third determination sub-module is configured to perform exposure detection on the pre-clear image data based on a preset ambient light change threshold to determine the image data of the target sewing area.

[0098] Optionally, the above device further includes: The second determination module is configured to determine a plurality of continuous sewing areas based on the clarity data of the pre-clear image data; The series connection module is configured to series-connect a plurality of continuous sewing areas based on the exposure data of the plurality of continuous sewing areas to obtain the target sewing area.

[0099] Optionally, the above first processing module 303 includes: The second acquisition sub-module is configured to preprocess the image data of the target sewing area to obtain target image data; The third acquisition sub-module is configured to perform stitch area detection and segmentation processing on the target image data to obtain pre-defect detection image data; The fourth determination sub-module is configured to perform defect feature recognition on the pre-defect detection image data to determine at least one corresponding defect category and defect feature.

[0100] Optionally, the first execution module 304 includes: A marking sub-module, configured to perform defect marking in the target sewing area according to the defect feature and defect category, so as to obtain marking data of corresponding defects in the target sewing area; A probability sub-module, configured to determine the occurrence frequency of the at least one defect data; A feedback sub-module, configured to perform early warning prompts and quality feedback on the corresponding defect data based on the occurrence frequency.

[0101] As Figure 4 shown, an embodiment of the present invention further provides an electronic device 400, including a processor, and the processor can execute any one of the above sewing product defect management methods.

[0102] Specifically, it includes a processor 401, a memory 402, and a computer program for executing the sewing product defect management method stored on the memory 402 and capable of running on the processor 401, where: The processor 401 runs the calculator program of the sewing product defect management method stored in the memory 402 and executes the following steps: Obtain image data of the sewing area to be measured; Perform quality detection on the image data of the sewing area to be measured to determine the image data of the target sewing area; Perform detection processing on the image data of the target sewing area through a preset defect detection algorithm to obtain at least one defect data; Execute corresponding defect management and defect feedback according to at least one of the defect data.

[0103] Optionally, when the processor 401 executes the obtaining of the image data of the sewing area to be measured, it includes: Perform multi-angle detection on the sewing product through a preset image acquisition device according to a preset image edge algorithm to obtain a plurality of first images of the sewing area to be measured; Determine a plurality of second images of the sewing area to be measured by performing boundary calculation on the plurality of first images of the sewing area to be measured; Process the plurality of second images of the sewing area to be measured through an image fusion algorithm to obtain the image data of the sewing area to be measured.

[0104] Optionally, when the processor 401 executes the quality detection on the image data of the sewing area to be measured to determine the image data of the target sewing area, it includes: Based on a preset gray-scale processing model, perform clarity calculation on the image data of the sewing area to be measured to determine the pre-clear image data of the sewing area to be measured; Based on a preset ambient light change threshold, perform exposure detection on the pre-clear image data to determine the image data of the target sewing area.

[0105] Optionally, the processor 401 executes the quality detection on the image data of the to-be-tested sewing area to determine the image data of the target sewing area. The method further includes: Based on the clarity data of the pre-clear image data, determine multiple consecutive sewing areas; Based on the exposure data of the multiple consecutive sewing areas, concatenate the multiple consecutive sewing areas to obtain the target sewing area.

[0106] Optionally, the processor 401 further executes that the defect data includes defect features and defect categories. By using a preset defect detection algorithm, perform detection processing on the image data of the target sewing area to obtain at least one piece of defect data, including: Perform preprocessing on the image data of the target sewing area to obtain target image data; Perform stitch area detection and segmentation processing on the target image data to obtain pre-defect detection image data; Perform defect feature recognition on the pre-defect detection image data to determine at least one corresponding defect category and defect feature.

[0107] Optionally, the processor 401 further executes that according to at least one piece of the defect data, perform corresponding defect management and defect feedback, including: According to the defect features and defect categories, perform defect annotation in the target sewing area to obtain annotation data of the corresponding defect in the target sewing area; Determine the occurrence frequency of the at least one piece of defect data; Based on the occurrence frequency, perform early warning prompts and quality feedback on the corresponding defect data.

[0108] An embodiment of the present invention further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it realizes each process of the sewing product defect management method or the application-side sewing product defect management method provided by the embodiment of the present invention, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here again.

[0109] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by a computer program instructing relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0110] The above-disclosed are only the preferred embodiments of the present invention. Of course, the scope of the rights of the present invention cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope covered by the present invention.

Claims

1. A method for defect management of sewing products, characterized in that, Including: Obtaining image data of the sewing area to be measured; Performing quality detection on the image data of the sewing area to be measured to determine the image data of the target sewing area; Performing detection processing on the image data of the target sewing area through a preset defect detection algorithm to obtain at least one piece of defect data; Performing corresponding defect management and defect feedback according to at least one piece of the defect data.

2. The sewing product defect management method according to claim 1, characterized in that The obtaining of the image data of the sewing area to be measured includes: Performing multi-angle detection on the sewing product through a preset image acquisition device according to a preset image edge algorithm to obtain a plurality of the first images of the sewing area to be measured; Determining a plurality of second images of the sewing area to be measured through boundary calculation of the plurality of the first images of the sewing area to be measured; Processing the plurality of second images of the sewing area to be measured through an image fusion algorithm to obtain the image data of the sewing area to be measured.

3. The sewing product defect management method according to claim 1, characterized in that, The performing of quality detection on the image data of the sewing area to be measured to determine the image data of the target sewing area includes: Calculating the clarity of the image data of the sewing area to be measured based on a preset gray-scale processing model to determine the pre-clear image data of the sewing area to be measured; Performing exposure detection on the pre-clear image data based on a preset ambient light change threshold to determine the image data of the target sewing area.

4. The sewing product defect management method according to claim 3, characterized in that, The performing of quality detection on the image data of the sewing area to be measured to determine the image data of the target sewing area, the method further includes: Determining a plurality of continuous sewing areas based on the clarity data of the pre-clear image data; Connecting in series the plurality of continuous sewing areas based on the exposure data of the plurality of continuous sewing areas to obtain the target sewing area.

5. The sewing product defect management method according to claim 1, characterized in that, The defect data includes defect features and defect categories. The performing of detection processing on the image data of the target sewing area through a preset defect detection algorithm to obtain at least one piece of defect data includes: Performing preprocessing on the image data of the target sewing area to obtain target image data; Performing stitch area detection and segmentation processing on the target image data to obtain pre-defect detection image data; Performing defect feature recognition on the pre-defect detection image data to determine at least one corresponding defect category and defect feature.

6. The sewing product defect management method according to claim 5, characterized in that, The performing of corresponding defect management and defect feedback according to at least one piece of the defect data includes: Performing defect marking in the target sewing area according to the defect features and defect categories to obtain the marking data of the corresponding defect in the target sewing area; Determining the occurrence frequency of the at least one piece of defect data; Performing early warning prompts and quality feedback on the corresponding defect data based on the occurrence frequency.

7. A sewing product defect management device, characterized in that, Including: A first obtaining module for obtaining the image data of the sewing area to be measured; A first determining module for performing quality detection on the image data of the sewing area to be measured to determine the image data of the target sewing area; A first processing module for performing detection processing on the image data of the target sewing area through a preset defect detection algorithm to obtain at least one piece of defect data; A first executing module for performing corresponding defect management and defect feedback according to at least one piece of the defect data.

8. A sewing product defect management system, characterized in that, The sewing product defect management system includes: a sewing product defect management device; The sewing product defect management device implements the sewing product defect management method described in claim 1.

9. An electronic device, characterized in that, It includes: A memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the sewing product defect management method described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, it implements the steps in the sewing product defect management method described in any one of claims 1 to 6.

Citation Information

Cited By

  • Defect detection method and device for overlock stitch, medium and terminal

    CN121482003A

  • Breaker quality detection system and method based on big data analysis

    CN121563876A

  • Sewing stitch anomaly detection method and device, electronic equipment and medium

    CN121837196A