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.
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.
| 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. |
- 🧭 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)
Annotated and AI-assisted output from the GeoAnnotator pipeline:
python interactive_annotator.py --image path/to/image.tif --annotations-dir annotations/ --sam-checkpoint sam_vit_h_4b8939.pthUse the on-screen keys (0-9, a-f) to assign classes and save with q.
python server_annotation.pyThen open annotation_ui.html in a browser and connect to http://localhost:5000.
python prepare_yolo_data.pyCreates YOLO-compatible data splits (train/val/test) and data.yaml.
python train_yolo.py --model yolov8m.pt --epochs 100 --batch 4 --imgsz 640 --run-name sat_train --project-name runs/detectGeoAnnotator 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
- 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@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
