CoolFace
Apppublic

medwa126/vpr-interactive-demo

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
App README

πŸ“˜ VPR Interactive GPS Analysis Demo

A Gradio + Plotly dashboard for analysing Visual Place Recognition (VPR) experiment outputs


🧭 Overview

This repository contains an interactive demo for exploring and analysing the output of Visual Place Recognition (VPR) experiments. It provides:

  • β€”GPS-aligned trajectory visualisation
  • β€”Per-query correct/incorrect prediction markers
  • β€”Full TP / FP / FN / TN introspection overlays
  • β€”Side-by-side query, predicted, and ground-truth image comparisons
  • β€”Interactive navigation, hover tooltips, and method switching

It is designed for VPR researchers who want a rich, visual debugging tool to inspect failure cases, spatial error patterns, and introspective reliability outputs.

This is just a demonstration of what is possible on HuggingFace and is not being maintained


🌐 Key Features

βœ”οΈ Interactive GPS Accuracy Heatmap

  • β€”Visualises query trajectory and database path in metres
  • β€”Colours indicate correctness (green/red)
  • β€”Marker shapes show introspection class (TP, FP, FN, TN)

βœ”οΈ Rich hover information

Hovering over any prediction shows:

  • β€”Query index
  • β€”Predicted and GT indices
  • β€”Error in metres
  • β€”Correct/incorrect classification
  • β€”TPR category

βœ”οΈ Image Comparison Panel

  • β€”Displays:
  • β€”Query image
  • β€”Ground truth match
  • β€”Model’s predicted match
  • β€”Shows correctness, distance error, and introspection metadata

βœ”οΈ Navigation Controls

  • β€”Jump to any query index
  • β€”Click previous/next to iterate sequentially
  • β€”All interactions update the viewer dynamically

βœ”οΈ HuggingFace Dataset Integration

Uses huggingface_hub.snapshot_download to automatically load datasets required for VPR experiments.


πŸ—‚ Directory Structure

project/
β”‚
β”œβ”€β”€ data/gardensgp/           # Downloaded dataset from HuggingFace Hub
β”œβ”€β”€ experiment_output/        # Your VPR pipeline’s output JSON + images
β”‚
β”œβ”€β”€ plot_interactive_loader.py
└── interactive_app.py        # This demo script

πŸ”§ How It Works

1. Dataset Loading

The HuggingFace dataset is downloaded locally using an authentication token.

2. Experiment Output Parsing

The script expects a folder containing:

  • β€”VPR predictions
  • β€”GPS coordinates
  • β€”Error metrics
  • β€”Paths to image files
  • β€”Optional introspection labels

These are parsed into a unified format for visualisation.

3. GPS Conversion

Lat/lon coordinates are converted into metres using the Haversine formula, enabling consistent 2D rendering.

4. Plotly Visualisation

The GPS plot includes:

  • β€”Query path
  • β€”Database trajectory
  • β€”Per-prediction markers
  • β€”Legend entries for correctness and introspection

5. Gradio Frontend

A user-friendly panel lets you:

  • β€”Select a method
  • β€”Explore predictions on a map
  • β€”Inspect image matches
  • β€”Navigate across query indices

🎨 Legend

SymbolMeaningStyle
🟒 Green circleCorrect predictionBelow tolerance
πŸ”Ί Blue triangleFalse PositiveWrong match
❌ Red XFalse NegativeModel missed correct match
⬛ Grey squareTrue NegativeCorrect rejection
⚫ Black circleNot assignedN/A

Background elements:

  • β€”πŸ”΅ Blue dots = database reference path
  • β€”πŸ”΄ Red dots = query traversal path

πŸš€ Running the Demo

1. Install dependencies

pip install -r requirements.txt

2. Set your HuggingFace token

export HF_TOKEN="your_token_here"

3. Launch the dashboard

python interactive_app.py

4. Open the app at

http://localhost:7860

πŸ§‘β€πŸ’» Authors

Margaux Edwards Queensland University of Technology Centre of Robotics