Abstract. In the logic of Smart Cities it is of fundamental importance to analyze the traffic situation through dedicated sensors and networks. According to this approach and through the potential of smart data is based this study. Improve prediction of traffic patterns by analyzing and counting vehicles in a virtualized scene in real time. In the past, the technique of hardware inductive coils was used that were dropped in the asphalt to exploit the principle of magnetic induction in order to verify the transit of vehicles. This technique is not able to classify vehicles or estimate their speed, unless using multiple inductive coils. The proposed system provides for the virtualization of an area of interest which requires a selection and mapping of the areas where the control areas are to be included. The “image detection” techniques allow us to classify the vehicles in transit. With the techniques of “machine learning” can to able to verify the flow, count the vehicles present in the scene and classify them by vehicle type in real time. The vehicle counting and classification data available in the cloud platform allow to model and update the main nodes of the network in order to improve the prediction and estimates of the best routes of the road network according to the degree of saturation of the flows and the length of the line of the graph. The model can also indicate additional information of an environmental nature in an ITS system present in the cloud.