Skip to main content

Coconut tree detection from drone imagery

Project description

Object Detection on Aerial Imagery

Coconut tree detection from drone imagery using YOLOv8 with OpenStreetMap labels and OpenAerialMap imagery.

Overview

  • OpenStreetMap point data : bounding boxes with buffer zones
  • Tile large aerial imagery (256×256 at 5cm/pixel)
  • Convert geographic coordinates to YOLO format
  • Train YOLOv8 on coconut trees from Kolovai, Tonga

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

Data

Statistics:

  • Original: 10,631 trees (Coconut: 10,092 | Mango: 261 | Banana: 181 | Papaya: 97)
  • Target: Coconut trees only
  • Tiles: 256×256px at zoom 19, EPSG:4326
  • Train/Val: 441 / 167 tiles (80/20 stratified split)

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/
├── 01_cleanup.ipynb         # OSM filtering + bbox generation
├── 02_tiles.ipynb           # Imagery tiling
├── 03_yolo_format.ipynb     # GeoJSON : YOLO conversion
└── 04_train.ipynb           # YOLOv8 training

Setup

curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/kshitijrajsharma/dl4cv-object-detection-on-aerial-imagery
cd dl4cv-object-detection-on-aerial-imagery
uv sync

Workflow

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dl4cv_oda-0.1.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dl4cv_oda-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file dl4cv_oda-0.1.0.tar.gz.

File metadata

  • Download URL: dl4cv_oda-0.1.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for dl4cv_oda-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d245142d697fc5a173e006bec4370f61ce7e60c13be9abf679722f28f96ae1f
MD5 a035aeccb4efff178ea56b06a38b7fbf
BLAKE2b-256 08b6cb9a6312b66f39a4f5839937134e0d8cbcb1c87369dbaf8bc0913938f773

See more details on using hashes here.

File details

Details for the file dl4cv_oda-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dl4cv_oda-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for dl4cv_oda-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b8410eac6b74e25021f0b84a2c9cc3b42fd48e72025a94c5e903f14992fb24c
MD5 b2c574f3b332126626c631be7ad2140e
BLAKE2b-256 fb7371f80ff4686eb98c863942c91cb22f3d5753e3fc58e5251f4c648ff35d13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page