Abstract As the main support part of the working platform of a high-rise building machine, the bearing pin support (BPS) plays a crucial role in the safety and stability of the platform, the conventional method has the problems of low detection efficiency, low accuracy, and high cost. To improve the accuracy and robustness of the detection algorithm under weak light, this paper proposes an intelligent detection algorithm for the BPS-piece states of the BS-YOLOV8, to improve the feature map utilization and reduce the model leakage detection error detection rate, Swin transformer is used to improve the YOLOV8 backbone network. In addition, the BiFormer attention mechanism is used to weigh the feature map to solve the problem of feature information loss in different feature layers and weak lighting conditions, and then the Scylla-IOU loss function is used instead of the original localization loss function to guide the model to learn to generate a predicted bounding box closer to the real target bounding box. Finally, the BS-YOLOV8 algorithm is used to compare with its classical algorithm on the self-constructed dataset of this study, The results show that the mAP0.5, mAP0.5:0.95, and FPS values of the BS-YOLOV8 algorithm reach 97.9%, 96.3% and 40 under normal lighting. The mAP0.5 value reaches 87.6% under low light conditions, which effectively solves the problems of low detection efficiency and poor detection under low light conditions, and is superior compared to other algorithms.