Count the trees in an aerial image
Drop a sharp satellite or aerial image (about 0.15–0.6 m per pixel), tell the model the pixel size, and it draws a box around every tree crown it finds. Nothing is uploaded: the detector is a 10 MB model that runs on this page.
Tip: crowns should be roughly 10–60 pixels wide after scaling. If the count looks wrong, the pixel size is usually wrong: measure a known distance (a road, a car) and divide by its length in pixels.
Did the planted trees survive?
The detector runs on each year's image of the same site, using only the red, green and blue bands. The images of two years are aligned, and trees found in the same spot (within 3.5 m) in both are counted as still there. Two sites are American aerial surveys with an infrared reference count; two are Saudi sites seen through Google Earth Pro's historical imagery, 2004–2026, where there is no reference and the picture changes supplier and season from one date to the next.
| From | To | Trees | Still there | New |
|---|
“Still there” is the share of the earlier year's trees found again within 3.5 m after the two images are aligned. It is a lower bound on survival: when the model finds different trees in the two images (different sharpness, light or weeds), the share drops even though the trees are still there.
How the prototype was built
A YOLO detector needs thousands of labelled tree crowns. Instead of drawing them by hand, the labels were made from the near-infrared band of free 0.3–0.6 m aerial imagery, where vegetation is unmistakable. The model only ever sees the ordinary colour image, so it works on imagery that has no infrared band, such as Google Earth. It was then fine-tuned on Saudi date palms: a labelled drone dataset from Al-Kharj and Riyadh, shrunk to satellite scale.
The American figures compare the model with the infrared-derived labels on held-out images. The Saudi figures compare it with hand-drawn boxes on 70 held-back drone photos shrunk to satellite scale: the first real accuracy numbers in the project. The Google Earth counts have not yet been checked by hand.
In Riyadh's climate (under 100 mm of rain a year, summer days above 40 °C) a planted tree that loses its water dies on a scale of days to weeks, not months. Once a young tree's stomata close, the water left in it runs out in about 4 to 14 days at mild air dryness (measured across eight eucalyptus species), and Riyadh's summer air is several times drier than that, so a seedling cut off from irrigation in summer can be past saving within one to two weeks. A Saudi field study of 44,000 acacia seedlings found 23% of planting pits already empty one to four months after planting. Established trees with deep roots are the opposite case: they decline over months, and reduced growth is measurable for 1 to 4 years after a severe drought.
That sets the cadence. A check every few days would not show a crown growing: a tree crown changes visibly over months, so comparing pictures a month apart separates growth from noise. A check every month is also short enough to catch a plot that has stopped being watered before the whole plot is lost, because the losses show up pit by pit over the following weeks. The year-by-year counts on this page use the sharp pictures that exist for a site (one or two a year); the monthly rhythm is for the greenness watch on free Sentinel-2 imagery, which sees the whole plot rather than single trees.
Sources: Blackman et al. 2019, New Phytologist (time from stomatal closure to hydraulic failure, 96–332 h at 1 kPa); Morgan et al. 2026, Results in Engineering (Saudi acacia planting, 23% of pits empty at 1–4 months); Abbas et al. 2019, South African Journal of Botany (acacia seedlings watered weekly instead of daily: 75% survived in full sun, versus 100% watered); Anderegg et al. 2015, Science (reduced growth 1–4 years after severe drought).
- Single trees need sharp imagery: at 10 m (Sentinel-2) a crown is smaller than one pixel. Google Earth Pro gives dated 0.2 m pictures of any Saudi site.
- Without Saudi training data the American model was nearly useless on Saudi palms; a few hundred Saudi photos fixed most of it. More Saudi imagery is the fastest way to improve it further.
- The labels are semi-automatic. Dense, touching canopies (citrus rows) were left out of training; shrubs over about 2 m across count as trees.
- Counts between years need images of similar sharpness; 1 m imagery finds fewer small trees than 0.3 m imagery.
- Next: hand-check 200–300 boxes on the Google Earth pictures of the Saudi sites, and track each tree's box through time for per-tree survival.
Imagery: USDA NAIP on the Microsoft Planetary Computer (public domain); Saudi sites from Google Earth Pro historical imagery, shown with their credit lines (Google Earth · Maxar Technologies · Airbus · CNES) and not used for training. Saudi palm photos: Aerial images of palm trees (Ammar, Koubaa & Benjdira, Agronomy 2021). Model: Ultralytics YOLO11. Browser runtime: ONNX Runtime Web. Training details and scripts are in the Namat repository (the detector folder).