Precision conservation: from visual analysis of soil aggregates to the use of neural networks Conservação de precisão: da análise visual de agregados do solo para a utilização de redes neurais

The concept of precision conservation can be defined as a set of space technologies and other procedures linked to mappable environmental variables, which can be used to program conservation management practices for natural resources that consider the variability of these variables in space and time within of natural or agricultural systems. In this context, structural loss of soil through human activities is considered, as with a process with a spatial and temporal variation. The management of soil aggregation conditions can contribute to more regenerative and sustainable agricultural processes. It allows spatial analysis technologies through georeferenced visual indicators or even the use of systems with automatic learning, known as deep learning. In this sense, a fair visual method was developed with an analysis of fuzzy logic to classify aggregates in terms of shape, surface roughness, and biogenic structures. Thus, in a second stage, a model of the artificial neural network was developed, capable of detecting and classifying different forms of soil aggregates, thus allowing a brief discussion of the theme and its potential for application in conservation management through the analysis of aggregates via systems automatic sorting. In this way, elements are presented for the motivation of research and development in adaptive technologies in supporting decision-making that can help integrate dynamic and spatial information in the understanding of the soil’s structural condition to preserve the soil more precisely.


INTRODUCTION
The concept of precision conservation emerges within the universe of space technologies such as global positioning systems (GPS), remote sensing (RS), and geographic information systems (GIS), adding the potential to analyze the spatial interdependence relationships between and within the data mapped.
Precision conservation was initially defined as a set of space technologies and procedures linked to mappable environmental parameters. This set of technologies can be used to program productivity and conservation management practices that consider these parameters' variability in space and time within natural and agricultural systems (BERRY et al., 2003).
This approach represents a differentiated and collaborative look about Precision Agriculture, which mainly guides productivity maximization. Thus, it seeks to understand the surface and subsurface's environmental systems to apply conservationist management practices that contribute effectively and sustainably to improve the productive systems (DELGADO;BERRY, 2008).
In this context, it considers the structural loss of the soil by human activities, as with a phenomenon of spatial and temporal variations. The management of soil aggregation conditions can contribute to more regenerative and sustainable agricultural processes. It allows spatial analysis technologies through georeferenced visual indicators or even the use of systems with automatic learning, known as deep learning.
Even though it has relevance for analyzing soil quality in natural conditions and agricultural production processes, structural evaluation through aggregates still requires research and development. Different methodologies can evaluate the structural loss of the soil. However, the analysis of aggregates and their different forms are easy to interpret and expeditious. Thus, the main factors that interfere with soil aggregation are the contents and types of clays, polyvalent metals, calcium carbonate, iron, aluminum, and manganese oxides and hydroxides and mainly the biological activity that contributes with organic exudates from the roots, organic substances from the action of microorganisms and other biogenic substances.
Thus, the management of soil aggregation conditions can contribute to more regenerative and sustainable agricultural processes in terms of loss and improvement. Even though it has relevance for analyzing soil quality under natural conditions and agricultural production processes, structural evaluation through aggregates still requires research and development.
Visual assessment methods are becoming increasingly popular among farmers, organizations, and companies searching for management models suitable for assessing the soil's productive condition (VAN LEEUWEN et al., 2018;BALL et al., 2017). These methods are based on the weighted evaluation of several observable characteristics with values attributed to the quantification of their relative importance ( VAN LEEUWEN et al., 2018;FRANCO et al., 2019).
Because it represents a low-cost and expeditious form of analysis, the visual analysis represents a valuable addition to chemical and physical soil analysis to interpret land degradation issues (MCKENZIE, 2013). However, the method must be reproducible and the observations made are correct, so there is a need for the evaluator to be adequately trained and standards to be established.
The aggregation can be analyzed in the field. However, it requires methodological guidelines to train technicians in using the diagnosis for decision-making purposes in soil management (RALISCH et al., 2017).
In general, environmental studies involve both uncertainties and subjective judgments and assessments of factors related to environmental components. Such a condition makes it difficult to obtain consistent, valid, and comprehensive results. Thus, the association of visual analysis with fuzzy inference systems, based on fuzzy logic, represents an advance for the construction of more robust or even automated methods, such as neural networks.
These systems represent mathematical tools capable of handling heterogeneous information affected by uncertainty and imprecision (PECHE; RODRIGUEZ, 2012). However, few initiatives have explored the adoption of these two approaches together, mainly in assessing soil quality (KAUFMANN et al., 2009).
In studies of the condition of aggregation, examples are even scarcer, with a predominance of methods aimed at analyzing the shape, employing digital images and a set of image processing measures (MARTÍNEZ et al., 2015;WHALLEY et al., 2005;KRAVCHENKO et al., 2011).
In this context, the use of artificial neural networks in the assessment and classification of soil aggregation can contribute to intelligent systems development. These systems are based on visual analysis methods and can help soil conservation management through machine learning and remote information collection. The research activities developed around artificial neural networks were originated and motivated in modeling how biological nervous systems promote information processing (DEEP LEARNING BOOK, 2019). Precision conservation: from visual analysis of soil aggregates to the use of neural networks Artificial Neural Networks (ANNs) are a form of artificial intelligence that tries to mimic the human brain and nervous system (SHAHIN, 2001). According to Sarmiento-Ramos (2020), neural networks are presented as an instrumental basis for machine learning processes aiming to create systems that learn automatically. For this learning, the systems seek to identify different recognition patterns using sound patterns and images being common. Thus, it becomes possible to identify and classify primary information. These characteristics enable artificial neural networks to predict behaviors by capturing each object's unique characteristics and generalizing information from data sets (ARTOLA, 2019).
Some networks are based on deep learning algorithms, that is, networks arranged in a spatial architecture, with which pattern learning can be achieved (PADARIAN et al., 2019). This concept is the Convolutional Neural Network (ConvNet /Convolutional Neural Network /CNN), which consists of a Deep Learning algorithm that can identify and capture an input image and assign importance in weights and biases. Thus, it allows the detection of various aspects and objects of the image, differentiating one from another.
Starting from a method of visual assessment of soil aggregates, and within the concepts of convolutional neural networks applied to precision agriculture systems or intelligent agriculture, this work sought to present the potential of neural networks in the identification and classification of soil aggregates aiming at applications in the structural conservation of soils using remote intelligent systems.
Thus, a juxtaposed visual method with an analysis of fuzzy logic was developed to classify aggregates in shape, texture, and biogenic structures. Thus, in a second stage, a model of the artificial neural network was developed, capable of detecting and classifying the different forms of soil aggregates according to the visual analysis, thus allowing a brief discussion of the theme and its potential for application in conservation management through aggregate analysis via smart remote systems.

Visual inspection and weighting of convergent attributes
For the visual inspection and weighing of the attributes, an experimental condition was set up, taking samples of a medium-textured Red Oxisol in a commercial grain production area. In this condition, two locations were selected, with different treatments: one with the application of Microgeo® aggregating biofertilizer and the other without. The aggregates of the soil samples were obtained by the Dry Method following the recommendations of EMBRAPA (2017). Thus, for the removal of samples, 400 aggregates were collected per sieve to allow the quarter in samples with 100 aggregates. Table 1 presents a description of the treatments used in the study.

Code Sample
Treatment Sieve C27 With aggregator 4 -5 mm

C36
With aggregator 3-4 mm C35 With aggregator 2-3 mm C24 With aggregator 1-2 mm C13 With aggregator 0,5-1 mm S37 Without aggregator 4 -5 mm S36 Without aggregator 3-4 mm S35 Without aggregator 2-3 mm S54 Without aggregator 1-2 mm S33 Without aggregator 0,5-1 mm T a b l e 1 -Sample codes and description of treatment characteristics Taking the set of images of the aggregates generated using a digital microscope, a methodological proposal was established for visual inspection and subsequent classification of the aggregate to the convergent attributes of soil aggregation through fuzzy logic. For this analysis, the following characteristic input attributes were used: Form of the aggregate, Aggregate roughness and Presence of biogenic structures in the aggregate. In this way, sets of pertinence functions were built for each attribute.
The shape was evaluated using five patterns, relating its semantic attributes to a scale of numerical values, defined according to a Fuzzy membership function ( Figure 1). If the soil aggregate were fully defined in one of the pre-established forms, the degree of certainty (or pertinence) would be maximum, with the assigned value corresponding to one of the integer values: 0 (zero) Prismatic; 1 (one) Angular; 2 (two) Subangular; 3 (three) rounded or 4 (four) round.
The roughness of the aggregate surface and the presence of biogenic structures were evaluated using the same procedures. Thus, using visual perception to analyze the aggregates, three attributes of roughness relative to the surface with their weights were taken: 0 (zero) for smooth, 1 (one) for Partially smooth, and 2 (two) for Rough. In this bias to analyze the presence of biogenic structures, the following attributes and weights were used: 0 (zero) for Absent, 1 (one) for Partial, and 3 (three) for Present.

Fuzzy Inference System
The Fuzzy Rules-Based System (SBRF) construction was carried out using the pertinence functions established in the visual analysis process of the aggregates as input attributes. An Aggregate Classification Index (ITA) was established as an output, defined through the membership function that segregates its values into five classes ( Figure 2).
The Inconsistent outlet represents predominantly mineral particles from the soil, with a very low biological activity intensity. The little consistent output denotes the mineral particles of the soil in which an initial stage of aggregation is observed, with evidence of some biological process, however, still with a predominance of mineral particles. The Regular class represents aggregates in the initial formation stage, where it is possible to observe evidence of partial biological processes and partial agglomeration of soil particles through the action of cementing biological agents. The Consistent and Very Consistent classes represent aggregates in the full stage of development, where it is possible through the presence of biogenic structures and surface roughness to prove that the aggregation process has occurred or has been occurring, with the differentiation between these classes given by the intensity of the processes involved.
For the classification of aggregates with the fuzzy inference system, the rules base was built with six specialists in soil science from the Agronomic Institute of Campinas and the Institute of Environmental Sciences Technology at UNESP Sorocaba. All possible combinations of the input variables' linguistic terms were determined, and through the group, meetings defined the respective outputs. The Mandani inference method was used, with defuzzification through the Center of Gravity (Equation 4) and normalization of values in the range between 0 and 1.
Where: Y is the normalized value; X is the input value; Emin represents the smallest input value; Emáx is the highest input value; Smin is the lowest output value; Smax is the highest output value. Precision conservation: from visual analysis of soil aggregates to the use of neural networks

Statistical Analysis
The results were evaluated using the descriptive statistical analysis guidelines in each sieve and the treatments, with the calculation of the mean, median, maximum and minimum values, standard deviation, coefficient of variation, coefficient of asymmetry, and kurtosis. Also, the sieves' classification was carried out taking quintile separatory measures, with their organization in histograms and control charts

Calculation of the aggregation efficiency index
In the final step of the visual analysis method, the sample aggregation efficiency index was determined by taking the values obtained from the aggregate typification index values, according to the guidelines taken in the previous chapter (Equation 5). Where: • IFA represents the aggregation efficiency index; • N0-are the values obtained from the typification index; • Nmax -represents the maximum value for the typification index (1).

Potentialities and assessment of neural network learning in the detection of aggregate morphometry
For the development of the neural network model capable of identifying the shapes of the aggregates, the mobilenetv2 architecture and "Python3" programming language were used with the "Keras" and "TensorFlow" library, with the application of the supervised learning technique in five classes aggregate morphometrics being: prismatic, angular, subangular, rounded and round, according to the visual analysis proposal already described. Thus, based on the visual analysis classes, it was sought through the neural network training to identify the differences and similarities of the morphometric images of the aggregates aiming at applications in precision and intelligent systems for the structural maintenance of the soils.
The evaluation of the proposed neural network model's learning responses was carried out through a confusion matrix, which allows the analysis of the network's learning performance in recognition of patterns. The confusion matrix makes it possible to relate the prediction to the actual response so that the lines indicate the predicted patterns. In contrast, the columns indicate the actual answers. Table 2 shows a confusion matrix. The matrix elements represent the following relationships between prediction and reality: A true positive (VP) happens when the forecast is accurate and the real as well; a false positive (FP) occurs when the prediction is correct and is incorrect; a false negative (FN) occurs when the forecast is incorrect, and in reality it is true; a real negative (VN) happens when the forecast is false, and the reality is also false. Thus, it becomes possible to build the following metrics for analyzing network learning, according to Table 3.
In possession of the results, some potentialities of using neural networks in the structural evaluation of soils were described.

Rules base for visual inspection
All combinations of shape attributes (prismatic, angular, sub-angular, rounded and round), surface roughness (rough, partially smooth and smooth), and presence of biogenic structures (present, partial and absent), were considered valid by experts, resulting in 45 rules for the fuzzy inference system. However, the relationship between the inputs and outputs, defined by the rules, was permeated by some peculiarities derived from the experts' knowledge regarding the phenomenon of soil aggregation. As the fuzzy surfaces demonstrate (Figure 3), there is no strictly linear relationship between the approximation of the round shape and the increase in the aggregate typification index (ITA) since there is the possibility of a particle of rock (granule) taking over the round or round shape. In this way, a particular particle with this shape pattern would only be considered a consistent or very consistent soil aggregate if it had at least partial roughness ( Figure 3A) and partial presence of biogenic structures ( Figure 3B). As sub-angular aggregates are formed by an aggregation of smaller particles, which characterizes their shape, under conditions of roughness and low biological activity, they are more consistent in aggregation than an isolated rounded or round particle in smaller aggregates dimension. Therefore, as shown in Figure 3 A and B, the rule base was sensitive to the experts' knowledge, with the representation of these assumptions in the system's construction. The recall or recall metric has the same idea as precision, but for false negative samples.

Recall = VP/VP + FN
The F1 score metric is defined as twice the harmonic average between precision (recall) and recall (recall) F1 Score = 2

x Precision x Recall/Precision + Recall
Another aspect considered was the relationship between biogenic structures and surface roughness. A developed aggregate (consistent or very consistent) necessarily lacks a high surface roughness since, to present an advanced degree of development, several soil particles must be agglomerated. Therefore, it was established that there would be no possibility of an aggregate with high biological activity, however, smooth or partially smooth, assuming a high degree of consistency. It represents an aggregate in the initial/intermediate stage of development. Figure 3 (C) elucidates these assumptions based on rules, where, for a partially smooth or smooth aggregate (values less than 1), with partial or present biogenic structures (costs higher than 2), the value 0.5 is attributed to ITA, being a higher degree of consistency would only be obtained in situations where the surface roughness also tends to values above 1 (partial grade for the roughness).

Typification results of soil aggregates
According to Table 4, the samples presented a range of variation between 0.6 and 0.8, except the C24 sieve (with an aggregator, 1-2 mm), which assumed the maximum amplitude value (Table 4). However, the coefficient of variation's values remained close for all sieves and both treatments, between 25 and 35%.
Quartile measurements demonstrate that the C24 sieve (1-2mm) tended to have higher values in the typification index (ITA), also assuming a high kurtosis and asymmetry greater than -1 (frequency distribution shifted to the right - Figures 15 and 16). All sieves also showed negative asymmetric values, with mean and median values greater than 0.6, and some variations in kurtosis measures. Therefore, together with the analysis of Figures 4 and 5, there is a predominance of consistent or very consistent aggregates, which suggests a good / very good (C24) aggregation condition in the sample.
In this sense, consistency was analyzed using sample histograms (Figure 4) and the reference standards in Figure 5. As noted in (Figure 4), all the sample histograms without aggregator can be classified into two classes, Precision conservation: from visual analysis of soil aggregates to the use of neural networks  regular and adequate consistency, proving that the sample is not in balance; however, no significant deviations in the surface of the sieves are identified.
In the sample with aggregate (Figure 4), the histograms can be classified into consistent, regular, useful, and very good. Therefore, it is proved that the sample is also not in equilibrium, with the presence of three consistency classes present. However, the result obtained does not necessarily represent a negative aspect since there is a tendency to transition to a higher degree of consistency (perfect), indicating that the sample is developing a better aggregation condition.

Aggregation efficiency index [IFA]
The soil aggregation efficiency index showed values with a slightly higher trend for treatment with aggregate ( Figure 6). Still, it is observed that the surface roughness represented the parameter that reached the highest values, followed by the shape and later by the biological activity. Therefore, for practical purposes of soil management and improvement of the aggregation state, it is observed that the process of biological activity represented the limiting factor in the condition of aggregation of the sample.
This result demonstrates consistency with the frequency distribution of the entire sample (Figure 7). The aggregate treatment showed a higher percentage of the sample of soil aggregates belonging to the consistent class and lower rates associated with the regular, poorly consistent, or inconsistent rank. Therefore, these results indicate a better quality of the aggregation process in this treatment.

Analysis of potentialities and assessment of neural network learning in the detection of aggregate morphometry
The results of the neural network learning metrics on aggregate morphometry are presented in Figure 8. Accuracy can be seen in the upper left corner of the same figure, with 73%. The number of epochs for this experiment was 20. The epoch consists of how many complete passages of the data set (epochs) must be carried out. The number of seasons is not an elementary task because if we use a few seasons, underfitting problems may arise; that is, the network cannot express its maximum learning. However, if we use a broader set of times, the opposite problem may occur, overfitting; that is, the network seeks excess patterns to adjust "noise" in the training data, not the full signal, as (DEEP LEARNING BOOK, 2019).
By the very definition of accuracy as the proportion of cases that were correctly predicted, whether true positive or real negative, notes that the network did not present  . This low-performance condition is even more notorious when one observes the other performance metrics, mainly the precision that in the highest value was 40% for rounded and 25% for angular.
Within a comparative analysis of the learning performance in the confusion matrix metrics, there is a better performance of the network in the classification of the Rounded and Angular classes. However, this metric quantification is low since the purpose of precision is to identify how many samples were positively classified.
Another possibility of analyzing the performance of learning a network is the visual interpretation of the confusion matrix's color intensity. Ideally, the count should be concentrated on the main diagonal of the matrix. In Figure 9, note that the highest intensity was for the rounded count.
This clarification shows that the ANN's learning performance was low and that to improve the learning performance, it will be necessary a more homogeneous collection with a higher resolution of the images with constant illumination. In this insertion, another relevant aspect of improving learning consists of the segmentation of images. However, there may be a need for a larger number of samples, as the use of morphometric classes of aggregates similar to the visual analysis methodology requires more information for better classification and learning. The visual analysis method requires specialized knowledge, according to the methodological description. In this context, improving the neural network's learning also requires the insertion of stable information and methods to maximize the quality of the input information and minimize errors in the learning process. The critical analysis of the visual method helps to understand soil aggregates and provides notable elements for neural networks.
It is noted in this insertion that the use of neural networks applied in this type of study is still at an early stage. Thus, it is worth describing some brief experiences in order to highlight potentialities and applications. In a study developed to train the architectures of neural networks, VggNet16, ResNet50, and Inception-v4 in the classification of soil aggregate sizes in tillage operations, Azizi et al. (2020) achieved an average classification accuracy of these networks above 95%, being the highest precision achieved with the ResNet50 architecture (98.72%).
With the use of neural networks, the indicators' interactions were evaluated: the degree of saturation, moisture content, voids index, porosity, and the DMG of Aggregates. The trained neural network allowed classification of the soil's condition in little degraded or very degraded, with an accuracy of 85% (MELO, 2014).
In this bias, Ribeiro et al. (2016) used a Kohonen map-type neural network model to classify different groups of degraded soils in open-pit mines in the Amazon rainforest in order to recover them. Swetha et al. (2020) describe a new low-cost configuration using a smartphone, a custom-made darkroom, and an application for predicting soil texture using dry, ground and sieved samples in the laboratory.
Many works on neural networks are applied in the diagnosis or treatment of specific problems. The uses of artificial neural networks make up the evolution of geographic information systems. This evolution is correlated with the amount and variety of research that uses neural networks in geographic information systems (BOLFE et al., 2011). In the medical sciences, there are several models of ANN for the diagnosis of tumors (PEREIRA et al., 2016); (TORREGROSA LLORET, 2018); (JOSÉ; ORTEGA, 2019). Thus, it is understood that ANN has multiple uses and many potential applications in the most different areas of human knowledge.
Thus, this text sought to present a brief discussion of the theme and its potential for application in the conservation management of the structural condition, regardless of the exemplified neural network's low learning performance. As just as in visual analysis, the path is promising, the training of a neural network may be able to analyze the roughness parameters of the aggregates, shape, biogenic activity, and others, being of significant contribution to the soil's structural management remotely and intelligent.