Fabric defect automatic identification method and device based on invisible light detection
By applying an automatic recognition method based on invisible light in fabric detection, combined with deep learning and feature extraction technology, the problems of traditional manual detection are solved, and the automation, accurate identification and rapid feedback of fabric defects are achieved, and production efficiency and quality control are improved.
Patent Information
- Application Number
- CN202411857244.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-11
AI Technical Summary
Traditional curtain light leakage detection relies on manual judgment of the naked eye, which has problems such as damage to workers' eyes, low productivity, and inability to monitor workers' working status and quality in real time.
The automatic identification method of fabric defects based on invisible light detection is adopted. The invisible light information transmitted on the back of the fabric is collected through industrial cameras, combined with deep learning algorithms and feature extraction technology, automatically identify and classify defect information, and feedback the recognition results to the upper computer system to trigger an alarm or marking action.
It realizes the automation and accurate identification of fabric defects, reduces manual intervention, improves detection efficiency, and can quickly process a large amount of fabric image data in large-scale production scenarios, and promptly feedback defect information to ensure the efficient operation of the production process.
Smart Images

Figure CN119810519A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of detection, and in particular to a method and a device for automatically identifying fabric defects based on invisible light detection. Background Art
[0002] Traditional curtain fabric light leakage detection needs to be carried out in a completely darkroom environment and relies on manual visual judgment, which is not only harmful to the workers' eyes, but also affects their mental state. At the same time, the high-speed movement of the fabric often causes light spots that cannot be missed or relatively small light-transmitting spots, and managers cannot understand the workers' work status and quality in real time. Summary of the invention
[0003] The purpose of the present invention is to address the above-mentioned problems in the existing technology and to propose a method and device for automatically identifying fabric defects based on invisible light detection, which has the characteristics of being able to automatically and accurately find light-transmitting points.
[0004] The purpose of the present invention can be achieved by the following technical solutions:
[0005] A method for automatically identifying fabric defects based on invisible light detection, comprising:
[0006] Obtain an image of the back of the fabric after being illuminated by an invisible light source; the image is an image of invisible light information transmitted through light leakage points on the front of the fabric collected by an industrial camera, wherein if there is no light leakage point, the image is displayed as completely black;
[0007] Preprocessing the image, wherein the preprocessing includes grayscale conversion, Gaussian blur and threshold segmentation to reduce noise and highlight features of the light leakage area;
[0008] Use feature extraction technology to identify specific features in the image, thereby distinguishing light leakage points;
[0009] Perform image recognition based on deep learning algorithm models, classify and identify light leakage points, and identify defect information;
[0010] The identified defect information is fed back to the host computer system, and a determination is made based on the preset threshold whether to trigger an alarm or marking action.
[0011] In the above-mentioned method for automatic identification of fabric defects based on invisible light detection, the image preprocessing includes the following steps:
[0012] Convert the acquired image into grayscale and standardize the image brightness;
[0013] Gaussian blur technology is used to smooth the image and reduce the interference of noise on subsequent processing;
[0014] The image is processed using multi-level threshold segmentation technology to convert the image into a multi-level grayscale image, so that the light leakage area can be clearly identified.
[0015] In the above-mentioned method for automatic identification of fabric defects based on invisible light detection, the deep learning model is based on a convolutional neural network (CNN), which automatically extracts local features of the image through a combination of multi-layer convolution, pooling and fully connected layers, and then classifies and identifies light leakage points;
[0016] For the deep learning model training, data enhancement technology is used in the model training process, including but not limited to mirroring, rotation, and translation operations to increase the diversity of training data;
[0017] The training process of the deep learning model adopts L2 regularization and Dropout technology to reduce overfitting, and uses Focal Loss loss function to deal with category imbalance.
[0018] In the above-mentioned automatic fabric defect identification method based on invisible light detection, the sliding window method is used to process the light leakage point defect area. Through the redundant sliding image window, each window image is input into the deep learning model for defect identification and accurate positioning of the light leakage point.
[0019] In the above-mentioned automatic identification method of fabric defects based on invisible light detection, the classification and identification of light leakage points include but are not limited to the following types: pinhole light leakage, starry sky light leakage, thread light leakage, edge light leakage, and seam light leakage.
[0020] In the above-mentioned fabric defect automatic identification method based on invisible light detection, the identification defect information is fed back to the host computer system, and whether to trigger an alarm or a marking action is determined according to a preset threshold, including:
[0021] Acquire defect information identified during fabric detection, wherein the defect information includes one or more of a grayscale difference threshold, a defect area threshold, a defect type specific threshold, and a defect brightness information threshold;
[0022] Transmit the identified defect information to the host computer system through the communication interface or network;
[0023] Set a preset threshold in the host computer system, compare the defect information with the preset threshold to determine whether an alarm or marking action needs to be triggered;
[0024] If the defect information meets the preset alarm conditions, the alarm is triggered. When the defect information results meet the alarm conditions, the alarm mechanism is triggered and the marking action is performed to mark the location or sample where the defect occurs;
[0025] If the defect information result does not meet the preset alarm conditions, the alarm triggering action is skipped.
[0026] In the above-mentioned method for automatic identification of fabric defects based on invisible light detection, the host computer system triggers an alarm when a light leakage defect is detected, which is to trigger an audible and visual alarm system.
[0027] In the above-mentioned automatic fabric defect identification method based on invisible light detection, the host computer system uses the automatic marking module to complete the marking action at the appropriate position according to the set delay time when the light leakage defect is detected.
[0028] An automatic fabric defect detection system based on invisible light source, comprising:
[0029] An acquisition module is used to acquire an image of the back of the fabric after being illuminated by an invisible light source. The image is an image of invisible light information transmitted through light leakage points on the front of the fabric collected by an industrial camera. If there is no light leakage point, the image is displayed as completely black.
[0030] An image preprocessing module, used to preprocess the image, wherein the preprocessing includes grayscale conversion, Gaussian blur and threshold segmentation to reduce noise and highlight the features of the light leakage area;
[0031] A feature extraction module is used to identify specific features in the image using feature extraction technology, thereby distinguishing light leakage points;
[0032] Image recognition module, used to perform image recognition based on a deep learning algorithm model, classify and identify light leakage points, and identify defect information;
[0033] The result feedback module is used to feed back the identified defect information to the host computer system and determine whether to trigger an alarm or marking action based on the threshold.
[0034] Compared with the prior art, this application has the following advantages:
[0035] With the help of deep learning algorithm models, image recognition and automatic judgment based on preset thresholds on whether to trigger alarms or marking actions can be realized. The entire detection process does not require a large amount of manual participation, and can realize automated and batch detection of fabrics, greatly improving the detection efficiency. It is especially suitable for large-scale fabric production scenarios and can process a large amount of fabric image data in a short time. By promptly feeding back the detected defect information to the host computer system, the host computer system can respond quickly according to preset rules, quickly trigger an alarm to prompt the staff or directly control the marking equipment to mark the defective fabrics, so that the problematic fabrics can be screened out in time, avoiding delays in subsequent production links and ensuring the efficient operation of the entire production process. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1is a flow chart of a method for automatic identification of fabric defects in the present application;
[0037] Figure 2 It is a system block diagram of a method for automatically identifying fabric defects in this application. DETAILED DESCRIPTION
[0038] The following is combined with Figure 1-Figure 2 The present application is further described with specific embodiments:
[0039] First of all, it should be noted that in the description of this application, if the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and other directional words appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, which is only for the convenience of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application; in addition, if the terms "first", "second", "third" and other numerical quantifiers appear, they are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in this application, unless otherwise clearly specified and limited, if the terms "installed", "connected", and "connected" appear, they should be understood in a broad sense, for example, it can be a fixed connection, or a detachable connection, a limited connection such as an interference fit, a transition fit, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium; therefore, for ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to the specific circumstances.
[0040] like Figure 1 As shown, a method for automatically identifying fabric defects based on invisible light detection includes:
[0041] S100, obtaining an image of the back side of the fabric after being illuminated by an invisible light source; the image is an image of invisible light information transmitted through a light leakage point on the front side of the fabric collected by an industrial camera, wherein if there is no light leakage point, the image is displayed as completely black;
[0042] In the present application, the fabric tested is a completely light-proof fabric, and light can only pass through at the light leakage point.
[0043] Build a darkroom to prevent external light from interfering with the invisible light imaging effect. The inner walls of the darkroom are covered with light-absorbing materials, such as black velvet, to reduce light reflection. Select an ultraviolet (UV) light source or an infrared (IR) light source and set it at the bottom of the darkroom. Adjust its angle and irradiation range so that it can evenly irradiate the back of the fabric. Equip it with an industrial camera that is sensitive to the selected invisible light wavelength. Install the industrial camera just above the front of the fabric and connect it to the computer via a data cable. The light leakage points on the fabric will cause the invisible light to be transmitted and captured by the industrial camera on the front. If there is no light leakage point on the fabric, the image collected by the camera will appear completely black.
[0044] S200, preprocessing the image, wherein the preprocessing includes grayscale conversion, Gaussian blur and threshold segmentation to reduce noise and highlight features of the light leakage area;
[0045] The original collected fabric images may contain various noise interferences, such as subtle light reflection clutter in a darkroom environment. After grayscale conversion, the image data form is simplified; Gaussian blur further smoothes the image and removes the tiny spots and messy pixels caused by these noises; finally, threshold segmentation allows the light leakage area to form a sharp contrast with other background areas, highlighting its features more clearly, which is convenient for further quantitative analysis of the light leakage on the fabric and subsequent work such as quality judgment;
[0046] S300, using feature extraction technology to identify specific features in the image, thereby distinguishing light leakage points, wherein the specific features include but are not limited to texture, cloth edge, and seam head;
[0047] We can formulate rules to distinguish light leakage points based on the extracted features such as fabric edge, texture, cloth edge, and seam. For example, first, based on the fabric main body range determined by edge detection, exclude the area outside the image edge; then refer to the texture features, compare the texture difference between the normal texture area and the suspected light leakage area, and mark the area with obviously different texture and within the fabric main body as a potential light leakage area; then, based on the cloth edge and seam position found by Hough linear transformation, further exclude the normal brighter parts in the area covered by these straight lines, such as the reflection of the cloth edge, which may be misidentified, and finally determine the area where the real light leakage point is located, and evaluate the quality of the fabric by calculating the number and area of the light leakage points. The texture features of the fabric image can be extracted through the gray level co-occurrence matrix (GLCM). Different fabrics have different texture rules. The normal texture area and the area where the light leakage point is located often have differences in texture features. For example, the contrast feature is extracted here, which reflects the drastic degree of grayscale change in the local area of the image. The grayscale change at the light leakage point is usually different from that in the normal texture area. We can further distinguish the light leakage points based on these feature differences.
[0048] S400, perform image recognition based on deep learning algorithm model, classify and identify light leakage points, and identify defect information;
[0049] First, a large number of images of fabrics in different states are collected. Some of these images have various types of light leakage points, such as pinhole light leakage, starry light leakage, thread light leakage, edge light leakage, seam light leakage, etc., while others are normal and flawless fabric images.
[0050] Use image annotation tools to annotate the light leakage area in each image, annotate its specific category and location, save the annotation information in a suitable format, and divide the collected and annotated image data set into training set, validation set and test set according to a certain ratio, such as 70%, 20%, and 10%. Assuming there are 1,000 images in total, 700 of them are used as training sets to train the model, 200 are used as validation sets to evaluate the performance of the model and adjust parameters during the training process, and the remaining 100 are used as test sets to finally test the generalization ability and actual effect of the model. In order to increase diversity, data enhancement technology is used in the model training process, including but not limited to mirroring, rotation, and translation operations to increase the diversity of training data; the training process of the deep learning model uses L2 regularization and Dropout technology to reduce overfitting, and uses Focal Loss loss function to deal with category imbalance.
[0051] Model evaluation and iteration: After model training is completed, the model needs to be evaluated to ensure its accuracy and robustness. The performance of the model can be evaluated by calculating the performance indicators of the model on the validation set, such as accuracy, recall, and F1 score. Based on the evaluation results, the model can be iteratively optimized.
[0052] The deep learning model is based on a convolutional neural network (CNN), which automatically extracts local features of the image through a combination of multi-layer convolution, pooling and fully connected layers, and then classifies and identifies light leakage points; for the training of the deep learning model,
[0053] S500, feeding back the identified defect information to the host computer system, and judging whether to trigger an alarm or a marking action according to a preset threshold.
[0054] Acquire defect information identified during fabric detection, wherein the defect information includes one or more of a grayscale difference threshold, a defect area threshold, a defect type specific threshold, and a defect brightness information threshold;
[0055] Transmit the identified defect information to the host computer system through the communication interface or network;
[0056] Set a preset threshold in the host computer system, compare the defect information with the preset threshold to determine whether an alarm or marking action needs to be triggered;
[0057] If the defect information meets the preset alarm conditions, the alarm is triggered. When the defect information results meet the alarm conditions, the alarm mechanism is triggered and the marking action is performed to mark the location or sample where the defect occurs;
[0058] If the defect information result does not meet the preset alarm conditions, the alarm triggering action is skipped.
[0059] Based on the deep learning algorithm model, the classification and identification of light leakage points in the fabric image have been completed, and the corresponding defect information has been obtained, which is sent to the host computer system.
[0060] In the code of this host computer system, wait for the image recognition system to send defect information. After receiving the information, parse the light leakage type and the area of the light leakage area, and then compare it with the preset threshold. If the trigger condition is met, the alarm action is triggered. The host computer system triggers the alarm when the light leakage defect is detected to trigger the sound and light alarm system. And the marking action will also be triggered for the defect type. Here it is just a simulation of sending a signal to the marking device. In fact, it needs to be developed and connected according to the communication protocol and interface of the specific marking device. The host computer system uses the automatic marking module to complete the marking action at the appropriate position according to the set delay time when the light leakage defect is detected.
[0061] Furthermore, the image preprocessing comprises the following steps:
[0062] Convert the acquired image into grayscale and standardize the image brightness;
[0063] Gaussian blur technology is used to smooth the image and reduce the interference of noise on subsequent processing;
[0064] The image is processed using multi-level threshold segmentation technology to convert the image into a multi-level grayscale image, so that the light leakage area can be clearly identified.
[0065] Furthermore, the sliding window method is used to process the light leakage point defect area. Through the redundant sliding image window, each window image is input into the deep learning model for defect recognition and precise positioning of the light leakage point.
[0066] The sliding window method is a strategy commonly used in the field of image processing for tasks such as target detection and defect recognition. Its core idea is to use a fixed-size or variable-size window, but usually a fixed-size window, to slide on the original image in a certain step size, so that every area of the image can be covered by the window, and then extract the image part in the window and input it into the subsequent classification network for corresponding analysis and processing. Through redundant sliding, that is, allowing overlapping parts between windows to slide, it can ensure that each position and detail in the image has the opportunity to be included in the window, minimizing the possibility of missing key defect areas, and inputting each extracted window image into the pre-trained classification network in turn. The classification network will judge whether there is a defect in the window image and the type of defect based on its own learned feature patterns. When a window image is judged by the deep learning model as having a light leakage defect, since the position of the window on the image is clearly known, by recording the coordinate position of the window when sliding, such as the coordinate of the upper left corner of the window in the original image, the approximate area where the light leakage point is located can be determined based on the position of the window in the original image, thereby locating the light leakage point.
[0067] This sliding window combined with a deep learning model method can effectively improve the accuracy of light leakage point detection and positioning by carefully traversing each area of the fabric image and using the model to accurately judge and determine the location of the light leakage point based on the window position.
[0068] Furthermore, the classification and identification of light leakage points includes but is not limited to the following types: pinhole light leakage, starry sky light leakage, line light leakage, edge light leakage, and seam light leakage.
[0069] like Figure 2 As shown, a fabric defect automatic detection system based on invisible light source comprises:
[0070] The acquisition module 10 is used to acquire an image of the back of the fabric after being illuminated by an invisible light source. The image is an image of invisible light information transmitted through a light leakage point on the front of the fabric collected by an industrial camera. If there is no light leakage point, the image is displayed as completely black.
[0071] An image preprocessing module 20, used to preprocess the image, wherein the preprocessing includes grayscale conversion, Gaussian blurring and threshold segmentation to reduce noise and highlight features of light leakage areas;
[0072] A feature extraction module 30 is used to identify specific features in the image using feature extraction technology, thereby distinguishing light leakage points;
[0073] An image recognition module 40 is used to perform image recognition based on a deep learning algorithm model, classify and identify light leakage points, and identify defect information;
[0074] The result feedback module 50 is used to feed back the identified defect information to the upper computer system and determine whether to trigger an alarm or a marking action based on a threshold.
[0075] Furthermore, the image preprocessing comprises the following steps:
[0076] Convert the acquired image into grayscale and standardize the image brightness;
[0077] Gaussian blur technology is used to smooth the image and reduce the interference of noise on subsequent processing;
[0078] The image is processed using multi-level threshold segmentation technology to convert the image into a multi-level grayscale image, so that the light leakage area can be clearly identified.
[0079] Furthermore, the deep learning model is based on a convolutional neural network (CNN), which automatically extracts local features of the image through a combination of multi-layer convolution, pooling and fully connected layers, and then classifies and identifies light leakage points;
[0080] For the deep learning model training, data enhancement technology is used in the model training process, including but not limited to mirroring, rotation, and translation operations to increase the diversity of training data;
[0081] The training process of the deep learning model adopts L2 regularization and Dropout technology to reduce overfitting, and uses Focal Loss loss function to deal with category imbalance.
[0082] Furthermore, the sliding window method is used to process the light leakage point defect area. Through the redundant sliding image window, each window image is input into the deep learning model for defect recognition and precise location of the light leakage point.
[0083] Furthermore, the classification and identification of light leakage points include but are not limited to the following types: pinhole light leakage, starry sky light leakage, line light leakage, edge light leakage, and seam light leakage.
[0084] Furthermore, the defect information is fed back to the host computer system, and a preset threshold is used to determine whether to trigger an alarm or a marking action, including:
[0085] Acquire defect information identified during fabric detection, wherein the defect information includes one or more of a grayscale difference threshold, a defect area threshold, a defect type specific threshold, and a defect brightness information threshold;
[0086] Transmit the identified defect information to the host computer system through the communication interface or network;
[0087] Set a preset threshold in the host computer system, compare the defect information with the preset threshold to determine whether an alarm or marking action needs to be triggered;
[0088] If the defect information meets the preset alarm conditions, the alarm is triggered. When the defect information results meet the alarm conditions, the alarm mechanism is triggered and the marking action is performed to mark the location or sample where the defect occurs;
[0089] If the defect information result does not meet the preset alarm conditions, the alarm triggering action is skipped.
[0090] Furthermore, the host computer system triggers an alarm when a light leakage defect is detected, which is to trigger an audible and visual alarm system.
[0091] Furthermore, the host computer system uses the automatic marking module to complete the marking action at a suitable position according to the set delay time when a light leakage defect is detected.
[0092] It should be noted that the above embodiments are only used to illustrate the present application and are not intended to limit the technical solutions described in the present application. Although the present application has been described in detail in this specification with reference to the above embodiments, a person of ordinary skill in the art should understand that a person of ordinary skill in the art can still modify or make equivalent substitutions to the present application, and all technical solutions and improvements thereof that do not depart from the spirit and scope of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for automatically identifying fabric defects based on invisible light detection, characterized in that: include: Obtain an image of the back of the fabric after being illuminated by an invisible light source; the image is an image of invisible light information transmitted through light leakage points on the front of the fabric collected by an industrial camera, wherein if there is no light leakage point, the image is displayed as completely black; Preprocessing the image, wherein the preprocessing includes grayscale conversion, Gaussian blur and threshold segmentation to reduce noise and highlight features of the light leakage area; Use feature extraction technology to identify specific features in the image, thereby distinguishing light leakage points; Perform image recognition based on deep learning algorithm models, classify and identify light leakage points, and identify defect information; The identified defect information is fed back to the host computer system, and a determination is made based on the preset threshold whether to trigger an alarm or marking action.
2. The method for automatic identification of fabric defects based on invisible light detection according to claim 1 is characterized in that: The image preprocessing comprises the following steps: Convert the acquired image into grayscale and standardize the image brightness; Gaussian blur technology is used to smooth the image and reduce the interference of noise on subsequent processing; The image is processed using multi-level threshold segmentation technology to convert the image into a multi-level grayscale image, so that the light leakage area can be clearly identified.
3. The method for automatic identification of fabric defects based on invisible light detection according to claim 2 is characterized in that: The deep learning model is based on a convolutional neural network (CNN), which automatically extracts local features of the image through a combination of multi-layer convolution, pooling and fully connected layers, and then classifies and identifies light leakage points; For the deep learning model training, data enhancement technology is used in the model training process, including but not limited to mirroring, rotation, and translation operations to increase the diversity of training data; The training process of the deep learning model adopts L2 regularization and Dropout technology to reduce overfitting, and uses FocalLoss loss function to deal with category imbalance.
4. The method for automatic identification of fabric defects based on invisible light detection according to claim 3 is characterized in that: The sliding window method is used to process the light leakage point defect area. Through the redundant sliding image window, each window image is input into the deep learning model for defect recognition and precise positioning of the light leakage point.
5. The method for automatic identification of fabric defects based on invisible light detection according to claim 4 is characterized in that: The classification and identification of light leakage points include but are not limited to the following types: pinhole light leakage, starry sky light leakage, line light leakage, edge light leakage, and seam light leakage.
6. The method for automatic identification of fabric defects based on invisible light detection according to claim 5 is characterized in that: Feedback the identified defect information to the host computer system, and determine whether to trigger an alarm or marking action based on the preset threshold, including: Acquire defect information identified during fabric detection, wherein the defect information includes one or more of a grayscale difference threshold, a defect area threshold, a defect type specific threshold, and a defect brightness information threshold; Transmit the identified defect information to the host computer system through the communication interface or network; Set a preset threshold in the host computer system, compare the defect information with the preset threshold to determine whether an alarm or marking action needs to be triggered; If the defect information meets the preset alarm conditions, the alarm is triggered. When the defect information results meet the alarm conditions, the alarm mechanism is triggered and the marking action is performed to mark the location or sample where the defect occurs; If the defect information result does not meet the preset alarm conditions, the alarm triggering action is skipped.
7. The method for automatic identification of fabric defects based on invisible light detection according to claim 6 is characterized in that: The host computer system triggers an alarm when a light leakage defect is detected, which is to trigger an audible and visual alarm system.
8. The method for automatic identification of fabric defects based on invisible light detection according to claim 7 is characterized in that: The host computer system uses the automatic marking module to complete the marking action at a suitable position according to the set delay time when a light leakage defect is detected.
9. An automatic fabric defect detection system based on invisible light source, characterized in that: include: An acquisition module is used to acquire an image of the back of the fabric after being illuminated by an invisible light source. The image is an image of invisible light information transmitted through light leakage points on the front of the fabric collected by an industrial camera. If there is no light leakage point, the image is displayed as completely black. An image preprocessing module, used to preprocess the image, wherein the preprocessing includes grayscale conversion, Gaussian blur and threshold segmentation to reduce noise and highlight the features of the light leakage area; A feature extraction module is used to identify specific features in the image using feature extraction technology, thereby distinguishing light leakage points; Image recognition module, used to perform image recognition based on a deep learning algorithm model, classify and identify light leakage points, and identify defect information; The result feedback module is used to feed back the identified defect information to the host computer system and determine whether to trigger an alarm or marking action based on the threshold.