Logo PTI Logo FedCSIS

Proceedings of the 21st Conference on Computer Science and Intelligence Systems (FedCSIS)

Annals of Computer Science and Information Systems, Volume 47

What Improves UAV RGB Segmentation of Maize and Weeds? An Ablation Study of U-Net Components

, , , , ,

DOI: http://dx.doi.org/10.15439/2026F0439

Citation: Massimo Martinelli, , , , ,

Full text

Abstract. The use of RGB images acquired by unmanned aerial vehicles (UAVs) is increasingly common in precision agriculture, for monitoring crops, weeds, and field conditions. However, large variations in plant size, illumination, shadows, and background appearance make automatic segmentation difficult. A major challenge is discriminating crop plants from weeds that may compete for resources and identifying conditions that may favor the development of plant diseases. In this study, we evaluated U-Net-based semantic segmentation models on 142 UAV RGB images from two maize fields using grouped 5-fold cross-validation in order to segment maize, weeds, and bare soil. Starting from a full model including ResNet-101 encoder with attention, deep supervision, weighted boundary and focal losses, Allen-Cahn/Ginzburg-Landau regularization and horizontal flip test-time augmentation (TTA), we have conducted an ablation study by removing one component at time to evaluate its impact. The best overlap-based performance was obtained without deep supervision, while the lowest boundary error, measured by the 95th percentile Hausdorff Distance (HD95), was achieved without attention. We saw that using the Excess Green parameter made little or no difference compared to the standard method, while using a fixed threshold reconstruction always worsened performance. However, some examples sometimes contained isolated mislabeled pixels for weeds close to the image borders in the reference mask: these outliers can significantly increase the distance-based metrics, even when the prediction correctly ignores them. For weeds, overlap metrics and visual inspection were more informative than HD95, which was too sensitive to small annotation errors located near the edges of the image. Overall, our results suggest that a simpler segmentation pipeline is preferable for this dataset, that hard-threshold reconstruction is unreliable, and that the quality of annotation is a critical factor when interpreting distance-based metrics for weeds.

References

  1. O. Ronneberger, P. Fischer, and T. Brox, “U-Net: Convolutional Networks for Biomedical Image Segmentation,” in Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, vol. 9351, 2015, pp. 234–241.
  2. O. Oktay, J. Schlemper, L. Le Folgoc, M. Lee, M. Heinrich, K. Misawa, K. Mori, S. McDonagh, N. Y. Hammerla, B. Kainz, B. Glocker, and D. Rueckert, “Attention U-Net: Learning Where to Look for the Pancreas,” arXiv preprint https://arxiv.org/abs/1804.03999, 2018.
  3. C.-Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu, “Deeply-Supervised Nets,” in Proc. 18th Int. Conf. Artificial Intelligence and Statistics (AISTATS), vol. 38, 2015, pp. 562–570.
  4. Z. Luo, W. Yang, Y. Yuan, R. Gou, X. Li, "Semantic segmentation of agricultural images: A survey",Information Processing in Agriculture, Volume 11, Issue 2, 2024, Pages 172-186, ISSN 2214-3173, https://dx.doi.org/10.1016/j.inpa.2023.02.001.
  5. L. Sandoval-Pillajo, I. García-Santillán, M. Pusdá-Chulde, and A. Giret, “Weed detection based on deep learning from UAV imagery: A review,” Smart Agricultural Technology, vol. 12, 2025, Art. no. 101147. https://dx.doi.org/10.1016/j.atech.2025.101147.
  6. B. Deng, Y. Lu, and J. Xu, “Weed database development: An updated survey of public weed datasets and cross-season weed detection adaptation,” Ecological Informatics, vol. 81, Jul. 2024, Art. no. 102546, https://dx.doi.org/10.1016/j.ecoinf.2024.102546.
  7. J. Cui, F. Tan, N. Bai, and Y. Fu, “Improving U-net network for semantic segmentation of corns and weeds during corn seedling stage in field” Frontiers in Plant Science, vol. 15, 2024, Art. no. 1344958. https://dx.doi.org/10.3389/fpls.2024.1344958.
  8. E. Celikkan, T. Kunzmann, Y. Yeskaliyev, S. Itzerott, N. Klein, and M. Herold, “WeedsGalore: A Multispectral and Multitemporal UAV-Based Dataset for Crop and Weed Segmentation in Agricultural Maize Fields” in Proc. IEEE/CVF Winter Conf. Applications of Computer Vision (WACV), 2025, pp. 4767–4777.
  9. H. M. Sahin, T. Miftahushudur, B. Grieve, H. Yin "Segmentation of weeds and crops using multispectral imaging and CRF-enhanced U-Net" Computers and Electronics in Agriculture, Volume 211, 2023, 107956, ISSN 0168-1699, 10.1016/j.compag.2023.107956
  10. J. Tao, Q. Qiao, J. Song, S. Sun, Y. Chen, Q. Wu, Y. Liu, F. Xue, H. Wu, and F. Zhao, “Deep Learning-Driven Automatic Segmentation of Weeds and Crops in UAV Imagery,” Sensors, vol. 25, no. 21, Art. no. 6576, 2025.
  11. Y. Huang and A. Bais, “Unsupervised Domain Adaptation for Weed Segmentation Using Greedy Pseudo-labelling,” in Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition Workshops (CVPRW), 2024.
  12. M. Beneš, V. Chalupecký, and K. Mikula, “Geometrical image segmentation by the Allen–Cahn equation,” Applied Numerical Mathematics, vol. 51, no. 2–3, pp. 187–205, 2004.
  13. C. Banerjee, K. Nguyen, O. Salvado, T. Tran, and C. Fookes, “PINNs for Medical Image Analysis: A Survey,” arXiv preprint https://arxiv.org/abs/2408.01026, 2024.