Abstract Safety management in tunnel construction is important to ensure the safety of construction personnel and equipment. This paper proposes a tunnel engineering risk early warning model based on computer vision and convolutional neural network (CNN), aiming at realizing real-time monitoring and risk early warning of the construction site using modern image processing technology and deep learning algorithm. Many image data of tunnel engineering construction sites were collected, and the data were preprocessed and marked. Then, the paper designs a depth CNN model for feature extraction and risk identification of construction site images. Through the performance evaluation of the model on the training set and test set, the effectiveness and feasibility of the model in risk early warning are verified. The experimental results show that the proposed model achieves high accuracy, recall, and F1 score on the test set, which is superior to the traditional method based on image features and artificial rules. At the same time, we analyzed the prediction results of the model on the actual construction site images. We found that the model can effectively identify different risk factors and has strong generalization ability and practicability. To sum up, this study provides a new technical means and solution for the safety management of tunnel engineering, which has important theoretical and practical significance.