The rapid and accurate identification of sugarcane internodes is of great significance for tasks such as field operations and precision management in the sugarcane industry, and it is also a fundamental task for the intelligence of the sugarcane industry. However, in complex field environments, traditional image processing techniques have low accuracy, efficiency, and are mainly limited to server-side processing. Meanwhile, the sugarcane industry requires a large amount of manual involvement, leading to high labor costs. In response to the aforementioned issues, this paper employed YOLOv5s as the original model algorithm, incorporated the K-means clustering algorithm, and added the CBAM attention module and VarifocalNet mechanism to the algorithm. The improved model is referred to as YOLOv5s-KCV. We implemented the YOLOv5s-KCV algorithm on Jetson TX2 edge computing devices with a well-configured runtime environment, completing the design and development of a real-time sugarcane internode identification system. Through ablation experiments, comparative experiments of various mainstream visual recognition network models, and performance experiments conducted in the field, the effectiveness of the proposed improvement method and the developed real-time sugarcane internode identification system were verified. The experimental results demonstrate that the improvement method of YOLOv5s-KCV is effective, with an algorithm recognition accuracy of 89.89%, a recall rate of 89.95%, and an mAP value of 92.16%, which respectively increased by 6.66%, 5.92%, and 7.44% compared to YOLOv5s. The system underwent performance testing in various weather conditions and at different times in the field, achieving a minimum recognition accuracy of sugarcane internodes of 93.5%. Therefore, the developed system in this paper can achieve real-time and accurate identification of sugarcane internodes in field environments, providing new insights for related work in sugarcane field industries.