Abstract:Cotton is an important economic crop in China,and the prediction of cotton yield helps in economic regulation and regulation of planting patterns,thereby improving production returns. At present,traditional manual production measurement methods have problems such as high labor intensity and low measurement accuracy. To solve this problem,cotton images after spraying defoliant were selected as the research object,and relevant datasets were constructed. At the same time, the calculation formula for the number of cotton plants, cotton bolls, and single boll seed cotton quality per unit area and the improved YOLO v5 algorithm model were used as the core algorithm to design a cotton yield prediction system based on Android mobile devices. Image information was obtained by choosing to take photos on a mobile phone or calling an album, and performing data analysis and processing on the target image to achieve cotton yield prediction. Using the detection box of cotton in the image to detect cotton bolls, the cotton yield per hectare was automatically calculated based on different soil types. Compared with the actual yield, the average error between the actual yield and predicted yield of seed cotton and lint was 122.01kg/hm2 and 57.98kg/hm2, and the model had high accuracy on the mobile phone. Compared with the original YOLO v5 model, the accuracy P and recall R were increased by 19.58 percentage points and 16.84 percentage points, respectively, with values of 90.95% and 73.16%. After comparative testing on three types of mobile phones, the system ran smoothly and the yield prediction results did not differ significantly. The results indicated that the designed cotton yield prediction system had good performance in field yield measurement and algorithm operation, and can provide technical reference for cotton yield prediction.