(untitled) (JITK (Jurnal Ilmu Pengetahuan dan Teknologi Komputer), 2026)
Food safety, particularly concerning the use of illegal additives such as borax in processed meat products like meatballs, remains a critical issue in Indonesia. This study analyzes the performance of several lightweight deep learning models based on Convolutional Neural Networks (CNN) and Transformers to classify images of meatballs containing borax, enabling their deployment on resource-constrained devices such as smartphones. Data collection involved capturing 1,429 images of meatballs with and without borax using a smartphone camera under varying lighting conditions and shooting angles. The five main architectures evaluated were ConvNeXt-Nano, Swin-Tiny, ViT-Tiny, MobileViT-XS, and EfficientNet-B0. Hyperparameter optimization was conducted using Optuna, followed by training with a 5-fold cross-validation scheme. Model evaluation metrics included accuracy, precision, recall, F1 score, and inference speed. The results show that MobileViT-XS was the best-performing architecture, achieving 65.93% accuracy, 0.703 precision, 0.706 recall, 0.659 F1 score, and efficient memory consumption (45.94 MB). These findings indicate that a hybrid approach combining the strengths of CNNs and Transformers can achieve an optimal balance between detection accuracy and computational efficiency. Therefore, such models have the potential to be applied as food safety detection systems on devices with limited resources