Abstract
INTRODUCTION: Accurate classification of corn seeds is vital for the effective utilization of germplasm resources and the improvement of seed selection and breeding efficiency. Traditional manual classification methods are labor-intensive and prone to errors. In contrast, machine learning techniques-particularly convolutional neural networks (CNNs)-have demonstrated superior performance in terms of classification accuracy, robustness, and generalization. However, conventional hyperspectral data processing approaches often fail to simultaneously capture both spectral and textural features effectively. METHODS: To overcome this limitation, we propose a novel convolutional neural network architecture with a variable-depth convolutional kernel structure (VD-CNN). This design enables the network to adaptively extract continuous spectral features by modulating kernel depth, while simultaneously capturing fine-grained textural patterns through hierarchical convolutional operations. In our experiments, we selected eight widely cultivated corn seed varieties and collected hyperspectral images for 100 seeds per variety. A four-layer CNN framework was constructed, and a total of 12 models were developed by varying the convolutional kernel depth to evaluate the impact on classification performance. RESULTS: Experimental results show that the proposed VD-CNN achieves optimal performance when the convolutional kernel depth is set to 15, attaining a training accuracy of 98.65% and a test accuracy of 96.97%. To assess the generalization ability of the model, additional experiments were conducted on a publicly available rice seed hyperspectral dataset. The VD-CNN consistently outperformed existing benchmark models, improving the classification accuracy by 3.14% over the best baseline. These results validate the robustness and adaptability of the proposed architecture across different crop species and imaging conditions. DISCUSSION: These findings demonstrate that the proposed VD-CNN effectively captures both spectral and textural features in hyperspectral data, significantly enhancing classification performance. The method offers a promising framework for hyperspectral image analysis in seed classification and other agricultural applications.