The changes in cracks on the surface of rock mass reflect the development of geological disasters, so cracks on the surface of rock mass are early signs of geological disasters such as landslides, collapses, and debris flows. To research geological disasters, it is crucial to swiftly and precisely gather crack information on the surface of rock masses. Drone videography surveys can effectively avoid the limitations of the terrain. This has become an essential method in disaster investigation. This manuscript proposes rock crack recognition technology based on deep learning. First, images of cracks on the surface of a rock mass obtained by a drone were cut into small pictures of 640 × 640. Next, a VOC dataset was produced for crack object detection by enhancing the data with data augmentation techniques, labeling the image using Labelimg. Then, we divided the data into test sets and training sets in a ratio of 2:8. Then, the YOLOv7 model was improved by combining different attention mechanisms. This study is the first to combine YOLOv7 and an attention mechanism for rock crack detection. Finally, the rock crack recognition technology was obtained through comparative analysis. The results show that the precision of the improved model using the SimAM attention mechanism can reach 100%, the recall rate can achieve 75%, the AP can reach 96.89%, and the processing time per 100 images is 10 s, which is the optimal model compared with the other five models. The improvement is relative to the original model, in which the precision was improved by 1.67%, the recall by 1.25%, and the AP by 1.45%, with no decrease in running speed. This proves that rock crack recognition technology based on deep learning can achieve rapid and precise results. It provides a new research direction for identifying early signs of geological hazards.