Method and device for fabric defect detection
By using support plates and fill lights in the fabric detection device for positioning and light transmittance enhancement, combined with a lifting mechanism and a deep learning model, the problem of fabric shaking and misalignment during the detection process is solved, and the detection effect and equipment operation convenience are improved.
Patent Information
- Application Number
- CN202510491141.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-09-09
AI Technical Summary
Fabrics are prone to shaking and misalignment during defect detection, affecting the camera's shooting effect.
Support plates and fill lights are used to position the fabric and enhance its light transmittance, and the position and height of the camera are adjusted through a lifting mechanism and a lead screw, combined with a deep learning model for real-time detection.
It effectively avoids the shaking of fabrics during the inspection process, improves the accuracy and efficiency of defect detection, and facilitates the disassembly and assembly of the equipment.
Smart Images

Figure CN120609739A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fabric defect detection, and in particular to a method and device for fabric defect detection. Background Art
[0002] When fabrics are produced, the surface of the fabrics needs to be inspected to see if there are burrs or defects. Usually, people are used to check whether the quality of the fabrics is good. During the long inspection process, the workers will experience eye pain and fatigue, which will affect the speed of inspection. There are also a few detection equipment that uses a camera to connect to an external computer and collect images through the camera to detect the surface of the fabric to see if there are burrs or defects.
[0003] The patent application number 202020832407.1 discloses a fabric defect detection device with adjustable height, including a base plate, a support rod is fixedly connected to the base plate, a movable sleeve is sleeved on the support rod, a fixed knob is threaded through the movable sleeve, a mounting groove is provided on the movable sleeve, a mounting seat is rotatably connected to the mounting slot through a bearing, an adjusting knob is threaded through the movable sleeve, the adjusting knob abuts against the mounting seat, a fixing frame is fixedly connected to the mounting seat, the fixing frame has a U-shaped structure, and both ends of the fixing frame are rotatably connected to a rotating shaft through a bearing, an external thread is provided on the rotating shaft, a threaded sleeve is threaded on the external thread, a camera is fixedly connected to the lower end of the threaded sleeve, and a rotating mechanism is placed on the base plate.
[0004] The above technical solution uses a lifting mechanism to adjust the height of the camera, but lacks positioning for fabric detection, which causes the fabric to shake and misalign during defect detection, thereby affecting the camera's detection image quality. Summary of the Invention
[0005] Based on this, the purpose of the present invention is to provide a method and device for fabric defect detection to solve the technical problem that the fabric may shake and be misaligned during the defect detection process, thereby affecting the picture taking effect of the camera detection.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for fabric defect detection, including data collection, data preprocessing, model training, detection implementation, and result processing and feedback, wherein the data collection includes:
[0007] Image format,The collected images are in RGB format with a resolution of 1920×1080;
[0008] Data volume: Collect enough images to cover various fabric types and defects, collecting 500-1000 images of normal fabrics and 500-1000 images of fabrics with different defects;
[0009] When annotating information and data, record the defect information of each image, including the defect type (holes, stains, and wrinkles), the defect location (expressed in the form of a bounding box, including the coordinates of the upper left corner and the lower right corner), and the severity of the defect (minor, moderate, and severe);
[0010] The data preprocessing includes:
[0011] Image cropping and scaling: Cropping the collected image to a suitable size (640×640) and scaling it to meet the input requirements of the model;
[0012] Normalization: normalize the image pixel values to a range between 0 and 1 to improve the training effect of the model;
[0013] Data enhancement: Use random cropping, rotation, and flipping operations to enhance the image data to increase data diversity and improve the generalization ability of the model;
[0014] The model training includes:
[0015] Training data format, converting the labeled data into the YOLO format required by the model (including image path, bounding box coordinates and category labels);
[0016] Training process: Use deep learning framework to train the model, record the loss value, accuracy and other indicators during the training process to evaluate the performance of the model;
[0017] After the model is saved and trained, save the model as a file (.h5 and .pth format) for subsequent deployment and use;
[0018] The detection implementation includes:
[0019] Input data,real-time collected fabric images are used as input data for the model.,The image format and pre-processing method are consistent with the,training stage;
[0020] Output data, the model outputs the detection results, including the location of the defect (bounding box coordinates), type (category label) and confidence (probability value;
[0021] Result storage: store the test results in the database and record the test time and defect information of each image;
[0022] The result processing and feedback include:
[0023] Quality statistics: count the number of defects and defect type distribution of each batch of fabrics based on the test results, and generate a quality report;
[0024] Data visualization: Display the inspection results in a visual way, draw bounding boxes on the image, and display the defect type and confidence level to facilitate operator viewing;
[0025] Feedback mechanism: trigger the corresponding feedback mechanism according to the detection results. When serious defects are detected, the production line will be automatically stopped and an alarm will be issued.
[0026] The present invention is further configured to include a mounting base and a support plate fixed to the top of the mounting base, wherein a plurality of support rods are fixed to the top of the mounting base in a rectangular array, and a winding roller and a conveying roller installed in the support rods are respectively provided on both sides of the top surface of the mounting base, wherein a camera is installed at the top of the mounting base through a lifting mechanism, grooves are provided at both ends of the support plate, and a fill light is embedded and fixed at the center position of the top surface of the support plate, and pressure rods are rotatably provided in the two grooves.
[0027] The present invention is further configured such that a receiving groove is provided on the support rod on one side of the top surface of the mounting seat, and a driving rod is rotatably provided on the inner wall of the support rod on the other side of the top surface of the mounting seat.
[0028] The present invention is further configured such that both ends of the conveying roller are embedded in the accommodating groove, and a first motor connected to the driving rod is fixed to the side wall of the support rod.
[0029] The present invention is further configured such that baffles are symmetrically sleeved on the winding roller and the conveying roller, and fastening rods plugged into the driving rods are fixed at both ends of the winding roller.
[0030] The present invention is further configured such that a bolt is installed at the bottom end of the fastening rod, and the top end of the bolt passes through the fastening rod and the driving rod and is threadedly sleeved with a nut.
[0031] The present invention is further configured such that a sorting rod rotatably mounted in a support rod is symmetrically arranged below the conveying roller, and a fabric body embedded between the two sorting rods is provided on the conveying roller, and the fabric body passes through the surface of the support plate and is fixed on the winding roller.
[0032] The present invention is further configured such that the lifting mechanism includes a fixed rod symmetrically fixed to the top of the mounting seat and a telescopic rod slidably inserted into the fixed rod, the top of the telescopic rod is rotatably inserted into the first screw, and the bottom end of the telescopic rod is fixed with a sliding rod.
[0033] The present invention is further configured such that the first lead screw is threadedly inserted into the camera, the sliding rod is slidably inserted into the bottom end of the camera, and the side wall of the telescopic rod is fixed with a second motor connected to the first lead screw.
[0034] The present invention is further configured such that a second lead screw threadedly inserted into the telescopic rod is rotatably provided in the fixed rod, the bottom ends of the two second lead screws are fixedly sleeved with synchronous wheels through the mounting seat, a synchronous belt is meshed between the two synchronous wheels, a mounting plate is fixed to the bottom end of the mounting seat, and a third motor connected to the second lead screw is fixed to the mounting plate.
[0035] In summary, the present invention mainly has the following beneficial effects: the present invention arranges a support plate at the top of the mounting seat, and the pressure rods in the grooves at both ends of the support plate are used to position the fabric body for defect detection, thereby avoiding the fabric body from shaking during the defect detection process, and at the same time, the fill light in the support plate increases the light transmittance of the fabric body, making it easier for light to expose the defects on the surface of the fabric body, thereby improving the defect detection effect of the fabric body; a plurality of support rods are fixed on the top of the mounting seat, and the conveying roller is embedded in the receiving groove at the top of the support rod, and the winding roller drives the driving rod and the fastening rod to rotate and wind through the first motor, and the nut is unscrewed after winding to disassemble the fabric body. Removing the bolts separates the driving rod from the fastening rod, thereby improving the convenience of disassembly and assembly of the winding roller and the conveying roller; by installing a first lead screw at the top of the telescopic rod, the camera maintains axial positioning through the sliding rod, and the second motor drives the first lead screw to rotate after startup, so that the camera slides on the top of the support plate, and by installing a second lead screw threadedly inserted into the telescopic rod in the fixed rod, the third motor on the mounting plate drives the second lead screw to rotate, and the two second lead screws rotate simultaneously through the synchronous wheel and the synchronous drive, and the telescopic rod slides in the fixed rod during the rotation, which facilitates the adjustment of the position and height of the camera, and is suitable for shooting fabric surface defect detection from different positions. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic diagram of the detection process structure of the present invention;
[0037] Figure 2 It is a schematic diagram of the three-dimensional structure of the present invention;
[0038] Figure 3 This is a schematic diagram of the mounting base structure of the present invention;
[0039] Figure 4 For the present invention Figure 3 A schematic diagram of the structure at center A;
[0040] Figure 5 This is a schematic cross-sectional view of the fixing rod of the present invention;
[0041] Figure 6 It is a schematic diagram of the support plate structure of the present invention.
[0042] In the figure: 1. Mounting base; 2. Support plate; 3. First motor; 4. Fabric body; 5. Fixing rod; 6. Support rod; 7. Winding roller; 8. First lead screw; 9. Sliding rod; 10. Conveyor roller; 11. Arrangement rod; 12. Accommodation slot; 13. Second motor; 14. Baffle; 15. Nut; 16. Drive rod; 17. Fastening rod; 18. Bolt; 19. Camera; 20. Telescopic rod; 21. Second lead screw; 22. Synchronous belt; 23. Third motor; 24. Mounting plate; 25. Synchronous wheel; 26. Groove; 27. Pressure rod; 28. Fill light. DETAILED DESCRIPTION
[0043] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be understood as limiting the present invention.
[0044] Method and apparatus for fabric defect detection, such as Figure 1-6 As shown, it includes data collection, data preprocessing, model training, detection implementation, and result processing and feedback. The data collection includes:
[0045] Image format,The collected images are in RGB format with a resolution of 1920×1080;
[0046] Data volume: Collect enough images to cover various fabric types and defects, collecting 500-1000 images of normal fabrics and 500-1000 images of fabrics with different defects;
[0047] When annotating information and data, record the defect information of each image, including the defect type (holes, stains, and wrinkles), the defect location (expressed in the form of a bounding box, including the coordinates of the upper left corner and the lower right corner), and the severity of the defect (minor, moderate, and severe);
[0048] The data preprocessing includes:
[0049] Image cropping and scaling: Cropping the collected image to a suitable size (640×640) and scaling it to meet the input requirements of the model;
[0050] Normalization: normalize the image pixel values to a range between 0 and 1 to improve the training effect of the model;
[0051] Data enhancement: Use random cropping, rotation, and flipping operations to enhance the image data to increase data diversity and improve the generalization ability of the model;
[0052] The model training includes:
[0053] Training data format, converting the labeled data into the YOLO format required by the model (including image path, bounding box coordinates and category labels);
[0054] Training process: Use deep learning framework to train the model, record the loss value, accuracy and other indicators during the training process to evaluate the performance of the model;
[0055] After the model is saved and trained, save the model as a file (.h5 and .pth format) for subsequent deployment and use;
[0056] Testing implementation includes:
[0057] Input data,real-time collected fabric images are used as input data for the model.,The image format and pre-processing method are consistent with the,training stage;
[0058] Output data, the model outputs the detection results, including the location of the defect (bounding box coordinates), type (category label) and confidence (probability value;
[0059] Result storage: store the test results in the database and record the test time and defect information of each image;
[0060] Result processing and feedback include:
[0061] Quality statistics: count the number of defects and defect type distribution of each batch of fabrics based on the test results, and generate a quality report;
[0062] Data visualization: Display the inspection results in a visual way, draw bounding boxes on the image, and display the defect type and confidence level to facilitate operator viewing;
[0063] Feedback mechanism: trigger the corresponding feedback mechanism according to the detection results. When serious defects are detected, the production line will be automatically stopped and an alarm will be issued.
[0064] It includes a mounting base 1 and a support plate 2 fixed to the top of the mounting base 1. A plurality of support rods 6 are fixed to the top of the mounting base 1 in a rectangular array, and a winding roller 7 and a conveying roller 10 installed in the support rods 6 are respectively provided on both sides of the top surface of the mounting base 1. A camera 19 is installed on the top of the mounting base 1 through a lifting mechanism, grooves 26 are provided at both ends of the support plate 2, and a fill light 28 is embedded and fixed at the center position of the top surface of the support plate 2, and pressure rods 27 are rotatably provided in the two grooves 26.
[0065] A receiving groove 12 is provided on the support rod 6 on one side of the top surface of the mounting seat 1, and a driving rod 16 is rotatably provided on the inner wall of the support rod 6 on the other side of the top surface of the mounting seat 1. Both ends of the conveying roller 10 are embedded in the receiving groove 12, and the side walls of the support rod 6 are fixed with a first motor 3 connected to the driving rod 16. The winding roller 7 and the conveying roller 10 are symmetrically sleeved with baffles 14, and both ends of the winding roller 7 are fixed with fastening rods 17 plugged into the driving rod 16. The pressure rods 27 in the grooves 26 at both ends of the support plate are positioned for defect detection of the fabric main body 4, thereby avoiding shaking of the fabric main body 4 during the defect detection process. At the same time, the fill light 28 in the support plate 2 increases the light transmittance of the fabric main body 4, making it easier for light to expose defects on the surface of the fabric main body 4.
[0066] Furthermore, a bolt 18 is installed at the bottom end of the fastening rod 17, and the top end of the bolt 18 passes through the fastening rod 17 and the driving rod 16 and is threaded with a nut 15. A sorting rod 11 is symmetrically arranged below the conveying roller 10 and is rotatably mounted in the support rod 6. The conveying roller 10 is provided with a fabric body 4 embedded between the two sorting rods 11. The fabric body 4 passes through the surface of the support plate 2 and is fixed on the winding roller 7. The lifting mechanism includes a fixed rod 5 symmetrically fixed to the top end of the mounting seat 1 and a telescopic rod 20 slidably inserted in the fixed rod 5. The top end of the telescopic rod 20 is rotatably inserted into the first The lead screw 8 and the sliding rod 9 are fixed to the bottom end of the telescopic rod 20. The first lead screw 8 is threadedly inserted into the camera 19, and the sliding rod 9 is slidably inserted into the bottom end of the camera 19. The side wall of the telescopic rod 20 is fixed with a second motor 13 connected to the first lead screw 8. The conveying roller 10 is embedded in the accommodating groove 12 at the top end of the support rod 6. The winding roller 7 drives the driving rod 16 and the fastening rod 17 to rotate and wind through the first motor 3, and after winding, the nut 15 is unscrewed and the bolt 18 is removed to separate the driving rod 16 from the fastening rod 17, thereby improving the convenience of disassembly and assembly of the winding roller 7 and the conveying roller 10.
[0067] A second lead screw 21 threadedly inserted into the telescopic rod 20 is rotatably provided in the fixed rod 5. The bottom ends of the two second lead screws 21 pass through the mounting seat 1 and are fixedly sleeved with a synchronous wheel 25. A synchronous belt 22 is meshed between the two synchronous wheels 25. A mounting plate 24 is fixed to the bottom end of the mounting seat 1. A third motor 23 connected to the second lead screw 21 is fixed on the mounting plate 24. The camera 19 maintains axial positioning through the slide rod 9. After starting, the second motor 13 drives the first lead screw 8 to rotate, so that the camera 19 slides on the top of the support plate 2. By installing a second lead screw 21 threadedly inserted into the telescopic rod 20 in the fixed rod 5, the third motor 23 on the mounting plate 24 drives the second lead screw 21 to rotate. The two second lead screws 21 rotate simultaneously through the synchronous wheel 25 and the synchronous belt 22, and the telescopic rod 20 slides in the fixed rod 5 during the rotation.
[0068] The working principle of the present invention is as follows: when in use, the pressure rods 27 in the grooves 26 at both ends of the support plate position the fabric body 4 for defect detection, thereby preventing the fabric body 4 from shaking during the defect detection process. At the same time, the fill light 28 in the support plate 2 increases the light transmittance of the fabric body 4, making it easier for light to expose the defects on the surface of the fabric body 4. The conveying roller 10 is embedded in the receiving groove 12 at the top of the support rod 6. The winding roller 7 drives the driving rod 16 and the fastening rod 17 to rotate and wind through the first motor 3. After winding, the nut 15 is unscrewed to remove the bolt 18 to separate the driving rod 16 from the fastening rod 17. The camera 19 maintains axial positioning through the slide rod 9. After starting, the second motor 13 drives the first screw 8 to rotate, so that the camera 19 slides on the top of the support plate 2. A second screw 21 threadedly inserted into the telescopic rod 20 is installed in the fixed rod 5. The third motor 23 on the mounting plate 24 drives the second screw 21 to rotate. The two second screws 21 rotate simultaneously through the synchronous wheel 25 and the synchronous belt 22, and the telescopic rod 20 slides in the fixed rod 5 during the rotation, which is convenient for adjusting the position and height of the camera 19, and is suitable for shooting fabric surface defect detection from different positions.
[0069] Although an embodiment of the present invention has been shown and described, this specific embodiment is merely an explanation of the present invention and is not a limitation of the invention. The specific features, structures, materials or characteristics described may be combined in an appropriate manner in any one or more embodiments or examples. After reading this specification, those skilled in the art may make modifications, substitutions and variations to the embodiment without creative contribution as needed without departing from the principles and purpose of the present invention. However, as long as they are within the scope of the claims of the present invention, they are protected by patent law.
Claims
1. A method for fabric defect detection, including data acquisition, data preprocessing, model training, detection implementation, and result processing and feedback, is characterized by: The data collection includes: Image format,The collected images are in RGB format with a resolution of 1920×1080; Data volume: Collect enough images to cover various fabric types and defects, collecting 500-1000 images of normal fabrics and 500-1000 images of fabrics with different defects; When annotating information and data, record the defect information of each image, including the defect type (holes, stains, and wrinkles), the defect location (expressed in the form of a bounding box, including the coordinates of the upper left corner and the lower right corner), and the severity of the defect (minor, moderate, and severe); The data preprocessing includes: Image cropping and scaling: Cropping the collected image to a suitable size (640×640) and scaling it to meet the input requirements of the model; Normalization: normalize the image pixel values to a range between 0 and 1 to improve the training effect of the model; Data enhancement: Use random cropping, rotation, and flipping operations to enhance the image data to increase data diversity and improve the generalization ability of the model; The model training includes: Training data format, converting the labeled data into the YOLO format required by the model (including image path, bounding box coordinates and category labels); Training process: Use deep learning framework to train the model, record the loss value, accuracy and other indicators during the training process to evaluate the performance of the model; After the model is saved and trained, save the model as a file (.h5 and .pth format) for subsequent deployment and use; The detection implementation includes: Input data,real-time collected fabric images are used as input data for the model.,The image format and pre-processing method are consistent with the,training stage; Output data, the model outputs the detection results, including the location of the defect (bounding box coordinates), type (category label) and confidence (probability value; Result storage: store the test results in the database and record the test time and defect information of each image; The result processing and feedback include: Quality statistics: count the number of defects and defect type distribution of each batch of fabrics based on the test results, and generate a quality report; Data visualization: Display the inspection results in a visual way, draw bounding boxes on the image, and display the defect type and confidence level to facilitate operator viewing; Feedback mechanism: trigger the corresponding feedback mechanism according to the detection results. When serious defects are detected, the production line will be automatically stopped and an alarm will be issued.
2. A fabric defect detection device, a device for use in the fabric detection method of claim 1, characterized in that: The invention comprises a mounting seat (1) and a support plate (2) fixed on the top of the mounting seat (1); a plurality of support rods (6) are fixed on the top of the mounting seat (1) in a rectangular array, and a winding roller (7) and a conveying roller (10) are respectively provided on both sides of the top surface of the mounting seat (1), wherein a camera (19) is installed on the top of the mounting seat (1) through a lifting mechanism, grooves (26) are provided at both ends of the support plate (2), and a fill light (28) is embedded and fixed at the center position of the top surface of the support plate (2), and a pressure rod (27) is rotatably provided in each of the two grooves (26).
3. The fabric defect detection device according to claim 2, characterized in that: A receiving groove (12) is provided on the support rod (6) on one side of the top end surface of the mounting seat (1), and a driving rod (16) is rotatably provided on the inner wall of the support rod (6) on the other side of the top end surface of the mounting seat (1).
4. The fabric defect detection device according to claim 3, characterized in that: Both ends of the conveying roller (10) are embedded in the accommodating groove (12), and a first motor (3) connected to a driving rod (16) is fixed to the side wall of the support rod (6).
5. The fabric defect detection device according to claim 4, characterized in that: The winding roller (7) and the conveying roller (10) are both symmetrically sleeved with baffles (14), and both ends of the winding roller (7) are fixed with fastening rods (17) plugged into the driving rod (16).
6. The fabric defect detection device according to claim 5, characterized in that: A bolt (18) is installed at the bottom end of the fastening rod (17), and the top end of the bolt (18) passes through the fastening rod (17) and the driving rod (16) and is threadedly sleeved with a nut (15).
7. The fabric defect detection device according to claim 3, characterized in that: A sizing rod (11) rotatably mounted on a support rod (6) is symmetrically arranged below the conveying roller (10), and a fabric body (4) embedded between the two sizing rods (11) is arranged on the conveying roller (10), and the fabric body (4) passes through the surface of the support plate (2) and is fixed on the winding roller (7).
8. The fabric defect detection device according to claim 2, characterized in that: The lifting mechanism comprises a fixed rod (5) symmetrically fixed to the top of the mounting seat (1) and a telescopic rod (20) slidably inserted into the fixed rod (5); the top of the telescopic rod (20) is rotatably inserted into the first lead screw (8), and the bottom end of the telescopic rod (20) is fixed with a sliding rod (9).
9. The fabric defect detection device according to claim 8, characterized in that: The first lead screw (8) is threadedly inserted into the camera (19), the slide rod (9) is slidably inserted into the bottom end of the camera (19), and the side wall of the telescopic rod (20) is fixed with a second motor (13) connected to the first lead screw (8).
10. The fabric defect detection device according to claim 9, characterized in that: A second lead screw (21) is rotatably provided in the fixed rod (5) and is threadedly inserted into the telescopic rod (20). The bottom ends of the two second lead screws (21) pass through the mounting seat (1) and are fixedly sleeved with a synchronous wheel (25). A synchronous belt (22) is meshed between the two synchronous wheels (25). A mounting plate (24) is fixed to the bottom end of the mounting seat (1), and a third motor (23) connected to the second lead screw (21) is fixed on the mounting plate (24).
Citation Information
Patent Citations
Height-adjustable fabric defect detection device
CN212379263U