Abstract:A test tube barcode rotation box detection algorithm has been proposed based on improved YOLOv8 in view of the flaw of traditional detection algorithms being difficult to accurately locate the barcode area brought about by the inclined angle of barcode pasting on the surface of the test tube and the obstruction of the gripper during the pre-processing stage of the fully automated assembly line. Firstly, GhostConv is adopted to replace the Conv module in the backbone network, thus achieving feature representation similar to traditional convolution while significantly reducing computational complexity through efficient feature generation methods. Next, the Star module is introduced into the C2f module for an enhancement of the feature extraction capability of the model through high-dimensional nonlinear feature mapping. Meanwhile, the neck network is to be replaced with a CCFM feature fusion network, further reducing computational complexity. Finally, the CARAFE sampling method is introduced to improve the blurring effect brought about by traditional sampling methods. The experimental results show that the improved model is characterized with a high accuracy and recall on self-made datasets mAP@50-95, achieving an increase of 2.8%, 2.1%, and 6.6% respectively, while reducing the model complexity by 27.7%, thus enabling precise positioning of test tube barcodes in real-world scenarios.