with the collaboration of Iranian Society of Mechanical Engineers (ISME)

Design and Development of an Intelligent Golden Raisin Grading System Based on a Deep Convolutional Neural Network

Document Type : Research Article

Authors

Department of Bio-System Mechanical Engineering, Bon.C., Islamic Azad University, Bonab, Iran

Abstract
Introduction
The qualitative grading of raisins, as an important agricultural commodity, plays a critical role in determining market value, pricing strategies, and competitiveness in both domestic and international markets. Conventional intelligent grading approaches have largely relied on manual feature extraction and complex image preprocessing techniques, which substantially increase computational cost and system complexity. Consequently, there is an increasing demand for automated, accurate, and non-destructive grading methods based on deep learning technologies, particularly for golden Sultana raisins.
The primary objective of this study is to develop a deep convolutional neural network (DCNN) capable of grading and evaluating golden Sultana raisins without requiring explicit image preprocessing, while simultaneously reducing processing time and computational overhead. Unlike previous studies that mainly focused on computational limitations or restricted classification schemes, the proposed model automatically extracts discriminative visual features; including texture, shape, and colour to accurately assess raisin quality and size under varying imaging conditions. This capability enhances robustness against variations in illumination, imaging angle, and background, thereby eliminating the need for complex preprocessing pipelines or manual parameter tuning.
Materials and Methods
In this study, a dedicated deep convolutional neural network, referred to as Raisin_DCNN, was specifically designed for grading golden Sultana raisin grains. The dataset consisted of 3,320 images representing four distinct quality grades. All images were acquired using a flatbed scanner under controlled lighting conditions to ensure consistency and uniform image quality.
To increase dataset diversity and reduce the risk of overfitting, data augmentation techniques were applied. These techniques included random horizontal and vertical flipping, cropping, shifting, zooming, and rotation. Notably, the proposed model was trained directly on the augmented images without applying complex preprocessing operations or manual feature extraction methods.
The Raisin_DCNN architecture was purpose-built to effectively extract visual features from each raisin. It comprises multiple convolutional layers with small kernel sizes, followed by MaxPooling layers for spatial dimensionality reduction, and fully connected layers at the final stage. ReLU activation functions were employed to facilitate the learning of nonlinear feature representations, while a Softmax function was used in the output layer to perform four-class classification. The architecture was carefully optimised to achieve an appropriate balance between classification accuracy and computational efficiency.
The dataset was divided into training, validation, and test subsets. Network training was performed using the Adam optimisation algorithm in conjunction with the categorical cross-entropy loss function. Learning rate scheduling and early stopping strategies were implemented to improve convergence and prevent overfitting. Hyperparameter tuning was conducted through iterative experimentation based on validation performance.
For comprehensive performance evaluation, the proposed Raisin_DCNN model was compared with transfer learning approaches based on pre-trained InceptionV3 and InceptionResNetV2 architectures, as well as classical machine learning methods employing histogram-oriented gradients (HOG) and scale invariant feature transform (SIFT) feature extraction combined with support vector machine (SVM), k-nearest neighbours (KNN), and logistic regression (LR) classifiers.
Results and Discussion
Model performance was assessed using accuracy, precision, recall, and F1-score metrics. Experimental results demonstrated that the Raisin_DCNN model achieved an overall classification accuracy of 96%, outperforming both the transfer learning models and classical feature-based approaches. This superior performance highlights the effectiveness of the proposed network in automatically learning discriminative features directly from images of raisins. Furthermore, the elimination of complex preprocessing stages significantly reduced computational cost, thereby improving system efficiency and practical applicability.
Conclusion
The results of this study confirm that a dedicated deep convolutional neural network can provide an accurate, robust, and reliable solution for the automatic grading of golden Sultana raisins. The proposed Raisin_DCNN model demonstrates strong potential for real-world deployment in industrial grading systems and offers an effective approach for enhancing quality control processes in agricultural product inspection.
Acknowledgements
The authors sincerely thank all individuals and research groups who contributed to this work and provided technical assistance throughout the study. The authors would like to thank Department of Bio-System Mechanical Engineering, Islamic Azad University of Bonab Branch for their support and participation in this study. The authors also gratefully acknowledge the anonymous reviewers for their insightful comments and constructive suggestions, which significantly improved the quality of this manuscript.

Keywords


Authors retain the copyright. This is an open access article distributed under Creative Commons Attribution 4.0 International License (CC BY 4.0)

  1. Abbasgholipour, M., Omid, M., Keyhani, A., & Mohtasebi, S. S. (2011). Color image segmentation with genetic algorithm in a raisin sorting system based on machine vision in variable conditions. Expert Systems with Applications, 38(4), 3671-3678. https://doi.org/10.1016/j.eswa.2010.09.023
  2. Alom, M. Z., Hasan, M., Yakopcic, C., Taha, T., & Asari, V. (2020). Improved inception-residual convolutional neural network for object recognition. Neural Computing and Applications, 32(1), 279-293. https://doi.org/10.1007/s00521-018-3627-6
  3. Angadi, Sh. A., & Hiregoudar, N. (2016). A cost effective algorithm for grading raisins using image processing. International Journal of Recent Trends in Engineering & Research (IJRTER), 2, 2455-1457.
  4. Backes, A. R., & Khojastehnazhand, M. (2024). Optimizing a combination of texture features with partial swarm optimizer method for bulk raisin classification. Signal, Image and Video Processing, 18(3), 2621-2628. https://doi.org/10.1007/s11760-023-02935-y
  5. Çınar, İ., Koklu, M., & Taşdemir, Ş. (2020). Classification of raisin grains using machine vision and artificial intelligence methods. Gazi Journal of Engineering Sciences, 6(3), 200-209. https://doi.org/10.30855/gmbd.2020.03.03
  6. Din, N. M. U., Assad, A., Dar, R. A., Rasool, M., Sabha, S. U., Majeed, T., Islam, Z. U., Gulzar, W., & Yaseen, A. (2024). RiceNet: A deep convolutional neural network approach for classification of rice varieties. Expert Systems with Applications, 235, 121214. https://doi.org/10.1016/j.eswa.2023.121214
  7. Falahat Nejad Mahani, Sh., & Karami, A. (2023). Maize Tassel Detection and Counting Using Deep Learning Techniques. Journal of Agricultural Machinery, 13(2), 175-194. https://doi.org/10.22067/jam.2022.72477.1062
  8. FAO. (2023). Food and Agricultural Organization of the United Nations. FAOSTAT Database. http://apps.fao.org/
  9. Fatehi, F., Bagherpour, H., & Amiri Parian, J. (2025). Investigating the Potential of the Innovative YOLOv8s Model for Detecting Bloomed Damask Roses in Open Fields. Journal of Agricultural Machinery, 15(3), 275-289. https://doi.org/10.22067/jam.2024.88066.1249
  10. Fei-Fei, L., Deng, J., & Li, K. (2009). ImageNet: Constructing a large-scale image database. Journal of Vision, 9(8), 1037-1037. https://doi.org/10.1167/9.8.1037
  11. Grandini, M., Bagli, E., & Visani, G. (2020). Metrics for multi-class classification: an overview. arXiv preprint arXiv:2008.05756. https://doi.org/10.48550/arXiv.2008.05756
  12. Hinton, G., Deng, L., Yu, D., Dahl, G. E., Mohamed, A., Jaitly, N., ..., & Sainath, T. N. (2012). Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6), 82-97. https://doi.org/10.1109/MSP.2012.2205597
  13. İncekara, H. (2024). Classification of raisin grains using different artificial neural network methods. Intelligent Methods in Engineering Sciences, 3(3), 99-107. https://doi.org/10.58190/imiens.2024.104
  14. Kanellos, P. T., Kaliora, A. C., Gioxari, A., Christopoulou, G. O., Kalogeropoulos, N., & Karathanos, V. T. (2013). Absorption and bioavailability of antioxidant phytochemicals and increase of serum oxidation resistance in healthy subjects following supplementation with raisins. Plant Foods for Human Nutrition, 68(4), 411-415. https://doi.org/10.1007/s11130-013-0389-2
  15. Liu, X., Yang, L., Chen, J., Yu, S., & Li, K. (2022). Region-to-boundary deep learning model with multi-scale feature fusion for medical image segmentation. Biomedical Signal Processing and Control, 71, 103165. https://doi.org/10.1016/j.bspc.2021.103165
  16. Malek Madani, P., & Soleimani, N. (2025). Risk Analysis and Economic Strategies of Iranian Raisin Supply Chain with Failure Mode Analysis (FMEA): A Case Study of Malayer Raisin Industry. Journal of Applied Economics Studies in Iran (AESI), 14(53), 135-167. https://doi.org/10.22084/aes.2025.30475.3762
  17. Mollazade, K., Omid, M., & Arefi, A. (2012). Comparing data mining classifiers for grading raisins based on visual features. Computers and Electronics in Agriculture, 84, 124-131. https://doi.org/10.1016/j.compag.2012.03.004
  18. Naderi Beni, A., Bagherpour, H., & Amiri Parian, J. (2024). Development and Optimization of a Novel Deep Learning Model for Diagnosis of Quince Leaf Diseases. Journal of Agricultural Machinery, 14(4), 445-458. https://doi.org/10.22067/jam.2024.88013.1248
  19. Omid, M., Abbasgolipour, M., Keyhani, A., & Mohtasebi, S.S. (2010). Implementation of an efficient image processing algorithm for grading raisins. International Journal of Signal and Image Processing, 1(1), 31-34.
  20. Omid, M., Sharouzi, M., & Keyhani, A. (2010). Development of an Automated Machine for Grading Raisins based on Color and Size. Journal of Modelling and Simulation of System, 1(3), 157-162.
  21. Raihen, M. N., & Akter, S. (2024). Prediction modeling using deep learning for the classification of grape-type dried fruits. International Journal of Mathematics and Computer in Engineering, 2(1), 1-12. https://doi.org/10.2478/ijmce-2024-0001
  22. Schuster, M. J., Wang, X., Hawkins, T., & Painter, J. E. (2017). A Comprehensive review of raisins and raisin components and their relationship to human health. Journal of Nutrition and Health, 50(3), 203-216. https://doi.org/10.4163/jnh.2017.50.3.203
  23. Singla, Ch., Sarangi, P. K., Sahoo, A. K., & Singh, P. K. (2022). Deep learning enhancement on mammogram images for breast cancer detection. Materials Today: Proceedings, 49, 3098-3104. https://doi.org/10.1016/j.matpr.2020.10.951
  24. Vidyarthi, S. K., Singh, S. K., Xiao, H. W., & Tiwari, R. (2021). Deep learnt grading of almond kernels. Journal of Food Process Engineering, 44(4), e13662. https://doi.org/10.1111/jfpe.13662
  25. Wang, Ch., Shi, J., Zhang, Q., & Ying, Sh. (2017). Histopathological image classification with bilinear convolutional neural networks. Paper presented at the 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Jeju, Korea (South). https://doi.org/10.1109/embc.2017.8037745
  26. Yu, X., Liu, K., Wu, D., & He, Y. (2012). Raisin quality classification using least squares support vector machine (LSSVM) based on combined color and texture features. Food and Bioprocess Technology, 5(5), 1552-1563. https://doi.org/10.1007/s11947-011-0531-9
  27. Zhu, L., Li, Zh., Li, Ch., Wu, J., & Yue, J. (2018). High performance vegetable classification from images based on AlexNet deep learning model. International Journal of Agricultural and Biological Engineering, 11(4), 217-223. https://doi.org/10.25165/j.ijabe.20181104.2690
Send comment about this article
Enter Name.
Enter a valid email address.
Enter a vaid affiliation.
Enter comments (At leaset 10 words)
CAPTCHA Image
Enter Security Code Correctly.

Articles in Press, Accepted Manuscript
Available Online from 06 June 2026

  • Receive Date 26 December 2025
  • Revise Date 11 February 2026
  • Accept Date 24 February 2026
  • First Publish Date 06 June 2026