Past Work
Past Work
net/publication/340692096
CITATIONS READS
10 425
4 authors:
All content following this page was uploaded by Ahmed Al Marouf on 06 March 2021.
A. S. M. Farhan Al Haque Md. Riazur Rahman Ahmed Al Marouf Md. Abbas Ali Khan
Department of Computer Department of Computer Department of Computer Department of Computer
Science and Engineering Science and Engineering Science and Engineering Science and Engineering
Daffodil International Daffodil International Daffodil International Daffodil International
University University University University
Email: Email:riazur_rahman@daffo Email: Email:
[email protected] dilvarsity.edu.bd [email protected] [email protected]
Abstract—Magnifera Indica, traditionally known as mango, is a machine learning based classification algorithms is one of the
drupe found around the world in over 500 species. India has tradition way to recognize different species. In such
produced 19.5 million metric tons of mango in 2017. In recognition systems, researchers have to determine the feature
Bangladesh, mango has been referred as the national tree and extraction methods and feature descriptors to define some
government has included endemic species of mango as distinguishable criteria for each class. Traditional feature
geographical index (GI) of Bangladesh. Recognizing specific descriptors such as local binary pattern (LBP) [8-9], scale
breeds has become a significant computer vision task. In this invariant feature transform (SIFT) [10], speeded up robust
paper, we have proposed the convolutional neural network features (SURF) [11], histogram of oriented gradients (HOG)
(CNN) based approach for detecting five mango species namely,
[12] etc. are applied for better classifications.
Chosha, Fazli, Harivanga, Lengra and Rupali from 15000
different images. For better experimentation, we have applied In the context of image processing, images are considered
three different models of CNN and analyzed the recognition as the vital stimuli and various step-wise processes are
rates with various criteria. For performance evaluation, we have adopted to find the best features of each class. One of the main
utilized the classic metrics such as precision, recall, F1-score, problem with the image input is, the images could be noisy or
ROC and accuracy. Among the experimented three models, the very pure. For a machine learning training model, if we use
third model, outperformed in terms of accuracy with 92.80%. pure images it will be biased. On the other hand, using the
mixture of noisy and fair images would be much appreciated
Keywords—Megnifera Indica, Mango Species Detection,
Computer vision, Convolutional Neural Network (CNN).
for the overall detection system. Therefore, in this paper, for
experimental works, we tried to gather around 15,000 images
I. INTRODUCTION for overall training, testing and validation. Because the more
inputs we fed into a neural network the more accurate
Mango is one of the most popular seasonal fruit in connection may result in the model.
Bangladesh. Along the mesmerizing taste, according to
USDA National Nutrient Database, mango contains To help cluster and classify, neural network has been
significant among of protein, carbohydrate, fiber and sugars proven to work better than traditional classifiers in many
[1]. Mangoes are a good source of antioxidants, containing cases. Based on the supplied inputs and associated weights, a
certain phytochemicals such as gallotannins and mangiferin net input function and activation function is built for
which have been studied for their health benefits [2]. generating the output. With comparison to this simplified
Considering the health benefits in mind people love to version of neural network, convolutional neural network
consume mangos of different species, as different species have (CNN) takes the input image and applied the convolution of
different size and taste. Farmers are gaining interest day-by- defined kernel layer. In process of max-pooling or average-
day as the profit margin is higher in growing mango than any pooling and hidden layers of output. Based on different size of
other fruits. Though professional farmers are quite aware of kernels and assigned parameters for the kernel layer and
the breeds, but common people have limited knowledge of pooling layer, respectively, the models could be used for
mango breeds. Many people are growing interest in roof- image based various recognition systems. For our experiment,
gardening while choosing the right breed of mango has we have assigned parameters for three different models and
become a difficult task for them. An image processing based run the models for the mango breed detection. The evaluation
application software could be useful for the interested farmers metrics are kept the traditional ones such as precision, recall,
to detect different breeds of mango trees. F1- score and accuracy. The area under the ROC are also
reported of the models.
With the rapid evolution of computer vision, researchers’
have addresses to solve the species recognition [3-5], disease In this paper, we have formalized a RGB color image
recognition [5-7] problem in various ways. Appling classic dataset of Bangladeshi local five mango breeds and utilized
Parameters
Accuracy Accuracy Accuracy
Learning
Kernel /
Kernels
Neuron
Layers
No. of
No. of
Batch
Serial
Rate
Size
Size
M1 81.62% 82.38% 81.16%
M2 86.62% 88.35% 90.42%
M3 90.28% 93.60% 92.80%
Conv 16 [3.3] 896 TABLE III. PERFORMANCE METRICS FOR THE CNN MODEL M3
MaxPool - [2.2]
Conv 32 [3.3] 9248 Sample
M1 0.001 32 Precision Recall F1 Score
MaxPool - [2.2] Name
Neural Chosha 0.92 0.96 0.94
- 256 95552512
Network Fazli 1.00 1.00 1.00
Conv 16 [3.3] 896
Harivanga 0.86 1.00 0.93
MaxPool - [2.2]
9248 Lengra 0.91 0.80 0.85
Conv 32 [3.3]
Rupali 0.96 0.88 0.92
M2 MaxPool - [2.2] 0.001 32
Conv 64 [3.3] 18496
MaxPool - [2.2]
Neural
- 512 44303360
Network
Conv 32 [3.3] 896
MaxPool - [2.2] -
Conv 64 [3.3] 18496
MaxPool - [2.2] -
Conv 64 [3.3] 36928
M3 0.0001 32
MaxPool - [2.2] -
Conv 128 [3.3] 73956
MaxPool - [2.2]
Neural
- 1024 18875392
Network
Accuracy(%)
80
75
70
65
60
55
50
0 20 40 60 80 100
Epochs
Train Accuracy Test Accuracy
Fig. 5. ROC curve for the CNN model Fig. 6. The optimization of the CNN model over 100 epochs
65.74%
parameters we have shown few optimization analysis on 50%
number of epochs, learning rates, different optimizers and 55.46%
using different ratio for dropouts. 40%
30% 41.68%
A. Number of Epochs
20%
Epochs are the number of times the CNN model has been 25.41%
10%
trained for. As anticipated the more CNN model trains, the
better detection performance it perceives. But overtraining 0%
may lead the model to overfitting. So the improvement rate 0% 10% 20% 30% 40% 50% 60% 70% 80% 90%100%
Dropout
needs to be monitored very effectively. The model should be
stopped training while the improvements got stuck within a Fig. 8. Accuracy values for test different dropouts
minimum threshold. In Figure 6 the optimization of the CNN
B. Learning Rate
model is shown. The model has a significant convergence to
a great accuracy at the very initial epochs and reach a very Learning rate is the hyper-parameter that supervises the
appreciable 82.40% test accuracy within the halfway 50 rate at which the model perceives the classification ability. It
epochs and converge to the optimal solution of 93.60% at the has the gradient decent approach towards the optimal
100th epoch. solution. The higher learning rate enables the model for
longer jumps that often lead to miss the local optima. And a
comparatively very low rate will produce a very slow
convergence and a tradeoff question between time and speed
arises. The CNN model performs differently for the varying
learning rates. The figure of different curves for loss for
different rates is shown in Figure 7. Evidently a very high [4] R.Nikam, and M. Sadavarte, “Application of Image Processing
Technique in Mango Leaves Disease Severity Measurement”, National
learning rate does not reach near to minimum loss at all where Conference on Emerging Trands in Computer, electrical and
the smaller rates tend to approach to the minimum loss value. Electronics (ETCEE-2015), International Journal of Advance
But the best result is obtained for 1e-4 that has a very steady Engineering and Research Development (IJAERD), 2015.
loss curve comparing to the curve for 1e-3 where fluctuations [5] K. Muthukannan, P. Latha, P. Nisha, and R. Pon Selvi, “An
of loss over epochs is observed. Even for the higher learning Assessment on Detection of Plant Leaf Diseases and Its severity using
image segmentation”, International Journal of Computer Science and
rates 1e-2 we can see the initial loss might be the lowest the Information Technology Research (IJCSITR), January-March 2015.
model could get even near to the optimized loss. [6] J. Sethupathy, and Veni S., “OpenCV based Disease Identification of
Mango Leaves”, International Journal of Engineering and Technology
C. Dropout (IJET), Vol. 8 no 5, October-November 2016.
The hyper-parameter dropout is very efficient for the [7] G. Kshirsagar, and A. N. Thakre, “Plant Disease Detection in Image
elimination of overfitting problem. This technique turns off a Processing using MATLAB”, International Journal on Recent and
specified number of neurons in the fully connected neural Innovation Trends in Computing and Comunication (IJRITCC), Vol.
6, issue. 4, April 2018.
network that triggers non linearity and forces out the
[8] T. Ojala, M. Pietikäinen, and D. Harwood (1994), “Performance
possibilities of overfitting from the model. So the dropout has evaluation of texture measures with classification based on Kullback
potential effect on the accuracy. In our research, we have tried discrimination of distributions”, Proceedings of the 12th IAPR
to show a comparison of accuracies for different ratio of International Conference on Pattern Recognition (ICPR 1994), vol. 1,
pp. 582 - 585.
dropout and experimentally obtained the best result for 50%
[9] T. Ojala, M. Pietikäinen, and D. Harwood (1996), “A Comparative
dropout. The Figure 8 shows the accuracy variations obtained Study of Texture Measures with Classification Based on Feature
for different ratio of dropout. Evidently from the curve Distributions”, Pattern Recognition, vol. 29, pp. 51-59
obtained, the accuracy for the same model is just 65.74% that [10] D. G. Lowe, “Object recognition from local scale-invariant features”,
reaches top of the graph at 50%. With the increasing value for Proceedings of the International Conference on Computer Vision. 2.
dropout as expected the accuracy falls down. It is because pp. 1150–1157, 1999. doi:10.1109/ICCV.1999.790410
with higher number of neurons being turned off the important [11] H. Bay, T. Tuytelaars, L. Van Gool, “SURF: speeded up robust
features”, Proceddings of ECCV, 2006.
features are also disabled for classification. Simply the
[12] N. Dalal and B. Triggs, “Histograms of oriented gradients for human
accuracy fall down drastically. detection”, In proceddings of CVPR, 2005.
[13] K. Nanaa, M. Rizon, M. N. A. Rahman, Y. Ibrahim, and A. Z. A. Aziz,
VI. CONCLUSION "Detecting mango fruits by using randomized hough transform and
In our research, we have proposed a CNN based backpropagation neural network." In 2014 18th International
Conference on Information Visualisation, pp. 388-391. IEEE, 2014.
model that can classify among the different breeds of mango
[14] Q. Liang, W. Zhu, J. Long, Y. Wang, W. Sun, and W. Wu, "A Real-
fruit with a very satisfactory performance. The result has been Time Detection Framework for On-Tree Mango Based on SSD
analyzed further with the performance metrics like precision, Network." In International Conference on Intelligent Robotics and
recall and F1 score to examine the rigorous performance and Applications, pp. 423-436. Springer, Cham, 2018.
found to be performing comprehensively praiseworthy. The [15] M. Stein, S. Bargoti, and J. Underwood, "Image based mango fruit
ROC curve has also exhibited a great shape with a very high detection, localisation and yield estimation using multiple view
geometry.", Sensors 16, no. 11 (2016): 1915.
AUCROC value of 97.3%. Later we have tried to show some
[16] W. S. Qureshi, A. Payne, K. B. Walsh, R. Linker, O. Cohen, and M. N.
optimization analysis for different learning rates, different Dailey. "Machine vision for counting fruit on mango tree canopies.",
value of dropout and varying number of epochs for execution. Precision Agriculture 18, no. 2 (2017): 224-244.
This work is still in progress. We are trying to add more [17] T. R. B.Razak, M. B. Othman, M. N. B. A. Bakar, K. A. Ahmad, and
breeds of mango and other fruits. We can apply more deep A. R. Mansor. "Mango grading by using fuzzy image analysis." In
International Conference on Agricultural, Environment and Biological
learning pretrained network like MobileNet, GoogleNet or Sciences (ICAEBS'2012) May 26-27, 2012 Phuket. 2012.
AlexNet etc. to get even better results. [18] C. S. Nandi, B. Tudu, and C. Koley. "Computer vision based mango
fruit grading system." In International Conference on Innovative
REFERENCES Engineering Technologies (ICIET 2014) Dec, pp. 28-29. 2014.
[1] United States Department of Agriculture, Agricultural Research [19] M. Merchant, V. Paradkar, M. Khanna, and S. Gokhale. "Mango Leaf
Service, National Nutrient Database for Standard Reference Legacy Deficiency Detection Using Digital Image Processing and Machine
Release, Basic Report on Raw Mango [Online] Learning." In 2018 3rd International Conference for Convergence in
https://ndb.nal.usda.gov/ndb/foods/show/2271 Technology (I2CT), pp. 1-3. IEEE, 2018.
[2] N. Shubrook, “The health benefits of mango” [Online] [20] F. S. Mim, S. M. Galib, M. F. Hasan, and S. A. Jerin. "Automatic
https://www.bbcgoodfood.com/howto/guide/health-benefits-mango detection of mango ripening stages–An application of information
[3] N. Kumar, P. N. Belhumeur, A. Biswas, D. W. Jacobs, W. J. Kress, I. technology to botany." ,Scientia horticulturae 237 (2018): 156-163.
C. Lopez, and J. V. B. Soares, “Leafsnap: A Computer Vision System [21] [21] Rahman T, Haque MR, Rozario LJ, Uddin MS. Gaussian noise
for Automatic Plant Species Identification,”, Proceedings of the 12th reduction in digital images using a modified fuzzy filter. In: 2014 17th
European Conference on Computer Vision (ECCV), October 2012. International Conference on Computer and Information Technology
(ICCIT). IEEE; 2014. p. 217–222.