A comprehensive satellite image annotation and machine learning platform with YOLOv8 training capabilities for geospatial data analysis.
- Interactive Annotation: Advanced polygon and rectangle annotation tools for satellite imagery
- Dataset Management: Support for YOLO, COCO, and Pascal VOC formats with automatic conversion
- Model Management: Upload, train, and deploy YOLOv8 models for object detection
- YOLOv8 Training: Integrated training interface with real-time monitoring and visualization
- Auto-Detection: YOLOv8 inference for automatic object detection and annotation
- Task Management: Create and manage annotation tasks with progress tracking
- System Monitoring: Real-time system resource monitoring and performance metrics
- Geospatial Support: Full support for TIFF, COG, and other geospatial formats
- Export Functionality: Export annotated data in multiple formats
- Watcher-Based Inference: Headless service that tiles new satellite imagery, runs multiple YOLO models on GPUs, and publishes per-model plus combined GeoJSON outputs with health monitoring
- Python 3.8+
- Node.js 16+
- GDAL (for geospatial data processing)
-
Clone the repository:
git clone https://github.com/yourusername/sat-annotator.git cd sat-annotator -
Install Python dependencies:
pip install -r requirements.txt
-
Install Node.js dependencies:
cd frontend npm install cd ..
-
Setup GDAL (Windows):
configure_firewall.bat setup_titiler_env.bat
start_unified_production.bat-
Main Backend:
start_backend.bat
-
Frontend:
start_frontend.bat
-
Explore App (geospatial data exploration):
start_explore_app.bat
-
YOLOv8 Inference Service (for autodetect):
start_yolo_inference.bat
- Frontend: http://localhost:5173
- Main Backend: http://localhost:8000
- Explore App: http://localhost:8002 (Geospatial data exploration and tile cutting)
- YOLOv8 Inference: http://localhost:8105
The repository now bundles a standalone inference service that watches drop folders, splits rasters into tiles, runs multiple YOLO/YOLO-OBB models in parallel on any available GPUs, and produces per-model plus combined GeoJSON/CSV artifacts.
- Duplicate
config/pipeline.yamlif you need multiple environments. - Key sections:
watcher: directories/extensions to monitor and how aggressively to enqueue jobs.queue: persistent state file, retry/backoff policy, quarantine folder.workers: tiler vs. GPU worker counts, batch size, cache directories.gpus/models: map each.ptfile to a target CUDA device and optional tiling overrides.artifacts&logging: success/failure/combined folders, manifest format, per-image log level.health: JSON heartbeat location + cadence for dashboards.
python scripts/run_pipeline.py --config config/pipeline.yamlThe process will:
- Preload and pin each YOLO model to the configured GPU.
- Start the directory watcher/persistent queue plus per-image structured logging.
- Spawn workers that tile imagery, batch inference, build per-model & combined GeoJSON, CSV summaries, tile previews, and manifests.
- Continuously publish a heartbeat JSON (queue depth, worker health, GPU utilization) for ops monitoring.
- Successful jobs live under
artifacts/success/<image>_<job>/with:<model>.geojson,<model>.csv, optionaltiles/PNG previews.- Combined GeoJSON in
artifacts/combined/<job>.geojson. - Manifest JSON under
artifacts/success/manifests/<job>.json.
- Failed jobs are copied to
artifacts/failure/<job>/with the offending raster and stack trace. - Repeated failures are quarantined after the configured retry budget and logged for manual triage.
The main dashboard provides access to all functionality:
- Explore: View system overview, file management, and geospatial data visualization
- Training: Manage YOLOv8 model training with real-time monitoring
- Inference: Use trained models for automatic object detection
- Annotate Datasets: Create and manage annotation tasks with interactive tools
The Explore App provides advanced geospatial data processing capabilities:
- Raster Upload: Upload TIFF, COG, and other geospatial formats
- Tile Cutting: Cut large rasters into manageable tiles for annotation
- COG Conversion: Convert rasters to Cloud Optimized GeoTIFF format
- Vector Support: Upload and manage GeoJSON vector data
- Interactive Visualization: View and explore geospatial data with web-based tools
- Export Functionality: Export processed tiles and data in various formats
- Upload Datasets: Support for ZIP, TAR.GZ archives with automatic format detection
- View Datasets: See all registered datasets with metadata and statistics
- Delete Datasets: Remove datasets from the system
- Supported Formats: YOLO, COCO, Pascal VOC with automatic conversion
- Geospatial Support: TIFF, COG, and other geospatial formats
- Upload Models: Support for .pt, .pth, .onnx, .pb, .tflite files
- View Models: List all available models with metadata
- Delete Models: Remove models from the system
- Model Classes: View supported classes for each model
- Model Testing: Test models with sample images
- Start Training: Configure and start YOLOv8 training jobs with custom parameters
- Monitor Progress: Real-time training progress with logs and metrics
- View Results: Training graphs, loss curves, and sample predictions
- Job Management: List and manage all training jobs with status tracking
- Polygon Annotation: Create precise polygon annotations for complex shapes
- Rectangle Annotation: Quick bounding box annotations
- Auto-Detection: Use trained models for automatic annotation
- Export Options: Export annotations in multiple formats
GET /datasets- List all datasetsPOST /datasets- Add dataset manuallyPOST /datasets/upload- Upload dataset fileDELETE /datasets/{id}- Delete dataset
GET /models- List all modelsPOST /models/upload- Upload model fileDELETE /models/{name}- Delete modelGET /models/{name}/classes- Get model classesPOST /models/run- Run model inference
POST /training/start- Start training jobGET /training/jobs- List training jobsGET /training/jobs/{id}- Get job detailsGET /training/models- Get available modelsGET /training/datasets- Get available datasets
sat-annotator/
βββ backend/ # Main FastAPI backend server
β βββ app/
β β βββ routers/ # API endpoints and routes
β β β βββ annotations.py # Annotation management
β β β βββ datasets.py # Dataset operations
β β β βββ models.py # Model management
β β β βββ training.py # Training operations
β β β βββ ...
β β βββ schemas/ # Pydantic data models
β β βββ config.py # Application configuration
β βββ storage/ # Data storage (excluded from git)
β βββ requirements.txt # Python dependencies
βββ frontend/ # React frontend application
β βββ src/
β β βββ api/ # API client functions
β β βββ components/ # Reusable UI components
β β βββ pages/ # Main application pages
β β βββ context/ # React context providers
β βββ public/ # Static assets
β βββ package.json # Node.js dependencies
βββ explore_app/ # Geospatial data exploration service
β βββ main.py # FastAPI app with TiTiler integration
β βββ requirements.txt # Geospatial dependencies
β βββ storage/ # User data storage (excluded from git)
βββ InferencePython/ # YOLOv8 inference service
β βββ file/
β βββ infer.py # Inference implementation
βββ requirements.txt # Main Python dependencies
βββ .gitignore # Git ignore rules
βββ README.md # Project documentation
Dataset Upload:
.zip- ZIP archives.tar.gz- Compressed tar archives.tar- Tar archives.gz- Gzip archives
Model Upload:
.pt- PyTorch models.pth- PyTorch models.onnx- ONNX models.pb- TensorFlow models.tflite- TensorFlow Lite models
Geospatial Formats:
.tif/.tiff- GeoTIFF files.cog- Cloud Optimized GeoTIFF.jp2- JPEG 2000.png- PNG with geospatial metadata
- Check if ports are available (8000, 8002, 8105, 5173)
- Install Python dependencies:
pip install -r requirements.txt - Install Node.js dependencies:
cd frontend && npm install - Ensure GDAL is properly installed for geospatial processing
- For explore_app, ensure TiTiler dependencies are installed
- Verify dataset format and structure
- Check available system resources (GPU/CPU)
- Ensure model files are accessible
- Review training logs for specific errors
- Ensure YOLOv8 inference service is running on port 8105
- Check model registry configuration
- Verify model files are accessible and valid
- Test with sample images first
- Ensure GDAL is properly installed
- Check file permissions and paths
- Verify coordinate reference systems
- Test with smaller files first
- For explore_app issues, check TiTiler and rio-cogeo installation
- Verify raster file formats are supported (TIFF, COG, etc.)
- Backend: Add endpoints to appropriate routers in
backend/app/routers/ - Frontend: Update API clients in
frontend/src/api/and UI components - Explore App: Modify geospatial processing in
explore_app/main.py - Inference: Modify inference logic in
InferencePython/file/infer.py
- Start all services using
start_unified_production.bat - Navigate to http://localhost:5173
- Test all functionality through the web interface
- Check backend logs for any errors
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For support and questions, please open an issue on GitHub.
- Ultralytics YOLOv8 for the YOLO implementation
- FastAPI for the backend framework
- React for the frontend framework
- GDAL for geospatial data processing