Skip to main content
Log in

Maize tassel detection and counting using a YOLOv5-based model

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

Automated detection and counting of maize tassels are important to enhance yield efficiency. This paper introduces a maize tassel detection and counting technique based on the modified YOLOv5n network. The modifications include using the GELU activation function instead of SiLU, applying attention block to the last C3 structure of the backbone, utilizing depth-wise convolution in the neck part, and employing a spatial-dropout layer in the head part. They make the model learn more complex features, detect tassels better, control overfitting, and reduce inference time. This model is trained and evaluated by Maize Tassel Detection and Counting (MTDC) dataset, and a 6.67% improvement in average precision (AP) as a result of modifications is observed. To investigate the performance of the model in terms of accuracy and inference time, the results of the proposed model are compared with the ones obtained by Faster R-CNN, SSD, RetinaNet, and TasselNetv2+ algorithms. These methods achieve 88.25%, 68.31%, 75.32%, and 78.68% of R2. Also, 52.94%, 68.46%, and 70.99% of AP are obtained by Faster R-CNN, SSD, and RetinaNet algorithms, respectively. These values are reported as 95.72% and 86.69% for the modified YOLOv5n model. The results verify the advantage of the modified YOLOv5n model in detecting and counting the highest number of maize tassels in the least time.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Data availability

The datasets analysed during the current study are available in the Maize Tassel Detection and Counting (MTDC) repository, https://github.com/poppinace/mtdc.

References

  1. Lin TY, Goyal P, Girshick R, He K, Dollár P (2017) Focal loss for dense object detection. In: Proceedings of the IEEE international conference on computer vision, pp 2980–2988

  2. Aich S, Stavness I (2017) Leaf counting with deep convolutional and deconvolutional networks. In: Proceedings of the IEEE International Conference on Computer Vision Workshops, pp 2080–2089

  3. Bekele B, Kekeba K (2020) Developing traffic congestion detection model using deep learning approach: a case study of Addis Ababa City road

  4. Bisong E (2019) Building machine learning and deep learning models on Google cloud platform. Springer

  5. Bochkovskiy A, Wang C-Y, Liao H-YM (2020) Yolov4: Optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934

  6. Choinski M, Rogowski M, Tynecki P, Kuijper DP, Churski M, Bubnicki JW (2021) A first step towards automated species recognition from camera trap images of mammals using AI in a European temperate forest. arXiv preprint arXiv:2103.11052

  7. Chu J, Guo Z, Leng L (2018) Object detection based on multi-layer convolution feature fusion and online hard example mining. IEEE Access 6:19959–19967

    Article  Google Scholar 

  8. Cordonnier J-B, Loukas A, Jaggi M (2020) Multi-head attention: collaborate instead of concatenate. arXiv preprint arXiv:2006.16362

  9. Dillon JV, Langmore I, Tran D, Brevdo E, Vasudevan S, Moore D, Patton B, Alemi A, Hoffman M, Saurous RA (2017) Tensorflow distributions. arXiv preprint arXiv:1711.10604

  10. Dosovitskiy A, Beyer L, Kolesnikov A, Weissenborn D, Zhai X, Unterthiner T, Dehghani M, Minderer M, Heigold G, Gelly S (2020) An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929

  11. Elfwing S, Uchibe E, Doya K (2018) Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Netw 107:3–11

    Article  Google Scholar 

  12. Ghosal S, Zheng B, Chapman SC, Potgieter AB, Jordan DR, Wang X, Singh AK, Singh A, Hirafuji M, Ninomiya S (2019) A weakly supervised deep learning framework for sorghum head detection and counting. Plant Phenomics 2019:1–14

    Article  Google Scholar 

  13. Gómez-Flores W, Garza-Saldaña JJ, Varela-Fuentes SE (2019) Detection of huanglongbing disease based on intensity-invariant texture analysis of images in the visible spectrum. Comput Electron Agric 162:825–835

    Article  Google Scholar 

  14. Guo Y, Li Y, Wang L, Rosing T (2019) Depthwise convolution is all you need for learning multiple visual domains. Proc AAAI Conf Artif Intell 01:8368–8375

    Google Scholar 

  15. Hasan MM, Chopin JP, Laga H, Miklavcic SJ (2018) Detection and analysis of wheat spikes using convolutional neural networks. Plant Methods 14(1):1–13

    Article  Google Scholar 

  16. He K, Zhang X, Ren S, Sun J (2015) Spatial pyramid pooling in deep convolutional networks for visual recognition. IEEE Trans Pattern Anal Mach Intell 37(9):1904–1916

    Article  Google Scholar 

  17. He K, Zhang X, Ren S, Sun J (2016) Deep residual learning for image recognition. In: Proceedings of the IEEE conference on computer vision and pattern recognition pp 770–778

  18. He K, Gkioxari G, Dollár P, Girshick R (2017) Mask r-cnn. In: Proceedings of the IEEE international conference on computer vision pp 2961–2969

  19. Hendrycks D, Gimpel K (2016) Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415

  20. Jeong D (2020) Road damage detection using YOLO with smartphone images. In: 2020 IEEE international conference on big data (big data), pp 5559–5562. IEEE

  21. Ji M, Yang Y, Zheng Y, Zhu Q, Huang M, Guo Y (2021) In-field automatic detection of maize tassels using computer vision. Inf Process Agric 8(1):87–95

    Google Scholar 

  22. Jocher G et al (2020) Yolov5. https://github.com/ultralytics/yolov5

  23. Ketkar N (2017) Introduction to pytorch. In: Deep learning with python. pp 195–208. Springer

  24. Kingma DP, Ba J (2014) Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980

  25. Kumar JP, Domnic S (2019) Image-based leaf segmentation and counting in rosette plants. Inf Process Agric 6(2):233–246

    Google Scholar 

  26. Kumar A, Taparia M, Rajalakshmi P, Desai U, Naik B, Guo W (2019) Uav based remote sensing for tassel detection and growth stage estimation of maize crop using f-rcnn. Comput Vis Problems in Plant Phenotyping 3

  27. Kurtulmuş F, Kavdir I (2014) Detecting corn tassels using computer vision and support vector machines. Expert Syst Appl 41(16):7390–7397

    Article  Google Scholar 

  28. Kuznetsova A, Maleva T, Soloviev V (2020) Detecting apples in orchards using YOLOv3 and YOLOv5 in general and close-up images. In: international symposium on neural networks, pp 233–243. Springer

  29. Li Y, Cao Z, Wu X, Yu Z, Wang Y, Bai X (2013) An image-based approach for automatic detecting five true-leaves stage of cotton. In: MIPPR 2013: remote sensing image processing, geographic information systems, and other applications, p 892110. International Society for Optics and Photonics

  30. Li Y, Yin K, Liang J, Wang C, Yin G (2020) A multi-task joint framework for real-time person search. arXiv preprint arXiv:2012.06418

  31. Li S, Gu X, Xu X, Xu D, Zhang T, Liu Z, Dong Q (2021) Detection of concealed cracks from ground penetrating radar images based on deep learning algorithm. Constr Build Mater 273:121949

    Article  Google Scholar 

  32. Lin T-Y, Dollár P, Girshick R, He K, Hariharan B, Belongie S (2017) Feature pyramid networks for object detection. In: Proceedings of the IEEE conference on computer vision and pattern recognition pp 2117–2125

  33. Liu W, Anguelov D, Erhan D, Szegedy C, Reed S, Fu C-Y, Berg AC (2016) Ssd: single shot multibox detector. In: European conference on computer vision, pp 21–37. Springer

  34. Liu X, Zhao D, Jia W, Ruan C, Tang S, Shen T (2016) A method of segmenting apples at night based on color and position information. Comput Electron Agric 122:118–123

    Article  Google Scholar 

  35. Liu S, Qi L, Qin H, Shi J, Jia J (2018) Path aggregation network for instance segmentation. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp 8759–8768

  36. Liu Y, Cen C, Che Y, Ke R, Ma Y, Ma Y (2020) Detection of maize tassels from UAV RGB imagery with faster R-CNN. Remote Sens 12(2):338

    Article  Google Scholar 

  37. Long X, Deng K, Wang G, Zhang Y, Dang Q, Gao Y, Shen H, Ren J, Han S, Ding E (2020) PP-YOLO: an effective and efficient implementation of object detector. arXiv preprint arXiv:2007.12099

  38. Lu H, Cao Z (2020) Tasselnetv2+: a fast implementation for high-throughput plant counting from high-resolution RGB imagery. Front Plant Sci 11:1929

    Article  Google Scholar 

  39. Lu H, Cao Z, Xiao Y, Zhuang B, Shen C (2017) TasselNet: counting maize tassels in the wild via local counts regression network. Plant Methods 13(1):1–17

    Article  Google Scholar 

  40. Parihar C, Jat S, Singh A, Kumar RS, Hooda K, Chikkappa GK, Singh D (2011) Maize production technologies in India

  41. Pourreza A, Lee WS, Etxeberria E, Banerjee A (2015) An evaluation of a vision-based sensor performance in Huanglongbing disease identification. Biosyst Eng 130:13–22

    Article  Google Scholar 

  42. Qiongyan L, Cai J, Berger B, Okamoto M, Miklavcic SJ (2017) Detecting spikes of wheat plants using neural networks with Laws texture energy. Plant Methods 13(1):1–13

    Article  Google Scholar 

  43. Quan L, Feng H, Lv Y, Wang Q, Zhang C, Liu J, Yuan Z (2019) Maize seedling detection under different growth stages and complex field environments based on an improved faster R–CNN. Biosyst Eng 184:1–23

    Article  Google Scholar 

  44. Rahnemoonfar M, Sheppard C (2017) Deep count: fruit counting based on deep simulated learning. Sensors 17(4):905

    Article  Google Scholar 

  45. Ramchoun H, Idrissi MAJ, Ghanou Y, Ettaouil M (2016) Multilayer perceptron: architecture optimization and training. Int J Interact Multim Artif Intell 4(1):26–30

    Google Scholar 

  46. Redmon J, Farhadi A (2017) YOLO9000: better, faster, stronger. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp 7263–7271

  47. Redmon J, Farhadi A (2018) Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767

  48. Redmon J, Divvala S, Girshick R, Farhadi A (2016) You only look once: unified, real-time object detection. In: Proceedings of the IEEE conference on computer vision and pattern recognition pp 779–788

  49. Rezatofighi H, Tsoi N, Gwak J, Sadeghian A, Reid I, Savarese S (2019) Generalized intersection over union: a metric and a loss for bounding box regression. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition pp 658–666

  50. Rothe R, Guillaumin M, Van Gool L (2014) Non-maximum suppression for object detection by passing messages between windows. In: Asian conference on computer vision pp 290–306. Springer

  51. Sharma V (2020) Face mask detection using YOLOv5 for COVID-19. California State University San Marcos

  52. Simonyan K, Zisserman A (2014) Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556

  53. Tagne A, Feujio T, Sonna C (2008) Essential oil and plant extracts as potential substitutes to synthetic fungicides in the control of fungi. In: International Conference Diversifying crop protection, pp 12–15

  54. Tardieu F, Cabrera-Bosquet L, Pridmore T, Bennett M (2017) Plant phenomics, from sensors to knowledge. Curr Biol 27(15):R770–R783

    Article  Google Scholar 

  55. Tompson J, Goroshin R, Jain A, LeCun Y, Bregler C (2015) Efficient object localization using convolutional networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition pp 648–656

  56. Torres-Sospedra J, Nebot Roglá P (2014) Two-stage procedure based on smoothed ensembles of neural networks applied to weed detection in orange groves

  57. Ubbens J, Cieslak M, Prusinkiewicz P, Stavness I (2018) The use of plant models in deep learning: an application to leaf counting in rosette plants. Plant Methods 14(1):1–10

    Article  Google Scholar 

  58. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser Ł, Polosukhin I (2017) Attention is all you need. In: Advances in neural information processing systems, pp 5998–6008

  59. Wang L, Yan WQ (2021) Tree leaves detection based on deep learning. In: geometry and vision: first international symposium, ISGV 2021, Auckland, New Zealand, January 28-29, 2021, revised selected papers 1, pp 26–38. Springer

  60. Wang C-Y, Liao H-YM, Wu Y-H, Chen P-Y, Hsieh J-W, Yeh I-H (2020) CSPNet: a new backbone that can enhance learning capability of CNN. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops, pp 390–391

  61. Xiong H, Cao Z, Lu H, Madec S, Liu L, Shen C (2019) TasselNetv2: in-field counting of wheat spikes with context-augmented local regression networks. Plant Methods 15(1):1–14

    Article  Google Scholar 

  62. Xu R, Lin H, Lu K, Cao L, Liu Y (2021) A Forest fire detection system based on ensemble learning. Forests 12(2):217

    Article  Google Scholar 

  63. Xue Y, Ray N, Hugh J, Bigras G (2016) Cell counting by regression using convolutional neural network. In: European conference on computer vision, pp 274–290. Springer

  64. Yap MH, Hachiuma R, Alavi A, Brüngel R, Cassidy B, Goyal M, Zhu H, Rückert J, Olshansky M, Huang X (2021) Deep learning in diabetic foot ulcers detection: a comprehensive evaluation. Comput Biol Med 104596

  65. Ye M, Cao Z, Yu Z (2013) An image-based approach for automatic detecting tasseling stage of maize using spatio-temporal saliency. In: MIPPR 2013: remote sensing image processing, geographic information systems, and other applications, p 89210Z. International Society for Optics and Photonics

  66. Zhang Y, Chu J, Leng L, Miao J (2020) Mask-refined R-CNN: a network for refining object details in instance segmentation. Sensors. 20(4):1010

    Article  Google Scholar 

  67. Zhao J, Zhang X, Yan J, Qiu X, Yao X, Tian Y, Zhu Y, Cao W (2021) A wheat spike detection method in UAV images based on improved YOLOv5. Remote Sens 13(16):3095

    Article  Google Scholar 

  68. Zou H, Lu H, Li Y, Liu L, Cao Z (2020) Maize tassels detection: a benchmark of the state of the art. Plant Methods 16(1):1–15

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shahrzad Falahat.

Ethics declarations

Human/animal rights

This article does not contain any studies with human or animal subjects performed by any authors.

Conflict of interest

Shahrzad Falahat declares that she has no conflict of interest. Azam Karami declares that she has no conflict of interest.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Falahat, S., Karami, A. Maize tassel detection and counting using a YOLOv5-based model. Multimed Tools Appl 82, 19521–19538 (2023). https://doi.org/10.1007/s11042-022-14309-6

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-022-14309-6

Keywords

Navigation