# Deep Learning-Based Method for Accurate Real-Time Seed Detection in Glass Bottle Manufacturing
## 1 Introduction  
The introduction of digital tools that allow the automation of tasks in manufacturing processes is a big challenge and non-trivial issue. The benefits are clear and diverse. Digitalization is therefore ongoing in many industrial manufacturing processes, but there is still a long way to go. Some of the processes that are often automatized are those ones that try to reproduce visual assessments in an objective and repetitive way at high speed. This allows for the assessment and inspection of certain objects with a high degree of precision and accuracy over 100% of production, a process that would require a lot of time for a human being to execute. At the same time, image processing and deep learning techniques have experienced a good level of acceptance in recent years since they have enabled us to tackle some of these challenges. Many computer vision-based applications can be found in the literature for solving different problems in different application fields [1, 2, 3, 4, 5, 6]. Manufacturing of glass bottles is already a fairly automatized process that still presents some challenges ahead. Glass bottle manufacturers often produce bottles of different colors, shapes and diameters. One of the identified problems is that seeds can appear in the bottle during the manufacturing process, mainly due to the temperature and parameters of the oven. The control of the presence of seeds is important for two reasons. The first reason is the quality of the manufactured element. Drinks manufacturers do not want to sell their products in packages with defects. The second reason is a matter of energy efficiency. If some seeds appear in the glass and their presence increases over time, it is necessaryto modify the parameters of the oven to give the bottles the desired quality. Generally speaking, the temperature parameter of the oven should be adjusted to the optimum value so as to manufacture bottles of good quality, on the one hand; and on the other hand, it is advisable not to exceed in energy consumption since it has a high impact on the energy bill. If the temperature of the oven decreases too much, the consumption will be lower, but a higher number of seeds may appear. If the temperature of the oven is very high, the quality of the bottles will be excellent, but there may not have been an efficient use of energy. A compromise must be achieved between these two situations. The seeds can be categorized into two different types according to their size: seeds mainly refer to small-sized elements, and big-sized seeds are named blisters. Therefore, the availability of tools that may detect the presence of seeds and blisters in the glass are more than welcome. If these tools can differentiate among seeds and blisters and count their number in terms of process indicators, it can contribute to a great improvement in control over the process. In this work, a new system is proposed whose purpose is to automatically detect the presence of seeds and blisters during the manufacturing process of the bottles. The system can categorize the defects in seeds and blisters according to their size. The system is integrated into the manufacturing line and automatically inspects 100% of the production to locate seeds of up to 0.1 \(\times\) 0.1 mm\({}^{2}\) that appear during the manufacture of glass bottles. The system has been validated in three production lines of different sites of Vidrala group, one of the biggest glass bottle manufacturers in the world, and over bottles with a wide variety of size, color and diameter. This production line has a maximum cadence of 250 bottles/min, with a line speed of around 50 m/min. A first version of the system was deployed in 2017. After three years, in 2020, although the system was performing reasonably well in two production sites (Aiala and Castell manufacturing sites), Vidrala asked to improve software robustness, mainly in distinguishing seeds from grease stains, which sometimes causes false positives.