Fabric warp and weft density detection method and system based on image recognition
Through a high-resolution camera and a deep-dense fabric intelligent detection model to collect and process fabric images under a uniform light source, combined with a constant temperature platform, the problem of insufficient accuracy in detection of high-dense dark fabrics is solved, and efficient and reliable detection of flange density is achieved.
Patent Information
- Application Number
- CN202411134771.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In the prior art, in the detection of fabric warp and weft density, especially in high-density and dark-colored fabrics, there is a problem of insufficient identification accuracy, and it is easy to cause inconsistent detection results due to fabric wrinkles and special textures.
A high-resolution camera is used to collect fabric images under a uniform light source, and pre-process and defect detection are performed through a deep-dense fabric intelligent detection model. Combined with self-supervised learning and multi-task learning head layer, features are extracted and graft density is calculated, and a constant temperature heating platform is used. Make sure the fabric is flat.
It improves the accuracy and efficiency of the weft density detection of high-density dark fabrics, reduces external operation errors, enhances the comprehensiveness and reliability of inspection, and ensures accurate evaluation of fabric quality.
Smart Images

Figure CN119130924A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method and system for detecting warp and weft density of fabrics based on image recognition. Background Art
[0002] The warp and weft density of fabric refers to the number of warp and weft yarns in a unit length of fabric, also known as warp density and weft density. Specifically, the warp density refers to the number of warp yarns in a unit length along the warp direction, and the weft density refers to the number of weft yarns in a unit length along the weft direction in the fabric. The warp and weft density of fabric is one of the important indicators for measuring fabric quality. The accurate detection of warp and weft density is of great significance for product quality control and consumer purchase. Using a density microscope to read the warp and weft density is a traditional detection method. This method is easier for fabrics such as low-density light-colored low-count fabrics. However, when encountering high-density dark-colored high-count fabrics, the detection difficulty increases. At the same time, the fabric is prone to wrinkling, resulting in inaccurate test results. In addition, the fiber-background contrast of dark fabrics is low, making it difficult to accurately distinguish the warp and weft yarns. In practice, the fabric is often lifted under a light source, and then a density microscope is placed on the fabric to observe and count the warp and weft yarns through the light source. However, this method is cumbersome to operate and the reading is also easily affected by subjective factors, resulting in inconsistent and inaccurate test results, which is difficult to meet the needs of modern warp and weft density detection.
[0003] In existing research, a Chinese patent with application number CN202311549683.1 proposed a fabric warp and weft density detection method and system based on image recognition and AI algorithm. First, high-resolution and high-speed scanner parameters are configured, and fabric image data is collected under uniform illumination to ensure that the fabric is flat and wrinkle-free when scanned. Then the collected image data is preprocessed, and the warp and weft lines of the fabric are segmented using adaptive threshold technology. After that, key features are extracted and a fabric warp and weft density detection model based on a convolutional neural network is constructed. The model is trained using a large number of annotated fabric sample images until a preset accuracy threshold is reached. Although this method improves the accuracy and efficiency of fabric warp and weft density detection, it is difficult to meet the detection needs of non-standard fabrics. The Chinese patent application number CN202310128716.9 proposes a method for automatically measuring the density of printed woven fabrics. First, the collected fabric sample image is grayed, denoised and brightness balanced; then the Hough line detection is used to correct the warp and weft directions of the image; the maximum inter-class variance method is used to process the image into a binary image and segment the printed pattern area; after marking the printed area, the printed texture is filtered out by the method of iterative completion of the surrounding information to restore the fabric texture; then the image is converted to the frequency domain, the Morlet wavelet transform is used to locate the yarn position and perform density statistics and measurement, and the optimization is performed by calculating the optimal wavelet scale; finally, according to the physical length of the image and the number of yarn roots obtained by decomposition, the number of yarns within 100 mm is calculated, and the warp and weft density of the woven fabric are obtained, thereby realizing the automatic measurement of the density of the printed woven fabric. However, the accuracy of the result depends on the quality of the input image. If the image quality is poor, the accuracy of the density measurement may be affected. The Chinese patent application number CN201910011360.4 proposes an intelligent detection device and method for the warp and weft density of fabrics. The computer system is connected to the imaging system and the fabric conveying system respectively. The fabric conveying system is controlled to convey the fabric to be tested to the effective imaging area of the imaging system in a flat manner. The imaging system obtains the fabric image and generates a digital matrix of fabric nodes, and then extracts relevant elements according to the detection requirements to construct a weaving density detection line diagram. The imaging system includes a light source, a lens, and an image sensor. The fabric image is processed by filtering and grayscale projection, and the digital matrix of fabric nodes is generated by color clustering and edge intensity analysis. The computer system generates a virtual variable constant grating image, superimposes it with the weaving density detection line diagram to generate an interference fringe image, and determines the fabric weaving density by the peak position of the projected image, thereby intelligently detecting the warp and weft density of the fabric. However, in actual operation, especially for wrinkle-prone fabrics, it is difficult for the fabric conveying system to convey the fabric completely flat to the imaging area, which will affect the imaging quality and the accuracy of the detection results.
[0004] Although there are some methods for detecting the warp and weft density of fabrics based on image recognition, these methods still have the problem of insufficient recognition accuracy when facing the wrinkle-proneness and special texture of high-density fabrics. For example, the fine fiber structure and thin texture of high-density fabrics make them more prone to wrinkles, and these wrinkled areas will interfere with the accuracy of image recognition. In addition, the special texture and color of high-density fabrics also increase the difficulty of image recognition. These methods still have certain limitations in solving the problem of accuracy in detecting the warp and weft density of high-count and high-density fabrics.
[0005] Therefore, a method and system for detecting warp and weft density of fabrics based on image recognition is proposed. Summary of the invention
[0006] The object of the present invention is to provide a fabric warp and weft density detection method and system based on image recognition. First, a high-density dark fabric sample to be detected is obtained, fixed on a platform, and image acquisition is performed under a uniform light source using a high-resolution camera to obtain M high-density dark fabric images. Then, the M high-density dark fabric images are preprocessed, including brightness balance, super-resolution processing, denoising and color correction, to obtain a preprocessed fabric image. Then, the preprocessed image is input into a trained deep-density fabric intelligent detection model to obtain M defect detection results and M local warp and weft density calculation results. The state of the sample is determined by judging whether the specified conditions are met in these results: if the specified conditions are met, the sample is determined to be an abnormal sample, and an early warning is issued, the relevant information of the abnormal sample is recorded, an abnormal report is generated, and a review and accurate annotation are performed, and the reviewed and annotated samples are stored in a database. When the database accumulates a specified number of reviewed and annotated samples and / or it is detected that the model performance has dropped by more than a preset threshold, the reviewed and annotated samples are used to fine-tune the model. If the specified conditions are not met, the sample is judged as a normal sample. For a normal sample, the global warp and weft density is calculated based on its M local warp and weft density calculation results, which improves the accuracy of the overall warp and weft density detection of dark and high-density fabrics.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for detecting warp and weft density of fabric based on image recognition, comprising:
[0009] Obtain a high-density dark-colored fabric sample to be tested, and obtain a first sample to be tested;
[0010] Fixing the first sample to be tested flatly on the platform;
[0011] Using a high-resolution camera to collect images of the first sample to be inspected under a uniform light source, to obtain M high-density dark fabric images; M is the number of targets automatically photographed by the high-resolution camera;
[0012] Preprocessing the M high-density dark fabric images to obtain M preprocessed fabric images; inputting the M preprocessed fabric images into a trained dark fabric intelligent detection model to obtain M defect detection results and M local warp and weft density calculation results; the defect detection results are divided into defective and non-defective, and the local warp and weft density calculation results include the local warp density and local weft density of each high-density dark fabric image;
[0013] When at least one of the local longitude and latitude density calculation results is not within a preset range and / or at least one of the defect detection results is defective, the first sample to be tested is determined to be an abnormal sample; otherwise, the first sample to be tested is determined to be a normal sample;
[0014] Providing an early warning for the abnormal sample;
[0015] Calculate the global longitude and latitude density according to the M local longitude and latitude density calculation results of the normal sample;
[0016] The deep and dense fabric intelligent detection model is used for defect detection and warp and weft density detection of high-density dark fabrics. The structure of the deep and dense fabric intelligent detection model includes: an input layer, a pre-trained backbone network layer, a feature pyramid network layer, a multi-task learning head layer and an output layer.
[0017] Furthermore, the platform surface is smooth and flat and has a constant temperature heating function.
[0018] Furthermore, the platform is specifically:
[0019] The platform is made of high-strength aluminum alloy; a layer of silicone pad of specified thickness is laid on the surface of the platform;
[0020] The bottom of the platform is evenly covered with electric heating films as heating elements, and the electric heating films are installed at a specified interval;
[0021] The platform surface is embedded with a plurality of high-precision temperature sensors to monitor the temperature in real time and obtain a first real-time temperature;
[0022] The platform is connected to a PID temperature control system, and the PID temperature control system is used to achieve temperature control;
[0023] The temperature control process includes the following steps: setting a target temperature, the PID temperature control system adjusting the power output of the electric heating film according to the feedback signal of the high-precision temperature sensor to maintain the target temperature; using a thermal imager to comprehensively scan the surface of the platform, obtain a temperature distribution image, and analyze each pixel in the temperature distribution image to obtain a first temperature value of each pixel; calculating the temperature difference between the first temperature value of each pixel and the target temperature to generate a temperature difference distribution map; judging whether there is an area where the temperature difference exceeds a preset threshold value according to the temperature difference distribution map, and obtaining a temperature uniformity detection result; when there is an area where the temperature difference exceeds the preset threshold value, the temperature uniformity detection result is no; calculating the error between the first real-time temperature and the target temperature to obtain a first error set; if any one of the errors in the first error set is greater than a preset error threshold value and / or the temperature uniformity detection result is no, stopping the longitude and latitude density detection, issuing an early warning, and performing temperature adjustment.
[0024] Furthermore, using the high-resolution camera to collect images of the first sample to be inspected under a uniform light source is specifically as follows:
[0025] The high-resolution camera is mounted on a movable support and moved along the length and width of the first sample to be inspected to capture images of different areas;
[0026] Obtaining the size of the first sample to be tested to obtain a sample length and a sample width;
[0027] Acquire the field of view of the high-resolution camera to obtain the field of view length and field of view width;
[0028] Setting the overlap length and overlap width; wherein the overlap length represents the length of the overlap area between adjacent images in the vertical direction, and the overlap width represents the width of the overlap area between adjacent images in the horizontal direction;
[0029] Calculate the number of horizontal shots and the number of vertical shots using the following formula:
[0030]
[0031] Among them, N h Indicates the number of horizontal shots; N v Indicates the vertical shooting quantity; L s Represents the sample length; L v represents the length of the field of view; l W represents the overlap length; s represents the sample width; W v represents the width of the field of view; v represents the overlap width, Indicates rounding up;
[0032] Calculate the target quantity using the following formula:
[0033] M=N h ·N v ;
[0034] Wherein, M represents the number of targets;
[0035] Determine the moving step length and path of the high-resolution camera in the horizontal and vertical directions according to the number of horizontal shots and the number of vertical shots; program and control the movable bracket so that the high-resolution camera automatically shoots according to the preset moving step length and the path to obtain M high-density dark fabric images.
[0036] Furthermore, the M high-density dark fabric images are preprocessed as follows:
[0037] Use a multi-scale Retinex algorithm to perform brightness equalization on the high-density dark fabric image to obtain a first preprocessed image;
[0038] Performing super-resolution processing on the first pre-processed image by using the SRCNN model to obtain a second pre-processed image;
[0039] Applying a non-local means denoising algorithm to denoise the second preprocessed image to obtain a third preprocessed image;
[0040] The third preprocessed image is color corrected using the grayscale world hypothesis and white balance correction technology to obtain the preprocessed fabric image.
[0041] Furthermore, the deep and dense fabric intelligent detection model is specifically:
[0042] The input layer is used to receive the pre-processed fabric image;
[0043] The pre-trained backbone network layer includes a self-supervised learning pre-trained feature extraction layer and a pre-trained model feature extraction layer; the self-supervised learning pre-trained feature extraction layer uses SimCLR to perform pre-training on a specified amount of pre-collected data; the pre-trained model feature extraction layer uses a pre-trained DenseNet network structure and is fine-tuned on a pre-collected and annotated high-density dark fabric image dataset to further extract basic features;
[0044] The feature pyramid network layer extracts and fuses multi-level features through convolution kernels of different scales to capture details and global information of different scales in the image;
[0045] The multi-task learning head layer includes a defect detection head layer and a warp and weft density calculation head layer; the defect detection head layer includes an attention mechanism layer, a classification layer and a positioning layer; the attention mechanism layer uses a self-attention mechanism; the classification layer is used to classify the extracted features and identify different types of defects; the positioning layer is used to locate the extracted features and mark the specific location of the defects in the image; the warp and weft density calculation head layer includes a CNN feature extraction layer, an RNN sequence modeling layer and a warp and weft density calculation layer; the CNN feature extraction layer uses a convolutional neural network to extract the warp and weft yarn features in the image; the RNN sequence modeling layer uses a recurrent neural network to capture the sequence information of the yarn to analyze the arrangement and density of the yarn; the warp and weft density calculation layer is used to count the number of warp and weft yarns per unit length and calculate the warp and weft density of the image;
[0046] The output layer includes a defect detection output layer and a longitude and latitude density output layer.
[0047] Furthermore, in addition to issuing an early warning for the abnormal sample, subsequent processing also includes:
[0048] Record relevant information of the abnormal sample to obtain sample abnormality information including detection time, operation conditions and abnormality description;
[0049] generating a report including abnormal information of the sample;
[0050] Reviewing and accurately marking the abnormal samples to obtain reviewed and marked samples;
[0051] Storing the reviewed and marked samples in a database;
[0052] When the number of reviewed and annotated samples accumulated in the database reaches a specified number and / or it is detected that the performance of the deep and dense fabric intelligent detection model has dropped by more than a preset threshold, the deep and dense fabric intelligent detection model is fine-tuned using the reviewed and annotated samples in the database.
[0053] Further, the global longitude and latitude density is calculated according to the M local longitude and latitude density calculation results of the normal sample as follows:
[0054] The global warp and weft density includes the global warp density and the global weft density, and the calculation formula is:
[0055]
[0056] in, represents the global secret; represents the global longitude and latitude density; i represents the index of the calculation result of the local longitude and latitude density; represents the local longitude and latitude density in the i-th local longitude and latitude density calculation result; represents the local longitude and latitude density in the i-th local longitude and latitude density calculation result, and M represents the target number.
[0057] A fabric warp and weft density detection system based on image recognition, comprising:
[0058] The sample preparation module is used to obtain a high-density dark-colored fabric sample to be tested, and obtain a first sample to be tested; and flatly fix the first sample to be tested on a platform;
[0059] An image acquisition module, used to use a high-resolution camera to acquire images of the first sample to be inspected under a uniform light source to obtain M high-density dark fabric images; M is the number of targets automatically photographed by the high-resolution camera;
[0060] An image preprocessing module, used for preprocessing the M high-density dark fabric images to obtain M preprocessed fabric images;
[0061] An intelligent detection module is used to input the M pre-processed fabric images into the trained deep-dense fabric intelligent detection model to obtain M defect detection results and M local warp and weft density calculation results; M is the number of targets automatically photographed by the high-resolution camera; the defect detection results are divided into defective and non-defective, and the local warp and weft density calculation results include the local warp density and local weft density of each high-density dark fabric image;
[0062] an abnormality detection module, configured to determine that the first sample to be inspected is an abnormal sample when at least one of the local longitude and latitude density calculation results is not within a preset range and / or at least one of the defect detection results is defective; otherwise, determine that the first sample to be inspected is a normal sample;
[0063] An early warning module, used for issuing an early warning for the abnormal samples;
[0064] A global density calculation module, used for calculating the global longitude and latitude density according to the M local longitude and latitude density calculation results of the normal sample;
[0065] The deep and dense fabric intelligent detection model is used for defect detection and warp and weft density detection of high-density dark fabrics. The structure of the deep and dense fabric intelligent detection model includes: an input layer, a pre-trained backbone network layer, a feature pyramid network layer, a multi-task learning head layer and an output layer.
[0066] Furthermore, the platform surface is smooth and flat and has a constant temperature heating function.
[0067] Compared with the prior art, the present invention has the following beneficial effects:
[0068] 1. The present invention uses a high-resolution camera to collect images under a uniform light source, and realizes automated data collection through a movable bracket. By calculating the number of horizontal and vertical shots, it is ensured that all areas of the sample to be inspected are fully covered, avoiding missed shots and repeated shots, and ensuring the comprehensiveness and completeness of the detection. The overlapping length and width are set to reduce image stitching errors and improve detection accuracy. The high-resolution camera movement and shooting process are automatically controlled to significantly improve image acquisition efficiency and reduce external operation errors. The uniform light source ensures consistent illumination for each image, reduces the impact of illumination changes, and improves image recognition and analysis accuracy. The high-resolution camera captures subtle features of the fabric and provides high-quality image data for defect detection and warp and weft density calculation. The overall method has a high degree of automation and reduces external intervention. By accurately calculating the camera movement step length and path, the high accuracy and reliability of the collected image data are ensured, which helps to improve the accuracy of subsequent warp and weft density detection.
[0069] 2. The present invention proposes an intelligent detection model for dense fabrics, which is specifically designed for the detection needs of high-density dark fabrics. The self-supervised learning pre-training feature extraction layer uses SimCLR to perform pre-training on a specified amount of pre-collected data, combined with fine-tuning of the DenseNet structure on the labeled data, to extract high-quality features and improve the generalization and accuracy of the model. The feature pyramid network layer extracts and fuses multi-level features through multi-scale convolution kernels to enhance the ability to parse complex images. The multi-task learning head layer combines defect detection and warp and weft density calculation, uses the attention mechanism to increase the focus on key features, and accurately calculates the warp and weft density of high-density dark fabrics through a combination of CNN and RNN. The overall method has a high degree of automation, and eliminates samples with obvious defects and uneven distribution of warp and weft density, significantly improving the accuracy and reliability of detection, and improving the accuracy of warp and weft density detection of high-density dark fabrics.
[0070] 3. The method of calculating the global warp and weft density based on the local warp and weft density calculation results of normal samples in the present invention eliminates abnormal samples and only performs global warp and weft density calculation on normal samples, thereby ensuring that the data of the selected samples is more representative and can more accurately reflect the overall quality of the entire fabric. By integrating the warp and weft density data of multiple local areas, the global warp and weft density of the entire fabric sample can be accurately calculated to provide a comprehensive assessment of the fabric quality and avoid affecting the overall judgment due to abnormal single local data. The average processing method of multiple local data can smooth out some local accidental errors, making the global warp and weft density calculation results more accurate and reliable. It helps to improve the accuracy of warp and weft density detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 A flow chart of a fabric warp and weft density detection method based on image recognition provided by an embodiment of the present invention;
[0072] Figure 2 A schematic diagram of a high-density dark-colored fabric image provided by an embodiment of the present invention;
[0073] Figure 3 A structural diagram of a deep and dense fabric intelligent detection model provided by an embodiment of the present invention;
[0074] Figure 4 A schematic diagram of the training process of the intelligent detection model for dense fabrics provided in an embodiment of the present invention;
[0075] Figure 5 A structural diagram of a fabric warp and weft density detection system based on image recognition provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0076] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0077] Embodiment 1:
[0078] In fabric production, the warp and weft density of fabric is a key indicator. For example, a piece of fabric marked "100×80" means that there are 100 warp threads and 80 weft threads per unit length. The higher the warp and weft density, the better the airtightness and smoothness of the fabric are generally, but this may also result in a decrease in the softness of the fabric. Different types of fabrics, such as cotton, silk, wool, etc., also have different ideal warp and weft densities to suit their specific uses and needs. Factory A is a company specializing in the production of high-density dark fabrics. In the fabric factory inspection link, in order to ensure the quality of high-density dark fabrics, Factory A introduced a warp and weft density detection method based on image recognition, including:
[0079] See also Figure 1 In S10, a high-density dark-colored fabric sample to be tested is obtained to obtain a first sample to be tested;
[0080] As an embodiment of the present invention, a high-density black fabric sample to be tested is obtained. The standard density (roots / 10cm) of the high-density black fabric sample is 700 (±15)×500 (±15); the standard density refers to the density value specified by the warp and weft yarn manufacturers.
[0081] In this embodiment, the first sample to be tested is a high-density plain woven fabric.
[0082] See also Figure 1 In S20, the first sample to be tested is fixed flat on the platform;
[0083] Furthermore, the platform surface is smooth and flat and has a constant temperature heating function.
[0084] The smooth surface of the platform ensures that the fabric sample remains flat and wrinkle-free during the inspection process, thus avoiding image acquisition errors caused by surface unevenness. The constant temperature heating function can prevent the fabric from stretching and deforming due to temperature changes during the inspection process, further improving the inspection accuracy and stability. It helps to achieve higher quality fabric inspection.
[0085] The platform is made of high-strength aluminum alloy; a layer of silicone pad of specified thickness is laid on the surface of the platform; the bottom of the platform is evenly covered with electric heating film as a heating element, and the electric heating film is installed at a specified interval; a plurality of high-precision temperature sensors are embedded on the surface of the platform to monitor the temperature in real time and obtain a first real-time temperature; the platform is connected to a PID temperature control system, and the PID temperature control system is used to achieve temperature control;
[0086] The temperature control process includes the following steps: setting a target temperature, the PID temperature control system adjusting the power output of the electric heating film according to the feedback signal of the high-precision temperature sensor to maintain the target temperature; using a thermal imager to comprehensively scan the surface of the platform, obtain a temperature distribution image, and analyze each pixel in the temperature distribution image to obtain a first temperature value of each pixel; calculating the temperature difference between the first temperature value of each pixel and the target temperature to generate a temperature difference distribution map; judging whether there is an area where the temperature difference exceeds a preset threshold value according to the temperature difference distribution map, and obtaining a temperature uniformity detection result; when there is an area where the temperature difference exceeds the preset threshold value, the temperature uniformity detection result is no; calculating the error between the first real-time temperature and the target temperature to obtain a first error set; if any one of the errors in the first error set is greater than a preset error threshold value and / or the temperature uniformity detection result is no, stopping the longitude and latitude density detection, issuing an early warning, and performing temperature adjustment.
[0087] As an embodiment of the present invention, a 5 mm silicone pad is laid on the surface of the platform, and five high-precision temperature sensors are embedded on the surface of the platform, distributed at the four corners and the center of the platform. Before using the thermal imager, the platform needs to be preheated at the target temperature for a period of time (e.g., 30 minutes) to ensure that the temperature is stable.
[0088] By selecting high-strength aluminum alloy and silicone pad as the platform material, and using electric heating film for uniform heating, combined with embedded high-precision temperature sensors and PID temperature control systems, constant temperature control of the platform surface can be achieved. Thermal imagers and temperature distribution image analysis further ensure temperature uniformity. This design effectively ensures the stability and uniformity of the platform temperature during the detection process, avoids fabric expansion and contraction deformation and detection errors caused by uneven temperature, thereby greatly improving the accuracy and reliability of fabric warp and weft density detection. When it is detected that the temperature difference exceeds the preset threshold, the system can promptly warn and stop the detection, and adjust the temperature to ensure the continuity and accuracy of the entire detection process.
[0089] See also Figure 1 In S30, using a high-resolution camera to collect images of the first sample to be inspected under a uniform light source to obtain M high-density dark fabric images; M is the number of targets automatically photographed by the high-resolution camera;
[0090] In this embodiment, if Figure 2 As shown, a schematic diagram of a high-density dark fabric image is provided.
[0091] Furthermore, using the high-resolution camera to collect images of the first sample to be inspected under a uniform light source is specifically as follows:
[0092] The high-resolution camera is mounted on a movable support and moved along the length and width of the first sample to be inspected to capture images of different areas;
[0093] Obtaining the size of the first sample to be tested to obtain a sample length and a sample width;
[0094] Acquire the field of view of the high-resolution camera to obtain the field of view length and field of view width;
[0095] Setting the overlap length and overlap width; wherein the overlap length represents the length of the overlap area between adjacent images in the vertical direction, and the overlap width represents the width of the overlap area between adjacent images in the horizontal direction;
[0096] Calculate the number of horizontal shots and the number of vertical shots using the following formula:
[0097]
[0098] Among them, N h Indicates the number of horizontal shots; N v Indicates the vertical shooting quantity; L s Represents the sample length; L v represents the length of the field of view; l W represents the overlap length; s represents the sample width; Wv represents the width of the field of view; v represents the overlap width, Indicates rounding up;
[0099] Calculate the target quantity using the following formula:
[0100] M=N h ·N v ;
[0101] Wherein, M represents the number of targets;
[0102] Determine the moving step length and path of the high-resolution camera in the horizontal and vertical directions according to the number of horizontal shots and the number of vertical shots; program and control the movable bracket so that the high-resolution camera automatically shoots according to the preset moving step length and the path to obtain M high-density dark fabric images.
[0103] As an embodiment of the present invention, the following is an example calculation:
[0104] Fabric size of the first sample to be tested (specified size): 2 meters (width) x 3 meters (length);
[0105] Camera field of view: 0.5m (width) × 0.5m (length);
[0106] Overlap area: 10% (length and width are both 0.05 meters);
[0107]
[0108] T=N h ·N v =5×7=35;
[0109] Then the number of horizontal shots is 5, the number of vertical shots is 7, and M (number of targets) is 35.
[0110] See also Figure 1 In S40, preprocessing the M high-density dark fabric images to obtain M preprocessed fabric images; inputting the M preprocessed fabric images into a trained deep-density fabric intelligent detection model to obtain M defect detection results and M local warp and weft density calculation results; the defect detection results are divided into defective and non-defective, and the local warp and weft density calculation results include the local warp density and local weft density of each high-density dark fabric image;
[0111] When M is 35, the high-resolution camera is automatically photographed according to the preset moving step length and the path to obtain 35 high-density dark fabric images, and the 35 high-density dark fabric images are preprocessed to obtain 35 preprocessed fabric images; the 35 preprocessed fabric images are input into the trained deep-density fabric intelligent detection model to obtain 35 defect detection results and 35 local warp and weft density calculation results. That is, each preprocessed fabric image outputs a defect detection result and a local warp and weft density calculation result.
[0112] This image acquisition method lays the foundation for comprehensive and accurate inspection of high-density black fabric samples. The high-resolution camera is mounted on a movable bracket and moved along the length and width of the sample to ensure that every area is captured and avoid blind areas. The overlapping area is set to ensure the continuity and consistency of adjacent images and improve overall accuracy. Image acquisition is performed under a uniform light source to provide a consistent inspection environment to ensure image clarity and detail. By calculating the number of shots and the path, the camera's moving step length and path are programmed to achieve automated shooting and reduce external intervention and operational errors. Using parameters such as field of view size and overlapping area, the number of shots and camera movement path are accurately calculated. This method can quickly identify and locate defects and uneven density in fabrics, provide timely feedback to the production line, improve the accuracy and efficiency of product inspection, and effectively reduce the possibility of missed inspections.
[0113] Furthermore, the M high-density dark fabric images are preprocessed as follows:
[0114] Use a multi-scale Retinex algorithm to perform brightness equalization on the high-density dark fabric image to obtain a first preprocessed image;
[0115] Performing super-resolution processing on the first pre-processed image by using the SRCNN model to obtain a second pre-processed image;
[0116] Applying a non-local means denoising algorithm to denoise the second preprocessed image to obtain a third preprocessed image;
[0117] The third preprocessed image is color corrected using the grayscale world hypothesis and white balance correction technology to obtain the preprocessed fabric image.
[0118] This image preprocessing method uses a multi-scale Retinex algorithm for brightness equalization, effectively solving the problem of insufficient brightness of dark fabrics during image acquisition, and enhancing the contrast and detail of the image. The super-resolution processing of the SRCNN model further improves the resolution of the image, making the subtle defects and textures of high-density fabrics more clearly visible. The non-local mean denoising algorithm removes noise from the image, ensuring the image quality of high-density dark fabrics under low light conditions and improving the accuracy of the detection results. The grayscale world hypothesis and white balance correction technology perform color correction on the image, making the image color of high-density dark fabrics more realistic and consistent, and reducing the impact of lighting changes on the detection results. Combining these preprocessing steps not only improves the overall quality and stability of the image, but also significantly improves the accuracy and reliability of defect detection and warp and weft density calculation for high-density dark fabrics.
[0119] See also Figure 1 In S50, when at least one of the local longitude and latitude density calculation results is not within a preset range and / or at least one of the defect detection results is defective, determining that the first sample to be inspected is an abnormal sample; otherwise, determining that the first sample to be inspected is a normal sample;
[0120] Get 5 samples to be tested and execute them separately Figure 1 S20-S70 in the figure; specifically, the samples to be tested are 5 samples randomly selected from the same batch of high-density black fabrics, each of which has the same size, material and specification, and each sample to be tested is of a specified size; the preset range (roots / 10cm) is 700(±15)×500(±15). The target number M is 35.
[0121] Table 1. Classification and discrimination table of samples to be tested
[0122]
[0123] As shown in Table 1, local warp density (maximum value) indicates the maximum value among 35 local warp densities, and local warp density (minimum value) indicates the minimum value among 35 local warp densities; local weft density (maximum value) indicates the maximum value among 35 local weft densities, and local weft density (minimum value) indicates the minimum value among 35 local weft densities. The above four indicators can be obtained through the calculation results of 35 local warp and weft densities.
[0124] Furthermore, the deep and dense fabric intelligent detection model is specifically:
[0125] The input layer is used to receive the pre-processed fabric image;
[0126] The pre-trained backbone network layer includes a self-supervised learning pre-trained feature extraction layer and a pre-trained model feature extraction layer; the self-supervised learning pre-trained feature extraction layer uses SimCLR to perform pre-training on a specified amount of pre-collected data; the pre-trained model feature extraction layer adopts a pre-trained DenseNet network structure and is fine-tuned on a pre-collected and annotated high-density dark fabric image data set to further extract basic features; in this embodiment, the self-supervised learning pre-trained feature extraction layer uses SimCLR to perform pre-training on 10,000 pre-collected data.
[0127] The feature pyramid network layer extracts and fuses multi-level features through convolution kernels of different scales to capture details and global information of different scales in the image;
[0128] The multi-task learning head layer includes a defect detection head layer and a warp and weft density calculation head layer; the defect detection head layer includes an attention mechanism layer, a classification layer and a positioning layer; the attention mechanism layer uses a self-attention mechanism; the classification layer is used to classify the extracted features and identify different types of defects; the positioning layer is used to locate the extracted features and mark the specific location of the defects in the image; the warp and weft density calculation head layer includes a CNN feature extraction layer, an RNN sequence modeling layer and a warp and weft density calculation layer; the CNN feature extraction layer uses a convolutional neural network to extract the warp and weft yarn features in the image; the RNN sequence modeling layer uses a recurrent neural network to capture the sequence information of the yarn to analyze the arrangement and density of the yarn; the warp and weft density calculation layer is used to count the number of warp and weft yarns per unit length and calculate the warp and weft density of the image;
[0129] The output layer includes a defect detection output layer and a longitude and latitude density output layer.
[0130] First, the input layer receives the pre-processed fabric image. The SimCLR of the pre-trained feature extraction layer and the DenseNet network structure of the pre-trained model feature extraction layer are used for self-supervised learning to learn and extract high-quality features from the high-density dark fabric data, ensuring that the model has a strong feature representation capability. The feature pyramid network layer extracts and fuses multi-level features through convolution kernels of different scales, which can capture details and global information of different scales in the image, and improve the recognition ability of complex fabric images. The multi-task learning head layer combines defect detection and warp and weft density calculation, which significantly improves the comprehensiveness and accuracy of detection. The defect detection head layer can accurately identify and locate different types of defects through the attention mechanism, classification and positioning layer. The warp and weft density calculation head layer uses a combination of CNN and RNN to efficiently capture yarn features and sequence information and accurately calculate the warp and weft density. The attention mechanism layer in the defect detection head layer enhances the ability to focus on details and key features, so that the model can better identify subtle defects when processing complex images of high-density dark fabrics. The RNN sequence modeling layer in the warp and weft density calculation head layer effectively captures the arrangement and density information of the yarn, ensuring the accuracy and reliability of the warp and weft density calculation. The output layer includes the defect detection output layer and the warp and weft density output layer, which can provide defect detection results and warp and weft density calculation results. Combining the above advantages, this intelligent detection model not only significantly improves the accuracy and efficiency of defect detection and warp and weft density calculation when processing high-density dark fabrics, but also greatly reduces the possibility of missed detection and false detection, and improves the automation level and reliability of fabric quality control.
[0131] See also Figure 1 S60 in which an early warning is issued for the abnormal sample;
[0132] Furthermore, in addition to issuing an early warning for the abnormal sample, subsequent processing also includes:
[0133] Record relevant information of the abnormal sample to obtain sample abnormality information including detection time, operating conditions and abnormal description; generate a report containing the sample abnormality information; review and accurately mark the abnormal sample to obtain reviewed and marked samples; store the reviewed and marked samples in a database; when the reviewed and marked samples accumulated in the database reach a specified number and / or it is detected that the performance of the deep and dense fabric intelligent detection model has dropped by more than a preset threshold, use the reviewed and marked samples in the database to fine-tune the deep and dense fabric intelligent detection model.
[0134] By issuing early warnings and recording abnormal samples, recording in detail information such as the detection time, operating conditions, and abnormal descriptions, and generating reports containing this information, complete tracking and traceability is provided for quality control. Abnormal samples are reviewed and accurately labeled, and the reviewed and labeled samples are stored in the database to ensure data integrity and traceability. When the number of reviewed and labeled samples in the database reaches the specified number or a degradation in model performance is detected, these samples are used to fine-tune the model to maintain the model's efficiency and accuracy. Combining these subsequent processing steps, the self-optimization ability of the detection model is enhanced, ensuring stability and reliability in long-term operation, effectively reducing the possibility of missed detection and false detection, and improving the overall efficiency and accuracy of fabric longitude and latitude detection.
[0135] See also Figure 1 S70, calculating the global longitude and latitude density according to the M local longitude and latitude density calculation results of the normal sample;
[0136] Further, the global longitude and latitude density is calculated according to the M local longitude and latitude density calculation results of the normal sample as follows:
[0137] The global warp and weft density includes the global warp density and the global weft density, and the calculation formula is:
[0138]
[0139] in, represents the global secret; represents the global longitude and latitude density; i represents the index of the calculation result of the local longitude and latitude density; represents the local longitude and latitude density in the i-th local longitude and latitude density calculation result; represents the local longitude and latitude density in the i-th local longitude and latitude density calculation result, and M represents the target number.
[0140] This calculation method can obtain the global warp and weft density of a piece of fabric by averaging the local warp and weft density of normal samples, providing accurate basic data for overall quality assessment. The measurement error of individual local areas may affect the density calculation of a single sample. By averaging multiple test areas, the impact of these errors on the overall result can be effectively reduced, improving the accuracy of the calculation. This calculation method not only improves the comprehensiveness and accuracy of the warp and weft density detection method, but also enhances the reliability and stability of fabric quality assessment.
[0141] The deep and dense fabric intelligent detection model is used to detect defects and warp and weft density of high-density dark fabrics. The structure of the deep and dense fabric intelligent detection model is as follows: Figure 3 As shown, it includes: input layer, pre-trained backbone network layer, feature pyramid network layer, multi-task learning head layer and output layer.
[0142] As an embodiment of the present invention, refer to Figure 4 The training process of the deep-dense fabric intelligent detection model involves multiple steps including data preparation, data preprocessing, model design, model training, model verification and model fine-tuning. The following is a detailed training process: In the data preparation stage, a large number of high-density dark fabric images are first collected, covering various types of fabrics and quality issues, and each high-density dark fabric image is annotated with its defect location, defect type and warp and weft density. Then, the data set is divided into a training set, a validation set and a test set, with a division ratio of 70% training set, 15% validation set and 15% test set. In the data preprocessing process, the image size is uniformly adjusted to 256×256 pixels, and the multi-scale Retinex algorithm is used to perform brightness equalization on the image to obtain the first image; the first image is super-resolution processed by the SRCNN model to obtain the second image; the second image is denoised by applying the non-local mean denoising algorithm to obtain the third image; the third image is color corrected using the grayscale world hypothesis and white balance correction technology to obtain the fourth image.
[0143] In terms of label processing, the defect labels and latitude and longitude density labels are formatted into the specified model input form. Figure 3 As shown. Define defect detection classification loss, defect detection positioning loss and longitude and latitude density calculation loss. For defect detection classification loss, cross entropy loss is used to measure the performance of the model on the classification task; for defect detection positioning loss, L2 loss is used to evaluate the performance of the model in accurately locating the defect position; for longitude and latitude density calculation loss, mean square error (MSE) is used to measure the error of the model when calculating longitude and latitude density. Select Adam optimizer and set the corresponding parameters, as shown in Table 2. Among them, β1 is used to control the smoothness of the first-order moment estimation, which helps to accelerate convergence and reduce oscillation. β2 is used to control the smoothness of the second-order moment estimation, which helps to stabilize the update and prevent excessive step size.
[0144] Table 2, parameter setting table
[0145] parameter value Learning Rate 0.0001 <![CDATA[β1]]> 0.9 <![CDATA[β2]]> 0.999 Weight decay 0.00001
[0146] The loss is calculated by forward propagation through input images and label data, and the weights are updated through back propagation. The model performance is evaluated on the validation set and the hyperparameters are adjusted. The learning rate scheduler is used to adjust the learning rate according to the validation set performance. The training cycle is 100 rounds. If the validation set performance no longer improves, the training is stopped early.
[0147] During the model fine-tuning phase, abnormal samples are collected and labeled, and the database is updated. When the database contains a specified number of reviewed and labeled samples (such as 100) or the model performance is detected to have dropped by more than a preset threshold, the model is fine-tuned, and new abnormal samples are used for incremental training. The model performance is re-evaluated to ensure that the model adapts to the new data distribution and abnormal patterns.
[0148] In order to verify the advancedness of the deep and dense fabric intelligent detection model proposed in the present invention, a comparison was made with the existing image recognition method. The grayscale projection method, the multi-scale convolutional network (MSNet) and the detection method based on the deep and dense fabric intelligent detection model proposed in the present invention were used for comparative tests.
[0149] Get 5 samples to be tested and execute Figure 1 In S20-S70, only the image recognition models used are different, and the rest of the operations are the same; specifically, the samples to be tested are 5 high-density dark fabrics produced in the same batch, each of which has the same size, material and specification, and each sample to be tested is of a specified size.
[0150] In this embodiment, the fabric decomposition method is used as the arbitration method, mainly based on the test method A of GB / T 4668-1995 "Determination of density of woven fabrics". First, remove the yarn at the edge of the sample, measure the length slightly larger than the specified size with a steel ruler, and cut it with scissors. Mark the specified size with a pick needle, remove it one by one from the edge, and count it.
[0151] Table 3. Comparison of results between image recognition method and fabric decomposition method
[0152]
[0153] The calculation formula of the relative error rate in Table 3 is:
[0154]
[0155] Among them, B represents the relative error rate, R image Represents the detection result of the image recognition method, R fabric Indicates the test results of the fabric decomposition method.
[0156] The relative error rates of the warp and weft density detection results of the three groups of image recognition methods and the warp and weft density results of the fabric decomposition method were calculated respectively, and two decimal places were retained for the relative error rate results. The calculation results are shown in Table 3. The warp and weft density obtained by the fabric decomposition method is used as the standard value. The data obtained by the deep and dense fabric intelligent detection model after the density detection of 5 pieces of fabric is compared with the standard value, and the difference between the two is ≤0.99%. The deep and dense fabric intelligent detection model based on the present invention is significantly superior to the existing grayscale projection method and multi-scale convolutional network (MSNet) in terms of detection accuracy and reliability. The model shows the lowest relative error rate in the detection of different samples.
[0157] This fabric warp and weft density detection method based on image recognition uses a high-resolution camera to collect images under a uniform light source, and designs a constant temperature heating platform to effectively avoid the problem of fabric wrinkles and ensure a high-quality image source. Combined with pre-processing and deep-density fabric intelligent detection models, comprehensive and accurate detection of high-density dark fabric samples is achieved. This method can not only accurately identify defects in fabrics, but also accurately calculate the local and global warp and weft density of fabrics. When an abnormal sample is detected, the system will issue an early warning. Since the local density in defective samples may be significantly different from that in normal samples, if the defective samples are not eliminated, the representativeness of the overall data will be affected. The method of the present invention eliminates samples with obvious defects and uneven distribution of warp and weft density and calculates the global warp and weft density, which helps to avoid the influence of deviation on the calculation results and ensure the reliability of the global warp and weft density. Overall, this detection method significantly improves the accuracy of fabric warp and weft density detection.
[0158] Embodiment 2:
[0159] Factory B is a fabric production enterprise. In order to ensure the quality of high-density dark-colored fabrics during the fabric factory inspection, Factory B applied a warp and weft density detection system based on image recognition, such as Figure 5 As shown, including:
[0160] The sample preparation module is used to obtain a high-density dark-colored fabric sample to be tested, and obtain a first sample to be tested; and flatly fix the first sample to be tested on a platform;
[0161] In this embodiment, the first sample to be tested is a high-density twill fabric;
[0162] An image acquisition module, used to use a high-resolution camera to acquire images of the first sample to be inspected under a uniform light source to obtain M high-density dark fabric images; M is the number of targets automatically photographed by the high-resolution camera;
[0163] An image preprocessing module, used for preprocessing the M high-density dark fabric images to obtain M preprocessed fabric images;
[0164] An intelligent detection module is used to input the M pre-processed fabric images into the trained deep-dense fabric intelligent detection model to obtain M defect detection results and M local warp and weft density calculation results; M is the number of targets automatically photographed by the high-resolution camera; the defect detection results are divided into defective and non-defective, and the local warp and weft density calculation results include the local warp density and local weft density of each high-density dark fabric image;
[0165] an abnormality detection module, configured to determine that the first sample to be inspected is an abnormal sample when at least one of the local longitude and latitude density calculation results is not within a preset range and / or at least one of the defect detection results is defective; otherwise, determine that the first sample to be inspected is a normal sample;
[0166] An early warning module, used for issuing an early warning for the abnormal samples;
[0167] A global density calculation module, used for calculating the global longitude and latitude density according to the M local longitude and latitude density calculation results of the normal sample;
[0168] The deep and dense fabric intelligent detection model is used for defect detection and warp and weft density detection of high-density dark fabrics. The structure of the deep and dense fabric intelligent detection model includes: an input layer, a pre-trained backbone network layer, a feature pyramid network layer, a multi-task learning head layer and an output layer.
[0169] Furthermore, the platform surface is smooth and flat and has a constant temperature heating function.
[0170] In order to verify the effectiveness of the detection system proposed in the present invention, a comparison was made with the fabric decomposition detection method.
[0171] Get 3 samples to be tested and execute them separately Figure 1 S20-S70 in the figure; specifically, the samples to be tested are 3 high-density dark fabrics produced in the same batch, each of which has the same size, material and specification, and each sample to be tested is of a specified size.
[0172] In this embodiment, the specific operation of using the fabric decomposition method is the same as that of the first embodiment.
[0173] Table 4. Comparison of warp and weft density results between system detection and fabric decomposition method
[0174]
[0175] As can be seen from Table 4, for samples of twill fabric, the test results of the system detection and the fabric decomposition method are basically consistent, and the relative error rate is within 2.50%, which shows that the detection system can provide objective and accurate detection results.
[0176] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for detecting warp and weft density of fabrics based on image recognition, characterized in that: include: Obtain a high-density dark-colored fabric sample to be tested, and obtain a first sample to be tested; Fixing the first sample to be tested flatly on the platform; Using a high-resolution camera to collect images of the first sample to be inspected under a uniform light source, to obtain M high-density dark fabric images; M is the number of targets automatically photographed by the high-resolution camera; Preprocessing the M high-density dark fabric images to obtain M preprocessed fabric images; inputting the M preprocessed fabric images into a trained dark fabric intelligent detection model to obtain M defect detection results and M local warp and weft density calculation results; the defect detection results are divided into defective and non-defective, and the local warp and weft density calculation results include the local warp density and local weft density of each high-density dark fabric image; When at least one of the local longitude and latitude density calculation results is not within a preset range and / or at least one of the defect detection results is defective, the first sample to be tested is determined to be an abnormal sample; otherwise, the first sample to be tested is determined to be a normal sample; Providing an early warning for the abnormal sample; Calculate the global longitude and latitude density according to the M local longitude and latitude density calculation results of the normal sample; The deep and dense fabric intelligent detection model is used for defect detection and warp and weft density detection of high-density dark fabrics. The structure of the deep and dense fabric intelligent detection model includes: an input layer, a pre-trained backbone network layer, a feature pyramid network layer, a multi-task learning head layer and an output layer.
2. The method for detecting warp and weft density of fabrics based on image recognition according to claim 1, characterized in that: The platform surface is smooth and flat and has a constant temperature heating function.
3. The method for detecting warp and weft density of fabrics based on image recognition according to claim 2, characterized in that: The platform is specifically: The platform is made of high-strength aluminum alloy; a layer of silicone pad of specified thickness is laid on the surface of the platform; The bottom of the platform is evenly covered with electric heating films as heating elements, and the electric heating films are installed at a specified interval; The platform surface is embedded with a plurality of high-precision temperature sensors to monitor the temperature in real time and obtain a first real-time temperature; The platform is connected to a PID temperature control system, and the PID temperature control system is used to achieve temperature control; The temperature control process includes the following steps: setting a target temperature, the PID temperature control system adjusting the power output of the electric heating film according to the feedback signal of the high-precision temperature sensor to maintain the target temperature; using a thermal imager to comprehensively scan the surface of the platform, obtain a temperature distribution image, and analyze each pixel in the temperature distribution image to obtain a first temperature value of each pixel; calculating the temperature difference between the first temperature value of each pixel and the target temperature to generate a temperature difference distribution map; judging whether there is an area where the temperature difference exceeds a preset threshold value according to the temperature difference distribution map, and obtaining a temperature uniformity detection result; when there is an area where the temperature difference exceeds the preset threshold value, the temperature uniformity detection result is no; calculating the error between the first real-time temperature and the target temperature to obtain a first error set; if any one of the errors in the first error set is greater than a preset error threshold value and / or the temperature uniformity detection result is no, stopping the longitude and latitude density detection, issuing an early warning, and performing temperature adjustment.
4. The method for detecting warp and weft density of fabrics based on image recognition according to claim 1, characterized in that: The specific steps of using the high-resolution camera to collect an image of the first sample to be inspected under a uniform light source are as follows: The high-resolution camera is mounted on a movable support and moved along the length and width of the first sample to be inspected to capture images of different areas; Obtaining the size of the first sample to be tested to obtain a sample length and a sample width; Acquire the field of view of the high-resolution camera to obtain the field of view length and field of view width; Setting the overlap length and overlap width; wherein the overlap length represents the length of the overlap area between adjacent images in the vertical direction, and the overlap width represents the width of the overlap area between adjacent images in the horizontal direction; Calculate the number of horizontal shots and the number of vertical shots using the following formula: Among them, N h Indicates the number of horizontal shots; N v Indicates the vertical shooting quantity; L s Represents the sample length; L v represents the length of the field of view; l W represents the overlap length; s represents the sample width; W v represents the width of the field of view; v represents the overlap width, Indicates rounding up; Calculate the target quantity using the following formula: M=N h ·N v ; Wherein, M represents the number of targets; Determine the moving step length and path of the high-resolution camera in the horizontal and vertical directions according to the number of horizontal shots and the number of vertical shots; program and control the movable bracket so that the high-resolution camera automatically shoots according to the preset moving step length and the path to obtain M high-density dark fabric images.
5. The method for detecting warp and weft density of fabrics based on image recognition according to claim 1, characterized in that: The preprocessing of the M high-density dark fabric images is specifically as follows: Use a multi-scale Retinex algorithm to perform brightness equalization on the high-density dark fabric image to obtain a first preprocessed image; Performing super-resolution processing on the first pre-processed image by using the SRCNN model to obtain a second pre-processed image; Applying a non-local means denoising algorithm to denoise the second preprocessed image to obtain a third preprocessed image; The third preprocessed image is color corrected using the grayscale world hypothesis and white balance correction technology to obtain the preprocessed fabric image.
6. The method for detecting warp and weft density of fabrics based on image recognition according to claim 1, characterized in that: The deep and dense fabric intelligent detection model is specifically: The input layer is used to receive the pre-processed fabric image; The pre-trained backbone network layer includes a self-supervised learning pre-trained feature extraction layer and a pre-trained model feature extraction layer; the self-supervised learning pre-trained feature extraction layer uses SimCLR to perform pre-training on a specified amount of pre-collected data; the pre-trained model feature extraction layer uses a pre-trained DenseNet network structure and is fine-tuned on a pre-collected and annotated high-density dark fabric image dataset to further extract basic features; The feature pyramid network layer extracts and fuses multi-level features through convolution kernels of different scales to capture details and global information of different scales in the image; The multi-task learning head layer includes a defect detection head layer and a warp and weft density calculation head layer; the defect detection head layer includes an attention mechanism layer, a classification layer and a positioning layer; the attention mechanism layer uses a self-attention mechanism; the classification layer is used to classify the extracted features and identify different types of defects; the positioning layer is used to locate the extracted features and mark the specific location of the defects in the image; the warp and weft density calculation head layer includes a CNN feature extraction layer, an RNN sequence modeling layer and a warp and weft density calculation layer; the CNN feature extraction layer uses a convolutional neural network to extract the warp and weft yarn features in the image; the RNN sequence modeling layer uses a recurrent neural network to capture the sequence information of the yarn to analyze the arrangement and density of the yarn; the warp and weft density calculation layer is used to count the number of warp and weft yarns per unit length and calculate the warp and weft density of the image; The output layer includes a defect detection output layer and a longitude and latitude density output layer.
7. The method for detecting warp and weft density of fabrics based on image recognition according to claim 1, characterized in that: In addition to issuing early warnings for the abnormal samples, subsequent processing also includes: Record relevant information of the abnormal sample to obtain sample abnormality information including detection time, operation conditions and abnormality description; generating a report including abnormal information of the sample; Reviewing and accurately marking the abnormal samples to obtain reviewed and marked samples; Storing the reviewed and marked samples in a database; When the number of reviewed and annotated samples accumulated in the database reaches a specified number and / or it is detected that the performance of the deep and dense fabric intelligent detection model has dropped by more than a preset threshold, the deep and dense fabric intelligent detection model is fine-tuned using the reviewed and annotated samples in the database.
8. The method for detecting warp and weft density of fabrics based on image recognition according to claim 1, characterized in that: The global longitude and latitude density is calculated according to the M local longitude and latitude density calculation results of the normal sample as follows: The global warp and weft density includes the global warp density and the global weft density, and the calculation formula is: in, represents the global secret; represents the global longitude and latitude density; i represents the index of the calculation result of the local longitude and latitude density; represents the local longitude and latitude density in the i-th local longitude and latitude density calculation result; represents the local longitude and latitude density in the i-th local longitude and latitude density calculation result, and M represents the target number.
9. A fabric warp and weft density detection system based on image recognition, characterized in that: include: A sample preparation module is used to obtain a high-density dark-colored fabric sample to be tested, and obtain a first sample to be tested; Fixing the first sample to be tested flatly on the platform; An image acquisition module, used to use a high-resolution camera to acquire images of the first sample to be inspected under a uniform light source to obtain M high-density dark fabric images; M is the number of targets automatically photographed by the high-resolution camera; An image preprocessing module, used for preprocessing the M high-density dark fabric images to obtain M preprocessed fabric images; An intelligent detection module is used to input the M pre-processed fabric images into the trained deep-dense fabric intelligent detection model to obtain M defect detection results and M local warp and weft density calculation results; M is the number of targets automatically photographed by the high-resolution camera; the defect detection results are divided into defective and non-defective, and the local warp and weft density calculation results include the local warp density and local weft density of each high-density dark fabric image; an abnormality detection module, configured to determine that the first sample to be inspected is an abnormal sample when at least one of the local longitude and latitude density calculation results is not within a preset range and / or at least one of the defect detection results is defective; otherwise, determine that the first sample to be inspected is a normal sample; An early warning module, used for issuing an early warning for the abnormal samples; A global density calculation module, used for calculating the global longitude and latitude density according to the M local longitude and latitude density calculation results of the normal sample; The deep and dense fabric intelligent detection model is used for defect detection and warp and weft density detection of high-density dark fabrics. The structure of the deep and dense fabric intelligent detection model includes: an input layer, a pre-trained backbone network layer, a feature pyramid network layer, a multi-task learning head layer and an output layer.
10. The fabric warp and weft density detection system based on image recognition according to claim 9, characterized in that: The platform surface is smooth and flat and has a constant temperature heating function.
Citation Information
Patent Citations
Handheld portable fabric density inspection system
CN106979948A
Quantitative mark laser length measurement-based weft-knitted fabric density detection device and method
CN113337955A
Fabric warp and weft density detection method and system based on image recognition and AI algorithm
CN117495839A
Fabric defect analysis and detection system and analysis and detection method based on deep learning
CN117994257A
Fabric defect detection method
US20240193752A1
Cited By
Automatic identification system for fabric weave structure
CN120913154A
Intelligent quality inspection double-engine system and device for industrial impregnated fabric
CN121053057A
