Abstract:Stem diameter is a critical phenotypic parameter of crop growth. Its in-situ, real-time, and non-destructive monitoring is of great significance for optimizing agricultural production management. It utilized an OAK-D camera integrated with a VPU acceleration unit to acquire RGB-D data of tomato stems. Pruning and fine-tuning were utilized to a MobileNetV2-based DeepLabV3+ semantic segmentation model to construct a lightweight network. Relying on the high-fidelity binarized segmentation masks outputed by this lightweight network, a skeletonization algorithm extracted the planar pixel width of the stems. This width was then fused with regional depth information to calculate the actual stem diameter. Experimental results indicated that, compared with the original DeepLabV3+, U-Net, PSPNet, and BiSeNetV2 models, the lightweight DeepLabV3+ demonstrated remarkable engineering deployment advantages. Its parameter count was reduced to 1.48×10^6, the model memory footprint was only 4.03 MB, and the frame rate on the OAK-D side was 5.50 f/s. Despite the substantial reduction in parameter scale, the pixel-level perception capability of the model did not degrade. Precision, recall, F1 score, and IoU reached high levels of 96.03%, 96.19%, 96.11%, and 92.51%, respectively. Based on this high-quality segmentation foundation, the mean and median determination coefficients (R2) of the calculated stem diameters reached 0.987 and 0.990, respectively. The proposed lightweight measurement method oriented toward edge devices provided a theoretical basis and technical support for the design of embedded perception systems in greenhouse mobile inspection equipment and smart irrigation management.