CNN-Transformer Fusion for Indonesian Traditional Cake Recognition: An EfficientNet-ViT Approach with Grad-CAM Explainability - Tasya Yustira; Aswan Supriyadi Sunge (Universitas Multimedia Nusantara, 2026)
Visual recognition of Indonesian traditional confectionery is an underexplored problem in deep learning research, partly due to high inter-class visual ambiguity and the scarcity of well-curated local food benchmarks. We address this gap by fusing Efficient-Net with a Vision Transformer (ViT) encoder into a unified classification network. The rationale for this pairing is straightforward: EfficientNet’s compound-scaled convolutional stack efficiently encodes low and mid-level texture cues, while the ViT’s self-attention layers then relate those cues across distant image regions-a capability that convolution alone cannot replicate. Post-hoc explainability, is provided through Grad-CAM, which produces class-discriminative spatial maps confirming that activations concentrate on cake surfaces rather than background. We train and evaluate on a publicly available eight-class Kaggle corpus of 1,833 images, applying a two-stage fine-tuning regimen totaling 25 epochs. The resulting system attains 94.37% accuracy, 94.57% precision, 94.37% recall, and 94.31% F1 on the reserved test split. Beyond the metrics, the Grad-CAM evidence suggests the network learns genuinely food-discriminative features, lending credibility to deployment in culinary archiving and nutrition-monitoring applications. Index Terms-deep learning; EfficientNet; food image classification; Grad-CAM; Vision Transformer