Defect detection method and device for overlock stitch, medium and terminal
By combining machine vision technology and YOLO models with frequency domain analysis, efficient and accurate detection of defects in overlock stitches has been achieved, solving the problems of instability in manual detection and insufficient automated detection in existing technologies, and improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202511683415.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-06
AI Technical Summary
In existing technologies, defect detection of overlock stitches relies on manual judgment, which leads to unstable quality assessment and low efficiency. Furthermore, automated detection methods cannot comprehensively evaluate the overall quality of the stitches, resulting in high false detection and false negative rates.
By combining machine vision technology with the YOLO model and frequency domain analysis, multi-category defect detection is performed by acquiring images of overlock stitches, including broken threads, wavy lines, wrinkles, and skipped stitches. The Laplacian operator and frequency domain image processing are used to determine the type and degree of defects.
It achieves efficient and accurate detection of overlock stitch defects, reduces the rate of missed detections and false judgments, improves the intelligent manufacturing level and brand quality image of enterprises, is applicable to fabrics of various materials and textures, and has real-time performance and robustness.
Smart Images

Figure CN121482003A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of textile technology and relates to a method, device, medium and terminal for detecting defects in overlock stitches. Background Technology
[0002] Overlocking is a crucial process in garment production, specifically designed to finish the edges of fabrics. Using a specialized overlocking machine (commonly known as a "seam overlock machine"), it simultaneously completes the cutting, sewing, and overlocking of the fabric edge. Multiple threads interweave to form a tight overlock stitch, effectively preventing the yarn from fraying or coming undone at the fabric edge, thus giving the product a strong and durable quality.
[0003] Overlock stitching is a crucial process in the production of textiles such as clothing and home textiles, and the quality of the overlock stitches directly affects the durability, aesthetics, and lifespan of the products. Therefore, how to automatically, efficiently, and accurately inspect the quality of overlock stitches is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] This application provides a method, apparatus, storage medium, and terminal for detecting defects in overlock stitches, which addresses the technical problem of how to automatically, efficiently, and accurately detect the quality of overlock stitches.
[0005] In a first aspect, this application provides a method for detecting defects in overlock stitches, the method comprising:
[0006] Acquire the image to be detected;
[0007] Determine whether the image to be detected meets the detection conditions. If it does, acquire the overlock stitch image. If it does not, reacquire the image to be detected.
[0008] Perform a first-category defect detection on the overlock stitch image to obtain the first-category defect detection result;
[0009] Based on the stitch image, several detection sub-images are obtained to perform second-category defect detection based on the several detection sub-images, so as to obtain the second-category defect detection result.
[0010] In some implementations of the first aspect, determining whether the image to be detected meets the detection conditions includes:
[0011] The stitch area is obtained based on the image to be detected;
[0012] Determine whether the overlock stitch area is within a designated detection area. If it is, obtain the clarity of the overlock stitch area; otherwise, adjust the position of the overlock stitch area until it is within the designated detection area.
[0013] If the clarity of the overlock stitch area is greater than a preset threshold, then the image of the overlock stitch area is used as the overlock stitch image; if the clarity is not greater than the preset threshold, then the overlock stitch area is adjusted until the clarity is greater than the preset threshold.
[0014] In some implementations of the first aspect, performing a first category of defect detection on the overlock stitch image includes:
[0015] The system detects whether the overlock stitch image has broken thread defects and severe curling defects, and obtains the corresponding results for broken thread defects and severe curling defects.
[0016] The overlock stitch image is converted into a frequency domain image, and the proportion range of high-frequency energy is obtained based on the frequency domain image to obtain wrinkle defect detection results; and
[0017] The defect detection model is used to obtain the target box of the wave defect in the overlock stitch image, and the wave direction is determined based on the wave defect target box, so as to obtain the wave defect detection result based on the wave direction.
[0018] In some implementations of the first aspect, obtaining the wave defect detection result based on the wave-initiating direction includes:
[0019] When the wave direction is the downward wave direction, the wave defect detection result is obtained based on the comparison result between the wave defect target box and the overlock stitch length;
[0020] When the wave direction is the upward wave direction, the edge slope of the wave defect target box is calculated to obtain the wave defect detection result.
[0021] In some implementations of the first aspect, obtaining several detection sub-images based on the overlock stitch image includes:
[0022] The overlock stitch image is divided into several sub-images, and there is at least an overlapping area between adjacent sub-images;
[0023] The sub-image is converted from RBG channels to LAB channels for enhancement processing, and then merged and converted back to RBG channels to obtain the detection sub-image; wherein, the enhancement processing includes:
[0024] Brightness enhancement processing is applied to the L channel;
[0025] Histogram homogenization enhancement is performed on channels A and B.
[0026] In some implementations of the first aspect, the second category of defect detection based on several of the aforementioned detection sub-graphs includes:
[0027] The detection sub-image is checked for skipped stitch defects and arching defects, and the corresponding skipped stitch defect detection results and arching defect results are obtained.
[0028] The defect detection model is used to obtain the virtual edge defect target box, the two-sided defect target box and the overlock stitch target box of the detection sub-image. The virtual edge defect detection result is obtained based on the boundary distance between the virtual edge defect target box and the overlock stitch target box, and the two-sided defect detection result is obtained based on the boundary distance between the two-sided defect target box and the overlock stitch target box.
[0029] In some implementations of the first aspect, the second category of defect detection based on several of the aforementioned detection sub-graphs further includes:
[0030] The target bounding boxes for point defects and curled edges defects in the detection sub-image are obtained based on the defect detection model.
[0031] Calculate the number of speckled pixels in the target box of the speckled defect, and obtain the speckled defect detection result based on the number of speckled pixels and a first preset level threshold;
[0032] The number of curled edge pixels in the target box of the curled edge defect is calculated, and the curled edge defect detection result is obtained based on the number of curled edge pixels and a second preset level threshold.
[0033] Secondly, this application also provides a defect detection device for overlock stitches, the device comprising:
[0034] The acquisition module is configured to acquire the image to be detected;
[0035] The detection condition module is configured to determine whether the image to be detected meets the detection conditions. If it does, the image of the overlock stitch is acquired; if it does not, the image to be detected is reacquired.
[0036] The first detection module is configured to perform a first category of defect detection on the overlock stitch image to obtain a first category of defect detection result;
[0037] The second detection module is configured to acquire several detection sub-images based on the stitch image, and to perform second-category defect detection based on the several detection sub-images to obtain second-category defect detection results.
[0038] Thirdly, this application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the defect detection method for overlock stitches as described above.
[0039] Fourthly, this application also provides a terminal, including a processor and a memory, wherein the memory and the processor are communicatively connected; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal performs the defect detection method for overlock stitches as described above.
[0040] As described above, the method, apparatus, medium, and terminal for detecting defects in overlock stitches described in this application have the following beneficial effects:
[0041] This application provides an end-to-end defect detection method that can simultaneously, accurately, and efficiently detect nine key and common overlock stitch defects: skipped stitches, broken threads, arching, waviness, wrinkles, loose edges, double-sided hems, bleed spots, and curled edges. This avoids missed detections and misjudgments due to visual fatigue or subjective judgment differences, effectively reducing rework rates, scrap rates, and customer complaint risks, thereby improving the company's intelligent manufacturing level and brand quality image. Furthermore, this application is applicable to overlock stitches of various materials, colors, and fabric textures. It can also be quickly adapted to new defect types through fine-tuning with a small number of samples, facilitating migration and deployment across different production lines. It balances real-time performance, robustness, and deployability in industrial applications, demonstrating outstanding practical value and broad market prospects. Attached Figure Description
[0042] Figure 1 The diagram shows a flowchart of the defect detection method for overlock stitches described in the embodiments of this application.
[0043] Figure 2 The diagram shown is an application illustration of acquiring an image to be detected as described in an embodiment of this application.
[0044] Figure 3 The diagram shows a flowchart illustrating the process of determining whether the image to be detected meets the detection conditions, as described in an embodiment of this application.
[0045] Figure 4 The diagram shows a flowchart of the process for detecting first-category defects in overlock stitch images as described in an embodiment of this application.
[0046] Figure 5 The diagram shown illustrates the downward wave direction as described in the embodiments of this application.
[0047] Figure 6 The diagram shown is a schematic representation of the upward wave direction as described in the embodiments of this application.
[0048] Figure 7 The diagram shown is a sub-diagram of an embodiment of this application.
[0049] Figure 8 The diagram shown is a structural schematic of the overlock stitch defect detection device described in an embodiment of this application.
[0050] Figure 9 The diagram shown is a structural schematic of the terminal described in an embodiment of this application. Detailed Implementation
[0051] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0052] It should be noted that in the following description, reference is made to the accompanying drawings, which illustrate several embodiments of this application. It should be understood that other embodiments may also be used, and changes in mechanical composition, structure, electrical system, and operation may be made without departing from the spirit and scope of this application. The following detailed description should not be considered limiting, and the scope of the embodiments of this application is defined only by the claims of the published patent. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. Spatial terms such as “upper,” “lower,” “left,” “right,” “below,” “below,” “lower part,” “above,” “upper part,” etc., may be used herein to illustrate the relationship between one element or feature shown in the figures and another element or feature.
[0053] Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of the stated feature, operation, element, component, item, kind, and / or group, but do not preclude the presence, occurrence, or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are to be interpreted inclusively, or mean any one or any combination thereof.
[0054] Currently, the most commonly used method for detecting defects in overlock stitches is as follows: after the overlock process is completed, quality inspectors judge the stitches by visual observation and experience under a specific light source. However, this method heavily relies on the experience, focus, and mental state of the quality inspectors. Different personnel have different standards for judging defects, leading to unstable quality assessments. Furthermore, it is inefficient and costly. This manual inspection method is prone to causing eye fatigue, especially for minor defects or defects with low contrast to the background (such as slight skipped stitches or blurred edges), posing a significant risk of missed detection. In addition, manual inspection cannot accurately quantify and record defects (such as the amplitude of wave formation or the size of the impact point), making it difficult to generate systematic quality data for production process traceability and optimization.
[0055] Therefore, existing technologies include some automated detection solutions based on sensors (such as photoelectric sensors and broken needle detectors). These methods typically determine whether extreme faults such as "broken threads" have occurred by monitoring the rotation of the sewing machine shaft, thread tension, or simple photoelectric interruptions. However, these methods can detect a very limited range of defects and cannot assess comprehensive quality indicators such as the overall aesthetics and uniformity of the stitches. For example, even if the overlock stitch is not broken, but has severe waviness or skipped stitches, the overlock stitch is still unacceptable, but these methods cannot identify such situations.
[0056] In recent years, machine vision technology has begun to be explored for application in the field of textile inspection. However, most existing research or application solutions focus on defects in the fabric itself (such as holes and stains) or very simple stitching problems (such as obvious broken threads and missed stitches), and are insufficient in recognizing complex stitch defects, resulting in a high false detection rate. For example, existing methods may rely only on single image features (such as edges and gray values), making it difficult to distinguish between skipped stitches and normal stitch intervals, arching and normal undulations caused by fabric characteristics, and blurred edges and uneven lighting, leading to poor robustness and high false and false alarm rates.
[0057] To at least address the aforementioned technical problems, embodiments of this application provide a method, apparatus, medium, and terminal for detecting defects in overlock stitches, which can automatically and synchronously detect whether overlock stitches have various common types of defects, and efficiently, accurately, and comprehensively detect the quality of overlock stitches.
[0058] Figure 1 The diagram shows a flowchart illustrating the defect detection method for overlock stitches described in an embodiment of this application. Figure 1 As shown, the defect detection method for overlock stitches provided in this application embodiment includes steps S1 to S4.
[0059] S1. Obtain the image to be detected.
[0060] In some embodiments, such as Figure 2As shown, a camera fixedly mounted on the side wall of the sewing machine is used to capture images of the area to be inspected.
[0061] S2. Determine whether the image to be detected meets the detection conditions. If it does, acquire the sewing stitch image. If it does not, reacquire the image to be detected.
[0062] Figure 3 This is a schematic diagram illustrating the process of determining whether the image to be detected meets the detection conditions, as described in an embodiment of this application. Figure 3 As shown, determining whether the image to be detected meets the detection conditions includes steps S21 to S23.
[0063] S21. Obtain the stitch area based on the image to be detected.
[0064] In some embodiments, a trained YOLO model is used to detect the image to be detected in order to obtain the location of the stitching area. The YOLO model is an advanced single-stage object detection model that can predict the class and location of multiple objects in an image in real time through a single forward propagation, and is known for its excellent balance between speed and accuracy.
[0065] S22. Determine whether the overlock stitch area is within the specified detection area. If it is, obtain the clarity of the overlock stitch area; otherwise, adjust the position of the overlock stitch area until it is within the specified detection area.
[0066] S23. If the clarity of the overlock stitch area is greater than a preset threshold, then the image of the overlock stitch area is used as the overlock stitch image. If the clarity is not greater than the preset threshold, then the overlock stitch area is adjusted until the clarity is greater than the preset threshold.
[0067] In some embodiments, it is determined whether the detected overlock stitch area is within a specified detection area, such as... Figure 2 As shown. If so, the clarity of the overlock stitch area is calculated using the Laplacian operator; otherwise, voice prompts or other methods can be provided to assist the user in adjusting the position of the overlock stitch area to the specified detection area.
[0068] Furthermore, when the clarity of the overlock stitch area calculated using the Laplacian operator is greater than a preset threshold, the current overlock stitch area can be considered a clear image, and an image of the overlock stitch can be captured. If the calculated clarity is not greater than the preset threshold, the method of differencing adjacent frames is used to determine if there is blurring due to jitter in the placed stitches, or voice prompts are used to assist the user in checking whether the placed fabric is stable, whether there are foreign objects in the camera, etc. Adjustments are made to the overlock stitch area accordingly for different reasons until the clarity exceeds the preset threshold.
[0069] The Laplacian operator is a second-order differential operator. It is used to convolve the image of the overlock stitch region to calculate the variance of the response value, i.e., the Laplacian variance. The higher the Laplacian variance, the greater the sharpness of the overlock stitch region.
[0070] In some embodiments, the preset threshold can be set to 100.
[0071] Furthermore, the overlock stitch image includes a front image and a back image of the overlock stitch, and the above process can be repeated to capture both the front and back of the overlock stitch.
[0072] S3. Perform a first-category defect detection on the overlock stitch image to obtain the first-category defect detection result.
[0073] Figure 4 This is a schematic diagram illustrating the process of detecting a first category of defect in an overlock stitch image as described in an embodiment of this application. Figure 4 As shown, the first category of defect detection for the overlock stitch image includes steps S31 to S33.
[0074] S31. Detect whether the stitch image has broken thread defects and severe curling defects, and obtain the corresponding results of broken thread defect detection and severe curling defect detection.
[0075] In some embodiments, the degree of defect of the broken wire is only 0 or 1, that is, there are two cases: existence and non-existence.
[0076] In some embodiments, due to severe curling, this application can directly detect the complete overlock stitch image to determine whether severe curling defects exist. For example, the YOLO model can be used to obtain the curling defect box. When the number of pixels in the curling defect box exceeds a fixed value, the overlock stitch image can be considered to have severe curling defects.
[0077] S32. Convert the stitch image into a frequency domain image, and obtain the proportion range of high-frequency energy based on the frequency domain image to obtain the wrinkle defect detection result.
[0078] In some embodiments, the overlock stitch image is converted from a spatial domain image to a frequency domain image, and the ratio of low-frequency energy to medium- and high-frequency energy is calculated to obtain the proportion range of high-frequency energy. The higher the high-frequency energy, i.e., the larger the proportion range, the higher the level of wrinkle defect detection result. That is, the defect detection result of this application includes not only the presence of wrinkles but also the judgment of the wrinkle level (i.e., its severity). The correspondence between the proportion range of high-frequency energy and the wrinkle level is shown in Table 1.
[0079] Table 1
[0080] wrinkle level High-frequency energy ratio range smooth 0.1-0.2 slight 0.2-0.3 medium 0.3-0.4 serious 0.4-0.6 Extremely serious 0.6-0.8
[0081] S33. Obtain the target box of the wave defect in the overlock stitch image based on the defect detection model, and determine the wave direction based on the wave defect target box, so as to obtain the wave defect detection result based on the wave direction.
[0082] In some embodiments, the defect detection model can be the YOLO model. The YOLO model is used to detect whether there are wave defects in the overlock stitch image, and outputs a target bounding box for the wave defect. When the wave direction is determined to be downward based on the target bounding box, the wave defect detection result is obtained by comparing the target bounding box with the overlock stitch length; when the wave direction is determined to be upward based on the target bounding box, the edge slope of the target bounding box is calculated to obtain the wave defect detection result.
[0083] in, Figure 5 This diagram illustrates the direction of the downward wave as provided in an embodiment of this application. Figure 2 For example, the downward wavy direction refers to arranging the overlock stitches in a straight line, such as... Figure 5 As shown, the overlock stitch has a raised section perpendicular to the lens direction.
[0084] in, Figure 6 This diagram illustrates the upward wave direction provided in an embodiment of this application. Figure 2 For example, the upward wave direction refers to placing it close to the seam board, such as... Figure 6 As shown, the overlock stitch has a raised area in the horizontal direction.
[0085] Furthermore, when the wave direction is downward, if the comparison result between the target frame of the wave defect and the length of the overlock stitch is greater than a certain fixed value, then a wave defect can be considered to exist. In some other embodiments, multiple thresholds can be set, and the comparison result can be compared with multiple thresholds to determine whether a wave defect exists and the degree of the wave defect.
[0086] Furthermore, when the wave direction is upward, the edge slope of the target box for the wave defect is calculated. If the calculated edge slope is greater than a certain fixed value, the wave defect can be considered to exist. In some embodiments, multiple thresholds can be set, and the edge slope can be compared with multiple thresholds to determine whether a wave defect exists and the degree of the wave defect.
[0087] In some embodiments, the two wave types mentioned above are used as inputs to the YOLO model to train the YOLO model and thus obtain a defect detection model.
[0088] S4. Based on the stitch image, obtain several detection sub-images, and perform second-category defect detection based on the several detection sub-images to obtain second-category defect detection results.
[0089] In some embodiments, obtaining several detection sub-images based on the overlock stitch image includes: dividing the overlock stitch image into several sub-images, with at least an overlapping area between adjacent sub-images; converting the sub-images from RBG channels to LAB channels for enhancement processing, and merging them back into RBG channels to obtain the detection sub-images; wherein the enhancement processing includes: performing brightness enhancement processing on the L channel; and performing histogram homogenization enhancement processing on the A and B channels.
[0090] In some embodiments, the overlock stitch image is divided into several 224-pixel × 224-pixel sub-images, with at least 20% overlap between adjacent sub-images. Figure 7 The diagram shown is a sub-diagram of an embodiment of this application.
[0091] Furthermore, the sub-image is converted from the RBG channel to the LAB channel, and the L channel is subjected to brightness enhancement processing followed by Gaussian noise reduction and sharpening processing. The A and B channels are subjected to histogram homogenization enhancement processing followed by bilateral filtering smoothing. Finally, the L, A, and B channels are merged and converted back to the RBG space to obtain the detection sub-image.
[0092] The RGB channel, based on the additive mixing principle of the three primary colors of light, records the intensity of red, green, and blue colors respectively. The superposition of these three colors produces various colors, making it a color model designed for electronic displays. The LAB channel, on the other hand, is based on human visual perception, separating color information into lightness (L channel), green-red complementary color (A channel), and blue-yellow complementary color (B channel). Its perceptual uniformity makes color differences more in line with human intuition.
[0093] Histogram homogenization enhancement refers to an image enhancement technique that enhances the overall contrast of an image by redistributing the grayscale values of image pixels and stretching the histogram of the original image into a uniform distribution.
[0094] After obtaining several inspection sub-images, a second category of defect detection is performed on the inspection sub-images to detect less obvious defects in the overlock stitches, thereby ensuring the quality of the overlock stitches.
[0095] Specifically, the second category of defect detection based on several detection sub-images includes: detecting whether the detection sub-images contain skipped stitch defects and arching defects, and obtaining the corresponding skipped stitch defect detection results and arching defect results. In some embodiments, the degree of skipped stitch and arching defects is only 0 or 1, that is, there are two cases: presence or absence.
[0096] Specifically, the second category of defect detection based on several detection sub-images includes: obtaining the virtual edge defect target box, the two-sided defect target box, and the overlock stitch target box of the detection sub-image based on the defect detection model; obtaining the virtual edge defect detection result based on the boundary distance between the virtual edge defect target box and the overlock stitch target box; and obtaining the two-sided defect detection result based on the boundary distance between the two-sided defect target box and the overlock stitch target box.
[0097] In some embodiments, a defect detection model is used to determine whether there are virtual edge defects in the detection sub-image, and the corresponding virtual edge defect target box is output. Simultaneously, the defect detection model detects the overlock stitches in the overlock stitch image and outputs the overlock stitch target box. Then, the distance h1 between the upper and lower boundaries of the virtual edge defect target box and the distance h2 between the upper and lower boundaries of the overlock stitch target box are calculated, and the degree of virtual edge defects is determined by calculating the proportion of virtual edge defects in h1 to h2. For example, when the proportion of virtual edge defects is ≥50%, the virtual edge defects are severe; when 50% > ≥20%, the virtual edge defects are moderate; and when 20% > ≥5%, the virtual edge defects are minor. That is, this application can not only determine whether virtual edge defects exist, but also determine their degree.
[0098] In some embodiments, a defect detection model is used to determine whether a two-sided defect exists in the detection sub-image, and the corresponding two-sided defect target box is output. Simultaneously, the defect detection model detects the overlock stitches in the overlock stitch image and outputs the overlock stitch target box. Then, the distance h3 between the upper and lower boundaries of the two-sided defect target box and the distance h2 between the upper and lower boundaries of the overlock stitch target box are calculated, and the degree of the two-sided defect is determined by calculating the proportion of the two-sided defect in h3 relative to h2. For example, when the proportion of the two-sided defect is ≥50%, the two-sided defect is severe; when 50% > ≥20%, the two-sided defect is moderate; and when 20% > ≥5%, the two-sided defect is slight. That is, this application can not only determine whether a two-sided defect exists, but also determine its degree.
[0099] Specifically, the second category of defect detection based on several detection sub-images includes: obtaining the target bounding boxes for point defects and curled edge defects of the detection sub-images based on the defect detection model; calculating the number of point pixels in the point defect target bounding box to obtain the point defect detection result based on the number of point pixels and a first preset level threshold; and calculating the number of curled edge pixels in the curled edge defect target bounding box to obtain the curled edge defect detection result based on the number of curled edge pixels and a second preset level threshold.
[0100] In some embodiments, a defect detection model is used to determine whether there are speckled defects in the detection sub-image, and a corresponding speckled defect target box is output. Then, the number of speckled pixels in the speckled defect target box is counted, and the number is compared with a first preset level threshold to determine the degree of speckled defect. For example, when the count of speckled pixels is ≥1200, the speckled defect is severe; when 1200 > ≥500 pixels, the speckled defect is moderate; and when 500 > ≥80 pixels, the speckled defect is minor. That is, this application can not only determine whether speckled defects exist, but also determine the degree of speckled defects.
[0101] In some embodiments, a defect detection model is used to determine whether a curled edge defect exists in the detection sub-image, and a corresponding curled edge defect target box is output. Then, the number of curled edge pixels in the target box is counted, and this number is compared with a second preset level threshold to determine the degree of the curled edge defect. For example, when the count of curled edge pixels is ≥1200, the curled edge defect is severe; when 1200 > ≥500 pixels, the curled edge defect is moderate; and when 500 > ≥80 pixels, the curled edge defect is slight. That is, this application can not only determine whether a curled edge defect exists, but also determine its degree.
[0102] It should be noted that this application does not impose any restrictions on the threshold for the classification.
[0103] It should be noted that curling defects and severe curling defects are actually a type of overlock stitching defect. Severe curling defects are easily identifiable and can be detected directly from the entire image. However, curling defects are more subtle and therefore require individual inspection of each sub-image. This application utilizes a two-level curling detection system to accurately and efficiently identify curling defects, reducing inspection resources while maintaining precise detection.
[0104] Therefore, the overlock stitch defect detection method provided in this application can simultaneously, accurately, and efficiently detect nine key and common overlock stitch defects: skipped stitches, broken threads, arching, waviness, wrinkles, loose edges, flat edges, raised spots, and curled edges. This avoids missed detections and misjudgments due to visual fatigue or subjective judgment differences, effectively reducing rework rates, scrap rates, and customer complaint risks, and improving the company's intelligent manufacturing level and brand quality image. Furthermore, this application is applicable to overlock stitches of various materials, colors, and fabric textures. It can also be quickly adapted to new defect types through fine-tuning with a small number of samples, facilitating migration and deployment across different production lines. It balances real-time performance, robustness, and deployability in industrial applications, demonstrating outstanding practical value and broad market prospects.
[0105] The scope of protection of the method for detecting defects in overlock stitches in this application is not limited to the order of steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the scope of protection of this application.
[0106] This application also provides a defect detection device for overlock stitches. The defect detection device for overlock stitches can implement the defect detection method for overlock stitches described in this application. However, the implementation device for the defect detection device for overlock stitches described in this application includes, but is not limited to, the structure of the defect detection device for overlock stitches listed in this embodiment. All structural modifications and substitutions of the prior art made based on the principles of this application are included within the protection scope of this application.
[0107] Figure 8 A schematic diagram of the structure of the overlock stitch defect detection device described in the embodiment of this application is shown, as follows: Figure 8 As shown, the defect detection device for overlock stitches includes an acquisition module 41, a detection condition module 42, a first detection module 43, and a second detection module 44. Among them,
[0108] The acquisition module 41 is configured to acquire the image to be detected;
[0109] The detection condition module 42 is configured to determine whether the image to be detected meets the detection conditions. If it does, the sewing stitch image is acquired; if it does not, the image to be detected is acquired again.
[0110] The first detection module 43 is configured to perform a first category of defect detection on the overlock stitch image to obtain a first category of defect detection result;
[0111] The second detection module 44 is configured to acquire several detection sub-images based on the stitch image, and to perform second-category defect detection based on the several detection sub-images to obtain second-category defect detection results.
[0112] It should be noted that the structure and principle of the acquisition module 41, the detection condition module 42, the first detection module 43 and the second detection module 44, as well as the beneficial effects achieved by the device, are the same as those in the above embodiments, and will not be described in detail here.
[0113] This application also provides a storage medium storing a computer program, characterized in that, when executed by a processor, the program implements all the steps of the defect detection method for overlock stitches described in the embodiments.
[0114] The specific steps of the defect detection method for overlock stitches and the beneficial effects obtained by applying the readable storage medium provided in the embodiments of this application are the same as those in the above embodiments, and will not be repeated here.
[0115] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. This available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state drive (SSD)).
[0116] This application also provides a terminal. Figure 9 A schematic diagram of the structure of the terminal described in an embodiment of this application is shown, as follows: Figure 9 As shown, the terminal 700 in this embodiment includes at least one processor 701, a memory 702, at least one network interface 704, and a user interface 706. Furthermore, the various components in the terminal 700 are coupled together via a bus system 705. It is understood that the bus system 705 is used to implement communication between these components. In addition to a data bus, the bus system 705 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 9 In this context, all buses are labeled as bus systems. The user interface 706 may include a monitor, keyboard, mouse, trackball, clicker, buttons, touchpad, or touchscreen, etc.
[0117] It is understood that memory 702 can be volatile memory or non-volatile memory, or both. This application does not specifically limit it. In the embodiments of this application, memory 702 is used to store various types of data to support the operation of terminal 700. Examples of this data include: any executable program for operation on terminal 700, such as operating system 7021 and application 7022; operating system 7021 includes various system programs, such as framework layer, core library layer, driver layer, etc., used to implement various basic services and handle hardware-based tasks. Application 7022 can include various applications, such as media player, browser, etc. The defect detection method for overlock stitches provided in the embodiments of this application can be included in application 7022.
[0118] The defect detection method for overlock stitches disclosed in the above embodiments of this application can be applied to, or implemented by, processor 701. Processor 701 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed through integrated logic circuits in the hardware of processor 701 or through software instructions. Processor 701 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 701 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor 701 may be a microprocessor or any conventional processor, etc.
[0119] In an exemplary embodiment, terminal 700 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to execute the aforementioned method.
[0120] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented using computer program-related hardware. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0121] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0122] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A method for detecting defects in overlock stitches, characterized in that, The method includes: Acquire the image to be detected; Determine whether the image to be detected meets the detection conditions. If it does, acquire the overlock stitch image. If it does not, reacquire the image to be detected. Perform a first-category defect detection on the overlock stitch image to obtain the first-category defect detection result; Based on the stitch image, several detection sub-images are obtained to perform second-category defect detection based on the several detection sub-images, so as to obtain the second-category defect detection result.
2. The method for detecting defects in overlock stitches according to claim 1, characterized in that, Determining whether the image to be detected meets the detection conditions includes: The stitch area is obtained based on the image to be detected; Determine whether the overlock stitch area is within a designated detection area. If it is, obtain the clarity of the overlock stitch area; otherwise, adjust the position of the overlock stitch area until it is within the designated detection area. If the clarity of the overlock stitch area is greater than a preset threshold, then the image of the overlock stitch area is used as the overlock stitch image; if the clarity is not greater than the preset threshold, then the overlock stitch area is adjusted until the clarity is greater than the preset threshold.
3. The method for detecting defects in overlock stitches according to claim 1, characterized in that, The first category of defect detection for the overlock stitch image includes: The system detects whether the overlock stitch image has broken thread defects and severe curling defects, and obtains the corresponding results for broken thread defects and severe curling defects. The overlock stitch image is converted into a frequency domain image, and the proportion range of high-frequency energy is obtained based on the frequency domain image to obtain wrinkle defect detection results; and The defect detection model is used to obtain the target box of the wave defect in the overlock stitch image, and the wave direction is determined based on the wave defect target box, so as to obtain the wave defect detection result based on the wave direction.
4. The method for detecting defects in overlock stitches according to claim 3, characterized in that, The wave defect detection results obtained based on the wave direction include: When the wave direction is the downward wave direction, the wave defect detection result is obtained based on the comparison result between the wave defect target box and the overlock stitch length; When the wave direction is the upward wave direction, the edge slope of the wave defect target box is calculated to obtain the wave defect detection result.
5. The method for detecting defects in overlock stitches according to claim 1, characterized in that, Several detection sub-images are obtained based on the suture stitch image, including: The overlock stitch image is divided into several sub-images, and there is at least an overlapping area between adjacent sub-images; The sub-image is converted from RBG channels to LAB channels for enhancement processing, and then merged and converted back to RBG channels to obtain the detection sub-image; wherein, the enhancement processing includes: Brightness enhancement processing is applied to the L channel; Histogram homogenization enhancement is performed on channels A and B.
6. The method for detecting defects in overlock stitches according to claim 1, characterized in that, The second category of defect detection based on several of the aforementioned detection sub-images includes: The detection sub-image is checked for skipped stitch defects and arching defects, and the corresponding skipped stitch defect detection results and arching defect results are obtained. The defect detection model is used to obtain the virtual edge defect target box, the two-sided defect target box and the overlock stitch target box of the detection sub-image. The virtual edge defect detection result is obtained based on the boundary distance between the virtual edge defect target box and the overlock stitch target box, and the two-sided defect detection result is obtained based on the boundary distance between the two-sided defect target box and the overlock stitch target box.
7. The method for detecting defects in overlock stitches according to claim 1, characterized in that, The second category of defect detection based on several of the aforementioned detection sub-images also includes: The target bounding boxes for point defects and curled edges defects in the detection sub-image are obtained based on the defect detection model. Calculate the number of speckled pixels in the target box of the speckled defect, and obtain the speckled defect detection result based on the number of speckled pixels and a first preset level threshold; The number of curled edge pixels in the target box of the curled edge defect is calculated, and the curled edge defect detection result is obtained based on the number of curled edge pixels and a second preset level threshold.
8. A device for detecting defects in overlock stitches, characterized in that, The device includes: The acquisition module is configured to acquire the image to be detected; The detection condition module is configured to determine whether the image to be detected meets the detection conditions. If it does, the image of the overlock stitch is acquired; if it does not, the image to be detected is reacquired. The first detection module is configured to perform a first category of defect detection on the overlock stitch image to obtain a first category of defect detection result; The second detection module is configured to acquire several detection sub-images based on the stitch image, and to perform second-category defect detection based on the several detection sub-images to obtain second-category defect detection results.
9. A storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the defect detection method for overlock stitches as described in any one of claims 1 to 7.
10. A terminal, characterized in that, The device includes a processor and a memory, the memory being communicatively connected to the processor; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to cause the terminal to perform the defect detection method for overlock stitches as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Sewing stitch defect detection method based on machine vision
CN109239076A
Textile fabric-based thread end automatic identification method
CN115471504A
Stitching defect detection method, device and equipment and storage medium
CN116664533A
Sewing stitch defect detection method and system based on machine vision
CN118411369A
Sewing product defect management method and electronic equipment thereof
CN120411005A