Artificial Intelligence in Agriculture (Mar 2019)

Fusion of machine vision technology and AlexNet-CNNs deep learning network for the detection of postharvest apple pesticide residues

  • Bo Jiang,
  • Jinrong He,
  • Shuqin Yang,
  • Hongfei Fu,
  • Tong Li,
  • Huaibo Song,
  • Dongjian He

Journal volume & issue
Vol. 1
pp. 1 – 8

Abstract

Read online

Pesticide residue is an important factor that affects food safety. In order to achieve effective detection of pesticide residues in apples, a machine-vision-based segmentation algorithm and hyperspectral techniques were used to segment the foreground and background regions of the apple image. By calculating the roundness value and extracting the region with the highest roundness value in the connected region, a region of interest (ROI) mask was created for the apple. Four pesticides (chlorpyrifos, carbendazim and two mixed pesticides) and an inactive control were used at the same concentration of 100 ppm (except for the control group), and the hyperspectral region of the corresponding sample image was extracted by obtaining the different types of pesticide residues in the ROI masks. To increase the diversity of the samples and to expand the dataset, Gaussian white noise with a varying signal-to-noise ratio was added to each of the hyperspectral images of the apple. The number of samples was increased from four types of 12 samples to four types of 72 samples, giving 4608 hyperspectral data images in each category. The structure and parameters of a convolutional neural network (CNN) were determined using theoretical analysis and experimental verification. All the extracted hyperspectral images of apples were normalized to 227 × 227 × 3 pixels as the input of the CNN network for pesticide residue detection. There were 18,432 sample data of four types for 72 samples. Of these, 12,288 images were selected using a bootstrap sampling method as the training set, and 6144 as the test set, with no overlap. The test results show that when the number of training epochs was 10, the accuracy of the test set detection was 99.09%, and the detection accuracy of the single-band average image was 95.35%. A comparison with traditional k-nearest neighbor (KNN) and support vector machine classification algorithms showed that the detection accuracy for KNN was 43.75% and the average time was 0.7645 s. These results demonstrate that our method is a small-sample, non-contact, fast, effective and low-cost technique that can provide effective pesticide residue detection in postharvest apples. Keywords: Pesticide residue detection, Apple, Hyperspectral, CNN network, KNN, SVM