journal article·2026-06-12Open access

An Explainable Artificial Intelligence Framework for the Classification of Pumpkin Seed Varieties (Cucurbita pepo L.) Using Morphological Features

Sajad Sabzi, Omid Daliran, Raziyeh Pourdarbani, Ginés García-Mateos, José Miguel Molina-Martínez

Applied Sciences· Volume 16· Issue 12

Abstract

Accurate automatic classification of seed varieties is important for seed sorting, quality assurance, and plant breeding, yet reliable discrimination remains difficult when cultivars exhibit highly similar visual characteristics. This study presents a reproducible and interpretable framework for the binary classification of two Turkish pumpkin seed varieties using tabular morphological descriptors extracted from segmented seed images. Unlike many previous machine learning studies in this domain, which offer limited interpretability and leave model decisions largely as a black box, the proposed approach places Explainable Artificial Intelligence (XAI) at the center of the analysis. The framework combines biologically meaningful feature engineering, Optuna-based hyperparameter optimization, repeated stratified cross-validation, and a comparative evaluation of XGBoost, LightGBM, and CatBoost. Model explainability was investigated using SHapley Additive exPlanations (SHAP) to identify the morphological traits driving both global and instance-level predictions, while corrected repeated k-fold t-tests were used to assess the statistical significance of performance differences, which confirmed comparable accuracy among the three boosting models and a significant advantage over the baseline classifiers. All three boosting ensembles consistently outperformed the baseline classifiers (SVM, Logistic Regression, and Random Forest) on the hold-out test set. CatBoost achieved the best overall results, with an accuracy of 0.888, an F1-score of 0.879, and an MCC of 0.777. SHAP analysis consistently highlighted compactness, roundness, eccentricity, and engineered interaction descriptors as the most influential predictors. Overall, the proposed XAI-driven framework provides an accurate and transparent solution for pumpkin seed classification.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Smart Agriculture and AI · Spectroscopy and Chemometric Analyses · Advances in Cucurbitaceae Research

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Biosystems Engineering, Gorgan University of Agricultural Sciences and Natural Resources, Gorgan 49189-16573, Iran

Independent Researcher, Tehran 31976-46813, Iran

Department of Biosystems Engineering, University of Mohaghegh Ardabili, Ardabil 56199-11367, Iran

Department of Computer Science and Systems, Universidad de Murcia, 30100 Murcia, Spain

Agricultural and Marine Engineering Research Group, Polytechnic University of Cartagena, 30203 Cartagena, Spain

Funding

Ministerio de Agricultura, Pesca y Alimentación · Fundación Séneca - Agencia de Ciencia y Tecnología de la Región de Murcia · KONERY EFICIENCIA ENERGÉTICA S.L.

References (23)

Show source-provided references
1. Morphological and molecular diversity in a germplasm collection of seed pumpkin10.1016/j.scienta.2013.02.015 ↗
2. Nutritional, phytochemical, and antimicrobial attributes of seeds and kernels of different pumpkin cultivars10.1002/fft2.117 ↗
3. Kernel to computation: Identifying optimal feature set for red rice classification10.1016/j.atech.2025.101065 ↗
4. The use of machine learning methods in classification of pumpkin seeds (Cucurbita pepo L.)10.1007/s10722-021-01226-0 ↗
5. Recognition and classification of external skin damage in citrus fruits using multispectral data and morphological features10.1016/j.biosystemseng.2009.03.009 ↗
6. Application for the estimation of the standard citrus colour index (CCI) using image processing in mobile devices10.1016/j.biosystemseng.2017.12.012 ↗
7. Eryigit, R., and Tugrul, B. (2021). Performance of various deep-learning networks in the seed classification problem. Symmetry, 13.10.3390/sym13101892 ↗
8. Evaluation metrics and statistical tests for machine learning10.1038/s41598-024-56706-x ↗
9. Chicco, D., and Jurman, G. (2020). The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genom., 21.10.1186/s12864-019-6413-7 ↗
10. Chen, T., and Guestrin, C. (2016). XGBoost: A Scalable Tree Boosting System. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, ACM.10.1145/2939672.2939785 ↗
11. LightGBM: A Highly Efficient Gradient Boosting Decision Tree
12. CatBoost: Unbiased Boosting with Categorical Features
13. A Unified Approach to Interpreting Model Predictions
14. Explaining anomalies detected by autoencoders using Shapley Additive Explanations10.1016/j.eswa.2021.115736 ↗
15. Explanation of machine learning models using Shapley additive explanation and application for real data in hospital10.1016/j.cmpb.2021.106584 ↗
16. Koklu, M. (2026, April 15). Pumpkin Seeds Dataset. Dataset Repository, Accessed for the Pumpkin 808 Seeds Dataset. Available online: https://www.muratkoklu.com/datasets/.
17. Visualizing data using t-SNE
18. McInnes, L., Healy, J., and Melville, J. (2018). UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction. arXiv.10.21105/joss.00861 ↗
19. Akiba, T., Sano, S., Yanase, T., Ohta, T., and Koyama, M. (2019). Optuna: A Next-generation Hyperparameter Optimization Framework. Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, ACM.10.1145/3292500.3330701 ↗
20. Vieira, S.M., Kaymak, U., and Sousa, J.M.C. (2010). Cohen’s kappa coefficient as a performance measure for feature selection. 2010 IEEE International Conference on Fuzzy Systems, IEEE.10.1109/FUZZY.2010.5584447 ↗
21. An introduction to ROC analysis10.1016/j.patrec.2005.10.010 ↗
22. Saito, T., and Rehmsmeier, M. (2015). The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLoS ONE, 10.10.1371/journal.pone.0118432 ↗
23. Inference for the Generalization Error10.1023/A:1024068626366 ↗