Vibration occurs when a vehicle passes through a speed bump, which has different intensities at different sizes and speeds. The recognition of speed bump type is an important step for vehicle to adjust speed automatically in time in automatic driving, which helps to improve the safety and comfort of passengers. In this paper, we put forward the technical requirements of speed bump image acquisition in automatic driving scene, and establish the speed bump image dataset. Based on improved EfficientNet basic block, we construct a lightweight convolutional neural network integrating edge detection, which is named Edge-Efficientnet. The experimental results show that its accuracy is improved by 3.3% and the model size is reduced by 53% compared with EfficientNetB0 model. In terms of computing speed, the model meets the real-time performance requirements. The Edge-Efficientnet model can be applied to the comfortable speed adjustment of autonomous vehicles passing through speed bump.