Abstract:Detection and recognition of the stair feature are needed in the mobile robot visual SLAM mapping. Traditional stair detection technologies, such as edge detection and line extraction, often used ideal visual angle and simple background. They cannot finish the stair feature extraction under the condition of the railing occlusion and complex background. In order to solve the above problems, a stair target improved detection method based on YOLOv5 used for the mobile robot is proposed in the paper. The FenceMask data enhancement strategy is introduced to increase the number of training samples for occluded stairs at the input end. The feature extraction ability of the stairs in complex environment is strengthened by introducing CBAM attention mechanism. The problem of "multiple inspection" of the single multi-step stairs occurring in Faster-RCNN and SSD are solved and improved by combining NMS and WBF at the prediction end. The simulation results show that an average accuracy 82.9% can be obtained under the condition of the model size 18.4MB in the improved YOLOv5. And the average accuracy of the improved yolov5m can be enhanced to 86.5% when the model size is 45.5MB. The improved YOLOv5 method in the paper can effectively identify railing occlusion, complex background and single long steps.