Many countries encourage their populations to use public urban transport to decrease pollution and traffic congestion. However, this can generate overcrowded routes at certain times and low economic efficiency for public urban transport companies when buses carry few passengers. This article proposes a Public Urban Transport Scheduling System (PUTSS) algorithm for allocating a public urban transport fleet based on the number of passengers waiting for a bus and considering the efficiency of public urban transport companies. The PUTSS algorithm integrates artificial intelligence (AI) methods to identify the number of people waiting at each station through real-time image acquisition. The technique presented is Azure Computer Vision. In a case study, the accuracy of correctly identifying the number of persons in an image was computed using the Microsoft Azure Computer Vision service. The proposed PUTSS algorithm also uses Google Maps Service for congestion-level identification. Employing these modern tools in the algorithm makes improving public urban transport services possible. The algorithm is integrated into a software application developed in C#, simulating a real-world scenario involving two public urban transport vehicles. The global accuracy rate of 89.81% demonstrates the practical applicability of the software product.