Zanthoxylum infructescence detection based on adaptive density clustering

Published: 26 March 2024
Abstract Views: 1199
PDF: 87
Publisher's note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.


To determine the Zanthoxylum yield, infructescence detection during the early fruiting stage is a prerequisite. The purpose of this research is to determine and quantify the infructescences on photos of Zanthoxylum’s early fruit-bearing branches that are gathered in their natural habitat. Consequently, a two-phase machine vision-based algorithm for identifying Zanthoxylum infructescences is proposed. First, the fruits of Zanthoxylum infructescences are extracted by extracting the histogram of oriented gradient (HOG) feature map and excess green minus excess red (ExGR) index from the branch image of the plant. The second involves roughly and adaptively classifying fruits based on the density of their position distribution. Rough clusters are then combined using an optimization model to produce the best possible clustering outcome. Experiments with normal samples demonstrate that the proposed approach receives a precision of 96.67%, a Recall of 91.07%, and an F1-score of 0.93. Compared to ADPCkNN, DBSCAN, and OPTICS algorithms, the suggested algorithm performs better in robustness and attains a higher F1-score and recall. In the meantime, its competitiveness is demonstrated in the deep learning-based method experiments. The tests demonstrate its efficacy in adaptively detecting the infructescences of branch images of Zanthoxylum.



PlumX Metrics


Download data is not yet available.


Ankerst, M., Breunig, M. M., Kriegel, H.-P., Sander, J. 1999. OPTICS: Ordering points to identify the clustering structure. Sigmod Rec. 28:49–60. DOI:
Biglia, A., Zaman, S., Gay, P. 2022. 3D point cloud density-based segmentation for vine rows detection and localisation. Comput. Electron. Agr. 199:107166. DOI:
Caliński, T., Harabasz, J. 1974. A dendrite method for cluster analysis. Commun. Stat-Theor. M. 3:1–27. DOI:
Dalal, N., Triggs, B. 2005. Histograms of oriented gradients for human detection. 2005 IEEE. Comput. Soc. Conf., San Diego, CA, USA, 1:886–893. DOI:
Ester, M., Kriegel, H.-P., Sander, J., Xu, X. 1996. A density-based algorithm for discovering clusters in large spatial databases with noise. ACM SIGKDD Conference on Knowledge Discovery and Data Mining., Portland, OR, USA, 96:226–231.
Gao, F., Fang, W., Sun, X., Wu, Z., Zhao, G., Li, G., Li, R., Fu, L., Zhang, Q. 2022. A novel apple fruit detection and counting methodology based on deep learning and trunk tracking in modern orchard. Comput. Electron. Agr. 197:107000. DOI:
Ji, W., Peng, J., Xu, B., Zhang, T., 2023. Real-time detection of underwater river crab based on multi-scale pyramid fusion image enhancement and MobileCenterNet model. Comput. Electron. Agr. 204:107522. DOI:
Jocher, G., Ayush Chaurasia, Stoken, A., Borovec, J., NanoCode012, Yonghye Kwon, Kalen Michael, TaoXie, Jiacong Fang, Imyhxy, Lorna, Zeng Yifu, Wong, C., Abhiram V, Montes, D., Zhiqiang Wang, Fati, C., Jebastin Nadar, Laughing, UnglvKitDe, Sonck, V., Tkianai, YxNONG, Skalski, P., Hogan, A., Dhruv Nair, Strobel, M., Jain, M., 2022. YOLOv5 by Ultralytics, GitHub. Available from:
Kuang, M., Zhang, L., Li, S., Yang, S., Qu, S., Dong, P. 2020. Problems and countermeasures of pepper industry development in Chongqing. South China Agriculture. 11–13.
Li, C., Tang, Y., Zou, X., Zhang, P., Lin, J., Lian, G., Pan, Y., 2022. A Novel Agricultural Machinery Intelligent Design System Based on Integrating Image Processing and Knowledge Reasoning. Appl. Sci-Basel. 12:7900. DOI:
Lin, G., Tang, Y., Zou, X., Cheng, J., Xiong, J., Fruit detection in natural environment using partial shape matching and probabilistic Hough transform[J]. Precis. Agric. 2020, 21:160-177. DOI:
Lu, J., Lee, W. S., Gan, H., Hu, X. 2018. Immature citrus fruit detection based on local binary pattern feature and hierarchical contour analysis. Biosyst. Eng. 171:78–90. DOI:
Lv, J., Xu, H., Han, Y., Lu, W., Xu, L., Rong, H., Yang, B., Zou, L., Ma, Z. 2022. A visual identification method for the apple growth forms in the orchard. Comput. Electron. Agr. 197:106954. DOI:
Ma, Z., Tao, Z., Du, X., Yu, Y., Wu, C. 2021. Automatic detection of crop root rows in paddy fields based on straight-line clustering algorithm and supervised learning method. Biosyst. Eng. 211:63–76. DOI:
Maulik, U., Bandyopadhyay, S. 2002. Performance evaluation of some clustering algorithms and validity indices. IEEE T. Pattern Anal. 24:1650–1654. DOI:
Meyer, G. E., Neto, J. C., Jones, D. D., Hindman, T. W. 2004. Intensified fuzzy clusters for classifying plant, soil, and residue regions of interest from color images. Comput. Electron. Agr. 42:161–180. DOI:
Ren, S., He, K., Girshick, R., Sun, J., 2015. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. Adv. Neur. In. 28.
Rodriguez, A., Laio, A. 2014. Clustering by fast search and find of density peaks. Science. 344:1492–1496. DOI:
Tan, K., Lee, W. S., Gan, H., Wang, S. 2018. Recognising blueberry fruit of different maturity using histogram oriented gradients and colour features in outdoor scenes. Biosyst. Eng. 176:59–72. DOI:
Tang, Y., Chen, M., Wang, C., Luo, L., Li, J., Lian, G., Zou, X., 2020. Recognition and Localization Methods for Vision-Based Fruit Picking Robots: A Review. Front. Plant. Sci. 11:510. DOI:
Tang, Y., Zhou, H., Wang, H., Zhang, Y., 2023. Fruit detection and positioning technology for a Camellia oleifera C. Abel orchard based on improved YOLOv4-tiny model and binocular stereo vision. Expert. Syst. Appl. 211:118573. DOI:
Wang, C.-Y., Bochkovskiy, A., Liao, H.-Y.M., 2022. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv Preprint. arXiv: 2207.02696v1. DOI:
Xu, B., Cui, X., Ji, W., Yuan, H., Wang, J., 2023. Apple Grading Method Design and Implementation for Automatic Grader Based on Improved YOLOv5. Agriculture. 13:124. DOI:
Xu, Z., Huang, X., Huang, Y., Sun, H., Wan, F. 2022. A Real-Time Zanthoxylum Target Detection Method for an Intelligent Picking Robot under a Complex Background, Based on an Improved YOLOv5s Architecture. Sensors. 22:Article 2. DOI:
Yaohui, L., Zhengming, M., Fang, Y. 2017. Adaptive density peak clustering based on K-nearest neighbors with aggregating strategy. Knowl-Based. Syst. 133:208–220. DOI:
Zhang, C., Zhang, K., Ge, L., Zou, K., Wang, S., Zhang, J., Li, W. 2021. A method for organs classification and fruit counting on pomegranate trees based on multi-features fusion and support vector machine by 3D point cloud. Sci. Hortic-Amsterdam. 278:109791. DOI:
Zhang, X., Li, X., Zhang, B., Zhou, J., Tian, G., Xiong, Y., Gu, B. 2018. Automated robust crop-row detection in maize fields based on position clustering algorithm and shortest path method. Comput. Electron. Agr. 154:165–175. DOI:
Zhang, X., Toudeshki, A., Ehsani, R., Li, H., Zhang, W., Ma, R. 2022. Yield estimation of citrus fruit using rapid image processing in natural background. Smart Agricultural Technology. 2:100027. DOI:
Zhou, Y., Tang, Y., Zou, X., Wu, M., Tang, W., Meng, F., Zhang, Y., Kang, H., 2022. Adaptive Active Positioning of Camellia oleifera Fruit Picking Points: Classical Image Processing and YOLOv7 Fusion Algorithm. Appl. Sci-Basel. 12:12959. DOI:
Zhu, E., Ma, R. 2018. An effective partitional clustering algorithm based on new clustering validity index. Appl. Soft Comput. 71:608–621. DOI:

How to Cite

Wu, D., Zeng, S., Wang, S., Chen, Y. and Xu, Y. (2024) “<i>Zanthoxylum</i> infructescence detection based on adaptive density clustering”, Journal of Agricultural Engineering, 55(2). doi: 10.4081/jae.2024.1568.