Skip to main content

Tree Counter Version 2.0

Cyprus Tree Mapping with Deep Learning and Remote Sensing

The Motivation: As urban areas continue to grow rapidly, managing green infrastructure within cities has become increasingly important. Trees and green spaces in urban environments not only help clean the air and cool down heat-prone areas, but also significantly improve residents’ quality of life. However, mapping these urban trees poses significant challenges due to the complex dynamics of cityscapes. Factors such as building shadows, diverse architectural layouts, and the sparse distribution of trees make the task even more difficult. 

In Tree Counter Version 1.0, we introduced a deep learning-based model capable of detecting and counting trees from satellite images. While the model had very high precision, we observed a slight drop in accuracy when applied to densely built-up urban areas, as the model was trained mainly by focusing on rural and sub-rural areas. In this blog post, we present our latest work, which enhances the existing model to more effectively map urban trees in Nicosia, Cyprus, using satellite imagery.

The Method: The project focused on training deep learning models using high-resolution visible satellite imagery. Thousands of images from dense urban regions across various parts of Nicosia were manually selected and annotated. Trees were labelled either as smaller or larger entities, based on their canopy size, as observed in satellite images.

Our proprietary AI model was trained using these labelled images in a supervised manner to recognize and highlight the locations of trees. To count the number of trees accurately, a proprietary tree-counting algorithm was developed. Once the model identifies the regions covered by tree canopies, the tree-counting algorithm takes over. It starts by detecting the tree canopy contours and then overlays a hexagonal grid within those boundaries. We chose a hexagonal grid because it represents the random spacing of trees better than a square grid. Within this grid, the algorithm approximates the positions of individual tree centre’s. Hyperparameters such as tree radius and canopy overlap threshold were selected experimentally, based on the typical size and spatial distribution of trees in the study area.

The Result: To check how well the model worked, we evaluated the results using Precision and Recall. A comparison between Tree-Counter-v2.0 and Tree-Counter-v1.0 is provided in the table below. To verify the performance of the tree-counting algorithm, we also evaluated how close the predicted tree counts were to the actual number of trees. On a test set with 13,459 trees, the Mean Absolute Error was 2.73.

Tree-Counter-v1.0

Tree-Counter-v2.0

Precision

Recall

Precision

Recall

Urban

70%

65%

85%

81%

Rural Urban

70%

63%

87%

82%

Urban Green

70%

66%

80%

80%

These results show that the improved model can successfully detect and count trees even in dense urban areas, making it a useful tool for mapping green spaces in urban locations. 

Aerial view of Agioi Omologites with visible tree areas
Snapshot over Agioi Omologites with circles indicating the located trees.

The Importance: This project plays a crucial role in helping us understand the distribution of trees within densely populated urban areas around the world. Mapping urban greenery at this scale provides valuable insights for city planners, environmental agencies, and policymakers. With an accurate tree census in the spatiotemporal domain, authorities can monitor the status of urban green spaces, identify areas lacking vegetation, reduce the urban heat island effect, and support afforestation or reforestation efforts where needed. 

The Perspective: The success of this initiative demonstrates how modern technologies, like deep learning combined with high-resolution satellite imagery, can produce reliable environmental data even in complex city environments. This information can guide urban planning decisions, promote the creation and preservation of green zones, help mitigate urban heat effects, and improve the overall sustainability and livability of cities. By making greenery a measurable and trackable asset, cities can move toward smarter, greener development strategies.

You can find more information about our Tree Detection service here.