An Artificial Intelligence System for Apple Fruit Disease Classification Based on Support Vector Machine and Cockroach Swarm Optimization

  • Mohamed A. El-dosukyEmail author
  • Diego Oliva
  • Aboul Ella Hassanien
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 1153)


This paper presents an artificial intelligent system for detection of apple diseases using Support Vector Machine (SVM) and Cockroach Swarm Optimization (CSO). This paper faces a challenge of content ambiguity. This challenge is mitigated by combining texture classification based on initial k-means clustering. The proposed system is able to extract useful features. There are 4 classes: scab disease, rot disease, blotch disease, and normal. The dataset consists of 320 apple images in total divided into 80 images for each class. SVM is actually a binary classifier. The paper shows how to extend it for multi-class classification. The performance of SVM strongly depends on proper choice of its parameters. CSO meta-heuristic performs fine-tunes for SVM parameters including nonlinear hyper planes, penalty parameter of error term, and degree which is used to find the hyper plane for splitting the data. Results show 94.65% accuracy in detecting the normal apple.


Support Vector Machine Cockroach Swarm Optimization Texture classification K-means clustering 


  1. 1.
    Jain, A.K.: Data clustering: 50 years beyond K-means. Pattern Recogn. Lett. 31(8), 651–666 (2010)CrossRefGoogle Scholar
  2. 2.
    Chang, C.-C., Lin, C.-J.: LIBSVM: a library for support vector machines. ACM Trans. Intell. Syst. Technol. (TIST) 2(3), 27 (2011)Google Scholar
  3. 3.
    Zhaohui, C., Haiyan, T.: Cockroach swarm optimization. In: 2010 2nd International Conference on Computer Engineering and Technology (2010)Google Scholar
  4. 4.
    Mehl, P.M., Chao, K., Kim, M., Chen, Y.R.: Detection of defects on selected apple cultivars using hyperspectral and multispectral image analysis. Appl. Eng. Agric. 18, 219–226 (2002)Google Scholar
  5. 5.
    Kim, M.S., Lefcourt, A.M., Chen, Y.R., Tao, Y.: Automated detection of fecal contamination of apples based on multispectral fluorescence image fusion. J. Food Eng. 71, 85–91 (2005)CrossRefGoogle Scholar
  6. 6.
    Leemans, V., Magein, H., Destain, M.F.: Defect segmentation on ‘jonagold’ apples using colour vision and a bayesian classification method. Comput. Electron. Agric. 23, 43–53 (1999)CrossRefGoogle Scholar
  7. 7.
    Kleynen, O., Leemans, V., Destain, M.F.: Development of a multi-spectral vision system for the detection of defects on apples. J. Food Eng. 69, 41–49 (2005)CrossRefGoogle Scholar
  8. 8.
    Ojala, T., Pietikäinen, M., Mäenpää, T.T.: Multi-resolution gray-scale and rotation invariant texture classification with local binary pattern. IEEE Trans. Pattern Anal. Mach. Intell. 24(7), 971–987 (2002)CrossRefGoogle Scholar
  9. 9.
    Ojala, T., Mäenpää, T., Pietikäinen, M., Viertola, J., Kyllönen, J., Huovinen, S.: Outex – new framework for empirical evaluation of texture analysis algorithm. In: Proceedings of International Conference on Pattern Recognition, pp. 701–706 (2002)Google Scholar
  10. 10.
    Guo, Z., Zhang, L., Zhang, D.: A completed modeling of local binary pattern operator for texture classification. IEEE Trans. Image Process. 19(6), 1657–1663 (2010)MathSciNetCrossRefGoogle Scholar
  11. 11.
    Dubey, S.R., Jalal, A.S.: Detection and classification of apple fruit diseases using complete local binary patterns. In: 2012 Third International Conference on Computer and Communication Technology, pp. 346–351. IEEE (2012)Google Scholar
  12. 12.
    Dubey, S.R., Jalal, A.S.: Robust approach for fruit and vegetable classification. Proc. Eng. 1(38), 3449–3453 (2012)CrossRefGoogle Scholar
  13. 13.
    Kus, Z.A., et al.: Estimation of the colour properties of apples varieties using neural network. Erwerbs-Obstbau 59(4), 291–299 (2017)CrossRefGoogle Scholar
  14. 14.
    Hameed, K., Chai, D., Rassau, A.: A comprehensive review of fruit and vegetable classification techniques. Image Vis. Comput. 1(80), 24–44 (2018)CrossRefGoogle Scholar
  15. 15.
    Rocha, A., Hauagge, D.C., Wainer, J., Goldenstein, S.: Automatic fruit and vegetable classification from images. Comput. Electron. Agric. 70(1), 96–104 (2010)CrossRefGoogle Scholar
  16. 16.
    Zhu, M., Hahn, A., Wen, Y.Q., Bolles, A.: Identification-based simplified model of large container ships using support vector machines and artificial bee colony algorithm. Appl. Ocean Res. 1(68), 249–261 (2017)CrossRefGoogle Scholar
  17. 17.
    Bhargava, A., Bansal, A.: Fruits and vegetables quality evaluation using computer vision: a review. J. King Saud Univ.-Comput. Inform. Sci. (2018)Google Scholar
  18. 18.
    Bell, W.J., Roth, L.M., Nalepa, C.A.: Cockroaches: Ecology, Behavior, and Natural History. Johns Hopkins University Press, Baltimore (2007)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Mohamed A. El-dosuky
    • 1
    • 4
    Email author
  • Diego Oliva
    • 2
    • 4
  • Aboul Ella Hassanien
    • 3
    • 4
  1. 1.Faculty of Computers and InformationMansoura UniversityMansouraEgypt
  2. 2.Universidad de Guadalajara CUCEIGuadalajaraMexico
  3. 3.Faculty of Computers and Artificial IntelligenceCairo UniversityGizaEgypt
  4. 4.Scientific research group in Egypt (SRGE)CairoEgypt

Personalised recommendations