# A Wood Quality Defect Detection System Based on Deep Learning and Multicriterion Framework

Authors: Pingan Sun
Journal: Journal of Sensors
 (2022)

---

## Abstract

In order to solve the problems of image perception and quality decision-making of wood defects with typical bionic intelligent algorithms, the existence of multidimensional degradation factors causes serious real problems of image distortion; the author proposes a wood defect image reconstruction and quality evaluation model based on deep reinforcement learning. The model introduced the deep learning mechanism and realized real-time and efficient reconstruction of multidimensional defect images of different wood by using the deep residual network for iterative training. In this model, a panoramic autonomous perception model was constructed for the fine segmentation and feature extraction of multidimensional defects of different wood and a shared resource pool of wood defect features of the magnitude of big data was constructed. Introduce the reinforcement learning mechanism, use the deep deterministic policy gradient algorithm, and establish a high-dimensional decision mapping between the iterative update of defect features, autonomous decision-making, panoramic visualization, depth prediction, and wood quality evaluation; it realizes the horizontal sharing integration of multidimensional difference wood defect image reconstruction and quality evaluation. The results obtained are as follows: in a typical environment, systematic wood quality evaluation, and autonomous intelligent decision-making performance, the coincidence rate with artificial defect recognition and evaluation efficiency can reach 90% and the loss of the training set can be controlled below 0.2%. Compared with the traditional wood quality grading system, the wood defect image reconstruction, and quality evaluation model system designed by the author, the quality evaluation decision-making efficiency rate was 90.19%, an increase of about 20%, and the system decision-making operation and maintenance loss was 2.23%, a decrease of about 10%. It is proved that the system designed by the author can realize the timely detection of wood quality defects very effectively and save a lot of manpower and material resources.


---

## Body

## 1. Introduction

Wood is one of the most precious natural resources in basic building materials, and at the same time, it is also one of the longest-used materials in human history [1]. Wood, cement, steel, and plastic are the four basic building materials today, of which only wood is a renewable resource [2]. At present, China is faced with the shortage of forest resources and the low quality of wood, which are not conducive to the development of forestry; as a country with relatively poor forest resources, the limited forest resources should be cherished and protected and the wood resources should be used fully and rationally. How to improve the utilization rate of wood and make full use of forest resources is an important issue that Chinese forestry scientists need to face seriously [3].In the process of wood processing and production, wood quality inspection and classification are an important link, the so-called wood quality inspection and classification, that is, based on the standards in the national standards of the People’s Republic of China, the quality of wood is tested and graded, the detection is essentially the detection of wood defects, and the grading standard is based on national standards, for example, GB/T4822-2015 is the national standard for sawn timber inspection, which describes in detail the material judgment of sawn timber to determine the grade of wood. At present, there are different standards for wood testing, which leads to an increase in the misjudgment of defects and affects the quality judgment of wood.Due to the high intensity and long time of manual work, it is easy to cause visual fatigue and affect the final detection accuracy. Research on the digital transformation of traditional wood surface defect detection and quality grading based on artificial intelligence will greatly liberate manual labor, guide the conversion of original manual labor to mental labor, change the production mode of traditional wood screening, and improve industrial efficiency and automation level [4, 5].


## 2. Literature Review

Before the 1950s, the detection of wood defects, basically, manual identification is used to classify and calibrate defects. However, with the development of society and industrial production, the requirements for testing speed and testing quality have been continuously improved and the shortage of manual testing has gradually emerged; the problems of different judgment standards, misjudgment, and omission of judgment restrict the development of wood processing technology. Therefore, manual detection technology has been gradually abandoned by enterprises and other relatively commercial new detection technologies have begun to emerge [6].With the rapid improvement of the level of modern industrial technology, since the 1950s, researchers have applied emerging technologies such as lasers, rays, and nuclear magnetic resonance to the field of wood defect detection, which has improved the automation level of wood defect detection. Western developed countries were the first to apply these emerging technologies to the study of wood defect identification; they used X-ray and ultrasonic to identify defects earlier, which improved the shortcomings of inconsistent manual inspection standards. But these techniques still have some other shortcomings: X-ray identification takes a lot of time, the diameter of the logs to be tested needs to be less than 600 mm, and the cost of testing equipment and maintenance costs are high. These detection techniques are affected by multiple factors such as wood structure texture, material, and the cost of detection equipment, which make these techniques not universally applicable. In modern wood processing enterprises, these emerging technologies have not been adopted on a large scale for the detection of wood defects.With the rapid improvement of the level of information technology and the continuous enhancement of computer computing capabilities, artificial intelligence, computer vision, and other image-specific technologies have developed rapidly. At present, researchers in the field of wood defect detection have focused their research on the detection of surface images of wood defects and defect detection has entered the stage of informatization development. In recent years, more and more researchers have applied computer image processing and other technologies to the field of wood defect detection, forming a series of new feature detection methods [7]. In the 1980s, Gao et al. used a specific threshold to divide the grayscale image of wood into rectangular blocks and realized the detection of wood defects based on texture analysis and spatial correlation of the image [8]. Then, Wu et al. applied this method to the color image of wood defects; first, the two-dimensional histogram of the R, G, and B channel maps of the image was subjected to double-threshold segmentation, and then, the low-frequency points were eliminated from the obtained results, the resulting area of the largest 2D histogram sum, that is, the defect background area [9]. In the 1990s, Hu et al. combined the self-organizing feature structure with the neural network for defect detection and achieved an accuracy of 85% [10]. Esteves et al. obtained the conclusion that the RGB space is the best color space in wood defect detection [11]. After entering the 21st century, related research has advanced by leaps and bounds. Some people combine the clustering method with the district-city growth method to obtain a better scoring effect. Lopes et al. proposed an algorithm to estimate the score by calculating the curvature from the shape structure of wood defects [12].On the basis of the current research, this paper proposes a wood defect image reconstruction and quality evaluation model based on deep reinforcement learning. Deep learning mechanism is used to realize real-time and efficient reconstruction of multidimensional defect images of different wood. A panoramic autonomous perception model oriented to the fine segmentation and feature extraction of multidimensional defects of different wood was constructed, and a shared resource pool of wood defect features of the magnitude of big data was constructed. Also, through the reinforcement learning mechanism, a high-dimensional decision mapping between defect feature iterative update, autonomous decision-making, panoramic visualization, depth prediction, and wood quality evaluation is established for the deep deterministic strategy gradient algorithm; it realizes the horizontal sharing integration of multidimensional difference wood defect image reconstruction and quality evaluation [13].


## 3. Research Methods

### 3.1. Model Architecture of Wood Defect Image Reconstruction and Quality Evaluation

Based on the wood defect image reconstruction and quality evaluation model system with deep reinforcement learning, the architecture has real-time panoramic perception of wood defect images to be inspected. Multithreading transmission of heterogeneous defect image data in the format of fast reconstruction and temporary storage is constructed. The whole life cycle system of three-dimensional visual inspection of the wood production quality, such as quality grading evaluation and independent intelligent decision making, was constructed. A full-chain mechanism with real-time panoramic perception of wood defect images, image reconstruction quality evaluation, defect recurrence, and independent decision-making is also established. As shown in Figure1, a special framework of wood defect image reconstruction and the quality evaluation model system is designed [14].Figure 1
Architecture of wood defect image reconstruction and quality evaluation model.Guided by the operation and maintenance requirements of the whole life cycle system efficiency of wood production quality visual inspection, the system architecture of the wood defect image reconstruction and quality evaluation model based on deep reinforcement learning is divided into wood defect image perception submodule, wood defect image reconstruction [15]. Construct submodule, quality evaluation, intelligent decision-making submodule, human-computer interaction submodule, etc.; among them, the wood defect image perception submodule uses a high-speed linear CCD camera to efficiently collect and accurately locate and identify wood defect images such as joints, dead joints, insect eyes, and cracks; The wood defect image perception submodule uses a high-speed linear CCD camera to efficiently collect and accurately identify wood defect images such as live segment, dead segment, and bug eye crack. The wood defect image reconstruction submodule introduces the deep learning mechanism. The deep residual network was used for iterative training to realize real-time and efficient reconstruction of multidimensional defect images of different wood. A panoramic autonomous perception model for multidimensional defect segmentation and feature extraction was constructed [16]. Quality evaluation and the intelligent decision submodule enhance the learning mechanism. The depth deterministic strategy gradient algorithm was used to establish a high-dimensional decision mapping between defect feature iteration and autonomous decision panoramic visual depth prediction and wood quality evaluation. The horizontal sharing integration of multidimensional and different wood defect image reconstruction and quality evaluation can be realized. The human-computer interaction submodule realizes the human-computer friendly interaction under the crossplatform application system.Taking the wood defect image reconstruction and quality evaluation model architecture as the top-level design guidance of the state flow, the control flow logic of the wood defect image reconstruction and quality evaluation model based on deep reinforcement learning is designed; obtaining large-scale normal wood images through linear CCD, a training sample dataset is formed and these normal sample datasets are input into the deep residual network based on a convolutional autoencoder for training, which can learn the data distribution characteristics of normal wood, but not the data distribution characteristics of defects. In the inference stage, input the image to be tested to the network for reconstruction, take the sliding area as the reconstruction object, make a residual with the original image, calculate the residual value, and compare it with the threshold to obtain the binary image classification result, which can show the defects of your region. The wood image is input into the classifier to distinguish and obtain the corresponding wood quality grade, after the detection of the abovementioned algorithm is completed; the image of the defective area is input into the wood quality classification system based on the image classifier for quality classification. The hardware part collects the normal wood image and the wood image to be detected by the image acquisition device (linear CCD); input the image into the computer and store it as a sample dataset and a dataset to be detected, and train the sample dataset through the embedded computer to obtain a model with parameters; input the image data to be detected into the model of the embedded computer for inference, and get the detection result; the classification instruction is given to classify the quality of the wood image, and then, it is handed over to the next-level execution equipment for processing; the control flow logic of the wood defect image reconstruction and quality evaluation model based on deep reinforcement learning is shown in Figure2.Figure 2
Control flow logic of wood defect image reconstruction and quality evaluation model.


### 3.2. Wood Defect Image Reconstruction and Quality Evaluation Model Modeling

Based on the model architecture of wood defect image reconstruction and quality evaluation, the wood defect image perception submodule uses a high-speed linear CCD camera to efficiently collect and accurately locate and identify wood defect images such as joints, dead joints, insect eyes, and cracks; it is a standardized engineering implementation method, and it is enough to follow the corresponding engineering standards of linear CCD: innovative design of wood defect image reconstruction submodule, quality evaluation, and intelligent decision-making submodule [17]. When focusing on improving typical bionic intelligent algorithms to deal with wood defect image perception and quality decision-making, under the action of the existing multidimensional degradation factors, the defect image is seriously distorted, the variance of the prior feature extraction of the defect image fluctuates frequently, the texture of the defect image is uneven, and the grayscale segmentation of the defect image fails; the optimal convergence rate varies hysteresis with defect dimension and other congenital deficiency. The deep learning mechanism was introduced to realize real-time and efficient reconstruction of multidimensional defect images of different wood by iterative training using the deep residual network. A panoramic autonomous perception model oriented to the fine segmentation and feature extraction of multidimensional defects of different wood was constructed, and a shared resource pool of wood defect features of the magnitude of big data was constructed. The reinforcement learning mechanism is introduced, and the deep deterministic strategy gradient algorithm is used to establish a high-dimensional decision mapping between the iterative update of defect features, autonomous decision-making, panoramic visualization, depth prediction, and wood quality evaluation; the horizontal sharing integration of multidimensional differential wood defect image reconstruction and quality evaluation is realized [18]. Based on the abovementioned analysis, the quantitative realization process of wood defect image reconstruction and quality evaluation model is given, which provides quantitative guarantee for engineering efficiency analysis.


#### 3.2.1. Introduce the Deep Residual Network Mechanism

Wood defect image perception has high requirements on learning efficiency and real-time performance, introduces the deep residual network mechanism to improve the decision-making performance of deep learning, and uses the residual learning network to realize the identity mapping between stacked layers and input features; specifically,Qs,a,θi represents the output of the current residual network Eval.net, used to evaluate new features perceived by current learning; Qs,a,θ−i represents the output of the residual unit, and the optimal perceptual feature set is obtained from the identity mapping between the stacked layer and the input feature. After the introduction of Target.net, the residual unit remains unchanged for a period of time, which reduces the correlation between the unit mapping and the identity mapping to a certain extent, and improves the stability of the algorithm. After introducing the deep residual network mechanism, the parameters in the residual network are defined as θQ, Qμs,μs which represents the expected return value obtained by using the μ strategy to select an action in the s state, and because it is in a continuous space [19], it is expected that it can be calculated by integral; then, formula (1) can be used to express the quality of strategy μ.
(1)Jβμ=∫SeSsρβsQμs,μsds=Es−ρβQμs,μs.The residual unit establishes a direct correlation channel between the input and output through the identity mapping component, and through the probability distribution function, the optimal perception strategy is determined, and at each step, the best action in the current state is obtained according to the probability distribution and the random strategyat~πθstθπ is adopted to generate the action and the objective gradient function is shown in formula (2) as follows:
(2)∇θJπθ=∫SeSsρπs∫AtAe∇θπθs,aQπs,adads=Es∼ρπ,a∼πθ∇θlogπθasQπs,a.


#### 3.2.2. Introduce the Mechanism of the Deep Deterministic Policy Gradient Algorithm

Using the deep residual network panorama perception normal wood image feature set, provide a training sample set for reinforcement learning; use the powerful self-perception ability of the DDPG algorithm, real-time perception, and reconstruction of wood defect images, using the powerful self-decision ability of DDPG algorithm; realize the feature extraction and sharing calculation of multidimensional difference wood defect image parameters; and provide a positive feedback mechanism to correct the errors in the sharing process, building a quality evaluation mechanism under the global collaborative control [20]. Based on formula (2), the deterministic strategy formula (3) is given and an action is directly determined by the function μ according to the behavior; μ can be understood as an optimal behavior strategy at=μstθπ; then, the quantitative wood defect image perception and reconstruction system can be represented as formula (3).
(3)Jμθ=∫SsSeρμsrs,μθsds=Es∼ρμrs,μθs.Considering the instability of equation (3) in a competitive environment, the first-order derivation of equation (3) is carried out and the deterministic policy gradient can be expressed as equation (4), which has strong compatibility; through self-learning, real-time and efficient reconstruction of differential wood multidimensional defect images can be achieved and a panoramic autonomous perception model for fine segmentation and feature extraction of differential wood multidimensional defects can be constructed.
(4)∇θJμθ=∫SsSeρμs∇θμθsQμs,aa=μθds=Es−ρμ∇θμθsQμs,aa=μθ.According to the wide variety of wood and the complex and changeable characteristics of wood defect images, use the policy networkμ to act as an actor and use the value network to fit the s,a function; acting as the critical role, it realizes the horizontal sharing integration of multidimensional difference wood defect image reconstruction and quality evaluation, so the objective function of DDPG can be defined as formula (5).
(5)Jθμ=Eθμr1+γr2+γ2r3+⋯.Based on equations (3) and (4), efficient and orderly reconstruction of wood defect images can be achieved; by storing the characteristics of wood defect images in the memory playback pool, the fusion quality evaluation function is solved by the substrategy parameters for information fusion and sharing; it fundamentally realizes the panoramic visualization of wood defect image recognition, reconstruction, and quality classification and realizes the horizontal sharing and integration of multidimensional difference wood defect image reconstruction and quality evaluation.


## 3.1. Model Architecture of Wood Defect Image Reconstruction and Quality Evaluation

Based on the wood defect image reconstruction and quality evaluation model system with deep reinforcement learning, the architecture has real-time panoramic perception of wood defect images to be inspected. Multithreading transmission of heterogeneous defect image data in the format of fast reconstruction and temporary storage is constructed. The whole life cycle system of three-dimensional visual inspection of the wood production quality, such as quality grading evaluation and independent intelligent decision making, was constructed. A full-chain mechanism with real-time panoramic perception of wood defect images, image reconstruction quality evaluation, defect recurrence, and independent decision-making is also established. As shown in Figure1, a special framework of wood defect image reconstruction and the quality evaluation model system is designed [14].Figure 1
Architecture of wood defect image reconstruction and quality evaluation model.Guided by the operation and maintenance requirements of the whole life cycle system efficiency of wood production quality visual inspection, the system architecture of the wood defect image reconstruction and quality evaluation model based on deep reinforcement learning is divided into wood defect image perception submodule, wood defect image reconstruction [15]. Construct submodule, quality evaluation, intelligent decision-making submodule, human-computer interaction submodule, etc.; among them, the wood defect image perception submodule uses a high-speed linear CCD camera to efficiently collect and accurately locate and identify wood defect images such as joints, dead joints, insect eyes, and cracks; The wood defect image perception submodule uses a high-speed linear CCD camera to efficiently collect and accurately identify wood defect images such as live segment, dead segment, and bug eye crack. The wood defect image reconstruction submodule introduces the deep learning mechanism. The deep residual network was used for iterative training to realize real-time and efficient reconstruction of multidimensional defect images of different wood. A panoramic autonomous perception model for multidimensional defect segmentation and feature extraction was constructed [16]. Quality evaluation and the intelligent decision submodule enhance the learning mechanism. The depth deterministic strategy gradient algorithm was used to establish a high-dimensional decision mapping between defect feature iteration and autonomous decision panoramic visual depth prediction and wood quality evaluation. The horizontal sharing integration of multidimensional and different wood defect image reconstruction and quality evaluation can be realized. The human-computer interaction submodule realizes the human-computer friendly interaction under the crossplatform application system.Taking the wood defect image reconstruction and quality evaluation model architecture as the top-level design guidance of the state flow, the control flow logic of the wood defect image reconstruction and quality evaluation model based on deep reinforcement learning is designed; obtaining large-scale normal wood images through linear CCD, a training sample dataset is formed and these normal sample datasets are input into the deep residual network based on a convolutional autoencoder for training, which can learn the data distribution characteristics of normal wood, but not the data distribution characteristics of defects. In the inference stage, input the image to be tested to the network for reconstruction, take the sliding area as the reconstruction object, make a residual with the original image, calculate the residual value, and compare it with the threshold to obtain the binary image classification result, which can show the defects of your region. The wood image is input into the classifier to distinguish and obtain the corresponding wood quality grade, after the detection of the abovementioned algorithm is completed; the image of the defective area is input into the wood quality classification system based on the image classifier for quality classification. The hardware part collects the normal wood image and the wood image to be detected by the image acquisition device (linear CCD); input the image into the computer and store it as a sample dataset and a dataset to be detected, and train the sample dataset through the embedded computer to obtain a model with parameters; input the image data to be detected into the model of the embedded computer for inference, and get the detection result; the classification instruction is given to classify the quality of the wood image, and then, it is handed over to the next-level execution equipment for processing; the control flow logic of the wood defect image reconstruction and quality evaluation model based on deep reinforcement learning is shown in Figure2.Figure 2
Control flow logic of wood defect image reconstruction and quality evaluation model.


## 3.2. Wood Defect Image Reconstruction and Quality Evaluation Model Modeling

Based on the model architecture of wood defect image reconstruction and quality evaluation, the wood defect image perception submodule uses a high-speed linear CCD camera to efficiently collect and accurately locate and identify wood defect images such as joints, dead joints, insect eyes, and cracks; it is a standardized engineering implementation method, and it is enough to follow the corresponding engineering standards of linear CCD: innovative design of wood defect image reconstruction submodule, quality evaluation, and intelligent decision-making submodule [17]. When focusing on improving typical bionic intelligent algorithms to deal with wood defect image perception and quality decision-making, under the action of the existing multidimensional degradation factors, the defect image is seriously distorted, the variance of the prior feature extraction of the defect image fluctuates frequently, the texture of the defect image is uneven, and the grayscale segmentation of the defect image fails; the optimal convergence rate varies hysteresis with defect dimension and other congenital deficiency. The deep learning mechanism was introduced to realize real-time and efficient reconstruction of multidimensional defect images of different wood by iterative training using the deep residual network. A panoramic autonomous perception model oriented to the fine segmentation and feature extraction of multidimensional defects of different wood was constructed, and a shared resource pool of wood defect features of the magnitude of big data was constructed. The reinforcement learning mechanism is introduced, and the deep deterministic strategy gradient algorithm is used to establish a high-dimensional decision mapping between the iterative update of defect features, autonomous decision-making, panoramic visualization, depth prediction, and wood quality evaluation; the horizontal sharing integration of multidimensional differential wood defect image reconstruction and quality evaluation is realized [18]. Based on the abovementioned analysis, the quantitative realization process of wood defect image reconstruction and quality evaluation model is given, which provides quantitative guarantee for engineering efficiency analysis.


### 3.2.1. Introduce the Deep Residual Network Mechanism

Wood defect image perception has high requirements on learning efficiency and real-time performance, introduces the deep residual network mechanism to improve the decision-making performance of deep learning, and uses the residual learning network to realize the identity mapping between stacked layers and input features; specifically,Qs,a,θi represents the output of the current residual network Eval.net, used to evaluate new features perceived by current learning; Qs,a,θ−i represents the output of the residual unit, and the optimal perceptual feature set is obtained from the identity mapping between the stacked layer and the input feature. After the introduction of Target.net, the residual unit remains unchanged for a period of time, which reduces the correlation between the unit mapping and the identity mapping to a certain extent, and improves the stability of the algorithm. After introducing the deep residual network mechanism, the parameters in the residual network are defined as θQ, Qμs,μs which represents the expected return value obtained by using the μ strategy to select an action in the s state, and because it is in a continuous space [19], it is expected that it can be calculated by integral; then, formula (1) can be used to express the quality of strategy μ.
(1)Jβμ=∫SeSsρβsQμs,μsds=Es−ρβQμs,μs.The residual unit establishes a direct correlation channel between the input and output through the identity mapping component, and through the probability distribution function, the optimal perception strategy is determined, and at each step, the best action in the current state is obtained according to the probability distribution and the random strategyat~πθstθπ is adopted to generate the action and the objective gradient function is shown in formula (2) as follows:
(2)∇θJπθ=∫SeSsρπs∫AtAe∇θπθs,aQπs,adads=Es∼ρπ,a∼πθ∇θlogπθasQπs,a.


### 3.2.2. Introduce the Mechanism of the Deep Deterministic Policy Gradient Algorithm

Using the deep residual network panorama perception normal wood image feature set, provide a training sample set for reinforcement learning; use the powerful self-perception ability of the DDPG algorithm, real-time perception, and reconstruction of wood defect images, using the powerful self-decision ability of DDPG algorithm; realize the feature extraction and sharing calculation of multidimensional difference wood defect image parameters; and provide a positive feedback mechanism to correct the errors in the sharing process, building a quality evaluation mechanism under the global collaborative control [20]. Based on formula (2), the deterministic strategy formula (3) is given and an action is directly determined by the function μ according to the behavior; μ can be understood as an optimal behavior strategy at=μstθπ; then, the quantitative wood defect image perception and reconstruction system can be represented as formula (3).
(3)Jμθ=∫SsSeρμsrs,μθsds=Es∼ρμrs,μθs.Considering the instability of equation (3) in a competitive environment, the first-order derivation of equation (3) is carried out and the deterministic policy gradient can be expressed as equation (4), which has strong compatibility; through self-learning, real-time and efficient reconstruction of differential wood multidimensional defect images can be achieved and a panoramic autonomous perception model for fine segmentation and feature extraction of differential wood multidimensional defects can be constructed.
(4)∇θJμθ=∫SsSeρμs∇θμθsQμs,aa=μθds=Es−ρμ∇θμθsQμs,aa=μθ.According to the wide variety of wood and the complex and changeable characteristics of wood defect images, use the policy networkμ to act as an actor and use the value network to fit the s,a function; acting as the critical role, it realizes the horizontal sharing integration of multidimensional difference wood defect image reconstruction and quality evaluation, so the objective function of DDPG can be defined as formula (5).
(5)Jθμ=Eθμr1+γr2+γ2r3+⋯.Based on equations (3) and (4), efficient and orderly reconstruction of wood defect images can be achieved; by storing the characteristics of wood defect images in the memory playback pool, the fusion quality evaluation function is solved by the substrategy parameters for information fusion and sharing; it fundamentally realizes the panoramic visualization of wood defect image recognition, reconstruction, and quality classification and realizes the horizontal sharing and integration of multidimensional difference wood defect image reconstruction and quality evaluation.


## 3.2.1. Introduce the Deep Residual Network Mechanism

Wood defect image perception has high requirements on learning efficiency and real-time performance, introduces the deep residual network mechanism to improve the decision-making performance of deep learning, and uses the residual learning network to realize the identity mapping between stacked layers and input features; specifically,Qs,a,θi represents the output of the current residual network Eval.net, used to evaluate new features perceived by current learning; Qs,a,θ−i represents the output of the residual unit, and the optimal perceptual feature set is obtained from the identity mapping between the stacked layer and the input feature. After the introduction of Target.net, the residual unit remains unchanged for a period of time, which reduces the correlation between the unit mapping and the identity mapping to a certain extent, and improves the stability of the algorithm. After introducing the deep residual network mechanism, the parameters in the residual network are defined as θQ, Qμs,μs which represents the expected return value obtained by using the μ strategy to select an action in the s state, and because it is in a continuous space [19], it is expected that it can be calculated by integral; then, formula (1) can be used to express the quality of strategy μ.
(1)Jβμ=∫SeSsρβsQμs,μsds=Es−ρβQμs,μs.The residual unit establishes a direct correlation channel between the input and output through the identity mapping component, and through the probability distribution function, the optimal perception strategy is determined, and at each step, the best action in the current state is obtained according to the probability distribution and the random strategyat~πθstθπ is adopted to generate the action and the objective gradient function is shown in formula (2) as follows:
(2)∇θJπθ=∫SeSsρπs∫AtAe∇θπθs,aQπs,adads=Es∼ρπ,a∼πθ∇θlogπθasQπs,a.


## 3.2.2. Introduce the Mechanism of the Deep Deterministic Policy Gradient Algorithm

Using the deep residual network panorama perception normal wood image feature set, provide a training sample set for reinforcement learning; use the powerful self-perception ability of the DDPG algorithm, real-time perception, and reconstruction of wood defect images, using the powerful self-decision ability of DDPG algorithm; realize the feature extraction and sharing calculation of multidimensional difference wood defect image parameters; and provide a positive feedback mechanism to correct the errors in the sharing process, building a quality evaluation mechanism under the global collaborative control [20]. Based on formula (2), the deterministic strategy formula (3) is given and an action is directly determined by the function μ according to the behavior; μ can be understood as an optimal behavior strategy at=μstθπ; then, the quantitative wood defect image perception and reconstruction system can be represented as formula (3).
(3)Jμθ=∫SsSeρμsrs,μθsds=Es∼ρμrs,μθs.Considering the instability of equation (3) in a competitive environment, the first-order derivation of equation (3) is carried out and the deterministic policy gradient can be expressed as equation (4), which has strong compatibility; through self-learning, real-time and efficient reconstruction of differential wood multidimensional defect images can be achieved and a panoramic autonomous perception model for fine segmentation and feature extraction of differential wood multidimensional defects can be constructed.
(4)∇θJμθ=∫SsSeρμs∇θμθsQμs,aa=μθds=Es−ρμ∇θμθsQμs,aa=μθ.According to the wide variety of wood and the complex and changeable characteristics of wood defect images, use the policy networkμ to act as an actor and use the value network to fit the s,a function; acting as the critical role, it realizes the horizontal sharing integration of multidimensional difference wood defect image reconstruction and quality evaluation, so the objective function of DDPG can be defined as formula (5).
(5)Jθμ=Eθμr1+γr2+γ2r3+⋯.Based on equations (3) and (4), efficient and orderly reconstruction of wood defect images can be achieved; by storing the characteristics of wood defect images in the memory playback pool, the fusion quality evaluation function is solved by the substrategy parameters for information fusion and sharing; it fundamentally realizes the panoramic visualization of wood defect image recognition, reconstruction, and quality classification and realizes the horizontal sharing and integration of multidimensional difference wood defect image reconstruction and quality evaluation.


## 4. Analysis of Results

### 4.1. Simulation Verification under the Typical Environment of the Model

In order to multidimensionally verify the wood defect image reconstruction based on deep reinforcement learning and the actual working efficiency of the quality evaluation model, analyze the actual synergistic effect of automatic real-time perception and fusion of wood defect characteristics to be tested: autonomous and accurate reconstruction of wood defect images, global optimal quality evaluation, and autonomous intelligent decision-making mechanism; set the initial training wood defect feature sample size asN, the initial network input size is 128∗256∗16; the discount factor γ is 0.96; the learning rate a is 0.001; the absolute value of the reward value of the decision policy is limited within [−1, 1], because the negative reward is sparse; the standard action reward value is set to −1, and the selection of parameters is guided by practical problems to ensure that there is still strong evolutionary vitality in the later stage of model training. And guide the training evolution towards a better direction. Develop [21]. Based on Google’s Tensorflow 1.2.1 and OpenAI’s Gym 0.9.2 environment, the verification environment was developed and the model was empirically analyzed; set the initial loss function, from the global optimal wood quality evaluation in a typical environment, with the performance simulation of autonomous intelligent decision-making, image perception, and reconstruction efficiency of wood defects in typical environments; the algorithm is verified by simulation and multidimensional simulation of model training loss performance under the control of the perception decision system; in the Gym 0.9.2 environment, the graphical schematic simulation is carried out and the comparison curve is given in the simulation diagram by using the significant difference mark; the final simulation results are shown in Figures 3–5.Figure 3
Simulation of global optimal wood quality evaluation and autonomous intelligent decision-making performance in a typical environment.Figure 4
Comparison and simulation of wood defect image perception and reconstruction efficiency under typical environment.Figure 5
Simulation of model training loss performance under the control of perceptual decision-making system.It can be seen in Figures3–5, that the wood defect image reconstruction and quality evaluation model based on deep reinforcement learning can better solve the following problems: when typical bionic intelligent algorithm deals with wood defect image perception and quality decision, the defect image distortion is serious under the action of multidimensional degradation factors; the variance of the defect image prior feature extraction fluctuates frequently, showing uneven texture defect image gray segmentation failure and other congenital defects [22]; under the action of the existing multidimensional degradation factors, the defect image is seriously distorted, the variance of the prior feature extraction of the defect image fluctuates frequently, and the grayscale segmentation of the uneven texture defect image fails; it has good perception and reconstruction autonomy, can achieve global optimal quality evaluation and decision-making, and has the advantages of high stability, strong anti-interference, and strong model generalization ability.


### 4.2. Effectiveness Verification of Engineering Application of the Wood Defect Image Reconstruction and Quality Evaluation Model

In order to verify the reconstruction of wood defect images based on deep reinforcement learning and the actual engineering application efficiency of the quality evaluation model in the first-line operation and maintenance environment, select the economic forest in a certain place as the efficiency evaluation carrier. Ignoring the imbalance interference of the generalization ability and learning ability of the dissimilar wood texture itself, the engineering application analysis of the model was carried out, the normal images of wood are used as the training parameter set, and the images of wood defects are used as the test training set. Based on economic considerations, the wood quality comprehensive classification system of a wood processing line in this area was adaptively modified by using the microapplication expansion mode. In addition, real-time panoramic perception of heterogeneous defect image data of wood defect images for inspection is added to the software processing process of the full life cycle of three-dimensional visual inspection of the wood production quality, such as rapid reconstruction of multithread transmission quality grading evaluation and independent intelligent decision-making under the temporary-normalized format. Independent memory resources are allocated to periodically interact with service data on the Intranet. Data panorama sharing and model engineering efficiency are realized [23].The defect images of live nodes, dead nodes, and bug eye cracks in an economic forest with significant heterogeneity were selected as the performance verification carrier. Quantitative analysis was carried out from the aspects of global optimal wood quality evaluation and autonomous intelligent decision-making performance under a typical environment [24], wood defect image perception and reconstruction efficiency under a typical environment, and model training loss performance under the control of perceptual decision-making system. Qualitative analysis is carried out around the engineering application of the sensing decision system in human-computer interaction friendly defect image reconstruction, real-time effectiveness quality evaluation, and information interconnection push (Table 1).Table 1
Comparison of engineering application efficiency of wood defect image reconstruction and quality evaluation model.
Compare itemsTraditional wood quality grading systemWood defect image reconstruction and quality evaluation model system based on deep reinforcement learningQuality evaluation decision-making efficiency (%)71.7290.19Image perception and reconstruction efficiency (s)3.742.11Decision system operation and maintenance loss performance (%)12.142.23Human-computer interaction friendliness of the systemBetterVery goodDefective image reconstruction effectivenessPoorBetterInternet push of quality evaluation informationGenerallyVery goodTable1 shows the wood defect image reconstruction based on deep reinforcement learning and quality evaluation model; it can effectively deal with the problem of perceptual reconstruction of wood defect images in a relatively short period of time and has obvious advantages in perceptual autonomy, panoramic reconstruction, independent evaluation, and model generalization ability [25].


## 4.1. Simulation Verification under the Typical Environment of the Model

In order to multidimensionally verify the wood defect image reconstruction based on deep reinforcement learning and the actual working efficiency of the quality evaluation model, analyze the actual synergistic effect of automatic real-time perception and fusion of wood defect characteristics to be tested: autonomous and accurate reconstruction of wood defect images, global optimal quality evaluation, and autonomous intelligent decision-making mechanism; set the initial training wood defect feature sample size asN, the initial network input size is 128∗256∗16; the discount factor γ is 0.96; the learning rate a is 0.001; the absolute value of the reward value of the decision policy is limited within [−1, 1], because the negative reward is sparse; the standard action reward value is set to −1, and the selection of parameters is guided by practical problems to ensure that there is still strong evolutionary vitality in the later stage of model training. And guide the training evolution towards a better direction. Develop [21]. Based on Google’s Tensorflow 1.2.1 and OpenAI’s Gym 0.9.2 environment, the verification environment was developed and the model was empirically analyzed; set the initial loss function, from the global optimal wood quality evaluation in a typical environment, with the performance simulation of autonomous intelligent decision-making, image perception, and reconstruction efficiency of wood defects in typical environments; the algorithm is verified by simulation and multidimensional simulation of model training loss performance under the control of the perception decision system; in the Gym 0.9.2 environment, the graphical schematic simulation is carried out and the comparison curve is given in the simulation diagram by using the significant difference mark; the final simulation results are shown in Figures 3–5.Figure 3
Simulation of global optimal wood quality evaluation and autonomous intelligent decision-making performance in a typical environment.Figure 4
Comparison and simulation of wood defect image perception and reconstruction efficiency under typical environment.Figure 5
Simulation of model training loss performance under the control of perceptual decision-making system.It can be seen in Figures3–5, that the wood defect image reconstruction and quality evaluation model based on deep reinforcement learning can better solve the following problems: when typical bionic intelligent algorithm deals with wood defect image perception and quality decision, the defect image distortion is serious under the action of multidimensional degradation factors; the variance of the defect image prior feature extraction fluctuates frequently, showing uneven texture defect image gray segmentation failure and other congenital defects [22]; under the action of the existing multidimensional degradation factors, the defect image is seriously distorted, the variance of the prior feature extraction of the defect image fluctuates frequently, and the grayscale segmentation of the uneven texture defect image fails; it has good perception and reconstruction autonomy, can achieve global optimal quality evaluation and decision-making, and has the advantages of high stability, strong anti-interference, and strong model generalization ability.


## 4.2. Effectiveness Verification of Engineering Application of the Wood Defect Image Reconstruction and Quality Evaluation Model

In order to verify the reconstruction of wood defect images based on deep reinforcement learning and the actual engineering application efficiency of the quality evaluation model in the first-line operation and maintenance environment, select the economic forest in a certain place as the efficiency evaluation carrier. Ignoring the imbalance interference of the generalization ability and learning ability of the dissimilar wood texture itself, the engineering application analysis of the model was carried out, the normal images of wood are used as the training parameter set, and the images of wood defects are used as the test training set. Based on economic considerations, the wood quality comprehensive classification system of a wood processing line in this area was adaptively modified by using the microapplication expansion mode. In addition, real-time panoramic perception of heterogeneous defect image data of wood defect images for inspection is added to the software processing process of the full life cycle of three-dimensional visual inspection of the wood production quality, such as rapid reconstruction of multithread transmission quality grading evaluation and independent intelligent decision-making under the temporary-normalized format. Independent memory resources are allocated to periodically interact with service data on the Intranet. Data panorama sharing and model engineering efficiency are realized [23].The defect images of live nodes, dead nodes, and bug eye cracks in an economic forest with significant heterogeneity were selected as the performance verification carrier. Quantitative analysis was carried out from the aspects of global optimal wood quality evaluation and autonomous intelligent decision-making performance under a typical environment [24], wood defect image perception and reconstruction efficiency under a typical environment, and model training loss performance under the control of perceptual decision-making system. Qualitative analysis is carried out around the engineering application of the sensing decision system in human-computer interaction friendly defect image reconstruction, real-time effectiveness quality evaluation, and information interconnection push (Table 1).Table 1
Comparison of engineering application efficiency of wood defect image reconstruction and quality evaluation model.
Compare itemsTraditional wood quality grading systemWood defect image reconstruction and quality evaluation model system based on deep reinforcement learningQuality evaluation decision-making efficiency (%)71.7290.19Image perception and reconstruction efficiency (s)3.742.11Decision system operation and maintenance loss performance (%)12.142.23Human-computer interaction friendliness of the systemBetterVery goodDefective image reconstruction effectivenessPoorBetterInternet push of quality evaluation informationGenerallyVery goodTable1 shows the wood defect image reconstruction based on deep reinforcement learning and quality evaluation model; it can effectively deal with the problem of perceptual reconstruction of wood defect images in a relatively short period of time and has obvious advantages in perceptual autonomy, panoramic reconstruction, independent evaluation, and model generalization ability [25].


## 5. Conclusion

When the author focuses on improving typical bionic intelligent algorithms to deal with wood defect image perception and quality decision-making, under the action of the existing multidimensional degradation factors, the defect image is seriously distorted, the variance of the prior feature extraction of the defect image fluctuates frequently, and the grayscale segmentation of the defect image with uneven texture fails: the inherent disadvantages of dissimilar wood, such as the imbalance between the generalization ability and learning ability of the texture itself and the hysteresis of the optimal convergence speed with the defect dimension; the author proposes a new wood defect image reconstruction and quality evaluation model and selects a certain economic forest in a certain place as the performance evaluation carrier and analyzes the engineering application of the model; the first-line operation and maintenance verification results show that the prototype system has real-time panoramic perception of wood defect images to be inspected: rapid reconstruction and temporary storage of heterogeneous defect image data, multithreaded transmission in normalized format, quality grading evaluation, and autonomous intelligent decision-making; The prototype system also has quality grading evaluation and autonomous intelligent decision making and other full-life cycle system efficiency of three-dimensional visual inspection of the wood production quality, it has good perception and reconstruction autonomy, can achieve global optimal quality evaluation and decision-making, and has the advantages of high stability, strong anti-interference, and strong model generalization ability.



---

*Source: 3234148-2022-07-01.xml*