Spatial analysis of hyperspectral images for detecting adulteration levels in bon-sorkh (Allium jesdianum L.) seeds: Application of voting classifiers - Golshid Fathi; Seyed Ahmad Mireei; Mehrnoosh Jafari; Morteza Sadeghi; Hassan Karimmojeni; Majid Nazeri (Smart Agricultural Technology)
Bon-sorkh (Allium jesdianum L.) is a flowering plant with various reported beneficial properties. The rising price of bon-sorkh seeds has led some opportunists to distribute counterfeit seeds. This study assessed the feasibility of hyperspectral imaging to detect different adulteration levels (10%, 20%, 30%, 40%, and 50%) in bon-sorkh seeds adulterated with shallot seeds, the most similar to bon-sorkh based on spectral features. Hyperspectral images of pure and adulterated seed samples were acquired in the spectral range of 400–1000 nm. After image preprocessing using median blur and bilateral filters, pixel-wise classification models were developed using artificial neural networks, random forest, and voting classifiers to detect pure bon-sorkh and shallot seeds. A hard voting strategy was employed in the voting classifier, combining gradient boosting and histogram gradient boosting models. Additionally, competitive adaptive reweighted sampling (CARS), the successive projections algorithm, and extreme gradient boosting were used for feature selection to identify efficient wavelengths. Despite the promising performance of artificial neural networks in distinguishing pure bon-sorkh and shallot seeds, the voting classifiers demonstrated better generalization in classifying pure test images and were therefore applied to detect adulteration levels and identify the spatial distribution of bon-sorkh and shallot seeds. The results indicated the superiority of the voting model based on the median blur filter, which distinguished various adulteration levels with a total root mean squares error (RMSE) of 3.94%. Among the different feature selection methods, CARS-selected features performed best, with the corresponding voting model satisfactorily detecting adulteration levels, resulting in a RMSE of 6.69%. This study highlights the potential of hyperspectral imaging combined with voting classifiers to detect varying levels of shallot adulteration in bon-sorkh seeds.