# On the Track to Application Architectures in Public Transport Service Companies
## 4 Current State of Use-Cases from Different Transportation Service Providers
### Use Case--Passenger Counting at BVB  
Basler Verkehrs-Betriebe (BVB) operates a network of more than 180 km in the city of Basel. With 85 streetcars and almost 90 buses, nearly 340,000 people are transported daily. This makes BVB the largest partner of the public transport association of northwestern Switzerland (TNW), which provides its customers with barrier free transport to various cantons as well as to the neighboring countries of Germany and France. As a TNW partner, BVB is obliged to record passenger counts in order to determine the percentage of total passengers carried within the TNW network to receive the associated financial compensation. This data is currently collected using light barriers in the infrared spectrum. The optical barriers are interrupted upon passing the entrance and can thus measure and count the number of direct movements into or out of the vehicle. This simple but reliable method is not capable to recognize different object types as bikes or wheelchairs or to detect passenger movements that do not follow the previously described simple movement pattern. Regarding the TNW application purpose mentioned at the beginning, these additional possibilities are not crucial and therefore not desirable for the business at present. An initial analysis of purchasable solutions to solve such complex visual tasks within the CD Learning and Perception was unsuccessful. One of the main reasons behind this fact is that the software supply for the public transport sector is largely monopolized by a handful of software providers. Consequently, emerging technological trends such as AI-based systems are not always immediately available. Thus, the only option left is to develop the systems internally. Yet the small to medium-sized public transport companies are not in a position to achieve a TRL above 7, nor are their internal IT departments. Missing R&D teams and a not fully implemented AI-SDLC lead to that fact. After consultation with the management respectively the FHNW, BVB was able to find a possibility to conduct such a project as a bachelor thesis [18,19]. Thereby a proof of concept of a TRL 6 level should be created to initiate the awareness in the management for AI and its feasibility in the domain of efficient rail operations. In the run-up to the project, it already became evident that visual sensors used in public spaces in Switzerland face serious obstacles. Due to data protection laws, it is not possible to transfer image data from the public space to a central computer system. Therefore, the first step was to find a way to perform the computationally intensive computer vision tasks in a distributed manner at the edge of the network inside the vehicle. This architecture would allow AI systems to be employed for advanced analytics, despite the legal obstacles. Fortunately, in 2019, various embedded systems optimized for AI operations have been introduced. Furthermore, AI libraries such as TensorFlow or Pytorch were available, which facilitated the development of AI applications. After various discussions with experts from different departments involved in passenger counting at BVB along with use case specific observations, the appropriate setup for the project was defined. The Coral Dev Board produced by Google was chosen as the hardware, together with the suitable AI library TensorFlow Lite. For the subsequent selection process regarding the object recognition model, all available scanners were assessed. The assessment included test cases with the individual models with simulated images from the vehicle. Thereby it soon became evident that both the accuracy of the detection but also the performance of the entire model plays a crucial role when it comes to development on an integrated system. This development approach is consistent in most respects with the AI-SDLC process proposed in Figure 2, except that due to BVB's smaller organizational size, most activities were conducted within a single traditional Software Engineering department, in partnership with the business.