# Simplified Deep Learning for Accessible Fruit Quality Assessment in Small Agricultural Operations
## 2 Materials and Methods  
In this study, a deep learning model was developed to distinguish between five classes of fruits using transfer learning [31]. The study was performed using the Fruits-360 dataset and a pre-trained MobileNetV2 model for transfer learning. The analysis and training of the model were conducted in a cloud-based environment using Google Colaboratory. The main goal was to develop an efficient and simple model for fruit damage classification with comparable or better results than those achieved by humans. To this end, the inference algorithm should be computationally cheap with a small file size, which facilitates its implementation in practice for small-scale fruit production. Therefore, the proposed approach involved combining a traditional computer vision system with a neural network. Computer vision allows for the efficient extraction of features containing intuitive and highly dense fruit classification data, such as circularity and color [32], while a neural network was used for the extraction of lower-level features such as texture to determine the fruit quality. The proposed workflow is visualized in Figure 2.  
The scope of this work was limited to studying and comparing the options for the neural network architecture. Therefore, the traditional computer vision features were not considered. We used a subset of the Fruits-360 dataset, which is a publicly available dataset containing images of fruits and vegetables. This dataset was selected due to the limited availability of labeled datasets that include both images of both high- and low-quality fruits, reflecting the real-world challenges faced by many small producers or specialized farms, who typically work with a limited variety of fruits. By focusing on a smaller subset, we sought to simulate the conditions under which these producers operate, providing a model that is more relevant and applicable to their specific needs. The addition of a second fruit type, as well as similar fruits such as the golden apple and red apple, was carefully considered to introduce diversity in the dataset, thereby reducing the risk of overfitting and ensuring the better generalizability of the model across different but related categories. The subset of the dataset used in this study included five classes of fruits, namely apple_crimson_snow_1, apple_golden_2, apple_rotten_1, pear_1, and pear_2. The dataset was divided into training and validation sets, with 1,415 images used for training and 706 images for validation. All images in the dataset are RGB (Red, Green, Blue) color images, which is a standard input format for convolutional neural networks, and they have a resolution of roughly 450 \(\times\) 450 pixels each. This is a huge advantage when distinguishing between fruits with roughly the same shape and texture features. Some examples of these images are illustrated in Figure 3.  
We used Google Colaboratory, which is a cloud-based development environment that provides an interactive coding interface and free access to GPUs, essential for deep learning. This platform is particularly suitable for computation-heavy tasks as it provides high computational power, thus significantly accelerating the training process compared to traditional CPUs. However, as we used the free version, the processing speed was still limited. TensorFlow, an open-source deep learning library developed by Google, was also used, and the code was written in Python 3.10. To enhance the accuracy of the model, a transfer learning approach was used. This is a machine learning technique where a pre-trained model is fine-tuned for a different but related task. In this study, MobileNetV2, a pre-trained model developed by Google, which is known for its efficiency and performance on mobile devices, was used as the  
Figure 3: Examples of labeled images from each category. Figure 2: Proposed workflow for fruit classification and quality assessment using deep learning and traditional computer vision. base model for transfer learning.