Tree internal defect stress wave tomography method
By combining the improved YOLOv8 model with stress wave tomography technology, the problem of low imaging accuracy in tree non-destructive detection is solved, high-precision and high-resolution defect imaging is achieved, and the imaging quality and sensor deployment efficiency of traditional methods are improved.
Patent Information
- Application Number
- CN202510437848.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-08-08
AI Technical Summary
The existing stress wave tomography method has low imaging accuracy in tree non-destructive detection, defect positioning and morphological reconstruction are not accurate enough, and has strong dependence on the number of sensors, which limits its application and development in the field of forest non-destructive detection.
The improved YOLOv8 model combined with stress wave tomography technology is used to train the wood defect position detection model, and the initial velocity value is obtained using tomography method, and the edge clarity is optimized with boundary constraints to achieve high-precision and high-resolution defect imaging.
With the reduction of the number of sensors, high-precision imaging of internal defects of trees is achieved, with imaging accuracy being improved by 37.91%, edge accuracy being improved by 60.87%, and defect contour positioning error being less than 2.1mm.
Smart Images

Figure CN120451301A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of non-destructive testing of forest trees, and specifically relates to a stress wave tomography method for detecting internal defects of trees, which is used for high-precision, non-destructive detection of cavity defects inside trees. Background Art
[0002] Ancient and famous trees are treasures among forest resources and invaluable natural and historical cultural heritage. Preserving these "living relics" has become a hot topic of concern for experts, scholars, and the public. Routine patrols and health monitoring of ancient and famous trees are crucial to ensuring their healthy growth. Internal defects, such as cavities and decay, can seriously affect their health.
[0003] Therefore, accurately detecting and evaluating internal defects in trees is of great practical significance. Traditional non-destructive testing methods for trees include X-rays, ultrasound, and electrical impedance tomography. However, these methods have problems such as high equipment costs, complex operations, and high operator requirements, which limit their widespread application in actual production.
[0004] As an emerging nondestructive testing method, stress wave tomography (SWT) has garnered significant attention in recent years in the field of tree nondestructive testing due to its portability, ease of operation, and low cost. This technology employs stress wave sensors placed on the surface of trees to capture signals from stress waves propagating within the tree. The technique then uses a tomographic imaging algorithm to reconstruct an image of the stress wave velocity distribution within the tree, enabling the detection and imaging of internal defects. However, existing SWT methods still face challenges in practical applications, such as low imaging accuracy, inaccurate defect location and morphological reconstruction, and a high dependence on the number of sensors. These issues have limited the further application and development of SWT in the field of forestry nondestructive testing. Summary of the Invention
[0005] The purpose of this application is to provide a stress wave tomography method for internal defects in trees, overcome the shortcomings of existing stress wave tomography methods in terms of imaging convenience and accuracy, and provide an efficient and accurate technical means for non-destructive testing of forests.
[0006] In order to achieve the above objectives, the technical solutions of this application are as follows:
[0007] A stress wave tomography method for internal defects of trees, comprising:
[0008] Obtain stress ray image samples of defective wood and establish a tree defect location detection dataset;
[0009] The tree defect location detection dataset is used to train an improved YOLOv8 wood defect location detection model;
[0010] Obtain the stress wave ray map of the tree to be tested, and use the tomography method to obtain the initial velocity values of all grid cells in the cross section of the tree to be tested;
[0011] Input the stress wave ray map of the tree to be tested into the tree defect position detection model to preliminarily locate the defect position and detect the defect area;
[0012] The initial velocity value of the grid cell is constrained and optimized according to the detected defect area, and the optimized grid cell velocity value is used for final defect imaging.
[0013] Furthermore, the wood defect position detection model adopts the backbone network of the YOLOv8 model, and the backbone network adopts a GSConv module between the two C2F modules for outputting the first and second scale features.
[0014] Furthermore, the wood defect position detection model adopts the neck network of the YOLOv8 model, and the original C2F module in the neck network is replaced by the VoVGSCSP module.
[0015] Furthermore, the wood defect position detection model adopts the backbone network and neck network of the YOLOv8 model, the GSConv module is used between the two C2F modules of the backbone network for outputting the first and second scale features, and the original C2F module in the neck network is replaced by the VoVGSCSP module.
[0016] Furthermore, the constrained adjustment and optimization of the initial velocity value of the grid unit according to the detected defect area includes:
[0017] For the grid cells in the non-defective area, the color change rate is calculated using the following formula:
[0018]
[0019] Where L represents the shortest path from the grid cell to the center of the defect area, R is the diameter of the cross section of the tree to be tested, and k is the constraint constant;
[0020] According to the color change rate, the velocity value of the grid cell in the non-defective area is optimized. The optimization formula is as follows:
[0021] V′=V-α×(VV min )
[0022] Among them, V′ is the velocity value after boundary constraint, V is the initial velocity value of the grid unit, and V min Indicates the minimum velocity value of the grid cells within the tree cross section.
[0023] Furthermore, the method of performing final defect imaging using the optimized grid cell velocity value includes:
[0024] The threshold value V of the velocity value of the grid cell in the cross section of the tree to be tested mean :
[0025]
[0026] Among them, V max and V min are the maximum and minimum velocity values of the grid cells within the tree cross section, respectively;
[0027] For each grid cell, according to the optimized grid cell velocity value V′ and V mean The size relationship is used, and the color is assigned using the piecewise linear mapping method. The RGB value C of the grid color to be assigned RGB The calculation formula is as follows:
[0028]
[0029] Finally, according to C RGB The grid cells are filled with colors to obtain the internal defect image of the wood.
[0030] This application proposes a stress wave tomography method for internal defects in trees. This method uses the YOLOv8 model to train virtual samples to achieve preliminary defect location. Combined with boundary constraints to optimize edge clarity, this method achieves high-precision, high-resolution detection and imaging of internal defects in wood, providing an efficient and accurate technical approach for non-destructive testing of forest trees. This application proposes combining the YOLOv8 model with stress wave tomography technology. By using the YOLOv8 model to detect and obtain spatial location information for defects within a conventional tomography process, this method allows for high-precision imaging of defects while reducing the number of sensors. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 Flowchart of the stress wave tomography method for internal defects in trees in this application.
[0032] Figure 2 This is a schematic diagram of the structure of the wood defect location detection model of the improved YOLOv8 embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0034] One embodiment of the present application, such as Figure 1As shown, a method for stress wave tomography of internal defects in trees is provided, comprising:
[0035] Step S1: Obtain stress ray diagram samples of defective wood and establish a tree defect location detection dataset.
[0036] This application establishes a tree defect location detection dataset. This dataset can be directly used from existing public datasets or generated using ray diagram simulation software. The ray diagram simulation software generates a corresponding stress wave velocity matrix based on the location and size of the defect, and further visualizes it as a stress wave ray diagram.
[0037] When generating stress wave ray maps, different numbers of sensors can be set, such as 6, 8, 10, or 12 sensors, to generate no less than 4,000 stress wave ray maps. Wood defect shapes include circular, quadrilateral, and polygonal shapes.
[0038] Step S2: Use the tree defect location detection dataset to train the improved YOLOv8 wood defect location detection model.
[0039] The wood defect position detection model constructed in this embodiment is as follows: Figure 2 As shown in FIG, an improvement is made based on the YOLOv8 model, which includes a backbone network (Backbone), a neck network (Neck), and a detection head (Head).
[0040] In a specific embodiment, the wood defect location detection model of this embodiment is improved based on the YOLOv8 model, including:
[0041] The wood defect position detection model adopts the backbone network of the YOLOv8 model, and the backbone network adopts a GSConv module between two C2F modules for outputting the first and second scale features.
[0042] Specifically, the backbone network of the YOLOv8 model usually outputs three scale features, where the first and second scale features are output by two C2F modules respectively. The convolution module (Conv) is originally used between these two C2F modules, and the third scale feature is output by the final SPPF module of the backbone network.
[0043] In this embodiment, the convolution module (Conv) between the two C2F modules for outputting the first and second scale features is replaced by a GSConv module.
[0044] The GSConv module combines standard convolution (Conv) with depthwise separable convolution (DWConv) to simultaneously focus on inter-channel and spatial information. Standard convolution is responsible for capturing dense connections between channels, while DWConv focuses on spatial information. By combining the two, GSConv can capture features more comprehensively, thereby improving the model's feature expression capabilities.
[0045] This example replaces the standard convolutional module (Conv) in YOLOv8 with the lightweight convolutional GSConv module. Its computational cost is approximately 60% to 70% of that of a standard convolutional module, but its learning capabilities are comparable. The GSConv module uses more efficient parameter sharing to reduce the number of parameters while maintaining feature expression capabilities, providing improved computational speed and storage efficiency, making it suitable for lightweight deployments.
[0046] In another specific embodiment, the wood defect location detection model of this embodiment is improved based on the YOLOv8 model, including:
[0047] The wood defect position detection model adopts the neck network of the YOLOv8 model, and the original C2F module in the neck network is replaced by the VoVGSCSP module.
[0048] This embodiment uses the VoVGSCSP module to replace the C2F module in the original YOLOv8 model neck network. The VoVGSCSP module improves the calculation path compared to the original C2F module, increasing the model's convergence speed and inference efficiency.
[0049] VoVGSCSP fuses feature maps from different stages through a concat operation, allowing features to be reused multiple times across different stages and layers. This design avoids repeated feature computation and redundant storage, improving feature utilization, thereby reducing the amount of computation and parameters while maintaining model performance. This embodiment uses the VoVGSCSP module to enable more comprehensive information exchange between features at different scales, thereby improving the robustness of object detection.
[0050] In another specific embodiment, the wood defect location detection model of this embodiment is improved based on the YOLOv8 model, including:
[0051] The wood defect position detection model adopts the backbone network and neck network of the YOLOv8 model. The GSConv module is used between the two C2F modules of the backbone network for outputting the first and second scale features, and the original C2F module in the neck network is replaced by the VoVGSCSP module.
[0052] This embodiment combines the two aforementioned embodiments to achieve efficient feature extraction, thereby reducing the amount of computation and parameters while maintaining model performance. It can achieve a 42.3% reduction in computational complexity and a 37.6% reduction in parameters while maintaining the model's mean average precision (mAP ≥ 84.9%).
[0053] The input of the tree defect position detection model in this embodiment is the standardized stress wave ray image, and the output is the bounding box coordinates and confidence of the defect area. Data enhancement strategies are adopted during the training process, including random rotation, translation and scaling, to improve the robustness of the model for defect position detection. During training, the stress wave ray image is input into the improved YOLOv8 wood defect position detection model, and the defect bounding box coordinates and confidence are output. The model training parameters are input resolution 727×727, batch size 16, stochastic gradient descent (SGD) optimizer, training cycle 400 times, learning rate 0.01, momentum parameter 0.937, and weight decay coefficient 0.0005. After the training is completed, the constructed tree defect position detection model can be used to preliminarily locate the defect position of the sample to be tested.
[0054] Step S3: Obtain a stress wave ray map of the tree to be tested, and use a tomography method to obtain the initial velocity values of all grid cells in the cross section of the tree to be tested.
[0055] In this step, multiple stress wave sensors are evenly distributed around the cross section of the tree being tested. An excitation device sequentially triggers the sensors to collect stress wave propagation time data at a sampling frequency of 100kHz. The raw signal is then bandpass filtered (1kHz-50kHz) to eliminate high-frequency noise. A wavelet transform is then used to denoise the signal, preserving the significant waveform features and generating a standardized velocity matrix. Finally, the velocity matrix is visualized to generate a stress wave ray map, and a tomography algorithm is used to estimate the initial stress wave velocity values for all grid cells in the sample cross section.
[0056] Tomographic imaging algorithms can employ methods such as spatial interpolation and ray segmentation. In a preferred embodiment, the shortest distance method is employed. This method is an effective stress wave imaging algorithm. It first generates a grid diagram describing the tree's cross-section. The stress wave velocity value of each grid cell is affected by nearby rays within a certain distance, and the final velocity value is determined by the velocities of all rays within the affected area.
[0057] Step S4: input the stress wave ray map of the tree to be tested into the tree defect position detection model, perform preliminary positioning of the defect position, and detect the defect area.
[0058] In this step, the stress wave ray map is input into the tree defect position detection model, a two-dimensional defect probability distribution map is output, and a high-confidence defect area is determined based on a probability threshold, thereby achieving preliminary positioning of the defect position and detecting the defect area.
[0059] Step S5: performing constraint adjustment and optimization on the initial velocity value of the grid unit according to the detected defect area, and performing final defect imaging using the optimized velocity value of the grid unit.
[0060] The adjustment and optimization of the initial velocity value of the grid cell can be achieved by using a two-stage constraint including global constraints and local constraints, or by using the following boundary constraint method.
[0061] In this embodiment, a boundary constraint method is preferably used to adjust and optimize the initial velocity values of the grid cells of the trees to be measured. Specifically, by increasing the velocity values of the grid cells in the non-defective areas, the colors of these areas are lightened, reducing the impact on the imaging results. The following operations are performed:
[0062] For the grid cells in the non-defective area, the color change rate is calculated using the following formula:
[0063]
[0064] Where L represents the shortest path from the grid cell to the center of the defect area, R is the diameter of the cross section of the tree to be tested, and k is the constraint constant.
[0065] According to the color change rate, the velocity value of the grid cell in the non-defective area is optimized. The optimization formula is as follows:
[0066] V′=V-α×(VV min )
[0067] Among them, V′ is the velocity value after boundary constraint, V is the initial velocity value of the grid unit, and V min Indicates the minimum velocity value of the grid cells in the cross section of the tree to be tested.
[0068] Finally, the optimized grid cell velocity values are used for final defect imaging. The imaging stage performs the following operations:
[0069] Calculate the threshold value V of the velocity value of the grid cell of the cross section of the tree to be tested mean :
[0070]
[0071] Among them, V max and V min are the maximum and minimum velocity values of the grid cells within the tree cross section, respectively.
[0072] For each grid cell, according to the optimized grid cell velocity value V′ and V mean The size relationship is used, and the color is assigned using the piecewise linear mapping method. The RGB value C of the grid color to be assigned RGB The calculation formula is as follows:
[0073]
[0074] Finally, according to C RGB The grid cells are filled with colors to obtain the internal defect image of the wood.
[0075] In summary, the present application provides a stress wave tomography method for internal defects of trees based on YOLOv8 algorithm-assisted positioning, which has the following technical effects: 1. It solves the problem of low model accuracy of existing tomography algorithms due to the limited number of sensors and insufficient signals in the real environment; 2. It realizes the pre-positioning of the defect position of the specimen cross section through deep learning, and provides better supplementary information for the stress wave signal in scenarios with limited number of sensors; 3. By performing targeted optimization and improvement on the YOLOv8 network, the prediction accuracy of the detection model can be effectively improved.
[0076] This application adds YOLOv8 model detection to the conventional tomography process to obtain the spatial position information of the defect, so that high-precision imaging of the defect can be achieved while reducing the number of sensors. Compared with the traditional tomography method, the sensor deployment cost of this embodiment is lower and the imaging quality is higher. This application uses a trained tree defect position detection model for auxiliary positioning. First, the stress wave signal of the tree to be tested is collected, and the stress wave ray map of the tree to be tested is obtained after preprocessing. Then, the shortest distance algorithm is applied to perform tomography and calculate the initial velocity value of the grid unit on the cross section of the tree; then the stress wave ray map is input into the trained tree defect position detection model, and a two-dimensional defect probability distribution map is output and a high-confidence defect area is determined based on the probability threshold; based on the detection results, the initial velocity value of the grid unit is constrained and adjusted and optimized, and finally the optimized grid unit velocity value is used for final defect imaging. This method can still maintain a high imaging accuracy under the condition that the number of sensors is reduced by 30%, and the defect contour positioning error is less than 2.1mm.
[0077] To verify the technical solution of this application, an experimental environment was established, including an NVIDIA RTX 3090 GPU and an Intel Core i9-10900K processor. Furthermore, the experiment was based on the Ubuntu 22.04LTS operating system and used the PyTorch 1.9.0 deep learning framework, combined with CUDA 11.1 for GPU-accelerated computing to improve training efficiency. The entire system was equipped with 128GB of memory to support large-scale data processing and model optimization.
[0078] To more accurately quantify and evaluate the effectiveness of this method in stress wave imaging, a confusion matrix is used to measure the degree of overlap between the reconstructed image and the actual defect area. The confusion matrix defines four metrics: TP, FN, FP, and TN. TP represents the area correctly predicted to be a defect, FN represents the area that is actually a defect but misclassified as healthy, FP represents the area that is misclassified as a defect, and TN represents the portion that is correctly identified and reconstructed as a healthy area.
[0079] By analyzing the statistical data in the confusion matrix, we can more comprehensively evaluate the imaging effect of this chapter's method. Based on the four classification results, we can obtain the accuracy, precision, recall rate and F1 values. The specific calculation formula is as follows:
[0080]
[0081] The experiment compared the proposed method with the traditional tomography method, and the results are shown in the following table:
[0082] Table 1
[0083]
[0084]
[0085] Experiments show that the accuracy of defect imaging using this method in an eight-sensor configuration can reach over 80.90%, a 37.91% improvement over traditional tomography methods. Edge accuracy is also improved by over 60.87% compared to traditional tomography methods.
[0086] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A stress wave tomography method for internal defects in trees, characterized in that: The tree internal defect stress wave tomography method comprises: Obtain stress ray image samples of defective wood and establish a tree defect location detection dataset; The tree defect location detection dataset is used to train an improved YOLOv8 wood defect location detection model; Obtain the stress wave ray map of the tree to be tested, and use the tomography method to obtain the initial velocity values of all grid cells in the cross section of the tree to be tested; Input the stress wave ray map of the tree to be tested into the tree defect position detection model to preliminarily locate the defect position and detect the defect area; The initial velocity value of the grid cell is constrained and optimized according to the detected defect area, and the optimized grid cell velocity value is used for final defect imaging.
2. The method for stress wave tomography of internal defects in trees according to claim 1, characterized in that: The wood defect position detection model adopts the backbone network of the YOLOv8 model, and the backbone network adopts a GSConv module between two C2F modules for outputting the first and second scale features.
3. The stress wave tomography method for internal defects of trees according to claim 1, characterized in that: The wood defect position detection model adopts the neck network of the YOLOv8 model, and the original C2F module in the neck network is replaced by the VoVGSCSP module.
4. The method for stress wave tomography of internal defects in trees according to claim 1, characterized in that: The wood defect position detection model adopts the backbone network and neck network of the YOLOv8 model. The GSConv module is used between the two C2F modules of the backbone network for outputting the first and second scale features, and the original C2F module in the neck network is replaced by the VoVGSCSP module.
5. The method for stress wave tomography of internal defects in trees according to claim 1, characterized in that: The constrained adjustment and optimization of the initial velocity value of the grid unit according to the detected defect area includes: For the grid cells in the non-defective area, the color change rate is calculated using the following formula: Where L represents the shortest path from the grid cell to the center of the defect area, R is the diameter of the cross section of the tree to be tested, and k is the constraint constant; According to the color change rate, the velocity value of the grid cell in the non-defective area is optimized. The optimization formula is as follows: V′=V-α×(VV min ) Among them, V′ is the velocity value after boundary constraint, V is the initial velocity value of the grid unit, and V min Indicates the minimum velocity value of the grid cells within the cross section of the cc tree.
6. The method for stress wave tomography of internal defects in trees according to claim 1, characterized in that: The method of performing final defect imaging using the optimized grid cell velocity value includes: The threshold value V of the velocity value of the grid cell in the cross section of the tree to be tested mean : Among them, V max and V min are the maximum and minimum velocity values of the grid cells within the tree cross section, respectively; For each grid cell, according to the optimized grid cell velocity value V′ and V mean The size relationship is used, and the color is assigned using the piecewise linear mapping method. The RGB value C of the grid color to be assigned RGB The calculation formula is as follows: Finally, according to C RGB The grid cells are filled with colors to obtain the internal defect image of the wood.