Automatic counting soybean pods and seeds in outdoor fields allows for rapid yield estimation before harvesting, while indoor laboratory counting offers greater accuracy. Both methods can significantly accelerate the breeding process. However, it remains challenging for accurately counting pods and seeds in outdoor fields, and there are still no accurate enough tools for counting pods and seeds in laboratories. In this study, we developed efficient deep learning models for counting soybean pods and seeds in both outdoor fields and indoor laboratories. For outdoor fields, annotating not only visible seeds but also occluded seeds makes YOLO have the ability to estimate the number of soybean seeds that are occluded. Moreover, we enhanced YOLO architecture by integrating it with HQ-SAM (YOLO-SAM), and domain adaptation techniques (YOLO-DA), to improve model robustness and generalization across soybean images taken in outdoor fields. Testing on soybean images from the outdoor field, we achieved a mean absolute error (MAE) of 6.13 for pod counting and 10.05 for seed counting. For the indoor setting, we utilized Mask-RCNN supplemented with a Swin Transformer module (Mask-RCNN-Swin), models were trained exclusively on synthetic training images generated from a small set of labeled data. This approach resulted in near-perfect accuracy, with an MAE of 1.07 for pod counting and 1.33 for seed counting across actual laboratory images from two distinct studies.
翻译:在田间环境下自动计数大豆豆荚与籽粒可实现收获前的快速产量估算,而室内实验室计数则能提供更高的准确性。这两种方法均可显著加速育种进程。然而,田间豆荚与籽粒的精确计数仍具挑战性,且目前仍缺乏足够精确的实验室计数工具。本研究开发了适用于田间与室内环境的高效深度学习模型用于大豆豆荚与籽粒计数。针对田间场景,通过标注可见籽粒及被遮挡籽粒,使YOLO模型具备估算被遮挡大豆籽粒数量的能力。此外,我们将YOLO架构与HQ-SAM集成(YOLO-SAM),并结合领域自适应技术(YOLO-DA),以提升模型在田间大豆图像中的鲁棒性与泛化能力。在田间图像测试中,豆荚计数的平均绝对误差(MAE)为6.13,籽粒计数MAE为10.05。针对室内场景,我们采用融合Swin Transformer模块的Mask-RCNN(Mask-RCNN-Swin),模型仅使用基于少量标注数据生成的合成训练图像进行训练。该方法在两项独立研究的实际实验室图像测试中达到接近完美的精度,豆荚计数MAE为1.07,籽粒计数MAE为1.33。