# TreeFormer: a Semi-Supervised Transformer-based Framework for Tree Counting from a Single High Resolution Image

arXiv: https://arxiv.org/abs/2307.06118 · HTML: https://mlsanity.com/paper/2307.06118/

## Key facts

- Cited by 6 papers in the map (data through 14 Oct 2026).
- Builds on 33 of its 84 references that are in the map.
- First posted on arXiv 12 Jul 2023.

## Builds on (most cited first, 30 of 33)

- [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://mlsanity.com/paper/2010.11929/) (2020)
- [Squeeze-and-Excitation Networks](https://mlsanity.com/paper/1709.01507/) (2017)
- [Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions](https://mlsanity.com/paper/2102.12122/) (2021)
- [Swin-Unet: Unet-like Pure Transformer for Medical Image Segmentation](https://mlsanity.com/paper/2105.05537/) (2021)
- [Semi-Supervised Semantic Segmentation with Cross-Consistency Training](https://mlsanity.com/paper/2003.09005/) (2020)
- [CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes](https://mlsanity.com/paper/1802.10062/) (2018)
- [Interpolation Consistency Training for Semi-Supervised Learning](https://mlsanity.com/paper/1903.03825/) (2019)
- [Efficient Object Localization Using Convolutional Networks](https://mlsanity.com/paper/1411.4280/) (2014)
- [NWPU-Crowd: A Large-Scale Benchmark for Crowd Counting and Localization](https://mlsanity.com/paper/2001.03360/) (2020)
- [Distribution Matching for Crowd Counting](https://mlsanity.com/paper/2009.13077/) (2020)
- [End-to-end people detection in crowded scenes](https://mlsanity.com/paper/1506.04878/) (2015)
- [Locate, Size and Count: Accurately Resolving People in Dense Crowds via Detection](https://mlsanity.com/paper/1906.07538/) (2019)
- [TransCrowd: weakly-supervised crowd counting with transformers](https://mlsanity.com/paper/2104.09116/) (2021)
- [Leveraging Unlabeled Data for Crowd Counting by Learning to Rank](https://mlsanity.com/paper/1803.03095/) (2018)
- [CrowdNet: A Deep Convolutional Network for Dense Crowd Counting](https://mlsanity.com/paper/1608.06197/) (2016)
- [Exploiting Unlabeled Data in CNNs by Self-supervised Learning to Rank](https://mlsanity.com/paper/1902.06285/) (2019)
- [Recent Advances in Deep Learning for Object Detection](https://mlsanity.com/paper/1908.03673/) (2019)
- [Spatial Uncertainty-Aware Semi-Supervised Crowd Counting](https://mlsanity.com/paper/2107.13271/) (2021)
- [Semi-Supervised Crowd Counting via Self-Training on Surrogate Tasks](https://mlsanity.com/paper/2007.03207/) (2020)
- [Counting Everyday Objects in Everyday Scenes](https://mlsanity.com/paper/1604.03505/) (2016)
- [Counting with Focus for Free](https://mlsanity.com/paper/1903.12206/) (2019)
- [PCC Net: Perspective Crowd Counting via Spatial Convolutional Network](https://mlsanity.com/paper/1905.10085/) (2019)
- [Towards Using Count-level Weak Supervision for Crowd Counting](https://mlsanity.com/paper/2003.00164/) (2020)
- [HA-CCN: Hierarchical Attention-based Crowd Counting Network](https://mlsanity.com/paper/1907.10255/) (2019)
- [Learning to Count in the Crowd from Limited Labeled Data](https://mlsanity.com/paper/2007.03195/) (2020)
- [Active Crowd Counting with Limited Supervision](https://mlsanity.com/paper/2007.06334/) (2020)
- [Redesigning Multi-Scale Neural Network for Crowd Counting](https://mlsanity.com/paper/2208.02894/) (2022)
- [FusionCount: Efficient Crowd Counting via Multiscale Feature Fusion](https://mlsanity.com/paper/2202.13660/) (2022)
- [Cross-regional oil palm tree counting and detection via multi-level attention domain adaptation network](https://mlsanity.com/paper/2008.11505/) (2020)
- [Deep Rank-Consistent Pyramid Model for Enhanced Crowd Counting](https://mlsanity.com/paper/2201.04819/) (2022)

## Built on by (most cited first, 6 of 6)

- [OpenForest: A data catalogue for machine learning in forest monitoring](https://mlsanity.com/paper/2311.00277/) (2023)
- [OAM-TCD: A globally diverse dataset of high-resolution tree cover maps](https://mlsanity.com/paper/2407.11743/) (2024)
- [A Comprehensive Review on Tree Detection Methods Using Point Cloud and Aerial Imagery from Unmanned Aerial Vehicles](https://mlsanity.com/paper/2309.16375/) (2023)
- [AdaTreeFormer: Few Shot Domain Adaptation for Tree Counting from a Single High-Resolution Image](https://mlsanity.com/paper/2402.02956/) (2024)
- [WHU-STree: A Multi-modal Benchmark Dataset for Street Tree Inventory](https://mlsanity.com/paper/2509.13172/) (2025)
- [Counting Trees from Satellite Imagery with Noisy Supervision](https://mlsanity.com/paper/2606.24786/) (2026)

## Abstract (arXiv)

Automatic tree density estimation and counting using single aerial and satellite images is a challenging task in photogrammetry and remote sensing, yet has an important role in forest management. In this paper, we propose the first semisupervised transformer-based framework for tree counting which reduces the expensive tree annotations for remote sensing images. Our method, termed as TreeFormer, first develops a pyramid tree representation module based on transformer blocks to extract multi-scale features during the encoding stage. Contextual attention-based feature fusion and tree density regressor modules are further designed to utilize the robust features from the encoder to estimate tree density maps in the decoder. Moreover, we propose a pyramid learning strategy that includes local tree density consistency and local tree count ranking losses to utilize unlabeled images into the training process. Finally, the tree counter token is introduced to regulate the network by computing the global tree counts for both labeled and unlabeled images. Our model was evaluated on two benchmark tree counting datasets, Jiangsu, and Yosemite, as well as a new dataset, KCL-London, created by ourselves. Our TreeFormer outperforms the state of the art semi-supervised methods under the same setting and exceeds the fully-supervised methods using the same number of labeled images. The codes and datasets are available at https://github.com/HAAClassic/TreeFormer.
