The current research on automatic recognition of vegetable and fruit images is more focused on a single fruit and vegetable image without background environment, and more features such as texture and color are extracted, and shallow learning technology is used to realize the recognition of vegetable and fruit images. The method cannot meet the classification and identification of various fruits and vegetables. The main purpose of this paper is to carry out research on fruit and vegetable identification and nutritional analysis based on the knowledge of multilayer perceptron and neural network (NN). In view of the above background, this research focuses on the research on IR of fruits and vegetables, using deep learning methods to improve the recognition rate of fruits and vegetables images, and constructing models through CNNs to achieve classification and recognition. Experiments show that the number of network layers has a greater impact on IR, and the deeper the network depth, the higher the IR rate. Considering that the increase in the number of network layers will affect the structural complexity of the network model and increase the amount of mathematical operations, reasonable network layer selection is particularly important in IR.