Cigarette empty thin head defect detection is an important step to ensure product quality in tobacco factories. To address the current problems about detecting thin head with little content and low accuracy, a cigarette empty thin head defect detection algorithm based on improved YOLOv5s is proposed. Firstly, a convolutional block attention mechanism is introduced between neck and head to emphasize the extraction of empty thin head defect features; then a weighted bidirectional feature pyramid structure is used to improve the neck network and enhance the feature fusion capability of the model; finally, a lightweight module is designed to reduce the computational complexity of the model. The experimental results show that the improved algorithm can effectively detect cigarette hollow-head defects with an improved accuracy of 2.1%, and the model parameters are only 5.35M, which can provide technical support for subsequent cigarette hollow-head defect detection.