Automated Classification of Arecanut Quality using Deep Learning: A Comparative Analysis of CNN and Vision Transformer Models
Abstract
Manual grading of arecanut is slow, subjective and dependent on the availability of experienced graders. The novel contribution of this work is a controlled, like-for-like comparison of three convolutional neural networks (ResNet50, DenseNet-121 and EfficientNetV2) and a hybrid vision transformer (MaxViT) for grading arecanut into the four commercial classes good, medium, bad and koka, with statistical confidence analysis built into the evaluation. A dataset of 1712 low-resolution RGB images, sourced from the Roboflow platform and supplemented with manually collected samples, was preprocessed, augmented and used to fine-tune the four pretrained networks under an identical training protocol. MaxViT led every metric on the test split (94.19% accuracy, 0.9429 precision, 0.9427 recall, 0.9425 F1-score), with DenseNet-121 next at 92.44%. Hybrid transformer designs therefore appear beneficial for automated arecanut grading even when data are modest, though at 95% confidence the gap to the best CNN remains within the margin of error.