Skip to content

The challenges of NAIP tree predictions ​

The challenges of using aerial imagery for tree identification are well documented; much smarter people than us have spent a lot of time on it. But we’d like to run through a few of the challenges that make it interesting, as we work on our new predictions from NAIP aerial imagery.

Trees are layered ​

This is maybe the most obvious; municipal tree datasets have big and small trees, and sometimes the small trees are under the big ones!

A canopy above a canopySide view of a broad, tall tree with three smaller trees underneath its crown. A camera looks down onto the large crown. Dashed outlines reveal the small trees that the camera cannot see.looking downsmall trees, hidden below
A tree can be in the inventory and still be hidden beneath another tree’s crown. Solid lines trace the view; dashed lines show what is hidden. Schematic, not to scale.

Trees are not uniformly opaque; some are extremely dense, and some actually do let through a view of the undergrowth, making handling this a little inconsistent.

This is exacerbated by the next common one:

Cameras are taking pictures at an angle ​

Depending on where the camera is, some undergrowth will be visible and some will not.

Same trees, different viewThe same three small trees are labelled A, B, and C throughout this sequence. On level ground, the camera sees A on the near side and C beyond the large crown. The large crown blocks B. Solid green sight lines reach A and C; the blocked line to B becomes dashed.AvisibleBhiddenCvisible
On level ground, A and C are visible. B is hidden behind the large crown. Follow the same three trees in the next two sketches. Solid lines trace the view; dashed lines show what is hidden. Schematic, not to scale.

NAIP tiles are orthorectified - corrected to line up with a map - but that cannot reveal something hidden in the original photograph. These sketches show the viewing geometry at capture, with the angles exaggerated to make it easier to see.

Worse, the ground can be on an angle.

Now tilt the groundThe camera and trees keep their horizontal positions, but the ground now rises toward the camera on the left. Tree C is lower on the far side, so the camera’s sight line meets the large crown. A remains visible; B and C are hidden.AvisibleBhiddenChidden
Tilt the ground up toward the camera, and C drops behind the large crown too. A is still visible; B and C are now hidden. Solid lines trace the view; dashed lines show what is hidden. Schematic, not to scale.

And let’s not stop there - not all trees grow straight!

And let the tree leanOn the same slope, the large tree now leans toward the camera. Its crown moves left and down, clearing the sight lines to B and C. A, B, and C are now visible. A dotted vertical reference marks the upright trunk position.AvisibleBvisibleCvisible
Now lean the large tree toward the camera. Its crown moves out of the way, exposing B and C. The small trees have not moved. Solid lines trace the view; dashed lines show what is hidden. Schematic, not to scale.

Buildings get in the way too ​

Which leads us also to: big buildings block trees just as big trees block small trees.

A roof where you expected a treeA camera above and to the left looks toward a small tree behind a tall building. The sight line hits the roof first, then continues as a dashed line toward the hidden crown. A cross marks the tree’s recorded ground location.rooftree location
A recorded tree location does not guarantee that the corresponding image shows a tree. Solid lines trace the view; dashed lines show what is hidden. Schematic, not to scale.

Training on raw locations runs into this quite a bit in urban cores; you’re training a model to recognize a roof, not a tree.

Shadows are part of the picture ​

On a slightly more nuanced note, shadows are crucial, both for human identification and - likely - for machine learning. For example, a long, thin palm tree can be particularly distinctive in its shadow.

Same palm, different shadowsTwo oblique views show the same standing palm with a slender trunk and arching, feathered fronds. The morning photo has a long shadow extending from the trunk’s base. In the midday photo, the shadow is much shorter and close to the base. Both shadows include the trunk and fronds.Morning photoMidday photo
The same palm in morning and midday light. As the sun gets higher, the shadow gets shorter. Schematic, not to scale.

This means that the time of day is a confounding factor to some degree for generalization - training on a consistent angle and shadow can result in overfitting to that.

This was a particular challenge as we started to assemble synthetic recombinant aerial tiles to help with specific problem tasks; we had to be very careful to ensure that we were not combining tiles with unrealistic mixes of angle and shadow direction. We want models to be able to generalize from shadows for detection, not learn that shadow direction is randomized.

Further reading ​

A few useful starting points, if you’d like to get further into the weeds. These cover urban imagery, close-range drone imagery, and other remote-sensing data; their results are not accuracy estimates for our NAIP predictions.

Interested in talking trees? arborary.world@gmail.comTree data © the respective municipal publishers and © OpenStreetMap contributors (ODbL).