For intelligent vehicles, if the sensing device might accurately and quickly detect the concave and convex obstacles on the roads ahead of the vehicles, the important preview information might be provided for the control of the chassis system such as the suspension of the vehicles, and finally realized the improvement of the comprehensive performance of the vehicles. Therefore, based on improved YOLOv7-tiny algorithm a recognition method was proposed for typical positive and negative obstacles such as bumps(speed bumps) and pits on the road surfaces. Firstly, the SimAM module was introduced in the three feature extraction layers of the original YOLOv7-tiny algorithm to enhance the network's ability to perceive the feature map; secondly, a smoother Mish activation function was used in the Neck part to add more nonlinear expressions; again, replacing the nearest proximal upsamping operator with the up-sampling operator to enable the network to aggregate contextual information more efficiently; and lastly, the WIoU was used as the localization loss function to improve the convergence speed as well as the robustness of the network. The offline simulation experimental results show that compared with the original model, the improved model improves the average accuracy by 2.5% for almost the same number of parameters with an intersection ratio of 0.5 between the predicted and real frames. The improved model is deployed to a real vehicle, and the real-vehicle experiments verify that the model may effectively detect the obstacles appearing on the road in front of the vehicles, indicating that the proposed algorithmic model may accurately provide the pre-precedent information for obstacle detections. © 2024 Chinese Mechanical Engineering Society. All rights reserved.