+1 (502) 904-2126   One Westbrook Corporate Center, Suite 300, Westchester, IL 60154, USA   Site Map
ISSN: 2574 -1241

Impact Factor : 0.548

  Submit Manuscript

Research ArticleOpen Access

Coffee Arabica Nutrient Deficiency Detection System Using Image Processing Techniques with Nonspecific/Unspecified Irritable Bowel Syndrome by Patients’ Self-Assessment Volume 46- Issue 4

Firezer Tenaye1, Chala Diriba2* and Muktar Bedaso2

  • 1Jimma University, Ethiopia
  • 2Information Science department, Jimma University, Ethiopia

Received: September 28, 2022;   Published: October 11, 2022

*Corresponding author: Chala Diriba, Information Science department, Jimma University, Jimma, Ethiopia

DOI: 10.26717/BJSTR.2022.46.007374

Abstract PDF


This study mainly focused on the detection of Coffee Arabica nutrient deficiency by using image processing techniques. Coffee nutrition deficiency techniques are very traditional and time taking which means the agronomists simply detect deficiencies by observing the leaves of the coffee and decide by guessing. The study employed experimental research design which involves dataset preparation, designing classification model and evaluation. In addition, Python programming languages were used. The researcher has 422 total nutritional deficient Coffee plant leaves image data set, from this data first the researcher split 20 percent for testing which is 84 images and 338 training image data, and further from the remaining training data, the researcher again split20 percent validation data which is 10 images. The three pre-trained deep learning models were used to evaluate the experiments. The evaluation of the system indicated the performance of Mobile Net (0.9882), VGG16 Net (0.6471) and Inception_ V3 (0.8095). Therefore, testing and training value of Mobile Net model was more accurate than the rest of two models. Finally, the prototype for detection of Coffee nutrient deficiency developed by using Mobile Net deep learning model. For the feature the researchers suggest doing more researchers by using others CNN architectures and more datasets.

Keywords: Coffee Arabica; Computer Vision; Image Processing; Nutritional Deficiencies


Coffee is a beverage obtained from cherry or the fruit of coffee plant. It is widely used as a beverage but nowadays it is also used as input in some food processing industries like for a flavoring to various pastries, ice-creams, chocolate. Among different types of coffee, the major economic species are coffee Arabica and coffee Robusta. Coffee Arabica and Robusta accounts for 80%, 19.5 % respectively of the world coffee trade, while coffee Liberica and Excelsa together supply less than 1% [1]. Agriculture has always been an important component of the economy of many countries across the world. For instance, agriculture is the main source of the Ethiopian economy. It is a wild crop that grows in the forests especially south-western parts of Ethiopia Jimma and Wollega and Ilu Abbaa Bori Zones. Currently, coffee production and marketing are the common occupation for Ethiopian farmers. Ethiopia has a long history of producing coffee going back many centuries. Arabica coffee comes from the coffee plant, which is native to Ethiopia, Oromia, Jimma Zone. According to Amamo (2014) [2], coffee accounts for 27% of the country’s foreign income and provides a livelihood for 25% of the population, or 25 million people.

Plant disease is any aberrant condition that changes a plant’s look or functionality. It is a physiological process that influences all or some of the functions of plants. This could emerge because of various reasons: it could be due to deficiency of nutrients, drought/ deficiency of water and/or due to pathologic microorganisms. Among all, this paper focuses on the image processing of the plant disease caused by nutrient deficiency. Nutrient deficiency reduces amount and quality of harvested products. Nutrient insufficiency is a slow process or change over time results in nutrient deficiency. It does not occur instantly like injury. Therefore, plants nutrient deficiency usually takes the attention of several researchers, in order to prevent and mitigate the negative effect of diseases in crops. Several efforts have been focused on exploiting digital image processing techniques and supervised classification approaches for detecting plants diseases through the analysis of several parts such as roots, fruits, stems, and leaves [3]. Image processing would be implemented through the science of computer vision that develops the theoretical and algorithmic by extracting and analyzing useful information can be automatically from an observed image using computation made by computers. Thus, the aim objective of this study was to design a prototype for coffee Nutrient deficiency detection by using digital image processing techniques.

Material and Method

Regarding the necessity of identifying nutritional deficiencies in images of coffee leaves using a deep learning approach, here it is proposed the development of a framework that is based on the usual architecture employed in approaches focused on images recognition through unsupervised classification.

Image Acquisition

In this study, the image collection techniques are a critical factor in producing a clear, objective, and streamlined digital coffee leaf sample image database for future analysis and processing. For acquiring images of coffee plant canon EOS600 camera was used. The images were taken by fixing camera on a stand which reduces the movement of hand and capturing images in uniform ways. It has used three varieties of distance 110mm, 130 mm and 155 mm form the coffee leaf. Finally, the images were collected at the distance of 130mm from the coffee leaf. In addition, to obtain uniform lightning or balanced illumination 100Wlamp were used. Digital color images produced with a digital camera are uploaded into a computer, viewed on a screen, and saved as PNG file format on the hard drive. All the captured images were in PNG file format. PNG image file format is selected because of its lossless behavior for preserving image data. During image acquisition from the environment, experts can use different resolution pixels. Images can be acquired at 1200 x 1200, 1456 x 1544, 696x514 and others. For instance, Gonzalez (2020) [4] used 1240x800 for better resolution. Thus, the researcher used 1240 x 800 resolutions to collect image’s dataset. The coffee tree leaves used in this research were recollected in coffee plantations located at Jimma and Limmu coffee farms. After wards, the nutritional deficiencies were identified by agricultural experts from Jimma agriculture research center and Limmu Coffee farm (Table 1).

Table 1. Number of Coffee leaves image used.


Image Preprocessing

Mean and median were used for the coffee leaves image filtering purpose. Smoothing quality enhancer technique was also employed for enhancing the quality of images for better understanding. Collected images were normalized and converted in black-white space for further processing and analysis. Dynamic range expansion in the image is usually to bring the image into a range that is more familiar or normal to the senses. These used for reducing noises from the acquired image data.

Image Classification

Classifier is a program that takes input feature vectors and assigns it to one of a set of designated classes. Python is used for developing model by using three classifiers. The researcher used the Convolutional Neural Network (CNN) architectures Mobile-Net, VGG16 and InceptionV3 pre-trained model.

Implementation Tools

Google Co-lab is a project from Google Research, a free, Jupyter notebook-based environment that allows us to create Jupyter notebooks to write and execute Python (machine learning frameworks such as Tensorflow, Keras, OpenCV).

System Evaluation

Accuracy, Precision, Recall, and F1 Score measurements are used to evaluate the system performance.

Experiment and Results

In this section the experiment performed, and result achieved were discussed as follows. In order to extract features, CNN primarily uses three types of layers: kernel (or filter) layers, nonlinear layers, which apply an activation function to feature maps to allow the network to model nonlinear functions, and pooling layers, which replace a small neighborhood of a feature map with statistical data about the neighborhood and reduce spatial resolution. The benefit of CNNs is that they have fewer parameters than fully connected neural networks because all the receptive fields in a layer share weights.

Training and Testing datasets

In this study the researcher split the data 80 by 20 as a result the researcher can get training 60 percent, evaluation 20 percent, and testing data 20 percent. The researcher has 422 total nutritional deficient Coffee plant leaves image data set, from this data first the researcher split 20 percent for testing which is 84 images and 338 training image data, and further from the remaining training data, the researcher again split 20 percent validation data which is 10 images. So split our data 50 for training, 40 for testing (unseen data during training), and10 for evaluation (Table 2).

Table 2. Accuracy and loss of the three models.


Mobile-Net Classifier

Mobile-Net is one of CNN architectures that used for image classification and mobile vision. Mobile-net classifier uses depth wise separable convolutions. The research employed mobile net since it greatly reduces the number of parameters when compared to the network with typical convolutions (Figures 1 & 2).

Figure 1: Mobile -Net without normalization.


Figure 2: Mobile–net normalized.


VGG 16

VGG 16 is also one of CNN architectures. It is considered to be one of the excellent vision types of CNN architectures. In the VGG16 technique, they concentrated on having convolution layers of 3x3 filter with a stride 1 and always used the same padding and max pool layer of 2x2 filter of stride 2, as opposed to having a lot of hyper-parameters. Model architecture Iron = 0.336% Potassium = 0.256% Calcium = 0.226 % Boron = 0.184 % (Figures 3 & 4).

Figure 3: VGG16 without normalization.


Figure 4: VGG16 normalized.


Inception V3

In image analysis and object detection, Inception V3 is one of the CNN architectures. It is a Google-net that has been modified. A popular image recognition model is Inception V3, the third iteration of Google’s Inception of CNN architecture. It has been shown to reach higher than 78.1 percent accuracy on the Image-Net dataset. Convolutions, average pooling, max pooling, con-cats, dropouts, and fully linked layers are some of the symmetric and asymmetric building pieces that make up the model itself. In this experiment potassium, calcium, iron, boron 0.289% 0.47%, 0.206 and 0.154% respectively (Figures 5 & 6).

Figure 5: Inception V3 without normalization.


Figure 6: Inception V3 with normalized.


Classification Performance

The researcher evaluated the performance of nutritional deficiency model via Accuracy, Precision, Recall and F1 Score metrics. Finally, the researcher gets good accuracy when we compare the above three architecture the Mobile -net models have good accuracy (Table 3).

Table 3: Classification performance.



As it’s possible to understand from the above results better results were got for detection of Iron (Fe) and Boron (B) nutritional deficiencies. These results could be related to the fact that the symptoms associated to the Boron and Iron deficiencies are more remarkable than those associated to the other nutrients; therefore, they could be identified in an easier way. Specifically, the best results associated to the Mobile-Net descriptor were notably obtained in the identification of deficiencies, with a large difference in relation to other pre-trained models which means VGG16 and inception v3. Finally, a direct comparison between the three classification approaches concludes that using the information associated descriptor, for all the deficiencies the classifier with best accuracy results was the Mobile-Net (98.82 %). However, for the descriptor the results do not evidence the superiority of some classifier over the remaining two. In contrast, the best results associated to each nutritional deficiency, were shared across the three classifiers. In related to this study as Setiawan W, et al. [5] depicted in their study on the title of Maize leaf disease image classification using bag of features by using 200 images using VGG 16, VGG19, Google Net, Inception-V3. After experimentation they got results accuracy, sensitivity, specificity of 93.5%, 95.08%, and 93%, respectively. In addition, Zhang et al. [6], conducted the study entitle identification of maize leaf diseases using improved deep convolutional neural networks achieves performance evaluation of an average accuracy of 98.8%. Moreover, as Rajbongshi et al. [7] stated in their study on the title of rose diseases recognition using Mobile net they got model performance evaluation result 95.63% accuracy.


The focus of this research was to detect coffee Arabica nutrient deficiencies especially iron, potassium, calcium and boron using image processing techniques. CNN architectures were applied and mobile net score best performance.


  1. (2018) Nation U. Commodities at a Glance, Special issue on coffee in Est         United Nations Conference on Trade and Development.
  2. Amamo AA (2014) Coffee Production and Marketing in Ethiopia. European Journal of Business and Management 6(37): 109-121.
  3. Mahlein AK (2016) Plant disease detection by imaging sensors–parallels and specific demands for precision agriculture and plant phenotyping. Plant disease 100(2): 241-251.
  4. Gonzalez R, Woods R (2002) Digital Image Processing (2nd)., Pearson Education.
  5. Setiawan W, Syarief M, Prastiti N (2019) Maize Leaf Disease Image Classification Using Bag of Features. Jurnal Infotel 11(2): 48-54.
  6. Zhang X, Zhou X, Lin M, Sun J (2018) Shuffle net: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 6848-6856.
  7. Rajbongshi A, Sarker T, Ahamad MM, Rahman MM (2020) Rose Diseases Recognition using Mobile Net. In 2020 4th International Symposium on Multidisciplinary Studies and Innovative Technologies (ISMSIT), IEEE, p. 1-17.