Agroforestry inventory - one detection model per species

Detects individual plants in agroforestry systems from drone RGB orthophotos.

Code, viewer and one-command pipeline: https://github.com/COURAGEOUS-LAND/agroforestry-inventory

Run it with no setup: open agroforestry_inventory_colab.ipynb in Google Colab.

Models

species file precision recall position error median crown trained at
Pitaya (Hylocereus spp.) pitaia.pth 0.89 0.98 0.07 m 0.97 m Raizes farm, Sao Paulo, Brazil
Arabica coffee (Coffea arabica) cafe.pth 0.72 0.91 0.03 m 0.36 m Raizes farm, Sao Paulo, Brazil
Avocado (Persea americana) abacate.pth 0.69 0.94 0.12 m 1.52 m Raizes farm, Sao Paulo, Brazil
Banana (Musa spp.) banana.pth 0.59 0.93 0.18 m 3.11 m Raizes farm, Sao Paulo, Brazil

Precision is how many of the reported plants are real; recall is how many of the real plants were found.

How these numbers were measured

Against hand-drawn labels, inside completed windows, matched one-to-one within 1 m. Only windows whose labels are entirely manual are used - comparing a model against labels it produced itself would be circular.

Read this first

None of these models transfers to another site without loss. This is measured, not a disclaimer: a coffee model scoring mAP 0.826 on its own validation set found 2 of 198 plants in held-out windows a few hundred metres away - recall 0.01 - while its precision stayed at 1.00. It did not hallucinate; it went blind, and nothing in the output said so. Before trusting a count on your imagery, check a sample by hand. The numbers below hold for the site and the flight each model was trained on, and for nothing else.

Where each model fails

Arabica coffee (Coffea arabica) - The smallest crown in the set (0.36 m). Under closed canopy or heavy shading, neighbouring plants stop being separable. Outside the Raizes farm there is no guarantee at all.

Avocado (Persea americana) - Confuses other broad dark-leaved crowns when they share the scene. Trained on 120 labels only.

Pitaya (Hylocereus spp.) - The best model in the set, and the one with the fewest labels - what it has is the widest spatial distribution. The crop is trellised at regular spacing; performance on irregular planting was not measured.

Banana (Musa spp.) - The worst precision in the set: 0.59. Banana grows in clumps, and the model often counts suckers of the same mat as separate individuals. If you need mats rather than leaves, this error is systematic and you will overcount.

Training detail

species labels windows GSD recommended dedup
Arabica coffee (Coffea arabica) 324 18 1.66 cm/px 0.3 m
Avocado (Persea americana) 120 27 1.66 cm/px 0.7 m
Pitaya (Hylocereus spp.) 100 22 1.66 cm/px 0.4 m
Banana (Musa spp.) 133 14 1.66 cm/px 1.4 m

Training imagery is about 1.7 cm per pixel, from RTK drone flights. Very different resolutions degrade the result.

Licence

Weights under CC-BY-4.0. The accompanying code is GPL-3.0.

Developed by Courageous Land.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support