Saudi Heritage · Deep Learning

Saudi Date Variety Classifier

A photograph is all it takes. An ensemble of three deep-learning models — ResNet, EfficientNet, and a Vision Transformer — identifies the variety, shows where it looked, and tells the story of the cultivar.

9
Varieties
3
Model Ensemble
90.4%
Test Accuracy
Interactive

Upload a date, get its variety

Drop an image or snap one with your camera. Works best on a single, centered date with good lighting.

Step 1 · Upload

The ensemble combines all three by averaging softmax outputs.
Analyzing image…

Step 2 · Result

Awaiting your image

The prediction, confidence breakdown, and heritage story will appear here.

Explainability

See inside the model

Deep learning is not a black box here. Grad-CAM highlights the regions that shaped the prediction, and t-SNE projects the model's learned feature space into two dimensions.

Grad-CAM · Where the ViT looked

Grad-CAM heatmap

Warm regions show where the Vision Transformer attended most when forming its prediction. Upload an image above to see this per-image attention map.

Grad-CAM · Model Attention

Upload to see attention

Once you classify an image, Grad-CAM will overlay a heatmap showing the model's focus.

Heritage · About this variety

Region
Description
Flavor
Significance

Season

How to spot it

Heritage · About this variety

Nine cultivars, nine stories

Each Saudi date variety carries its own terroir — the oasis it grew in, the flavor profile that made it prized, and the role it plays in Saudi culture. Upload a date above to surface its story.

Ajwa Sokari Medjool Galaxy Meneifi Nabtat Ali Rutab Shaishe Sugaey
t-SNE Projection

How the model clusters varieties

A 2-D map of Vision Transformer embeddings on the test set. Each point is one image; well-separated clusters mean the model has learned to distinguish varieties with clarity.

t-SNE projection of Vision Transformer features across 9 Saudi date varieties
Almanac

When each variety is in season

Saudi date harvests stretch from July through November. Hover or tap a variety to see its window. The brighter cell marks peak month.

Architecture

Three models, one prediction

Each architecture brings a distinct inductive bias. Their probabilities are averaged to produce the ensemble, which outperforms any single model on the held-out test set.

CNN · Deep Residual

ResNet-50

50-layer residual network. Skip connections let gradients flow through deep stacks, making fine-grained texture features learnable.

81.1%

Test accuracy

CNN · Compound Scaling

EfficientNet-B0

Depth, width, and resolution scaled in harmony. Fewer parameters than ResNet but sharper accuracy thanks to mobile inverted bottlenecks.

85.9%

Test accuracy

Transformer · Self-Attention

Vision Transformer

Treats the image as a sequence of patches. Self-attention captures long-range dependencies — strong on subtle inter-variety differences.

88.8%

Test accuracy

Soft-voting ensemble

Average the softmax probabilities of all three models. Wins on the held-out test set.

90.4%