**1. Introduction**

Cereal grain storage is mainly conditioned by ambient temperature and humidity, which constitute crucial parameters affecting the quality of stored grain. The presence of living organisms that cause direct losses resulting from their infestation is also important. There are also notable indirect losses in the stored material resulting from contamination with excretions and secretions, as well as from moistening and heating. Stored grain may be infested by many different organisms, such as bacteria, fungi, mites, and insects. One of the most damaging grain pest species in Europe is the grain weevil (*Sitophilus granarius* L.) [1]. It can cause up to 5% of losses in stored crops. This pest is often a cleverly hidden grain destroyer. Although its beetles can be easily detected during sieving, unfortunately, the identification of eggs, larvae, and pupae is difficult and requires appropriate laboratory tests. Weevil feeding on grains significantly reduces the germination capacity of grain from 93% to 7%. Its presence and development cause an increase in humidity and temperature of the stored mass. These conditions foster the development of fungi, as a result of which grain mold appears, which in turn causes a drastic decrease in grain quality and consequently its value.

An important task for managers of any grain storage facility is to prevent the establishment and development of grain weevil in stored crops. The identification and recognition of pests should therefore take place before the grain is taken to silos. This procedure must be quick, efficient, and precise, which implies a necessity to automate this identification process [2–6]. therefore take place before the grain is taken to silos. This procedure must be quick, efficient, and precise, which implies a necessity to automate this identification process [2–6]. An effective identification of the effects of grain weevil feeding on stored grain entailed the

*Agriculture* **2020**, *10*, x FOR PEER REVIEW 2 of 9

development of grain weevil in stored crops. The identification and recognition of pests should

An effective identification of the effects of grain weevil feeding on stored grain entailed the designing, manufacturing, and verification of the new, original classification model [7–11]. The commonly recognized separation properties, such as those represented by artificial neural networks, imply the legitimacy of using them in the process of identifying grain damage caused by grain weevil [12]. It ought to be emphasized that the source literature provides no examples of any effective use of neural modeling in the process of identifying internal macro-damage to wheat caryopsis caused by pests feeding on them. Moreover, there is no scientific knowledge concerning the determination of the type and level of significance of the representative properties of the infected wheat grain, which would enable the identification of the negative effects of this pest [13–15]. designing, manufacturing, and verification of the new, original classification model [7–11]. The commonly recognized separation properties, such as those represented by artificial neural networks, imply the legitimacy of using them in the process of identifying grain damage caused by grain weevil [12]. It ought to be emphasized that the source literature provides no examples of any effective use of neural modeling in the process of identifying internal macro-damage to wheat caryopsis caused by pests feeding on them. Moreover, there is no scientific knowledge concerning the determination of the type and level of significance of the representative properties of the infected wheat grain, which would enable the identification of the negative effects of this pest [13–15].

### **2. Materials and Methods 2. Materials and Methods**

### *2.1. Materials 2.1. Materials*

Grain weevil (*Sitophilus granarius* L.) (Figure 1) is a winged cosmopolitan beetle from the Curculionidae family. Although it belongs to the subclass of the winged insects, it is deprived of volatile wings. It belongs to the group of the most damaging storage pests. Depending on the age of the individual, the grain weevil's color ranges from light-brown to black. Grain weevil (*Sitophilus granarius* L.) (Figure 1) is a winged cosmopolitan beetle from the Curculionidae family. Although it belongs to the subclass of the winged insects, it is deprived of volatile wings. It belongs to the group of the most damaging storage pests. Depending on the age of the individual, the grain weevil's color ranges from light-brown to black.

**Figure 1.** Grain weevil (*Sitophilus granarius* L.) in the context of the grain storage process [16]. **Figure 1.** Grain weevil (*Sitophilus granarius* L.) in the context of the grain storage process [16].

Young individuals are light-brown, whereas adults are dark. The body length of grain weevils ranges from 2 to 5 mm. Most often grain weevils hide in small cracks and avoid sunlight. Grain weevils are characterized by their high resistance to hunger. At a temperature of about 12 °C, a grain weevil can survive 115 days without food. A female grain weevil makes a hole in grain and deposits her egg inside, and then covers it with an adhesive/a viscous substance mixed with starch coming from grain. The sealed hole made by the pest is not visible with the naked eye. Grain weevils are characterized by their high fertility. During one day, a female can lay from one to nine eggs, and during its life, can lay about 150 eggs. Usually a typical female lays one egg in one grain, thus providing the right amount of food for its offspring. A grain weevil egg has an oval shape, with a pointed edge, with a size of 0.65–0.30 mm. The intensity of grain weevil procreation depends on the Young individuals are light-brown, whereas adults are dark. The body length of grain weevils ranges from 2 to 5 mm. Most often grain weevils hide in small cracks and avoid sunlight. Grain weevils are characterized by their high resistance to hunger. At a temperature of about 12 ◦C, a grain weevil can survive 115 days without food. A female grain weevil makes a hole in grain and deposits her egg inside, and then covers it with an adhesive/a viscous substance mixed with starch coming from grain. The sealed hole made by the pest is not visible with the naked eye. Grain weevils are characterized by their high fertility. During one day, a female can lay from one to nine eggs, and during its life, can lay about 150 eggs. Usually a typical female lays one egg in one grain, thus providing the right amount of food for its offspring. A grain weevil egg has an oval shape, with a pointed edge, with a size of 0.65–0.30 mm. The intensity of grain weevil procreation depends on the following factors:


• the amount of available food. Becoming a member state of the European Union, Poland was obliged to adopt the mandatory standards related to food products as well as the requirements set out by institutions accepting and purchasing cereals. These standards also define the methods of assessing the quality of the material provided. All these standards can be found in the Commission Regulation No. 687/2008 [RK (EC) Becoming a member state of the European Union, Poland was obliged to adopt the mandatory standards related to food products as well as the requirements set out by institutions accepting and purchasing cereals. These standards also define the methods of assessing the quality of the material provided. All these standards can be found in the Commission Regulation No. 687/2008 [RK (EC) 687/2008], and they clearly state that the goods delivered to storage facilities should be free of any storage pests. In the regulation (Official Journal No. 29 item 189) issued in 2007, there is a statement that the presence of a storage pest disqualifies a given product as being seed that is sellable to markets.

It is due to the fact (among others) that one of the criteria for assessing the seed quality is the minimum germination capacity, which is 85% for wheat. In case of grain weevil infestation, this capacity decreases to as low as 7%.

The research conducted in this study involved four varieties of spring wheat showing signs of damage caused by grain weevil (*Sitophilus granarius* L.), namely the following varieties: Torka, Narwa, Banti, and Symfonia. The empirical material was obtained from two selected plant breeding stations: (Plant Breeding Strzelce Ltd. 99-307 Strzelce, Poland) and (Agricultural Plant Breeding–Kobierzyce Seeds Ltd. 55-040 Kobierzyce, Poland) The samples were selected randomly. The characteristics of the above varieties were prepared on the basis of the data published on the producer's website (www.hr-strzelce.pl):

Torka—This kind of wheat belongs to the elite group of wheat that possesses very good flour baking value. It is characterized by a large 1000 grain mass (45–52 g), good resistance to lodging, average protein content, good to very good flour yield, very good wholesomeness, and average to good prolificacy.

Narwa—This variety is characterized by very good baking value, very high protein and gluten content, 1000 grain mass over 50 g, good shattering and fouling resistance, good wholesomeness, and early maturation.

Banti—This variety is characterized by high protein content, good baking value, tendency to ear-sprouting, and average 1000 grain mass.

Symfonia—This variety has a 1000 grain mass of approx. 45 g, as well as high fouling and shatter resistance (8 in the 9-point scale). Additionally, it is resistant to powdery mildew, blight, leaf and chaff septaria, and stem base diseases. It is recommended for cultivation all over the country and in the areas where it is necessary to grow varieties with very good winter hardiness (6.5 in the 9-point scale).

The empirical studies were conducted in the specialist laboratory of the Department of Entomology of the Plant Protection Institute—the National Research Institute in Poznan (IOR–PIB Poznan). For the experiments, an appropriate number of beetles were prepared via special breeding. Then, using a stereoscopic microscope, the males were separated from the females on the basis of the morphological differences in the structure of the snout and abdomen. The study used 50 polypropylene containers (height 65 mm, diameter 38 mm, capacity 60 mL), which had a suitable construction enabling air inlet but prevented the tested pests from getting out of the container. Four hundred randomly selected caryopses were put into each container, and then 20 pairs of grain weevil beetles were placed inside (20 males and 20 females). The period of time when the beetles were kept in particular containers was 5, 10, 15, and 20 days. During that time, all the grain weevil individuals were feeding, copulating, and laying eggs, which in turn developed into larvae. The containers were placed in an incubator in order to make it possible to take measurements and obtain empirical data at the same time. After the incubation period of the grain weevils feeding on the caryopses, the samples were cleared of the beetles and other pollutants. Four hundred caryopses were randomly selected from each sample and placed in a SKCS 4100 (Single-Kernel Characterization System) Perten Instruments, Sweden appliance. The scheme of obtaining empirical data is presented in Figure 2: *Agriculture* **2020**, *10*, x FOR PEER REVIEW 4 of 9

**Figure 2.** Scheme for obtaining empirical data [17]. **Figure 2.** Scheme for obtaining empirical data [17].

The experimental data were saved on the hard drive of the SKCS 4100 appliance, and then collected and organized/segregated into Microsoft Corporation Excel spreadsheets (in the form of The experimental data were saved on the hard drive of the SKCS 4100 appliance, and then collected and organized/segregated into Microsoft Corporation Excel spreadsheets (in the form of .csv files).

In order to create the optimal neural model, the following scheme of procedure was put in place

**Figure 3.** Scheme of procedure. ANN: artificial neural network.

In order to create the classification neural models, a neural network simulator implemented in Statistica v. 10 package was used [1,18–20]. The most important stage of the ANN generation was the preparation of the training files containing encoded selected representative properties, constituting the empirical basis for the classification [20–23]. For this purpose, four numerical input variables and one nominal output variable were determined, which resulted from the nature of the formulated scientific problem and represented the characteristic parameters of the process examined. As the input variables, the following four descriptors were adopted and used, which constituted the basic

The values of all the aforementioned physical properties were obtained from 400 caryopses randomly selected from each sample. The tests were repeated in the following time intervals: 0 day (control—a combination without pests), and 5, 10, 15, and 20 days from the moment the pest came into contact with the grain. The data collected and classified in this way was converted to a form of training set, which was necessary to generate the ANN. The set of the neural models was created in the Statistica v. 10 program with a simulator implemented in the "Neural Networks" module [20,24–

The output variable was encoded in the form of a dichotomous binary nominal variable. The training set consisted of 1800 randomly selected data, and it was divided proportionally 2:1:1 into

to generate the ANN file.

physical characteristics of the stored caryopses:

− hardness (according to the selected hardness scale).

*2.2. Method* 

(Figure 3).

− mass (mg),

27].

− humidity (%),

− equivalent diameter (mm),

The empirical data obtained was converted to the training set relevant to the ANN (artificial neural network) simulator implemented in the commercial package from Statistica v. 10- StatSoft Polska. The generated training set, essential in the neural modeling process, was then used to generate the ANN file. .csv files). The empirical data obtained was converted to the training set relevant to the ANN (artificial neural network) simulator implemented in the commercial package from Statistica v. 10- StatSoft Polska. The generated training set, essential in the neural modeling process, was then used to generate the ANN file.

**Figure 2.** Scheme for obtaining empirical data [17].

collected and organized/segregated into Microsoft Corporation Excel spreadsheets (in the form of

*Agriculture* **2020**, *10*, x FOR PEER REVIEW 4 of 9

### *2.2. Method 2.2. Method*

In order to create the optimal neural model, the following scheme of procedure was put in place (Figure 3). In order to create the optimal neural model, the following scheme of procedure was put in place (Figure 3).

**Figure 3.** Scheme of procedure. ANN: artificial neural network. **Figure 3.** Scheme of procedure. ANN: artificial neural network.

In order to create the classification neural models, a neural network simulator implemented in Statistica v. 10 package was used [1,18–20]. The most important stage of the ANN generation was the preparation of the training files containing encoded selected representative properties, constituting the empirical basis for the classification [20–23]. For this purpose, four numerical input variables and one nominal output variable were determined, which resulted from the nature of the formulated scientific problem and represented the characteristic parameters of the process examined. As the input variables, the following four descriptors were adopted and used, which constituted the basic physical characteristics of the stored caryopses: In order to create the classification neural models, a neural network simulator implemented in Statistica v. 10 package was used [1,18–20]. The most important stage of the ANN generation was the preparation of the training files containing encoded selected representative properties, constituting the empirical basis for the classification [20–23]. For this purpose, four numerical input variables and one nominal output variable were determined, which resulted from the nature of the formulated scientific problem and represented the characteristic parameters of the process examined. As the input variables, the following four descriptors were adopted and used, which constituted the basic physical characteristics of the stored caryopses:


The values of all the aforementioned physical properties were obtained from 400 caryopses randomly selected from each sample. The tests were repeated in the following time intervals: 0 day (control—a combination without pests), and 5, 10, 15, and 20 days from the moment the pest came into contact with the grain. The data collected and classified in this way was converted to a form of training set, which was necessary to generate the ANN. The set of the neural models was created in the Statistica v. 10 program with a simulator implemented in the "Neural Networks" module [20,24– The values of all the aforementioned physical properties were obtained from 400 caryopses randomly selected from each sample. The tests were repeated in the following time intervals: 0 day (control—a combination without pests), and 5, 10, 15, and 20 days from the moment the pest came into contact with the grain. The data collected and classified in this way was converted to a form of training set, which was necessary to generate the ANN. The set of the neural models was created in the Statistica v. 10 program with a simulator implemented in the "Neural Networks" module [20,24–27].

27]. The output variable was encoded in the form of a dichotomous binary nominal variable. The training set consisted of 1800 randomly selected data, and it was divided proportionally 2:1:1 into The output variable was encoded in the form of a dichotomous binary nominal variable. The training set consisted of 1800 randomly selected data, and it was divided proportionally 2:1:1 into training, validation, and test sets. These tests included, respectively, 900, 450, and 450 training files. According to the procedure adopted, the test set was not used in the network training process, therefore it was important in the final assessment of the optimal neural model. The structure of the training file is presented in Table 1.


**Table 1.** Part of a training file.

## **3. Results and Discussion**

A set of 100 different neural topologies was generated. The selection of the neural network typology at the initial phase was conducted with an automatic designer, which did the experiments on its own with different network architectures with the use of different learning processes for a given network. Next, two different types of neural networks were tested for each kind of dataset. It was the parameters of the given neural network, such as correlation, coefficient of total determination, and quotient of standard deviations, that determined the selection of the best neural network. Following the selection of the given network, the process of learning the network was implemented. During this process, based on the selected algorithm, special attention was put on its ability of approximation and generalization, based on quality measurements with the lowest root mean square (RMS) error. Also, during this same process of learning/training, an error curve of both the training set and the valuation set was observed. In the event that there was an increase in those errors, the training/learning process was stopped and all the necessary modifications of the network architecture were made by adding or removing neurons or hidden layers. A change of learning algorithms was also applied. Those actions are aimed at eliminating the phenomenon of network "overlearning". Otherwise, the network will not come up to the expected results. RBF (radial basis function) topology with structure 4:10:1 turned out to be the best ANN topology generated. Nowadays, RBF networks belong to the category of basic types of neural networks. These types of networks are most commonly applied in the non-linear approximation of numerical variables. Additionally, they are applied in cases concerning classification (Bishop [1], Nabney [4]), where they reconstruct the density function of the distribution of informing variables. The redial neuron is defined by its core and the parameter called "radius". The point in *n*-dimensional space is defined with *N* numbers, which precisely corresponds to the number of weighs in the linear neuron; on this account, the core of the radial neuron is stored in the set of parameters determined in the software Statistica, also as "weighs" (though when determining common "weigh" activation, only the distance between the weigh vector and the input signal vector is determined). Radius (or, in other words, deviation) is stored in the neuron as the so-called threshold [28]. The input layer was composed of four neurons with a PSP (postsynaptic function), a linear function, and a linear activation function. The hidden layer was composed of four radial neurons with a radial PSP function and an exponential activation function. The network output consisted of one neuron with a linear PSP function and a linear (saturated) activation function, representing a two-state nominal variable [29,30]. The generated neural model was trained using optimization algorithms implemented in Statistica v. 10 package. The centers were determined with the k-means method, whereas the deviations were determined with the k-nearest neighbors method. The output layer was optimized with the pseudo-inverse technique. The structure of the generated RBF network is presented in Figure 4. Where:

A—input layer: PSP function: linear, activation function: linear saturated function;

B—hidden layer: PSP function: radial activation function–Gauss function;

C—output layer: PSP function: linear saturated function, activation function: linear saturated function; PSP—postsynaptic potential.

The basic properties of RBF networks are as follows:


RBF networks are characterized by one hidden layer, a short training process, and a small size (Figure 4).

function;

PSP—postsynaptic potential.

− RBFs are one-direction networks;

the neighboring layers;

The basic properties of RBF networks are as follows:

nonlinear (radial) nature, and the output neurons are fully linear.

− RBFs are trained with a "no teacher" technique;

where

determined with the k-nearest neighbors method. The output layer was optimized with the pseudo-

C—output layer: PSP function: linear saturated function, activation function: linear saturated

inverse technique. The structure of the generated RBF network is presented in Figure 4.

B—hidden layer: PSP function: radial activation function–Gauss function;

A—input layer: PSP function: linear, activation function: linear saturated function;

− they have a three-layer architecture: there is an input, hidden (radial) layer, and output layer, − the declared connections in the network allow only communication between the neurons from

− the input neuron activation functions are of linear nature, the hidden neuron functions are of

**Figure 4.** The structure of the generated ANN (Artificial Neural Network) type radial basis function (RBF). **Figure 4.** The structure of the generated ANN (Artificial Neural Network) type radial basis function (RBF).

A hidden neuron in these networks performs a function that is changing radially around the selected center and the assuming non-zero values only in the vicinity of this center. The mathematical basis for RBF network functioning is T. Cover's theorem on separability of patterns, which posits that a complex classification problem cast non-linearly into the high-dimensional space is more likely to be linearly separable than in the projection into a low-dimensional space. A hidden neuron in these networks performs a function that is changing radially around the selected center and the assuming non-zero values only in the vicinity of this center. The mathematical basis for RBF network functioning is T. Cover's theorem on separability of patterns, which posits that a complex classification problem cast non-linearly into the high-dimensional space is more likely to be linearly separable than in the projection into a low-dimensional space.

A standard measure of the quality of the generated neural model is the RMS (root mean square) error, which is defined in the following way [28,31,32]: A standard measure of the quality of the generated neural model is the RMS (root mean square) error, which is defined in the following way [28,31,32]:

$$\text{RMSE} = \sqrt{\frac{\sum\_{i=1}^{n} (y\_i - z\_i)^2}{n}} \,\text{,}\tag{1}$$

where − *n*—number of cases; where


− 0.2322 for the training file; − 0.2462 for the validation file; The RMS error values for the generated neural model were as follows:


The estimation of the level of significance of the ANN input parameters is usually identified by means of the procedure of the analyzing the neural model's sensitivity to the input variables. This procedure is used to assess to what extent a selected input signal affects the identification process of the input variable. In this way, the information on the rank of the input signal is obtained in the form of error increase quotient [33,34]. If the error increase quotient is below 1, it means that a given property has no influence on the grain weevil identification process. In the described case, all input signals had an error quotient above one. Therefore, it can be concluded that each of the properties did take part in the identification process of the output signal of the optimal ANN, albeit, each of them with a different rank. Humidity was in the first place in the ranking of the input signals of the neural model, obtaining the highest level of the error increase quotient. Such a high rank may prove that the occurrence of pests causes observable changes in the level of water that a caryopsis contains. The following ranks (from highest to lowest) are, respectively, mass, equivalent diameter, and hardness (Table 2).


**Table 2.** Sensitivity analysis of the model RBF 4:10:1.

### **4. Conclusions**

The generated RBF-type ANN topology of the 4:10:1 structure was verified in terms of the quality of the identification process and the possibility of its application to solve the problem of identifying grain weevil in stored wheat grain. By applying RBF (instead of Multi-Layer Perceptron MLP), it was observed that the neural network finds approximation that is better suited to the local features of the dataset but with worse extrapolation. Neural networks with radial base functions were applied to deal with classification issues, approximation of functions with numerous variables, and in issues concerning predictions. In those areas of application where sigmoid functions have an established position, the implementation of the generated ANN model will enable automation of the process involving recognition of grain weevil occurrence, which will allow to undertake appropriate measures to protect the stored grain from further losses caused by this pest.

The conclusions resulting from the analysis conducted are as follows:


**Author Contributions:** Conceptualization: K.S. and P.B.; methodology: P.B. and K.K.; software: K. ´ S.; validation: ´ M.Z.; formal analysis: M.Z. and P.B.; investigation: J.P.; resources: J.P.; data curation: K.K.; writing—original draft preparation: K.K. and K.S.; writing—review and editing: K.K. and J.S.; visualization: K.K.; supervision: P.B.; ´ project administration: J.S. All authors have read and agreed to the published version of the manuscript.

**Funding:** The authors are grateful for financial support provided by the Pozna´n University of Life Sciences, Poland, within the framework of fund no. 506.752.03.00.

**Acknowledgments:** The authors are grateful for the financial support provided by the Pozna ´n University of Life Sciences, Poland, within the framework of fund no. 508.752.00.0.

**Conflicts of Interest:** The authors declare no conflict of interest.

## **References**


© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

MDPI St. Alban-Anlage 66 4052 Basel Switzerland Tel. +41 61 683 77 34 Fax +41 61 302 89 18 www.mdpi.com

*Agriculture* Editorial Office E-mail: agriculture@mdpi.com www.mdpi.com/journal/agriculture

MDPI St. Alban-Anlage 66 4052 Basel Switzerland

Tel: +41 61 683 77 34 Fax: +41 61 302 89 18

www.mdpi.com ISBN 978-3-0365-1579-3