Determining the Carrot Volume via Radius and Length Using ANN

In this study a total of 464 carrots were taken from Kaşınhanı, where the most carrots in Turkey are produced. The radiuses with an interval of 5 cm, length and volume of each carrot were measured and recorded. Three different Artificial Neural Network models: BP, LM and PUNN were designed for predicting the carrot volume. To assess the success of the system, statistical measures such as Root Mean Squared Error, Mean Absolute Error and R were used. The results showed that all three methods are successful in this problem, while LM and PUNN seems bit better.


Introduction
Carrots are one of the most commonly grown root vegetables in the world [1]. Carrots are one of the most consumed vegetables because of high nutrients such as B1, B2, B6, B12, vitamin C [2,3]. Carrot is a special vegetable for human consumption as it has high β-carotene content besides vitamin A [4,5]. With the increase of the world population, the classification and packaging of the agricultural products presented to the bazaar has begun to gain importance. After the product has been transported to the facilities to be packed, the products have to be classified according to their specifications. It is possible to process the products which show different characteristics in accordance with the standards in these facilities. In these facilities, "sorting, classification, washing, packaging and storage" operations are performed. Classification of the product according to its characteristics such as length, diameter, shape and color, increases the market value of the product, decreases the product losses and increases the shelf life because the damaged products are separated. In this way, agricultural products meet certain standards. Thus, the price and sales superiority of the standard product obtained is increase. In fresh fruit and vegetable packaging plants, the process with the highest investment cost is the classification stage. Especially, in the plants carrying out electronic classification the investment costs increase as the number of lines increases. Many companies with packaging facilities use mechanical type classification units at their facilities due to their high investment costs. Such classification units can classify products only by size, which is insufficient to achieve the desired standards. Therefore technological level cannot be achieved in the classification and packaging of fruits and vegetables in our country. Some of the agricultural enterprises that produce carrots in the Kaşınhanı district of Konya have their own washing and packaging facilities. After washing, the carrots arrive at the packaging section and are classified and packaged using completely human labor. Some plants have mechanical classification machines. The carrots passed through these machines are classified and then these carrots places in packages according to their diameter or length by visual inspection again by the workers. These packings are usually in the form of 5, 10 and 15 kg. The broken, bifurcated, small size and large sizes are not packed. Fig. 1 shows the operations performed in a packaging facility. Soltani et al. [6] performed equation modeling of banana surface area, projected area and mass as a function of physical properties. They used regression analysis for modeling. Mass and surface modeling were based on one length of the banana fruit. Vursavuş et al. [7] determined some mechanical and chemical properties of the three sweet cherry varieties and then developed multi linear models for predicting the fruit mass for all three varieties. Bustos-Vanegas [8] provided mathematical expressions which can be used for mass and heat transfer models for coffee roasting. They studied the beans of Arabica coffee. The beans initial moisture content was 0.129 kgw kgdm−1 and they have been roasted in a direct gas burning roaster. Munder et al. [9] carried out the study to classify sunflower seeds via air-separation into different quality classes. They used seed mass, kernel mass, seed length, width and thickness as physical properties. Radunic et al. [10] evaluated chemical and physical properties of eight pomegranate varieties which were collected from Croatia. The results showed the significant variability in fruit size, weight, peel and calyx properties, total aril weight, number of arils per fruit and aril and juice yield. Przybylski and Zambiazi [11] used ANN for predicting the stability of the vegetable oil based on chemical composition. They noted that best result was achieved for oils which were stored at 35°C with light exposure. In the best model the major fatty acids, _______________________________________________________________________________________________________________________________________________________________ 1 Computer Eng., Selcuk University, Konya -42002, TURKEY * Corresponding Author: Email: hkahramanli@email.com tocotrienols, tocopherols, chlorophylls and metals were used as inputs. Movagharnejad and Nikzad [12] investigated drying kinetics of tomatoes. They used regression analysis and ANN to predict drying ratios. They compared obtained results with experimental data and setted that the ANN model predictions fit the experimental data more accurately than the various mathematical equations. The paper is arranged as follows: Section 2 briefly reviews the ANN methods and the information about used materials. In the section 3 the application results were given. In the section 4 the paper is concluded.

Material
In this study, Nantes type carrots which are widely produced in Konya Kaşınhanı region were used. 500 carrots were taken in September 2017 as example. Carrots are a highly moist food variety with water content of about 86-93%. For this reason, carrots are sensitive to the lossing of moisture, since it cause to fading and loss of fresh appearance occurs. To minimize the loss of quality, the carrots must be stored in an environment with a suitable temperature and humidity [3]. For this reason, all measurements in the study were performed at room temperature of 25° C and on the same day. The rotten, broken, or broken carrots have been left out of the evaluation. A total of 464 carrots were measured on the same day and in the same environment. The length was measured with a steel ruler of 1 mm accuracy with a length of 50 cm to determine the physical properties of the carrots. The cross section radius of the carrots was determined at 5 cm intervals (Fig. 2). Table 1 shows the statistical values of the obtained physical properties.

Method
Artificial Neural Network (ANN) is one of the frequently used and most successful techniques [13]. The Multilayer Perceptron (MLP) is the most commonly applied model of ANN. MLP is a network of simple processing units located into a hierarchical layer model. MLP networks are typically used to perform supervised learning tasks, which include iterative training methods for configuring the network connection weights [14]. The Back Propagation (BP) algorithm is a popular supervised learning method that produces effective MLP. The goal of BP is to optimize the weights such that the MLP learns correctly map inputs to outputs. BP consists of two steps. The first and second steps are the forward and backward passes. In the first step outputs are calculates in accordance to the given inputs. In the second step partial derivatives of the cost function are propagates back through the network [15]. Because of BP uses the steepest descent algorithm to update the weights, this method has a slow convergence rate and often yields suboptimal solutions [16]. A standard BP network structure consists of three layers: one input, one hidden layer and one output layers.
Backpropagation algorithm uses for both regression and classification problems. The Levenberg-Marquardt (LM) algorithm, also known as the damped least-squares method is a very simple method. However it is a robust method for function approximation. LM algorithm works with loss functions. In LM algorithm loss function is sum of squared errors. LM works with the gradient vector and the Jacobian matrix. LM consists in solving the following eq. (1): where, J is the systems Jacobian matrix, α is the damping factor, δ is the weight update vector, and E is the error vector. Product Unit Neural Network (PUNN) were introduced by Durbin and Rumelhart in 1989 [17]. PUNN can be used in any problem where the backpropagation network with summation unit was used.
Traditional ANN is constructed using multiple layers of summation units. In this type of ANN each input is multiplied by a weight and then summed. In PUNNs the summation unit of hidden layer is replaced by product unit [18]. The usual optimization algorithms like gradient descent cannot used to train the PUNN. They cannot achieve same efficiency as are on summation unit networks [19]. Global-like optimization algorithms like the Genetic Algorithms, Particle Swarm Optimizer and Leapfrog algorithm are more appropriate for the PUNN training [20]. In this study Cuckoo Optimization Algorithm (COA) has been used to train PUNN [21].

Results
The aim of the study is to calculate the volume of the carrot. In this section, the results obtained from ANNs were compared and discussed. For modeling 464 carrots were used. The data set was partitioned into two sets as training and testing. 364 and 100 of them were used for training and testing stage respectively. For modeling three different ANN algorithms were used. These algorithms are: BP, LM and PUNN. The structure of the ANN used is shown in Fig. 3. It consists of one input layer of six inputs which can be seen in Table 1, one hidden layer and an output layer with one output. Table 2 shows the best ANN configuration for all three algorithms and their statistical results. Fig. 4-5 show the results of the best models for BP, LM and PUNN algorithms. As is known, in the case of ideal fit, RMSE and MAE equal to zero, while R 2 is equal to one. It can be observed from Table 2 and Fig. 4-5 the ANN trained with all three algorithms produced successful results, while PUNN and LM achieves almost same results. Fig. 6 shows the comparison of predicted and experimental values by all models.

Conclusion
As conclusions in this paper the Nantes type carrots were investigated. Totally of 464 carrots were used, which were taken from Kaşınhanı, Konya, Turkey. The three ANN models (BP, LM and PUNN) were designed for predicting the carrot volume. The statistical measurements, such as R 2 , MAE and RMSE were calculated for all models. BP, LM and PUNN achieved 0.9428, 0.9562 and 0.9573 R 2 , respectively. RMSE value for BP, LM and PUNN were 0.0434, 0.0380 and 0.0375, respectively. It was seen from the results that, the all three ANN methods are successful to predict carrot volume.