International Journal of Academic Engineering Research (IJAER) ISSN: 2643-9085 Vol. 3 Issue 12, December – 2019, Pages: 22-29 www.ijeais.org/ijaer 22 Mango Classification Using Deep Learning Naser-, Samy S. AbuAbeer A. Elsharif ,Dheir Ibtesam M. ,Alaa Soliman Abu Mettleq Department of Information Technology, Faculty of Engineering & Information Technology, Al-Azhar University, Gaza, Palestine Abstract: In worldwide, there are several hundred cultivars of mango. Depending on the cultivar, mango fruit varies in size, shape, sweetness, skin color, and flesh color which may be pale yellow, gold, or orange. Where there are more than 15 types of manga. In this paper, two types Mango classification approach is presented with a dataset that contains approximately 1200 images. Convolutional Neural Network (CNN) algorithms, a deep learning technique extensively applied to image recognition was used, for this task. The results found that CNN-driven Mango classification applications when used in classification automation it enables people to know the type of mango properly. The trained model achieved an accuracy of 100% on test set, demonstrating the feasibility of this approach. Keywords: Mango, Classification, Deep Learning, CNN. INTRODUCTION Mangoes are native to South Asia, to become one of the most widely cultivated fruits in the tropics. Mango thrives well up to 600 m above mean sea level provided locality is frost free and there is no high humidity or rains during flowering. The favorable temperature is 240 C to 270 C, however, it can tolerate temperature as high as 480 C provided that trees are getting regular irrigation. Mango has been found to grow on a wide range of soils. However, deep and well-drained loam to sandy loam soils are most suitable for cultivation. Heavy black cotton, saline and alkaline soils should be avoided. The deal range of soil pH for mango cultivation is 5.5 to 7.5. There are two ways to grow mango tree: can buy mango trees at a nursery or you can grow your own from seed. Mango trees that were grown in a nursery are usually grafted and should fruit within three to four years. Seedling trees may take five to eight years. The best time to plant your mango tree is the beginning of the wet season (summer). The most popular types of manga 1. Chaunsa Mango: Is a pale yellow, slightly green succulent variety of mango when ripe or Closer to its ripening, the mango skin will be soft to touch and will appear wrinkly. Chaunsa is harvested in the summer months (June-September). Figure 1: Chaunsa Mango. 2. Glenn Mango: It has thin but tough skin which turns bright yellow when ripe. The fruit will develop an orange to red blush on 2550% of its surface when exposed to the sun, while it remains completely yellow if in the shade. It has rich and sweet flavor and fiber less flesh (containing a mono embryonic seed), with a pleasant aroma. International Journal of Academic Engineering Research (IJAER) ISSN: 2643-9085 Vol. 3 Issue 12, December – 2019, Pages: 22-29 www.ijeais.org/ijaer 23 Figure 2: Glenn Mango. 3. Neelam Mango: They are smooth-skinned and bright yellow upon ripening and have no blush. The flesh is deep yellow or orange. There is no fiber and a rich, aromatic flavor that is over-powering to the unaccustomed palate. They have a late ripening season and can be stored for an extended time. Figure 3: Neelam Mango. 4. Springfels Mango: It is a large mango, but Due to its size, it has uneven ripening. The uneven ripening is known as "jelly seed," where the flesh around the seed is overripe and soft. Figure 4: Springfels Mango. 5. Alphonso Mango: Its color is yellowish green on the outside and light orange on the inside, medium in size and oval in shape, its peel is somewhat thick and soft, and it has a strong flavor. International Journal of Academic Engineering Research (IJAER) ISSN: 2643-9085 Vol. 3 Issue 12, December – 2019, Pages: 22-29 www.ijeais.org/ijaer 24 Figure 5: Alphonso Mango. 6. Keitt Mango: Its color is dark green, sometimes it is light yellow on the outside and orange yellow on the inside, late maturity (beginning of September), and its size is large. Figure 6: Keitt Mango. 7. Kent Mango: It is green or yellow with red spots on the outside and dark yellow on the inside, round in shape and thick crust, medium in size and with long fibers. Figure 7: Kent Mango. 8. Palmer Mango: Red with a little green on the outside and orange on the inside, large in size, and its seed is small and free of fibers. International Journal of Academic Engineering Research (IJAER) ISSN: 2643-9085 Vol. 3 Issue 12, December – 2019, Pages: 22-29 www.ijeais.org/ijaer 25 Figure 8: Palmer Mango. 9. Timur Mango: Color green diagonal blue from the outside and yellow diagonal orange from the inside, a large size oval shape, and its skin soft and rather thin, fiber-free. Figure 9: Timur Mango. 10. Perry Mango: Yellow in color, drinking green on the outside and orange on the inside, its size ranges from small to medium, and its seed is small and free of fibers, with some slight acidity, and ripens in late August. Figure 10: Perry Mango. 11. Tommy Atkins Mango: Its color is violet green on the outside and orange yellow on the inside, its size is large and oval in shape, its shell is thick and soft, it contains a little fiber. International Journal of Academic Engineering Research (IJAER) ISSN: 2643-9085 Vol. 3 Issue 12, December – 2019, Pages: 22-29 www.ijeais.org/ijaer 26 Figure 11: Tommy Atkins Mango. 12. Boribu Mango: Green color with a little red from the outside and yellow diagonal orange from the inside, the average size of the oval-shaped and elongated, rind thick, taste slightly acid and has a strong flavor, few of the fibers. Figure 12: Boribu Mango. Deep Learning Deep learning is an artificial intelligence function that imitates the workings of the human brain in processing data and creating patterns for use in decision making. Deep learning is a subset of machine learning in artificial intelligence (AI) that has networks capable of learning unsupervised from data that is unstructured or unlabeled. Also known as deep neural learning or deep neural network. Deep learning has evolved hand-in-hand with the digital era, which has brought about an explosion of data in all forms and from every region of the world. This data, known simply as big data, is drawn from sources like social media, internet search engines, e-commerce platforms, and online cinemas, among others. This enormous amount of data is readily accessible and can be shared through fin tech applications like cloud computing.However, the data, which normally is unstructured, is so vast that it could take decades for humans to comprehend it and extract relevant information. Companies realize the incredible potential that can result from unraveling this wealth of information and are increasingly adapting to AI systems for automated support. CNN A convolutional neural network (CNN) is one of the most popular algorithms for deep learning, a type of machine learning in which a model learns to perform classification tasks directly from images, video, text, or sound. CNNs are particularly useful for finding patterns in images to recognize objects, faces, and scenes. They learn directly from image data, using patterns to classify images and eliminating the need for manual feature extraction. A convolutional neural network can have tens or hundreds of layers that each learn to detect different features of an image. Filters are applied to each training image at different resolutions, and the output of each convolved image is used as the input to the next layer. The filters can start as very simple features, such as brightness and edges, and increase in complexity to features that uniquely define the object. LITERATURE REVIEW There are many models designed to classify fruits using Deep Convolutional Neural Network (CNN). But there is no model for the classification of specialized types of mango which is free model available International Journal of Academic Engineering Research (IJAER) ISSN: 2643-9085 Vol. 3 Issue 12, December – 2019, Pages: 22-29 www.ijeais.org/ijaer 27 Although many fruits have common external features. Develop a proposed model designed to help people categorize mangoes. The proposed model provides an easy way to help people know the classification of mango type. METHODOLOGY In this section we describe the proposed solution as selected convolutional network (ConvNet) architecture and discuss associated design choices, evaluation methods and implementation aspects. Dataset There are many types of mangoes, but the data set provided on only two types of mangoes, as it contains 916 training images and 308 images for testing. All images are 150×150 pixels in size, we used the original. We divided the data into training (90%), validation (10%). The training accuracy was 100% and the validation accuracy was 100%. See Fig. 13 for Mango samples. Figure 13: Images of the segmented Mango Convolutional layer A convolutional layer contains a set of filters whose parameters need to be learned. The height and weight of the filters are smaller than those of the input volume. Each filter is convolved with the input volume to compute an activation map made of neurons. In other words, the filter is slid across the width and height of the input and the dot products between the input and filter are computed at every spatial position. The output volume of the convolutional layer is obtained by stacking the activation maps of all filters along the depth dimension. Since the width and height of each filter is designed to be smaller than the input, each neuron in the activation map is only connected to a small local region of the input volume, and the activation map is obtained by performing convolution between the filter and the input, the filter parameters are shared for all local positions. The weight sharing reduces the number of parameters for efficiency of expression, efficiency of learning, and good generalization. Pooling Pooling layers compute the maximum or average over a region of a feature map, there are several non-linear functions to implement pooling among which max pooling is the most common. It partitions the input image into a set of non-overlapping rectangles and, for each such sub-region, outputs the maximum, the exact location of a feature is less important than its rough location relative to other features. This is the idea behind the use of pooling International Journal of Academic Engineering Research (IJAER) ISSN: 2643-9085 Vol. 3 Issue 12, December – 2019, Pages: 22-29 www.ijeais.org/ijaer 28 in convolutional neural networks. The pooling layer serves to progressively reduce the spatial size of the representation, to reduce the number of parameters, memory footprint and amount of computation in the network, and hence to also control over fitting. It is common to periodically insert a pooling layer between successive convolutional layers in a CNN architecture. The pooling operation provides another form of translation invariance. The pooling layer operates independently on every depth slice of the input and resizes it spatially. Fully-connected layer To finally classify the image into a category, we will set up a multilayer perceptron (Multi-Layer Perceptron) on top of the last convolution layer. The previous convolution and pooling operations have greatly reduced the size of the input image to keep uniquely the meaningful characteristics for the classification. Since feeding a MLP requires input vectors (one-dimension arrays or 1d arrays), we need to "flatten" the output feature map. The MLP therefore receives small-sized feature map as 1d array and chooses the corresponding category with regard to those feature maps. Table 1: Full-Color Model Summary. Plot the loss and accuracy of the model Plot the loss and accuracy of the model over the training and validation data during training: International Journal of Academic Engineering Research (IJAER) ISSN: 2643-9085 Vol. 3 Issue 12, December – 2019, Pages: 22-29 www.ijeais.org/ijaer 29 Figure 14: Training and validation accuracy Figure 15: Training and validation loss CONCLUSION This paper provided a sample mango classification, based on a database of images collected. This model provides the ability to distinguish types of mango faster and more accurate than the traditional classification. And the result of the training accuracy was 100% and the validation accuracy was 100%. Does not require extensive training to use. It was developed using Convolutional Neural Network (CNN). FUTURE WORK This system of experts is a basis for the future. It is planned to add more data set to classify more type of mango and make it easier for users from anywhere and at any time. REFERENCES https://www.investopedia.com/terms/d/deep-learning.asp https://www.mathworks.com/solutions/deep-learning/convolutional-neural-network.html https://www.sciencedirect.com/topics/engineering/convolutional-layer https://www.agric.wa.gov.au/mangoes/propagating-mangoes