In Barcelona, Transports Metropolitans de Barcelona (TMB) already counts the number of passengers on each bus in real time, according to TMB Notícies. The new analysis tool is presented as a further step towards an intelligent bus service, with the aim of improving service quality and efficiency on the bus network.

How the system works

The project applies artificial intelligence to images captured by more than 4,500 video surveillance cameras that cover the entire bus fleet. According to TMB Notícies, the system was developed by TMB's own bus technology team, with support from external suppliers specialised in artificial intelligence.

To estimate occupancy as accurately as possible, the camera analysis is combined with other data sources that buses already provide, such as ticket validations, surveys, passenger alarms and video counting. The models have been trained, their results audited and they are retrained on an ongoing basis to keep the data reliable.

Uses for passengers and maintenance

TMB Notícies states that the figure calculated in real time can be used to improve how services are regulated and how information is given to passengers. The system also checks the cameras themselves, detecting devices that are not working correctly or are poorly aimed, with the goal of optimising camera repair times.

Part of wider innovation

The passenger count is one of several projects under way at TMB. Another is a pilot that uses artificial intelligence on cameras to detect vehicles invading bus lanes. The innovations were explained during the Tomorrow Mobility World Congress 2026, which is being held in Barcelona.