Textile surface defect detection method
By dividing multiple defect clusters according to the size of textile surface defects and training multiple object detection models, combining image preprocessing and parallel inference technology, the shortcomings of existing detection methods in diversified defect types and real-time performance of high-speed production lines are solved, and efficient and accurate textile surface defect detection is achieved.
Patent Information
- Application Number
- CN202510292195.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-27
AI Technical Summary
Existing textile surface defect detection methods are difficult to cover multiple types of defects at the same time, especially when the defect sizes vary greatly, the generalization ability of the model is limited, resulting in frequent missed or missed detection. In addition, the existing methods have slow in reasoning speed and cannot meet the real-time requirements of high-speed production lines.
By dividing multiple defect clusters according to the size of textile surface defects, multiple object detection models are trained accordingly, and the textile surface image is preprocessed to obtain multiple image areas containing defects. Then, an object detection model is assigned to each image area according to the image characteristics, and the image area is processed in parallel by multiple models to identify the textile surface defects.
It significantly improves the detection speed and accuracy, can respond to the needs of high-speed production lines in real time, reduces missed inspections and missed inspections, and improves overall production efficiency and product quality.
Smart Images

Figure CN120219323A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of textile production inspection, and particularly relates to a method for detecting surface defects of textiles. Background Art
[0002] The detection of surface defects of textiles is a crucial link in the textile production process, directly affecting the quality and market competitiveness of the final products. Traditional detection of surface defects of textiles mainly relies on visual inspection by manual quality inspectors. This method is not only inefficient, but also due to the existence of human factors, it is difficult to guarantee the consistency and accuracy of the detection results. With the progress of technology, especially the development of artificial intelligence and machine vision technology, automated detection methods have gradually been introduced into the textile industry in order to improve the detection efficiency and accuracy.
[0003] Although the existing automated detection methods have improved the deficiencies of traditional manual detection to a certain extent, there are still the following main technical problems:
[0004] Traditional object detection models are difficult to cover all types of defects at the same time. Especially when the defect sizes vary greatly, the generalization ability of the model is particularly limited. For example, when dealing with small-sized subtle defects (such as small holes or stains) and large-area complex patterns (such as large-area scratches or irregular stains), a single model often cannot balance the requirements of both, resulting in frequent missed detections or false detections. This limitation affects the accuracy of the detection results.
[0005] In addition, with the progress of modern textile production technology, the speed of the production line has been continuously increasing, and the real-time requirement for the detection method has also increased accordingly. However, due to the slow inference speed of the existing object detection model methods, they cannot meet the requirements of high-speed production lines. Especially when facing high-resolution images or a large amount of data, the processing speed of a single model becomes a bottleneck, resulting in a decline in the overall production efficiency. Moreover, the delayed feedback of detection results may lead to more defective products in the production process, increasing the production cost and resource waste of the enterprise. Summary of the Invention
[0006] The present invention provides a method for detecting surface defects of textiles to solve the problems of missed detections or false detections of surface defects of textiles and the inability to meet the real-time requirements of high-speed production lines caused by many deficiencies still existing in the existing methods for detecting surface defects of textiles in terms of coping with diverse defect types, processing speed, and accuracy.
[0007] The technical solution adopted by the present invention is as follows:
[0008] A method for detecting surface defects of textiles, which divides multiple defect clusters according to the sizes of the surface defects of the textiles and correspondingly trains multiple object detection models; the method further includes,
[0009] Preprocess the textile surface image to obtain multiple image regions containing textile surface defects;
[0010] According to the image features of the textile surface image, assign a target detection model to the image regions corresponding to the textile surface image;
[0011] Identify textile surface defects by parallel processing of the image regions through multiple target detection models.
[0012] The method for detecting textile surface defects in the present invention further includes the following additional technical features:
[0013] Parallel processing of the image regions through multiple target detection models specifically includes:
[0014] Run multiple target detection models in parallel to process the image regions of multiple textile surface images one by one in parallel; and / or,
[0015] Run multiple target detection models in parallel to process multiple image regions of the same textile surface image in parallel.
[0016] Preprocessing the textile surface image to obtain multiple image regions containing textile surface defects specifically includes:
[0017] Apply image enhancement technology to process the textile surface image to enhance the textile surface defect features;
[0018] According to the boundaries of the textile surface defects, obtain image regions containing the textile surface defects, where each image region has one textile surface defect.
[0019] Preprocessing the textile surface image to obtain multiple image regions containing textile surface defects further includes:
[0020] Determine the size of the image regions;
[0021] Perform a scaling operation on the image regions to adjust multiple image regions to the same size.
[0022] Assigning a target detection model to the image regions corresponding to the textile surface image specifically includes:
[0023] According to the size of the image regions corresponding to the textile surface image, obtain the comprehensive size of the textile surface image, and according to the comprehensive size of the textile surface image, assign the same target detection model to the image regions corresponding to the textile surface image; or,
[0024] According to the size of the image area corresponding to the textile surface image, a target detection model is assigned to each image area one by one.
[0025] The training method of the target detection model is specifically as follows:
[0026] According to multiple different defect clusters, a standard data set is obtained one by one;
[0027] According to the standard data set, using a deep learning framework and combining with a target detection algorithm, a target detection model is constructed.
[0028] According to multiple different defect clusters, obtaining a standard data set one by one is specifically as follows:
[0029] Image areas containing different textile surface defects are collected,
[0030] According to the size of the textile surface defects, the image areas are divided into multiple defect clusters;
[0031] The image areas are labeled to obtain a standard data set correspondingly, where the labeling content includes at least defect type information.
[0032] The textile surface image is obtained by combining an industrial line scan camera and a light source device,
[0033] Wherein the industrial line scan camera is arranged on the textile production line to collect the textile surface image in real time.
[0034] The textile surface defect detection method further includes:
[0035] When a textile surface defect is recognized, an alarm is executed, and the textile surface image with the textile surface defect is displayed in an image.
[0036] The defect types are counted, and a textile surface defect detection report is generated.
[0037] The present invention also provides a textile surface defect detection system, including:
[0038] An image acquisition module for collecting the textile surface image in real time;
[0039] A data preprocessing module for preprocessing the textile surface image to obtain multiple image areas containing textile surface defects, and assigning a target detection model to the image area corresponding to the textile surface image according to the image features of the textile surface image;
[0040] A parallel inference module for parallelly processing the image areas through multiple target detection models to recognize textile surface defects;
[0041] The display and warning module is used to execute an alarm after identifying the surface defects of textiles, display the surface image of the textiles with surface defects, and count the defect types to generate a detection report for the surface defects of textiles.
[0042] Due to the adoption of the above technical solutions, the beneficial effects achieved by the present invention are as follows:
[0043] 1. In the present invention, according to the image features of the textile surface image, a target detection model is assigned to the image region corresponding to the textile surface image; the image region is processed in parallel by a plurality of the target detection models to identify the surface defects of the textiles. By introducing a variety of target detection models and adopting the parallel inference technology, the throughput and detection speed of data processing are significantly improved.
[0044] Specifically, a plurality of target detection models can run simultaneously to process different image regions or different types of defects respectively. This design of multi-model parallel processing not only greatly improves the overall processing speed, but also can respond to the needs of high-speed production lines in real time, ensuring the continuity and efficiency of production.
[0045] In addition, the method has high adaptability and can intelligently select the most suitable target detection model for processing according to the image features. In this way, the present invention not only solves the problem of slow processing speed of a single model, but also overcomes the limitation that it is difficult for traditional methods to take into account various types and sizes of defects, thus realizing efficient real-time detection and high-precision defect identification.
[0046] Generally speaking, the advantage of this design is that it can ensure the accurate identification of various defect types while maintaining a high processing speed, meeting the strict requirements for real-time performance and accuracy in modern textile production. By optimizing the model allocation and parallel inference process, the detection efficiency can be significantly improved, the defective product rate in the production process can be reduced, and the overall production efficiency can be ultimately improved.
[0047] 2. In the present invention, according to the size of the surface defects of the textiles, a plurality of defect clusters are divided, and a plurality of target detection models are correspondingly trained; the surface image of the textiles is preprocessed to obtain a plurality of image regions containing the surface defects of the textiles. The present invention uses the target detection model to effectively reduce the common missed detection and misdetection situations in manual detection, and significantly improves the reliability and accuracy of the detection results.
[0048] Specifically, through precise image preprocessing steps, such as denoising, normalization, cropping, and scaling operations, the data quality of the input model is ensured, thereby improving the accuracy of subsequent analysis. These preprocessing steps not only eliminate the noise and interference factors in the image, but also standardize the image data, facilitating the clearer identification of different types of defect features.
[0049] In addition, the present invention adopts a targeted training method to specifically train corresponding object detection models according to different defect sizes. After sufficient training, each model can more accurately identify specific types of defects, greatly reducing the possibility of misjudgment.
[0050] Generally speaking, this design enables more accurate detection results to be provided when facing diverse and complex textile surface defects. By optimizing the preprocessing process and targeted training, the present invention not only improves the recognition accuracy of individual models but also enhances the robustness and stability of the entire method. Therefore, compared with traditional manual detection methods, the present invention can significantly reduce the occurrence of missed detections and misdetections, improving the reliability and accuracy of overall detection results.
[0051] 3. In the present invention, multiple defect clusters are divided according to the size of the textile surface defects, and multiple object detection models are correspondingly trained. The present invention can flexibly cope with complex production environments and diverse defect types, meeting the quality control requirements of different textile productions.
[0052] Specifically, by dividing multiple defect clusters and training specialized object detection models for each cluster, it is possible to effectively handle various sizes and types of defects, from fine holes to large-area scratches. This design not only ensures high accuracy when facing different types and sizes of defects but also significantly improves the flexibility and adaptability of the method. Whether it is real-time detection on a high-speed production line or fine inspection of specific products, the present invention can intelligently select the most suitable model for processing according to actual needs. Therefore, compared with traditional methods, the present invention can better adapt to complex production environments and changing product characteristics, providing a more comprehensive and reliable defect detection solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0054] Figure 1 is a flowchart of the method for detecting textile surface defects according to an embodiment of the present invention;
[0055] Figure 2 is a schematic diagram of the parallel processing operation of multiple object detection models according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] In order to more clearly illustrate the overall concept of the present invention, the following will be described in detail by way of examples in conjunction with the accompanying drawings of the specification.
[0057] In the following description, many specific details are set forth in order to provide a thorough understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited by the specific embodiments disclosed below.
[0058] As Figure 1 shown, a method for detecting surface defects of textiles includes:
[0059] S000: Divide a plurality of defect clusters according to the size of the surface defects of the textiles, and correspondingly train a plurality of object detection models.
[0060] The purpose of this step is to significantly improve the efficiency and accuracy of detecting surface defects of textiles by dividing a plurality of defect clusters according to the size of the surface defects of the textiles and training a dedicated object detection model for each cluster. It can flexibly handle different types of defects and ensure efficient and accurate quality control in a diverse production environment.
[0061] It can be understood that there are characteristic differences in defects of different sizes, and it is difficult for a single model to simultaneously take into account all types of defects, which is likely to lead to missed detections or false detections.
[0062] For example, small-sized defects (such as small holes and stains) and large-sized defects (such as large-area scratches and irregular stains) have significantly different manifestations and characteristics in images. Small-sized defects usually show local subtle changes, which may only involve changes in a few pixels and require high resolution and fine feature extraction capabilities. Large-sized defects often involve a larger image area and have more complex shape and texture features, and require the ability to process large-scale data.
[0063] In addition, different-sized defects are suitable for different model designs. For example, small-sized defects are suitable for using lightweight and high-precision models (such as YOLO, SSD), which can reduce the computational burden while maintaining a high accuracy rate. Large-sized defects are suitable for using models with a larger receptive field and stronger expression ability (such as Faster R-CNN) to better process complex shape and texture features.
[0064] Defects of different sizes have different requirements for computing resources. For example, for small-sized defects, although the processing area is small, due to the need for high resolution and fine feature extraction, the computing resource requirements are not low. For large-sized defects, the processing area is large, and although the detail requirements for a single defect are low, the overall computational volume is still large.
[0065] Meanwhile, the diversity of textile production determines that there are a wide variety and complexity of surface defects. There may be multiple defects of different sizes and types on the same piece of textile, and it is difficult for a single model to comprehensively cover all situations. By dividing defect clusters and training specialized models, it is possible to more flexibly handle various complex production environments and diverse product characteristics, providing a more comprehensive and reliable defect detection solution.
[0066] Therefore, dividing multiple defect clusters according to the size of textile surface defects and training specialized object detection models for each cluster not only helps improve the accuracy of detection, but also effectively utilizes computing resources, meets real-time requirements, and adapts to complex and changeable production environments.
[0067] Specifically, in this step, defect classification and cluster division refer to dividing defects into multiple different clusters according to the size and type of textile surface defects. This strategy helps to more accurately identify and process different types and sizes of defects.
[0068] Object detection model training refers to training specialized object detection models for each defect cluster. These models are based on deep learning algorithms (such as Faster R-CNN, YOLO, SSD, etc.). After sufficient training, they can accurately identify specific types of defects. This targeted training improves the recognition accuracy of individual models.
[0069] The textile surface defect detection method proposed by the present invention based on parallel inference of multiple object detection models realizes efficient, accurate and flexible defect detection through reasonable defect classification, targeted training and parallel inference technology.
[0070] It should be noted that this step is a pre-step of the textile surface defect detection method, aiming to train multiple object detection models. During the execution of the textile surface defect detection method, the recognition of textile surface defects can be achieved through the object detection models. Therefore, after the object detection models are trained, the subsequent steps can be cyclically executed to identify textile surface defects based on the object detection models. Of course, when there are errors or the errors reach a certain limit in the recognition of textile surface defects, this step can also be re-executed to optimize the object detection models.
[0071] S100: Preprocess the textile surface image to obtain multiple image regions containing textile surface defects.
[0072] The main purpose of preprocessing the textile surface image in this step is to improve the accuracy and efficiency of subsequent defect detection. Through a series of preprocessing operations, noise can be removed, defect features can be enhanced, and the image can be segmented into multiple regions containing specific defects, thus ensuring the data quality input into the object detection models.
[0073] It is understandable that in the detection of textile surface defects, since defects usually only account for a small part of the entire image, removing the background part and focusing on the image area containing defects can significantly improve the detection efficiency and accuracy.
[0074] Meanwhile, the preprocessing can include steps such as preliminary denoising, contrast enhancement, grayscale conversion and normalization, edge detection and defect localization, intelligent cropping and segmentation, etc., and finally segment the textile surface image into multiple image areas containing textile surface defects.
[0075] Specifically, for preliminary denoising, filtering techniques (such as mean filtering, median filtering, etc.) are applied to remove the noise in the image and improve the image quality. Methods such as Gaussian blur or bilateral filtering are used to further smooth the image and reduce minor interferences.
[0076] For contrast enhancement, techniques such as histogram equalization or adaptive histogram equalization (CLAHE) are used to enhance the image contrast and make the defects more obvious. The application of local contrast enhancement algorithms can be considered for optimization in specific regions.
[0077] For grayscale conversion and normalization, the color image is converted into a grayscale image to simplify the subsequent processing steps. The grayscale image is normalized so that its pixel values are distributed within a unified range (such as 0 to 255) for subsequent analysis.
[0078] For edge detection and defect localization, edge detection algorithms (such as Canny operator) are used to identify the edge information in the image to help determine the potential defect positions. Morphological operations (such as dilation, erosion) are used to strengthen the edge features and eliminate minor artifacts.
[0079] For intelligent cropping and segmentation, based on the edge detection results, the image areas containing defects are identified and cropped, and the irrelevant background information is removed. Methods such as connected component analysis or contour detection can be used to automatically extract the defect areas to ensure that each cropped image only contains one defect.
[0080] Through the above series of preprocessing steps, the quality of the input data is significantly improved, the influence of noise and interference factors is reduced, the defect features are made clearer, and the accuracy of subsequent analysis is improved. The complex full-frame image is simplified into multiple small defect area images, reducing the data volume processed by the subsequent model, lowering the demand for computing resources, and at the same time improving the processing speed. The intelligent cropping and background removal process enables the method to flexibly handle different types and sizes of defects, enhancing the adaptability and robustness of the system and enabling it to operate stably in complex and changeable production environments.
[0081] Generally speaking, through these steps, not only can the blank background be effectively removed, but also the defects on the textile surface can be significantly highlighted, providing high-quality input data for subsequent defect detection, thereby improving the performance and reliability of the entire detection method.
[0082] S200: According to the image features of the textile surface image, assign a target detection model to the image region corresponding to the textile surface image.
[0083] In this step, a suitable target detection model is assigned to the corresponding image region according to the features of the textile surface image, aiming to improve the accuracy and efficiency of defect detection. By intelligently selecting the model most suitable for specific image features, different types of defects can be identified more accurately, while optimizing the utilization of computing resources.
[0084] It should be noted that the target detection model assigned in this step is the target detection model trained in the previous steps of the present invention. As described in the previous steps, according to the size of the textile surface defects, multiple defect clusters are divided, and multiple target detection models are correspondingly trained.
[0085] That is to say, the trained target detection models are obtained by training for multiple defect clusters respectively. The samples in the corresponding defect clusters have high accuracy in identifying textile surface defects, while the accuracy of identifying textile surface defects for samples in other defect clusters is uncertain.
[0086] Therefore, in this step, according to the image features of the textile surface image, a target detection model is assigned to the image region corresponding to the textile surface image. By intelligently selecting the model most suitable for specific image features, different types of defects can be identified more accurately, reducing the situations of missed detection and false detection. Assigning the model according to the image features avoids the performance bottleneck caused by a single model dealing with all types of defects and improves the utilization efficiency of computing resources.
[0087] It can be understood that in order to achieve the accurate assignment of the target detection model, consistent with the division criteria of the defect clusters, the target detection model is also assigned to the image region according to the image feature of the size of the textile surface defects.
[0088] The image region is an image region that contains defects identified and cropped according to the edge detection results. And the image region is generally a regular figure, such as a circle or a rectangle. Therefore, in this step, through the size of the image region, the size of the textile surface defects is replaced to evaluate the image features of the textile surface image, and then a target detection model is assigned to the image region corresponding to the textile surface image.
[0089] Specifically, for image feature extraction, dimensions are extracted from the preprocessed image regions to distinguish defects of different sizes.
[0090] Feature analysis and classification: Analyze the extracted features to determine the defect clusters to which the textile surface defects in the image region belong. For example, determine whether there are small-sized defects, large-area complex patterns, or other special types of defects in this region.
[0091] The model selection strategy is to select the object detection model most suitable for the current image region according to the feature analysis results. For example: Select the corresponding trained object detection models for small-sized defects and large-area complex patterns respectively.
[0092] Generally speaking, allocating object detection models to corresponding image regions according to the features of textile surface images not only improves the accuracy and efficiency of defect detection, but also optimizes the utilization of computing resources, enhancing the flexibility and real-time performance of the method.
[0093] S300: Identify textile surface defects by processing the image region in parallel with multiple said object detection models.
[0094] The purpose of this step is to process different image regions in parallel with multiple specially trained object detection models to efficiently and accurately identify various defects on the textile surface. This method not only improves the processing speed and real-time response ability, but also enhances the recognition accuracy for different types and sizes of defects.
[0095] In the modern textile production process, the detection requirements for textile surface defects are becoming increasingly complex and diverse. The traditional single-model sequential processing method can no longer meet the requirements of real-time performance and high precision for high-speed production lines. Therefore, the method of parallel processing with multiple object detection models has become an inevitable choice.
[0096] There are various types of textile surface defects, including small-sized holes, stains, as well as large-area scratches, irregular patterns, etc. Different types of defects require different detection algorithms and model structures. In addition, factors such as lighting conditions and material textures in the textile production process vary widely, increasing the difficulty of detection.
[0097] Moreover, the speed of modern textile production lines is constantly increasing, requiring the detection system to be able to respond in real time, quickly identify and report defects. The processing requirements for high-resolution images and large amounts of data make it difficult for a single model to complete all tasks in a short time.
[0098] Multiple object detection models can run simultaneously, each processing different image regions or different types of defects. This design significantly improves the overall processing speed, ensuring the continuity and efficiency of production. The parallel processing architecture can significantly enhance the processing speed while maintaining high accuracy, meeting the strict real-time requirements of modern textile production lines.
[0099] The parallel processing architecture can make full use of the computing power of multi-threaded or distributed computing frameworks (such as CUDA, TensorFlow Serving, etc.), avoiding the performance bottleneck caused by a single model processing all types of defects and improving resource utilization. According to the requirements of the current task, the load of each model can be dynamically adjusted to further optimize resource allocation.
[0100] Specifically, the parallel inference architecture design includes building a multi-model parallel inference system that allows multiple object detection models to run simultaneously. This architecture can significantly improve the overall processing speed and meet the real-time requirements of modern textile production lines. Multi-threaded or distributed computing frameworks (such as CUDA, TensorFlow Serving, etc.) are used to implement parallel inference, ensuring that each model can efficiently process its respective image region.
[0101] Model parallel processing includes starting multiple object detection models to process different image regions respectively. For example, small-sized defect regions are processed by YOLO or SSD models, which perform well in identifying small defects. Large-area complex pattern regions are processed by the Faster R-CNN model, which has stronger capabilities in dealing with complex shapes and texture features. Each model runs independently without interference, thus achieving efficient parallel processing.
[0102] Generally speaking, by parallelly processing image regions with multiple object detection models, the present invention realizes efficient, accurate, and flexible detection of textile surface defects. This method not only significantly improves the processing speed and real-time response ability but also enhances the recognition accuracy of different types and sizes of defects. Through intelligent allocation and parallel inference technologies, it can better adapt to complex production environments and provide enterprises with more reliable quality control means.
[0103] As a preferred embodiment of the present invention, by parallelly processing the image regions with multiple said object detection models, specifically:
[0104] Run multiple said object detection models in parallel, and process the image regions of multiple said textile surface images one by one in parallel; and / or,
[0105] Run multiple said object detection models in parallel, and parallelly process multiple image regions of the same said textile surface image.
[0106] This embodiment does not limit the parallel mode of the multiple target detection models, and any one of the following embodiments can be adopted, or the following embodiments can be combined for use. As Figure 2 shown, four target detection models A are assigned to Picture A to process regions 1 to 4 in Picture A in parallel. Two target detection models B are assigned to Picture B to process regions 1 to 2 in Picture B in parallel. One target detection model C is assigned to Picture C to process region 1 in Picture C.
[0107] Embodiment 1: Run multiple target detection models in parallel and process the image regions of multiple textile surface images in one-to-one correspondence in parallel.
[0108] In some cases, the defect types and features in the textile surface image may be relatively consistent. Therefore, after comprehensively evaluating the defect sizes of the entire image, the most suitable target detection model can be assigned to the entire textile surface image. This method can simplify the system design, reduce the computational complexity, and ensure efficient and accurate identification of defects in the image.
[0109] Among them, the target detection model assignment mechanism for the textile surface image is to select the most suitable single target detection model to process the entire image based on the comprehensive evaluation result of the defect size. This process can be implemented through a rule engine or a simple decision tree.
[0110] Process multiple image regions of a textile surface image through the same target detection model. Load the selected model into the inference unit and perform necessary initialization settings. Use the selected single model to detect defects in the entire textile surface image and generate results including defect types, positions, and their statistical information.
[0111] For example, assume that a batch of textile surface images mainly contain small-sized fine holes or stains. After comprehensive size evaluation, it is found that these defects all belong to the small-size defect cluster. At this time, a lightweight and high-precision YOLO model will be selected to process the entire image. The YOLO model performs well in identifying small defects and can quickly and accurately detect all relevant defects.
[0112] In contrast, if another batch of textile surface images mainly contain large-area scratches or irregular stains, the Faster R-CNN model with a larger receptive field and stronger expression ability will be selected to process the entire image. The Faster R-CNN model has better performance in processing complex shape and texture features and can effectively identify large-area defects.
[0113] By comprehensively evaluating the defect sizes of the textile surface images and assigning a most suitable object detection model to the entire image, the system design can be simplified and the processing efficiency can be improved while maintaining a high detection accuracy. This method is particularly suitable for production environments with relatively consistent defect features, providing enterprises with a more efficient and easy-to-maintain quality control means.
[0114] As Figure 2 shown, assign object detection model A for processing multiple regions in Picture A, assign object detection model B for processing multiple regions in Picture B, and assign object detection model C for processing multiple regions in Picture C.
[0115] Embodiment 2: Run multiple of the object detection models in parallel to process multiple image regions of the same textile surface image in parallel.
[0116] In some cases, a textile surface image is divided into multiple image regions, and each region may contain multiple defects. To efficiently identify these defects, multiple object detection models are run simultaneously, with each model specifically identifying defects in a specific region. In this way, multiple image regions can be processed simultaneously, thus greatly improving the detection efficiency.
[0117] This embodiment places no restrictions on the types of multiple object detection models that are run in parallel for a textile surface image. Multiple identical object detection models can be selected according to the comprehensive characteristics of the textile surface image to process multiple regions of the same image in parallel. As Figure 2 shown, assign four object detection models A to Picture A to process regions 1 to 4 in Picture A in parallel.
[0118] Of course, different object detection models can also be correspondingly assigned according to the characteristics of multiple regions of the same image to process multiple regions of the same image. The present invention places no restrictions on this.
[0119] This embodiment significantly improves the system throughput by processing multiple image regions in parallel, meeting the requirements of high-speed production lines. Multiple object detection models run simultaneously, reducing the processing time of a single model and improving the overall processing speed. It can dynamically adjust its working mode according to different defect types and sizes, providing support for a wider range of application scenarios. It can flexibly handle various complex production environments and changing product characteristics, providing a comprehensive and reliable defect detection solution.
[0120] As a preferred implementation manner of the present invention, preprocess the textile surface image to obtain multiple image regions containing textile surface defects, specifically:
[0121] Process the surface image of the textile using image enhancement technology to enhance the defect features on the textile surface;
[0122] According to the boundaries of the defects on the textile surface, obtain image regions containing the defects on the textile surface, where each of the image regions has one of the defects on the textile surface.
[0123] The main purpose of this embodiment is to preprocess the surface image of the textile to enhance the defect features in the image, so as to more accurately extract the image regions containing the defects. Through this method, the recognition accuracy and efficiency of the subsequent object detection model can be significantly improved.
[0124] Among them, to enhance the defect features, use image enhancement technology to highlight the defects in the image, making them more obvious for subsequent processing.
[0125] Precisely segment the defect regions. According to the defect boundary information, accurately extract the image regions containing individual defects, ensuring that each region contains only one main defect.
[0126] By optimizing the preprocessing steps, reduce noise and interference factors, improve the performance of the object detection model, and enhance the recognition accuracy.
[0127] Specifically, for the initial image denoising, perform initial denoising processing (such as mean filtering, median filtering, etc.) on the collected image to remove sensor noise and other random interferences.
[0128] The application of image enhancement technology generally includes contrast adjustment, edge detection, morphological operations, and color space conversion.
[0129] Among them, for contrast adjustment, through histogram equalization or adaptive contrast enhancement technology, improve the overall contrast of the image, making the defect features more obvious.
[0130] For edge detection, apply edge detection algorithms (such as Canny operator, Sobel operator) to highlight the edge features in the image, especially those that may represent the boundaries of the defects.
[0131] For morphological operations, use morphological operations (such as dilation, erosion) to further enhance the defect features. For example, the dilation operation can make small defects more prominent, while the erosion operation can help remove some non-critical background noise.
[0132] For color space conversion, convert the image from the RGB color space to a color space more suitable for defect detection (such as HSV, Lab) to better separate the defects from the background.
[0133] The extraction of defect regions generally includes connected component analysis, boundary detection and extraction, and region cropping.
[0134] Among them, the connected component analysis is based on the enhanced image, and the connected component analysis (CCA) is applied to label and segment each independent defect area. Each connected component represents a potential defect area.
[0135] For each connected component, the boundary contour is calculated (such as using the findContours function in the OpenCV library). These boundaries define the image areas containing individual defects.
[0136] According to the boundary information, each defect area is cropped.
[0137] Generally speaking, through a series of image enhancement techniques, the defects become clearer and more prominent, which helps to improve the recognition accuracy of the subsequent object detection model. Based on the connected component analysis and boundary detection, the image areas containing individual defects can be accurately extracted, reducing the probability of false detection and missed detection. The preliminary denoising and morphological operations effectively eliminate the noise and interference factors in the image, improving the reliability of the subsequent analysis.
[0138] As a preferred embodiment of this implementation manner, when preprocessing the textile surface image to obtain multiple image areas containing textile surface defects, it further includes:
[0139] Determine the size of the image area;
[0140] Perform a scaling operation on the image area to adjust multiple image areas to the same size.
[0141] In this embodiment, determining the size of the image area and performing a scaling operation on it aims to ensure that all the extracted defect areas have a unified standard size. This step is crucial for the subsequent processing of the object detection model because most deep learning models require the input images to have consistent sizes and proportions.
[0142] Standardizing the input makes each image area meet the input requirements of the object detection model, ensuring that the model can perform inference stably and efficiently. By adjusting all image areas to the same size, the subsequent processing flow is simplified, the computational complexity is reduced, the overall processing speed is increased, and the processing efficiency is improved. In addition, the standardized input size helps the model better capture and learn features, reducing the performance fluctuations caused by inconsistent image sizes and improving the recognition accuracy.
[0143] Specifically, based on the boundary contours of each connected component, calculate its minimum bounding rectangle (Bounding Box) to obtain the initial dimensions (width and height) of each defect region. Record the initial dimensions of each image region for reference during subsequent scaling operations and also for the assignment of the target detection model.
[0144] Perform a scaling operation on the image regions and select the target size. According to the requirements of the target detection model, select a standard size as the target size for all image regions. Common standard sizes include 224x224 pixels, 256x256 pixels, etc. Selecting an appropriate size requires considering the input requirements of the model and the limitations of computing resources.
[0145] Select a scaling algorithm. The scaling algorithms mainly include algorithms such as bilinear interpolation, nearest neighbor interpolation, and bicubic interpolation.
[0146] Among them, bilinear interpolation is a commonly used image scaling method that can achieve smooth transitions while maintaining image quality. It generates new pixel values by weighted averaging of neighboring pixels.
[0147] The nearest neighbor interpolation method is simple and fast, but may cause jagged edges in the image. It is suitable for scenarios with high requirements for computing speed.
[0148] Bicubic interpolation provides higher image quality, but has a higher computational complexity. It is applicable to scenarios with high requirements for image quality.
[0149] Use the selected scaling algorithm for the scaling operation to adjust each image region from its original size to the target size. The specific steps are as follows:
[0150] Read the original image regions and read each original image region containing defects from the storage.
[0151] Apply the scaling algorithm and perform scaling processing on the image using the selected scaling algorithm according to the target size.
[0152] Save the scaled image and save the scaled image to the system for subsequent inference of the target detection model.
[0153] Among them, the selection of the target size is determined according to the original size of the image region. For particularly small defect regions (such as 50x50 pixels), select 128x128 pixels as the target size; for larger defect regions (such as 400x350 pixels), select 512x512 pixels as the target size.
[0154] Generally speaking, through the above steps, not only can all image regions be efficiently and accurately adjusted to a unified standard size, but also the recognition accuracy and processing efficiency of the subsequent target detection model can be significantly improved.
[0155] As an implementation manner of the present invention, a target detection model is assigned to the image area corresponding to the textile surface image, specifically:
[0156] According to the size of the image area corresponding to the textile surface image, the comprehensive size of the textile surface image is obtained, and according to the comprehensive size of the textile surface image, the same target detection model is assigned to the image area corresponding to the textile surface image; or,
[0157] According to the size of the image area corresponding to the textile surface image, a target detection model is assigned to each image area one by one.
[0158] The main purpose of this implementation manner is to select the most suitable target detection model for processing according to the specific sizes of each image area in the textile surface image. By this method, it can be ensured that each image area can be processed by the model most suitable for its characteristics, thereby improving the accuracy and efficiency of defect detection.
[0159] Intelligently assign the most suitable target detection model according to the size characteristics of the image area to maximize the detection accuracy. Through a reasonable model assignment strategy, reduce unnecessary waste of computing resources and improve the overall processing speed. For different sizes and types of defects, flexibly select different target detection models to enhance the robustness and adaptability of the system.
[0160] It should be noted that this implementation manner does not limit the model assignment strategy, and any one of the following embodiments can be adopted.
[0161] Embodiment 1: According to the size of the image area corresponding to the textile surface image, the comprehensive size of the textile surface image is obtained, and according to the comprehensive size of the textile surface image, the same target detection model is assigned to the image area corresponding to the textile surface image.
[0162] In this embodiment, all image areas of the entire textile surface image are regarded as a whole, and based on the comprehensive size characteristics of these areas, the same target detection model is selected and used for processing.
[0163] Among them, calculating the comprehensive size is specifically to perform statistical analysis on the sizes (width and height) of all image areas to calculate a comprehensive size index. Common comprehensive size calculation methods include:
[0164] Average size, calculate the average width and height of all image areas.
[0165] Maximum size, take the maximum width and height among all image areas as the comprehensive size.
[0166] Minimum size: Take the minimum width and height among all image regions as the comprehensive size.
[0167] Weighted average size: Assign different weights according to the importance or occurrence frequency of different regions, and calculate the weighted average size.
[0168] Secondly, select the object detection model. According to the comprehensive size, select the most suitable model from multiple pre-trained object detection model libraries. For example:
[0169] If the comprehensive size is small (e.g., the average size is 100x100 pixels), select the lightweight and efficient YOLO model.
[0170] If the comprehensive size is large (e.g., the average size is 500x500 pixels), select the FasterR-CNN model with a larger receptive field.
[0171] Finally, perform unified processing. Input all image regions into the selected object detection model for unified defect detection processing.
[0172] In this embodiment, by assigning the same model to all image regions, the system complexity is reduced, and the model management and maintenance work are simplified. Only one model needs to be run, reducing the demand for computing resources and improving the processing speed. For images with relatively consistent defect features, a single model can provide more stable and consistent detection results, reducing the uncertainty caused by multi-model switching.
[0173] Embodiment 2: According to the size of the image region corresponding to the textile surface image, assign an object detection model to each image region one by one.
[0174] In this embodiment, according to the specific size of each image region, the most suitable object detection model is selected for each of them for processing to maximize the detection accuracy.
[0175] First, determine the size of each image region. Based on the previous connected component analysis and bounding box calculation, record the specific size (width and height) of each image region.
[0176] Secondly, select the object detection model. For each image region, according to its size characteristics, select the most suitable model from multiple pre-trained object detection model libraries. The specific judgment strategies can include:
[0177] Size threshold division: Set different size threshold intervals, and each interval corresponds to a specific object detection model. For example:
[0178] Regions smaller than 100x100 pixels use the YOLO model;
[0179] Regions with a size greater than or equal to 100x100 and less than 500x500 pixels use the SSD model;
[0180] Regions with a size greater than or equal to 500x500 pixels use the Faster R-CNN model.
[0181] Adaptive model selection uses machine learning algorithms (such as decision trees, random forests, etc.) to automatically select the optimal model based on the size characteristics of the image region.
[0182] Finally, independent processing is performed. Each image region is separately input into its respective selected object detection model for independent defect detection processing.
[0183] Specialized trained models are used for different types and sizes of defects, ensuring higher recognition accuracy and reducing the probability of false detection and missed detection. It can dynamically adjust its working mode according to different defect types and sizes, providing support for a wider range of application scenarios.
[0184] Generally speaking, through the above steps, not only can the detection accuracy be maintained at a high level, but also the system design can be simplified and the processing efficiency can be improved. Moreover, it can flexibly cope with various complex production environments and changing product characteristics.
[0185] As a preferred embodiment of the present invention, the training method of the object detection model is specifically as follows:
[0186] According to multiple different defect clusters, standard data sets are obtained one by one;
[0187] According to the standard data sets, using a deep learning framework and combining with an object detection algorithm, an object detection model is constructed.
[0188] The main purpose of this step is to construct a standard data set for specific defect types based on different defect clusters in the textile surface image, and use a deep learning framework and an object detection algorithm to train an efficient object detection model based on these data sets. By this method, the recognition accuracy and efficiency for different types of defects can be significantly improved to meet the actual production requirements.
[0189] Specifically, a standardized data set is created for each type of defect to ensure the quality and representativeness of the data set, so as to construct a high-quality standard data set. Using a deep learning framework and advanced object detection algorithms, a model that can accurately identify various defects is constructed. For different defect types and sizes, the most suitable model is trained to enhance the robustness and adaptability of the system.
[0190] Specifically, according to multiple different defect clusters, standard data sets are obtained one by one, specifically as follows:
[0191] Collect image regions containing different textile surface defects.
[0192] Divide the image regions into multiple defect clusters according to the sizes of the textile surface defects.
[0193] Annotate the image regions to obtain a standard dataset accordingly, where the annotation content includes at least defect type information.
[0194] In this embodiment, different defect types in the textile surface image are classified, and a standardized dataset is created for each type of defect for subsequent model training.
[0195] Among them, defect classification and annotation mainly include:
[0196] Manual annotation: Professional personnel manually annotate the collected textile surface images, marking each type of defect (such as holes, scratches, stains, etc.) and their positions.
[0197] Automatic annotation tools: Use existing automatic annotation tools (such as LabelImg, CVAT, etc.) to assist the annotation process to improve the annotation efficiency and accuracy.
[0198] Secondly, perform data cleaning and preprocessing, including:
[0199] Remove noise: Denoise the annotated images to ensure the quality of the dataset.
[0200] Data augmentation: Generate more training samples through data augmentation techniques (such as rotation, flipping, scaling, cropping, etc.) to increase the diversity of the dataset and improve the generalization ability of the model.
[0201] Format conversion: Convert the annotation results into a format suitable for deep learning frameworks (such as COCO, Pascal VOC, etc.).
[0202] Finally, construct a standard dataset. Classify according to defect types, and classify all the annotated images according to defect types to form multiple independent standard datasets. For example, a hole dataset, a scratch dataset, a stain dataset, etc.
[0203] Maintain dataset balance: Ensure that each dataset contains a sufficient number of samples to avoid model skewness caused by too few samples in some categories. Insufficient data can be supplemented through synthetic samples or transfer learning.
[0204] In this embodiment, the dataset that has undergone strict annotation and preprocessing ensures the quality and representativeness of the data, providing a solid foundation for subsequent model training. By using data augmentation techniques to generate more diverse training samples, the generalization ability and robustness of the model are improved. Combining manual annotation and automatic annotation tools enhances the overall annotation efficiency and reduces labor costs.
[0205] According to the standard dataset, use a deep learning framework and combine it with an object detection algorithm to construct an object detection model. The aim is to train an object detection model that can accurately identify various defects based on the constructed standard dataset, using a deep learning framework and an object detection algorithm.
[0206] Specifically, it includes steps of selecting a deep learning framework, selecting an object detection algorithm, data preparation and loading, model training, model evaluation and optimization.
[0207] Among them, selecting a deep learning framework: Commonly used deep learning frameworks include TensorFlow, PyTorch, Keras, etc. Select a suitable framework according to project requirements and team familiarity. Ensure that the selected framework supports the object detection algorithm and has good community support and documentation resources.
[0208] Selecting an object detection algorithm: YOLO (You Only Look Once) is suitable for real-time detection, with fast calculation speed and is suitable for dealing with small-sized defects. SSD (Single Shot MultiBox Detector) achieves a good balance between speed and accuracy and is suitable for medium-scale defect detection. Faster R-CNN (Region-based Convolutional Neural Networks) has high detection accuracy but high computational complexity and is suitable for dealing with defects in large-area complex patterns.
[0209] Data preparation and loading: Import the standard dataset into the deep learning framework to ensure that the data format is correct and easy to load. Use a data loader (DataLoader) to read data in batches to improve training efficiency.
[0210] Model training: First, initialize the model, train the model from scratch or use transfer learning with a pre-trained model. Secondly, perform hyperparameter tuning, adjust hyperparameters such as learning rate, batch size, optimizer, etc. to obtain the best training effect. Execute cross-validation, use cross-validation techniques to evaluate the model performance and avoid overfitting. Select a loss function, select a suitable loss function (such as Smooth L1 Loss, Focal Loss, etc.) according to the task requirements to optimize the model training process.
[0211] Model Evaluation and Optimization: Evaluate the model performance using metrics such as Precision, Recall, and F1-score. Optimize the model according to the evaluation results, such as adjusting the network structure, adding regularization terms, etc. Save the trained model and deploy it to the production environment for actual application.
[0212] In this embodiment, by selecting a suitable deep learning framework and object detection algorithm, a high-precision model capable of accurately identifying various defects is trained. The optimized model can achieve fast inference while maintaining high precision, meeting the real-time requirements of the production line. Dynamically adjusting the model selection strategy according to different defect types and sizes enhances the flexibility and scalability of the system.
[0213] As a preferred embodiment of the present invention, the textile surface image is obtained by an industrial line scan camera in combination with a light source device.
[0214] Wherein the industrial line scan camera is arranged on the textile production line to collect the textile surface image in real time.
[0215] The main purpose of this embodiment is to collect the textile surface image in real time through the industrial line scan camera and the light source device, ensuring the acquisition of high-quality image data for subsequent defect detection and analysis.
[0216] Specifically, first select and set the industrial line scan camera. The aim is to select an industrial line scan camera suitable for textile surface image acquisition and make reasonable settings to ensure image quality.
[0217] Select a suitable line scan camera to meet the requirements of resolution, scanning speed, and interface type.
[0218] Among them, select a suitable resolution according to the requirements of textile surface details. Generally, a higher resolution (such as 8K or higher) can capture more details, but it will also increase the computational burden.
[0219] Select a suitable scanning speed according to the speed of the production line to ensure that the image acquisition rate is synchronized with the production line and avoid image stretching or blurring.
[0220] Select an interface that supports high-speed data transmission (such as GigE, Camera Link, etc.) to ensure that the image data can be transmitted to the processing system in real time.
[0221] Secondly, perform camera installation and calibration, including determining the installation position, angle adjustment, and focal length adjustment.
[0222] Among them, the installation position refers to installing the line scan camera at a key position on the textile production line to ensure that the entire textile surface can be covered.
[0223] Adjust the angle of the camera so that it is perpendicular to the textile surface to reduce perspective distortion.
[0224] Adjust the focal length of the camera according to the distance from the textile surface to ensure image clarity.
[0225] Finally, set the parameters, adjusting the exposure time, gain control, and white balance.
[0226] Among them, the exposure time refers to setting an appropriate exposure time according to the light source brightness and production line speed to avoid overexposure or underexposure.
[0227] Gain control means appropriately adjusting the gain to enhance the image brightness, but pay attention to avoiding introducing too much noise.
[0228] White balance refers to setting the correct white balance according to the light source color to ensure accurate image color.
[0229] The selection and setting of the light source device aim to select a light source device suitable for image acquisition on the textile surface and make reasonable settings to ensure uniform and stable illumination.
[0230] Among them, select the appropriate light source type:
[0231] The ring light source is suitable for scenarios that require uniform illumination and can effectively reduce shadows and reflections;
[0232] The bar light source is suitable for the linear scanning mode of line scan cameras and can provide uniform illumination in the scanning direction;
[0233] The backlight source is suitable for transparent or semi-transparent materials and can highlight defects inside the material.
[0234] Light source installation and calibration:
[0235] Installation position: Install the light source device near the camera to ensure that the light can evenly illuminate the textile surface;
[0236] Angle adjustment: Adjust the angle of the light source so that it forms an appropriate angle with the textile surface to avoid unnecessary shadows and reflections;
[0237] Height adjustment: Adjust the position of the light source according to the height of the textile surface to ensure uniform illumination.
[0238] Light source control and dimming:
[0239] Brightness adjustment: Set the appropriate light source brightness according to the ambient light conditions and camera parameters to ensure moderate image brightness;
[0240] Color temperature adjustment: Select the appropriate light source color temperature according to the color and material of the textile to ensure true image color;
[0241] Stability control: Use a stable power supply and control system to avoid light source flickering or brightness fluctuations.
[0242] By selecting the appropriate light source type and reasonable installation settings, ensure uniform illumination of the textile surface, reducing the effects of shadows and reflections. By adjusting the color temperature and brightness of the light source, ensure accurate image colors, which helps subsequent color analysis and defect identification. Use a stable power supply and control system to ensure that the light source brightness and color temperature remain constant, improving the reliability of image acquisition.
[0243] Generally speaking, in this embodiment, through the above steps, it is not only possible to efficiently and real-time collect high-quality textile surface images, but also ensure image quality and consistency, providing a solid foundation for subsequent defect detection and analysis.
[0244] As a preferred embodiment of the present invention, the textile surface defect detection method further includes:
[0245] When a textile surface defect is identified, execute an alarm and display the textile surface image with the textile surface defect;
[0246] Statistical defect types and generate a textile surface defect detection report.
[0247] The main purpose of this embodiment is to immediately execute an alarm and display the defective image after identifying a textile surface defect, while statistically analyzing the defect types and generating a detailed detection report. Through this method, rapid response and efficient quality control can be achieved, ensuring that problems in the production process can be promptly discovered and addressed.
[0248] Real-time alarm and feedback can immediately issue an alarm when a defect is detected, notify relevant personnel for handling, and reduce the defective product rate. By displaying the defective image, visual display is achieved, helping operators intuitively understand the specific location and characteristics of the defect. Statistically analyze the defect types and generate a detailed detection report, providing data support for subsequent quality improvement.
[0249] Among them, the main purpose of real-time alarm and image display is to immediately execute an alarm and display the defective image after identifying a textile surface defect so that operators can respond quickly.
[0250] Set up an alarm mechanism, install an audible and visual alarm, trigger an alarm signal when a defect is detected, attracting the attention of on-site staff; and / or, display obvious alarm prompt information (such as pop-up windows, flashing icons, etc.) on the monitoring system interface to ensure that operators can notice in a timely manner.
[0251] Image display specifically means,
[0252] Mark the defect location. After detecting a defect, use a graphic annotation tool (such as OpenCV) to mark the specific location of the defect on the original image;
[0253] Highlight the defect image with markings on the monitoring screen for easy viewing by the operator;
[0254] Save the historical record. Save the defect image with markings to the database for subsequent reference and analysis.
[0255] In this step, through audible and visual alarms and software prompts, it is ensured that the operator can be informed of the defect situation in a timely manner and take measures promptly. By marking and highlighting the defect location, intuitive display is achieved, helping the operator quickly locate and confirm the defect, thus improving work efficiency. Saving the defect image with markings provides a reliable data basis for subsequent quality traceability and analysis.
[0256] Statistical analysis of defect types aims to classify and count the identified surface defects of textiles, providing data support for generating inspection reports.
[0257] Among them, defect classification includes
[0258] Pre-defined categories. According to common surface defect types of textiles (such as holes, scratches, stains, etc.), defect categories are pre-defined;
[0259] Automatic classification. Using the class labels output by the object detection model, automatically classify each detected defect.
[0260] Statistical analysis includes
[0261] Quantity statistics. Count the occurrence times of each defect type to form a basic quantity statistical table;
[0262] Distribution analysis. Analyze the distribution of different defect types on the textile surface to find out high-incidence areas or specific patterns;
[0263] Trend analysis. Combining historical data, analyze the evolution trend of defect types to predict possible future problems.
[0264] In this step, automatic classification by the object detection model reduces manual intervention, improving the accuracy and efficiency of classification. Through comprehensive analysis of the quantity, distribution, and trend of defect types, strong data support is provided for quality improvement. Analyzing the development trend of defects based on historical data helps to take preventive measures in advance and reduce the defective rate.
[0265] Generating a surface defect inspection report for textiles aims to generate a detailed surface defect inspection report for textiles based on the statistical results, providing a decision-making basis for management.
[0266] Specifically, the report template design includes
[0267] Basic information, including basic information such as production line number, detection time, and detection personnel;
[0268] Defect summary, listing detailed information such as all detected defects, their classifications, quantities, and distribution;
[0269] Chart display, using visualization tools such as bar charts and pie charts to display the quantities and proportions of various types of defects;
[0270] Improvement suggestions, putting forward specific improvement suggestions based on the analysis results, such as adjusting the production process, replacing raw materials, etc.
[0271] Secondly, automatically generating reports, including
[0272] Automation scripts, writing automation scripts to extract relevant data from the database and generate detection reports according to the preset template format;
[0273] Regular generation, setting up scheduled tasks to regularly generate detection reports (such as daily, weekly, monthly) to ensure timely update of data;
[0274] Multi-format export, supporting the export of reports in multiple formats (such as PDF, Excel, etc.) for easy access and archiving by different departments;
[0275] Distribution mechanism, distributing the reports to relevant departments and management personnel through methods such as email and enterprise internal systems to ensure timely transmission of information.
[0276] This step ensures the consistency and standardization of the reports through a standardized report template and an automated generation process. Using chart display of defect data makes complex information more intuitive and easy to understand, facilitating decision-making by management. Through the automated distribution mechanism, it ensures that the reports can be delivered to relevant personnel in a timely manner, improving communication efficiency.
[0277] Generally speaking, in this implementation manner, through the above steps, not only can an alarm be immediately issued and the defect image be displayed when a defect is detected, but also a comprehensive statistical analysis of the defect types can be carried out to generate a detailed detection report.
[0278] The present invention also provides a textile surface defect detection system, including:
[0279] An image acquisition module for real-time acquisition of textile surface images;
[0280] A data preprocessing module for preprocessing a textile surface image to obtain multiple image regions containing textile surface defects, and allocating a target detection model to the image regions corresponding to the textile surface image according to the image features of the textile surface image;
[0281] A parallel inference module for parallelly processing the image regions through multiple target detection models to identify textile surface defects;
[0282] A display and warning module for performing an alarm after identifying textile surface defects, displaying the textile surface image with textile surface defects, and counting the defect types to generate a textile surface defect detection report.
[0283] Any effects of the textile surface defect detection method can be achieved, which will not be elaborated here.
[0284] What is not described in the present invention can be implemented by adopting or referring to the existing technology.
[0285] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized.
[0286] The above are only the embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and changes can be made to the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.
Claims
1. A method for detecting surface defects of textiles, characterized in that: According to the size of the textile surface defects, a plurality of defect clusters are divided, and a plurality of target detection models are trained accordingly; the method further comprises preprocessing the textile surface image to obtain a plurality of image regions containing the textile surface defects; assigning a target detection model to an image region corresponding to the textile surface image according to image features of the textile surface image; The image region is processed in parallel by a plurality of the target detection models to identify surface defects of the textile.
2. The textile surface defect detection method according to claim 1, characterized in that: The image region is processed in parallel by multiple target detection models, specifically: Running a plurality of the target detection models in parallel, processing a plurality of image regions of the textile surface images in parallel in a one-to-one correspondence; and / or, A plurality of the target detection models are run in parallel, and a plurality of image regions of the same textile surface image are processed in parallel.
3. The textile surface defect detection method according to claim 1, characterized in that: The textile surface image is preprocessed to obtain multiple image regions containing textile surface defects, specifically: Applying image enhancement technology to process the textile surface image to enhance the surface defect characteristics of the textile; According to the boundary of the textile surface defect, an image region containing the textile surface defect is obtained, wherein each of the image regions has one textile surface defect.
4. The textile surface defect detection method according to claim 3, characterized in that: The textile surface image is preprocessed to obtain a plurality of image regions containing textile surface defects, and also includes: determining a size of the image region; A scaling operation is performed on the image regions to adjust the plurality of image regions to the same size.
5. The textile surface defect detection method according to claim 1, characterized in that: Assigning an object detection model to the image area corresponding to the textile surface image is specifically: Obtaining a comprehensive size of the textile surface image according to a size of an image region corresponding to the textile surface image, and assigning a same object detection model to the image region corresponding to the textile surface image according to the comprehensive size of the textile surface image; or According to the size of the image area corresponding to the textile surface image, the object detection model is assigned to the image area in a one-to-one correspondence.
6. The textile surface defect detection method according to claim 1, characterized in that: The training method of the target detection model is specifically as follows: According to the plurality of different defect clusters, a standard data set is obtained in one-to-one correspondence; According to the standard data set, a target detection model is constructed using a deep learning framework combined with a target detection algorithm.
7. The textile surface defect detection method according to claim 6, characterized in that: According to the multiple different defect clusters, a standard data set is obtained in one-to-one correspondence, specifically: Collect image regions containing different textile surface defects, Dividing the image area into a plurality of defect clusters according to the size of the textile surface defects; The image region is annotated to obtain a corresponding standard data set, wherein the annotated content at least includes defect type information.
8. The textile surface defect detection method according to claim 1, characterized in that: The textile surface image is obtained by an industrial line scan camera in combination with a light source device. The industrial line scan camera is arranged on a textile production line to collect the surface image of the textile in real time.
9. The textile surface defect detection method according to claim 1, characterized in that: Also includes: When the surface defects of the textile are identified, an alarm is issued, and an image of the surface of the textile with the surface defects is displayed; Count defect types and generate textile surface defect detection reports.
10. A textile surface defect detection system, characterized in that: include: An image acquisition module, used for acquiring textile surface images in real time; A data preprocessing module, used for preprocessing the textile surface image to obtain a plurality of image regions containing textile surface defects, and assigning a target detection model to the image region corresponding to the textile surface image according to the image features of the textile surface image; A parallel reasoning module, used for processing the image region in parallel through a plurality of the target detection models to identify surface defects of the textile; The display and warning module is used to execute an alarm after identifying textile surface defects, and to display the textile surface image with textile surface defects, as well as to count the defect types and generate a textile surface defect detection report.
Citation Information
Cited By
Flexible textile quality inspection system and device based on deep learning
CN121074577A
Multi-model fusion winding coating on-line defect detection method and system and medium
CN121937365A