###### Abstract  
Crop pests and diseases are one of the most critical disasters that limit agricultural production. In this paper, we trained a lightweight convolutional neural network model and built a Django framework-based potato disease leaf recognition system, which can recognize three types of potato leaf images including early blight, late blight, and healthy. A lightweight, neural network-based model for the identification of early potato leaf diseases significantly reduces the number of model parameters, whereas the accuracy of Top-1 identification is over 93%. We imported the trained model into the Django framework to build a website for a potato early leaf disease identification system, thus providing technical support for the implementation of a mobile-based potato leaf disease identification and early warning system. convolutional neural networks; machine learning; potato disease leaf; Django framework 202313202331348713232313  
support vector machines, artificial neural networks) are used to detect changes in the external characteristics, internal chemical content, and physiological structure of the subject for crop disease diagnosis. Many scholars have used classical image processing techniques and machine-learning methods to diagnose and identify different crop pest targets based on acquired infrared images or hyperspectral images [2]. [PERSON] et al. used convolution network architecture to recognize potato diseases [3]. [PERSON] et al. used a combination of infrared image information and depth information to achieve detection of tomato powdery mildew using SVM [4]. [PERSON] et al. [5] and [PERSON] et al. [6] used machine learning methods to analyze hyperspectral images of plant leaves such as cucumber. Using classical machine-learning classification methods to identify some specific image features of crops can face some difficulties. First, classical image-processing methods are difficult to extract similar image feature values under different lighting conditions, thus failing to accurately identify disease image targets. Second, the image target size, feature color, and regional distribution of crop diseases at different onset stages are not consistent, and it is difficult to represent them using multiple features within a certain range. Some characteristics, such as those resembling the color of the leaf background, make it difficult for traditional methods to effectively and accurately identify pests in images. This makes it difficult for classical image processing techniques based on morphological segmentation to extract targets effectively, which can interfere with the target recognition results. With the rise of deep-learning techniques, more and more researchers are introducing them into the field of crop pest and disease image detection [7]. This new nondestructive detection technique can automatically extract features of crop pest images in the visible range and a achieve rapid nondestructive identification [8] without the use of hyperspectral imaging techniques, with higher accuracy, faster detection speed and better stability [9]. The use of artificial intelligence technologies such as deep learning to identify potato diseases early and take professional control measures can not only reduce the scale of the disease and ensure potato production, but also effectively reduce the amount of pesticides used. Reducing the harm caused by pesticides is an inevitable trend in the development of intelligent and green potato disease control. Deep learning has a more complex network structure, stronger learning ability, and higher recognition accuracy than classical neural networks, and has obvious advantages in solving image classification and visualization problems [10].