Phase V Capstone · Days 69–70 · ~8 hours Prerequisites: Exercises 08 (VLM Experiments) Study Notes: 10-vision-language-models.md
Build a system that takes robot camera images and answers questions about the scene using multiple VLM backends. Evaluate which approach works best for robotics scene understanding.
┌─────────────────────┐
│ Robot Camera Feed │
│ (or test image set) │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ SceneAnalyzer │
│ │
│ Backend A: CLIP+LLM │──▶ Similarity-based Q&A
│ Backend B: LLaVA │──▶ Generative description
│ Backend C: Florence │──▶ Grounded detection
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Structured Output │
│ - Scene description │
│ - Object list + locs │
│ - Spatial relations │
│ - Action proposals │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Evaluation Suite │
│ - Description acc │
│ - Spatial reasoning │
│ - Grounding IoU │
│ - Latency / cost │
└───────────────────────┘
Build scene_analyzer.py with a unified interface:
class SceneAnalyzer:
def __init__(self, backend: str): # "clip", "llava", "florence"
...
def describe(self, image) -> str:
"""Generate a natural language scene description."""
def list_objects(self, image) -> list[dict]:
"""Return [{"name": str, "bbox": [x1,y1,x2,y2], "confidence": float}]."""
def answer(self, image, question: str) -> str:
"""Answer a free-form question about the scene."""
def ground(self, image, text_query: str) -> list[dict]:
"""Locate objects matching the text query. Return bboxes."""
def propose_actions(self, image, task: str) -> list[str]:
"""Suggest robot actions for the given task."""
Create benchmark.py with a test suite:
| Metric | How to Measure | Target |
|---|---|---|
| Description accuracy | Manual rating (1–5) on 20 images | ≥ 3.5 avg |
| Object detection | Precision/Recall at IoU=0.5 | ≥ 0.6 |
| Spatial reasoning | Accuracy on 40 spatial questions | ≥ 0.5 |
| Grounding accuracy | mAP@0.5 on text queries | ≥ 0.4 |
| Latency | Seconds per image (GPU) | Report |
Test images: 20 robot workspace scenes (real or synthetic). Annotate ground truth for objects and spatial relationships.
Run all three backends through the benchmark. Produce REPORT.md:
projects/05-vlm-scene-analysis/
├── README.md ← this file
├── scene_analyzer.py ← unified analyzer with 3 backends
├── benchmark.py ← evaluation harness
├── data/
│ ├── images/ ← 20 test images
│ └── annotations.json ← ground truth objects, relations
├── results/
│ ├── scores.json ← quantitative results
│ └── examples/ ← qualitative comparison images
└── REPORT.md ← comparison analysis
| Criterion | Weight | Pass Threshold |
|---|---|---|
| All 3 backends working | 30% | All produce output |
| Benchmark runs end-to-end | 20% | Scores computed for all metrics |
| Quantitative comparison | 20% | Table with all metrics |
| Qualitative analysis | 15% | ≥5 example comparisons |
| Robotics connection | 15% | Clear articulation of VLM→VLA gap |
supervision library for bounding box visualizationPrevious: 04-efficient-finetuning/README.md · Next: 06-vla-integration/README.md