Abstract:In order to realize the normal operation of the picking robot and the rapid recognition of tomato in the nighttime environment of solar greenhouse, a nighttime tomato fruit detection method based on improved YOLO v5(You only look once)was proposed. Totally 2000 tomato images in the night environment were collected as the initial training samples, and the original loss function was improved by establishing a CIOU target position loss function based on intersection and union ratio, and then an adaptive anchor frame was generated according to the anchor calculation function, the optimal anchor frame size was determined, the network structure was optimized, and an improved YOLO v5 network model was constructed, and the recognition rate of tomato fruit in night environment was improved. The experimental results showed that the average recognition accuracy of improved YOLO v5 network model for tomato green and red fruits and average recognition accuracy in night environment was 96.2%, 97.6% and 96.8%. Compared with traditional CNN convolution network model and traditional YOLO v5 model, the recognition accuracy of occluded features and features in dark light was improved and the robustness of the model was improved. The improved YOLO v5 network model compiled and wrote the training results into Android system to make a rapid detection application software, which verified the reliability and accuracy of the model for tomato fruit recognition in night environment, and provided a reference for the relevant research of tomato real-time detection system.