Skip to content
Open access

Explainable Food Image Classification of Indonesian Cuisine Using Xception and ConvNeXt-Tiny with Grad-CAM Visualization

Aug 2026 · bit-Tech · 0 citations

Abstract

Food image classification is an important task in computer vision because it can provide an image-level recognition component for potential applications in dietary assessment, nutritional monitoring, food recommendation, and AI-assisted digital health services. However, Indonesian food classification remains challenging due to high visual similarity among categories, including overlapping textures, colors, lighting conditions, ingredients, and presentation styles. This study aims to compare the image-level classification performance of two transfer learning architectures, Xception and ConvNeXt-Tiny, and to examine their attention patterns using Gradient-weighted Class Activation Mapping (Grad-CAM), rather than evaluating a complete nutritional or healthcare decision system. The dataset consisted of 6,491 Indonesian food images distributed across 13 categories. Both models were initialized with pretrained ImageNet weights and evaluated under the same experimental pipeline using accuracy, precision, recall, F1-score, confusion matrix analysis, and Grad-CAM visualization. The results show that Xception achieved the best overall performance, with 90% accuracy, 0.90 precision, 0.90 recall, and 0.90 F1-score, whereas ConvNeXt-Tiny achieved 84% accuracy and a weighted F1-score of 0.84. The comparative findings indicate that Xception was more effective under the tested configuration, but this conclusion should be interpreted within the limits of a two-model comparison without external validation, cross-dataset testing, or deployment evaluation. Grad-CAM results showed that both models generally attended to food-relevant regions; however, these heatmaps provide attention-based interpretability evidence and do not establish causal explanations of model reasoning.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.