Ginkgo biloba L. is a rare dioecious species that is valued for its diverse applications and is cultivated globally. This study aimed to develop a rapid and effective method for determining the sex of a Ginkgo biloba. Green and yellow leaves representing annual growth stages were scanned with a hyperspectral imager, and classification models for RGB images, spectral features, and a fusion of spectral and image features were established. Initially, a ResNet101 model classified the RGB dataset using the proportional scaling–background expansion preprocessing method, achieving an accuracy of 90.27%. Further, machine learning algorithms like support vector machine (SVM), linear discriminant analysis (LDA), and subspace discriminant analysis (SDA) were applied. Optimal results were achieved with SVM and SDA in the green leaf stage and LDA in the yellow leaf stage, with prediction accuracies of 87.35% and 98.85%, respectively. To fully utilize the optimal model, a two-stage Period-Predetermined (PP) method was proposed, and a fusion dataset was built using the spectral and image features. The overall accuracy for the prediction set was as high as 96.30%. This is the first study to establish a standard technique framework for Ginkgo sex classification using hyperspectral imaging, offering an efficient tool for industrial and ecological applications and the potential for classifying other dioecious plants.
Ginkgo biloba L. plays an important role in biodiversity conservation. Accurate identification of Ginkgo in forest environments remains challenging due to its visual similarity to other broad-leaved species during the green-leaf period and to species with yellow foliage during autumn. In this study, we propose a novel two-stage segment-then-classify (STC) strategy to improve the accuracy of Ginkgo identification from unmanned aerial vehicle (UAV) imagery. First, the Segment Anything Model (SAM) was fine-tuned for canopy segmentation across the green-leaf stage and the yellow-leaf stage. A post-processing pipeline was developed to optimize mask quality, ensuring independent and complete tree crown segmentation. Subsequently, a ResNet-101-based classification model was trained to distinguish Ginkgo from other tree species. The experimental results showed that the STC strategy achieved significant improvements compared to the YOLOv8 model. In the yellow-leaf stage, it reached an F1-score of 92.96%, improving by 24.50 percentage points over YOLOv8. In the more challenging green-leaf stage, the F1-score improved by 31.27 percentage points, surpassing YOLOv8’s best performance in the yellow-leaf stage. These findings demonstrate that the STC framework provides a reliable solution for high-precision identification of Ginkgo in forest ecosystems, offering valuable support for biodiversity monitoring and forest management.