top of page

Forest AI tree recognition: Can a Neural Network Count a Forest?

Updated: Jan 15

The answer is affirmative; it is possible to train a neural network to detect objects such as trees even in very densely forested areas, though performing this task is not as simple as it might initially seem. Here is the summary of our project in the forest AI tree recognition.


The aim of our project is to develop a web application for forest area management based on artificial intelligence, which is tasked with detecting and recognizing trees over large forested areas. In our project, we utilize neural networks built on the ResNet-50-FPN framework of the PyTorch library.

Commercial use of such an application is only feasible through high effectiveness in detecting and recognizing forest objects, and achieving this requires meeting several conditions.


The quality of the images intended for training the neural network is crucial. Despite the availability of satellite images from sources like Google Earth, the quality of images obtained from such sources is low and does not allow for effective training of the neural network. Below is an example image from Google Earth, showing a forest from an altitude of approximately 470 meters.

Google Earth photo of a forest
Google Earth photo of a forest

As can be seen, the resolution of this image is very low, making it difficult to distinguish individual tree crowns, and the exposure of trees is not perpendicular.


In our application, we train and detect trees based on images taken by drones from an altitude of about 100 meters. Hundreds or even thousands of overlapping images are used to prepare an orthophoto map (a map with perpendicular exposure) of large forest areas, typically covering hundreds to thousands of hectares. Below is an example section of such a map.

UAV photo of a forest (~100m height)
UAV photo of a forest (~100m height)

These maps are the material for training the neural network. Before the neural network is trained, a key element is the proper preparation of images. The entire process of image preparation and training is quite complex and requires access to computer units equipped with graphics processors. The result of the training is a neural network model, which is then used for prediction. Below is an example section of a map with detected objects.

AI detection of tree species in a forest
AI detection of tree species in a forest

The neural network model detects objects and provides the coordinates of the bounding boxes surrounding the detected object, along with the probability with which the model detected the given object and its name.

AI detection of tree species in a forest (zoomed)
AI detection of tree species in a forest (zoomed)

The final result of the neural network operation is the detection and classification of objects on the prepared map. Based on the neural network predictions, statistical analyses of a given forest can be prepared, including counting the number of various tree species, clustering areas of too high or too low density, estimating available timber volumes, etc. Below is an example map with objects detected by the neural network.

Summary of AI detection on a map
Summary of AI detection on a map

As seen in the above image, in an area of 205 hectares, the model detected 12,251 pines, 1,483 spruces, 932 birches, and 76 aspens—which was to be proven.


Krzysztof G., Senior AI Engineer @ Apptimia


Apptimia has delivered many software projects with processing of data collected by UAVs (Unmanned Aerial Vehicles) in the cloud. Contact us for details.

bottom of page