Artificial intelligence for swimming pool management
Tekniker has developed a unique real-time tool that counts how any people are using indoor swimming pools and improves how facilities are managed.
AI models have not only been designed to deliver highly complex and sophisticated solutions. Thanks to automatic learning techniques such as Deep Learning (i.e., in-depth learning based on convolutional neural networks - CNN), it is possible to obtain solutions that can perform, speed up and enhance routine tasks like counting people in a swimming pool and improve energy management.
The Tekniker technology centre, a member of the Basque Research and Technology Alliance (BRTA), has employed AI techniques within the framework of the Ecopool project to create a Deep Learning model embedded in a high-performance mini-PC that counts how many people are using an indoor pool on a real time basis.
More specifically, the resulting Deep Learning model is applied in the field of pool management to obtain a real-time estimate of how many people are using an indoor pool so that, as a function of the results obtained, water temperature readings can be generated in order to use less reagents and reduce the amount of power required for water purification purposes.
During the Covid-19 pandemic, the system has also been able to measure visitor-capacity at public and private pools.
Developing and training the system
With a view to developing this technology, the centre has followed a methodology that set out by generating a new data set that provides high resolution images. Similar data sets were searched to increase its variability as well to generalise and reinforce how the trained convolutional neural network responds.
“We have not found many references on public datasets regarding the number of people using swimming pools, although the instance closest to the problem addressed by Ecopool is associated with Lifeguard-io, a project that can detect individuals that are drowning and uses computer viewing techniques as well as Machine Learning, which is why we felt that we had to generate our own dataset to address this problem” explains Aitor Gutiérrez, a Tekniker researcher.
In an attempt aimed at generating a people-counting model that can calculate for how long people swim, images are been labelled on which the presence of an object has to be indicated, a person in this instance, to allocate a label to said object.
“We have used the open-source software tool LabelImg that allows us to label images quickly and intuitively”, remarks the Tekniker researcher.
Due to the fact that the image data set we had at our disposal was small in terms of variability, our expert teams focused on data augmentation, a technique that generates new data to improve the training of the neuronal network of the Deep Learning model by introducing a number of disruptions and variations in the original images such as scaling and rotations. Both the classical augmentation approach as well as other more advance techniques based on generative adversarial networks (GANs) have been applied.
Once the basic architecture for the training object detection Deep Larning models has been selected, one of the most important steps taken in the creation of this technology consisted in correctly defining its different layers and selecting and adjusting training parameters know as hyperparameters.
As regards the solution developed in Ecopool, the models were been trained on two systems featuring different computational capabilities. On the one hand, a PC equipped with a dedicated graphic card for the training of models at Tekniker’s was used to train the model in a local system. And, on the other, a cloud machine was hired to be used for model training purposes in a server with superior computational features.
This system has allowed Tekniker to develop a totally new specific solution that is based on technology that has performed successfully in other scenarios.
The following organisations are involved in the Ecopool project: Tekniker, the engineering firm Dinycon Systems, the Gaiker technology centre Gaiker and another company called Giroa.