# A lightweight trichosanthes kirilowii maxim detection algorithm in complex mountain environments based on improved YOLOv7-tiny

**Authors:** Zhongjian Xie, Xinwei Chen, Weilin Wu, Yao Xiao, Yuanhang Li, Yaya Zhang, ZhuXuan Wan, Weiqi Chen

PMC · DOI: 10.1371/journal.pone.0320315 · 2025-04-01

## TL;DR

This paper introduces a lightweight detection algorithm for Trichosanthes kirilowii in complex mountain environments, improving accuracy and efficiency for automated harvesting.

## Contribution

A novel lightweight detection algorithm, KPD-YOLOv7-GD, is proposed with improved accuracy and reduced computational complexity for plant detection in challenging environments.

## Key findings

- The improved network achieved a mean average precision of 93.2%.
- KPD-YOLOv7-GD outperformed other algorithms with precision improvements ranging from 0.2% to 4.8%.
- The model demonstrated high compression rates, making it suitable for resource-constrained harvesting robots.

## Abstract

Detecting Trichosanthes Kirilowii Maxim (Cucurbitaceae) in complex mountain environments is critical for developing automated harvesting systems. However, the environmental characteristics of brightness variation, inter-plant occlusion, and motion-induced blurring during harvesting operations, detection algorithms face excessive parameters and high computational intensity. Accordingly, this study proposes a lightweight T.Kirilowii detection algorithm for complex mountainous environments based on YOLOv7-tiny, named KPD-YOLOv7-GD. Firstly, improve the multi-scale feature layer and reduce the complexity of the model. Secondly, a lightweight convolutional module is introduced to replace the standard convolutions in the Efficient Long-range Aggregation Network (ELAN-A) module, and the channel pruning techniques are applied to further decrease the model’s complexity. Finally, the experiment significantly enhanced the efficiency of feature extraction and the detection accuracy of the model algorithm through the integration of the Dynamic Head (DyHead) module, the Content-Aware Re-Assembly of Features (CARAFE) module, and the incorporation of knowledge distillation techniques. The experimental results showed that the mean average precision of the improved network KPD-YOLOv7-GD reached 93.2%. Benchmarked against mainstream single-stage algorithms (YOLOv3-tiny, YOLOv5s, YOLOv6s, YOLOv7-tiny, and YOLOv8), KPD-YOLOv7-GD demonstrated mean average precision improvements of 4.8%, 0.6%, 3.0%, 0.6%, and 0.2% with corresponding model compression rates of 81.6%, 68.8%, 88.9%, 63.4%, and 27.4%, respectively. Compared with similar studies, KPD-YOLOv7-GD exhibits lower complexity and higher recognition speed accuracy, making it more suitable for resource-constrained T.kirilowii harvesting robots.

## Full-text entities

- **Species:** Trichosanthes kirilowii (Chinese cucumber, species) [taxon 3677]

## Figures

39 figures with captions in the complete paper: https://tomesphere.com/paper/PMC11960957/full.md

---
Source: https://tomesphere.com/paper/PMC11960957