Bamboo cane product defect detecting and sorting equipment based on visual inspection
By using visual inspection technology and automated equipment, the problems of low efficiency, poor accuracy, and high cost in the inspection of bamboo products have been solved, enabling efficient and accurate inspection and sorting of bamboo strip products and ensuring the consistency of product quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-13
AI Technical Summary
Existing methods for testing bamboo products rely on manual visual inspection, which is inefficient, inaccurate, costly, and inconsistent in standards, making it difficult to meet the needs of mass production.
Design a visual inspection-based defect detection and sorting device for bamboo strip products. Employ a high-definition camera and PLC controller, combined with density and surface defect detection algorithms for bamboo strip products, to achieve automated detection and sorting. By integrating conveying, feeding, detection, and sorting mechanisms, the accuracy and consistency of detection are ensured.
It significantly improves the efficiency and accuracy of testing bamboo strip products, reduces production costs, achieves unified standardization of product quality, reduces missed and false detections, and ensures the overall quality of products.
Smart Images

Figure CN121649142A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of defect and sorting technology, specifically relating to a defect detection and sorting device for bamboo strip products based on visual inspection. Background Technology
[0002] As a renewable resource, bamboo, with its short growth cycle and lightweight yet high strength, is increasingly being used in various products, leading to the emergence of many innovative bamboo-based products, such as bamboo toothbrushes, bamboo spoons, bamboo forks, and bamboo chopsticks. Despite the promising future of these bamboo products, various problems often arise during their production and processing, such as cracks, defects, deformation, color differences, and burrs. These defects not only affect the product's appearance but also reduce its lifespan and user experience.
[0003] Existing methods for detecting defects in bamboo products mainly rely on visual inspection, which has the following drawbacks: 1. Low efficiency: Manual inspection is slow and difficult to meet the needs of mass production.
[0004] 2. Poor accuracy: Manual inspection is limited by human subjective judgment and visual fatigue, which can easily lead to missed detections and false detections.
[0005] 3. Insufficient consistency and standardization: Inconsistent standards among different testing personnel lead to significant differences in test results, affecting the consistency of product quality.
[0006] 4. High cost: Relying on a large amount of manpower for inspection and sorting increases production costs.
[0007] Therefore, it is necessary to design a bamboo strip product testing and sorting equipment with higher testing efficiency and more accurate testing. Summary of the Invention
[0008] The technical problem to be solved by the present invention is to provide a defect detection and sorting device for bamboo strip products based on visual inspection, which addresses the shortcomings of the prior art. This device can automatically detect and sort long bamboo products by utilizing visual inspection technology, which can greatly improve the detection efficiency and accuracy, while significantly reducing production costs.
[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a visual inspection-based defect detection and sorting device for bamboo strip products, characterized in that it includes a conveying mechanism, a feeding mechanism, a detection mechanism, a sorting mechanism, and a PLC controller, all mounted on a frame. The PLC controller has embedded algorithms for detecting surface defects and density of bamboo strip products. The detection mechanism includes multiple high-definition cameras for photographing the outer surface of the bamboo strip products. The signal input terminal of the PLC controller is connected to the multiple high-definition cameras, and the signal output terminal of the PLC controller is connected to the sorting mechanism. The conveying mechanism is used for storing bamboo strip products. The bamboo strips are stored and conveyed to the feeding mechanism; the feeding mechanism is used to deliver bamboo strip products one by one to the testing mechanism; the testing mechanism obtains the density distribution of the bamboo strip products based on the density detection algorithm by acquiring images of the two end faces of the bamboo strip products displaying the bamboo vascular bundles, and also obtains the surface defects of the bamboo strip products based on the surface defect detection algorithm by acquiring images of other sides of the bamboo strip products. The PLC controller combines the density and surface defects of the bamboo strip products to determine whether the bamboo strip products are qualified; the sorting mechanism sorts and stores the bamboo strip products according to whether the bamboo strip products are qualified as determined by the testing mechanism.
[0010] Preferably, the detection mechanism further includes side plates, a third conveyor belt, a fourth conveyor belt, and a platform. The third and fourth conveyor belts are sequentially installed between the two side plates. The third conveyor belt is connected to a feeder. A platform is provided between the third and fourth conveyor belts. Six high-definition cameras for detecting the six sides of bamboo strip products on the platform are installed on the frame. The platform is made of transparent material and is fixedly installed between the two side plates. Pressure rollers that assist bamboo strip products in entering the platform are provided on both sides of the platform. The pressure rollers are rotatably installed between the side plates.
[0011] Preferably, the conveying mechanism includes a hopper and a first conveyor belt. One end of the hopper is connected to the feeding mechanism. The first conveyor belt is arranged on the inner bottom surface of the hopper. The feeding mechanism includes a primary feeding sluice plate, a secondary feeding sluice plate, and a discharge device. The primary feeding sluice plate is connected to the hopper. The secondary feeding sluice plate is located between the primary feeding sluice plate and the discharge device. The secondary feeding sluice plate is provided with multiple material distribution conveyor plates. The multiple material distribution conveyor plates are equidistantly connected to the second conveyor belt. Each material distribution conveyor plate is equipped with a vibrating motor. The primary feeding sluice plate is also equipped with a vibrating motor. A high-precision weight sensor is provided on the top material distribution conveyor plate of the secondary feeding sluice plate. The high-precision weight sensor detects whether the quantity of material fed in a single operation is one.
[0012] Preferably, four first high-definition cameras are arranged in the four directions (up, down, left, and right) of the platform to detect the four sides of the bamboo strip product. The four first high-definition cameras are connected to each other by a fixing bracket, which is fixedly installed on the frame. Feeding baffles are arranged on both sides of the secondary feeding board. Two second high-definition cameras are arranged on the feeding baffles opposite to the top parting conveyor plate of the secondary feeding board to detect the two end faces of the bamboo strip product. The second conveyor belt is installed between the feeding baffles.
[0013] Preferably, the feeder includes a rotating shaft, a feed motor, and a feed plate. The rotating shaft is rotatably mounted above the top feeding conveyor plate of the secondary feeding scrubbing plate. The feed plate is fixedly connected to the rotating shaft. The feed motor that drives the rotating shaft to rotate is mounted on the frame. The distance between the feed plate and the top feeding conveyor plate of the secondary feeding scrubbing plate is greater than the thickness of one bamboo strip product and less than the thickness of two bamboo strip products.
[0014] Preferably, the sorting mechanism includes cylinders and push plates. Two cylinders are installed on the side plate at positions corresponding to the fourth conveyor belt. The actuating end of the cylinder is connected to the push plate. A first chute and a second chute are formed on one of the side plates at positions corresponding to the two push plates. The first chute and the second chute are respectively connected to two cargo boxes.
[0015] Preferably, the frame has two discharge ports, which are respectively connected to the first chute and the corresponding cargo box, and the second chute and the corresponding cargo box. A distance sensor is provided on the top of the inner side wall of the cargo box, and an audible and visual alarm is provided on the frame to indicate that the cargo box is full.
[0016] Preferably, one or more of the first high-definition cameras are fixedly equipped with dust-blowing nozzles for cleaning debris and dust from the platform.
[0017] Preferably, the signal input terminal of the PLC controller is connected to a high-precision weight sensor, a high-definition camera, and a distance sensor, and the signal output terminal of the PLC controller is connected to a feeding motor, a vibration motor, each conveyor belt motor, a cylinder, and an audible and visual alarm.
[0018] Compared with the prior art, the present invention has the following advantages: 1. This invention uses a feeding mechanism to deliver bamboo strips to the testing mechanism one by one, avoiding overlap that could affect testing results. Two high-definition cameras in the testing mechanism detect the number of bamboo vascular bundles on both ends of the bamboo strips to determine their density. Four high-definition cameras detect surface defects on the other four sides of the bamboo strips. A PLC controller combines the density and surface defects to determine the pass / fail status of the bamboo strips. A sorting mechanism then separates and stores the bamboo strips based on the testing mechanism's determination of pass / fail status. The overall design is scientifically sound, highly automated, and accurate. A surface defect detection algorithm reduces the false negative and false positive rates. Furthermore, a density detection algorithm quickly determines the density of the bamboo strips, comprehensively evaluating their pass / fail status based on both density and surface defects. This standardizes testing, avoiding inconsistencies caused by subjective factors during manual testing and ensuring consistent product quality.
[0019] 2. The detection mechanism of this invention is equipped with six high-definition cameras to capture images of six sides of bamboo strip products. The design is scientific and reasonable with no blind spots, providing a comprehensive and reasonable basis for the detection and judgment of the PLC controller.
[0020] 3. The present invention also includes a feeding device. A high-precision weight sensor detects the weight of bamboo strip products arriving at the feeding device. If the weight exceeds the upper limit of a single bamboo strip product, the feeding device will be activated to push down the excess bamboo strip products and reload them. This effectively ensures that the testing mechanism receives only one bamboo strip product at a time, thus guaranteeing the accuracy of the testing.
[0021] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the overall structure of the present invention.
[0023] Figure 2 This is a schematic diagram of the feeding mechanism in this invention.
[0024] Figure 3 This is a schematic diagram of the cooperative structure of the side plate, the third conveyor belt, and the fourth conveyor belt in this invention.
[0025] Figure 4 This is a schematic diagram of the sorting mechanism in this invention.
[0026] Figure 5 This is a schematic diagram of the connection structure of the first high-definition camera in this invention.
[0027] Figure 6 This is a schematic diagram of the frame and sorting mechanism in this invention.
[0028] Figure 7 A flowchart illustrating a deep learning-based surface defect detection method for bamboo strip products, provided in an embodiment of this application; Figure 8 An example diagram illustrating defect types for a deep learning-based surface defect detection method for bamboo strip products, provided in an embodiment of this application; Figure 9 A schematic diagram of a data augmentation method for detecting surface defects in bamboo strip products based on deep learning, provided in an embodiment of this application; Figure 10 A schematic diagram of BCO-Net for a deep learning-based surface defect detection method for bamboo strip products provided in an embodiment of this application; Figure 11 A schematic diagram of a confusion matrix for a deep learning-based surface defect detection method for bamboo strip products provided in an embodiment of this application; Figure 12 An example diagram showing the prediction results of a deep learning-based surface defect detection method for bamboo strip products provided in this application embodiment.
[0029] Explanation of reference numerals in the attached figures: Detailed Implementation
[0030] like Figures 1 to 6 As shown, the present invention includes a conveying mechanism, a feeding mechanism, a detection mechanism, a sorting mechanism, and a PLC controller, all mounted on a frame 8. The PLC controller has embedded algorithms for detecting surface defects and density of bamboo strips. The detection mechanism includes multiple high-definition cameras for capturing images of the outer surface of the bamboo strips. The signal input terminals of the PLC controller are connected to the multiple high-definition cameras, and the signal output terminals of the PLC controller are connected to the sorting mechanism. The conveying mechanism stores and conveys bamboo strips to the feeding mechanism. The feeding mechanism delivers bamboo strips one at a time to the detection mechanism. The detection mechanism obtains the density distribution of the bamboo strips based on the density detection algorithm by acquiring images of the two end faces of the bamboo strips displaying the bamboo vascular bundles. The detection mechanism also obtains surface defects of the bamboo strips based on the surface defect detection algorithm by acquiring images of other sides of the bamboo strips. The PLC controller combines the density and surface defects of the bamboo strips to determine whether the bamboo strips are qualified. The sorting mechanism sorts and stores the bamboo strips according to the qualification determination by the detection mechanism.
[0031] In this embodiment, the bamboo strip products are mainly long, milled bamboo strips. The two ends of the bamboo strips along their length show bamboo vascular bundles, and the number of these bundles is related to the density of the bamboo strips. By acquiring images of these two ends, machine learning algorithms can be used to predict the density of the bamboo strips. The circumference along the length is generally the main processing area for milling, and surface defects are prone to occur. By acquiring images of the circumference, machine learning algorithms can be used to predict surface defects in the bamboo strips, thereby determining whether the bamboo strips are qualified.
[0032] In this embodiment, the conveying mechanism includes a hopper 1 and a first conveyor belt 2. One end of the hopper 1 is connected to the feeding mechanism. The first conveyor belt 2 is arranged on the inner bottom surface of the hopper 1. The feeding mechanism includes a primary feeding scrubbing plate 3, a secondary feeding scrubbing plate 4, and a feeder 5. The primary feeding scrubbing plate 3 is connected to the hopper 1. The secondary feeding scrubbing plate 4 is located between the primary feeding scrubbing plate 3 and the feeder 5. The secondary feeding scrubbing plate 4 is provided with multiple material distribution conveying plates, which are equidistantly connected to the second conveyor belt. Each material distribution conveying plate is equipped with a vibrating motor. The primary feeding scrubbing plate 3 is also equipped with a vibrating motor. A high-precision weight sensor is provided on the top material distribution conveying plate of the secondary feeding scrubbing plate 4. The high-precision weight sensor and the feeder 5 are connected to a PLC controller. A high-precision weight sensor is used to detect the weight of the material (bamboo strip products) coming to the top of the secondary feeding conveyor plate 4 and transmit it to the PLC controller. If the weight detected by the high-precision weight sensor exceeds the set threshold (such as the weight of a bamboo strip product), it will be difficult for the subsequent inspection mechanism to collect the surface image of the bamboo strip product. Therefore, the PLC controller controls the feeder 5 to push back the excess material (excess bamboo strip products).
[0033] In this embodiment, a weight sensor is installed on the bottom surface of the silo 1. The quantity of goods stored in the silo 1 is determined by the weight sensing of the weight sensor. When the inventory is insufficient, the inventory is replenished in time, which effectively improves the detection efficiency.
[0034] In this embodiment, the detection mechanism includes a side plate 9, a third conveyor belt 6, a fourth conveyor belt 19, and a platform 7. The third conveyor belt 6 and the fourth conveyor belt 19 are sequentially installed between the two side plates 9. The third conveyor belt 6 is connected to the feeder 5. The platform 7 is set between the third conveyor belt 6 and the fourth conveyor belt 19. Six high-definition cameras are installed on the frame to capture images of six sides of the bamboo strip products on the platform 7. The platform 7 is made of transparent material. Each high-definition camera is equipped with a supplementary light to minimize blind spots and ensure that all surfaces of the bamboo strip products are covered without any dead angles. The platform 7 is fixedly installed between the two side plates 9. Pressure rollers 17 are provided on both sides of the platform 7 to assist the bamboo strip products in entering the platform 7. The pressure rollers 17 are rotatably installed between the side plates 9.
[0035] In this embodiment, four first high-definition cameras 22 are arranged in the four directions of up, down, left, and right of the platform 7 to capture images of the four sides (four sides) of the bamboo strip product along its length. The four first high-definition cameras 22 are connected to each other by a fixing frame 23, which is fixedly installed on the frame 8. Feeding baffles 24 are arranged on both sides of the secondary feeding board 4. Two second high-definition cameras 10 are arranged opposite each other on the feeding baffles 24, corresponding to the position of the material distribution conveyor plate at the top of the secondary feeding board 4, to capture images of the two end faces of the bamboo strip product along its length. The second conveyor belt is installed between the feeding baffles 24 and is flush with the third conveyor belt 6.
[0036] In this embodiment, the feeder 5 includes a rotating shaft 20, a feed motor, and a feed plate 21. The rotating shaft 20 is rotatably mounted above the top feeding conveyor plate of the secondary feeding scrubbing plate 4. The feed plate 21 is fixedly connected to the rotating shaft 20. The feed motor that drives the rotating shaft 20 to rotate is mounted on the frame. The PLC controller is connected to the feed motor. The distance between the feed plate 21 and the top feeding conveyor plate of the secondary feeding scrubbing plate 4 is greater than the thickness of one bamboo strip product and less than the thickness of two bamboo strip products, ensuring that one bamboo strip product is fed to the loading platform 7 at a time.
[0037] In this embodiment, the sorting mechanism includes two cylinders 12 (a first cylinder and a second cylinder) and two push plates 13 (a first push plate and a second push plate). The two cylinders 12 are connected to a PLC controller and are installed on the side plate 9 at positions corresponding to the fourth conveyor belt 19. The actuating end of each cylinder 12 is connected to one push plate 13. A first chute 14 and a second chute 15 are formed on one of the side plates 9 at positions corresponding to the two push plates 13. The first chute 14 and the second chute 15 are respectively connected to two cargo boxes 16 (a first cargo box and a second cargo box). The two cargo boxes 16 are used to hold qualified and unqualified bamboo strip products, respectively. In this embodiment, the first cylinder, first push plate, first chute 14, and first cargo box correspond to each other, and are used to load qualified bamboo strip products. The second cylinder, second push plate, second chute 15, and second cargo box correspond to each other, and are used to load unqualified bamboo strip products. When a qualified bamboo strip product is detected, the PLC controller controls the fourth conveyor belt 19 to move the qualified bamboo strip product to the position where the first cylinder is activated. The PLC controller then controls the activated end of the first cylinder to extend and push the first push plate, placing the product into the first cargo box via the first chute 14. When an unqualified bamboo strip product is detected, the PLC controller controls the fourth conveyor belt 19 to move the unqualified bamboo strip product to the position where the second cylinder is activated. The PLC controller then controls the activated end of the second cylinder to extend and push the second push plate, placing the unqualified product into the second cargo box via the second chute 15.
[0038] In this embodiment, the frame 8 has two discharge ports 18, which are respectively connected to the first chute 14 and the corresponding cargo box 16, the second chute 15 and the corresponding cargo box 16. A distance sensor is installed on the top of the inner wall of the cargo box 16, and an audible and visual alarm is installed on the frame 8 to indicate that the cargo box 16 is full. Both the distance sensor and the audible and visual alarm are connected to a PLC controller. The distance sensor collects the distance to the top opening of the cargo box 16. If the cargo box 16 is full, the distance data collected by the distance sensor decreases. Based on the change in the data collected by the distance sensor, the PLC controller controls the audible and visual alarm to sound, reminding staff to replace or empty the cargo box 16. The distance sensor can be an infrared distance sensor. The cargo box 16 has four casters at the bottom and a handle on the side for easy replacement and cleaning.
[0039] In this embodiment, one or more of the first high-definition cameras 22 are fixedly equipped with dust-blowing nozzles 11 for cleaning debris and dust from the stage 7. The dust-blowing nozzles 11 are connected to the air outlet of an air pump, and the transparent stage 7 and the surface of bamboo strip products are cleaned in real time by directional airflow, ensuring continuous cleanliness of the detection area and improving the stability and accuracy of image acquisition. The air pump can also be connected to the control output of a PLC controller to realize timed air blowing cleaning.
[0040] In this embodiment, the left end of the third conveyor belt 6 passes through the feeding baffle 24 and connects to the material distribution conveyor plate at the top of the secondary feeding slat 4. The bamboo strip products are directly transported to the loading platform 7 via the third conveyor belt 6.
[0041] In this embodiment, the bamboo strip product can be a bamboo toothbrush handle. During testing and use, the bamboo toothbrush handles are first stacked in the hopper 1. The bamboo toothbrush handles are then conveyed to the primary feeding scrubbing plate 3 via the first conveyor belt 2. The primary feeding scrubbing plate 3 vibrates to perform preliminary combing. The secondary feeding scrubbing plate 4 vibrates by alternating up and down movements of the tertiary material distribution conveyor plate, causing the upper layer of bamboo toothbrush handles to fall off, ensuring that only a single bamboo toothbrush handle reaches the top tertiary material distribution conveyor plate. At the same time as the handle reaches the top tertiary material distribution conveyor plate, a high-precision weight sensor detects the weight data of the toothbrush handle and then transmits this weight data to the PLC controller. When the PLC controller detects that the weight exceeds the upper limit of a single toothbrush handle, it starts the feeding motor to push the feeding plate 21 off the excess bamboo toothbrush handle for refeeding.
[0042] The bamboo toothbrush handle is captured by two high-definition cameras 10 on the top three-stage material conveying plate. The density of the bamboo toothbrush handle is obtained based on the density detection algorithm of bamboo strip products. If the density distribution of the two end faces meets the expectation, it is judged as a qualified bamboo toothbrush handle. If the density distribution of at least one end face does not meet the expectation, it is judged as an unqualified bamboo toothbrush handle.
[0043] For bamboo toothbrush handles with acceptable density, the PLC controller activates the third conveyor belt 6 to transport them to the platform 7. High-definition cameras 22 on the platform 7 capture high-definition images of the four sides of the handle. These images are then transmitted to the PLC controller, which performs surface defect detection based on a bamboo strip product surface defect detection algorithm. If all four sides are free of defects, the handle is considered acceptable; if at least one side has a defect, it is considered unacceptable. Acceptable handles are placed in the first cargo box, while unacceptable handles are placed in the second cargo box.
[0044] For bamboo toothbrush handles with substandard density, there is no need to perform surface defect detection. The PLC controller controls the third conveyor belt 6, the fourth conveyor belt 19, and the second cylinder to directly put them into the second cargo box.
[0045] Image processing is performed on the surface image showing the bamboo fibrous bundles, and then machine learning, such as training a model based on the YOLO object detection algorithm, is used to obtain a density detection algorithm for bamboo strip products. This training process is a standard method in machine learning and will not be elaborated upon here. The density defect detection algorithm for bamboo strip products specifically includes: acquiring a surface image of the bamboo strip product with fibrous bundles, and feeding the surface image into the density detection algorithm to obtain the density distribution of the bamboo strip product. If the density distribution of the two end faces meets the expectations, the bamboo strip product is determined to be a density-qualified product. Further investigation is conducted to determine if there are defects on the sides. If defects are present, the bamboo strip product is determined to be an unqualified product; if no defects are present, the bamboo strip product is determined to be a qualified product. If the density distribution of the two end faces does not meet the expectations, the bamboo strip product is directly determined to be an unqualified product.
[0046] Surface defect detection using the aforementioned bamboo strip product surface defect detection algorithm specifically includes: acquiring a surface image of the bamboo strip product, feeding the surface image into the bamboo strip product detection algorithm, and obtaining a surface defect detection result. The bamboo strip product detection algorithm can be trained using a computer vision algorithm. This application embodiment provides a deep learning-based method for detecting surface defects in bamboo strip products. Figure 7A flowchart illustrating a deep learning-based surface defect detection method for bamboo strip products is provided in this application embodiment. Figure 7 As shown, the method includes at least the following steps: Step S110: Obtain the image data to be detected for bamboo strip products; Sample images are acquired using a combination of manual operation and automated image acquisition equipment to obtain the image data to be tested. For bamboo products, the images to be tested can be bamboo toothbrushes and bamboo chopsticks.
[0047] Step S120: The edge enhancement input module of the boundary-aware cascaded optimization network is used to perform edge enhancement processing on the image data to be detected to obtain an edge enhancement feature map; The Boundary-Aware Cascade Optimization Network (BCO-Net), based on the object detection algorithm (YOLOv11), systematically integrates a boundary-aware mechanism to form a three-level cascaded optimization structure, specifically designed for the complex textures and minute edge defects on bamboo strip products. This allows the BCO-Net to effectively detect minute defects against complex texture backgrounds, enhancing the model's ability to perceive and represent edge information. The overall structural design of the BCO-Net balances real-time performance and detection accuracy, with optimizations specifically tailored to the complex textures and significant differences in defect scale found in bamboo strip products.
[0048] The Boundary Enhancement Input Module (BEIM) is located at the front end of BCO-Net and processes the image data to be detected through two parallel branches. In the early stages of the boundary-aware cascaded optimization network, the BEIM enhances edge signals, providing a high signal-to-noise ratio input for subsequent feature extraction. It guides the boundary-aware cascaded optimization network to focus on pixel regions at defect edges, improving the ability to discriminate defects such as blurred contours and irregular shapes, and significantly enhancing the response to subtle defects such as cracks and fiber peeling.
[0049] Step S130: Through the multi-head self-attention mechanism of the backbone network of the boundary-aware cascaded optimization network, the semantic association between defects at different locations in the edge enhancement feature map is captured to obtain a multi-scale defect semantic feature map. The backbone network employs an efficient hybrid attention architecture, offering advantages in global perception and efficient inference. It captures long-distance semantic relationships through a multi-head self-attention mechanism, compensating for the limitations of convolutional neural networks. During training, the backbone network uses a multi-branch topology, which can be fused into a single path during deployment, significantly reducing inference latency. To enhance the representation of local details, several C3k2 modules are retained in the shallow and mid-layers of the backbone network. The backbone network sequentially outputs multi-scale defect semantic feature maps, providing multi-scale features for the subsequent neck fusion module.
[0050] The backbone network adopts a lightweight architecture based on RepViT. By combining multi-scale attention mechanism and reparameterizable convolution technology, the computational cost is significantly reduced while ensuring model accuracy.
[0051] Step S140: Through the global edge information fusion neck module of the boundary-aware cascaded optimization network, the edge enhancement feature map and the multi-scale defect semantic feature map are subjected to dynamic boundary-guided fusion processing to obtain a multi-scale fusion feature map with edge semantic enhancement. In the neck structure design, the Global Edge Information Guidance Module (GEIT-Neck) is integrated to achieve efficient fusion of local detection features and global texture information, thereby enhancing the model's sensitivity to edge breakage and missing defects.
[0052] BCO-Net achieves end-to-end boundary-priority detection through a three-level cascaded optimization: BEIM enhances high-frequency edges at the input end, improving the visibility of defect contours; the Efficient Hybrid Attention Backbone (EHA-Backbone) balances accuracy and inference speed through attention mechanisms and reparameterization; and the Dynamic Boundary-Guided Fusion Neck (DBGF-Neck) ensures that edge information is preserved throughout the process through multi-scale direct connections and channel fusion.
[0053] The BCO-Net proposed in this application enhances the boundary at the input end through BEIM, efficiently extracts global features in the backbone through EHA-Backbone, and intelligently guides and fuses boundary information in the neck network through DBGF-Neck, thereby improving the detection accuracy and robustness of BCO-Net for small and irregular defects on the surface of milled bamboo strip products at the feature level.
[0054] Step S150: Based on the multi-scale fusion feature map, determine the defect detection result of the image data to be detected.
[0055] Region proposals are generated using preset anchor points on multi-scale enhanced feature maps. In the classification branch, the feature regions corresponding to the region proposals are processed by convolutional layers and a normalized exponential function (Softmax), outputting a probability distribution map of the defect type corresponding to each anchor point. In the regression branch, the offset correction values between the anchor points and the true bounding boxes are calculated by coordinate regression convolutional layers, outputting the defect localization parameter matrix. Non-maximum suppression is applied to the probability distribution map and the localization parameter matrix to eliminate redundant boxes, and a confidence threshold is used for filtering to generate defect detection results containing defect type labels and bounding box coordinates.
[0056] This application acquires image data of bamboo strip products to be inspected. Through the boundary enhancement input module of a boundary-aware cascaded optimization network, edge enhancement processing is performed on the image data to obtain an edge enhancement feature map, significantly improving the edge saliency of defects such as blurred contours and irregular shapes. By employing a multi-head self-attention mechanism in the backbone network of the boundary-aware cascaded optimization network, semantic associations between defects at different locations in the edge enhancement feature map are captured, resulting in a multi-scale defect semantic feature map. This mechanism significantly reduces computational overhead while ensuring high-precision defect detection results, meeting the deployment requirements of edge devices. A global edge information fusion neck module fuses the edge enhancement feature map and the multi-scale defect semantic feature map to obtain a multi-scale fused feature map. This achieves efficient interaction between local detail features and global texture information, effectively enhancing the model's sensitivity to edge breakage and missing defects. The multi-scale fused feature map exhibits stronger edge perception and expressive capabilities in defect detection against complex bamboo strip product texture backgrounds. Defect detection based on the multi-scale fused feature map can significantly improve the detection accuracy of surface defects in bamboo strip products.
[0057] In some embodiments, the method further includes: Step S101: Obtain an initial image dataset containing multiple types of defects for bamboo strip products; label multiple initial image data in the initial image dataset with defects based on predefined defect types to obtain a label corresponding to each initial image data. Step S102: Based on the defect type distribution of each initial image data, perform data augmentation on the initial image dataset to obtain the target image dataset; Step S103: Based on the target image dataset, train the initial model to obtain the boundary-aware cascaded optimization network.
[0058] In some embodiments, the defect types include processing defects and natural or storage defects; the processing defects include shape defects, burr defects, crack defects, drilling damage defects, surface defects, and yellowing defects; the natural or storage defects include mold defects and insect infestation defects.
[0059] Figure 8 Example diagrams illustrating defect types of the method provided in the embodiments of this application, such as... Figure 8 As shown, in view of the diverse and complex types of defects in bamboo products, before conducting defect detection on bamboo strip products, the types of defects on the surface of bamboo strip products are predefined based on common quality problems in the milling process of bamboo strip products. Based on the causes of defects, the defect types are divided into two categories: processing defects and natural or storage defects.
[0060] The first category is machining defects, mainly introduced during the machining processes of bamboo strips, such as milling, grinding, and drilling, due to factors such as process control, tool condition, or material stress. Among these, shape defects refer to incomplete structural contours or missing material in specific areas of the brush handle. Burr defects are tiny, fibrous protrusions that fail to detach completely from the edges or surface of the product. Crack defects appear as linear fracture lines of a certain depth and width. Drilling damage defects specifically refer to material tearing or chipping at the edges of holes during the tufting process. Surface defects manifest as localized, non-structural depressions or pits on the surface of the product. Yellowing defects refer to residual yellow areas on the surface of the product, usually oval in shape and lacking the normal fibrous texture of bamboo strips.
[0061] The second category consists of natural or storage defects, stemming from the inherent biological characteristics of bamboo products or environmental influences during storage and transportation. Among these, mold defects result in areas of darkened color and abnormally reduced gloss on the surface of bamboo products due to microbial growth. Insect-eaten defects manifest as round or irregularly shaped holes with relatively clear edges, formed by insect infestation.
[0062] By manually annotating different defect types within the defect area using rectangular bounding boxes, the accuracy and clarity of the defect data are ensured. The defect annotation dataset constructed in this stage is highly diverse, high-resolution, and representative, laying the foundation for subsequent model training.
[0063] When annotating defects, the images of bamboo strip products are first manually annotated, with rectangular boxes used to precisely define the location of each type of defect. The annotation information is saved in JSON format, providing structured metadata for each image, including the image filename, image size, and the type and coordinates of multiple defects.
[0064] After defect annotation, statistical analysis revealed a significant class imbalance in the annotated dataset. This imbalance manifested primarily in the vast difference in the number of defect images for different types of bamboo strips. Common types, including cracks, shape defects, and mold, constituted the majority of the dataset; while other key types, such as burrs, insect damage, surface defects, and drill-damage defects, were extremely scarce. This resulted in a class imbalance in the annotated dataset.
[0065] To address the aforementioned type imbalance issue and improve the model's generalization ability and robustness, this application employs a data augmentation method based on a specific ratio combination to offline augment a minority of types of samples in the training set. Data augmentation methods include scaling, translation, rotation, cropping, random cropping, brightness adjustment, and noise addition. For detection objects with complex natural textures, such as milled bamboo strips, simply or randomly combining data augmentation methods does not achieve optimal results.
[0066] This application proposes a combination scheme that sets specific proportions for different data augmentation methods. This scheme aims to ensure that while increasing the number of minority class samples, the original key features of the defects are preserved to the greatest extent possible, and to introduce the most effective diversity that best reflects real-world working conditions. By combining and augmenting the initial imbalanced image data using this preset proportion, high-quality rare type samples can be generated in a targeted manner, thereby optimizing the class balance of the training dataset.
[0067] In some embodiments, step S102, "based on the defect type distribution of each initial image data, performing data augmentation on the initial image dataset to obtain the target image dataset," includes: Step S1021: Determine the proportion of initial image data for each defect type in the initial image dataset; Step S1022: Based on the quantity ratio, determine the proportion of each data enhancement method for the initial image data of each defect type; Step S1023: For the initial image data of each defect type, perform data augmentation based on the proportion of each corresponding data augmentation method to obtain the target image dataset.
[0068] To address the uneven distribution of defect samples, an adaptive data augmentation strategy based on defect type distribution is introduced during the data preprocessing stage. By integrating various image augmentation techniques such as rotation, flipping, brightness adjustment, and affine transformation, targeted augmentation is performed on defect types with scarce sample sizes, forming a representative target image dataset. This data augmentation method significantly alleviates the overfitting and classification bias issues caused by data distribution bias during model training, effectively improving the model's robustness to various defects.
[0069] In a preferred embodiment, to achieve optimal data balance and enhancement, a few types of data in the initial image data are expanded. The proportions and logical relationships of the data enhancement methods are as follows: Figure 9 As shown. Figure 9 A schematic diagram of the data augmentation method provided in the embodiments of this application.
[0070] like Figure 9 As shown, "Affine Transformation" is a geometric transformation that includes rotation, scaling, translation, and shearing. "D4 Dihedral Transformation" is an operation on the square symmetry group, including rotations of 0°, 90°, 180°, and 270°. "Flip" refers to horizontal flipping, which can double the number of samples in the dataset and help the model learn the mirror invariance of defects. "Random Cropping" can change the composition of an image, allowing the model to identify defects independently of their absolute position in the image and potentially focus on more local features. "Four-Point Perspective Transformation" is a stronger geometric transformation that simulates complex perspective effects, such as top or side views, by specifying the four corner points of the image, mimicking the deformation caused by a camera shooting a product from different angles, greatly enhancing the model's robustness to perspective distortion. "ISO Noise" is used to simulate the grainy noise produced by a camera increasing ISO sensitivity in low light conditions; adding a small amount of ISO noise can make the model less sensitive to noise during image acquisition, improving its robustness. "Random brightness and contrast adjustment" can simulate changes in lighting conditions on a production line by adjusting the brightness and contrast of the image, such as light intensity and shadows, ensuring that the model does not rely too much on fixed lighting conditions to identify defects.
[0071] Figure 9In the process, the steps of performing data augmentation on the initial defect data by a preset ratio include: (1) performing an affine transformation on 50% of the initial defect data, then performing a D4 dihedral transformation on 10% of the image data obtained by the affine transformation, performing a flip on 50% of the image data obtained by the D4 dihedral transformation, performing random cropping on 50% of the image data obtained after the flip, and finally performing a four-point perspective transformation on 10% of the image data obtained by the random crop to obtain the first stage data augmentation result. (2) performing random cropping on 50% of the first stage data augmentation result to obtain the cropped second stage data augmentation result; and flipping on 50% of the first stage data augmentation result to obtain the flipped second stage data augmentation result. (3) Add ISO noise to 5% of the data enhancement result after cropping in the second stage to obtain the first type of data enhancement result in the third stage; perform random brightness and contrast adjustment on 10% of the data enhancement result after cropping in the second stage to obtain the second type of data enhancement result in the third stage; add ISO noise to 5% of the data enhancement result after flipping in the second stage to obtain the third type of data enhancement result in the third stage; perform random brightness and contrast adjustment on 10% of the data enhancement result after flipping in the second stage to obtain the fourth type of data enhancement result in the third stage.
[0072] Based on the above description, the results of the four third-stage data augmentation methods are all added to the initial image data to generate the target image dataset. The target image dataset obtained after data augmentation contains rich defect morphology, lighting variations, and noisy scenes, enabling the model to better learn defect features in complex texture backgrounds, ultimately improving the detection accuracy of defect types.
[0073] By employing the aforementioned data combination enhancement method with specific proportions, the problem of model training difficulties caused by sample imbalance is effectively alleviated. Furthermore, by introducing controllable and effective sample diversity, the adaptability of the final trained model to complex working conditions such as changes in illumination and angle shifts is significantly enhanced.
[0074] In some embodiments, the "boundary enhancement input module" in step S120 includes an edge branch and a spatial branch. In step S120, "performing edge enhancement processing on the image data to be detected through the boundary enhancement input module of the boundary-aware cascaded optimization network to obtain an edge enhancement feature map" includes: Step S1201: Based on the edge branches, extract the high-frequency gradient information in the image data to be detected using the differential convolution operator; Step S1202: Based on the spatial branch, the macroscopic structure and location information in the image data to be detected are preserved by downsampling method; Step S1203: Based on 3D grouped convolution, the high-frequency gradient information and the macroscopic structural information are fused across dimensions to generate an edge enhancement feature map.
[0075] In the detection of surface defects in bamboo strip products, the image data to be detected is processed in parallel through edge branch and spatial branch. The edge branch is responsible for capturing subtle texture changes and defect contours in the image data. It uses a 3×3 Sobel Convolution (SobelConv) differential operator to calculate the gradients of the image in the horizontal and vertical directions, effectively extracting high-frequency gradient information from the surface of bamboo strip products, such as the edges of burrs, thereby generating high-resolution edge feature maps with clear contours. At the same time, the spatial branch preserves the overall shape and spatial context of the image. It gradually reduces the size of the feature map through max pooling (MaxPool) downsampling operations, reducing the amount of computation while maximizing the preservation of the macroscopic structure and relative position information of bamboo strip products, which helps in subsequent determination of defect region attribution. 3D group convolution is introduced to group and fuse the high-frequency gradient information and macroscopic structure and position information output by the edge branch and spatial branch in the channel dimension. Without significantly increasing the number of parameters, it promotes the effective complementarity and enhancement of edge details and spatial context information, ultimately generating edge-enhanced feature maps rich in details and context.
[0076] For example, the output of the edge enhancement feature map is labeled "P2 / 4, 128 channels". Here, "P2 / 4" indicates the relative hierarchical position of the edge enhancement feature map in the feature pyramid network or similar multi-scale structure, that is, its spatial size is 1 / 4 of the original input image. For example, if the original input image is 512x512 pixels, the size of the edge enhancement feature map is 128x128 pixels; "128 channels" indicates that the edge enhancement feature map has 128 channels, and each dimension carries a specific feature response after fusion calculation, which together constitute the initial feature representation for subsequent detection tasks.
[0077] The differential convolution operator with edge branches effectively extracts high-frequency gradient information from bamboo strip product images, enhancing sensitivity to minor defects. The downsampling method with spatial branches preserves macroscopic structure and positional context, avoiding overfitting of details and ensuring the integrity of overall morphological information. Finally, 3D grouped convolution is used for cross-dimensional fusion, integrating detailed features and global semantics. This significantly reduces the number of computational parameters while improving the richness of feature representation. The generated edge-enhanced feature map has both local accuracy and global consistency, thus helping to improve the accuracy and robustness of surface defect detection for bamboo strip products. In some embodiments, the "multi-scale defect semantic feature map" in step S130 includes a first defect semantic feature map at a first scale, a second defect semantic feature map at a second scale, and a third defect semantic feature map at a third scale; in step S130, "capturing the semantic associations between defects at different locations in the edge enhancement feature map through the multi-head self-attention mechanism of the backbone network of the boundary-aware cascaded optimization network to obtain the multi-scale defect semantic feature map" includes: Step S1301: Based on each attention head in the multi-head self-attention mechanism, calculate the attention weight matrix of the semantic association strength between any two points in the edge enhancement feature map; based on the attention weight matrix, obtain the attention enhancement feature map; Step S1302: Based on the phased downsampling method, the resolution of the attention enhancement feature map is compressed step by step through stride convolution or pooling operations. At the same time, the channel dimension is expanded by increasing the number of convolution kernels, and the first defect semantic feature map at the first scale, the second defect semantic feature map at the second scale, and the third defect semantic feature map at the third scale are output, with the first scale, the second scale, and the third scale increasing sequentially.
[0078] In the backbone network, a multi-head self-attention mechanism is used to model the semantic association between edge enhancement feature maps. Each attention head independently calculates the semantic association strength between any two points in the feature map and generates an attention weight matrix. After the attention weight matrix is weighted and fused with the original values, the output is an attention enhancement feature map, which represents the complex global dependencies between defective regions of bamboo strip products.
[0079] Multi-scale feature extraction is performed on the attention-enhanced feature map using a staged downsampling method. The spatial resolution of the feature map is compressed step by step through stride convolution or pooling operations. At the same time, the channel dimension of the feature map is expanded by increasing the number of convolution kernels. Thus, three different scales of defect semantic feature maps are output in sequence: the first scale, the second scale, and the third scale. These three scales are increased in sequence to capture defect information at the detailed, medium, and macro ranges, respectively.
[0080] For example, the first defect semantic feature map at the first scale is represented as "P3 / 8", which is used to capture detailed defect information. It has 512 channels and high resolution, which enables the model to accurately locate small defects that are easily overlooked. The second defect semantic feature map at the second scale is represented as "P4 / 16", with 512 channels. It is used to capture defect information of a medium range. It has moderate spatial resolution, which preserves some details and contains more semantic information. The second scale can identify defect categories and provide accurate bounding box localization, which is a balance between details and semantics. The third defect semantic feature map at the third scale is represented as "P5 / 32", with 1024 channels. It has lower spatial resolution, but the receptive field of each point is larger, which is used to capture defect information of a macroscopic range.
[0081] In some embodiments, step S140, "by performing dynamic boundary-guided fusion processing on the edge enhancement feature map and the multi-scale defect semantic feature map through the global edge information fusion neck module of the boundary-aware cascaded optimization network, a multi-scale fusion feature map with edge semantic enhancement is obtained", includes: Step S1401: Based on the multi-scale edge information generator of the global edge information fusion neck module, the edge enhancement feature map is subjected to hierarchical downsampling processing to obtain a multi-scale edge enhancement feature map corresponding to each scale of the multi-scale defect semantic feature map. Step S1402: Perform channel fusion, detail purification, and feature dimension alignment on the multi-scale edge enhancement feature map and the multi-scale defect semantic feature map to obtain a multi-scale fused feature map with edge semantic enhancement.
[0082] In some embodiments, step S1402, "performing channel fusion, detail purification, and feature dimension alignment on the multi-scale edge enhancement feature map and the multi-scale defect semantic feature map to obtain a multi-scale fused feature map with edge semantic enhancement," includes: The positional information in the multi-scale edge enhancement feature map and the positional information in the multi-scale defect semantic feature map are merged; Filter out noise from the multi-scale edge enhancement feature map and the multi-scale defect semantic feature map; Align the resolution and feature dimensions of the multi-scale edge enhancement feature map and the multi-scale defect semantic feature map to obtain a multi-scale fusion feature map with edge semantic enhancement.
[0083] The global edge information fusion neck module integrates a multi-scale edge information generator (MutilScaleEdgeInfoGenerator) and a convolutional edge fusion module (ConvEdgeFusion), achieving dynamic boundary-guided fusion through multi-scale edge generation, edge semantic fusion, and pyramid multi-path construction. The multi-scale edge information generator takes the output of the boundary enhancement feature map as input and generates Edge-P3 (Edge Feature Map at P3 / 8 scale), Edge-P4 (Edge Feature Map at P4 / 16 scale), and Edge-P5 (Edge Feature Map at P5 / 32 scale) through a hierarchical downsampling method. Edge-P3 has the highest resolution and smallest receptive field, focusing on capturing subtle edges, textures, and minor defects on the surface of bamboo-like products. Edge-P4 has medium resolution and a medium receptive field, used for detecting medium-scale defects and structural contours. Edge-P5 has the lowest resolution and the largest receptive field. It is responsible for capturing the macroscopic outline and global contextual information of large defects, such as large areas of mold or overall deformation of the board. The semantic features and edge features at each scale are fused through a convolutional edge fusion module, which performs channel fusion, detail purification, and feature dimension alignment.
[0084] The channel fusion, detail purification, and feature dimension alignment operations include: merging the positional information in the multi-scale edge enhancement feature map with the positional information in the multi-scale defect semantic feature map, filtering out noise in both, and aligning the resolution and feature dimensions to obtain a multi-scale fused feature map for edge semantic enhancement.
[0085] Furthermore, a cross-fusion strategy combining top-down and bottom-up approaches is employed during the pyramid multi-path construction process. In the bottom-up path, the edge enhancement feature map at the Edge-P3 scale is fused step-by-step with the edge enhancement feature maps at the Edge-P4 and Edge-P5 scales using a downsampling method. In the top-down path, the edge enhancement feature map at the Edge-P5 scale is fused step-by-step with the edge enhancement feature maps at the Edge-P4 and Edge-P3 scales using an upsampling method. Through these operations, the edge information of bamboo strip product images is not diluted during the multi-level fusion process, resulting in an improvement of over 2% in the detection accuracy of small-scale, low-contrast defects.
[0086] Figure 10 A schematic diagram of BCO-Net for the method provided in the embodiments of this application. Figure 10In this application, the network model comprises three main parts: Backbone, Neck, and Head. Backbone is the backbone network, Neck is the neck network, and Head is the head network. "Input" represents the input image data to be detected. "IEStem" is the boundary enhancement input module, "MutilScaleEdgeInfoGenerator" is the multi-scale edge information generator, "GetIndexOutput" is the index output module, "C3K2" represents the 3×3 SobelConv difference operator, and "C3K2x2" indicates that the C3K2 module is repeated twice in the model. "Conv" represents a convolutional layer, "C2PSA2" is a convolutional module integrating an attention mechanism, which guides the network to focus on feature channels or spatial locations more relevant to defects, and "C2PSA2x2" indicates that the C2PSA2 module is repeated twice. "SPPF" stands for pooling technology, "Upsample" represents upsampling, "Concat" represents feature fusion, "ConvEdgeFusion" represents the convolutional edge fusion module, and "Detect" represents the detection head, which is responsible for decoding on the fused multi-scale feature map to generate the final detection result containing defect type, confidence level, and precise location.
[0087] To fully verify the performance of the BCO-Net of this invention, ablation experiments were performed. As shown in Table 1, the contributions of each module were quantified by comparing the baseline model with different model variants that progressively integrate core module A (RepViT backbone network), module B (EIEStem boundary enhancement input module), and module C (GFPM global feature pyramid module). Table 1 compares the detection performance metrics of different models, and Table 2 compares the computational efficiency metrics of different models.
[0088] Table 1 Comparison of detection performance metrics of different models
[0089] In Table 1, Precision refers to the proportion of samples that the model predicts as positive but are actually positive; Recall is the proportion of samples that are actually positive but were correctly predicted by the model; F1-Score is the harmonic mean of precision and recall, used to comprehensively evaluate the model's balance ability; mAP@50 and mAP@75 represent the mean average precision (mAP) when the intersection over union threshold is 0.5 and 0.75, respectively, and mean precision is used to measure the accuracy of detection and localization; mAP@50-95 represents the mean precision from the intersection over union threshold (IoU threshold) from 0.5 to 0.95, to comprehensively evaluate the robustness of the model under different localization strictness.
[0090] Table 2 Comparison of computational efficiency indices for different models
[0091] In Table 2, "Size (MB)" (model size, unit: megabytes) represents the storage space occupied by the model file; "Params (M)" (number of parameters, unit: millions) represents the number of trainable parameters of the model, in millions, reflecting the complexity of the model; "GFLOPs" (giga floating point operations) represents the number of gigabit floating point operations required for one forward inference, used to measure computational overhead; "Inference time / image" represents the average time required for the model to process a single image; and "FPS (frames per second)" represents the number of image frames that can be processed per second, used to evaluate real-time performance, i.e., the inference speed of the model.
[0092] Combining the information in Tables 1 and 2, it can be seen that after introducing Module A, leveraging the efficiency and global perception capabilities of merging convolutional neural networks, the feature extraction quality was significantly improved, increasing mAP@50 from 0.6803 to 0.6889 and mAP@75 by 3%. Simultaneously, the number of model parameters increased to 10.1M and GFLOPs increased to 23.5. Based on Module A, Module B was further added, resulting in the A+B model. The A+B model optimized the input information flow through edge enhancement. Although the recall rate slightly decreased to 0.6193, it successfully reduced the number of parameters to 9.4M and GFLOPs to 21.8, achieving the highest FPS (260.92), highlighting the benefits of its streamlined architecture. Based on the A+B model, module C was integrated, and through a multi-scale edge semantic fusion mechanism, the accuracy was significantly improved to 0.7807, demonstrating its key role in high-confidence feature refinement. Although the model size increased to 21.1MB and the inference time increased slightly, the overall performance optimization met the requirement of low false alarm rate.
[0093] Figure 11 This is a schematic diagram of the confusion matrix of the method provided in the embodiments of this application. Figure 11 In this context, "ConfusionMatrix Normalized" represents the normalized confusion matrix. The confusion matrix is a key quantitative tool for evaluating model performance, presenting a matrix representation of the model's ability to identify various defects. Within the confusion matrix, "Label" indicates the defect type predicted by the model, "True" represents the true defect type, "background" represents a defect-free background area, "broken" represents a shape defect, "burr" represents a burr defect, "crack" represents a crack defect, "drilling_damage" represents drilling damage, "surface_missing" represents surface defects, "mold" represents mold defects, and "bug" represents insect damage. The value in each cell of the confusion matrix represents the probability that a sample with a "True" value is predicted as another defect type. The numbers on the diagonal from the top left to the bottom right of the confusion matrix represent the probability of correctly classified samples; higher probabilities are better. Values outside the diagonal represent the probability of misclassified samples; lower probabilities are better. For example, the probability of a true "mold defect" being misclassified as "background" is 0.19. In a confusion matrix, the darker the cell color, the higher the probability.
[0094] Depend on Figure 11It is evident that this application possesses excellent recognition capabilities for defect categories with clearly defined characteristics, such as "yellow stains" and "drilling damage." By enhancing the contour at the input end through a boundary enhancement input module, and then continuously guiding and fusing boundary information in the neck network using GFPM, the robustness of detection for such difficult defects is effectively improved.
[0095] Figure 12 Example diagram of the prediction result of the method provided in the embodiments of this application. Figure 12 The image displays the defect detection results for 16 images of bamboo strip products. In each image, defects identified by the model are marked with rectangles of different colors, and each rectangle is accompanied by a label of the same color, indicating the type of defect in the image. The file number of each image is displayed in the upper left corner; for example, the file number of the first image is "img_03157.bmp," and the defect type labeled for the first image is "bug," which is an insect-eaten defect. Defects of the same type across different images are marked with rectangles and labels of the same color.
[0096] Therefore, the above analysis results show that this invention, through the systematic cascading optimization of module A (RepViT backbone network), module B (EIEStem boundary enhancement input module), and module C (GFPM global feature pyramid module), forms a complete technical solution with interconnected and complementary advantages. This solution has achieved a substantial breakthrough in significantly improving the accuracy and robustness of detecting small and irregular defects, fully verifying the innovation and application value of this application.
[0097] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any way. Any simple modifications, alterations, and equivalent changes made to the above embodiments based on the inventive essence shall still fall within the protection scope of the present invention.
Claims
1. A defect detection and sorting device for bamboo strip products based on visual inspection, characterized in that, The system includes a conveying mechanism, a feeding mechanism, a detection mechanism, a sorting mechanism, and a PLC controller, all mounted on a frame (8). The PLC controller is embedded with a surface defect detection algorithm for bamboo strip products and a density detection algorithm for bamboo strip products. The detection mechanism includes multiple high-definition cameras used to capture images of the outer surface of bamboo strip products. The signal input terminal of the PLC controller is connected to the multiple high-definition cameras, and the signal output terminal of the PLC controller is connected to the sorting mechanism. The conveying mechanism is used to store bamboo strip products and transport them to the feeding mechanism; The feeding mechanism is used to deliver bamboo strip products to the testing institution one strip at a time. The testing agency obtains the density distribution of bamboo strip products by acquiring images of the two end faces of the bamboo vascular bundles, based on a density detection algorithm. The testing agency also obtains the surface defects of bamboo strip products by acquiring images of other sides of the bamboo strip products, based on a surface defect detection algorithm. The PLC controller combines the density and surface defects of the bamboo strip products to determine whether the bamboo strip products are qualified. The sorting mechanism separates and stores bamboo strip products according to whether they are qualified as determined by the testing mechanism.
2. The visual inspection-based defect detection and sorting equipment for bamboo strip products according to claim 1, characterized in that, The testing mechanism also includes a side plate (9), a third conveyor belt (6), a fourth conveyor belt (19), and a platform (7). The third conveyor belt (6) and the fourth conveyor belt (19) are installed between the two side plates (9) in sequence. The third conveyor belt (6) is connected to the feeder (5). The platform (7) is set between the third conveyor belt (6) and the fourth conveyor belt (19). Six high-definition cameras are installed on the frame (8) to capture the six sides of the bamboo strip products on the platform (7). The platform (7) is a transparent plate. The platform (7) is fixedly installed between the two side plates (9). The two sides of the platform (7) are provided with pressure rollers (17) to assist the bamboo strip products in entering the platform (7). The pressure rollers (17) are rotatably installed between the side plates (9).
3. The visual inspection-based defect detection and sorting equipment for bamboo strip products according to claim 2, characterized in that, The sorting mechanism includes cylinders (12) and push plates (13). Two cylinders (12) are installed on the side plate (9) at positions corresponding to the fourth conveyor belt (19). The actuating end of the cylinder (12) is connected to the push plate (13). A first chute (14) and a second chute (15) are opened on one of the side plates (9) at positions corresponding to the two push plates (13). The first chute (14) and the second chute (15) are respectively connected to two cargo boxes (16). The signal output end of the PLC controller is connected to the two cylinders (12) to control the cylinders (12) to extend and push the push plate (13) to push qualified and unqualified bamboo strip products into different cargo boxes (16).
4. The visual inspection-based defect detection and sorting equipment for bamboo strip products according to claim 1, characterized in that, The conveying mechanism includes a hopper (1) and a first conveyor belt (2). One end of the hopper (1) is connected to the feeding mechanism. The first conveyor belt (2) is set on the inner bottom surface of the hopper (1). The feeding mechanism includes a primary feeding swivel plate (3), a secondary feeding swivel plate (4), and a feeder (5). The primary feeding swivel plate (3) is connected to the hopper (1). The secondary feeding swivel plate (4) is located between the primary feeding swivel plate (3) and the feeder (5). The secondary feeding swivel plate (4) is equipped with multiple material distribution conveyor plates. The multiple material distribution conveyor plates are equidistantly connected to the second conveyor belt. Each material distribution conveyor plate is equipped with a vibration motor. The primary feeding swivel plate (3) is also equipped with a vibration motor. A high-precision weight sensor is set on the top material distribution conveyor plate of the secondary feeding swivel plate (4). The signal input terminal of the PLC controller is connected to the high-precision weight sensor.
5. A visual inspection-based defect detection and sorting device for bamboo strip products according to claim 4, characterized in that, Four first high-definition cameras (22) are installed on the platform (7) to capture images of the four sides of the bamboo strip products. The four first high-definition cameras (22) are connected by a fixing frame (23), which is fixedly installed on the frame (8). Feeding baffles (24) are installed on both sides of the secondary feeding slats (4). Two second high-definition cameras (10) are installed on the feeding baffles (24) corresponding to the material distribution conveyor plate at the top of the secondary feeding slats (4) to capture images of the two end faces of the bamboo fiber bundle tubes of the bamboo strip products. The second conveyor belt is installed between the feeding baffles (24). The signal input terminal of the PLC controller is connected to the four first high-definition cameras (22) and the two second high-definition cameras (10).
6. A visual inspection-based defect detection and sorting device for bamboo strip products according to claim 4, characterized in that, The feeder (5) includes a rotating shaft (20), a feed motor, and a feed plate (21). The rotating shaft (20) is rotatably mounted above the top material conveying plate of the secondary feeding swivel (4). The feed plate (21) is fixedly connected to the rotating shaft (20). The feed motor that drives the rotating shaft (20) to rotate is mounted on the frame. The distance between the feed plate (21) and the top material conveying plate of the secondary feeding swivel (4) is greater than the thickness of one bamboo strip product and less than the thickness of two bamboo strip products. The signal output terminal of the PLC controller is connected to the feed motor.
7. A visual inspection-based defect detection and sorting device for bamboo strip products according to claim 3, characterized in that, The frame (8) has two discharge ports (18), which are connected to the first chute (14) and the corresponding cargo box (16), and the second chute (15) and the corresponding cargo box (16), respectively. A distance sensor is provided on the top of the inner side wall of the cargo box (16). The frame (8) is equipped with an audible and visual alarm to indicate that the cargo box (16) is full. The signal input terminal of the PLC controller is connected to the distance sensor, and the signal output terminal of the PLC controller is connected to the audible and visual alarm.
8. A visual inspection-based defect detection and sorting device for bamboo strip products according to claim 4, characterized in that, One or more of the first high-definition cameras (22) are fixedly equipped with dust-blowing nozzles (11) for cleaning debris and dust on the platform (7).
9. A visual inspection-based defect detection and sorting device for bamboo strip products according to claim 1, characterized in that, The density defect detection using the aforementioned bamboo strip product density detection algorithm specifically includes: acquiring a surface image of the bamboo strip product with fibrous bundles, and sending the surface image into the bamboo strip product density detection algorithm to obtain the density distribution of the bamboo strip product.
10. A visual inspection-based defect detection and sorting device for bamboo strip products according to claim 1, characterized in that, The surface defect detection algorithm for bamboo strip products is used to detect surface defects, specifically including: acquiring a surface image of the bamboo strip product, sending the surface image into the bamboo strip product detection algorithm, and obtaining the surface defect detection result.