Next Article in Journal
Behavior of the Vault in Column-Free Large-Span Metro Stations Under Asymmetric Loading
Previous Article in Journal
Strong Mining Pressure Control in a Deep High-Gas Coal Seam with a Hard Roof Using Hydraulic Fracturing Technology
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on the Classification Method of Pinus Species Based on Generative Adversarial Networks and Convolutional Neural Networks

College of Science and Information, Qingdao Agricultural University, Qingdao 266109, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Appl. Sci. 2025, 15(20), 10942; https://doi.org/10.3390/app152010942
Submission received: 4 September 2025 / Revised: 5 October 2025 / Accepted: 6 October 2025 / Published: 11 October 2025

Abstract

With the rapid expansion of the global timber trade, accurate wood identification has become essential for regulating ecosystems and combating illegal logging. Traditional methods, largely reliant on manual analysis, are inadequate for large-scale, high-precision demands. A multi-architecture fusion network model that combines generative adversarial networks and one-dimensional convolutional neural networks aims to solve the problems in data quality and the challenges in classification accuracy existing in the classification process of pine tree species. The generative adversarial network is used to improve the data, which effectively expands the scale of the training set. Moreover, the one-dimensional convolutional neural network is utilized to extract local and global features from the spectral data, which improves the classification accuracy of the model and also makes the model more stable. The results obtained from the experiment show that MAFNet can achieve an accuracy rate of 99.63% in the classification of pine species. The model performed best on cross-sectional data. The research finds that MAFNet, relying on the strategy of integrating data enhancement and deep feature extraction, provides strong technical support for the rapid, accurate and non-destructive identification of pine species.

1. Introduction

With the rapid development of the global timber trade, accurate species identification plays an increasingly critical role in trade regulation, forest pest and disease detection, and combating illegal logging. Effective species identification not only facilitates fair trade in the timber market but is also essential for the conservation and sustainable development of forest resources. As a key softwood resource, Pinaceae species dominate China’s timber imports. According to statistics, China imported 46.10 million cubic meters of softwood in 2023, with over 88.17% consisting of Pinaceae species [1]. Illegal logging and illicit timber trade pose significant challenges to forest systems worldwide, threatening the survival of individual species, causing timber resource shortages, and posing risks to entire ecosystems and global biodiversity [2]. Recent reports estimate the annual value of illegal logging and forest-related crimes at up to USD 152 billion, with illegal logging accounting for up to 90% of tropical forest deforestation in some countries [3]. In China, nearly 30 Pinaceae species are listed in the National Catalogue of Key Protected Wild Plants (2021) [4], underscoring the urgent need to develop efficient and accurate species identification tools.
Traditional timber identification methods primarily rely on expert analysis of macroscopic and microscopic anatomical features. However, these methods have significant limitations. They are labor-intensive, require skilled experts to prepare and analyze wood sections, and are susceptible to subjective bias, often achieving classification only at the genus or family level [5,6]. These limitations hinder their ability to meet the growing demand for species-level accuracy in large-scale timber trade and conservation applications. In recent years, near-infrared spectroscopy (NIR) has emerged as a powerful tool for timber species identification due to its rapid, non-destructive, and efficient characteristics. NIR extracts critical classification data by assessing the chemical and physical properties of wood, such as cellulose content and wood density, without damaging the sample [7]. Previous studies have demonstrated that partial least squares discriminant analysis (PLS-DA) combined with NIR spectroscopy can successfully distinguish Swietenia macrophylla (big-leaf mahogany) from three similar timber species under conditions involving solid wood blocks [8] and laboratory-prepared wood powder samples [9,10]. However, noise and interference in NIR spectral data may reduce classification accuracy, limiting its application in complex scenarios.
The application of machine learning (ML) techniques in timber species identification has been increasingly prominent. By leveraging large volumes of labeled timber data, ML models can uncover underlying patterns and perform efficient classification. Commonly used ML methods, such as support vector machines (SVM), random forests (RF), and k-nearest neighbors (KNN), enable timber classification based on near-infrared (NIR) spectral data. For instance, Zhao et al. [11] proposed a wood species identification technique based on the gray-level co-occurrence matrix (GLCM) method, utilizing texture image parameters such as energy, entropy, homogeneity, contrast, and correlation to develop a texture-based species classification approach. Pan et al. [12] employed a portable NIR spectrometer combined with partial least squares discriminant analysis (PLS-DA) to identify five similar cinnamon wood species, achieving an identification accuracy exceeding 95%. However, traditional ML methods typically rely on manual feature selection and data preprocessing, making their performance susceptible to data quality.
In contrast, deep learning, a subset of ML, excels at automatically extracting and classifying features from raw data and has made significant advancements in NIR spectral data analysis in recent years. Unlike traditional ML, deep learning models can extract high-level features from raw spectral data, reducing the need for manual feature engineering and demonstrating superior generalization and accuracy on large-scale datasets [13]. Yang et al. [14] applied artificial neural networks (ANN), deep neural networks (DNN), and convolutional neural networks (CNN) to classify softwood species, with the CNN model achieving a validation accuracy of 100% on NIR spectral data. Zhao et al. [15,16] utilized deep learning models to automatically extract features from raw data for classification, integrating support vector data description (SVDD), backpropagation neural networks (BPNN), and clustering by fast search and find of density peaks (CFSFDP) algorithms, significantly improving the accuracy and generalization of timber species classification. Nevertheless, challenges persist when classifying species within the same genus, such as poor spectral data quality, imbalanced samples, and insufficient model complexity, which limit classification accuracy and generalization. Recent studies have explored the application of generative adversarial networks (GANs) for data augmentation. GANs have been widely applied in various fields, including medical analysis [17], underwater scene analysis [18], face recognition [19], food safety [20], and agriculture [21]. Lopes et al. [22] used a visual Turing test to evaluate the authenticity of GAN-generated microscopic cross-sectional wood images, finding that professional wood anatomists distinguished generated images from real ones with only 48.3% accuracy, statistically indistinguishable from random guessing, confirming the high realism of generated data. Bao et al. [23] utilized one-dimensional deep convolutional generative adversarial networks to optimize spectral data, significantly enhancing model performance on small datasets. Table 1 summarizes the models, dataset characteristics, and performance metrics from relevant existing works.
Despite these advances, classifying Pinus species remains challenging due to their morphological and anatomical similarities. In particular, existing models exhibit limitations in classification accuracy and stability when handling small-scale datasets or complex spectral patterns. This study proposes a novel multi-architecture fusion network model, MAFNet, integrating GAN and one-dimensional convolutional neural networks (1D-CNN) to address the issues of poor data quality and insufficient classification accuracy in Pinus species identification. The GAN component effectively expands the training dataset by generating highly realistic spectral data, mitigating sample imbalance, while the 1D-CNN captures both local and global features of spectral signals through multi-scale feature extraction, providing more stable and accurate feature representations. This study presents an effective method for high-accuracy Pinus species identification, offering a new technical pathway for rapid, non-destructive timber species identification and providing novel tools for combating illegal logging and enhancing timber trade regulation.

2. Materials and Methods

Figure 1 illustrates the experimental flowchart of this study. Step 1: Data Preparation. Process the timber into small wood blocks and store them in a constant temperature and humidity chamber. After achieving constant weight, use a near-infrared spectrometer to obtain the near-infrared spectral data of the timber and convert the diffuse reflectance data into absorbance spectroscopy. Step 2: Model Training. After obtaining the preprocessed spectra, an initial model training was conducted using the cross-sectional data. The dataset was partitioned (756:324) by adopting a strict wood-block-level split, under the constraint that spectra originating from the same physical sample must reside in the same set (training or validation), thereby mitigating the risk of data leakage. Train the MAFNet model on these data and compare the results with machine learning models to evaluate MAFNet’s performance. Step 3: Data Augmentation. Select 756 spectra from the training set and use a GAN to perform data augmentation on the dataset. Then, mix the data to achieve a total of 4596 samples. Step 4: Dataset Splitting and Comparison. Split the dataset such that the training set includes a mix of augmented spectra and real spectra, while the validation set consists only of original spectral data. Compare the results of the model trained with augmented data to those of the model trained with original spectra to evaluate the quality of data augmentation. Step 5: Performance Evaluation Across Sections. Train and evaluate classification performance using the radial and tangential sections of the timber and compare the results with models trained on cross-sectional data. Through this approach, assess the impact of different sections on model performance and analyze whether selecting the optimal section can improve classification accuracy.

2.1. Sample Preparation and Near-Infrared Spectral Collection

In the experiment of this study, six Pinus species were used. As shown in Table 2, the wood of the six species was processed into 90 blocks of 20 × 20 × 20 mm each, resulting in a total of 540 wood block samples. Due to varying levels of wood dryness, it was necessary to ensure that the moisture content would not affect the experimental results. Therefore, the wood was conditioned to a constant weight in its air-dried state. The samples were placed in a temperature- and humidity-controlled chamber, with the environment set to 20 °C and 65% humidity. The process ended when the weight measurements, taken every eight hours, became consistent.
In this study, the Field Spec® near-infrared spectrometer (ASD Inc., Boulder, CO, USA) was used to collect near-infrared spectra for each sample under controlled laboratory conditions. The wavelength range covers 350–2500 nm, encompassing the entire near-infrared spectrum, with a wavelength interval of 1 nm. During the spectral acquisition, the instrument was first preheated for 30 min. A polytetrafluoroethylene reference whiteboard was then used to calibrate the light source and the instrument, with recalibration performed every 30 min during the data collection process. The acquisition parameters were set so that each spectrum was averaged over 30 scans. The near-infrared spectral data for the wood were collected in diffuse reflectance mode, with spectra recorded from the radial, tangential, and longitudinal surfaces of each sample. Therefore, for each sample, two spectra were collected from the radial surface, two from the tangential surface, and two from the longitudinal surface, yielding 540 spectra for the 90 samples of each species. In total, 3240 near-infrared spectra were collected from the six wood species. Finally, the diffuse reflectance spectra were converted into absorbance spectra for modeling analysis.

2.2. MAFNet

1D-Net is a lightweight one-dimensional convolutional neural network specifically designed for near-infrared spectral data, aimed at efficiently extracting both local and global features of spectral signals through hierarchical convolution operations. The overall architecture of the model is illustrated in Figure 2. Its input layer accepts spectral data with the shape N × 1 × L, where N is the number of samples, and L is the number of wavelengths. The main body of the network contains eight layers of one-dimensional convolutional structures: the first three layers use large convolution kernels with sizes of 1 × 9, 1 × 7, and 1 × 5, respectively, to capture a wide range of spectral patterns; the remaining five layers use smaller 1 × 3 convolution kernels to further explore local detail features. The convolution stride is set to 1 for all layers. The first seven layers each contain eight convolution kernels, while the eighth layer extends to 16 convolution kernels, significantly enhancing feature expression capabilities.
Max pooling layers are inserted after the first and eighth layers, with a pooling kernel size of 1 × 3 and a stride of 2, reducing dimensionality to retain significant features while suppressing noise interference. In the end, a fully connected layer maps the features to a high-dimensional space, and the Softmax output layer generates a probability distribution for classification, enabling multi-class tasks. 1D-Net balances computational efficiency with feature expression ability, providing a robust foundational feature base for subsequent complex models. Its lightweight design makes it particularly suitable for rapid spectral analysis in resource-constrained scenarios and an indispensable feature extraction module in multi-model fusion architectures.
1D-ResNet is a deep convolutional network improved based on a residual learning mechanism, designed specifically to address the gradient vanishing problem in spectral feature extraction and to enhance the training stability of deep networks. Its core architecture consists of an initial convolutional layer, multi-level residual blocks, and a classification layer, with the input layer receiving spectral data in the same format as 1D-Net. The model structure is depicted in Figure 3.
The first layer of the network uses a 1 × 9 one-dimensional convolution kernel, configured with 8 channels, and employs the Tanh activation function to extract basic spectral features. This is followed by three levels of residual blocks, each containing two one-dimensional convolutional layers, both with a kernel size of 1 × 3, 8 channels, and a fixed stride of 1. The residual blocks utilize skip connections to directly add the input features to the convolutional outputs, mathematically expressed as:
O u t p u t   =   F ( x )   +   x
where F ( x ) represents the convolution operation, and x is the input feature. This design effectively mitigates the gradient degradation problem in deep networks, allowing the network depth to expand to dozens of layers while enhancing feature reuse capability. Max pooling layers are inserted between the residual blocks, with a pooling kernel size of 1 × 3 and a stride of 2, gradually compressing the feature dimensions while retaining key spectral patterns. In the end, a fully connected layer maps the higher-order features to the classification space, and the Softmax output layer generates a probability distribution for pine varieties. The residual structure provides stable and reliable intermediate feature representations for multi-model fusion, making it a core module in complex wood species identification scenarios.
1D-Inception is a deep learning model based on a multi-branch parallel structure that captures multi-scale features of near-infrared spectra through the collaborative effect of heterogeneous convolution kernels, significantly improving sensitivity to subtle spectral differences. The core innovation lies in the introduction of the Inception module, which combines convolution kernels of different sizes and pooling operations to achieve multi-level feature fusion of spectral signals. The detailed structure is presented in Figure 4.
The model input layer accepts spectral data in the same format as 1D-Net and 1D-ResNet. The main body consists of two levels of Inception modules and four layers of one-dimensional convolution stacked alternately. Each Inception module contains five parallel convolution branches and one pooling branch:
Convolution branches: These use convolution kernels of sizes 1 × 1, 1 × 3, 1 × 5, 1 × 7, and 1 × 9, with eight channels in each branch, to extract spectral features from local to global ranges.
Pooling branch: A 1 × 3 max pooling kernel (stride 1) is used to compress the feature dimensions while retaining significant spectral patterns. The outputs from each branch are concatenated along the channel dimension, forming a 48-channel feature matrix, mathematically expressed as:
O u t p u t   =   C o n c a t ( C 1 , C 3 , C 5 , C 7 , C 9 , P )
where C i represents the output of different convolution kernels, and P is the pooling result. This design enhances the model’s adaptability to spectral misalignment, offset, and intensity variations by fusing multi-scale features.
At the end of the network, the features are mapped to the classification space through a max pooling layer and a fully connected layer, with the Softmax output layer generating the final prediction result. As a feature enhancement module in the multi-model fusion architecture, this model effectively compensates for the limitations of single-scale convolutions, providing key technical support for analyzing complex spectral patterns.
In this study, we propose an innovative fusion model, MAFNet, which integrates multiple deep learning architectures to enhance the classification accuracy and robustness for Pinaceae species. The design of MAFNet is inspired by recent advancements in deep learning applications for NIR spectral analysis [13,14]. Single CNN models often face limitations in feature extraction depth and robustness to noise when processing complex spectral patterns, whereas multi-scale feature extraction and residual learning have been shown to significantly improve classification performance [25]. To address these challenges, MAFNet combines the lightweight feature extraction of 1D-Net, the multi-scale feature fusion of 1D-Inception, and the residual learning of 1D-ResNet to achieve comprehensive modeling of complex spectral signals from Pinus species. A key innovation of MAFNet is its dynamic weighted fusion mechanism. Each sub-model contributes to the final output through a learnable weight based on the features it learns during training. Specifically, MAFNet introduces a learnable weight vector to dynamically adjust the outputs of the three sub-models, with weights adaptively updated during training to ensure optimal contributions from each model in specific scenarios. This weighted strategy effectively integrates the strengths of each sub-model, enabling MAFNet to achieve more accurate classification results across diverse tasks.
Figure 5 illustrates the model fusion framework.
To ensure robust generalization during training and evaluation, the dataset is split into a training set and a validation set at a 7:3 ratio. Specifically, 70% of the data is allocated to the training set to enable the model to capture the data’s underlying patterns and characteristics, while the remaining 30% serves as the validation set to evaluate the model’s performance after each training cycle. This approach ensures that the model not only performs well on the training data but also effectively generalizes new data. The training process utilizes the Adam optimizer and cross-entropy loss function, with a batch size of 64 and a total of 500 epochs.

2.3. GAN

Data augmentation is a critical strategy for improving the performance of spectral classification with small sample sizes. Traditional methods, such as noise addition or linear interpolation, may introduce unrealistic variations, limiting the model’s generalization ability [23]. In contrast, GANs significantly enhance training set diversity by generating samples that closely align with the distribution of real data [22]. A GAN consists of two components: a Generator and a Discriminator. The Generator’s task is to produce synthetic data that is as realistic as possible, while the Discriminator’s task is to distinguish between generated and real data. The two components are trained in an adversarial manner, with the Generator continuously improving its synthetic data until the Discriminator can no longer reliably distinguish it as fake. This process operates through iterative competition, enabling the Generator to produce increasingly realistic data. GANs are extensively applied in areas like image creation, image restoration, and style transfer, demonstrating robust generative potential [26].
Figure 6 shows the schematic diagram of the GAN architecture.
This study uses the Wasserstein distance as the metric and builds a GAN architecture based on it to generate one-dimensional spectral sequence data. In WGAN, the discriminator must satisfy the Lipschitz continuity condition, meaning that the gradient of the discriminator’s output must be bounded [27]. Regular GANs implement this constraint through weight clipping; however, weight clipping can lead to poor training results.
In this study, gradient penalty is employed to directly constrain the gradients of the Discriminator, thereby ensuring the stability and consistency of the generated data. Specifically, the gradient penalty term encourages the norm of the Discriminator’s output gradients to approach 1, which is necessary to satisfy the 1-Lipschitz continuity condition. The formula for calculating the gradient penalty term is as follows:
L g p = λ E [ ( x ^ D ( x ^ ) 2     1 ) 2 ]
where x ^ is a sample obtained by random interpolation between real data and generated data; x ^ D x ^ is the gradient of the discriminator with respect to x ^ ; and λ is the regularization coefficient.
The discriminator’s loss function consists of three key components: the expected value of the generated sample score, the negative expected value of the real sample score, and the gradient penalty term based on random interpolation points (with the penalty coefficient set to λ = 10 ). The specific loss function expression is as follows:
L D = E [ D ( G ( z ) ) ]     E [ D ( x ) ] + λ E [ ( x ^ D ( x ^ ) 2     1 ) 2 ]
where D represents the discriminator, G ( z ) is the output of the generator, and x ^ is the random interpolation sample between real and generated data. The generator optimizes its performance by minimizing the negative expected value of the discriminator’s score for the generated samples. The loss function is:
L G =     E [ D ( G ( z ) ) ]
During training, the parameters are updated using the RMSProp optimizer, with a batch size of 16. The training frequency ratio between the discriminator and the generator is set to 5:1, and the entire training process lasts for 5000 epochs.

2.4. Model Training and Evaluation

The experimental environment of this study is based on the Python 3.9 programming language and the PyTorch 1.12 deep learning framework. The hardware configuration consists of a 2.50 GHz 13th Gen Intel (R) Core (TM) i5-13490F CPU (Intel Corporation, Santa Clara, CA, USA) and an NVIDIA GeForce RTX 4060Ti 8G GPU (NVIDIA Corporation, Santa Clara, CA, USA). To ensure the statistical reliability and robustness of the results, all models were trained and evaluated using five different random seeds. The performance metrics reported in this study, including accuracy, precision, recall, and F1-score, are presented as the mean ± standard deviation across these five independent runs.
This study evaluates the model performance using four evaluation metrics: accuracy, precision, recall, and F1 score.
A c c u r a c y   =   T P + T N T P + T N + F P + F N
P r e c i s i o n   =   T P T P + F P
R e c a l l   =   T P T P + F N
F 1 S c o r e   =   2 × P r e c i s i o n × R e c a l l P r e c i s i o n + R e c a l l
where TP is the number of samples correctly predicted by the model as positive categories; TN is the number of samples correctly predicted by the model as negative categories; FP is the number of class samples incorrectly predicted by the model as positive categories; FN is the number of positive samples incorrectly predicted by the model as negative categories.

3. Results

3.1. Comparison and Analysis of Model Performance

The core objective of this study was to evaluate the performance of the proposed MAFNet model for the NIR spectral classification of taxonomically similar Pinus species and benchmark it against multiple baseline models. As indicated in Table 3, the experimental framework encompassed traditional machine learning methods (KNN, RF, SVM, GB, XGBoost), deep learning approaches (1D-Net, 1D-Inception, 1D-ResNet), and the integrated MAFNet model developed in this work.
Table 3 presents the comparative performance metrics including accuracy, precision, recall, F1-score, train time model size, and Inference Time. MAFNet achieved the highest performance across all criteria, with 99.63 ± 0.36% accuracy, 99.57 ± 0.42% precision, 99.64 ± 0.34% recall, 99.60 ± 0.39% F1-score, a training time of 170.93 s, and a model size of 8.76 MB, and an inference time of 0.07 ms per sample. While MAFNet exhibited the longest training time among deep learning models due to its complex fusion architecture, its inference time remains highly competitive at 0.07 ms per sample, making it suitable for practical applications. Its performance is notably higher than that of its three constituent models—1D-Net, 1D-Inception, and 1D-ResNet—whose individual results are also listed for comparison. Among these constituent models, 1D-ResNet achieved the best balance of performance and efficiency with 97.53% accuracy and only 0.02 ms inference time.
Among conventional machine learning models, SVM performed best with 96.91 ± 0% accuracy (along with matching precision, recall, and F1-score), though it required significantly longer inference time (1.23 ms) compared to deep learning approaches. In contrast, KNN achieved comparable accuracy (95.99%) but exhibited the slowest inference time (4.61 ms) and largest model size (37.24 MB), highlighting the practical limitations of instance-based methods. Gradient Boosting demonstrated the fastest inference (0.01 ms) and most compact model size (0.74 MB) among traditional approaches, albeit with lower accuracy (92.22%).
Figure 7 presents the confusion matrices (left column) and training process curves (right column) of four models, ordered from top to bottom as 1D-Net (A, B), 1D-Inception (C, D), 1D-ResNet (E, F), and MAFNet (G, H). In the confusion matrices, the number on the left side of each cell indicates the total actual sample count of the corresponding tree species; the thin lines within the cells and their adjacent numbers denote the quantity of samples misclassified into other categories. Taking the confusion matrix of 1D-Net (Figure 7A) as an example, Larix gmelinii has a total of 60 actual samples, among which 1 sample is misclassified as Pinus massoniana and 3 samples are misclassified as Cedrus deodara; the number on the right side of the cell (representing the total number of samples predicted as this species) is 57, composed of 56 correctly classified Larix gmelinii samples and 1 misclassified Cedrus deodara sample. The curves on the right side of Figure 7 illustrate the variation trends of training loss (red), validation loss (blue), and validation accuracy (green) with the increase in training epochs, reflecting the characteristic that each model shows gradually decreasing loss and continuously improving accuracy during the training process.

3.2. Performance of Dataset Augmentation Using GAN

In this phase of experimentation, we employed a GAN to augment the dataset, aiming to enhance model performance in the Pinus timber classification task. The original dataset consisted of 1080 spectral samples across six species, with a training set of 756 samples and a validation set of 324 samples, as detailed in Table 4. After augmentation, the total number of spectra increased to 4920. Crucially, the validation set remained exactly the same as before augmentation, consisting of the original 324 samples, to ensure a fair and unbiased evaluation of model performance. The training set, however, was expanded to 4596 samples by adding 640 synthetic samples per species. This process resulted in a more balanced distribution of training samples per class (ranging from 754 to 776 samples per species) compared to the original imbalanced distribution (ranging from 114 to 136 samples per species), effectively mitigating class imbalance and providing a more robust training foundation for the classification models.
In order to address the quality of the augmented data directly, Figure 8 provides a side-by-side visualization of representative original and generated spectral curves for all six timber species. A comparative analysis clearly reveals a high degree of visual similarity between the synthetic and authentic data. It is evident that the generated spectra effectively preserve the overall shape and key absorption features of the original spectra, while introducing minor, realistic variations in intensity and noise. This demonstrates that the GAN architecture produced high-fidelity synthetic data that accurately captures the underlying distribution of the real spectral data, thereby validating its quality for augmenting the training set.
Figure 9 visually demonstrates the influence of GAN-based data augmentation on model performance (Figure 9A) and the training dynamics of MAFNet (Figure 9B). In Figure 9A, red points represent model accuracy before data generation, while blue points represent accuracy after generation; arrows clearly indicate whether each model’s performance rises or descends with augmentation. Figure 9B specifically illustrates the training loss, validation loss, and validation accuracy of MAFNet over training epochs, reflecting how loss decreases and accuracy improves as this model trains.
Quantitative metrics detailing the performance variations across models before and after augmentation are presented in Table 5. Among the nine models evaluated, seven exhibited overall performance improvement post-augmentation, whilst two demonstrated a decline in key metrics. Specifically, accuracy increased for KNN, RF, XGBoost, 1D-Net, 1D-Inception, 1D-ResNet and MAFNet following augmentation—with MAFNet achieving 99.88% accuracy. Conversely, SVM and GB exhibited marginal performance degradation.
By implementing a Wasserstein GAN with Gradient Penalty (WGAN-GP) architecture, this study successfully generated high-fidelity synthetic spectral data, enhancing both the diversity and scale of the training set. The GAN-generated spectra preserve the global trends inherent in the original data (Figure 8A–F) whilst introducing plausible variations consistent with authentic data distributions (e.g., noise perturbations, intensity fluctuations). This controlled diversity compels classification models (such as MAFNet) to learn more intrinsic spectral feature patterns rather than memorizing sample-specific noise artifacts from the limited original dataset. Experimental results demonstrate that augmentation improved MAFNet’s accuracy from 99.63% to 99.88% (Table 5), thereby enhancing classification efficacy.

3.3. Classification Performance of Different Surface Data

This study evaluated the classification performance of an identical model across three distinct anatomical planes of Pinus timber (cross, radial, and tangential sections), with metrics including accuracy, recall, and F1-score. Experimental data were derived from NIR spectroscopy, with samples collected from these orthogonal planes to capture differential wood anatomical characteristics.
Table 6 details the model’s performance metrics per section plane. The cross section achieved 99.63% accuracy, 99.64% recall, and 99.60% F1-score. The radial section attained 99.38% across all three metrics. For the tangential section, accuracy and recall were 98.77%, with an F1-score of 98.76%. The maximum accuracy differential between planes was 0.86% (cross vs. tangential).
Identical training and validation protocols were maintained across all section planes, employing the Adam optimizer at a learning rate of 0.0002. Validation set confusion matrices revealed minimal misclassifications in cross sections, moderate errors in radial sections, and marginally elevated misclassification rates in tangential sections—particularly between taxonomically proximate species (e.g., Cedrus deodara and Pinus caribaea).
Figure 10 comparatively visualizes classification performance through bar charts, demonstrating the cross plane’s superiority across all metrics, followed by radial and tangential sections, respectively. Figure 11 presents the confusion matrices for radial and tangential planes, revealing two misclassifications in radial sections versus four in tangential sections.

4. Discussion

4.1. Superior Performance of MAFNet in Pinus Species Classification

Experimental results demonstrate that the MAFNet model delivers exceptional performance in the NIR spectral classification of taxonomically similar Pinus species, achieving a 99.63% accuracy. This substantially outperforms all benchmark models, including traditional machine learning approaches where SVM attained the highest performance (96.91%) yet remained markedly inferior to MAFNet. While KNN achieved competitive accuracy (95.99%), it exhibited the slowest inference time (4.61 ms) and largest model size (37.24 MB) among all evaluated models, highlighting practical limitations for real-time applications. The sequentially decreasing performance of KNN, XGBoost, RF, and GB reflects the inherent limitations of conventional methods in processing complex spectral data, particularly their dependency on manual feature engineering [14].
A detailed analysis of MAFNet’s constituent models (Table 3) reveals the foundation of its success. Among them, 1D-ResNet achieved the highest standalone accuracy (97.53%), leveraging its residual learning mechanism to effectively train a deeper network and capture complex spectral patterns while maintaining efficient inference (0.02 ms). The 1D-Inception model, with its multi-scale feature extraction capability, also demonstrated strong performance (95.74% accuracy) with moderate computational requirements (0.03 ms inference time). In contrast, the lightweight 1D-Net, while computationally efficient (0.02 ms inference time) and compact (2.15 MB), showed a comparatively lower accuracy (94.20%), as its simpler architecture may limit its capacity to model the subtle spectral differences between closely related Pinus species.
It is noteworthy that MAFNet, while achieving the highest accuracy, exhibits a larger model size (8.76 MB) and longer training time (170.93 s) compared to its constituent models, which is expected given its fusion architecture that integrates three distinct subnetworks. However, its inference time remains practical at 0.07 ms per sample, making it suitable for real-world deployment despite the increased complexity.
The superior performance of MAFNet stems from the dynamic fusion of these architecturally diverse networks. The high accuracy of 1D-ResNet suggests that it provides a robust and stable foundational feature representation. Concurrently, the 1D-Inception module contributes complementary multi-scale features, enhancing the model’s sensitivity to both fine-grained and broader spectral characteristics. Although 1D-Net alone underperforms the others, its inclusion enriches the feature diversity and potentially aids in capturing more generalized patterns. The learnable weight vector within MAFNet automatically optimizes the contribution of each sub-model during training, resulting in a synergistic combination that surpasses any single constituent model.
This demonstrates that the fusion strategy effectively compensates for the individual limitations of each sub-model and captures a more comprehensive set of discriminative features from the NIR spectra. The trade-off between model complexity and performance is well-balanced in MAFNet, as the substantial improvement in classification accuracy justifies the increased parameter count and computational requirements. Ultimately, by integrating multi-branch CNNs with data augmentation, MAFNet effectively extracts more discriminative spectral features and fully leverages sample diversity, thereby significantly elevating classification precision [1].

4.2. Enhanced Model Robustness Through GAN-Based Data Augmentation

Experimental results demonstrate that data augmentation utilizing the WGAN-GP architecture significantly enhances performance for most models in Pinus timber NIR spectral classification. Following training set expansion from 756 to 4596 samples, KNN, RF, GB, XGBoost, and MAFNet all exhibited improved accuracy. MAFNet demonstrated particularly notable gains, achieving 99.88% accuracy (Table 5)—a 0.19 percentage point increase from its baseline 99.63%. This demonstrates a broad positive impact on model generalization, evidencing that high-fidelity synthetic spectra generated by GANs effectively enhance training set diversity and scale [28].
Figure 8 reveals that synthesized spectral curves maintain strong global trend alignment with originals whilst introducing biologically plausible variations (e.g., noise perturbations and intensity fluctuations). These variations preserve core spectral characteristics while providing enriched samples that compel models to learn more robust feature representations [29]. Crucially, the introduced variations mitigate the risk of overfitting from data duplication. By generating novel, plausible spectra rather than simply replicating existing samples, the WGAN-GP reduces the model’s tendency to memorize noise or specific artifacts from the limited original dataset, thereby promoting generalization to unseen, real data. MAFNet’s multi-branch 1D-CNN architecture capitalized particularly effectively on this augmented diversity, achieving perfect classification.
Conversely, SVM exhibited marginal performance degradation post-augmentation. SVM’s sensitivity to data distribution may render its high-dimensional decision boundaries vulnerable to subtle synthetic sample deviations. Although 1D-ResNet’s performance did not decline, its improvement was notably limited, suggesting limited feature extraction capacity of monolithic architectures like 1D-ResNet could amplify noise in synthetic data, compromising generalization. MAFNet’s superior robustness stems from synergistic integration of multi-branch feature extraction with augmentation—demonstrating enhanced capability for modeling complex spectral patterns.
The comparative results in Table 5 effectively serve as an ablation study. The superior performance of MAFNet over any single 1D-CNN model underscores the contribution of the fusion strategy. The performance of the standalone models (1D-Net, 1D-Inception, 1D-ResNet) on the original dataset establishes their baseline capabilities. The superior performance of MAFNet over any single 1D-CNN model underscores the contribution of the fusion strategy. Subsequently, the significant performance boost observed in these models, especially 1D-Net and 1D-Inception, after GAN augmentation (Table 5) directly validates the critical role of data enhancement. Finally, MAFNet’s achievement of the highest accuracy on the augmented dataset (99.88%) demonstrates the synergistic effect of combining the robust fusion architecture with high-quality augmented data, confirming that both components are indispensable for optimal performance.
In conclusion, WGAN-GP generated spectral data provides substantial utility for Pinus species classification. MAFNet’s optimal performance on augmented data validates both the efficacy of this augmentation strategy and the latent potential of its fusion architecture for classifying taxonomically proximate species. This methodology delivers a robust technical solution for rapid, non-destructive timber identification while establishing an extensible framework for analogous spectral classification tasks.

4.3. Section-Dependent Classification Performance and Anatomical Influences

Experimental results indicate that near-infrared spectroscopy coupled with classification models achieves robust performance across all three anatomical sections (cross, radial, tangential) in Pinus timber classification, with accuracy exceeding 98.77% in each case. This demonstrates high reliability and robustness. Nevertheless, subtle performance variations exist between sections: cross sections (99.63% accuracy) outperform radial sections (99.38%), whilst tangential sections (98.77%) exhibit marginally lower performance—yielding a maximum accuracy differential of 0.86%. These discrepancies likely reflect nuanced influences of section-specific anatomical structures and spectral characteristics on classification efficacy.
Cross sections delivered optimal classification performance (99.63% accuracy). This superiority may be attributed to their structural homogeneity, where clearly defined growth rings, ray parenchyma, and vessel distributions—combined with planar surface characteristics—reduce light-scattering artifacts in NIR spectra. Consequently, absorption features of biochemical constituents (cellulose, hemicellulose, lignin) exhibit enhanced stability [5]. The resultant high signal-to-noise ratio (SNR) provides more reliable feature inputs, improving classification precision and stability.
Radial sections demonstrated slightly reduced performance (99.38% accuracy), potentially reflecting anatomical complexity. The heterogeneous spatial distribution of vessels, fibers, and rays in this plane increases spectral variability [7]. Nevertheless, classification accuracy remains high, confirming sufficient spectral discriminability despite potential feature extraction inefficiencies arising from signal complexity.
Tangential sections yielded the lowest performance (98.77% accuracy), albeit approaching 99%. This plane primarily exhibits fibers and rays, where complex surface morphology and tissue heterogeneity reduce SNR. Furthermore, tangential sampling may introduce extraneous noise (e.g., surface roughness, cutting-angle variations), amplifying spectral variability and exerting minor adverse effects on classification [24].
Collectively, cross sections’ performance advantage stems from anatomical uniformity. Well-defined growth rings, rays, and vessels minimize light scattering, yielding stable biochemical absorption features. Conversely, radial sections’ complex fiber-ray distributions increase spectral complexity, whilst tangential sections’ surface irregularities further degrade SNR. These findings align with recent studies—notably Xue et al. [24] reporting cross section superiority in Guibourtia identification. Therefore, prioritizing cross section data optimizes classification performance in practical applications, delivering enhanced technical reliability for rapid, non-destructive Pinus timber identification.

5. Conclusions

The MAFNet model proposed in this study, which integrates GANs and 1D-CNNs, demonstrates superior performance in the classification of Pinaceae species. When contextualized against state-of-the-art methods for wood identification, such as the Wood-CNN model [12], achieving 0.9912 accuracy on macroscopic images or the SG-DCGAN-1D-CNN [23] for spectral optimization, MAFNet’s performance (99.63% accuracy, rising to 99.88% after augmentation) is highly competitive, particularly within the specific domain of NIR spectral classification for taxonomically similar softwoods. Its key strengths lie in the effective fusion of multi-scale features and the successful integration of high-quality data augmentation. During the experiments, we compared MAFNet with various traditional machine learning and deep learning models, finding that MAFNet not only outperformed these models but also exhibited greater robustness. Furthermore, this study explored the impact of different sectional data types on model performance, revealing that cross-sectional data yielded the best classification performance. This study has certain limitations. The current model was trained and validated on a specific set of six Pinaceae species; its generalizability to a broader range of wood species, especially hardwoods or tropical species with greater anatomical diversity, requires further investigation. Additionally, the performance advantage of MAFNet comes with increased architectural complexity compared to simpler models like 1D-Net or SVM.
In conclusion, MAFNet’s high accuracy and robustness provide an effective tool for the rapid and non-destructive identification of Pinus species, supporting efforts to combat illegal logging and regulate timber trade. Future research could focus on optimizing MAFNet’s architecture for efficiency, expanding its application to a wider array of timber species, and exploring its deployment on portable NIR devices to enhance its practicality in field applications.

Author Contributions

Conceptualization, S.X. and H.S.; methodology, S.X. and H.S.; software, S.X.; validation, S.X., H.S. and L.Z.; formal analysis, H.S.; investigation, S.X. and H.S.; resources, L.Z.; data curation, S.X.; writing—original draft preparation, S.X. and H.S.; writing—review and editing, L.Z.; visualization, S.X.; supervision, L.Z.; project administration, L.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets generated for this study are part of an ongoing research project and are therefore not publicly available at this time to protect the integrity of future findings. Researchers interested in collaboration or data access may contact the corresponding author with a detailed proposal.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Zheng, C.; He, T.; Jiao, L.; Lu, Y.; Liu, S.; Li, T.; Miao, Y.; Feng, D.; Lin, J.; Feng, X.; et al. Deep Learning-Based Species Identification of Gymnosperm Xylem: The Practice in Digital Forestry. Comput. Electron. Agric. 2025, 237, 110581. [Google Scholar] [CrossRef]
  2. Dormontt, E.E.; Boner, M.; Braun, B.; Breulmann, G.; Degen, B.; Espinoza, E.; Gardner, S.; Guillery, P.; Hermanson, J.C.; Koch, G.; et al. Forensic Timber Identification: It’s Time to Integrate Disciplines to Combat Illegal Logging. Biol. Conserv. 2015, 191, 790–798. [Google Scholar] [CrossRef]
  3. Lin, C.; Lu, Y.; Liu, S.; Wang, Z.; Yao, L.; Yin, Y.; Jiao, L. Retrieving Complete Plastid Genomes of Endangered Guibourtia Timber Using Hybridization Capture for Forensic Identification and Phylogenetic Analysis. Forensic Sci. Int. Genet. 2024, 69, 103006. [Google Scholar] [CrossRef] [PubMed]
  4. National Forestry and Grassland Administration. List of National Key Protected Wild Plants in China. 2021. Available online: https://www.forestry.gov.cn/c/www/lczc/10746.jhtml (accessed on 24 May 2025).
  5. Richter, H.G.; Grosser, D.; Heinz, I.; Gasson, P.E. IAWA List of Microscopic Features for Softwood Identification. IAWA J. 2004, 25, 1–70. [Google Scholar] [CrossRef]
  6. Jiao, L.; Lu, Y.; He, T.; Guo, J.; Yin, Y. DNA Barcoding for Wood Identification: Global Review of the Last Decade and Future Perspective. IAWA J. 2020, 41, 620–643. [Google Scholar] [CrossRef]
  7. Guo, F.; Altaner, C.M. Molecular Deformation of Wood and Cellulose Studied by near Infrared Spectroscopy. Carbohydr. Polym. 2018, 197, 1–8. [Google Scholar] [CrossRef]
  8. Braga, J.W.B.; Pastore, T.C.M.; Coradin, V.T.R.; Camargos, J.A.A.; Da Silva, A.R. The Use of near Infrared Spectroscopy to Identify Solid Wood Specimens of Swietenia Macrophylla (Cites Appendix II). IAWA J. 2011, 32, 285–296. [Google Scholar] [CrossRef]
  9. Pastore, T.C.M.; Braga, J.W.B.; Coradin, V.T.R.; Magalhães, W.L.E.; Okino, E.Y.A.; Camargos, J.A.A.; De Muñiz, G.I.B.; Bressan, O.A.; Davrieux, F. Near Infrared Spectroscopy (NIRS) as a Potential Tool for Monitoring Trade of Similar Woods: Discrimination of True Mahogany, Cedar, Andiroba, and Curupixá. Holzforschung 2011, 65, 73–80. [Google Scholar] [CrossRef]
  10. Bergo, M.C.J.; Pastore, T.C.M.; Coradin, V.T.R.; Wiedenhoeft, A.C.; Braga, J.W.B. NIRS Identification of Swietenia Macrophylla Is Robust Across Specimens from 27 Countries. IAWA J. 2016, 37, 420–430. [Google Scholar] [CrossRef]
  11. Zhao, L.; Wang, J. The Method of Identifying the Species of Coniferous Wood Based on GLCM. J. Coast. Res. 2020, 103, 570–574. [Google Scholar] [CrossRef]
  12. Pan, X.; Qiu, J.; Yang, Z. Identification of Five Similar Cinnamomum Wood Species Using Portable Near-Infrared Spectroscopy. Spectroscopy 2022, 37, 16–23, 49. [Google Scholar] [CrossRef]
  13. Pan, X.; Qiu, J.; Yang, Z. Identification of Softwood Species Using Convolutional Neural Networks and Raw Near-Infrared Spectroscopy. Wood Mater. Sci. Eng. 2023, 18, 1338–1348. [Google Scholar] [CrossRef]
  14. Yang, S.-Y.; Kwon, O.; Park, Y.; Chung, H.; Kim, H.; Park, S.-Y.; Choi, I.-G.; Yeo, H. Application of Neural Networks for Classifying Softwood Species Using near Infrared Spectroscopy. J. Near Infrared Spectrosc. 2020, 28, 298–307. [Google Scholar] [CrossRef]
  15. Zhao, P.; Wang, C.-K. Hardwood Species Classification with Hyperspectral Microscopic Images. J. Spectrosc. 2019, 2019, 2039453. [Google Scholar] [CrossRef]
  16. Zhao, P.; Li, Z.-Y.; Li, Y. An Incremental Self-Adaptive Wood Species Classification Prototype System. J. Spectrosc. 2019, 2019, 9247386. [Google Scholar] [CrossRef]
  17. Cheng, Y.; Fang, X.; Tang, Z.; Yu, Z.; Sun, L.; Zhu, L. SDR2Tr-GAN: A Novel Medical Image Fusion Pipeline Based on GAN with SDR2 Module and Transformer Optimization Strategy. Int. J. Imaging Syst. Technol. 2024, 34, e23208. [Google Scholar] [CrossRef]
  18. Bakht, A.B.; Jia, Z.; Din, M.U.; Akram, W.; Saoud, L.S.; Seneviratne, L.; Lin, D.; He, S.; Hussain, I. MuLA-GAN: Multi-Level Attention GAN for Enhanced Underwater Visibility. Ecol. Inform. 2024, 81, 102631. [Google Scholar] [CrossRef]
  19. Xu, J.; Lu, K.; Shi, X.; Qin, S.; Wang, H.; Ma, J. A DenseUnet Generative Adversarial Network for Near-Infrared Face Image Colorization. Signal Process. 2021, 183, 108007. [Google Scholar] [CrossRef]
  20. Qi, H.; Huang, Z.; Jin, B.; Tang, Q.; Jia, L.; Zhao, G.; Cao, D.; Sun, Z.; Zhang, C. SAM-GAN: An Improved DCGAN for Rice Seed Viability Determination Using near-Infrared Hyperspectral Imaging. Comput. Electron. Agric. 2024, 216, 108473. [Google Scholar] [CrossRef]
  21. Zhang, Z.; Gao, Q.; Liu, L.; He, Y. A High-Quality Rice Leaf Disease Image Data Augmentation Method Based on a Dual GAN. IEEE Access 2023, 11, 21176–21191. [Google Scholar] [CrossRef]
  22. Lopes, D.J.V.; Monti, G.F.; Burgreen, G.W.; Moulin, J.C.; Dos Santos Bobadilha, G.; Entsminger, E.D.; Oliveira, R.F. Creating High-Resolution Microscopic Cross-Section Images of Hardwood Species Using Generative Adversarial Networks. Front. Plant Sci. 2021, 12, 760139. [Google Scholar] [CrossRef]
  23. Bao, X.; Huang, D.; Yang, B.; Li, J.; Opeyemi, A.T.; Wu, R.; Weng, H.; Cheng, Z. Combining Deep Convolutional Generative Adversarial Networks with Visible-near Infrared Hyperspectral Reflectance to Improve Prediction Accuracy of Anthocyanin Content in Rice Seeds. Food Control 2025, 174, 111218. [Google Scholar] [CrossRef]
  24. Xue, X.; Chen, Z.; Wu, H.; Gao, H. Identification of Guiboutia Species by NIR-HSI Spectroscopy. Sci. Rep. 2022, 12, 11507. [Google Scholar] [CrossRef]
  25. Kanayama, H.; Ma, T.; Tsuchikawa, S.; Inagaki, T. Cognitive Spectroscopy for Wood Species Identification: Near Infrared Hyperspectral Imaging Combined with Convolutional Neural Networks. Analyst 2019, 144, 6438–6446. [Google Scholar] [CrossRef]
  26. He, C.; Wang, R.; Shan, S.; Chen, X. Introspective GAN: Learning to Grow a GAN for Incremental Generation and Classification. Pattern Recognit. 2024, 151, 110383. [Google Scholar] [CrossRef]
  27. Arjovsky, M.; Chintala, S.; Bottou, L. Wasserstein GAN. arXiv 2017, arXiv:1704.00028. [Google Scholar] [CrossRef]
  28. Zhao, Y.; Zhao, Y.; Liu, X.; Fu, H.; Wang, C.; Han, Z. A CNN-BiGRU-Selfattention Model Combined with GAN Reconstruction and Reverse Feature Fusion for Apple Pesticide Residues Detecting. J. Food Compos. Anal. 2025, 140, 107264. [Google Scholar] [CrossRef]
  29. Liu, T.; Liu, Z.; Zhang, K.; Li, C.; Zhang, Y.; Mu, Z.; Mu, M.; Xu, M.; Zhang, Y.; Li, X. Research on the Generation and Annotation Method of Thin Section Images of Tight Oil Reservoir Based on Deep Learning. Sci. Rep. 2024, 14, 12805. [Google Scholar] [CrossRef]
Figure 1. Experimental flowchart.
Figure 1. Experimental flowchart.
Applsci 15 10942 g001
Figure 2. The structure of 1D-Net.
Figure 2. The structure of 1D-Net.
Applsci 15 10942 g002
Figure 3. The structure of 1D-ResNet.
Figure 3. The structure of 1D-ResNet.
Applsci 15 10942 g003
Figure 4. The structure of 1D-Inception.
Figure 4. The structure of 1D-Inception.
Applsci 15 10942 g004
Figure 5. Model fusion framework.
Figure 5. Model fusion framework.
Applsci 15 10942 g005
Figure 6. The main principle of GAN.
Figure 6. The main principle of GAN.
Applsci 15 10942 g006
Figure 7. Confusion matrices (left column) and training process curves (right column) for four models: (A,B) 1D-Net, (C,D) 1D-Inception, (E,F) 1D-ResNet, and (G,H) MAFNet.
Figure 7. Confusion matrices (left column) and training process curves (right column) for four models: (A,B) 1D-Net, (C,D) 1D-Inception, (E,F) 1D-ResNet, and (G,H) MAFNet.
Applsci 15 10942 g007
Figure 8. Validation of the GAN-generated spectral data. Comparison of original (blue) and augmented (orange) near-infrared spectral curves for each of the six pine species: (A) Larix gmelinii, (B) Pinus massoniana, (C) Pinus sylvestris, (D) Pinus caribaea, (E) Pinus bungeana, and (F) Cedrus deodara.
Figure 8. Validation of the GAN-generated spectral data. Comparison of original (blue) and augmented (orange) near-infrared spectral curves for each of the six pine species: (A) Larix gmelinii, (B) Pinus massoniana, (C) Pinus sylvestris, (D) Pinus caribaea, (E) Pinus bungeana, and (F) Cedrus deodara.
Applsci 15 10942 g008
Figure 9. Comparative analysis of model performance and training process. (A) Accuracy changes of different models before and after GAN-based data generation. (B) Training curves of the MAFNet model.
Figure 9. Comparative analysis of model performance and training process. (A) Accuracy changes of different models before and after GAN-based data generation. (B) Training curves of the MAFNet model.
Applsci 15 10942 g009
Figure 10. Training process data of the MAFNet model using different sectional datasets for classification. (A) Training loss, validation loss, and validation accuracy changes for radial section data. (B) Training loss, validation loss, and validation accuracy changes for tangential section data.
Figure 10. Training process data of the MAFNet model using different sectional datasets for classification. (A) Training loss, validation loss, and validation accuracy changes for radial section data. (B) Training loss, validation loss, and validation accuracy changes for tangential section data.
Applsci 15 10942 g010
Figure 11. Performance of the MAFNet Model on Validation Sets Using Different Surface Data.
Figure 11. Performance of the MAFNet Model on Validation Sets Using Different Surface Data.
Applsci 15 10942 g011
Table 1. Overview of models, datasets and performance in related work.
Table 1. Overview of models, datasets and performance in related work.
Existing WorkUsed ModelDataset CharacteristicsPerformance
Yang et al. [14]CNN5 species; NIR spectra (680–2500 nm, 1 nm resolution);Validation accuracy: 100%
Xue et al. [24]SVM + Successive Projections Algorithm (SPA)5 Guiboutia species; NIR-HSI spectra (982–2005 nm);Test set accuracy: 100%, sensitivity: 100%, specificity: 100%
Pan et al. [12]PLS-DA + SNV + First Derivative Preprocessing5 similar Cinnamomum wood species; portable NIR spectra (1595–2396 nm);Species-level accuracy: 100%
Pan et al. [13]Wood-CNN21 Pinaceae species; NIR spectra (780–2440 nm);Classification accuracy: 0.9912
Bao et al. [23]SG-DCGAN-1D-CNN126 black rice lines; NIR spectra (425–1690 nm);Prediction R2: 0.87
Zheng et al. [1]RepLKNet-31B22 common species from 4 genera of Pinaceae family; 481 wood specimens, 38,953 transverse section macroscopic imagesGenus-level Top-1 accuracy: 98.55%; species-level Top-1 accuracy: 80.11%;
Table 2. Sample Information.
Table 2. Sample Information.
LabelLatin NameGenusFamily
LarixLarix gmeliniiLarixPinaceae
Masson PinePinus massonianaPinusPinaceae
Scots PinePinus sylvestrisPinusPinaceae
Radiata PinePinus caribaeaPinusPinaceae
White PinePinus bungeanaPinusPinaceae
CedarCedrus deodaraCedrusPinaceae
Table 3. The performance of each model.
Table 3. The performance of each model.
ModelAccuracy (%)Precision (%)Recall (%)F1-Score (%)Train Time (s)Model Size (MB)Inference Time (ms/Sample)
KNN95.99 ± 096.08 ± 096.12 ± 096.01 ± 00.0537.244.61
RF92.90 ± 0.5292.92 ± 0.4993.36 ± 0.4993.02 ± 0.4915.604.310.02
SVM96.91 ± 096.79 ± 097.19 ± 096.86 ± 066.2022.331.23
GB92.22 ± 0.2392.34 ± 0.2092.65 ± 0.2492.38 ± 0.232532.660.740.01
XGBoost94.14 ± 094.02 ± 094.14 ± 094.15 ± 058.700.760.02
1D-Net94.20 ± 1.2994.22 ± 1.0694.75 ± 1.0694.22 ± 1.1247.132.150.02
1D-Inception95.74 ± 1.3795.65 ± 1.2696.16 ± 1.2595.70 ± 1.2974.123.420.03
1D-ResNet97.53 ± 0.6597.34 ± 0.6597.74 ± 0.5997.43 ± 0.6761.672.890.02
MAFNet99.63 ± 0.3699.57 ± 0.4299.64 ± 0.3499.60 ± 0.39170.938.760.07
Table 4. Distribution of spectral samples per species before and after data augmentation.
Table 4. Distribution of spectral samples per species before and after data augmentation.
SpeciesBefore GenerationAfter Generation
Total SpectraTraining SetValidation SetTotal SpectraTraining SetValidation Set
Larix gmelinii1801206082076060
Pinus massoniana1801324882077248
Pinus sylvestris1801146682075466
Pinus caribaea1801364482077644
Pinus bungeana1801344682077446
Cedrus deodara1801206082076060
Total108075632449204596324
Table 5. Evaluation metric performance of each model before and after data generation.
Table 5. Evaluation metric performance of each model before and after data generation.
ModelBefore GenerationAfter Generation
Accuracy
(%)
Precision
(%)
Recall
(%)
F1–Score (%)Accuracy
(%)
Precision
(%)
Recall
(%)
F1–Score (%)
KNN95.99 ± 096.08 ± 096.12 ± 096.01 ± 096.91 ± 096.89 ± 096.97 ± 096.86 ± 0
RF92.90 ± 0.5292.92 ± 0.4993.36 ± 0.4993.02 ± 0.4993.77 ± 0.2393.77 ± 0.2294.17 ± 0.293.88 ± 0.22
SVM96.91 ± 096.79 ± 097.19 ± 096.86 ± 096.30 ± 096.30 ± 096.69 ± 096.28 ± 0
GB92.22 ± 0.2392.34 ± 0.2092.65 ± 0.2492.38 ± 0.2391.85 ± 0.2592.04 ± 0.2492.54 ± 0.2692.09 ± 0.23
XGBoost94.14 ± 094.02 ± 094.14 ± 094.15 ± 094.44 ± 094.57 ± 094.81 ± 094.60 ± 0
1D-Net94.20 ± 1.2994.22 ± 1.0694.75 ± 1.0694.22 ± 1.1298.95 ± 0.2598.78 ± 0.2799.04 ± 0.2498.90 ± 0.27
1D-Inception95.74 ± 1.3795.65 ± 1.2696.16 ± 1.2595.70 ± 1.2999.38 ± 0.2899.28 ± 0.3199.43 ± 0.2699.34 ± 0.30
1D-ResNet97.53 ± 0.6597.34 ± 0.6597.74 ± 0.5997.43 ± 0.6797.78 ± 0.7197.58 ± 0.7497.98 ± 0.6797.69 ± 0.73
MAFNet99.63 ± 0.3699.57 ± 0.4299.64 ± 0.3499.60 ± 0.3999.88 ± 0.1599.86 ± 0.1899.88 ± 0.1599.86 ± 0.17
Table 6. Performance comparison across different section planes.
Table 6. Performance comparison across different section planes.
ModelAccuracy (%)Recall (%)F1-Score (%)
Cross Section99.6399.6499.60
Radial Section99.3899.3899.38
Tangential Section98.7798.7798.76
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xu, S.; Su, H.; Zhao, L. Research on the Classification Method of Pinus Species Based on Generative Adversarial Networks and Convolutional Neural Networks. Appl. Sci. 2025, 15, 10942. https://doi.org/10.3390/app152010942

AMA Style

Xu S, Su H, Zhao L. Research on the Classification Method of Pinus Species Based on Generative Adversarial Networks and Convolutional Neural Networks. Applied Sciences. 2025; 15(20):10942. https://doi.org/10.3390/app152010942

Chicago/Turabian Style

Xu, Shuo, Hang Su, and Lei Zhao. 2025. "Research on the Classification Method of Pinus Species Based on Generative Adversarial Networks and Convolutional Neural Networks" Applied Sciences 15, no. 20: 10942. https://doi.org/10.3390/app152010942

APA Style

Xu, S., Su, H., & Zhao, L. (2025). Research on the Classification Method of Pinus Species Based on Generative Adversarial Networks and Convolutional Neural Networks. Applied Sciences, 15(20), 10942. https://doi.org/10.3390/app152010942

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop