Identification of sugarcane stem nodes is generally dependent on high-performance recognition equipment in sugarcane seed pre-cutting machines and inefficient. Accordingly, this study proposes a novel lightweight architecture for the detection of sugarcane stem nodes based on the YOLOv5 framework, named G-YOLOv5s-SS. Firstly, the study removes the CBS and C3 structures at the end of the backbone network to fully utilize shallow-level feature information. This enhances the detection performance of sugarcane stem nodes. Simultaneously, it eliminates the 32 times down-sampled branches in the neck structure and the 20x20 detection heads at the prediction end, reducing model complexity. Secondly, a Ghost lightweight module is introduced to replace the conventional convolution module in the BottleNeck structure, further reducing the model’s complexity. Finally, the study incorporates the SimAM attention mechanism to enhance the extraction of sugarcane stem node features without introducing additional parameters. This improvement aims to enhance recognition accuracy, compensating for any loss in precision due to lightweight modifications. The experimental results showed that the average precision of the improved network for sugarcane stem node identification reached 97.6%, which was 0.6% higher than that of the YOLOv5 baseline network. Meanwhile, a model size of 2.6MB, 1,129,340 parameters, and 7.2G FLOPs, representing respective reductions of 82%, 84%, and 54.4%. Compared with mainstream one-stage target detection algorithms such as YOLOv4-tiny, YOLOv4, YOLOv5n, YOLOv6n, YOLOv6s, YOLOv7-tiny, and YOLOv7, G-YOLOv5s-SS achieved respective average precision improvements of 12.9%, 5.07%, 3.6%, 2.1%, 1.2%, 3%, and 0.4% in sugarcane stem nodes recognition. Meanwhile, the model size was compressed by 88.9%, 98.9%, 33.3%, 72%, 92.9%, 78.8% and 96.3%, respectively. Compared with similar studies, G-YOLOv5s-SS not only enhanced recognition accuracy but also considered model size, demonstrating an overall excellent performance that aligns with the requirements of sugarcane seed pre-cutting machines.