  This study introduces an innovative approach to classifying various types of
Persian rice using image-based deep learning techniques, highlighting the
practical application of everyday technology in food categorization.
Recognizing the diversity of Persian rice and its culinary significance, we
leveraged the capabilities of convolutional neural networks (CNNs),
specifically by fine-tuning a ResNet model for accurate identification of
different rice varieties and employing a U-Net architecture for precise
segmentation of rice grains in bulk images. This dual-methodology framework
allows for both individual grain classification and comprehensive analysis of
bulk rice samples, addressing two crucial aspects of rice quality assessment.
Utilizing images captured with consumer-grade cell phones reflects a realistic
scenario in which individuals can leverage this technology for assistance with
grocery shopping and meal preparation. The dataset, comprising various rice
types photographed under natural conditions without professional lighting or
equipment, presents a challenging yet practical classification problem. Our
findings demonstrate the feasibility of using non-professional images for food
classification and the potential of deep learning models, like ResNet and
U-Net, to adapt to the nuances of everyday objects and textures. This study
contributes to the field by providing insights into the applicability of
image-based deep learning in daily life, specifically for enhancing consumer
experiences and knowledge in food selection. Furthermore, it opens avenues for
extending this approach to other food categories and practical applications,
emphasizing the role of accessible technology in bridging the gap between
sophisticated computational methods and everyday tasks.
