Specifically, the resulting Deep Learning model is applied to swimming pool management to determine the number of bathers in indoor pools in real time and, based on the data obtained, control the water temperature, reduce the use of reagents, and limit the energy needed for water treatment.
Furthermore, the system will facilitate the task of measuring the capacity of these public and private spaces during the Covid-19 pandemic.
System Development and Training:
To develop this technology, the center followed a methodology that began with the generation of a new dataset of high-resolution images. To increase its variability, a search was conducted for similar datasets to generalize and strengthen the response of the trained convolutional neural network.

“We haven’t found many references to public datasets of people in swimming pools, but the closest to Ecopool’s problem is the one provided by Lifeguard-io, a project for detecting drowning people that uses computer vision and machine learning techniques,” explains Aitor Gutiérrez, a researcher at Tekniker. “Therefore, we had to generate our own dataset tailored to the problem.”
To generate the people-counting model and calculate the duration of each swimmer’s time in the pool, we labeled the images. This involves indicating the presence of an object in an image—in this case, people—and assigning a label to that object.
“We used the open-source software tool LabelImg, which allows for quick and intuitive image labeling,” adds the Tekniker researcher.
Because the available image dataset was small in terms of variability, the team of experts focused on data augmentation, a technique that generates new data to improve the training of the deep learning model's neural network by introducing certain perturbations and variations into the original images, such as scaling and rotations. Both classic augmentation techniques and more advanced ones based on generative adversarial neural networks (GANs) were applied.

Once the base architecture for training the object detection Deep Learning model was selected, one of the most important steps in creating this technology was the correct definition of its different layers and the selection and adjustment of its training parameters, known as hyperparameters.
In the case of the solution developed in Ecopool, the models were trained on two systems with different computing capabilities. On the one hand, a PC with a dedicated graphics card, located at Tekniker's facilities, was used for local model training. On the other hand, a cloud-based machine was contracted for model training on a server with superior computing capabilities.
With this system, Tekniker achieves a specific solution that did not previously exist and is based on a technology successfully applied in other scenarios.
The Ecopool project involves the participation of Tekniker, the engineering firm Dinycon Systems, the technology center Gaiker, and the company Giroa.