1. Introduction
The realization of the automatic classification of fruit grades has become an essential precondition for the modernization of the fruit industry [
1]. Greengage is a kind of pharmaceutical and food resource with multiple healthcare functions which is favored by the masses. At present, the existing automatic classification mostly involves screening of the particle size and weight. The sorting of its quality often relies on manual screening, which is not only labor-intensive but also susceptible to subjective factors such as operator experience, so its cognitive effect is hard to evaluate satisfactorily. Therefore, development of a fast and accurate machine grading method becomes an urgent need to promote the fruit industry [
2,
3,
4]. A fast classification method for fruit grading based on multiple kernel support vector machines (kSVM) is proposed in [
2]. A fuzzy cluster-based image segmentation method is proposed in [
3], and the extracted features are introduced into the deep neural network to achieve apple grading. In [
4], a carrot surface defect detection method based on the fusion of computer vision and deep learning was proposed to achieve real-time carrot quality grading. Various levels of the feature space and various perspectives within the same feature level represent discriminative attention. However, with uncertain image inputs and indeterminate grade outputs, the traditional machine fruit grading methods with the open-loop method lack updated data structures of the feature space and classified criteria once established, which is an obvious difference from the human information interaction mechanism with repeated comparison and inference.
Deep learning can build neural networks that imitate analysis and learning from the global to local levels with the human brain. As a typical method, the CNN has received widespread attention [
5,
6,
7,
8]. However, the traditional cognitive methods with CNNs still belong to the open-loop mode. Generally, increasing the network level can reduce the feature space dimension and extract more detailed information, while the expressive ability of the features is proportional to the number of feature maps in the same network level within a certain range. Nevertheless, too many network levels and feature maps will result in an enormous increase in redundant features and computational complexity. Therefore, the joint training mechanism between deep feature extraction and a classification model has become a popular research direction [
9]. Furthermore, the random initialization of the weight and the uncertainty of the structure would lead to an unstable output during network modeling. Thus, ensemble network training can overcome the random deviation of the model to a certain extent and improve the generalization performance of the model.
The human cognition mechanism is a hierarchical information processing process of repeated comparison and inference with prior knowledge. That is to say, a system with a feedback mechanism could make optimal decisions by performance evaluation, which imitates the human cognition characteristics in a sense. However, the performance of the traditional feedback system is usually measured by the index functions. It is difficult to define a unified performance index for an intelligent cognition system. Entropy is usually used to establish the index model and optimize the system performance [
10,
11,
12]. An inherent fuzzy entropy-based algorithm is proposed in [
10] to achieve a more reliable electroencephalogram (EEG) complexity assessment. A multi-label maximum entropy (MME) model is introduced to realize emotion classification over short text in [
11]. An improved SVD entropy-based feature reduction method is proposed in favor of the related feature selection in [
12]. Therefore, as with the employment of the intelligent control theory of Saridis [
13], the index model with the form of an entropy function can be used to evaluate the cognitive performance so as to construct a humanoid feedback mechanism. In this way, the entropy function is adopted as the unified performance index for hierarchical greengage grading to establish the equivalent measurement relationship between the information theory and optimal cognition problem.
In [
9], a method for greengage grading is proposed to overcome the deficiencies of a traditional open-loop system, which lacks evaluation of the uncertain inputs and outputs. Nevertheless, the joint feedback mechanism, either semi-supervised or supervised, can learn more cognitive knowledge with fewer labeled samples while increasing the complexity of the learning model. In practical agricultural production applications, the learning and decision-making efficiency is one of the most important system performance indicators. In addition, feature selection based on the Mahalanobis distance has a weakness: performance in nonlinear space processing. From the perspective of information, more important cognition knowledge can be picked out to enhance the discriminative power of the compact feature space. At the same time, hierarchical labeled confidence thresholds are set for the semi-supervised mechanism in [
9] to realize feedback adjustment. However, such a feedback mechanism is still quite different from the human cognition mechanism. In fact, a hierarchical feature space can be constructed by considering different granular levels of information in feature selection, and error feedback adjustment would be realized to obtain a distributed cognitive knowledge space so as to effectively improve the system performance.
Therefore, to expand our previous work, the technical contributions in this paper are summarized as follows: (1) proposing a greengage grading model with dynamic feature and ensemble networks to improve the accuracy of the existing methods, (2) introducing an SCN-based bagging network model to enhance the robustness of the greengage grade classifier, and (3) constructing the feedback regulation criteria based on the classified accuracy and CNN level to imitate the human cognition mechanism with repeated comparison and inference from macro to micro. First, a cognitive architecture for greengage grading with an adaptive error feedback mechanism is established to imitate the human cognition mechanism, and the functions of each layer are analyzed. Secondly, an optimal dynamic expression model of a convolutional feature is established, and then an ensemble deep SCN is constructed to realize the optimal representation of greengage images with sufficiency and separability. Third, the cognitive error of the greengage grade is represented with the form of entropy, and then the regulation criteria of the feature level and feature efficiency are established based on the constraint of cognitive error entropy. Ultimately, the intelligent greengage grading algorithm based on dynamic feature and ensemble networks is given to imitate the intelligent human cognition mechanism with repeated comparison and inference from macro to micro. Finally, numerous experiments with comprehensive comparisons are carried out based on random greengage images. The experimental results demonstrate the effectiveness and superiority of our method compared with existing open-loop algorithms.
2. Framework of the Cognitive Model for Greengage Grading Based on Dynamic Feature and Ensemble Networks
Targeting the problem that a significant difference exists in the traditional open-loop model for automatic greengage grading and the human information processing mechanism with repeated comparison and inference, a novel cognitive model for greengage grading based on dynamic feature and ensemble networks is proposed in this paper. With our cognitive model, the cognitive knowledge for greengage grading is dynamically and hierarchically represented with sufficiency and separability to realize the repeated cognition of greengage samples in a finite domain. The framework of the proposed model is shown in
Figure 1. A three-layered interconnected structure, comprising a training layer, cognitive layer, and feedback layer, is adopted to achieve real-time information interaction between training and cognition.
Based on the parameters of the feature level and maximum entropy given by the feedback layer, the convolutional feature space of the training greengage images with sufficient information is dynamically modeled. Based on the parameter of feature efficiency issued by the feedback layer, an information system for greengage grading with separable features with a determined feature level and feature efficiency is established. Based on the bagging algorithm, the ensemble SCN classifier is constructed to obtain the learning results of the training space for greengage grading, and then the integrated errors are backpropagated to optimize the model parameters for greengage grading with a determined feature level and feature efficiency overall. The classification rules are ultimately established for greengage grading within the cognitive layer.
According to the feature modeling and classification rule construction provided by the training layer, the optimal feature space of the testing greengage images is dynamically established so as to obtain uncertain cognition results for greengage grading with a determined feature level and feature efficiency. The heuristic comparison knowledge within the feedback layer is provided to evaluate the uncertain cognition process and the results for greengage grading.
Based on the knowledge information provided by the cognitive layer and to imitate human cognition mechanism, the indexes in the form of an entropy function are constructed to measure the credibility of the cognition results of the test database. The feedback cognition mechanism for greengage grading is constructed within the entropic constraint of the cognitive error, and then the network level and the classified accuracy, which represent the feature level of the interlevel and feature efficiency within the hierarchy, respectively, are self-optimizing and regulated to achieve fast and accurate cognition macroscopically for the samples near the clustering center and the hierarchical feedback cognition microscopically for the samples near the classification surface with a finite domain.
4. The Intelligent Mechanism with Feedback Cognition for Greengage Grading Based on the Entropic Constraint of the Cognitive Error
The traditional machine cognition is generally open loop; that is, with the above trained feature extraction and ensemble cognition model, the corresponding cognition result of the testing database can be obtained. However, due to the randomness in the process of image sampling, feature extraction, and model training, the cognition and decision-making for greengage grading are uncertain. Therefore, the traditional open-loop method lacks evaluation of the cognitive result.
4.1. The Error Representation for Greengage Grading Based on the Entropy
The cognitive results for greengage grading with a determined feature level and feature efficiency should be measured according to the obtained greengage grades of the testing samples and the relative information of the training samples with the corresponding labels. The semantic information system of the cognitive error for greengage grading is constructed based on [
24]. Then, the probability knowledge model for cognitive result evaluation can be established.
By assuming the current wth feedback cognition process with and , for the input testing dataset of greengage image , its corresponding grade label would be obtained, where is the tth grade label of and .
To measure the performance of the cognitive result under the current conditions, the semantic information system of the cognitive error for greengage grading for the testing sample is constructed as , where is the dimensional semantic domain of the cognitive error for greengage grading between and the corresponding training samples with the same class (the gth category) as the grade label , and is the dimensional semantic matrix of the cognitive error for greengage grading for in the current process .
Regarding
, readers may refer to our previous work [
25] for details. Here,
is an
matrix, which represents the performance of the cognitive result for
with the current model in the semantic space. Based on the equivalence relationship, the quotient set
can be gained by dividing
by
, where
is the
th equivalence class,
, and
. It denotes a larger error in the current cognitive process for
, with more elements in
and vice versa. Therefore, from the information theory, the cognitive process can be represented with an entropy function. The probability density function of the cognitive error distribution in the domain for the current process can be defined as in Equation (6):
The corresponding entropy of the above probability distribution, namely the cognitive error entropy for greengage grading of the sample
during the
wth feedback cognitive process with
and
, is calculated as
In Equation (7), a smaller indicates that the smaller uncertainty of . Therefore, the cognition error of the testing sample in the current cognition process is smaller and vice versa. Accordingly, the arbitrary regulation of and to make extremely small in the feasible region is our goal for optimal cognition.
4.2. The Feedback Regulation Mechanism of the Feature Efficiency and Feature Level Based on the Cognitive Error
The calculation of the semantic error entropy for greengage grading quantitatively represents the system performance of the cognitive result with the determined feature level and feature efficiency. Thus, in this paper, is calculated to correlate the training and testing processes. Furthermore, and are used as the regulative indexes of the model. The intelligent cognition for greengage grading with imitating the repeated comparison and inference would be realized though increasing the information level and controlling the classification quality.
In fact, the final cognitive result of a testing sample can be output with the cognitive performance that meets the target; otherwise, the feedback cognition is needed. Therefore, for the input testing dataset in the wth feedback cognition process with and , the sub-sample set is constructed first with the process which meets the target and outputs the cognitive result, where is the th sample obtaining the grade label in and . In this way, the samples with the process which could not satisfy the target currently and the corresponding calculation information can be extracted to reconstruct the testing dataset according to the instruction . Then, the optimal regulation of the feature level and feature efficiency can be achieved based on the reconstructed testing dataset. At this moment, the domain of the testing dataset involving parameter regulation is updated to .
Specific to the regulation of the feature efficiency within the level, with non-uniform regulation is more in line with the human cognition mechanism. In this paper, the incremental calculation model of classified accuracy is constructed based on , and the feature efficiency is adaptively regulated with the entropic constraint to enhance the fault tolerance and generalization of the model with a finite domain.
Suppose there is a current
wth the feedback cognitive process with
and
, and the calculated
of
when the feature level
; that is, the model level of the CNN remains unchanged. Then, the increment of the classified accuracy in the
th feedback cognitive process is defined as in Equation (8):
In this way, the regulation of the feature efficiency of the system in the
th feedback cognitive process should abide by Equation (9):
In this way, decreases with the increased , which is closer to the sensory characteristics of human cognition from macro to micro.
Specific to the regulation of the feature level, as can be seen from the CNN calculation process, more hierarchical knowledge of greengage image can be extracted with the larger , while the computation will also increase greatly. Therefore, it is generally desirable to obtain a relatively comprehensive feature space with the smallest feature level.
Suppose there is a current
wth feedback cognition process with
and
. If the cognitive error of the current system cannot meet the constraints of the entropy index along with repeated regulation of
, the optimal model parameters in the current level are reserved, and the regulation of the feature level in the
th feedback cognition process should abide by Equation (10):
Thus, the deeper level of sample knowledge is mined to re-represent the greengage image.
6. Results and Discussion
To validate the performance of the proposed method, 3000 greengage images with a size of 56 × 56 were selected to build a sample database, including 5 grades with superior products, good products with scars, defective products, defective products with scars, and rotten products, which were used to carry out the simulation experiments. Then, 2500 greengage images were randomly selected as the training dataset
, and the remaining 500 greengage images were taken as the testing dataset
for 500 simulation experiments. Some samples of greengage grades are shown in
Figure 4. The actual grades of the greengage samples are labeled by multiple sorters. All sampling experiments were run in MATLAB R2014b on a computer with a 2.90-GHz Intel Core i5-3380M processor and 4G memory. After many experimental attempts and a literature review, the expected error tolerance
, the maximum times for feedback cognition
, the maximum number of convolutional feature maps
, the maximum depth of the feature level
, the minimum increment of the classified accuracy
, the network parameters of the bagging SCN
, the subnetwork number of SCNs
with a search step size of 1, and the number of SCN hidden layer nodes
with a search step size of 5 were selected as the preset parameters for the simulation experiments to find the most favorable performance.
Figure 5 shows the cognitive accuracy of the greengage grade
for different parameters of the bagging SCN classifier, where
,
,
, and
. As can be seen in
Figure 5a, the bagging SCN classifier had the global approximation capability of nonlinear mapping, and each hidden node in the network matched the different image features. Thus,
would enhance with an increase in
when
. However, the cognitive performance may have been deteriorated with overfitting caused by the excess basis functions in the base network. That aside, each point in
Figure 5b was obtained when the best
value was used. As can be seen in
Figure 5b, the adoption of the ensemble method could effectively enhance the reliability of the classification model to obtain a cognitive result with more robustness. However, not all
values were appropriate. Having excessive basis functions not only did not improve the recognition accuracy, but it also incurred an additional computational cost. In our study, 6 SCN networks with 40 basis functions were sufficient to construct a reliable ensemble model.
Figure 6 shows the average cognition accuracy ρ for different training dataset domains
with convolution feature extraction using our information entropy-based method and other fixed feature map-based methods (
,
,
, and
) in the open-loop experiment, in which the feature level
and fixed correspondence parameters were taken as an example. The information quantity required for classification increased with the sample domain, but the feature extraction method based on fixed feature maps obviously did not take this into account. Therefore, as indicated by the broken lines in
Figure 6, the system performance was unitarily poor with
due to the small quantity of extracted feature information. When
was 6, 12, and 18, relatively sufficient image information was extracted in a certain domain to improve the cognitive accuracy to a certain extent. However, for the cognitive problem within a limited domain, excessive extraction of feature information would lead to a deterioration in system performance, resulting in overfitting. As shown in
Figure 6, when
,
, and
, a better adaptation effect could be obtained around
,
, and
, respectively. As shown by the solid line in
Figure 6, our proposed method always built the feature space based on the maximum information quantity, so it had better performance for the classification with different domain sizes, especially in the large sample domain.
Figure 7 shows the cognitive accuracy of the testing dataset for different feedback cognition numbers
with other fixed parameters in a closed-loop experiment. The coordinates of
,
,
,
, and
in the figure correspond to the system performance with the feature level
, respectively. The cognitive results under the
level were obtained based on the optimal parameters with the
level. From
Figure 7, in the determined feature level, the feature appropriateness for the samples with a finite domain was controlled by regulating
to improve the cognitive performance. The overall performance of each feature level correspondingly improved with the increasing
value, which was due to the extraction of multi-level cognition knowledge from global to local through increasing the feature level during CNN modeling. However, when
was close to
, limited by the image size, and influenced by the image quality, a large amount of invalid and faulty information was added into the feature space, resulting in misclassification, and the computational complexity increased sharply with an increase in
. As a result, the system performance would be affected by deterioration since
.
To prove the effectiveness of our method, the performance of several cognition methods were compared, including dynamic CNNs + Ensemble-RVFL [
8], dynamic CNNs + SCN [
9], dynamic CNNs + RVFL, a traditional CNN, color feature + quadratic discriminant analysis (QDA) [
26], and Gabor wavelet + color moments + support vector machine (SVM) [
27]. The average cognition accuracy and the average test time are listed in
Table 1. All the comparative results are expressed as the mean ± standard deviation.
From
Table 1, the following observations can be made.
The proposed greengage grading algorithm was effective and feasible, with an average cognition accuracy of 97.62%. The feedback cognition algorithm imitated the information interaction process of human cognition with repeated comparison and inference. Based on the entropy index, the credibility of the cognitive process and results for greengage grading were measured and constrained to regulate the feature level and feature efficiency, which realized the self-optimizing construction of the cognitive feature space and classified criteria for greengage grading in the sense of pattern classification. Therefore, the performance was better than that of the traditional open-loop cognition mode.
In addition, the algorithm complexity could be evaluated by the running time. The cognitive results of the greengage images with obvious features which met the index requirements could be obtained at a lower feature level and feature efficiency. However, for those similar samples near the classified surface, the cognitive results were gained by repeated cognition from global to local with the cognitive error calculation to dynamically optimize the cognitive criterion in the sense of pattern classification. In fact, this caused a lack of real-time performance under the premise of improving the cognitive accuracy. However, the overall system performance was better with the condition of a finite domain.