BICANET: individual tree crown detection in aerial RGB imagery

Models of the paper Individual tree crown detection based on optimized machine learning and remote sensing data (Y. M. Baqer and Y. A. Hamad, University of Kirkuk; submitted to the International Journal of Electrical and Computer Engineering Systems, IJECES, manuscript IJECES-2026-5278).

BICANET is a Faster R-CNN detector with a ConvNeXt-Tiny backbone, a two-layer bidirectional feature pyramid (BiFPN) and anchor sizes computed from the training data only. It detects tree crowns as bounding boxes in RGB drone and aerial images. Every model was trained with three seeds (42, 126, 456) on a site-disjoint partition of the Tree Crown Dataset (Larch Casebearer drone imagery, Sweden; NEON airborne imagery, USA): the test sites were never seen during training, and every design choice and score threshold was selected on validation data.

Architecture

Quick start

pip install -r requirements.txt            # add rasterio for GeoTIFF / GeoJSON in map coordinates
hf download y37z/bicanet-tree-crown-detection --include "bicanet/seed_42/*" "bicanet_code/*" inference.py requirements.txt --local-dir bicanet
cd bicanet
python inference.py --model bicanet/seed_42 --image my_tile.jpg --viz my_tile_boxes.jpg

More examples:

# a folder of drone tiles -> one CSV per image
python inference.py --model bicanet/seed_42 --image tiles/ --out results/ --format csv

# a large georeferenced orthomosaic -> crown polygons in map coordinates, with per-crown greenness
python inference.py --model bicanet/seed_42 --image ortho.tif --out crowns.geojson --health --viz preview.jpg

# date palms
python inference.py --model palm-square/seed_42 --image palm_farm.jpg --out palms.json
Option Meaning
--threshold score threshold; default: the threshold selected on validation F1 (config.json)
--tile, --overlap, --tile-trigger tree-crown models: images larger than 1,600 px are processed in 1,500 px windows with 25 % overlap (the size of the training tiles), merged by NMS; palm models: whole image (as trained). --tile N sets the window size, --tile 0 processes the whole image
--health adds per-crown VARI and GRVI (mean over the green-dominant pixels of each box, as in Section 8 of the paper)
--out .json, .csv or .geojson (map coordinates for georeferenced GeoTIFFs when rasterio is installed)
--viz saves a copy of the image with the detected boxes
--device cuda or cpu (CPU works, but is slow)

Each detection has xmin, ymin, xmax, ymax (pixels of the input image), score, and with --health, vari and grvi (lower values = less green crown). The processing follows the paper: RGB image resized to 512 x 512 px (bilinear; letterbox first for palm-letterbox), test-time augmentation (identity, horizontal and vertical flip, NMS at IoU 0.5), and the validation-selected threshold. On first use, timm downloads the ImageNet ConvNeXt-Tiny weights to build the model; they are then replaced by the weights of this repository.

Models

Folder Content
bicanet/ Main model (C4), three seeds; any seed can be used (results below)
palm-square/ BICANET fine-tuned on Palm RGB (date palms), square resize, three seeds
palm-letterbox/ Same, aspect-preserving letterbox, three seeds
ablation/ C1b (ResNet-50 + FPN reference; C1a = the same weights without TTA), C2 (+CBAM), C3 (ConvNeXt + FPN), C4-COCO (COCO default anchors)

Each seed_*/ folder holds model.safetensors (weights only) and config.json (architecture, anchors, preprocessing, validation-selected threshold, test metrics overall and per source, SHA-256 of the weights).

Results

Test sites never seen in training: the Kampe Larch site and five NEON sites (310 images, 39,362 crowns). All detectors were scored by the same code: one-to-one matching at IoU >= 0.5, COCO mAP over IoU 0.50:0.95 with up to 2,000 detections per image, and P, R, F1 at the threshold selected on validation F1.

BICANET, mean ± SD over three seeds

Test data mAP AP50 AP75 P R F1
All test sites 0.419 ± 0.004 0.701 ± 0.006 0.466 ± 0.006 0.895 ± 0.009 0.655 ± 0.002 0.756 ± 0.003
Larch (Kampe) 0.565 ± 0.002 0.912 ± < 0.001 0.646 ± 0.004 0.941 ± 0.007 0.854 ± 0.007 0.895 ± 0.001
NEON (5 sites) 0.036 ± 0.005 0.124 ± 0.020 0.012 ± 0.001 0.535 ± 0.043 0.155 ± 0.020 0.240 ± 0.028

On the NEON sites, whose crowns are small (median side 20 px against 123 px on Larch), all detectors trained on this corpus perform poorly; zero-shot DeepForest is better there (F1 0.582). Over all test sites, BICANET has the highest mAP, AP75, precision and F1 of the five detectors compared in the paper, while YOLO26s has a slightly higher AP50 (0.713) and recall (0.666).

Representative detections

Representative detections of bicanet/seed_42 (blue: correct, red: false positive, yellow: missed crown). Per source, the tile whose F1 is closest to the median is shown. Imagery: Larch Casebearer (Swedish Forest Agency), NEON (Weinstein et al., 2021), Sepilok (Hickman and Jackson, Zenodo 5515408).

Per seed

Model Threshold mAP AP50 AP75 P R F1
bicanet/seed_42 0.34 0.419 0.700 0.463 0.899 0.653 0.756
bicanet/seed_126 0.40 0.423 0.708 0.473 0.901 0.656 0.759
bicanet/seed_456 0.35 0.416 0.696 0.461 0.885 0.655 0.753

Ablation (paired comparisons in the paper: the backbone gives most of the gain; the BiFPN a small gain in every seed; CBAM and the training-set anchors do not help)

Model Threshold mAP AP50 AP75 P R F1
ablation/C1b/seed_42 0.43 0.399 0.692 0.433 0.883 0.640 0.742
ablation/C1b/seed_126 0.35 0.394 0.688 0.420 0.843 0.656 0.738
ablation/C1b/seed_456 0.35 0.396 0.684 0.431 0.862 0.647 0.739
ablation/C2/seed_42 0.33 0.408 0.685 0.451 0.867 0.650 0.743
ablation/C2/seed_126 0.35 0.387 0.679 0.410 0.870 0.626 0.728
ablation/C2/seed_456 0.36 0.406 0.692 0.443 0.847 0.660 0.742
ablation/C3/seed_42 0.31 0.412 0.688 0.454 0.863 0.658 0.747
ablation/C3/seed_126 0.30 0.417 0.698 0.461 0.877 0.664 0.756
ablation/C3/seed_456 0.33 0.408 0.687 0.451 0.878 0.647 0.746
ablation/C4-COCO/seed_42 0.46 0.417 0.697 0.463 0.883 0.658 0.754
ablation/C4-COCO/seed_126 0.48 0.418 0.699 0.464 0.881 0.662 0.756
ablation/C4-COCO/seed_456 0.38 0.418 0.699 0.461 0.869 0.672 0.758

Zero-shot transfer (no training on these data; in-domain validation threshold)

Data P R F1
Sepilok rainforest, Borneo (22 tiles, 526 delineated crowns) 0.125 ± 0.014 0.554 ± 0.054 0.203 ± 0.014
Published Mask R-CNN predictions, same tiles 0.236 0.432 0.305
Published ITCfast predictions, same tiles 0.151 0.355 0.211

The Sepilok labels are partial, so recall is the meaningful number and precision is a lower bound.

Date palms (Palm RGB test split; threshold selected on Palm RGB validation)

Model Threshold mAP AP50 AP75 P R F1
palm-square/seed_42 0.67 0.570 0.941 0.643 0.928 0.894 0.911
palm-square/seed_126 0.71 0.565 0.943 0.628 0.935 0.888 0.911
palm-square/seed_456 0.66 0.565 0.940 0.641 0.923 0.895 0.908
palm-letterbox/seed_42 0.72 0.563 0.931 0.628 0.935 0.876 0.904
palm-letterbox/seed_126 0.70 0.558 0.933 0.614 0.928 0.890 0.909
palm-letterbox/seed_456 0.72 0.558 0.930 0.618 0.924 0.884 0.904

Fadak farm, Karbala, Iraq (25 images, 507 palms; not public). Without fine-tuning, bicanet reaches AP50 0.668 ± 0.062, P 0.924 ± 0.020, R 0.592 ± 0.070, F1 0.721 ± 0.058; the fine-tuned palm models, at their Palm RGB thresholds:

Model Threshold AP50 P R F1
palm-square/seed_42 0.67 0.806 0.834 0.765 0.798
palm-square/seed_126 0.71 0.818 0.941 0.720 0.816
palm-square/seed_456 0.66 0.837 0.959 0.746 0.839
palm-letterbox/seed_42 0.72 0.815 0.916 0.734 0.815
palm-letterbox/seed_126 0.70 0.815 0.895 0.771 0.828
palm-letterbox/seed_456 0.72 0.814 0.932 0.730 0.819

Crown health from detector boxes. On a held-out larch flight (Kampe, 27 May 2019), mean VARI inside the boxes separates healthy from heavily damaged crowns with AUC 0.944 with BICANET boxes and 0.936 with manual boxes (1,469 healthy and 2,782 heavily damaged crowns); GRVI is second (0.927 with manual boxes). This is what --health computes. It was validated for one species and one flight; for other sites, any decision threshold on VARI must be calibrated against field data.

Compute (RTX 3060, batch 1, 512 x 512 input): 43.8 M parameters, 127 GMACs, 12.0 images/s without and 3.9 images/s with test-time augmentation, < 0.5 GiB GPU memory.

Intended use and limitations

Intended for research on tree crown detection, counting and per-tree screening in RGB drone or aerial imagery at roughly 0.1 m ground sampling distance or finer.

  • Crowns smaller than about 32 px are rarely detected (recall 0.096 on the test set). For imagery with small crowns, finer imagery or smaller windows (for example --tile 750, which processes each part of the image at a higher effective resolution) may help; this was not evaluated in the paper.
  • Raw counts are biased low; an inventory estimate needs the precision and recall measured on comparable imagery (count x P / R, Section 9.1 of the paper).
  • Detection is evaluated with bounding boxes, not crown outlines.
  • The palm models were tested on one farm with mixed nadir and oblique views.
  • --health values are relative greenness indices, not a diagnosis; validated only for larch casebearer damage.

Training data and license

Tree Crown Dataset (A. Silva, Kaggle), compiled from Larch Casebearer (Swedish Forest Agency, LILA) and NEON (Weinstein et al., 2021); Palm Tree Detection (Kaggle) for the palm models. The models are released for research and non-commercial use (CC BY-NC 4.0), following the terms of the training data.

Citation

@unpublished{baqer2026bicanet,
  author = {Baqer, Yahya Mohammed and Hamad, Yousif A.},
  title  = {Individual tree crown detection based on optimized machine learning and remote sensing data},
  note   = {Submitted to the International Journal of Electrical and Computer Engineering Systems (IJECES),
            manuscript IJECES-2026-5278},
  year   = {2026}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Evaluation results

  • COCO mAP (IoU 0.50:0.95), mean of 3 seeds on Tree Crown Dataset (Larch Casebearer + NEON), site-disjoint test sites
    self-reported
    0.419
  • AP50, mean of 3 seeds on Tree Crown Dataset (Larch Casebearer + NEON), site-disjoint test sites
    self-reported
    0.701
  • F1 at the validation-selected threshold, mean of 3 seeds on Tree Crown Dataset (Larch Casebearer + NEON), site-disjoint test sites
    self-reported
    0.756