We present a novel approach for addressing computer vision tasks in intelligent transportation systems, with a strong focus on data security during training through federated learning. Our method leverages visual transformers, training multiple models for each image. By calculating and storing visual image features as well as loss values, we propose a novel Shapley value model based on model performance consistency to select the most appropriate models during testing. To enhance security, we introduce an intelligent federated learning strategy, where users are grouped into clusters based on constrastive clustering for creating a global model as well as customized local models. Users receive both global as well as local models, enabling tailored computer vision applications. We evaluated KGVT-ITS (Knowledge Guided Visual Transformers for Intelligent Transportation Systems) on various ITS challenges, including pedestrian detection, abnormal event detection, as well as near-crash detection. The results demonstrate the superiority of KGVT-ITS over baseline solutions, showcasing its effectiveness and robustness in intelligent transportation scenarios. More particularly, KGVT-ITS achieves significant improvements of about 8% against the existing ITS methods.