Skip to main content
Glama
README.md
<div align="center">

# RadMeasure

**A medical measurement agent with controlled verification and repair.**

HRNet landmarks · Vision-language models · KEEP / REPAIR / STOP

![Python](https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&logoColor=white)
![LangGraph](https://img.shields.io/badge/Orchestration-LangGraph-167D7F)
![FastAPI](https://img.shields.io/badge/API-FastAPI-009688?logo=fastapi&logoColor=white)
![Status](https://img.shields.io/badge/Status-Research_prototype-64748B)

[Overview](#overview) · [Architecture](#architecture) · [Getting Started](#getting-started) · [Documentation](docs/DUAL_PATH_WORKFLOW.md)

</div>

## Overview

RadMeasure measures hallux valgus angle (HVA) and intermetatarsal angle (IMA) from foot radiographs. An HRNet landmark model and a vision-language model inspect the image independently; a LangGraph controller checks their agreement and decides whether to accept, recheck, or request human review.

- **Simple web interface** — upload an image and choose GPT, Claude, or Gemini.
- **Protocol-constrained actions** — model requests are limited to registered definitions and tools.
- **Bounded repair** — the VLM rechecks the image within an explicit retry budget.
- **Traceable decisions** — retain estimates, verification reasons, and review history.

## Architecture

![RadMeasure architecture: parallel landmark and VLM measurements with a KEEP, REPAIR, STOP controller](docs/assets/workflow.svg)

Accepted measurements come from landmark geometry. Repair revises the VLM estimate, not the landmark coordinates. Agreement alone does not establish accuracy.

## Getting Started

```bash
pip install -e '.[api,prod,vision,inference]'
```

Follow the [setup guide](docs/DUAL_PATH_WORKFLOW.md#configuration-and-local-execution) to configure the landmark checkpoint, comparison policy, and app access key. Start the API and worker in separate terminals:

```bash
uvicorn radmeasure.api:create_app --factory --host 127.0.0.1 --port 8000
radmeasure-worker
```

Open **http://127.0.0.1:8000**, upload an image, and enter your selected provider's Model ID and API key. Checkpoints and credentials are not bundled.

---

[Workflow & configuration](docs/DUAL_PATH_WORKFLOW.md) · [Controller source](src/radmeasure/measurement_graph.py) · [Provider adapters](src/radmeasure/provider_transport.py) · [Contributing](CONTRIBUTING.md)

*Research prototype; not validated for clinical use.*

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation5/5

Each tool serves a clearly distinct purpose: describing backend capabilities, listing available cases, and analyzing a specific radiograph. There is no overlap in functionality, making misselection unlikely.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: list_geomed_capabilities, list_available_cases, analyze_radiograph. The naming is uniform and predictable.

Tool Count5/5

With only 3 tools, the set is tightly scoped for the stated purpose of interacting with a GeoMed backend for case analysis. Each tool earns its place, and the count is appropriate—neither too sparse nor excessive.

Completeness5/5

The tool surface covers the full expected workflow: understanding the backend's capabilities, selecting a case, and performing the analysis (which includes retrieval and citations). No additional operations seem necessary for the apparent read-only analysis domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues