Leaf-Detr: Progressive Adaptive Network with Lower Matching Cost for Dense Leaves Detection
Introduction
To detect the dense leaves in the field, we propose the Leaf-DETR dense leaf detection framework, which includes the Progressive Feature Pyramid Network with a progressive framework, the Jointly Trained Auxiliary Head, and the Crowded Query Refinement strategy. As shown in Fig. \ref{fig:leafdetr}, the input leaf image first undergoes preliminary feature extraction by the backbone. Subsequently, the multi-scale features extracted from the backbone further interact and fuse in the P-FPN, which enhances the distinguishability between individual leaves and adjacent leaves. Furthermore, these enhanced features are uniformly encoded by the encoder and then transmitted to the decoder and the jointly trained auxiliary head. The decoder receives information from both the encoder and the auxiliary head simultaneously to expand the training samples. It is equipped with a crowded query refinement strategy to mitigate the adverse effects caused by leaf overlap. Finally, the output results will retain the bounding boxes of both the intact leaves and the occluded leaves.
Dependencies
GitHub: https://github.com/1345149799/Leaf-DETR
Dataset
The largest dataset for dense leaf detection has been created, which includes 1,696 images of dense kiwifruit leaves, with a total of 85,375 target objects. Each image has a high resolution of six million pixels and contains detailed phenotypic characteristics of kiwifruit leaves. The code can be downloaded from here. The datasets of Dense kiwifruit leaf detection dataset can be download from here.Download the dataset to the './data' folder and renamed it as 'coco'.
Pre-trained models
The pre-trained Leaf-DETR model are uploaded. You can download it,and download them to the './weight' folder.
Get started
Train
python
python tools/train.py ./projects/configs/leafdetr/leafdetr_r50_pfpn_1x_coco.py
--work-dir workdir/leafdetr
Test
python
python tools/test.py ./projects/configs/leafdetr/leafdetr_r50_pfpn_1x_coco.py weight/leafdetr.pth
--work-dir workdir/leafdetr
Results
Comparative experiment of different models
Table 1: Comparison of the different object detection models on kiwifruit leaf detection. According to the horizontal line, it is divided into single-stage detectors, two-stage detectors and end-to-end detectors. The indicators of Leaf-DETR outperform those of existing object detectors, confirming its powerful dense leaf detection capability.
Comparison

Figure 1: Visualization comparison. (a)Select the image area with dense leaves, (b) SABL, (c) Faster R-CNN, (d) DDQ, (e) Leaf-DETR. The yellow boxes indicate undetected leaves. The yellow boxes represent the undetected leaves, and Leaf-DETR achieves comprehensive detection. The yellow boxes represent the undetected leaves. Compared with other models, Leaf-DETR has no cases of missed detection, confirming its superior detection coverage.