## 3 Materials and Methods
### Videometry  
Our dataset is based on the images from the video monitoring system of Castelldefels beach [30] (Barcelona, Spain) and on the weather data from a weather station of Meteocat (Meteorological Service of Catalonia) [31].  
The Castelldefels beach is a 5 km long strip of sand located in Spain around 18 km away from the south of Barcelona, between the delta of Llobregat river and the Garraf Massif. People usually visit the beach to swim in the calm waters of the Mediterranean Sea, sunbathe, do water sports or activities with children, or just walk along the shoreline. In Castelldefels, the prime bathing season is from 1 June to 31 August. Castelldefels is a popular destination for Spanish holidaymakers; it has an excellent location, close to Barcelona City, which is considered within the world ranking among the 20 most visited cities by foreign tourists [32] and among the 10 most visited cities in Europe [33]. The Barcelona metropolitan area, with a population of over 5 million, is the most populous urban area on the Mediterranean coast and one of the largest in Europe. The beaches of the Barcelona metropolitan area are visited each year by 10 million people, who spend (directly or indirectly) almost 60 million euros during the prime summer season [34]. The most visited beaches during the summer for the north metropolitan area of Barcelona are Sant Adria, Badalona, and Montgat, and for the south metropolitan area are Gava and Castelldefels. We selected Castelldefels beach due to its popularity, the presence of a video monitoring system that has operated at Castelldefels beach since 5 October 2010, and the location of our campus, the Castelldefels School of Telecommunications and Aerospace Engineering (EETAC-UPC) (Barcelona-Tech University), 10 min away from Castelldefels beach.  
Coastal ecosystems require continuous observation, which is achieved by means of coastal video monitoring. Remote sensing techniques offer cost-efficient, long-term data collection, with high resolution in time and space. Shore-based video systems enable automated data collection, encompassing a much greater range of time and spatial scales than previously possible. Video systems are very useful for automatic shoreline detection and data analysis [35] and intertidal [36] and subtidal bathymetry. Shore-based video monitoring systems are also very useful for breaking-wave height estimation from digital images [37]. In our case, the video monitoring system of Castelldefels beach consists of five video cameras located at the tower in Plaza de las Palmeres, 30 m away from Pineda beach in Castelldefels (see Figure 1). An example of the images captured by the five video cameras is displayed in Figure 2.  
Figure 1: Video monitoring system of Castelldefels beach (Barcelona, Spain).  
Figure 2: Example of the images captured by the five video cameras.  
Images have been collected since April 2010 using SIRENA software developed at IMEDEA (CSIC), and they are publicly available on their website [30]. The scientific exploitation of the images is a joint agreement between the Coastal Ocean Observatory [38] of the Institut de Ciencies del Mar [39] ICM-CSIC and the Coastal Morphodynamics group (UPC-Barcelona Tech University). Every daylight hour, the cameras take one picture per second for a ten minute period; in our work, a snapshot image was used to count the number of beach visitors per hour from 9:00 to 19:00 h during June, July, and August (prime bathing season) from 2016 to 2018 using an image recognition software named \"CountThings\" [40].