Classification of Banana Types Based on The Geometrical Attributes using Artificial Neural Network Method

Banana (Musa paradisiaca) is one of the important horticultural commodities. This study aims to measure the physical and geometrical parameters of three different bananas (Muli, Ambon, and Kepok) and to develop prediction equations using an Artificial Neural Network (ANN) model. In this study the backpropagation ANN model with supervised learning method was used. The ANN model had one output node, two hidden layers, and network architecture of 8 inputs, namely fruit weight and volume, projected area and roundness of the fruit, cross section, peel color, and geometric mean fruit cross section diameter. The data for building the model and testing the model were respectively 70% and 30% of the 150 data number in total. The results showed that the best ANN model structure for estimating Muli, Ambon and Kepok bananas was purelin-logsig-logsig with an RMSE value of 0.0077 and an R 2 of 0.9999. This shows that the ANN model is highly robust to predict the banana types. Using the built model, the accuracy of the prediction results is 100%.


INTRODUCTION
Banana (Musa paradisiaca L.) is one of the horticultural commodities categorized as fruits.The development of banana commodities aims to meet the increasing demand for fruit consumption due to population growth and the heightened awareness of the community in fulfilling nutritional needs such as vitamins, minerals, and carbohydrates (Komaryati & Adi, 2012).It is known that more than 230 types of bananas are distributed across Indonesia (Prabawati et al., 2008).This high diversity allows the Indonesian community to choose and utilize desired banana types according to their needs.Not all species and cultivars of bananas found and cultivated in Indonesia have been classified.Typically, the identification or recognition of bananas, such as Muli, Ambon, and Kepok, still relies on manual methods by directly observing the fruit (Effendi, 2017).Manual identification is highly subjective, influenced by the evaluator's experience, leading to inconsistent identification results.The advancement of computer technology and digital cameras allows for more precise, accurate, and rapid fruit identification.Image processing technology has been widely applied in the evaluation of the quality of agricultural and horticultural products.For example, image processing is used to identify and classify mangoes based on specific grades (Sahu & Dewangan, 2017;Mulani et al., 2017) or extract their physical parameters (Venkatesh et al., 2015;Chauhan et al., 2018).Image processing has also been utilized to assess the ripeness of bananas (Prabha & Kumar, 2015;Sandra et al., 2020), the quality of pineapples (Ali et al., 2020), and estimate the total soluble solids content of mangoes (Shamili, 2019).Saputra et al. (2022) developed a method to estimate the amylose content of rice grains based on their color intensity.
Meanwhile, the application of artificial intelligence (AI) has extended to various fields, including post-harvest engineering of food and agricultural products.One popular and widely developed branch of AI is Artificial Neural Networks (ANN).Artificial Neural Networks (ANN) is a mathematical model that attempts to simulate the structure and function of biological neural networks (Krenker et al., 2011).ANN is created as a generalization of a mathematical model of human cognition.The application of ANN for identifying defects in apples and grouping them based on fruit quality grades was conducted by Neware (2020).Olaniyi et al. (2017) used an ANN model for the automated classification of banana fruits based on fruit texture.ANN models have also been applied to estimate the volume and surface area of apple fruits with better feasibility compared to mathematical models (Ziaratban et al., 2017).Not only limited to fruits, ANN models have been applied to automatically identify potato varieties (Azizi et al., 2016), predict the drying rate of carrots (Saputra et al., 2020).Basic geometric attribute data of various popular banana types cultivated in Indonesia, which are crucial for post-harvest handling techniques, have not been extensively published.Similarly, the application of ANN to predict banana types or clones with input information on geometric attributes is still very limited.This research aims to (1) measure the physical and geometric parameters of Muli, Ambon, and Kepok bananas as distinguishing attributes for banana types, and (2) develop and test a model for determining Muli, Ambon, and Kepok bananas using the ANN method based on the physical and geometric characteristics of the fruit.

Equipment and Materials
The tools used in this research include an image acquisition chamber (dimensions: length=40 cm, width=40 cm, height=60 cm) equipped with illumination LED lights (Itami 2x3 watts) and a digital camera (Webcam M-Tech WB-100, resolution 640x480 pixels), digital caliper, digital scale, measuring cup, and GNU Octave program.The materials used are three types of fresh bananas: Muli, Ambon, and Kepok bananas obtained from farmers in Tanggamus Regency, Lampung Province.

Selection of Fruit Samples
The three types of bananas: Muli, Ambon, and Kepok were harvested at physiological maturity condition.Five hands of each banana type were selected, and for each hand, ten fingers were sampled.Selected fruit samples should have no surface defects, not be rotten/damaged, and have uniform shape and size.

Fruit Image Capture
Fruit image capture was performed in the image acquisition unit, consisting of a chamber, digital camera, and a lamp as the illumination source.The image capture distance was 40 cm measured from the camera lens to the base of the fruit sample.Images of banana fruits were captured on both sides by flipping 180 degrees from the initial side.These images were used to determine the skin color and size of each banana type.Subsequently, banana fruits were cut transversely at the middle, one-quarter length, and three-quarters length, and images of each sample slice were captured.

Measurement of Fruit Parameters
(1) Weight and Volume Sample weight measurements were conducted by weighing the samples using a digital scale (precision 0.01 grams).Meanwhile, volume measurements were carried out using the water displacement method.In this method, banana fruits (finger samples) were fully submerged in water, and the displaced water mass was measured (Mohsenin, 1970).Mathematically, it can be calculated using the following formula: where V b is fruit volume (cm 3 ), V 1 is the initial volume of water in the container before immersing the fruit (cm 3 ), and V 2 is the final volume of water in the container after immersing the fruit (cm 3 ) (2) Fruit Size Fruit size was represented by measuring the diameter (cm) and length (cm) of the fruit.Diameter measurements on the fruit slice cross-section were taken at three locations: ¼ length, ½ length, and ¾ length, using a digital caliper (precision 0.01).Meanwhile, fruit length was measured from the base to the tip using a flexible ruler.The fruit length was expressed by calculating the average of the outer curve length (L o ) and inner curve length (L i ).
(3) Fruit Shape Geometry Geometric mean diameter (Dg) and sphericity (φ) were expressed by the following equations (Mohsenin, 1987): where r 1 is the shortest radius (cm), r 2 is the longest radius (cm).According to Mohsenin (1987), sphericity is a measure of the sharpness of the angles of a solid material.The sphericity value ranges from 0 to 1.If the value approaches 1, the material shape will be closer to a circular form.
(4) Fruit Cross-Sectional Area The cross-sectional area of banana fruits was determined using image processing techniques.The color image of banana fruits was converted into a grayscale image.A threshold value was set to separate the fruit object from the background.The number of object pixels was then calculated, and this value was converted into a projection area using a calibration equation.Calibration was performed by capturing images of objects with known counting areas, and then the pixel-to-cm 2 ratio was determined.

Development of Artificial Neural Network Model
In this study, the developed Artificial Neural Network (ANN) is of the backpropagation type with the supervised learning method.The root mean square error (RMSE) was computed to determine the magnitude of prediction errors from the developed model.The calculation formula for the RMSE value is expressed in Equation ( 5).
where n is number of data, Oi is the observed value i, Pi is predicted value i.The coefficient of determination (R 2 ) is used to measure how well independent variables explain the dependent variable.The largest possible value for the coefficient of determination is 1, and the smallest is 0.

Physical and Geometric Attributes
The physical and geometric attributes of Muli, Ambon, and Kepok banana fruits are summarized and presented in Table 1.

Artifical Neural Network Modeling for Prediction
The training and testing process of the Artificial Neural Network (ANN) model involved 27 activation function variations, including logsig, tansig, and purelin.The reliability of the model development can be observed from the small Root Mean Square Error (RMSE) values and R 2 values approaching or equal to 1. Table 2 presents the developed activation function variations along with the obtained RMSE and R 2 values.From these results, it is found that the activation function providing the smallest RMSE and R 2 approaching 1 is purelin-logsig-logsig.The RMSE obtained is 0.0077, and the coefficient of determination (R 2 ) is 0.9999.The obtained R 2 value demonstrates that the training of the ANN model is highly reliable in predicting the differences in morphological characteristics of Muli, Ambon, and Kepok banana fruits.

Validation of the ANN Model
The model validation process is an advanced stage following the training process of the Artificial Neural Network (ANN) model.The data obtained from the model validation process are prediction data.The initialization used is the same as the training process of the ANN model.The activation function is considered optimal if it achieves the smallest RMSE value and the largest coefficient of determination during the ANN model validation.
Table 3 shows the R 2 value with the activation function (purelin-logsig-logsig) that yields the smallest RMSE value and the largest coefficient of determination.The Root Mean Square Error (RMSE) obtained is 0.0060, with a coefficient of determination (R 2 ) of 1.00.This indicates that the constructed predictive model has high confidence and accuracy in predicting the morphological characteristics of Muli, Ambon, and Kepok banana fruits, considering input information criteria such as weight, volume, cross-sectional area of the fruit, roundness of the fruit cross-section, red color intensity (I R ), green color intensity (I G ), blue color intensity (I B ), and geometric mean diameter of the fruit.While   the accuracy of the JST model prediction results is obtained at 100%.Thus, the developed JST model demonstrates excellent capability in predicting the three types of banana fruits based on their physical and geometric attributes.

Equation for Prediction from the Development of the ANN Model
The optimal activation function that produces the smallest RMSE value and the highest coefficient of determination (R 2 ) is used to obtain the weights and biases of the ANN model.After developing the ANN model, the best activation function obtained from the testing is purelin-logsig-logsig.The input values in the mathematical model must be normalized before using the mathematical model equation.Normalization is the division of the Xi (input) value by the maximum input value (Xb).Normalization can be calculated as follows: where: Xi is the value of X (input) at i, and Xb = Maximum input value.

CONCLUSIONS
The conclusions drawn from this research are as follows: 1.The Artificial Neural Network model for predicting Muli, Ambon, and Kepok banana fruits based on their physical and geometric attributes performs optimally with the activation function purelin-logsig-logsig, achieving an RMSE value of 0.0060 and an R 2 value of 1.00.
2. The accuracy of the Artificial Neural Network prediction results is 100%.This indicates that the predictive model built with an architecture of 8 inputs, 2 hidden layers, and 1 output node is accurate in predicting banana types based on geometric attributes such as RGB color intensity of the fruit skin, weight, volume, projection area, roundness of the fruit cross-section, and average fruit diameter.

Figure 1 .
Figure 1.Length and diameter dimensions of banana fruit (left) and diameter of the cross-section of banana fruit (right)

Figure 2 .
Figure 2. Architecture of the artificial neural network for the classification of Muli, Ambon, and Kepok bananas (Note: X1 = weight (g); X2 = volume (cm 3 ); X3 = cross-sectional area of banana fruit (cm 2 ), X4 = sphericity of banana fruit crosssection; X5 = red color intensity (I R ), X6 = green color intensity (I G ); X7 = blue color intensity (I B ); X8 = geometric mean diameter (D g ); a1 = hidden layer 1; b2 = hidden layer 2; Y1 = Muli banana; Y2 = Ambon banana; and Y3 = Kepok banana) After obtaining the final equation value (Y a = Y 14 ), it is necessary to perform the denormalization process first.Denormalization involves multiplying the final equation value by the largest output value or target value (Y b ).In this study, the largest output value is 3.The denormalization process can be expressed as follows:Denormalization =   ×   (7)where Y a is the final mathematical equation value (Y), and Y b is the largest output value.Therefore, the overall mathematical equation derived from the weights and biases in the development process of the JST mathematical model is: The training type employed in the ANN training is the 'trainlm' type (Levenberg-Marquardt) with a maximum of 1000 iterations, a learning rate of 0.001, and the smallest acceptable Root Mean Squared Error (RMSE) set at 0.00001.The data used to build and test the model are divided into a 70% training set and a 30% testing set from the total of 150 data points.The developed ANN model consists of 2 hidden layers with 8 nodes in the input layer, 3 nodes in hidden layer 1, 3 nodes in hidden layer 2, and 1 node in the output layer.Various activation functions are applied to obtain the best model for prediction.The predictions from each activation function variation will be compared with the test data, and the performance test results will be examined.The activation function is considered optimal if it yields the smallest RMSE and the largest R-squared (R 2 ) values.

Table 1 .
According to Table 1, the most dominant RGB color intensity for all types of bananas is the green color intensity (IG).Ambon banana has the highest IG value at 251.55, followed by Muli banana IG = 243.24and Kepok banana IG = 240.89.The IG value indicates the extent of green color intensity in the captured sample image.Thus, the three banana types above have different average RGB color values. Fruit Weight.Based on Table 1, the average weight of Muli bananas is 38.01 ± 2.28 grams.Ambon bananas have an average weight of 208.36 ± 17.62 grams, while Kepok bananas have an average weight of 56.87 ± 7.00 grams.It is evident that Ambon bananas have the highest weight compared to Kepok and Muli bananas.Physical and Geometric Characteristics of Muli, Ambon, and Kepok Banana Consistent with fruit weight, Ambon bananas have a larger volume compared to the other two banana types.The volume of Ambon bananas is 203.2 ± 19.63 cm 3 , while Muli bananas have a volume of 36.86 ± 2.97 cm 3 , and Kepok bananas have a volume of 54.5 ± 7.3 cm 3 . Length.The average length of Muli bananas is 9.73 ± 0.50 cm.The average length of Ambon bananas is 19.60 ± 1.59 cm.The average length of Kepok bananas is 11.50 ± 0.65 cm. Diameter.The average diameter of Muli bananas is 2.43 ± 0.09 cm.The average diameter of Ambon bananas is

Table 2 .
Training and Testing Results of the ANN Model with Activation Function Variations

Table 3 .
Validation Results of the ANN Model