Road hazards significantly contribute to fatalities in traffic accidents. As the number of vehicles on the road increases, the risk of accidents rises, especially under adverse weather conditions that impair visibility and road conditions. In such scenarios, it is crucial to alert approaching vehicles to prevent further collisions. Detecting humans or animals on the road is essential to minimize fatalities in traffic accidents. Accurate detection and estimation of road hazards are vital for ensuring safety and enhancing the driving experience. Current deep learning methods for road condition monitoring are often time-consuming, costly, inefficient, labor-intensive, and require frequent updates. Therefore, there is pressing need for more flexible, cost-effective, and efficient process to detect road conditions, particularly road hazards. In this work, we present a road hazard detection and avoidance system for autonomous driving using deep reinforcement learning (DRL) to address traffic congestion and safety issues in complex road conditions. We utilize GoogLeNet for feature extraction, which extracts deep features from the given images. Subsequently, we design a modified compact snake optimization (MCSO) algorithm for feature optimization, addressing data dimensionality issues. Additionally, we introduce geometric deep reinforcement learning (GDRL) for hazard detection and tracking in complex road environments, improving the accuracy and robustness of visual detection. The proposed MCSO + GDRL model is validated using a self-made open access dataset with 5607 samples from car recorders and the KITTI dataset for autonomous driving training.