# Deep Learning-Based Method for Accurate Real-Time Seed Detection in Glass Bottle Manufacturing
## 4 Results  
The system has been validated through a set of tests. The objective of the tests is twofold. On the one hand, it is needed to ensure that the system works correctly, without errors occurring in 24/7 operation and in real time processing. The proposed algorithm presents several stages and each of them adds additional time, being especially higher when the glass is dirty, and the number of potential candidates increases. The deep learning-based model for final classification of the candidates takes longer as it has to make a higher number of predictions. On the other hand, it is necessary to validate the performance of the proposed method and to verify the correct detection of seeds and correct rejection of the other elements. Objective comparison with the current laboratory seeds counting procedure available in the Vidrala site is not possible, strictly speaking, as both methods count seeds differently. The automatic seed detection system inspects a fixed region in the bottle as it passes in front of the capture line of the camera, as explained before. The results are displayed on the user screen through graphs. Likewise, three values are estimated and recorded: seed  
Figure 12: Main panel of the user interface of the application. density value for each bottle, mean value per 100 bottles and hourly mean value. In the laboratory, it is not possible to analyze 100% of the production, so the usual practice consists of inspecting a discrete and random set of bottles (less than 10) every day, normally in the morning. These bottles are inspected with a linear system available in the laboratory (in the Aiala site) or through destructive techniques (in the Castellar site) which allows the inspection of part or all of the surface of the bottle. Through this procedure the values of seeds per kilo (for small ones) and blisters per ton (for large ones, side > 1 mm) are obtained. Both values, the one obtained by the automatic system and the laboratory one, are not strictly comparable because neither the same bottle nor (even if it were the same bottle) the same inspection zone are inspected. Therefore, to assess whether the system is doing it right or wrong, it is necessary to review one by one the images captured by the system and the real bottles grabbed in those images. In order to carry out this verification of operation in an objective manner, a procedure was established that allows the reality of each bottle to be compared with that estimated by the system. This procedure has included the following steps:  
* A set of dark colored bottles and model 1117/242 has been selected (specifically, 10 bottles have been selected from a larger initial set);
* The bottles have been inspected by the system, in which the original and processed images have been stored;
* An expert of Vidrala has reviewed the processed images and has indicated how many seeds are correctly annotated, how many of them are false, and how many seeds the system has not detected. In case of doubt, the expert has the possibility of checking the original images, as well as the real bottles, to establish whether a seed is large or small (1 mm on a side);
* These values have been compared with the results obtained by the system;  
This procedure has been repeated for two situations:  
* System with baseline approach, that is, classical image-based solution;
* System with new approach with the deep learning-based classification model. In this way, it will be possible to conclude whether the deep learning-based model has added value over the baseline and also to quantify the real provided improvement. For each of the 10 bottles, 10 passes were made, 5 for each face, in order to also verify the repeatability of the system. The difficulty in placing the bottles on the tape in the same position for each iteration means that the exact same area is not seen in the 5 images that correspond to the same side, although it is very similar. Said dispersion has not been quantified, although it has been considered that the system presents high repeatability.