Road scene object detection is an important component in the field of intelligent transportation, which directly affects the implementation of numerous intelligent transportation applications. However, existing road scene object detection models, mostly developed based on clear weather conditions, are not effective in different weather conditions, and the corresponding detection accuracies will be drastically reduced. To address this problem, this paper proposes a domain generalization method for road scene object detection under different weather conditions. This method employs a road scene domain-invariant feature extraction network to extract both intra-domain and inter-domain invariant features from training domain images, and generates more diverse domain-invariant features for road scene under different weather conditions to enhance the generalization capability of the object detection model. Furthermore, an improved self-distillation mechanism is introduced for the feature extraction of the object detection model, so that the features extracted by the object detection model have rich domain-invariant information to further enhance its generalization ability, thus improving the detection accuracy of the object detection model. The experimental results show that the detection accuracy of the method in this paper is significantly improved compared with that of Faster R-CNN, with a 5.7% improvement in daytime-sunny scene, a 5.9% improvement in dusk-rainy scene, a 2.6% improvement in night-rainy scene, and a 4.7% improvement in daytime-foggy scene. Based on the research methodology presented in this paper, it provides effective support for the practical implementation of intelligent transportation technologies such as vehicle recognition and pedestrian detection.