# Disease and Defect Detection System for Raspberries Based on Convolutional Neural Networks
## 4 Results
### Conceptual Test  
A quantitative conceptual test is performed with eight images of raspberry trays. The software was developed with the individual trained object-detection models was implemented on a laptop connected to the equipment with the following characteristics: i7-9 th Gen processor 128 GB SSD/1 TB HDD, 16 GB RAM, NVIDIA GTX 1660 Ti 6 GB. The process is started by selecting a sample raspberry tray, then it is placed inside the equipment and the RGB image capture system is activated. Next, the developed program that processes the image is launched. 1. A window with the image of the original unprocessed raspberry tray opens
2. Starts the image processing with each of the modules trained for each of the classes to be studied. 3. Once the image processing is done, a window opens for each of the classes defined with the image of the raspberry tray with a \"box\" around the raspberry of the detected class with a \"label\" with the name corresponding to the detected class. 4. Above the image in the window the class and the number of objects of that class detected by the model are indicated. The results before process was performed over the image of tray-1 (Figure 15) are divided as follows: Figure 15a detects 105 raspberries of the class _Albinism_; those of the class _Fungus-Rust_ are shown in Figure 15b, showing that 2 were detected; Figure 15c corresponds to the class _Peduncle_ with 2 detected; and finally Figure 15d shows the class _Overripeness_ with 9 detected. The entire raspberry tray image evaluation process takes an average of 30 s, which is a substantial improvement over the manual evaluation process that is the current industry standard, which takes approximately 5 to 10 min. Figure 14: Flowchart of raspberry tray quality assessment team workflow. Figure 16 shows the confusion matrices of the results for each of the images of raspberry trays used in this test. Figure 15(a) shows the confusion matrix resulting from the evaluation of tray-1. The diagonal, highlighted, represents the number of hits or the raspberries correctly detected and labeled by the system. The system managed to correctly detect 105 raspberries with albinism out of the 110 visually counted, with a precision of 95.5%. There are no raspberries with fungus-rust. The peduncle class with two correctly detected obtains 100% precision. Finally, the overripeness class detected nine correctly and two not detected, achieving 82% detection precision. Figure 15(b) corresponds to tray-2. This tray does not contain raspberries of the classes fungus-rust, peduncle and overripeness. Effectively the models did not detect raspberries of this class. The albinism class detected in 14 of 16 raspberries, achieving a precision of 87.5%. In the confusion matrix corresponding to tray-3 (Figure 15(c)) there are no raspberries of the classes fungus-rust, peduncle and overripeness. Of the albinism class it detected 9, which was the total of those present, giving a precision of 100%. The confusion matrix in Figure 15(d) corresponding to tray four does not have raspberries of the Moho-Fungus class. It is observed that nine of the albinism class were detected and one was not detected, obtaining an accuracy of 90%. The raspberries with peduncle were all detected, 5 in total, achieving an accuracy of 100%. The overripe class detected 12 correctly, and 2 were not detected with an accuracy of 85.7%. The confusion matrix corresponding to tray-5 is shown in Figure 15(e). It can be seen that it classified or detected four raspberries as albinism correctly and 2 were not detected. The classes fungus-rust and peduncle show no elements in this tray of raspberries. Finally, the overripeness class managed to detect 11 and failed to detect four at this point. We observe for this image a decrease in the percentages of accuracy with respect to the previous images in the case of albinism and overripeness. Figure 15: Images of the results of raspberry detection according to classes in the image of raspberries corresponding to tray-1.