

The standard penetration test (SPT) and dynamic probing test (DPT) are commonly used exploration methods in geotechnical investigation. However, errors can occur during data collection, often attributed to factors such as human error. To mitigate this issue, this paper proposes the utilization of an improved YOLOv5 object detection algorithm, a form of artificial intelligence technology, to automatically count the number of hammer strikes during geotechnical investigations. The proposed approach incorporates several enhancements to the YOLOv5 network architecture. Firstly, a focal loss function is introduced to address sample imbalance, ensuring better handling of different classes of hammer strikes. Additionally, online hard example mining technology is employed to improve model accuracy by focusing on challenging samples that are most informative for training. The improved YOLOv5 model is then applied to detect hammer strikes in SPT and DPT tests. To facilitate training and evaluation, a hammer detection dataset is created, tailored to the specific requirements of geotechnical investigation. Experimental results demonstrate the superior performance of the proposed improved YOLOv5 object detection model on the hammer detection dataset.