Method for the detection and classification of quinoa seeds via computer vision

Authors

  • Xiangle Meng 1. College of Mechanical and Electrical Engineering, Hebei Agricultural University, Baoding 071001, Hebei, China
  • Huali Yu 1. College of Mechanical and Electrical Engineering, Hebei Agricultural University, Baoding 071001, Hebei, China
  • Wei Lyu 2. The Science and Technology Innovation Service Center of Hebei Province, Shijiazhuang 050035, China
  • Xiaoshun Zhao 1. College of Mechanical and Electrical Engineering, Hebei Agricultural University, Baoding 071001, Hebei, China
  • Chuan Lu 2. The Science and Technology Innovation Service Center of Hebei Province, Shijiazhuang 050035, China
  • Zhimin Wei 3. Institute of Millet Crops, Hebei Academy of Agriculture and Forestry Sciences, Shijiazhuang 050035, China
  • Yueyou Li 2. The Science and Technology Innovation Service Center of Hebei Province, Shijiazhuang 050035, China

Abstract

To solve the problem that there are many human factors, great difficulty, and low efficiency in distinguishing quinoa seeds from weed seeds and distinguishing the quality of quinoa seeds by appearance, a method of quinoa seed detection and classification based on computer vision is proposed. In this study, convolutional neural network and Vision Transformer (ViT) were used to quickly and nondestructively classify different quinoa seeds and weed seeds. The dataset used in this experiment was 1440 sample images containing quinoa seeds and weed seeds, which were divided into training set, test set, and validation set at a ratio of 8:1:1. The training set was 1152 pieces, test set was 144, and the validation set was 144 pieces. The convolutional neural network model and ViT model based on deep learning were established. The results show that the average classification accuracies of MobileNet, VGG16, ResNet50, and ViT models used in the experiment are 93.75%, 90.97%, 93.75%, and 98.61% respectively. The accuracy of ViT classification is much higher than that of convolutional neural networks, establishing a benchmark for quinoa seed classification. This study provides a reproducible dataset construction method and a dual-imaging strategy, and demonstrates practical deployment value for automated seed grading and purity testing.      

Keywords: quinoa seeds, convolutional neural network, VGG16, ResNet50, MobileNet, ViT

DOI: 10.25165/j.ijabe.20261902.10460

 

Citation: Meng X L, Yu H L, Lyu W, Zhao X S, Lu C, Wei Z M, et al. Method for the detection and classification of quinoa seeds via computer vision. Int J Agric & Biol Eng, 2026; 19(2): 303–309.

References

[1] Shi L R, Zhao W Y, Sun B G, Sun W, Zhou G. Determination and analysis of basic physical and contact mechanics parameters of quinoa seeds by DEM. Int J Agric & Biol Eng, 2023; 16(5): 35–43.

[2] Zhao X S, Hou Z Z, Lv W, Lu C, Yu H L, Wei Z M. Design and test of a positive-negative pressure quinoa precision seed-metering device with a disturbed seed-filling mechanism. Int J Agric & Biol Eng, 2024; 17(6): 131–144.

[3] Wang X Y, Kang J M, Ding H F, Peng Q J, Zhang C Y, Li N N. Design and test of 2BM-4 film mulch precision planter for quinoa. Transactions of the CSAM, 2020; 51(12): 86–94. (in Chinese)

[4] Liu W, Hu J P, Liu J X, Yue R C, Zhang T F, Yao M J, et al. Method for the navigation line recognition of the ridge without crops via machine vision. Int J Agric & Biol Eng, 2024; 17(2): 230–239.

[5] Chen J, Lian Y, Zou R, Zhang S, Ning X B, Han M N. Real-time grain breakage sensing for rice combine harvesters using machine vision technology. Int J Agric & Biol Eng, 2020; 13(3): 194–199.

[6] Ji J T, Du S C, Li M S, Zhu X F, Zhao K X, Zhang S H, et al. Design and experiment of a picking robot for Agaricus bisporus based on machine vision. Int J Agric & Biol Eng, 2024; 17(4): 67–76.

[7] Chen L P, He T T, Li Z W, Zheng W G, An S W, ZhangZhong L L. Grading method for tomato multi-view shape using machine vision. Int J Agric & Biol Eng, 2023; 16(6): 184–196.

[8] Lei H, Li C T, Tang Y, Zhong Z Y, Jiao Z Y. Accurate and rapid image segmentation method for bayberry automatic picking via machine learning. Int J Agric & Biol Eng, 2023; 16(6): 246–254.

[9] Ngugi H N, Akinyelu A A, Ezugwu A E. Machine learning and deep learning for crop disease diagnosis: Performance analysis and review. Agronomy, 2024; 14(12): 3001.

[10] Lu J H, Zhang M, Hu Y S, Ma W, Tian Z W, Liao H S, et al. From outside to inside: The subtle probing of globular fruits and solanaceous vegetables using machine vision and near-infrared methods. Agronomy, 2024; 14(10): 2395.

[11] Liu J S, Zhao G Z, Liu S X, Liu Y, Yang H W, Sun J W, et al. New progress in intelligent picking: Online detection of apple maturity and fruit diameter based on machine vision. Agronomy, 2024; 14(4): 721.

[12] Lucas M, François A, Marine R, Nathalie G, Angelo S L. Computer vision and deep learning for precision viticulture. Agronomy, 2022; 12(10): 2463.

[13] Mahmud M S, Zaman Q U, Esau T J, Chang Y K, Price G W, Prithiviraj B. Real-time detection of strawberry powdery mildew disease using a mobile machine vision system. Agronomy, 2020; 10(7): 1027.

[14] Ma Z, Wang Y, Zhang T S, Wang H G, Jia Y J, Gao R, et al. Maize leaf disease identification using deep transfer convolutional neural networks. Int J Agric & Biol Eng, 2022; 15(5): 187–195.

[15] Wang Z B, Wang K Y, Wang X F, Pan S H, Qiao X J. Dynamic ensemble selection of convolutional neural networks and its application in flower classification. Int J Agric & Biol Eng, 2022; 15(1): 216–223.

[16] Chen Y Y, Gong C Y, Liu Y Q, Fang X M. Fish identification method based on FTVGG16 convolutional neural network. Transactions of the CSAM, 2019; 50(5): 223–231. (in Chinese)

[17] Sun J, Zhu W D, Luo Y Q, Shen J F, Chen Y D, Zhou X. Recognizing the diseases of crop leaves in fields using improved Mobilenet-V2. Transactions of the CSAE, 2021; 37(22): 161–169. (in Chinese)

[18] Gutiérrez V M, Valdez J J O, Gómez L C R, Manrique C P, Antonio O R, Sánchez L O S, et al. AI-driven plant health assessment: A comparative analysis of inception V3, ResNet-50 and ViT with SHAP for accurate disease identification in Taro. Agronomy, 2024; 15(1): 77.

[19] Wang J L, Song W D, Zheng W G, Feng Q C, Wang M F, Zhao C J. Spatial-channel transformer network based on mask-RCNN for efficient mushroom instance segmentation. Int J Agric & Biol Eng, 2024; 17(4): 227–235.

[20] Xu Y L, Kong S L, Chen Q Y, Gao Z Y, Li C X. Model for identifying strong generalization apple leaf disease using transformer. Transactions of the CSAE, 2022; 38(16): 198–206. (in Chinese)

[21] Fu L L, Huang H, Wang H, Huang S C, Chen D. Classification of maize growth stages using the Swin transformer model. Transactions of the CSAE, 2022; 38(14): 191–200. (in Chinese)

[22] Ni H J, Shi Z W, Karungaru S, Lv S S, Li X Y, Wang X X, et al. Classification of typical pests and diseases of rice based on the ECA attention mechanism. Agriculture, 2023; 13(5): 1066.

[23] Song C X, Yu C Y, Xing Y C, Li S M, He H, Yu H, et al. Algorithm for acquiring multi-phenotype parameters of soybean seed based on OpenCV. Transactions of the CSAE, 2022; 38(20): 156–163. (in Chinese)

[24] Liu X X, Wang S S, Xu L M, Yuan Q C, Ma S, Yu C C, et al. Real time color recognition of moving raisin based on OpenCV. Transactions of the CSAE, 2019; 35(23): 177–184. (in Chinese)

[25] Lai H R, Zhang Y W, Zhang B, Yin Y X, Liu Y Y, Dong Y Y. Design and experiment of the visual navigation system for a maize weeding robot. Transactions of the CSAE, 2023; 39(1): 18–27. (in Chinese)

[26] Jia W K, Zhao D A, Ruan C Z, Shen T, Chen Y, Ji W. De-noising algorithm of night vision image for apple harvesting robot. Transactions of the CSAE, 2015; 31(10): 219–226. (in Chinese)

[27] Wang H C, Wang C G, Zong Z Y, Yin X F, Zhang W X, Wang X R, et al. Blind image denoising of microscopic slices image of Caragana stenophylla Pojark based on noise type and intensity estimation. Transactions of the CSAE, 2017; 33(10): 229–238. (in Chinese)

[28] Wang D F, Wang J. Crop disease classification with transfer learning and residual networks. Transactions of the CSAE, 2021; 37(4): 199–207. (in Chinese)

[29] Guo H P, Cao Y Z, Wang C S, Rong L R, Li Y, Wang T W, et al. Recognition and application of apple defoliation disease based on transfer learning. Transactions of the CSAE, 2024; 40(3): 184–192. (in Chinese)

[30] Su S F, Qiao Y, Rao Y. Recognition of grape leaf diseases and mobile application based on transfer learning. Transactions of the CSAE, 2021; 37(10): 127–134. (in Chinese)

Downloads

Published

2026-05-21

How to Cite

(1)
Meng, X.; Yu, H.; Lyu, W.; Zhao, X.; Lu, C.; Wei, Z.; Li, Y. Method for the Detection and Classification of Quinoa Seeds via Computer Vision. Int J Agric & Biol Eng 2026, 19, 303-309.

Issue

Section

Information Technology, Sensors and Control Systems