A flexible, pip-installable toolkit for remote-sensing image captioning, grounding, and VQA with pluggable VLMs and segmenters.
Project description
ISRO-GeoNLI
A production-ready pipeline for remote sensing image analysis using Vision Language Models (VLM) and SAM3:
- Image Captioning: Generate descriptions of aerial/satellite imagery
- Object Grounding: Detect and localize objects with oriented bounding boxes
- Visual Question Answering: Answer numeric, binary, and semantic questions
Repository Structure
ISRO-GeoNLI/
├── app_prod.py # Production FastAPI server (preloads models)
├── app_dev.py # Development server (lazy loading)
├── rs_pipeline.py # Main RSPipeline class
├── api_helpers.py # API utilities
├── api_models.py # Pydantic schemas
│
├── model/ # Model interfaces
│ ├── model_builder.py # VLM & SAM3 initialization
│ ├── vlm_interface.py # Qwen3-VL interface
│ └── sam3_interface.py # SAM3 interface
│
├── tasks/ # Task handlers
│ ├── captioning.py # Image captioning
│ ├── grounding.py # Object detection
│ └── vqa.py # Visual QA
│
├── utils/ # Utilities
│ ├── geo_calc.py # Geometric calculations
│ ├── visualization.py # Annotation tools
│ └── vqa_output_normalizer.py
│
├── Evaluation/ # Evaluation scripts
├── Finetuning_runs/ # Training scripts
├── website-backend/ # Web API backend
└── website-frontend/ # React frontend
Quick Start
Prerequisites
- Python 3.10+
- CUDA-capable GPU (36GB+ VRAM recommended)
- HuggingFace account with SAM 3 access
Installation
# Clone repository
cd ISRO-GeoNLI
# Create environment
conda create -n isro_geonli python=3.10
conda activate isro_geonli
# Install PyTorch (CUDA 12.4)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124
# Install dependencies
pip install -r requirements.txt
# HuggingFace authentication
huggingface-cli login
Run Production Server
# Linux/Mac
./run_prod.sh
# Windows
uvicorn app_prod:app --host 0.0.0.0 --port 8080
The server preloads models on startup (takes 2-3 minutes) and runs at http://localhost:8080.
Test API
# Health check
curl http://localhost:8080/health
# Simple query
curl -X POST http://localhost:8080/query \
-H "Content-Type: application/json" \
-d '{"query": "What is the area of the building?", "image_url": "https://example.com/image.jpg"}'
API Endpoints
POST /process
Structured request matching query.json schema. Please use this endpoint for evaluation
Request:
{
"input_image": {
"image_id": "sample_001",
"image_url": "https://example.com/image.jpg",
"metadata": {"spatial_resolution_m": 1.57}
},
"queries": {
"caption_query": {"instruction": "Describe the image."},
"grounding_query": {"instruction": "Locate all buildings."},
"attribute_query": {
"binary": {"instruction": "Is there any aeroplane?"},
"numeric": {"instruction": "What is the area?"},
"semantic": {"instruction": "What color is the building?"}
}
}
}
POST /query
Auto-classifies query type using LLM. This is used internally in the chat app.
Request:
{
"query": "Count the cars in the parking lot",
"image_url": "https://example.com/parking.jpg"
}
Please refer report (Team_46.pdf) for the architecture details.
License
- Pipeline Code: MIT License
- Qwen3-VL: Apache 2.0
- SAM3: SAM License
Citation
@article{qwen3vl2024,
title={Qwen3-VL: Towards Versatile Vision-Language Understanding},
author={Qwen Team},
year={2024}
}
@article{sam3,
title={Segment Anything Model 3},
author={Meta AI Research},
year={2024}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geonli-0.1.1.tar.gz.
File metadata
- Download URL: geonli-0.1.1.tar.gz
- Upload date:
- Size: 36.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0f8c3f81f5d0b4ff6847068e043a2652ce9175d3cd08ba86bbcf48688ff6781
|
|
| MD5 |
dc0e20c28c9604c7f8ebc524f4ff722e
|
|
| BLAKE2b-256 |
772f8c3e89d0381f9d141a76a08127ceec289c490d712f9510973500cea78f10
|
File details
Details for the file geonli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: geonli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b52ff8c0add6426bd64b959fcb017018ab7aaa43fdeca19e091fdeab4632ff6b
|
|
| MD5 |
1bd79da6c9cc3a9cace3a742bfbae0f4
|
|
| BLAKE2b-256 |
94fd4d9bdc6f05ea3422826ab6552b3680ddc43f3bbac8983d9d4d29d9c981dc
|