To establish a deep-learning architecture based on faster region-based convolutional neural networks (Faster R-CNN) algorithm for detection and sorting of red ginseng (Ginseng Radix et Rhizoma Rubra) with internal defects automatically on an online X-ray machine vision system. A Faster R-CNN based classifier was trained with around 20 000 samples with mean average precision value (mAP) of 0.95. A traditional image processing method based on feedforward neural network (FNN) obtained a bad performance with the accuracy, recall and specificity of 69.0%, 68.0%, and 70.0%, respectively. Therefore, the Faster R-CNN model was saved to evaluate the model performance on the defective red ginseng online sorting system. An independent set of 2 000 red ginsengs were used to validate the performance of the Faster R-CNN based online sorting system in three parallel tests, achieving accuracy of 95.8%, 95.2% and 96.2%, respectively. The overall results indicated that the proposed Faster R-CNN based classification model has great potential for non-destructive detection of red ginseng with internal defects.
A machine vision system based on a convolutional neural network (CNN) was proposed to sort Amomum villosum using X-ray non-destructive testing technology in this study. The Amomum villosum fruit network (AFNet) algorithm was developed to identify the internal structure for quality classification and origin identification in this manuscript. This network model is composed of experimental features of Amomum villosum. In this study, we adopted a binary classification method twice consecutive to identify the origin and quality of Amomum villosum. The results show that the accuracy, precision, and specificity of the AFNet for quality classification were 96.33%, 96.27%, and 100.0%, respectively, achieving higher accuracy than traditional CNN under the condition of faster operation speed. In addition, the model can also achieve an accuracy of 90.60% for the identification of places of origin. The accuracy of multi-category classification performed later with the consistent network structure is lower than that of the cascaded CNNs solution. With this intelligent feature recognition model, the internal structure information of Amomum villosum can be determined based on X-ray technology. Its application will play a positive role to improve industrial production efficiency.