This article applies deep learning and electromechanical technology to plant phenotype measurement. First, an electromechanical device is designed to collect plant phenotype images, which solves the difficulty of collecting deep learning training data. The data set required for deep learning model training for plant phenotype detection is made by an automated method. This paper takes the Lactuca sativa plant image as an example and uses the ASM-based data enhancement method to solve the problem of insufficient image data of Lactuca sativa leaf pests and effectively avoid the phenomenon of overfitting. The plant image recognition method based on deep learning proposed breaks through the limitations of plant local feature recognition, gets rid of the limitation of highly specialized data collection, lowers the threshold of plant image recognition, and has advantages in recognition speed and accuracy. This method requires a large amount of training data. In the future, we can explore the collection of massive plant pictures from the Internet as a training set to achieve rapid iteration and optimization of the model.