Skip to main content

Object Detection on Aerial Imagery for Coconut Trees Detection

Coconut tree detection from drone imagery using YOLOv8, Yolov12, and RT_DERT models with OpenStreetMap labels and OpenAerialMap imagery.

Overview

  • OpenStreetMap point data: bounding boxes with buffer zones
  • Tile large aerial imagery (256×256 at 9cm/pixel): Source
  • Convert geographic coordinates to YOLO format
  • Train multiple models of YOLOv8 (nano, small, medium) on coconut trees from Kolovai, Tonga
  • Train Yolov12 and also RT-DERT.

Source: World Bank - Automated Feature Detection of Aerial Imagery from the South Pacific

Data

Statistics:

  • Original: 10,631 trees (Coconut: 10,092 | Mango: 261 | Banana: 181 | Papaya: 97)
  • Target: Coconut trees only Clipped labels to tiles: {'total_trees': 10092, 'total_tiles': 551, 'processed_input_tiles': 448, 'skipped_nonlabeled_tiles': 103, 'total_input_trees': 11726} Converted to YOLO format Split: train=313, val=89, test=46

70 / 20 / 10 for train/val/test

  • Tiles: 256×256px at zoom 19, EPSG:4326

Structure

data/
├── raw/                # OAM imagery + OSM points
├── chips/              # 256×256 tiles (.tif)
├── labels/             # Per-tile annotations (.geojson)
└── yolo/
    ├── train/          # Training data (.png + .txt)
    ├── val/            # Validation data
    └── config.yaml     # YOLO config

notebooks/
├── experiment.ipynb         # including the dl4cv-oda package and all functions

Setup

curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/kshitijrajsharma/dl4cv-oda
cd dl4cv-oda
uv sync

Development ( version bump)

uv sync --extra dev
cz bump
git push --tags

Workflow

image

1. Clean OSM Data : Filter coconut trees, generate buffered bounding boxes

2. Tile Imagery : Create 256×256 tiles, clip labels to tile extents

3. YOLO Conversion : Transform coordinates (EPSG:4326 : pixels : normalized [0,1])

row, col = src.index(lon, lat)  # rasterio
x_norm = col / img_width
y_norm = row / img_height

4. Train : YOLOv8n, 100 epochs, batch 16

from ultralytics import YOLO
model = YOLO('yolov8n.pt')
model.train(data='data/yolo/config.yaml', epochs=100, imgsz=256, batch=16)

References

Metadata

Release files for dl4cv-oda 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dl4cv-oda 0.1.5
File Size Uploaded Provenance Actions
dl4cv_oda-0.1.5.tar.gz 1.4 MB Without provenance Details for dl4cv_oda-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dl4cv-oda 0.1.5
File Interpreter ABI Platform Actions
dl4cv_oda-0.1.5-py3-none-any.whl Python 3 none any Details for dl4cv_oda-0.1.5-py3-none-any.whl

Total release size: 1.4 MB

Release files / dl4cv_oda-0.1.5.tar.gz

Download URL dl4cv_oda-0.1.5.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
b0c112211a2fea8e7f0752b4764160ecd289165efabad85e1ede4ec7860e0d9b
BLAKE2b-256 checksum
How to use checksums
71c999ca23c14b4737ee8c4d0198965359c7f60af574c971660b7ed2a58b1b3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dl4cv_oda-0.1.5-py3-none-any.whl

Download URL dl4cv_oda-0.1.5-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b0fa365a029731e6ed3c2a34b89b3361043acebe8e734fb4675117f4df3b73b
BLAKE2b-256 checksum
How to use checksums
01c0050dda09e5c82605d0a2edb4a4c04cf98d2dfe7ce8516c975d9ca2268544
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dl4cv-oda 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page