Vision-Based Counting of Horticultural Seeds Using ViT-UNet Density Regression for Post-Harvest Quality Assessment

Reliable counting of horticultural seeds is important for seed grading, batch consistency assessment, packaging, sowing-rate control, and post-harvest quality evaluation. Manual counting is labor-intensive, whereas conventional image-processing methods can be sensitive to seed adhesion, visual similarity, background variation, and illumination changes. This study developed a lightweight ViT-UNet density regression framework for point-supervised multiclass counting of cucumber, tomato, and pepper seeds. Vision Transformer (ViT) features were integrated with a U-Net-style decoder to predict category-specific density maps from RGB images. A dataset containing 231 images and 7789 annotated seed instances was constructed, and a held-out test set of 36 images was used for final evaluation. For total-count estimation, the proposed model achieved a mean absolute error (MAE) of 4.0678, root mean squared error (RMSE) of 5.1896, mean absolute percentage error (MAPE) of 14.7104%, and R2 of 0.8272. Bootstrap resampling yielded a 95% confidence interval of 3.0517–5.1832 for total-count MAE, and paired Wilcoxon signed-rank tests with Holm–Bonferroni correction provided statistical support for lower image-level total-count absolute errors of the proposed model relative to the evaluated deep-learning baselines and the ablation model. The network forward pass reached 94.10 FPS, whereas the full image-processing pipeline reached 2.55 FPS, indicating real-time inference potential at the model level but not yet full-pipeline industrial deployment. These results suggest that ViT-UNet density regression is a useful basis for non-destructive multiclass seed counting, while category-level discrimination, external validation, and pipeline optimization remain priorities for future work.

Authors

Institutions

Publication Details

Journal
Horticulturae
Published
2026-08-03
DOI
https://doi.org/10.3390/horticulturae12080961
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Vision-Based Counting of Horticultural Seeds Using ViT-UNet Density Regression for Post-Harvest Quality Assessment

张春祥 Zhang Chunxiang, Maosen Xu, Ziheng Tang, Yiming Zhang et al.
Horticulturae
Smart Agriculture and AI
article

Vision-Based Counting of Horticultural Seeds Using ViT-UNet Density Regression for Post-Harvest Quality Assessment

张春祥 Zhang Chunxiang, Maosen Xu, Ziheng Tang, Yiming Zhang, Jiegang Mou, Mengxue Dong
article en

Abstract

Reliable counting of horticultural seeds is important for seed grading, batch consistency assessment, packaging, sowing-rate control, and post-harvest quality evaluation. Manual counting is labor-intensive, whereas conventional image-processing methods can be sensitive to seed adhesion, visual similarity, background variation, and illumination changes. This study developed a lightweight ViT-UNet density regression framework for point-supervised multiclass counting of cucumber, tomato, and pepper seeds. Vision Transformer (ViT) features were integrated with a U-Net-style decoder to predict category-specific density maps from RGB images. A dataset containing 231 images and 7789 annotated seed instances was constructed, and a held-out test set of 36 images was used for final evaluation. For total-count estimation, the proposed model achieved a mean absolute error (MAE) of 4.0678, root mean squared error (RMSE) of 5.1896, mean absolute percentage error (MAPE) of 14.7104%, and R2 of 0.8272. Bootstrap resampling yielded a 95% confidence interval of 3.0517–5.1832 for total-count MAE, and paired Wilcoxon signed-rank tests with Holm–Bonferroni correction provided statistical support for lower image-level total-count absolute errors of the proposed model relative to the evaluated deep-learning baselines and the ablation model. The network forward pass reached 94.10 FPS, whereas the full image-processing pipeline reached 2.55 FPS, indicating real-time inference potential at the model level but not yet full-pipeline industrial deployment. These results suggest that ViT-UNet density regression is a useful basis for non-destructive multiclass seed counting, while category-level discrimination, external validation, and pipeline optimization remain priorities for future work.

HorticulturaeVol. 12(8)
National University of Singapore (SG), China Jiliang University (CN), Zhejiang University (CN)
China Scholarship Council, Department of Education of Zhejiang Province
Peace, Justice and strong institutions
Openalex Percentile: Top 11%
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.