Comparative and explainable deep learning for cherry (Prunus avium L.) cultivar classification using convolutional neural networks (CNN) and transformer architectures

Accurate identification of cherry ( Prunus avium L.) cultivars is essential for automated sorting, postharvest management, and cultivar-specific quality control in modern horticultural systems. However, fine-grained classification remains highly challenging due to strong phenotypic similarity among cultivars and the influence of intra-class variability under imaging conditions. In this study, a comparative and explainable deep learning framework was developed to classify eight cherry cultivars, including both registered cultivars and selection cultivars, using three representative architectures: ResNet50, EfficientNet-B0, and Swin Transformer V2. A stratified five-fold cross-validation strategy was employed to provide a consistent fold-wise evaluation while preserving class balance. Model performance was assessed using accuracy, confusion matrices, receiver operating characteristic (ROC) curves, area under the curve (AUC), and Gradient-weighted Class Activation Mapping (Grad-CAM) for interpretability. Among the evaluated models, EfficientNet-B0 achieved the highest classification accuracy (0.970), followed by Swin Transformer V2 (0.955) and ResNet50 (0.895). EfficientNet-B0 achieved an AUC of 1.00 for all evaluated classes in the present dataset and exhibited the most stable training convergence among the evaluated architectures. Misclassification was primarily observed between phenotypically similar cultivars, particularly 10–22 and Lapins, highlighting the intrinsic complexity of fine-grained classification. Grad-CAM analysis revealed that EfficientNet-B0 produced the most spatially focused and fruit-centered attribution maps, whereas ResNet50 showed diffuse activations and Swin Transformer V2 captured broader contextual features. Overall, the results demonstrate the feasibility of deep learning-based fine-grained cherry cultivar classification under controlled imaging conditions. EfficientNet-B0 achieved the highest mean accuracy among the evaluated architectures in the present dataset; however, this result should be interpreted as dataset- and condition-specific rather than as evidence of general architectural superiority. The proposed framework provides an interpretable basis for future validation using independently acquired and more diverse datasets. The proposed framework provides a reproducible and interpretable comparative approach for cultivar-level image recognition and may support future intelligent sorting and precision-agriculture applications.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-10-30
DOI
https://doi.org/10.1038/s41598-026-77379-8
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparative and explainable deep learning for cherry (Prunus avium L.) cultivar classification using convolutional neural networks (CNN) and transformer architectures

Kaan Yaman, Fatih Ünal, Bünyamin Demır, Merve Şentürk Acar et al.
2 links
Scientific Reports
Smart Agriculture and AI
article

Comparative and explainable deep learning for cherry (Prunus avium L.) cultivar classification using convolutional neural networks (CNN) and transformer architectures

Kaan Yaman, Fatih Ünal, Bünyamin Demır, Merve Şentürk Acar, Yazgan Tunç, Mehmet Yaman, Uzay Gezer, Ömer Türk
article en

Abstract

Accurate identification of cherry ( Prunus avium L.) cultivars is essential for automated sorting, postharvest management, and cultivar-specific quality control in modern horticultural systems. However, fine-grained classification remains highly challenging due to strong phenotypic similarity among cultivars and the influence of intra-class variability under imaging conditions. In this study, a comparative and explainable deep learning framework was developed to classify eight cherry cultivars, including both registered cultivars and selection cultivars, using three representative architectures: ResNet50, EfficientNet-B0, and Swin Transformer V2. A stratified five-fold cross-validation strategy was employed to provide a consistent fold-wise evaluation while preserving class balance. Model performance was assessed using accuracy, confusion matrices, receiver operating characteristic (ROC) curves, area under the curve (AUC), and Gradient-weighted Class Activation Mapping (Grad-CAM) for interpretability. Among the evaluated models, EfficientNet-B0 achieved the highest classification accuracy (0.970), followed by Swin Transformer V2 (0.955) and ResNet50 (0.895). EfficientNet-B0 achieved an AUC of 1.00 for all evaluated classes in the present dataset and exhibited the most stable training convergence among the evaluated architectures. Misclassification was primarily observed between phenotypically similar cultivars, particularly 10–22 and Lapins, highlighting the intrinsic complexity of fine-grained classification. Grad-CAM analysis revealed that EfficientNet-B0 produced the most spatially focused and fruit-centered attribution maps, whereas ResNet50 showed diffuse activations and Swin Transformer V2 captured broader contextual features. Overall, the results demonstrate the feasibility of deep learning-based fine-grained cherry cultivar classification under controlled imaging conditions. EfficientNet-B0 achieved the highest mean accuracy among the evaluated architectures in the present dataset; however, this result should be interpreted as dataset- and condition-specific rather than as evidence of general architectural superiority. The proposed framework provides an interpretable basis for future validation using independently acquired and more diverse datasets. The proposed framework provides a reproducible and interpretable comparative approach for cultivar-level image recognition and may support future intelligent sorting and precision-agriculture applications.

Scientific Reports
Bilecik Şeyh Edebali Üniversitesi (TR), Mardin Artuklu University (TR), Tarımsal Araştırmalar ve Politikalar Genel Müdürlüğü (TR), Ministry of Agriculture and Forestry (TR), Mersin Üniversitesi (TR), Erciyes University (TR)
Zero hunger
Openalex Percentile: Top 15%
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon