The detection of wood defect is a crucial step in wood processing and manufacturing, determining the quality and reliability of wood products. To achieve accurate wood defect detection, a novel method named BPN-YOLO is proposed. The ordinary convolution in the ELAN module of the YOLOv7 backbone network is replaced with Pconv partial convolution, resulting in the P-ELAN module. Wood defect detection performance is improved by this modification while unnecessary redundant computations and memory accesses are reduced. Additionally, the Biformer attention mechanism is introduced to achieve more flexible computation allocation and content awareness. The IOU loss function is replaced with the NWD loss function, addressing the sensitivity of the IOU loss function to small defect location fluctuations. The BPN-YOLO model has been rigorously evaluated using an optimized wood defect dataset, and ablation and comparison experiments have been performed. The experimental results show that the mean average precision (mAP) of BPN-YOLO is improved by 7.4% relative to the original algorithm, which can better meet the need to accurately detecting surface defects on wood.