Skip to content

AdityaP9116/ResQ-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚁 ResQ-AI: Autonomous Disaster Response Drone

AI-powered drone for real-time hazard detection, autonomous navigation, and situational awareness in disaster zones

Isaac Sim Cosmos VLM YOLO Python


🌟 Overview

ResQ-AI is an autonomous disaster response system that deploys a simulated drone in NVIDIA Isaac Sim to survey disaster-affected urban environments. The drone uses:

  • YOLOv8 for real-time fire and hazard detection
  • NVIDIA Cosmos Reason 2 (Vision-Language Model) for autonomous flight decisions and navigation
  • Thermal imaging for heat signature analysis
  • 3D semantic segmentation for structural assessment

The system follows a SURVEY β†’ INVESTIGATE β†’ RETURN state machine, autonomously prioritizing fire zones, tracking civilians, and generating mission reports β€” all without human intervention.


πŸ—οΈ System Architecture

ResQ-AI end-to-end pipeline. AIDER aerial imagery trains the YOLOv8 fire detector, which feeds into an NVIDIA Isaac Sim urban disaster simulation. NVIDIA Cosmos Reason 2 VLM processes fused sensor data to autonomously navigate the drone. Results are streamed to a real-time tactical dashboard.

ResQ-AI System Architecture

Figure 1. ResQ-AI system architecture. Aerial disaster imagery trains the YOLOv8 detector, deployed in NVIDIA Isaac Sim with Cosmos Reason 2 VLM for autonomous drone navigation and real-time fire zone prioritization.


🎯 Key Features

Feature Description
πŸ”₯ Fire Detection YOLOv8 detects fires with bounding boxes, confidence scores, and 3D world-coordinate projection
🧠 AI Navigation Cosmos Reason 2 VLM analyzes the scene and generates autonomous waypoints based on fire priority scoring
🌑️ Thermal Imaging Synthetic thermal camera renders heat maps to identify fire intensity and spread
πŸ“Š Mission Reports Auto-generated JSON reports with fire zones, civilian status, urgency levels, and recommended actions
πŸ—ΊοΈ Tactical Dashboard Real-time web UI with video feeds, AI reasoning log, telemetry, and fire situation display
πŸ‘₯ Civilian Tracking Monitors civilian positions relative to fire zones and tracks safe/danger status

πŸ“‚ Repository Structure

ResQ-AI/
β”œβ”€β”€ orchestrator/              # AI decision-making & VLM integration
β”‚   β”œβ”€β”€ main.py                # Orchestrator entry point
β”‚   β”œβ”€β”€ vlm_server.py          # Cosmos VLM server (NIM / vLLM / mock backends)
β”‚   β”œβ”€β”€ orchestrator_bridge.py # Bridge between sim and orchestrator
β”‚   β”œβ”€β”€ logic_gates.py         # Decision logic and state transitions
β”‚   └── generate_map.py        # Hazard map generation
β”‚
β”œβ”€β”€ sim_bridge/                # Isaac Sim simulation interface
β”‚   β”œβ”€β”€ headless_e2e_test.py   # Full end-to-end simulation pipeline
β”‚   β”œβ”€β”€ yolo_detector.py       # Dual YOLO fire & person detection
β”‚   β”œβ”€β”€ cosmos_navigator.py    # Cosmos VLM navigation controller
β”‚   β”œβ”€β”€ drone_controller.py    # Drone flight controller
β”‚   β”œβ”€β”€ fire_system.py         # Fire spawning & spread simulation
β”‚   β”œβ”€β”€ spawn_drone.py         # Drone setup with sensors (RGB, Depth, Semantic, IMU)
β”‚   β”œβ”€β”€ generate_urban_scene.py# Procedural urban scene generation
β”‚   β”œβ”€β”€ thermal_processor.py   # Synthetic thermal image processing
β”‚   β”œβ”€β”€ thermal_sim.py         # Thermal simulation engine
β”‚   β”œβ”€β”€ civilian_tracker.py    # Civilian position & status tracking
β”‚   β”œβ”€β”€ projection_utils.py    # 2Dβ†’3D coordinate projection
β”‚   β”œβ”€β”€ report_generator.py    # Mission report generation
β”‚   β”œβ”€β”€ render_aerial_view.py  # Aerial view rendering
β”‚   β”œβ”€β”€ api_server.py          # REST API for dashboard
β”‚   └── demo_flight.py         # Demo flight path controller
β”‚
β”œβ”€β”€ frontend/                  # Web dashboard UI
β”‚   β”œβ”€β”€ index.html             # Mission Control dashboard
β”‚   β”œβ”€β”€ page3.html             # Aerial Fire Detection view
β”‚   └── page4.html             # Full Mission Dashboard
β”‚
β”œβ”€β”€ Phase1_SituationalAwareness/   # YOLO training & inference
β”‚   β”œβ”€β”€ train_yolo.py          # YOLOv8 training script
β”‚   β”œβ”€β”€ export_trt.py          # TensorRT export
β”‚   β”œβ”€β”€ live_inference.py      # Real-time inference
β”‚   └── run_on_colab.ipynb     # Google Colab training notebook
β”‚
β”œβ”€β”€ Phase2_StructuralSegmentation/ # Semantic segmentation
β”‚   β”œβ”€β”€ rescuenet_download.py  # RescueNet dataset downloader
β”‚   β”œβ”€β”€ live_inference_seg.py  # Segmentation inference
β”‚   └── run_phase2_colab.ipynb # Colab/Kaggle notebook
β”‚
β”œβ”€β”€ Phase3_Reasoning/          # VLM reasoning setup
β”‚   β”œβ”€β”€ setup_cosmos.py        # Cosmos model setup
β”‚   └── requirements.txt       # Phase 3 dependencies
β”‚
β”œβ”€β”€ scripts/                   # Shell scripts
β”‚   β”œβ”€β”€ run_demo.sh            # Launch demo
β”‚   β”œβ”€β”€ run_e2e_test.sh        # Run full E2E test
β”‚   └── run_headless.sh        # Headless simulation
β”‚
β”œβ”€β”€ run_orchestrator.py        # Main orchestrator launcher
β”œβ”€β”€ run_cosmos_pipeline.py     # Cosmos VLM pipeline
β”œβ”€β”€ generate_flight_data.py    # Flight data generation
β”œβ”€β”€ render_aerial_fires.py     # Aerial fire rendering
β”œβ”€β”€ Dockerfile                 # Docker container setup
β”œβ”€β”€ docker-compose.yml         # Multi-service Docker config
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ setup_isaac_sim.sh         # Isaac Sim installation script
β”œβ”€β”€ setup_brev.py              # Brev cloud instance setup
└── resqai_urban_disaster.usda # 3D urban disaster scene (USD)

πŸš€ Getting Started

Prerequisites

  • NVIDIA Isaac Sim 5.1 (requires NVIDIA GPU with RTX)
  • Python 3.10+
  • NVIDIA API Key (for Cosmos VLM via NIM)

ResQ-AI Asset Dependencies

Download these packs from https://docs.omniverse.nvidia.com/usd/latest/usd_content_samples/downloadable_packs.html and unzip them into the following folders:

  1. Rigged Characters Asset Pack (891 MB) β†’ assets/Characters/
  2. Extensions Sample Asset Pack (159 MB) β†’ assets/Particles/
  3. Base Materials Pack (8.2 GB) β†’ assets/BaseMaterials/
  4. Environments Skies Pack (8.9 GB) β†’ assets/Environments/
  5. AEC Demo Assets Pack (2.0 GB) β†’ assets/Architecture/

### 2. Configure Environment

Create a `.env` file in the project root:

```env
NVIDIA_API_KEY=your_nvidia_api_key_here
VLM_BACKEND=nim           # Options: nim, vllm, mock
RESQAI_COSMOS_MODEL=nvidia/cosmos-reason2-2b
RESQAI_VLLM_URL=http://localhost:8000

3. Run the Full Simulation

# Run the end-to-end simulation pipeline
bash scripts/run_e2e_test.sh

# Or run directly
python sim_bridge/headless_e2e_test.py

4. Launch the Dashboard

# Serve the frontend
cd /path/to/ResQ-AI
python3 -m http.server 8080

# Open in browser
# http://localhost:8080/frontend/page3.html  β€” Aerial Fire Detection
# http://localhost:8080/frontend/page4.html  β€” Full Mission Dashboard

5. Docker (Alternative)

docker-compose up --build

🧠 How It Works

1. Scene Generation

The system procedurally generates an urban disaster scene in Isaac Sim with buildings, roads, fire zones, and civilians.

2. Drone Deployment

A drone is spawned at altitude with multiple sensors:

  • RGB Camera β€” Visual feed for YOLO detection
  • Depth Camera β€” 3D spatial awareness
  • Semantic Segmentation Camera β€” Object classification
  • IMU β€” Inertial measurements for flight control

3. Detection Pipeline

Each frame is processed through:

  • YOLOv8 fire detection (confidence-scored bounding boxes)
  • Thermal processing (synthetic heat map generation)
  • 3D projection (2D detections β†’ world coordinates)

4. AI Decision-Making (Cosmos VLM)

The Cosmos Reason 2 VLM receives:

  • Current drone position and telemetry
  • Detected fire zones with positions, intensity, and area
  • Civilian status and positions

It outputs:

  • Target waypoint (x, y, z coordinates)
  • Priority score (0-10)
  • Reasoning text (human-readable explanation)
  • Flight state (SURVEY / APPROACH / FOCUS / TRACKING)

5. Report Generation

Mission reports are generated every 5 seconds containing:

  • Active fire count, total burn area, spread rate
  • Civilian breakdown (safe, in danger, rescued)
  • YOLO detection log
  • Urgency level and recommended actions

πŸ“Š Project Phases

Phase Status Description
Phase 1: Situational Awareness βœ… Complete YOLOv8 fire/hazard detection trained on AIDER dataset
Phase 2: Structural Segmentation βœ… Complete Pixel-level segmentation using RescueNet
Phase 3: Autonomous Navigation βœ… Complete Cosmos VLM-driven autonomous drone navigation in Isaac Sim

πŸ› οΈ Tech Stack

Component Technology
Simulation NVIDIA Isaac Sim 5.1 (USD/PhysX)
AI Navigation NVIDIA Cosmos Reason 2 (VLM)
Object Detection YOLOv8 (Ultralytics)
Segmentation RescueNet / YOLOv8-Seg
Drone Control PegasusSimulator / Custom MPC
Frontend Vanilla HTML/CSS/JS (Tokyo Night theme)
Backend FastAPI / Python
Deployment Docker, NVIDIA NIM
Cloud Training Google Colab, Kaggle

πŸ‘₯ Team

Built for the NVIDIA Cosmos Cookoff Hackathon by:


πŸ“„ License

This project was developed as part of a hackathon submission. See LICENSE for details.

About

ResQ-AI is an autonomous "Structural Scout" agent designed for Urban Search and Rescue (USAR). It utilizes a Sim-to-Real pipeline to reason about structural integrity in dangerous environments.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages