Real-Time Branch-to-Tool Distance Estimation for Autonomous UAV Pruning: Benchmarking Five DEFOM-Stereo Variants from Simulation to Jetson Deployment
Organizations: Centre for Data Science and Artificial Intelligence, Victoria University of Wellington, Wellington, New Zealand · Department of Computer Science and Software Engineering, University of Canterbury, Canterbury, New Zealand
Abstract
Autonomous tree pruning with unmanned aerial vehicles (UAVs) is a safety-critical real-world task: the onboard perception system must estimate the metric distance from a cutting tool to thin tree branches in real time so that the UAV can approach, align, and actuate the pruner without collision. We address this problem by training five variants of DEFOM-Stereo - a recent foundation-model-based stereo matcher - on a task-specific synthetic dataset and deploying the checkpoints on an NVIDIA Jetson Orin Super 16 GB. The training corpus is built in Unreal Engine 5 with a simulated ZED Mini stereo camera capturing 5,520 stereo pairs across 115 tree instances from three viewpoints at 2m distance; dense EXR depth maps provide exact, spatially complete supervision for thin branches. On the synthetic test set, DEFOM-Stereo ViT-S achieves the best depth-domain accuracy (EPE 1.74 px, D1-all 5.81%, delta-1 95.90%, depth MAE 23.40 cm) but its Jetson inference speed of ~2.2 FPS (~450 ms per frame) remains too slow for responsive closed-loop tool control. A newly introduced balanced variant, DEFOM-PrunePlus (~21M backbone, ~3.3 FPS on Jetson), offers the best deployable accuracy-speed trade-off (EPE 5.87 px, depth MAE 64.26 cm, delta-1 87.59%): its frame rate is sufficient for real-time guidance and its depth accuracy supports safe branch approach planning at the 2m operating range. The lightweight DEFOM-PruneStereo (~6.9 FPS) and DEFOM-PruneNano (~8.5 FPS) run fast but sacrifice substantial accuracy (depth MAE > 57 cm), making estimates too unreliable for safe actuation. Zero-shot inference on real photographs confirms that full-capacity models preserve branch geometry, validating the sim-to-real transfer. We conclude that DEFOM-PrunePlus provides the most practical accuracy-latency balance for onboard distance estimation, while ViT-S serves as the reference for future hardware.
Figures & tables
| Component | Count | Description |
| Tree instances | 115 | Individual simulated trees |
| View categories | 3 | Upward, downward, parallel |
| Stereo pairs per view | 16 | Captured at 2 m distance |
| Stereo pairs per tree | 48 | |
| Total stereo pairs | 5520 | Full UE5 dataset |
| Per-sample labels | Dense | RGB left/right + EXR depth |
| Model | Backbone | Decoder | Conv Layers | GRU | fnet dim | DINOv2 Scale |
| DEFOM-Stereo ViT-S | DINOv2 ViT-S | Dual DPT (RefineNet) | 66 | 3-level [128] | 256-d | 1.0 |
| DEFOM-Stereo ViT-L | DINOv2 ViT-L | Dual DPT (RefineNet) | 66 | 3-level [128] | 256-d | 1.0 |
| DEFOM-PrunePlus | DINOv2 ViT-S | EnhancedDPT (2 RCU) | 14 | 2-level [128] | 192-d | 1.0 |
| DEFOM-PruneStereo | DINOv2 ViT-S | FastDPT | 6 | 2-level [96] | 128-d | 0.75 |
| DEFOM-PruneNano | DINOv2 ViT-S | TurboDecoder + Ghost | 3 | DS-GRU [64] | 96-d | 0.5 |
| Setting | ViT-S | ViT-L | D-Prune+ | D-PruneS. | D-PruneN. |
| Batch size | 10 | 6 | 10 | 10 | 10 |
| Train iters | 18 | 18 | 14 | 10 | 7 |
| Scale iters | 8 | 8 | 4 | 3 | 2 |
| Valid iters | 32 | 32 | 20 | 12 | 9 |
| Mixed prec. | On | Off | On | On | On |
| Stabilization | None | 3-ep. warm-up | None | None | None |
| Model | EPE (px) | Disp. RMSE (px) | D1-all (%) | Bad 1.0 (%) | (%) | (%) | (%) | Depth MAE (cm) | Depth RMSE (cm) | Depth AbsRel |
| DEFOM-Stereo ViT-S | 1.744 | 5.824 | 5.81 | 13.29 | 95.90 | 98.15 | 99.00 | 23.40 | 157.83 | 0.041 |
| DEFOM-Stereo ViT-L | 1.630 | 5.371 | 6.36 | 16.15 | 95.75 | 98.11 | 98.98 | 26.94 | 170.70 | 0.046 |
| DEFOM-PrunePlus | 5.874 | 12.796 | 20.12 | 41.15 | 87.59 | 93.76 | 96.49 | 64.26 | 283.78 | 0.146 |
| DEFOM-PruneStereo | 12.322 | 23.753 | 23.76 | 37.93 | 82.71 | 90.03 | 93.93 | 57.63 | 279.98 | 0.207 |
| DEFOM-PruneNano | 13.056 | 24.226 | 40.12 | 59.49 | 68.96 | 83.53 | 90.45 | 112.16 | 414.36 | 0.379 |
| Model | PyTorch (ms) | TRT FP16 (ms) | FPS (TRT) | Depth MAE (cm) | Usable? |
| DEFOM-Stereo ViT-S | 1210 | 450 | 2.2 | 23.40 | |
| DEFOM-Stereo ViT-L | 3350 | 1180 | 0.8 | 26.94 | |
| DEFOM-PrunePlus | 800 | 300 | 3.3 | 64.26 | ✓ |
| DEFOM-PruneStereo | 380 | 145 | 6.9 | 57.63 | |
| DEFOM-PruneNano | 240 | 118 | 8.5 | 112.16 |
Metric Depth Estimation
Metric depth estimation predicts scene distances in physical units from images, supporting robotics, mapping, augmented reality, and 3D reconstruction.
See all 62 papers