Abstract:YOLO is one of the most important algorithm models in the target detection of computer vision. Given the existing YOLOv5s model, an extended YOLOv5 algorithm model for multi-level classification target detection is proposed. Firstly, the function of the annotation tool LabelImg is extended to construct multi-level classification label files. Secondly, the output format of the detection head is modified on this basis of the YOLOv5s algorithm, and the core design idea of the DenseBlock and Res2Net network model is introduced in the front end of the backbone network to extract rich mul-ti-dimensional feature information, enhance the reusability of feature information, and realize the task of YOLO-based multi-level classification target detection. The helmet color is taken as the secondary classification for training and verification on the open source helmet data set, and the average precision, precision, and recall reach 95.81%, 94.90%, and 92.54%, respectively. The experimental results verify the feasibility of the YOLOv5-based multi-level classification target detection task, and the proposed model provides a new idea and method for target detection and multi-level classification target detection tasks.