Existing road marking detection primarily focuses on the direction, position, and color of road markings. However, clear and accurate road markings directly impact issues such as directional guidance, lane selection, speed limits, and parking positions. Therefore, we introduce the CFG_SI_YOLO model for road marking defect detection. This model introduces a multi-channel CoordConv module, which enhances the network's focus on fine details based on the distribution characteristics of road markings defect. This helps prevent the loss of road marking information caused by model compression and pooling operations; Moreover, the model introduces the Focal-EIoU loss function to address the issue of imbalanced samples between easy and difficult cases. Additionally, the GELU activation function is incorporated to prevent gradient explosions, enhance the network's non-linear expressiveness, and improve the detection accuracy of the model. Finally, we add a similarity attention module to enhance the network's focus on the target, reduce interference from other objects, and mitigate false detection defects caused by inter-class similarity. Experiments conducted on a self-made dataset containing various types of road markings have shown that our approach achieved Precision, Recall, F1, IoU, and mAP of 85.7%, 85.8%, 85.7%, 75.1% and 82.8%, respectively. These results are significantly better than other methods, confirming the effectiveness and feasibility of our approach. Our code and results can be found on https://github.com/ly6660/Road_marking_line_code_data.