Road surface defects are crucial problems for safe and smooth traffic flow. Due to climate changes, low quality of construction material, large flow of traffic, and heavy vehicles, road surface anomalies are increasing rapidly. Detection and repairing of these defects are necessary for the safety of drivers, passengers, and vehicles from mechanical faults. In this modern era, autonomous vehicles are an active research area that controls itself with the help of in-vehicle sensors without human commands, especially after the emergence of deep learning (DNN) techniques. A combination of sensors and DNN techniques can be useful for unmanned vehicles for the perception of their surroundings for the detection of tracks and obstacles for smooth traveling based on the deployment of artificial intelligence in vehicles. One of the biggest challenges for autonomous vehicles is to avoid the critical road defects that may lead to dangerous situations. To solve the accident issues and share emergency information, the Intelligent Transportation System (ITS) introduced the concept of vehicular network termed as vehicular ad hoc network (VANET) for achieving security and safety in a traffic flow. A novel mechanism is proposed for the automatic detection of road anomalies by autonomous vehicles and providing road information to upcoming vehicles based on Edge AI and VANET. Road images captured via camera and deployment of the trained model for road anomaly detection in a vehicle could help to reduce the accident rate and risk of hazards on poor road conditions. The techniques Residual Convolutional Neural Network (ResNet-18) and Visual Geometry Group (VGG-11) are applied for the automatic detection and classification of the road with anomalies such as a pothole, bump, crack, and plain roads without anomalies using the dataset from different online sources. The results show that the applied models performed well than other techniques used for road anomalies identification.