This study generates country-wide custom mosaics for RapidEye for 2010 and 2011 (5-m resolution), and PlanetScope (3-m resolution) for 2018, 2019, 2020, 2021 and 2022. We trained deep learning models to detect individual non-forest trees for each year, and studied changes between years by tracking the tree crown center over the years. We calculated a change confidence for each tree, which is composed of a multi-year detection confidence to be able to quantify the uncertainty of the detection and of the change. The 2010/2011 maps detected mostly larger trees, but differences in image quality impeded exhaustive wall-to-wall mapping. The newer maps available after 2018 provide a more spatially consistent mapping of all agroforestry trees, however the mapping was designed to exclude dense plantations and small/young trees. We did not set a strict height or crown size threshold for the Planet data analysis, but a previous study has shown that trees below 4 m height and with a crown size below 10 m2 are likely not to be detected15, and that trees with crown sizes above 20 m2 can be mapped with a relatively high confidence. Hence, comparing the 2010 maps with the 2018-2022 maps gives an overview of the disappearance of large trees, while the tracking of trees during 2018-2022 includes all trees that have reached a certain crown size, excluding newly planted trees.
Monitoring trees at the level of individuals over time requires consistency in high quality images and reliable tree detection methods. While this would be easier to address by using sub-meter imagery, these data are not available as time series over large areas. Imagery from nano-satellites are available at 3-5 m resolution at a high temporal frequency, but the quality of the images captured from several hundred different satellites varies substantially. This concerns in particular the image sharpness, and smaller trees will not be visible in images that are blurred: a type of information which is not obvious from the scene metadata. Imagery at this spatial resolution is not suitable for pixel-wise stacking as image composites due to variations in the viewing angle. What is most important for the detection of trees is sharpness, and most other aspects, such as the number of spectral bands, can be neglected. Our solution to this issue was to filter each downloaded scene for sharpness using a blur kernel23, and if a certain threshold was not reached, the image was blacklisted and the area was filled with different images until the threshold was passed.
The method used for the tree detection in this study diverges from previous deep learning based approaches14,15. Studying changes at tree level at continental scale requires a highly accurate and robust detection method that works over a variety of satellite images and landscapes. Here, we developed a heatmap based detection method17,18 that can be quickly trained with a large amount of point labels, and is also being able to separate adjacent tree crowns reliably.
Image preparation
The RapidEye constellation was operational from 2009 to 2019 and consisted of 5 nano-satellites. The spatial resolution is 5 m and the spectral bands are red, green, blue, red edge, and near infra-red. The PlanetScope constellation consists of 130+ nano-satellites with a resolution of 3-4 m and red, green, blue, and near infra-red bands. We formed custom 1x1 degree mosaic tiles, each consisting of about 30 scenes for RapidEye, and about 120 scenes (Dove Classic) or 60 scenes (Super Dove) for PlanetScope15. A histogram matching algorithm with Landsat and Sentinel-2 scenes from the same time period was applied for each tile to adjust differences in colors and form a homogeneous mosaic. The images were acquired following a phenological window, derived from the MODIS phenology product (MOD09): For areas with deciduous trees, determined by the WorldCover map4, images were acquired from the period between “senescence” and “mid-greendown”. This particular period was selected as it represents the period after herbaceous vegetation has passed its productivity peak, whereas trees still have green leaves, faciliating the detection of tree crowns. For areas with evergreen trees, images were acquired between the “mid-greendown” and the “dormancy”, which is a period were herbaceous vegetation are not productive, but trees have full green leaves. If too few images were available meeting this criteria, we progressively extended the length of the time window until a maximum of 60 days was reached. If too few images were still to be found, we loosened the filtering criteria, allowing progressively lower “visible-confidence-percent” values down to 60 to be included. We applied strict filtering criteria to use only images that are entirely free of clouds and have a low sun elevation (below 50), which facilitates the identification of trees by their shadow. The ground sample distance (GSD) of PlanetScope images varies between 3.1 and 4.7 m, and we only retained images that have a GSD close to 3.1 m, and never used imagery with a GSD above 4 m.
The identification of small trees is only possible in sharp images, and since there is a large variation in image sharpness between scenes which cannot be seen in the meta-data, we applied a blur kernel to estimate the sharpness of the scene directly after download. The blur kernel is described in ref.23, and we followed their recommendation to set a threshold of 0.23. We disregarded all scenes below this threshold, and redownloaded the areas until the scene was classified as sharp. We only applied the blur kernel in images where the forest, shrubland, water, bare soil and wetland classes accounted for less than 50% of the scene coverage, as the calculation of the blurriness score was found to be unreliable over these land cover classes.
Since there is no reliable metadata on cloud cover in RapidEye images, we calculated the standard deviation for each downloaded scene, and disregarded all scenes where the blue band had a very high standard deviation, which is typically the case in cloudy images. This did not guarantee fully cloud-free images, but, together with the blur kernel, removed most of the contaminated scenes.
The entire framework was automated and the filling of a 1x1 degree tile required about 2-3 hours using a university connection, but can be performed in a parallelized way, so the downloading, filtering and processing of one year requires less than one week for all India. All processing was done locally, and the raw data for one year is about 2.5 terrabyte. As a final step, we applied a Contrast Limited Adaptive Histogram Equalization (CLAHE) to each mosaic and normalized the bands to values between 0-255.
Training data
We manually labeled trees with point labels at the tree crown center, using separate models for PlanetScope (about 130,000 labels) and RapidEye (about 100,000 labels), including labels from all years. For each labeled tree, we used high resolution images in Google Earth and Bing to verify if the trees existed. A large number of sub-meter images around 2010 were available from Bing maps and were used to verify labels from RapidEye, while Google Earth images were from recent years and used to verify labels from PlanetScope images. The labels were generated as in iterative process. In the first round, labels were generated over a variety of landscapes and image conditions (that is different viewing angles, sharpness levels, etc), being spatially well distributed across India. Then a first model was trained and trees were predicted over the study area. Subsequently, labels were added in areas where the performance was not satisfying, according to a visual inspection, and this process was repeated until the result was visually satisfying.
Trees are more challenging to map in RapidEye images at 5 m (6.5 m ground sample distance) as compared to PlanetScope data. They become clearly visible if they cover 4 pixels, which would translate to a crown size of >100 m2. To reduce the number of false positives in our classififcation, we did not aim at a wall-to-wall mapping of trees in RapidEye images in 2010, but instead opted for a very low misclassification rate. Consequently, we only labeled clear examples, resulting in some heterogeneity in the tree maps, related to image quality, remaining cloud cover, sun elevation, and visibility of the trees, generating a sample set of trees from 2010 with a certain randomness. By adding a second year, 2011, the combined results became more spatially consistent and homogeneous.
Tree detection
To produce the most reliable assessment of tree densities, we adapted a detection approach previously used to count dense objects, such as persons in a crowd. Our method is inspired by ref.17 and ref.18 and uses Convolutional Neural Networks (CNNs) to produce a confidence map indicating the location of individual trees. The peak of the confidence map (“heatmap”) is assumed to be the center of a tree crown (Extended Data Fig. 2). The advantage of this method over previous methods14,15 is that it can be trained by point labels, which enables a rapid generalization and adjustment over large areas and different scene quality levels.
Heatmap-based detections typically transform discrete point labels into continuous Gaussian kernels, more suited to smooth optimization. It irequires deciding on fixed kernel scale, which is not straightforward here given the high level of variability in tree sizes, image quality, and potential offsets between labeled and actual tree centers. Ref. 21 proposed a solution with adaptive kernels, where the model is given a degree of freedom through a scale map which resizes the Gaussian kernels on-the-fly during training. They also weigh the regression loss to focus on misestimated pixels, similarly to the Focal loss22. Here, we applied the same method, with two important modifications: we removed the linear approximation used originally and instead drew exact Gaussian kernels on-the-fly, and we only allowed scale factors > 1, with a minimum standard deviation of 4.5 m for PlanetScope and 5 m for RapidEye. We found that these adjustments lead to smoother heatmaps with less artifacts, which ultimately made it easier to tune the important hyperparameters of scale regularization and base Gaussian standard deviation (6 m for PlanetScope, 6.7 m for RapidEye).
We trained the models over 2500 epochs, with a learning rate of 1e-5 until epoch 2000, after which we used a linearly decreasing learning rate. The training process was monitored using 20% of the training data as validation data. We trained 5 models with different random splits of the training data (but always used 80% for training and 20% for validation). The F1 scores on the heatmaps for all models ranged between 0.44-0.47 for a close radius of 5 m, and 0.67-0.69 for a wider radius of 50 m, which is close to the values from ref. 17, although they used aerial images of higher spatial resolution. We then predicted on the mosaics using an ensemble over the 5 models and averaged the results of the heatmaps. The local maxima of the ensemble heatmap were converted to a point file, reflecting the centers of tree crowns. The peak confidence at the crown center was saved as an attribute value associated with each centroid, reflecting the detection confidence. All peaks with a confidence above 0.35 were included in the following analyses. If the confidence was below 0.35, we considered this as no tree being detected.
A previously published tree crown segmentation model14,15 was updated with 52,000 manually drawn crown labels from India, and a tree crown segmentation was conducted for the year 2021. Although this method is less reliable than the heatmap based detection, it provides an overview of the crown size distribution of the trees. Results showed that trees with a crown size below 20 m2 were under-detected (Extended Data Table 1). We further located 22.7 million large trees with a crown size >100 m2, which matches with the number of high confidence trees detected by RapidEye in 2010/2011 (22 million; confidence >0.8). Note that trees with a crown size >50 m2 or 100 m2 represent only a small fraction of the woody populations, with a proportion of about 20% and 4%, respectively (Extended Data Table 1).
We sampled trees from the heatmap predictions for the same area from both PlanetScope (n = 2.1 million) and RapidEye (n = 1.2 million) for 2019 (where RapidEye was still operational). We used the tree crown segmentation to determine the tree crown sizes of the point predictions from both PlanetScope and RapidEye, by overlaying the tree crown segments with the point predictions and associating the crown area as an attribute to the points. We found that the average tree crown size of the samples was 55 m2 from PlanetScope and 62 m2 from RapidEye. Trees detected with a confidence >0.8 had an average crown size of 96 m2 for RapidEye. For PlanetScope, trees with a confidence >0.7 had a crown size of 67 m2 and <0.7 the crown size was on average 59 m2. This gives evidence that a higher confidence value also indicates a larger crown size.
Mapping changes and change confidence
This study focuses on tree losses rather than gains, as new trees are typically not growing large over a few years, and consequently they would not be detected in a reliable way. Moreover, the 2010 classification did not allow for wall-to-wall mapping.
We developed a framework that via crown center detection can track individual trees over an arbitrary number of temporal steps. We defined a circular buffer area of 15 m around the center of a detected tree and searched for centroid equivalents over the following images/years. If no tree was detected within the buffer area in the later years, the tree was counted a loss. If several trees were detected within the buffer, the closest tree was chosen.
For the long term comparison between the early and late epoch, we combined the results from RapidEye (2010 and 2011) to reflect the early period, and also PlanetScope (2018-2022) to reflect the later period. Tree crown centers found in the early period were then compared with the later period, and a tree was either classified as disappeared, which means it was only observed in 2010/2011 but not during the later period, or as remaining, which means the tree was observed in both periods.
For the tracking of trees over the period 2018-2022, we developed a metric we named change confidence, which quantifies the confidence of our tree detection into the following three classes: disappeared, tree, and low confidence tree/misclassification. A tree was marked as low confidence tree if it was only detected in one year with a low or medium confidence. The detection may be due to a misclassification, or if the tree is too small to be reliably monitored over several years and was thus only detected in one year, so it was not included in the reported statistics. A centroid was marked as “tree”, if a tree was detected in one year with a very high confidence, or several years with a low or medium confidence. We marked a tree as disappeared if it was detected in either 2018 or 2019 with a high confidence, or in both years with a medium confidence, and then was not detected in three consecutive years (2020, 2021, and 2022). Mapping of disappearing trees and also remaining trees with a low change confidence (<0.7) should be treated with caution. For example, if a tree mapped during 2018-2022 was only mapped in 2018 with a confidence of 0.5, it is likely that the tree is small or a false detection. If the tree is mapped only in 2018 with a confidence of 1.0, it is likely that the tree was then lost, as it was not mapped during 2019-2022. This assumes that a tree with a high confidence is a large tree that should be detected at least twice over 5 years. Contrastingly, if a tree was mapped with a lower confidence of 0.5 in 2018, but also in 2021 and 2022, the class is “tree” and the overall change confidence is higher, as the tree was detected in 3 years, which reduces the risk of a misclassification.
Sources of uncertainties
Our change confidence metric quantifies uncertainty at tree level. Only focusing on trees with a high change confidence reduces the uncertainty of the change instances reported, but also misses a number of cases of change that are real - but where the confidence is low due to image quality issues or the tree has a small crown. There are however, a number of remaining sources of uncertainty that are challenging to quantify:
A tree was only counted as disappeared during 2018-2022 if the combined confidence of 2018 and 2019 was above 0.7, and the tree was not detected between 2020-2022. While this gives a certain robustness, we observed cases where the image quality was excellent in both 2018 and 2019 resulting in very high confidence predictions, but the image quality was less ideal in all subsequent years 2020-2022, so some trees were missed in these three years, causing trees to be falsely classified as being disappeared. To account for this, we assumed that high quality images in general generate higher confidence predictions compared to lower quality images, so we calculated the average detection confidence of all trees within 1x1 km cells as a measure of image quality for each particular cell, which also accounts for quality variations within images. We then calculated a linear slope through the 1x1 km confidence grids, with time as the independent variable. A strong negative slope (< -0.05) implies that the average confidence in 2020-2022 was considerably lower than in 2018-2019, so we flagged this area as uncertain, and losses were not included in our reported numbers. The confidence slope map represents an additional layer (to the change confidence) that quantifies uncertainty that we provide with the database.
Some RapidEye scenes are spatially shifted, which leads to erroneous classifications of tree losses. When comparing the 2010/2011 results with the 2018-2022 results, we calculated the proportion of trees disappearing for each RapidEye scene footprint. If the proportion was above 40%, scenes were likely shifted and we masked them. We also manually masked scenes that were clearly shifted, visible by sharp edges along footprints.
A final source of uncertainty that cannot be quantified is the land cover map included in our analysis. We used the WorldCover map from 2020 to retain only croplands for the 2010-2018 comparison, and cropland, urban and bare for the 2018-2022 comparison. The quality of the landcover map impacts on the results, and it happens that large farmland trees or groups of trees are masked out as forest, or that the underlying classification is not correct. Future versions may include custom landcover maps which may lead to improved results. Using a landcover map from 2020 to study changes over 10 years can include areas that have been cleared for cropping and have not previously been farmland before, or were under fallow, or plantation forest. However, we observed that these areas rarely included large trees, but rather shrubs and small trees, and by reporting mainly the loss of high confidence trees, these are automatically excluded.
Evaluation of the tree detections and changes
We randomly selected 1000 points mapped as disappeared trees between 2010/2011 and 2018-2022 to evaluate the uncertainty on the reported long-term losses. The same 1000 points were used to evaluate if trees were correctly mapped in 2010/2011 or if it was a false detection. We further selected 1000 random trees that had been mapped as disappeared trees over 2018-2022 to evaluate the uncertainty related to disappeared trees over the PlanetScope period. Each point was manually and visually checked on the images and in Google Earth, also using the historic images where available. For the losses, we only considered high confidence changes, with values above 0.8 for RapidEye and 0.7 for PlanetScope. Uncertainties would be higher if different confidence thresholds are used. False detections of trees for 2010/2011 were found to be 3%. False losses for 2010-2018 were 2%. False losses for 2018-2022 were 21%.
We further conducted twelve qualitative interviews with villagers in the Telangana, Haryana, Kerala, Maharastra, Andrah Pradesh, Uttar Pradesh, Kashmir, and Jammu provinces during August 2023. The interviews were about 20-60 minutes each, and we asked about soils, management systems, water resources, changes in the number of trees, and reasons for possible changes. Participants were on average 59 years old.