Skip to content

GeoAnnotator — A complete manual and assisted annotation toolkit for satellite imagery, combining YOLOv8, Segment Anything (SAM), and interactive web interfaces. Enables human-in-the-loop labeling, feature vector extraction, similarity search, and dataset preparation for geospatial AI training pipelines

Notifications You must be signed in to change notification settings

intelav/GeoAnnotator

Repository files navigation

🛰️ GeoAnnotator: Manual & Assisted Satellite Image Annotation

An end-to-end framework for interactive, AI-assisted satellite image annotation and YOLO dataset preparation. GeoAnnotator integrates Segment Anything (SAM), YOLOv8, and an intuitive web-based labeling interface to streamline the creation of high-quality datasets for geospatial computer vision.


🌍 Overview

GeoAnnotator empowers geospatial AI researchers and practitioners to:

  • Interactively annotate satellite images with bounding boxes and masks.
  • Generate SAM-assisted segmentations with class labeling.
  • Run YOLO-based pre-annotation for automatic object suggestions.
  • Perform feature extraction and similarity search for visual retrieval.
  • Convert annotations to YOLOv8 training format and train models directly.

Supported Tools & Components

Component Description
interactive_annotator.py OpenCV + SAM-powered interactive labeling tool for creating JSON masks and boxes.
annotation_ui.html TailwindCSS-based browser interface for manual review and export of annotations.
server_annotation.py Flask backend for managing sessions, running YOLO inference, and serving results.
prepare_yolo_data.py Converts JSON annotations into YOLOv8-compatible train/val/test datasets.
train_yolo.py / train_yolo_xlarge.py Launch custom or large YOLOv8 models for training.
tiling_script.py Splits large satellite scenes into smaller, annotatable tiles.

⚙️ Features

  • 🧭 GeoTIFF support with CRS validation using rasterio
  • 🧠 AI-assisted pre-annotation using YOLOv8 detection and embedding features
  • 🖱️ Human-in-the-loop interaction through SAM-guided segmentation and OpenCV drawing
  • 🧩 Modular design for full annotation → training workflow
  • Optimized for GPU-based inference (supports NVIDIA RTX, Jetson, and other CUDA devices)

🖼️ Example Result

Annotated and AI-assisted output from the GeoAnnotator pipeline:

Assisted Annotation Example


🚀 Quick Start

1️⃣ Interactive Annotation

python interactive_annotator.py --image path/to/image.tif --annotations-dir annotations/ --sam-checkpoint sam_vit_h_4b8939.pth

Use the on-screen keys (0-9, a-f) to assign classes and save with q.

2️⃣ Launch the Web Annotation Server

python server_annotation.py

Then open annotation_ui.html in a browser and connect to http://localhost:5000.

3️⃣ Prepare YOLO Dataset

python prepare_yolo_data.py

Creates YOLO-compatible data splits (train/val/test) and data.yaml.

4️⃣ Train YOLOv8 Model

python train_yolo.py --model yolov8m.pt --epochs 100 --batch 4 --imgsz 640 --run-name sat_train --project-name runs/detect

🧠 Research & Application

GeoAnnotator bridges manual human expertise with AI-assisted automation, ideal for:

  • Remote sensing annotation campaigns
  • Infrastructure mapping (roads, sheds, kilns, tanks, etc.)
  • Dataset creation for semantic segmentation or detection
  • Research on hybrid labeling workflows

🧩 Dependencies

  • Python ≥ 3.10
  • PyTorch ≥ 2.1
  • Ultralytics YOLO ≥ 8.0
  • OpenCV, Flask, Rasterio, NumPy, FAISS, Matplotlib, TailwindCSS (for UI)
pip install torch torchvision torchaudio ultralytics opencv-python flask flask-cors rasterio faiss-cpu numpy matplotlib tqdm

📄 Citation

@misc{geoannotator_2025,
  title  = {GeoAnnotator: Manual & Assisted Annotation Framework for Satellite Imagery},
  author = {Atul Vaish},
  year   = {2025},
  url    = {https://github.com/intelav/GeoAnnotator}
}

© 2025 SvarAikyam AI | AI Fusion — Research in Geospatial AI, GPU Optimization & Edge Intelligence

About

GeoAnnotator — A complete manual and assisted annotation toolkit for satellite imagery, combining YOLOv8, Segment Anything (SAM), and interactive web interfaces. Enables human-in-the-loop labeling, feature vector extraction, similarity search, and dataset preparation for geospatial AI training pipelines

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published