SciELO - Scientific Electronic Library Online

 
vol.22 número5Physiological and sanitary quality of maize seeds preconditioned in ozonated water índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados

Revista

Articulo

Indicadores

Links relacionados

Compartir


Revista Brasileira de Engenharia Agrícola e Ambiental

versión impresa ISSN 1415-4366versión On-line ISSN 1807-1929

Rev. bras. eng. agríc. ambient. vol.22 no.5 Campina Grande mayo 2018

http://dx.doi.org/10.1590/1807-1929/agriambi.v22n5p366-370 

ARTICLE

Use of classifier to determine coffee harvest time by detachment force

Uso de classificador para determinação do momento de colheita do café pela força de desprendimento

1Universidade Federal Rural do Rio de Janeiro/Instituto de Tecnologia/Departamento de Engenharia. Seropédica, RJ. E-mail: egmurilo@yahoo.com.br (Corresponding author) – ORCID: 0000-0003-0378-4800; andersongc7@gmail.com – ORCID: 0000-0003-0594-8514

1Universidade Federal de Lavras/Departamento de Engenharia. Lavras, MG. E-mail: famsilva@deg.ufla.br – ORCID: 0000-0001-6661-5719; gaferraz1@yahoo.com.br – ORCID: 0000-0001-6403-2210

1Universidade Federal Fluminense/Escola de Engenharia/Departamento de Engenharia Agrícola e Meio Ambiente. Niterói, RJ. E-mail: flavio-ter@vm.uff.br – ORCID: 0000-0003-1366-9806

ABSTRACT

Coffee quality is an essential aspect to increase its commercial value and for the Brazilian coffee business to remain prominent in the world market. Fruit maturity stage at harvest is an important factor that affects the quality and commercial value of the product. Therefore, the objective of this study was to develop a classifier using neural networks to distinguish green coffee fruits from mature coffee fruits, based on the detachment force. Fruit detachment force and the percentage value of the maturity stage were measured during a 75-day harvest window. Collections were carried out biweekly, resulting in five different moments within the harvest period. A classifier was developed using neural networks to distinguish green fruits from mature fruits in the harvest period analyzed. The results show that, in the first half of June, the supervised classified had the highest success percentage in differentiating green fruits from mature fruits, and this period was considered as ideal for a selective harvest under these experimental conditions.

Key words: coffee cultivation; management; maturation; supervised classifiers

RESUMO

A qualidade do café é um aspecto imprescindível para o aumento do seu valor comercial e para que a cafeicultura brasileira continue com destaque no mercado mundial. O estádio de maturação dos frutos no momento da colheita é um dos fatores importantes que interfere na qualidade e no valor comercial do produto. Com a realização deste trabalho, objetivou-se desenvolver um classificador para determinação do momento de colheita do café pela força de desprendimento. A força de desprendimento dos frutos e o valor percentual do estádio de maturação foram mensurados durante a janela de colheita de 75 dias. As coletas foram realizadas quinzenalmente, resultando em cinco momentos distintos no período de colheita. Um classificador foi desenvolvido a partir de redes neurais para distinguir frutos verdes e cerejas nos momentos de colheita analisados. Os resultados demostraram que a primeira quinzena de junho foi o momento em que o classificador supervisionado apresentou a maior porcentagem de acerto na distinção de frutos verdes e cerejas, sendo este, o momento adequado para realização de uma colheita seletiva para as condições deste experimento.

Palavras-chave: cafeicultura; gerenciamento; maturação; classificadores supervisionados

Introduction

Agribusiness is one of the most important sectors of the Brazilian economy, representing about 20% of the Gross Domestic Product (GDP) in the last twenty years (CEPEA, 2015). According to CONAB (2016), the Brazilian coffee production in 2016 was the highest one in its history, reaching a volume of 51.37 million 60 kg sacks of the processed product.

For this sector to continue being competitive and in economic growth, it is necessary to always use new strategies. According to Monteiro et al. (2010), coffee is one of the few agricultural products valued based on qualitative parameters, and the better the quality, the higher the price. Coffee grains at cherry stage aggregate the most important chemical precursors to generate quality drinks after roasting (Arruda et al., 2011).

Silva et al. (2010) observed that coffee detachment force differs according to grain maturity stage, obtaining lower values for the cherry stage compared with the green stage. Such variation can be an important factor to perform a selective mechanical harvest. Silva et al. (2013) concluded that fruit detachment force proved to be an objective parameter to indicate the starting moment of coffee selective harvest and also a possible parameter for mechanical harvest management.

In this context, the present study aimed to develop a classifier using neural networks to distinguish green coffee fruits from cherry coffee fruits based on the detachment force, in order to determine the ideal moment to begin the mechanical harvest aiming at grain selectivity.

Material and Methods

The experiment was carried out at the Experimental Farm of the Campus of the Federal University of Lavras, Lavras-MG, Brazil (21º 14' S; 45º 00' W; 918 m), using the cultivar ‘Catuaí Amarelo’ transplanted in 2001, at density of 2500 plants ha-1, with spacing of 4.0 m between rows and 1.0 m between plants.

According to Köppen’s classification, the local climate is Cwa with annual means of temperature, rainfall and relative air humidity of 19.40 ºC, 1529.7 mm and 76.2%, respectively. The soil in the experimental area is classified as dystroferric Dark Red Latosol with clayey to very clayey texture.

Fruit detachment force and the percentage value of the maturity stage were measured during a 75 day harvest window, biweekly, starting in the second half of April and ending in the second half of June, totaling five moments of harvest.

The percentage value of the maturity stage was determined by counting the fruits corresponding to a 0.5 L sample in the same plants used to determine the detachment force.

Fruit detachment force was measured considering the green and cherry stages in five plants randomly selected. The plants were divided into two sides (East and West) and into three parts (lower, middle and upper thirds). For each side, in each third, four values of detachment force were obtained. Thus, for each plant and at each moment of harvest, a total of 24 readings of detachment force were obtained for each maturity stage (Table 1).

Table 1 Number of detachment force readings in green and cherry coffee fruits in each plant (P) in the second half of April (2nd HA), halves of May (1st HM and 2nd HM), and halves of June (1st HJ and 2nd HJ) 

Plant Maturity 2nd HA 1st HM 2nd HM 1st HJ 2nd HJ
P1 Green 24 24 24 24 --
Cherry -- -- 24 24 24
Total 24 24 48 48 24
P2 Green 24 24 24 24 --
Cherry -- -- 24 24 24
Total 24 24 48 48 24
P3 Green 24 24 24 24 --
Cherry -- -- 24 24 24
Total 24 24 48 48 24
P4 Green 24 24 24 24 --
Cherry -- -- 24 24 24
Total 24 24 48 48 24
P5 Green 24 24 24 24 --
Cherry -- -- 24 24 24
Total 24 24 48 48 24

The detachment force was measured using a dynamometer. Dynamometer construction and calibration was based on the Hooke’s Law, which correlates the deformation of objects, within plastic regime, with the exerted force. The force is proportional to the displacement from its equilibrium point. A spring was used, and its elastic constant was determined based on the deformation.

The dynamometer was calibrated based on the spring’s elastic deformation, caused by objects with known weights, determined on precision scale. After this procedure, the elastic constant of the spring was determined, 0.85 N cm-1, allowing measurements of up to 18.7 N.

The average response and the respective standard deviations of the detachment force of green and cherry fruits were analyzed at the five moments of harvest.

Based on the detachment force, an acyclic neural network was trained by the error backpropagation algorithm using the Levenberg-Marquadt variation to accelerate the training time and improve pattern classification performance (Demuth et al., 2008).

To develop the classifier, two classes were defined based on fruit maturation. The class of green fruits was composed of detachment forces determined in the 2nd half of April (HA). This period was chosen to represent the class of Green Fruits because it is the first moment of harvest within the window, having only green fruits. The class of cherry fruits was composed of detachment forces determined in the 2nd half of June (HJ), a period chosen for representing the last moment of harvest within the window, having only cherry fruits.

Neural network architecture was composed of one input layer, two intermediate layers and one output layer with one neuron. Detachment force was used as the input descriptor. The intermediate and output layers used the hyperbolic tangent as activation function. A binary system was used in the output layer, in which 0 referred to fruits classified as green and 1 referred to fruits classified as cherry.

Thirty three percent of the total number of fruits analyzed in the 2nd HA and 2nd HJ were used to train the networks (40 detachment force readings for the Class Green and 40 detachment force readings for the Class Cherry), 33% were used for validation and 33% were used to test the trained networks. Thus, for neural network training, validation and test, 120 fruits classified as green and 120 fruits classified as cherry were used. Training was interrupted by the early stopping technique, when the error in the validation sample increased in six consecutive cycles. The neural network (NN) of each architecture with highest success percentage in the classification of test samples was selected.

NN architecture was trained ten times because, in the beginning of the training, the parameters of the networks are randomly generated and these values influence the training. The performance of each NN was measured by the confusion matrix obtained in the classification of the test samples (Congalton, 1991). Producer’s accuracy (PAC%), user’s accuracy (UAC%), overall efficiency (OE%) and Kappa coefficient were analyzed according to Eqs. 1, 2, 3 and 4.

PAC=XijX+j·100 (1)

UAC=XijXi+·100 (2)

OE%=i=1kXiiN·100 (3)

K^=N·i=1kXii-i=1kX+j·Xi+N2-i=1kXi+·X+i·100 (4)

where:

k - number of lines in the confusion matrix;

N - number of observations;

Xi - marginal total of each line of the confusion matrix; and,

X + j - marginal total of each column of the confusion matrix.

Kappa coefficient significance was analyzed by the Z test, which allowed to verify if the classification by NN was considered as better than a random classification (Leeuw et al., 2006).

The NN considered as with best performance was used to classify the fruits regarding the detachment force in the five plants analyzed at the five moments of harvest. In addition, the following measures were also analyzed: partial hit percentage (PH%), relative to the percentage of hits of correct classification of each class, and total hit percentage (TS%), relative to the mean of partial hits of each class.

Results and Discussion

From the third moment of harvest, there were fruits at cherry stage, representing 50% of the volume of grains in the plant (Table 2). Grains at the cherry stage substantially increased in the 1st and 2nd HJ, but dehydrated and dried fruits appeared in the 2nd HJ, which may reduce the quality of the coffee drink.

Table 2 Percentage of maturity levels for the coffee cultivar ‘Catuaí Amarelo’ in the second half of April (2nd HA), halves of May (1st and 2nd HM), and halves of June (1st and 2nd HJ) 

Maturity (%) Moment of Harvest
2nd HA 1st HM 2nd HM 1st HJ 2nd HJ
Green 100 100 50 30 ---
Cherry --- --- 50 70 85
Dehydrated --- --- --- --- 10
Dried --- --- --- --- 5

Based on the average detachment force at the moments of harvest (Figure 1), cherry beans showed lower values than green beans. The response for green beans had a stable trend of approximately 9.0 N between the 2nd HA and 1st HJ. On the other hand, cherry beans were detected from the 2nd HM, showing a decreasing trend in the detachment force, with a total reduction of 2.62 N until the 2nd HJ. According to the standard deviation at each moment of maturation, the use of a supervised classifier can be adequate to distinguish green beans from cherry beans.

HA, HM and HJ - Half of April, May and June

Figure 1 Detachment force response for green and cherry coffee at each moment of harvest 

Detachment force variations between green and cherry beans are consistent with the results found by Silva et al. (2010), who observed lower values for the cherry stage (Figure 1). However, in the 2nd HM, the standard deviations overlap between both maturity stages, rendering it impossible to distinguish between beans with similar values from 6 to 8 N. This points to a moment in which the classifier accuracy may be reduced, due to the difficulty to distinguish green from cherry beans.

In the 1st HJ, there was a clear discrepancy between the detachment forces of green and cherry beans, and this is a moment in which automatic classification systems tend to show highest success rates in distinguishing the fruits. Thus, for the conditions of this experiment, selective harvest could start from this moment.

In addition, a maturity index of 70% was found in the 1st HJ, indicating that the variation of detachment force at this moment is really associated with fruit maturation, which reinforces the hypothesis that this was the adequate moment to start a selective harvest. Maturity indices above 65% were used by Silva et al. (2015) to obtain high efficiency in the selective harvest of coffee with different harvester vibrations.

A supervised classifier based on neural networks was selected using green beans harvested in the 2nd HA and cherry beans harvested in the 2nd HJ (Table 3), to classify green and cherry beans based on the detachment force. According to the producer’s accuracy, 89.33% of green beans and 88.79% of cherry beans were correctly classified. User’s accuracy indicated that, among beans classified as green, 77.44% were correctly classified, while among beans classified as cherry, 92.79% were correctly classified. This fact demonstrates that approximately 22.00% of green beans have detachment force with the same magnitude as that of cherry beans, and this factor is unfavorable to the selective harvest through vibration. The Kappa coefficient of 0.77 was considered as substantially strong (Landis & Koch, 1977) and demonstrated that the classification using the selected NN was better than a random classification at 0.01 significance level.

Table 3 Parameters to verify the efficiency of the neural network (NN) used in the test group 

Parameter NN
Green coffee Producer’s Accuracy (GPAC%) 89.33%
Cherry coffee Producer’s Accuracy (CPAC%) 88.79%
Green coffee User’s Accuracy (GUAC%) 77.44%
Cherry coffee User’s Accuracy (CUAC%) 92.79%
Overall Efficiency (OE%) 89.01%
Kappa (K) 0.77
Zc 16.5027*

*Significant at 0.01 level by Z test

In general, the analysis of detachment force of coffee beans has been related to harvest efficiency (Silva et al., 2013; Santinato et al., 2015) and to the spatial variability of this parameter under different conditions (Ferraz et al., 2012; 2017; Carvalho et al., 2017). Although supervised classifiers based on coffee detachment force are still scarce, the parameters of the NN classifier presented in Table 3 demonstrate that this analysis tool has potential to assist in the development of automated systems that indicate the adequate moment for harvest.

The percentages of success in the classification of green and cherry beans were assessed in the five plants analyzed and at the five moments of harvest (Table 4). The NN classifier showed average rate of hits higher than 80% at all moments, except the 2nd HM (45 days after the beginning of the harvest window). This period can be considered as of lowest variation in the detachment force of green and cherry fruits, and is the most critical moment to perform selective harvest through vibration. Despite the presence of green and cherry beans in the same plants, the mean rate of total hits was higher than 90% in the 1st HJ (60 days after the beginning of the harvest window), being the most adequate moment for selective harvest.

Table 4 Result of the classification by neural network of green and cherry coffee beans in each plant (P) in the second half of April (2nd HA), halves of May (1st and 2nd HM) and halves of June (1st and 2nd HJ) 

2nd HA 1st HM 2nd HM 1st HJ 2nd HJ
%PH %TH %PH %TH %PH %TH %PH %TH %PH %TH
P1 Green 75.00 75.00 95.83 95.83 70.83 58.33 87.50 93.75 -- 66.67
Cherry --- -- 45.83 100.0 66.67
P2 Green 95.83 95.83 75.00 75.00 70.83 66.67 95.83 95.83 100.0 100.0
Cherry -- -- 62.50 95.83 --
P3 Green 91.67 91.67 83.33 83.33 91.67 60.42 91.67 91.67 -- 100.0
Cherry -- -- 29.17 91.67 100.0
P4 Green 95.83 95.83 93.75 93.75 83.33 57.50 95.83 97.92 -- 100.0
Cherry -- -- 31.67 100.0 100.0
P5 Green 87.50 87.50 66.67 66.67 100.0 75.00 91.67 91.67 -- 100.0
Cherry -- -- 50.00 91.67 100.0
Average hits Green beans 89.17 89.17 82.92 82.92 83.33 63.58 92.50 94.17 -- 93.33
Average hits Cherry beans --- -- 43.83 95.83 93.33

PH - Partial hit refers to the percentage of hits of correct classification of each class; TH - Total hit refers to the mean of partial hits of each class

Although the 2nd HM is a possible moment to start harvesting, the classifier’s rate of hits (63.58%) demonstrates that the similar values of detachment force between green and cherry beans hamper the automated differentiation, making the selective harvest less efficient and, therefore, not recommended for these experimental conditions. In addition, the maturity level with 50% of green beans at this moment will also lead to reduction in coffee drink quality and increase in the number of operations during harvest (Oliveira et al., 2007; Santinato et al., 2015).

In the 1st HJ, the average rate of hits according to the NN classifier was 94.17%, indicating that this was an adequate moment to automatically distinguish green beans from cherry beans, based on the detachment forces. Given the high rate of hits of the classifier and maturity level with about 70% cherry beans, this moment proved to be the most adequate to start the selective harvest for the conditions of the present study.

Conclusions

  1. The supervised classifier was able to distinguish green coffee beans from cherry coffee beans based on detachment force, demonstrating that neural networks can be applied as a tool to assist in defining the moment for harvest.

  2. For the conditions of the present study, the first half of June was the moment in which green and cherry coffee beans showed greatest discrepancy of detachment force, which led to higher rate of hits by the classifier, and this was the ideal moment to perform selective harvest.

Literature Cited

Arruda, N. P.; Hovell, A. M. C.; Rezende, C. M.; Freitas, S. P.; Couri, S.; Bizzo, H. R. Discriminação entre estádios de maturação e tipos de processamento de pós-colheita de cafés arábica por microextração em fase sólida e análise de componentes principais. Química Nova, v.34, p.819-824, 2011. [ Links ]

Carvalho, L. C. C.; Silva, F. M. da; Ferraz, G. A. e S.; Stracieri, J.; Ferraz, P. F. P.; Ambrosano, L. Geostatistical analysis of Arabic coffee yield in two crop seasons. Revista Brasileira de Engenharia Agrícola e Ambiental, v.21, p.410-414, 2017. https://doi.org/10.1590/1807-1929/agriambi.v21n6p410-414Links ]

CEPEA - Centro de Estudos Avançados em Economia Aplicada. PIB do agronegócio: Dados de 1995 a 2015. Disponível em: <http://www.cepea.esalq.usp.br/pib/>. Acesso em: 05 Dez. 2016. [ Links ]

CONAB - Companhia Nacional de Abastecimento. Acompanhamento da safra brasileira. Disponível em: <http://www.sapc.embrapa.br/arquivos/consorcio/levantamento/Boletim_cafe_dezembro_2016.pdf>. Acesso em: 10 Jan. 2016. [ Links ]

Congalton, R. G. A review of assessing the accuracy of classifications of remotely sensed data. Remote Sensing of Environment, v.49, p.1671-1678, 1991. https://doi.org/10.1016/0034-4257(91)90048-BLinks ]

Demuth, H.; Beale, M.; Hagan, M. Neural network toolbox™ 6 user’s guide. The MathWorks, 2008. 901p. [ Links ]

Ferraz, G. A. e S.; Silva, F. M. da; Alves, M. de C.; Bueno, R. de L.; Costa, P. A. N. da. Geostatistical analysis of fruit yield and detachment force in coffee. Precision Agriculture, v.13, p.76-89, 2012. https://doi.org/10.1007/s11119-011-9223-8Links ]

Ferraz, G. A. e S.; Silva, F. M. da; Oliveira, M. S. de; Custódio, A. A. P.; Ferraz, P. F. P. Spatial variability of plant attributes in a coffee plantation. Revista Ciência Agronômica, v.48, p.81-91, 2017. https://doi.org/10.5935/1806-6690.20170009Links ]

Landis, J. R.; Koch, G. G. The measurement of observer agreement for categorical data. Biometrics, v.33, p.159-175, 1977. https://doi.org/10.2307/2529310Links ]

Leeuw, J. de; Jia, H.; Yang, L.; Liu, X.; Schmidt, K.; Skidmore, A. K. Comparing accuracy assessments to infer superiority of image classification methods. International Journal of Remote Sensing, v.27, p.223-232, 2006. https://doi.org/10.1080/01431160500275762Links ]

Monteiro, M. A. M.; Minim, V. P. R.; Silva, A. F. da; Chaves, J. B. P. Influência da torra sobre a aceitação da bebida café. Revista Ceres, v.57, p.145-150, 2010. https://doi.org/10.1590/S0034-737X2010000200002Links ]

Oliveira, E. de; Silva, F. M. da; Souza, Z. M. de; Figueiredo, C. A. P. de. Influência da colheita mecanizada na produção cafeeira. Ciência Rural, v.37, p.1466-1470, 2007. https://doi.org/10.1590/S0103-84782007000500041Links ]

Santinato, F.; Ruas, R. A. A.; Silva, R. P. da; Carvalho Filho, A.; Santinato, R. Número de operações mecanizadas na colheita do café. Ciência Rural, v.45, p.1809-1814, 2015. https://doi.org/10.1590/0103-8478cr20140801Links ]

Silva, F. C. da; Silva, F. M. da; Alves, M. de C.; Barros, M. M. de; Sales, R. de S. Comportamento da força de desprendimento dos frutos de cafeeiros ao longo do período de colheita. Ciência e Agrotecnologia, v.34, p.468-474. 2010. https://doi.org/10.1590/S1413-70542010000200028Links ]

Silva, F. C. da; Silva, F. M. da; Alves, M. da C.; Ferraz, G. A. e S.; Sales, R. de S. Eficiência da colheita mecânica e seletiva do café em diferentes vibrações, ao longo do período de colheita. Coffee Science, v.10, p.56-64, 2015. [ Links ]

Silva, F. C. da; Silva, F. M. da; Silva, A. C. da; Barros, M. M. de; Palma, M. A. Z. Desempenho operacional da colheita mecanizada e seletiva do café em função da força de desprendimento dos frutos. Coffee Science, v.8, p.53-60, 2013. [ Links ]

Recibido: 11 de Julio de 2017; Aprobado: 26 de Diciembre de 2017

egmurilo@yahoo.com.br (Corresponding author)

Creative Commons License This is an Open Access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.