In recent years,the strategy of main-grain potato has developed rapidly.Traditional detection methods mostly use manual to judge the types of surface defects of potatoes,but this method is subjective and difficult to achieve unified standards.In order to solve the problem of potato surface defect recognition,this paper proposes an image classification method based on depth learning,and designs a new convolution neural network model on the basis of traditional shallow convolution neural network to complete potato defect recognition.This paper mainly studies the following four aspects:(1)The idea and structure of the neural network are systematically analyzed,and the forward propagation process and back propagation algorithm of the traditional artificial neural network are analyzed in detail.This paper mainly introduces the working mode of each layer of convolution neural network,and the characteristics of local perception and parameter sharing.The convolution calculation,pooling processing and the selection of activation function in convolution neural network are deduced in detail,which provides theoretical guidance for the parallel design and implementation of deep neural network.(2)Potato images were collected by machine vision platform in laboratory.Potato images were divided into four types:intact,dry rot,insect eyes and mechanical damage.The original potato image information database was established.In order to solve the problem of insufficient generalization ability of model caused by insufficient data samples,data enhancement method was used to generate data with similar characteristics with original data through translation,rotation,image noise addition,color jitter and PCA dimension reduction operation.Potato image database was expanded.Potato data was expanded from 351 to 8803 images.The design of convolution neural network provides data support.(3)All data processing in this paper is based on Linux system.The Tensorflow development environment and CUDA acceleration library are built under Linux system.The LeNet-5 convolution neural network is analyzed,and the network structure and parameters are improved.By adding Relu activation function and Dropout regularization technology,the over-fitting problem in training process is reduced,and the superficial convolution nerve is designed.The application of network in potato classification provides a basis for the design of complex convolution neural network.After testing,the recognition rate increased from 71.32%to 84.6%.(4)Based on the drawbacks of shallow convolution neural network,a complex convolution neural network with 15 layers is designed on the basis of the improved shallow convolution neural network.The convolution layer with 1*1 convolution core size is added to reduce the dimension of the data.The final classification is completed by using the partial response normalization and gradient descent algorithm.After testing on the enhanced data,the final recognition is achieved.The separation rate reached 94.1%.Finally,a migration learning scheme is proposed for small data samples.By pre-training and fine-tuning,a high-precision model can be trained with fewer data sets and shorter training time.The highest recognition rate is 98.5%. |