Fruit and Vegetable Spoilage Detection Using RGB Images and a Genetic Algorithm-Optimized Convolutional Neural Network

Document Type : Original Article

Author
Department of Food Science and Technology, Faculty of Agriculture, Science and Research Branch, Islamic Azad University of Tehran, Tehran, Iran
10.22034/jcse.2026.600707.1097
Abstract
With the increasing production, distribution, and consumption of fruits and vegetables, the rapid, accurate, and non-destructive detection of spoilage has become one of the major challenges in the food supply chain and food industry. Spoilage of fruits and vegetables not only reduces their quality and nutritional value but also leads to significant food waste and economic losses. Therefore, the development of intelligent systems for the timely identification of spoiled products plays a crucial role in quality control, waste reduction, and food safety. In recent years, remarkable advances in computer vision and deep learning, particularly Convolutional Neural Networks (CNNs), have enabled the automatic extraction of image features and accurate classification of agricultural products. Despite their promising performance, the effectiveness of CNNs largely depends on the proper selection of hyperparameters, such as the learning rate, batch size, and number of training epochs. Inappropriate hyperparameter settings may adversely affect the model's classification performance. Therefore, in this study, a Genetic Algorithm (GA) is employed as an evolutionary optimization technique to determine the optimal hyperparameters of the CNN model. In the proposed approach, RGB images of fruits and vegetables were used as the model input, and the optimized CNN is trained to distinguish between fresh and spoiled samples. The objective of this study is to develop an intelligent, accurate, and efficient model for fruit and vegetable spoilage detection and to improve classification performance compared with conventional methods.
Keywords


Articles in Press, Accepted Manuscript
Available Online from 30 November 2026