Non-intrusive wood internal cavity detection method based on Transform framework constraint
Through the non-invasive cavity detection method based on the Transformer framework, the stress wave signal is processed using the receptive field attention convolution and attention mechanism, the signal attenuation and positioning problems in forest hole detection are solved, and high-precision cavity recognition and detection are achieved.
Patent Information
- Application Number
- CN202510690369.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-26
AI Technical Summary
When the existing non-destructive detection sensors of forest hollow defects face variable temperature and humidity, electromagnetic interference and vegetation occlusion in the forest area, the signal is prone to attenuation or distortion, making it difficult to accurately locate the position and size of the hole, and lack an adaptive correlation mechanism for signal characteristics, resulting in a decrease in detection accuracy.
The non-invasive wood internal cavity detection method based on the Transformer framework is adopted. By introducing receptive field attention convolution, CGA attention mechanism and EMA attention mechanism, and combining stress wave sensors for signal processing, the precise feature extraction and correlation of stress wave signals is achieved.
It improves the feature extraction and generalization capabilities of the hollow recognition model, and can perform accurate hollow detection under the interference of waves of multiple propagation paths, improves detection accuracy and accuracy, and reduces computing complexity and memory requirements.
Smart Images

Figure CN120539276A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of forest resource protection, and in particular to a non-invasive wood internal cavity detection method based on Transformer framework constraints. Background Art
[0002] IoT-based tree cavity defect detection sensors are intelligent monitoring tools in forest resource protection systems. Using non-destructive detection technologies such as acoustic, infrared, and stress waves, they collect real-time data on the internal structure of tree trunks and identify abnormal cavities caused by insect infestation, decay, or other damage, thereby overcoming the low efficiency and limited coverage of traditional manual inspections. These sensors are deployed in a grid-like manner at key nodes in forest areas, enabling 24 / 7 dynamic monitoring. The collected data is synchronized to a cloud platform via wireless transmission networks for multi-dimensional correlation analysis with historical databases, pest and disease models, and environmental parameters. Accurate cavity detection results provide forestry departments with precise early warning of pests and diseases, assisting in the development of targeted felling plans and pest and disease control programs for at-risk trees. This not only significantly reduces the risk of fires caused by structural instability but also reduces the waste of ecological resources by scientifically planning the timber harvesting cycle. Ultimately, this creates a smart forestry management system that integrates disaster prevention and control, ecological conservation, and resource optimization, driving a paradigm shift in forest management from passive response to intelligent predictive analysis.
[0003] Although non-destructive detection sensors for tree cavity defects have demonstrated significant advantages in forest resource management, they still encounter many challenges in actual operation. The variable temperature and humidity, electromagnetic interference, and vegetation obstruction in forest areas can easily cause sensor signal attenuation or distortion. For example, acoustic wave detection may be interfered with by wind or animal activity, and infrared-based detection methods may be affected by rainy and foggy weather, resulting in reduced detection accuracy. In existing stress wave technology, when stress waves propagate in wood with an annual ring structure and anisotropic xylem, their wave velocity is not only affected by the density gradient and exhibits a dispersion effect, but the amplitude attenuation also produces coupled oscillations with the water transport channel, resulting in the signal obtained by a single sensor being essentially a superposition of waves from multiple propagation paths. Therefore, stress wave-based non-destructive detection sensors are still unable to accurately detect the location and size of cavities inside trees.
[0004] After extensive research, the inventors found that there are two main problems:
[0005] (1) Since trees are non-uniform media, stress waves will be reflected and refracted multiple times due to heterogeneous structures such as annual rings and cracks. Existing sensors cannot effectively separate the characteristic information and interference components in the mixed signals, making it difficult to accurately locate the cavity position in the signal ray diagram of stress wave propagation.
[0006] (2) The physical boundaries of the cavities inside trees are fuzzy, and existing sensor systems generally lack an adaptive correlation mechanism for signal features. In particular, they fail to establish a dynamic mapping model between the propagation characteristics of acoustic / optical / electromagnetic signals and the physical parameters of the medium (such as density, humidity, and anisotropy). This defect directly leads to the fact that in forestry application scenarios, even with the use of advanced imaging algorithms (such as quantum radar and terahertz detection), it is still difficult to accurately describe the location and size of the cavities inside trees. Therefore, the development of a signal feature correlation framework with physical constraints has become a key scientific issue to improve the accuracy of forest cavity detection. The detection method lacks a signal feature correlation mechanism, which makes it difficult to accurately describe the size of the cavities inside trees. Summary of the Invention
[0007] In order to solve the above-mentioned technical problems, realize accurate feature extraction of stress wave signals, analyze the intrinsic relationship between stress wave signal features, and realize accurate detection of forest internal cavity defect detection sensors, the present invention provides a non-invasive wood internal cavity detection method based on Transformer framework constraints.
[0008] The technical solutions adopted are as follows:
[0009] A non-invasive wood cavity detection method based on Transformer framework constraints includes a signal processor and a stress wave sensor. The stress wave sensor includes a plurality of signal detectors connected to the signal processor. The signal processor is embedded with a cavity recognition model based on the Transformer framework. In the cavity recognition model, the conv convolution in the Transformer framework is replaced with the receptive field attention convolution, and the convolution kernel parameters of the stress wave signal are dynamically adjusted. The detection method includes the following steps:
[0010] Step 1: attaching a stress wave sensor to the surface of a tree so that multiple signal detectors on the stress wave sensor are evenly distributed around the same horizontal cross section of the tree surface;
[0011] Step 2: Use an electronic hammer to strike each signal detector in turn, and the stress wave signal generated by each signal detector is received by the signal detectors at other positions;
[0012] Step 3: The signal processor calculates the stress wave signals obtained by the signal detectors at each position to obtain the stress wave velocity information transmitted between the signal detectors, and visualizes it into a stress wave velocity ray diagram using RGB colors;
[0013] Step 4, correcting each wave velocity ray in the stress wave velocity ray diagram to obtain a corrected stress wave ray diagram;
[0014] Step 5: Input the corrected stress wave signal into the cavity recognition model for processing, and output the visualized position and size of the defective tree cavity.
[0015] Preferably, the EMA attention mechanism is introduced into the backbone network of the Transformer framework to dynamically adjust the attention weights of the stress wave signal features input by each signal detector.
[0016] Furthermore, the CGA attention mechanism is introduced into the encoder of the Transformer framework to group and cascade the adjusted stress wave signals of each signal detector.
[0017] Preferably, in step 3, the expression of the non-radial stress wave propagation velocity is used to correct the stress wave ray diagram, and the expression is:
[0018]
[0019] Among them, V′ R is the propagation velocity of the corrected stress wave on the cross-sectional diameter of the tree, referred to as radial wave velocity, v NR represents the non-radial wave velocity, and θ is the angle between the two propagation paths formed by the same signal detector.
[0020] Preferably, 6 to 12 signal detectors are arranged on the same horizontal plane on the tree surface.
[0021] Further preferably, the receptive field attention convolution performs dynamic parameter adjustment of the convolution kernel parameters on the stress wave signal, and the specific method is:
[0022] The receptive field attention convolution uses a spatial attention module to perform spatial dimension analysis on the signal obtained in the stress wave sensor to generate an attention weight map. The obtained attention weight map is used to multiply the attention weight with the weight of the convolution kernel, and the parameters of the convolution kernel are dynamically adjusted so that the weight of the convolution kernel at key positions is increased and the weight at secondary positions is reduced.
[0023] The technical solution of the present invention has the following advantages:
[0024] A. This invention replaces the existing Conv convolution with receptive field attention convolution in the Transformer framework, facilitating effective physical constraint association of feature signals and accurately describing the size of cavities within trees. By further introducing the CGA attention mechanism and the EMA attention mechanism, this invention effectively improves the feature extraction and generalization capabilities of the cavity recognition model. The resulting cavity recognition model, formed by combining these three mechanisms, enhances cavity identification and detection capabilities. The effectiveness of the cavity recognition model was verified through ablation experiments, comparative experiments with different datasets, and comparative experiments with different models. In the ablation experiments, the detection method of this invention achieved a 14.6% improvement in mean average perceptual accuracy (mAP) compared to the existing Transformer model, and was able to accurately detect cavities even in the presence of interference from multiple propagation paths.
[0025] B. To address the complex changes in internal signal characteristics of stress wave sensors and the difficulty in extracting time series signal features, this paper uses the Detection Transformer as the main framework and replaces the original Conv convolution with Receptive Field Attention Convolution (RFAConv). The Transformer framework is suitable for processing time series-based data, and Receptive Field Attention Convolution can realize convolution kernel parameter sharing. In this way, signal features can be closely combined while retaining important feature information, further improving the accuracy of target detection.
[0026] C. This paper introduces the CGA attention mechanism and the EMA attention mechanism. By combining the two attention mechanisms, the cavity recognition model's ability to understand stress wave signals and its ability to constrain the size of cavities inside trees is improved. Furthermore, the CGA attention mechanism can reduce computational redundancy and enhance the ability to capture local features. The EMA attention mechanism can dynamically adjust attention weights based on the previous and next input data, significantly enhancing the cavity recognition model's ability to connect information features of different scales in the image. This enhancement not only improves the accuracy and generalization of target detection, but also reduces memory requirements, making the cavity recognition model more suitable for resource-constrained devices.
[0027] D. A comparative experiment was conducted on a camphor wood image dataset using the proposed tree cavity detection method and four existing real-time monitoring models. The present invention replaced the original Conv convolution with the receptive field attention convolution in the Transformer framework, and effectively combined it with the introduced CGA attention mechanism and EMA attention mechanism. The mAP value was improved by 10.5%, 10.9%, 5.2% and 6.3% compared with the common Yolov11, Yolov8, EfficientDet and CenterNet++, respectively. The results show that when faced with hollow samples inside the wood, accurate cavity detection can still be performed under the interference of multiple propagation path waves, maintaining excellent feature detection capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the specific embodiments of the present invention, the following will briefly introduce the drawings required for use in the specific embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 This is a block diagram of the method for detecting cavities inside wood provided by the present invention;
[0030] Figure 2 This is the internal flow chart of the tree cavity nondestructive detection sensor provided by the present invention;
[0031] Figure 3 is the stress wave ray distribution diagram of the stress wave signal detector;
[0032] Figure 4 This is a structural diagram of the algorithm for inversion of sensor signals for detecting internal voids in wood based on Transformer provided by the present invention;
[0033] Figure 5 This is a schematic diagram of the CGA attention mechanism;
[0034] Figure 6 This is a schematic diagram of the EMA attention mechanism;
[0035] Figure 7 It is a model diagram of the receptive field attention convolution. DETAILED DESCRIPTION
[0036] The technical solutions of the present invention will be described clearly and completely below with reference to the accompanying drawings. It is obvious that the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.
[0037] like Figure 1 and Figure 2 As shown, the present invention provides a non-invasive wood internal cavity detection method based on Transformer framework constraints, including a signal processor and a stress wave sensor, the stress wave sensor including a plurality of signal detectors connected to the signal processor, and the signal processor embedded with a cavity recognition model based on the Transformer framework. In the cavity recognition model, the conv convolution in the Transformer framework is replaced with the receptive field attention convolution, and the receptive field attention convolution performs dynamic parameter adjustment of the convolution kernel parameters of the stress wave signal. The detection method includes the following steps:
[0038] [S01] Attach the stress wave sensor to the surface of the tree so that multiple signal detectors on the stress wave sensor are evenly distributed around the same horizontal section of the tree surface.
[0039] [S02] Each signal detector is struck in sequence by an external force. The stress wave signal generated by each signal detector is received by signal detectors at other locations until all signal detectors are struck. The signal processor then receives the stress wave signals received by the signal detectors at each location. The present invention preferably uses an electronic hammer strike method. Due to differences in the internal structure of trees, such as cavities and decay, the propagation speed and characteristics of stress waves also vary. The stress wave sensor can capture these changes.
[0040] [S03] The signal processor calculates the stress wave signals obtained at each position, and estimates the stress wave velocity information between each signal detector based on the velocity attenuation law of the stress wave in the forest, and uses RGB color to visualize it into a stress wave velocity ray diagram.
[0041] The present invention preferably places 6-12 signal detectors around the same horizontal cross-section of a tree. An electronic hammer strikes the detectors in sequence, and the stress wave signals generated by the strikes are captured by the remaining detectors. A signal processor measures the presence of cavities within the tree by measuring changes in stress wave velocity. Finally, the signal received by the receiving end of the stress wave sensor is visualized. The propagation speed of stress waves in wood attenuates with the presence of internal cavities, and gradually decreases with increasing cavity area. The attenuation pattern can be analyzed using stress wave images.
[0042] Specifically, the serial numbers of each signal detector are regarded as the rows and columns of the matrix, and the velocity distribution of the stress wave on the wood cross section can be converted into a symmetric matrix. The complete stress wave velocity matrix is shown below:
[0043]
[0044] Among them, V (i,j) is the velocity value between signal detector i and signal detector j, 1≤i≤N, 1≤j≤N (N is the total number of signal detectors, that is, N≤12), and is also an item of the stress wave velocity matrix V. The matrix V is the input data of the stress wave ray diagram in the stress wave sensor. The stress wave velocity V between the two signal detectors is (i,j) As shown below:
[0045]
[0046] Among them, S (i,j) is the distance between signal detector i and signal detector j; t (i,j) is the time it takes for the stress wave to be transmitted from signal detector i to reach signal detector j. When i=j, the same detector cannot both send and receive signals, so the accurate velocity matrix V should be as follows:
[0047]
[0048] Among them, null represents the velocity value of the point when i=j.
[0049] Stress wave velocity visualization is based on the propagation velocity of stress waves on the same plane. The stress wave velocity distribution across the entire cross section is estimated based on the attenuation law of the stress wave velocity. The relative speed of the velocity distribution is then converted into a visual image using RGB color. Red represents slow stress wave velocity, indicating a defective area, while green represents fast stress wave velocity, indicating a healthy area. However, trees are primarily composed of ducts, sieve tubes, and wood fibers, indicating that they are anisotropic materials. Therefore, the stress waves emitted by the stress wave sensor propagate at different speeds in different directions within the tree, and the attenuation law of the stress wave changes with the propagation direction.
[0050] [S04] Correct each wave velocity ray in the stress wave velocity ray diagram to obtain a corrected stress wave ray diagram.
[0051] like Figure 3 The middle diagram shown, after being visualized as a stress wave ray diagram using the actual stress wave velocity information obtained, does not match the expected value. The present invention uses an expression for the propagation velocity of non-radial stress waves, and the following expression can be used to correct the stress wave ray diagram in the stress wave sensor.
[0052]
[0053] Among them, v R is the propagation speed of stress wave on the diameter of the tree cross section, referred to as radial wave speed, v NRrepresents the non-radial wave velocity, and θ is the angle between the two propagation paths, such as Figure 2 As shown in Figure 1 , when a stress wave sensor generates a stress wave velocity ray diagram, red indicates relatively slow velocity, yellow indicates moderate velocity, and green indicates the fastest velocity. All stress wave velocities are normalized and scaled to one of these three colors. This makes it easy to see that red indicates passing through or near defective areas, while green indicates passing through or near healthy areas.
[0054] The stress wave ray distribution diagram of the stress wave signal detector is as follows: Figure 3 As shown, the sample tree species is camphor, and the defect type is a central cavity defect, such as Figure 3 As shown in the leftmost figure, by comparing the two ray diagrams, it can be seen that before the stress wave velocity correction ( Figure 3 The lines in the ray diagram are very chaotic, and the red lines fill the entire cross section of the wood. The approximate location of the defect cannot be visually found with the naked eye, and it is inconsistent with the actual wood condition. In particular, the ray diagram at the edge of the trunk is all red, which does not conform to the actual situation. In the ray diagram after speed correction, Figure 3 In the figure on the far right, the color distribution is staggered. The red line mainly passes through the central area and turns green as it moves away from the defect. The location of the defect can be inferred. The color of the stress wave velocity at the edge of the trunk is also consistent with the actual situation. The color of the stress wave ray passing through the healthy area can meet the design requirements.
[0055] [S05] The corrected stress wave signal is fed into the cavity identification model for processing, which then outputs a visualization of the location and size of the defective tree cavities. The cavity identification model, combined with the associated stress wave velocity characteristics, labels the location and size of the cavity defects, presenting a visual representation of the location and size range of the tree cavities.
[0056] The present invention uses receptive field attention convolution (RFAConv convolution) to dynamically adjust the convolution kernel parameters of the stress wave signal, such as Figure 7 As shown, the specific method is:
[0057] First, RFAConv convolution analyzes the spatial dimension of the signal within the stress wave sensor through a spatial attention module (usually a lightweight neural network) to generate an attention weight map, as shown in the following formula. This weight map reflects the importance of the signal at different locations.
[0058] Attention Map = f Attention (x)
[0059] f Attention =σ(f(k×k)([F s (avg); F s (max)]))
[0060] Where x is the input signal, σ represents the Sigmoid activation function, which is used to map the output value to between 0 and 1, indicating the attention weights of different regions. f(k×k) represents the convolution operation with a filter size of k×k, which is used to perform convolution operations on the concatenated feature maps to generate the spatial attention weight map. s (avg) indicates a global average pooling operation, F s (max) indicates a global maximum pooling operation.
[0061] Then, the generated spatial attention weight map is used to dynamically adjust the parameters of the convolution kernel, as shown in the following formula. This is achieved by multiplying the attention weight with the weight of the convolution kernel, so that the weight of the convolution kernel at key positions increases, while the weight at secondary positions decreases.
[0062]
[0063] Where [i, j] is the spatial index, k is the size of the convolution kernel, Kernel[i, j] is the weight at the convolution kernel location (i, j), and X[ik: i+k, jk: j+k] represents the local area of the input signal x within the convolution kernel coverage. After RFAConv convolution processing, the signal at each location is converted into a new feature vector, which is then concatenated to form the final feature map.
[0064] As a further preferred embodiment of the present invention, an EMA attention mechanism is introduced into the backbone network of the Transformer framework to dynamically adjust the attention weights of stress wave signal features input at different positions.
[0065] The EMA attention mechanism reshapes some channels into batch dimensions and groups the channel dimensions into multiple sub-features, so that the spatial semantic features are well distributed within each feature group. The introduction of the EMA attention mechanism improves the feature extraction capability in the abnormal area signal and normal signal detection tasks, recalibrates the channel weights in each parallel branch by encoding global information, and further aggregates the output features of the two parallel branches through cross-dimensional interaction, capturing the pairwise relationship at the pixel level. Its detailed structure is shown in the figure. Figure 6 shown.
[0066] The EMA attention mechanism combines channel and spatial information to preserve channel-dimensional information and reduce computational burden. This combination helps capture cross-channel relationships in feature representation while avoiding channel dimension reduction, thereby improving model performance.
[0067] The EMA attention mechanism uses a multi-scale parallel sub-network structure, including parallel sub-networks for processing 1x1 convolution kernels and 3x3 convolution kernels. This structure helps effectively capture cross-dimensional interactions and establish dependencies between different dimensions, thereby improving feature representation capabilities.
[0068] The EMA attention mechanism improves and optimizes the coordinate attention (CA) mechanism. The CA module embeds position information into the channel attention map, integrating cross-channel and spatial information. The EMA attention mechanism further develops this mechanism, effectively capturing cross-dimensional interactions through parallel subnetwork blocks and establishing dependencies between different dimensions.
[0069] As a further preferred embodiment of the present invention, a CGA attention mechanism is introduced into the encoder of the Transformer framework to group and cascade the adjusted stress wave signals at each position.
[0070] Imaging stress wave signal ray maps is highly unstable because the propagation velocity of stress wave signals in heterogeneous media cannot be accurately calculated. This results in using estimated values rather than precise values. Furthermore, due to the varying sizes of voids within wood, propagation velocity cannot be standardized, resulting in different imaging thresholds for each sample, seriously affecting the accuracy and reliability of detection results. Traditional attention mechanisms often assign equal weight to all input features when processing image features, without distinguishing their actual contributions to the final prediction. This approach is prone to over-attention to mixed information when dealing with nonlinear and complex stress wave signal features, causing the void recognition model to misjudge the contribution of features and resulting in inaccurate detection results. This paper integrates the CGA attention mechanism into the Transformer framework. By cascading and emphasizing the relationships and influences between groups of features in the image, it gradually extracts group features. This design gives the CGA attention mechanism a significant advantage in handling complex scenarios requiring attention to multiple targets or groups. By gradually aggregating feature information from different groups, the CGA attention mechanism can capture more subtle differences and connections, thereby improving recognition accuracy. In addition, the CGA attention mechanism reduces computational complexity by optimizing the calculation of group attention and improves efficiency by reducing key-value pair calculations while maintaining global perception capabilities. This enables the hole recognition model to adapt to real-time tasks while maintaining high performance.
[0071] By providing a different feature split for each head, the CGA attention mechanism enhances the diversity of the attention graph, helping to better learn representations. At the same time, the CGA attention mechanism is similar to group convolution and saves computational resources and parameters by reducing the input and output channels in the QKV layer. When faced with complex signal feature data, the cascade design of the CGA attention mechanism allows for increased network depth without introducing additional parameters, thereby improving model capacity. The CGA attention mechanism uses a cascaded group attention mechanism, which not only enhances the feature diversity of the input to the attention heads by providing different input splits and cascaded output features across heads, but also improves model capacity by increasing network depth. This design enables the CGA attention mechanism to better handle complex group relationships and improve recognition accuracy.
[0072] The schematic diagram of the CGA attention mechanism is as follows Figure 5 As shown. The CGA attention mechanism divides the complete feature y into N parts, namely Y1, Y2, ..., Y N . Feature segmentation technology is used to provide segmented feature details to each head within the CGA attention mechanism. The feature value calculated on the Nth head is shown in the following formula. This allows the attention to clearly decompose the calculation into each head, so that each head can accurately learn every detail of the signal feature. It is worth noting that the complete features are segmented here to save computation and make the entire process more efficient. The CGA attention mechanism continues to improve accuracy and capacity by encouraging each layer to learn projections of features with richer information.
[0073]
[0074] Among them, the Atten function represents the self-attention mechanism. Next, the updated feature representations of all heads are concatenated to obtain the intermediate representation:
[0075]
[0076] in, represents the Nth segmentation of input feature Y, Y N =[Y1, Y2, ..., Y N ], h represents the total number of heads. as well as Represents the projection layer. The main task of this layer is to map the segmented parts to the input features in different subspaces, and then splice the features obtained by different heads in the dimension. It is a linear layer that projects the concatenated output features back to the same dimension as the input.
[0077] Next, the attention map of each head is calculated in a cascaded manner, and the output of each head is added to the subsequent head to gradually refine the feature representation. The advantage of this cascade approach is that it increases the depth of the network and learns to project on features with richer information, thereby improving the capacity of the model.
[0078] Furthermore, another tag interaction layer is applied after the query projection, which enables self-attention to jointly capture local and global relations.
[0079] First, the input feature Y N Apply Query projection.
[0080]
[0081] The results of the query projection are then passed to the tag interaction layer for processing:
[0082]
[0083] Using the query projection processed by the label interaction layer, Q′ N To calculate self-attention:
[0084]
[0085] Finally, the output of each head is added to the subsequent heads to progressively refine the feature representation:
[0086]
[0087] Among them, Y′ N is the Nth input segment Y N and by the formula The calculated (N-1)th head output When calculating self-attention, it replaces Y N As the new input features of the Y-th head.
[0088] In addition, a token interaction layer (using depthwise convolution) is applied after Query projection. Assuming that Q is the original output of Query, the Query after depthwise convolution is represented as Q', and the formula is: Q'=DepthwiseConv(Q).
[0089] After the query projection, Q itself contains global information. After deep convolution, detailed local information is obtained, so that the attention mechanism can understand the input features more comprehensively.
[0090] Through grouping and cascading, it can effectively suppress unnecessary distraction and enhance the model's ability to capture key information. In particular, it can more accurately locate and identify targets in complex signal ray graphs.
[0091] Comparative Example
[0092] To ensure the accuracy of the experimental results, comparative tests of different hole detection models were conducted on 12 signal detector datasets. The performance of each model is shown in Table 1. This paper uses mAP (mean Average Precision at 50% IoU) and Box_Precision as performance evaluation indicators.
[0093] Table 1 Comparative experimental results of different models
[0094] Model Box_Precision mAP The present invention 0.943 0.925 Yolov11 0.843 0.820 Yolov8 0.877 0.816 EfficientDet 0.9108 0.873 CenterNet++ 0.8082 0.862
[0095] The above table shows the experimental results and performance comparison results of Yolov11, Yolov8, EfficientDet, CenterNet++ and the model of the present invention. It can be seen from the results in the table that in the experiment of identifying and locating cavities inside trees, when each model detects cavities inside trees in the same scenario, the model proposed by the present invention is the most accurate in predicting the size and position of abnormal areas, with a prediction accuracy of up to 0.943. It is 0.1, 0.066, 0.0322, and 0.1348 higher than Yolov11, Yolov8, EfficientDet, and CenterNet++, respectively. This shows that when ignoring the classification of cavities, the model proposed by the present invention has a stronger feature coupling ability than other common models, can better associate the messy signal features in an orderly manner, has a high reliability in cavity position prediction, and is more suitable for scenarios sensitive to false detection. In terms of the comprehensive mAP metric, the proposed model performs best among common detection models, with an mAP of 0.925, surpassing Yolov11, Yolov8, EfficientDet, and CenterNet++ by 0.105, 0.109, 0.052, and 0.063, respectively. Combining both metrics, the proposed model achieves the best Box_Precision and mAP, demonstrating its excellent ability to classify, locate, and predict the size of voids, achieving an ideal state.
[0096] The hole recognition model adopted by the present invention can still perform accurate hole detection under the condition of interference from multiple propagation path waves. By introducing the CGA attention mechanism and the EMA attention mechanism, the feature extraction and generalization capabilities of the model are effectively improved. By replacing the original Conv convolution in the Transformer framework with the receptive field attention convolution, it helps the model to effectively associate feature signals. The combination of the three enhances the hole recognition and detection capabilities. The effectiveness of the model proposed in the present invention was verified through ablation experiments, comparative experiments on different data sets, and comparative experiments on different models. In the ablation experiment, the hole recognition model combining the three improved mAP by 14.6% compared with the original Transformer framework.
[0097] Any matters not described in the present invention are applicable to the prior art.
[0098] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A non-invasive wood cavity detection method based on Transformer framework constraints, comprising a signal processor and a stress wave sensor, wherein the stress wave sensor includes a plurality of signal detectors connected to the signal processor, and the signal processor is embedded with a cavity recognition model based on the Transformer framework, characterized in that: In the cavity recognition model, the conv convolution in the Transformer framework is replaced with the receptive field attention convolution, and the convolution kernel parameters are dynamically adjusted for the stress wave signal. The detection method includes the following steps: Step 1: attaching a stress wave sensor to the surface of a tree so that multiple signal detectors on the stress wave sensor are evenly distributed around the same horizontal cross section of the tree surface; Step 2: Use an electronic hammer to strike each signal detector in turn, and the stress wave signal generated by each signal detector is received by the signal detectors at other positions; Step 3: The signal processor calculates the stress wave signals obtained by the signal detectors at each position to obtain the stress wave velocity information transmitted between the signal detectors, and visualizes it into a stress wave velocity ray diagram using RGB colors; Step 4, correcting each wave velocity ray in the stress wave velocity ray diagram to obtain a corrected stress wave ray diagram; Step 5: Input the corrected stress wave signal into the cavity recognition model for processing, and output the visualized position and size of the defective tree cavity.
2. The non-invasive wood cavity detection method based on Transformer framework constraints according to claim 1 is characterized in that: The EMA attention mechanism is introduced into the backbone network of the Transformer framework to dynamically adjust the attention weights of the stress wave signal features input by each signal detector.
3. The non-invasive wood cavity detection method based on Transformer framework constraints according to claim 1 or 2 is characterized in that: The CGA attention mechanism is introduced into the encoder of the Transformer framework to group and cascade the adjusted stress wave signals of each signal detector.
4. The non-invasive wood cavity detection method based on Transformer framework constraints according to claim 1 is characterized in that: In step 3, the expression of the non-radial stress wave propagation velocity is used to correct the stress wave ray diagram, and the expression is: Among them, V′ R is the propagation velocity of the corrected stress wave on the cross-sectional diameter of the tree, referred to as radial wave velocity, v NR represents the non-radial wave velocity, and θ is the angle between the two propagation paths formed by the same signal detector.
5. The non-invasive wood cavity detection method based on Transformer framework constraints according to claim 1 is characterized in that: Arrange 6 to 12 signal detectors on the same horizontal plane on the tree surface.
6. The non-invasive wood cavity detection method based on Transformer framework constraints according to claim 1 is characterized in that: The receptive field attention convolution dynamically adjusts the convolution kernel parameters of the stress wave signal. The specific method is: The receptive field attention convolution uses a spatial attention module to perform spatial dimension analysis on the signal obtained in the stress wave sensor to generate an attention weight map. The obtained attention weight map is used to multiply the attention weight with the weight of the convolution kernel, and the parameters of the convolution kernel are dynamically adjusted so that the weight of the convolution kernel at key positions is increased and the weight at secondary positions is reduced.
Citation Information
Cited By
Signal identification method and device, computer equipment, storage medium and program product
CN121765362A
