## 5 Results and Discussion  
In this work, we presented a new database of red raspberries in a tray using RGB images to detect their quality in industrial applications. This database was evaluated using three well-known methods in order to estimate its classification performance, with promising results that can be implemented in real-time systems. Two statistical-based learning methods are coupled with a classical ANN, and the other one uses a Faster R-CNN method. As a first instance, the classification is based on a binary learning system between a healthy raspberry vs. a raspberry with a disease or defect. Please note that the defective raspberries were labeled previously using a bounding box as follows: 786 albinism disease labels, 164 fungus rust disease labels, 115 over-ripeness defect labels, and 244 peduncle defect labels. This section shows the results and discussion when applying the experimentation from Section 4 using 90% for the training set, and 10% for testing.  
Figure 10: The methodology used in the Faster R-CNN modeling for each disease and defect. The Faster R-CNN approach extracts its own parameters directly from the image as a set of arrays called feature maps, these maps are composed of four main components: a filter bank called kernels, a convolution layer, a non-linearity activation function, and a pooling or subsampling layer. Second, the proposed regions of the network are estimated. The feature maps and the region proposal together are the ROI pool predictors, which are used to classify and detect fruit quality for each layer. The Output is the class raspberry healthy (\(\mathbb{C}_{1}\)) or the class raspberry defective (\(\mathbb{C}_{2}\)).  
Figure 9: The methodology used in statistical modeling for each disease and defect. Generalized extreme value parameters are the statistical predictors such as scale (\(\sigma\)), shape (\(\kappa\)), and location (\(\mu\)). They are the inputs to be classified using a neural network. The output is the class raspberry healthy (\(C_{1}\)) or the class raspberry defective (\(\mathbb{C}_{2}\)).  
For the statistical-based learning methods, the bounds found are very interesting. For descriptive statistics, the bounds based on the median and variance allow us to differentiate between the diseases studied, while the thresholds based on the defects are not very clear. This may be because their bound values share part of the healthy raspberry values of the fruit. Similar results occur with statistical modeling using the generalized extreme value distribution. In general, all the parameters based on their bounds for a binary learning system allow differentiating between a healthy raspberry vs. a raspberry with disease or defect. Except for the shape (\(\kappa\)) parameter for the peduncle, and the scale (\(\sigma\)) parameter for the two defects. These results can be corroborated in the predictor ranking from Section 5.3. It is important to emphasize that the feature ranking test can vary between the different classes. This suggests that in the case of using the two most representative features as predictors, they must be different between classes. These results are in tune with the results of our previous work [2]. In this work, we found that different network architectures can be used to detect different raspberry diseases or defects. Another topic of interest in using statistical methods is the importance of bounds for the features. Because identifying the learning boundaries helps to ensure the success of model learning, by having a coverage limit, then it is possible to guarantee both the proper initialization of the population and the maintenance of the necessary learning time to yield the necessary outcomes. A big plus of CNNs is that they learn directly from data, eliminating the need for manual feature extraction, with highly accurate results during the classification and detection stages.