A deep learning-based wood internal defect detection and three-dimensional reconstruction method

CN122820531APending Publication Date: 2026-09-25NORTHEAST FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610300748.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-12
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

这种脱节的现象导致了检测与重建环节的脱离:一方面,现有的检测结果未能有效驱动自动化且高质量的重建过程;另一方面,传统的三维重建方法并未充分利用检测阶段所提供的先验知识,无法有效提升重建的精度与效率

Benefits of technology

[0032]本发明改进了现有的木材内部缺陷检测与三维重建方法,提出了一种融合改进深度学习网络与语义引导优化重建的技术方案,用于解决检测与重建环节脱节、三维模型保真度不足的问题;本发明有效地融合了高层语义特征与三维几何生成过程,实现了从CT图像到高保真、可量化三维缺陷模型的端到端自动生成;与现有技术相比,本发明在分割精度、三维模型几何保真度及空间信息完整性方面有显著提升;本发明的技术方案通过端到端的深度学习与优化流程,减少了手动后处理的需求,提高了自动化程度,并适用于多种木材树种和缺陷类型的检测;本发明能够在不同生产批次与质量检测需求下具有较好的兼容性与适应能力;本发明的方案通过语义特征复用与优化算法的协同设计,优化了处理流程,并在一定程度上降低了计算成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application provides a wood internal defect detection and three-dimensional reconstruction method based on deep learning, and relates to the cross field of computer vision, deep learning and three-dimensional reconstruction technology. The method comprises the following steps: collecting wood CT images, constructing a data set through data labeling and enhancement; constructing an SCV-YOLOv8n model, introducing a spatial pyramid pooling fast cross-stage partial channel (SPPFCSPC) and a convolution block attention module (CBAM) to enhance feature extraction and segmentation accuracy; training the model using the data set until the model converges; inputting the to-be-detected CT image into the trained model to output the segmentation mask and category information of the defect; and finally, inputting the segmentation mask into an improved three-dimensional visualization module (VTK) to generate a smooth and real three-dimensional model. The method can realize three-dimensional visualization representation of the internal defect structure of wood, has good compatibility and adaptability, optimizes the processing flow, and reduces the calculation cost to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision, deep learning and 3D reconstruction technology, mainly to the field of non-destructive testing and 3D reconstruction of wood defects, specifically a deep learning-based method for detecting and reconstructing internal defects in wood. Background Technology

[0002] Internal defects in wood directly affect its mechanical properties and processing quality, thus determining its material grade and economic value. Accurate detection and three-dimensional reconstruction of internal wood defects are of great significance to the wood processing industry. Traditional methods for detecting internal wood defects can only provide indirect, localized information, making it difficult to accurately and comprehensively obtain the three-dimensional morphology and spatial distribution of defects, which is detrimental to three-dimensional reconstruction.

[0003] Computed tomography (CT) technology provides a high-resolution imaging solution for the aforementioned problems. Combined with deep learning algorithms, it enables high-precision localization and classification of internal defects in CT images. However, since the output of deep learning algorithms is usually a two-dimensional bounding box or mask, there is a significant gap between it and the solid model that can support three-dimensional spatial analysis and processing decisions. Furthermore, when dealing with complex wood defect structures, general-purpose 3D visualization tools (such as the standard VTK module) often generate 3D models with problems such as surface roughness, structural discontinuities, and boundary distortion, resulting in insufficient fidelity.

[0004] To address these challenges, existing research primarily focuses on optimizing defect detection algorithms or improving general 3D reconstruction workflows, often neglecting the necessity of deep coupling between the two. Specifically, current technologies lack an integrated, systematic approach when combining high-precision defect detection with high-fidelity 3D reconstruction. This disconnect leads to a separation between the detection and reconstruction stages: on the one hand, existing detection results fail to effectively drive an automated and high-quality reconstruction process; on the other hand, traditional 3D reconstruction methods do not fully utilize the prior knowledge provided in the detection stage, failing to effectively improve the accuracy and efficiency of reconstruction. Summary of the Invention

[0005] Based on this, in order to solve the above-mentioned technical problems, this invention innovatively proposes a deep learning-based method for detecting and reconstructing internal defects in wood, aiming to improve the geometric fidelity and structural continuity of the three-dimensional reconstruction model of internal defects in wood.

[0006] To achieve the above objectives, the present invention solves the above technical problems through the following technical solutions:

[0007] This invention provides a deep learning-based method for detecting and reconstructing internal defects in wood in three dimensions, achieved through the following steps:

[0008] First, two types of wood samples, poplar and red pine, were collected and cross-sectional CT scans were performed to obtain a series of cross-sectional CT images for each wood sample. The acquired CT images were then subjected to size standardization and cropping preprocessing. Based on the density and texture differences in the size-standardized and cropped CT images, the defect areas were pixel-level labeled to generate segmentation mask images as the baseline ground truth. The labeled CT images and CT segmentation mask images were divided into training set, validation set and test set according to the principle of spatial continuity of defect segments. Data augmentation was performed on the images and their masks in the training set to expand the sample size.

[0009] Secondly, a deep learning-based wood internal defect detection network model SCV-YOLOv8n is proposed. The backbone network extracts multi-layer features, the neck network fuses the features, and the head network generates a pixel-level segmentation mask based on the fused features. In the backbone network, a spatial pyramid pooling fast cross-stage partial channel (SPPFCSPC) module and a convolutional block attention module (CBAM) are introduced to enhance the ability to fuse multi-scale contextual information and the attention to key defect features.

[0010] Finally, the mask data output by the model is input into the improved VTK 3D reconstruction module to perform 3D reconstruction of internal defects in the wood. The improved VTK module introduces boundary edge smoothing and refinement (BESR), feature connectivity adjustment (FCA), and boundary curvature guidance (BCG) sub-modules to optimize the boundary continuity, internal structural coherence, and geometric fidelity of the 3D model.

[0011] Furthermore, the acquired images undergo preprocessing, annotation, dataset partitioning, and data augmentation. Specifically, this includes: using an online image annotation tool to annotate defective regions based on the grayscale contrast characteristics of defective and healthy wood in CT images, assigning category labels to each defect, generating annotation files paired with CT images, selecting only CT images containing defects, dividing each continuous defect segment into training, validation, and test sets according to a preset ratio, and ensuring that images from the same continuous segment appear only in one subset; and performing augmentation operations sequentially on the training set images, including at least one of random cropping, brightness adjustment, Gaussian noise addition, rotation and flipping, and mosaic stitching.

[0012] The further SCV-YOLOv8n model includes a backbone network, a neck network, and a head network connected in sequence. The backbone network adopts a CSPDarknet-based architecture and incorporates the spatial pyramid pooling fast cross-stage partial channel module and the convolutional block attention module, using the SiLU activation function. The neck network performs feature fusion using a fusion path aggregation network (PAN) and a feature adaptation network (FAN), also using the SiLU activation function. The head network adopts a decoupled head structure and outputs the pixel-level segmentation mask and the corresponding defect category information.

[0013] Furthermore, the specific steps for inputting the mask data into the improved VTK 3D reconstruction pipeline for 3D reconstruction are as follows:

[0014] Step 1, Data Reading and Color Separation: Use the VTK image reader to read the pixel-level segmentation mask sequence, use the VTK image extraction component to separate the independent images of each defect according to the color channel corresponding to the defect category label, and use VTK image thresholding to binarize each channel image to generate a binary mask sequence containing only a single category of defect region;

[0015] Step 2, Initial 3D Surface Reconstruction: The VTK moving cube algorithm is applied to reconstruct the 3D isosurface of the binary mask sequence of each type of defect obtained in Step 1, generating an initial 3D surface model represented by a triangular mesh.

[0016] Step 3, Spatial localization and volume quantization: By traversing the stack of CT images, determine the starting slice number where the defect voxel is located. With end slice number Each slice has a thickness of m along the z-axis, where m = 1.2 mm, and the number of non-zero defect voxels is statistically analyzed. And by combining the voxel dimension V, the defect volume is calculated. The calculation formula is:

[0017]

[0018]

[0019]

[0020] in and These represent the depths of the defect's start and end points from the reference plane, respectively.

[0021] Step 4, Backbone Enhancement and Segmentation Refinement (BESR): This step involves refining the high-level semantic and spatial attention feature maps output from the last convolutional block of the SCV-YOLOv8n model backbone network. The original voxel intensity of the initial 3D model generated in step 2 is adjusted by adaptive weighted fusion. To refine this, the specific fusion and correction process follows the formula:

[0022]

[0023] in This represents the convolution operation. The weighting coefficient used to balance the original voxel strength and feature-guided correction is empirically set to 1.2. This step utilizes deep features of the segmentation network to enhance the semantic continuity of voxel data in 3D reconstruction, thereby optimizing the quality of subsequent surface reconstruction.

[0024] Step 5, Frequency Compensation Adjustment (FCA): The 3D model processed in Step 4 is further processed by the frequency compensation adjustment module. After binarization, this module minimizes the two-dimensional mask features. Projection of three-dimensional voxel features The difference loss between features is used to maintain feature consistency, and its loss function is:

[0025]

[0026] Where P represents the projection mapping from three dimensions to two dimensions;

[0027] Step 6, Boundary Continuity Geometry Optimization (BCG): The 3D model processed in Step 5 is further processed by the Boundary Continuity Geometry Optimization module. This module introduces geometric constraints based on curvature and gradient to the reconstructed surface during the surface reconstruction stage. For regularization optimization, the constraint term formula is:

[0028]

[0029] in, and These are regularization parameters, with values ​​of 0.3 and 0.7 respectively. The square of the gradient magnitude;

[0030] Step 7, Output Model: After processing in Step 6, output the final optimized high-fidelity 3D visualization model of the defects.

[0031] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0032] This invention improves existing methods for detecting internal defects in wood and reconstructing 3D structures. It proposes a technical solution that integrates an improved deep learning network with semantically guided optimization to address the disconnect between detection and reconstruction processes and insufficient fidelity in 3D models. This invention effectively integrates high-level semantic features with the 3D geometry generation process, achieving end-to-end automatic generation from CT images to high-fidelity, quantifiable 3D defect models. Compared to existing technologies, this invention significantly improves segmentation accuracy, 3D model geometric fidelity, and spatial information integrity. The technical solution reduces the need for manual post-processing and increases automation through an end-to-end deep learning and optimization process, making it applicable to the detection of various wood species and defect types. This invention demonstrates good compatibility and adaptability under different production batches and quality inspection requirements. The solution optimizes the processing flow and reduces computational costs to some extent through the collaborative design of semantic feature reuse and optimization algorithms. Attached Figure Description

[0033] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0034] Figure 1 A flowchart of a deep learning-based method for detecting and reconstructing internal defects in wood for an embodiment of the invention;

[0035] Figure 2 CT scan images of three types of internal defects in two types of wood provided in embodiments of the present invention;

[0036] Figure 3 A schematic diagram of the SCV-YOLOv8n deep learning detection network structure provided in an embodiment of the present invention;

[0037] Figure 4 Figure 1 shows the comparative experimental results of different methods provided in the embodiments of the present invention.

[0038] Figure 5 The ablation experiment results of the SPPFCSPC module and CBAM module are introduced into the SCV-YOLOv8n model provided in the embodiments of the present invention;

[0039] Figure 6 A comparison of the original VTK 3D reconstruction results with the 3D reconstruction map generated by SCV-YOLOv8n is provided for embodiments of the present invention. Detailed Implementation

[0040] The technical solution of the present invention will be clearly and completely described below with reference to specific embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0041] Example:

[0042] This embodiment uses a dataset of two tree species, Korean pine and poplar, and employs CT scanning to predict the types of internal defects in their wood. These two species are introduced as research subjects because they are highly representative of timber resources and occupy an important position in the timber industry, with widespread applications in related fields. Korean pine wood contains decay and void defects, while poplar wood contains knot defects. The successful application of the method described in this embodiment to the detection of defects in Korean pine and poplar wood is typical and can be extended to other similar woods, demonstrating strong representativeness.

[0043] like Figure 1 The steps shown in the example are as follows:

[0044] First, wood samples were collected and CT images were acquired. Under the same environmental conditions, continuous cross-sectional scanning was performed using a CT scanner to obtain a series of CT images of internal wood defects. The CT scanner was used to scan the internal defect images, and its scanning parameters were configured as follows: tube voltage 120 kVp, tube current 100 mA, slice thickness 0.8 mm, gantry rotation speed 0.4 sec / revolution, sample feed speed 1 cm / s, original image resolution 896×896 pixels, and three defect categories. During training, all original CT images were standardized and cropped to 640×640 pixels, and density and texture differences between defective areas and healthy wood (represented by grayscale contrast) were analyzed. Figure 2 As shown, after manual annotation using the online image annotation tool RoboFlow, corresponding segmentation mask images were generated as the baseline ground truth. All annotated image-mask pairs were divided into training, validation, and test sets in a 14:3:3 ratio according to the spatial continuity principle of defect segments, ensuring that all CT image slices from the same physical contiguous segment appear in only one subset. Data augmentation was performed using at least one technique, including random cropping, brightness adjustment, Gaussian noise addition, rotation and flipping, and mosaic enhancement. After the above processing, a high-quality augmented training dataset was finally constructed.

[0045] Secondly, a deep learning-based wood internal defect detection network model, SCV-YOLOv8n, is proposed, such as... Figure 3As shown, the model uses a backbone network to extract multi-layer features from CT images of internal defects in wood, a neck network to fuse the features, and a head network to generate corresponding pixel-level segmentation masks based on the fused features. The model introduces a Spatial Pyramid Pooling Fast Cross-Stage Partial Channel (SPPFCSPC) module and a Convolutional Block Attention (CBAM) module into the backbone network to enhance the ability to fuse multi-scale contextual information and the attention weights for key defect features.

[0046] Finally, the mask data output by the model is input into the improved Visualization Toolkit (VTK) 3D reconstruction module to perform 3D reconstruction of internal defects in the wood. The improved VTK pipeline integrates boundary edge smoothing and refinement (BESR), feature connectivity adjustment (FCA), and boundary curvature guidance (BCG) sub-modules to optimize the boundary continuity, internal structural coherence, and geometric fidelity of the 3D model.

[0047] In this embodiment of the invention, the SCV YOLOv8n model includes a backbone network, a neck network, and a head network connected in sequence. The backbone network adopts a CSPDarknet-based architecture and integrates the spatial pyramid pooling fast cross-stage partial channel module and the convolutional block attention module, using the SiLU activation function. The neck network fuses the path aggregation network (PAN) and the feature adaptation network (FAN) for feature fusion, also using the SiLU activation function. The head network adopts a decoupled head structure and outputs the pixel-level segmentation mask and the corresponding defect category information.

[0048] In this embodiment of the invention, the specific steps for inputting mask data into the improved VTK 3D reconstruction pipeline for 3D reconstruction are as follows:

[0049] Step 1, Data Reading and Color Separation: Use the VTK image reader to read the pixel-level segmentation mask sequence, use the VTK image extraction component to separate the independent images of each defect according to the color channel corresponding to the defect category label, and use VTK image thresholding to binarize each channel image to generate a binary mask sequence containing only a single category of defect region;

[0050] Step 2, Initial 3D Surface Reconstruction: The VTK moving cube algorithm is applied to reconstruct the 3D isosurface of the binary mask sequence of each type of defect obtained in Step 1, generating an initial 3D surface model represented by a triangular mesh.

[0051] Step 3, Spatial localization and volume quantization: By traversing the stack of CT images, determine the starting slice number where the defect voxel is located. With end slice number Each slice has a thickness of m along the z-axis, where m = 1.2 mm, and the number of non-zero defect voxels is statistically analyzed. And by combining the voxel dimension V, the defect volume is calculated. The calculation formula is:

[0052]

[0053]

[0054]

[0055] in and These represent the depths of the defect's start and end points from the reference plane, respectively.

[0056] Step 4, Backbone Enhancement and Segmentation Refinement (BESR): This step involves refining the high-level semantic and spatial attention feature maps output from the last convolutional block of the SCV-YOLOv8n model backbone network. The original voxel intensity of the initial 3D model generated in step 2 is adjusted by adaptive weighted fusion. To refine this, the specific fusion and correction process follows the formula:

[0057]

[0058] in This represents the convolution operation. The weighting coefficient used to balance the original voxel strength and feature-guided correction is empirically set to 1.2. This step utilizes deep features of the segmentation network to enhance the semantic continuity of voxel data in 3D reconstruction, thereby optimizing the quality of subsequent surface reconstruction.

[0059] Step 5, Frequency Compensation Adjustment (FCA): The 3D model processed in Step 4 is further processed by the frequency compensation adjustment module. After binarization, this module minimizes the two-dimensional mask features. Projection of three-dimensional voxel features The difference loss between features is used to maintain feature consistency, and its loss function is:

[0060]

[0061] Where P represents the projection mapping from three dimensions to two dimensions;

[0062] Step 6, Boundary Continuity Geometry Optimization (BCG): The 3D model processed in Step 5 is further processed by the Boundary Continuity Geometry Optimization module. This module introduces geometric constraints based on curvature and gradient to the reconstructed surface during the surface reconstruction stage. For regularization optimization, the constraint term formula is:

[0063]

[0064] in, and These are regularization parameters, with values ​​of 0.3 and 0.7 respectively. The square of the gradient magnitude;

[0065] Step 7, Output Model: After processing in Step 6, output the final optimized high-fidelity 3D visualization model of the defects.

[0066] In this embodiment of the invention, Mask R-CNN, U-Net, Enet, RefineNet, and YOLOv8n-seg were mainly selected as comparison models to evaluate the performance of the SCV-YOLOv8n model on the task of segmenting internal defects in wood. To ensure the reliability of the experiment, all comparison models were trained and tested under the same dataset, hardware environment, and hyperparameter settings. Figure 4 As shown, the MPA and MIoU comparisons of each model on the joint dataset of decay and void and the node subset dataset are presented. The number of parameters (GFLOPs) and inference speed (FPS) for each model are also provided as references for efficiency evaluation. The results show that the SCV-YOLOv8n model outperforms all compared methods in segmentation accuracy while maintaining a good balance in efficiency, demonstrating significant superiority. This is because SCV-YOLOv8n enhances the model's ability to extract and discriminate complex textures and weak edge features. Experiments demonstrate the effectiveness and superiority of the proposed model in solving the problem of accurate segmentation of multiple types of defects inside wood.

[0067] During model training, the SPPFCSPC and CBAM modules are introduced to enhance multi-scale context fusion and feature discrimination capabilities, respectively. For example... Figure 5As shown, ablation studies were conducted to compare the segmentation prediction heatmaps of the baseline model, the model with individual modules added, and the complete SCV-YOLOv8n model on typical CT slices. The results show that after introducing the CBAM module, the model's activation response to defect edge regions (especially low-contrast decayed areas) is significantly enhanced and more focused, while background noise from false activations is reduced. Furthermore, the introduction of the SPPFCSPC module enables the model to generate coherent and complete prediction regions for defects of different sizes (such as large cavities and small nascent decay). The combination of these two modules effectively improves boundary accuracy and region coherence while maintaining high activation intensity, demonstrating the synergistic effect of these two modules in feature extraction.

[0068] Figure 6 As shown, using two types of wood samples—"red pine (including decay and cavities)" and "poplar (including knots)"—as examples, the comparison of the performance of the baseline VTK pipeline and the improved VTK pipeline integrating BESR, FCA, and BCG modules in 3D reconstruction is presented. Experimental results show that the improved VTK pipeline can generate smoother and more coherent 3D surfaces, reduce false holes, and enhance the clarity of intersecting boundaries when reconstructing decay and cavity defects in the red pine sample. For knot defects in the poplar sample, the improved pipeline can better preserve the irregular geometric details and sharp edge features of the knots. Through the BESR module, semantic features can refine the voxel data; the FCA module ensures the consistency between 2D and 3D features; and the BCG module optimizes surface curvature and continuity from a geometric perspective. The synergistic effect of these three modules effectively solves the problems of noise, discretization, and loss of detail in traditional voxel reconstruction methods.

[0069] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

[0070] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0071] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0072] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for detecting and reconstructing three-dimensional defects in wood based on deep learning, characterized in that, The method includes: Wood samples were collected and cross-sectional CT scans were performed using CT scanning equipment to obtain a series of cross-sectional CT images for each wood sample. The acquired CT images were dimensionally standardized and pre-processed by cropping. Based on the density and texture differences in the CT images after dimensional standardization and cropping, the defect areas were annotated at the pixel level to generate segmentation mask images as the baseline ground truth. The annotated CT images and CT segmentation mask images were divided into training set, validation set and test set according to the principle of spatial continuity of defect segments. Data augmentation was performed on the images and their masks in the training set to expand the sample size. A deep learning network for detecting internal defects in wood, SCV-YOLOv8n, is proposed. The backbone network extracts multi-layer features, the neck network fuses the features, and the head network generates a pixel-level segmentation mask based on the fused features. In the backbone network, a spatial pyramid pooling fast cross-stage partial channel (SPPFCSPC) module and a convolutional block attention module (CBAM) are introduced. The mask data output by the model is input into the improved VTK 3D reconstruction module to perform 3D reconstruction of internal defects in the wood; the improved VTK module introduces boundary edge smoothing and refinement (BESR), feature connectivity adjustment (FCA), and boundary curvature guidance (BCG) sub-modules.

2. The method for detecting and reconstructing internal defects in wood based on deep learning according to claim 1, characterized in that, The preprocessing, annotation, dataset partitioning, and data augmentation of the acquired images include: Based on the grayscale contrast features of defective and healthy wood in CT images, the defective areas are labeled using a labeling tool, and a category label is assigned to each defect. A labeling file paired with the CT image is generated. CT images containing defects are selected, and each continuous defect segment is divided into a training set, a validation set, and a test set according to a preset ratio, ensuring that images from the same continuous segment appear in a subset. The training set images are subjected to enhancement operations in sequence, including at least one of random cropping, brightness adjustment, Gaussian noise addition, rotation and flipping, and mosaic stitching.

3. The method for detecting and reconstructing internal defects in wood based on deep learning according to claim 1, characterized in that, The SCV-YOLOv8n model comprises a backbone network, a neck network, and a head network connected in sequence. The backbone network adopts a CSPDarknet-based architecture and incorporates the spatial pyramid pooling fast cross-stage partial channel module and the convolutional block attention module, using the SiLU activation function. The neck network fuses features using a fusion path aggregation network (PAN) and a feature adaptation network (FAN), also employing the SiLU activation function. The head network uses a decoupled head structure and outputs the pixel-level segmentation mask and corresponding defect category information.

4. The method for detecting and reconstructing internal defects in wood based on deep learning according to claim 1, characterized in that, The specific steps for inputting the mask data into the improved VTK 3D reconstruction module to perform 3D reconstruction are as follows: Step 1, Data Reading and Color Separation: Use the VTK image reader to read the pixel-level segmentation mask sequence, use the VTK image extraction component to separate the independent images of each defect according to the color channel corresponding to the defect category label, and use VTK image thresholding to binarize each channel image to generate a binary mask sequence containing only a single category of defect region; Step 2, Initial 3D Surface Reconstruction: The VTK moving cube algorithm is applied to reconstruct the 3D isosurface of the binary mask sequence of each type of defect obtained in Step 1, generating an initial 3D surface model represented by a triangular mesh. Step 3, Spatial localization and volume quantization: By traversing the stack of CT images, determine the starting slice number where the defect voxel is located. With end slice number Each slice has a thickness of m along the z-axis, and the number of non-zero defect voxels is statistically analyzed. And by combining the voxel dimension V, the defect volume is calculated. The calculation formula is: ;; ; ; in and These represent the depths of the defect's start and end points from the reference plane, respectively. Step 4, Backbone Enhancement and Segmentation Refinement (BESR): This step involves refining the high-level semantic and spatial attention feature maps output from the last convolutional block of the SCV-YOLOv8n model backbone network. The original voxel intensity of the initial 3D model generated in step 2 is adjusted by adaptive weighted fusion. To refine this, the specific fusion and correction process follows the formula: ; Where Conv represents the convolution operation. These are the weighting coefficients used to balance the original voxel strength with the feature-guided correction. Step 5, Frequency Compensation Adjustment (FCA): The 3D model processed in Step 4 is further processed by the frequency compensation adjustment module. After binarization, this module minimizes the two-dimensional mask features. With 3D voxel feature projection The difference loss is used to maintain feature consistency, and its loss function is: ; Where P represents the projection mapping from three dimensions to two dimensions; Step 6, Boundary Continuity Geometry Optimization (BCG): The 3D model processed in Step 5 is further processed by the Boundary Continuity Geometry Optimization module. This module introduces geometric constraints based on curvature and gradient to the reconstructed surface during the surface reconstruction stage. For regularization optimization, the constraint term formula is: ; in, and For regularization parameters, The square of the gradient magnitude; Step 7, Output Model: After processing in Step 6, output the final optimized high-fidelity 3D visualization model of the defects.