Interactive single-page app for exploring object detection metrics by editing predictions and ground-truth boxes on a single image.
- React + TypeScript + Vite
- Modular app structure for domain/state/features/components
src/domain/: metric and matching logic (pure computation)src/state/: app state, selectors, derived snapshotssrc/features/annotation/: box annotation interactionssrc/features/metrics/: summary cards, controls, inspectorsrc/features/visualizations/: pluggable charts/viewssrc/components/: shared UI primitives
If you use npm:
npm install
npm run devIf you use bun:
bun install
bun run devnpm run buildEquivalent bun command:
bun run buildnpm run previewDomain unit tests run through Vitest:
npm run testThe app currently boots with a bundled single-image sample and typed GT/prediction
fixtures from src/features/annotation/data/sampleScene.ts.
- Annotation interactions support pointer/touch drag and resize.
- Metric updates are announced via polite live regions in summary cards.
- Prediction vs GT boxes use both color and line style cues for better distinction.
The repository includes .github/workflows/deploy-pages.yml to build and deploy
the app to GitHub Pages on every push to main.
- In repository settings, open Pages.
- Set Source to GitHub Actions.
- The workflow uploads the
dist/folder generated bybun run build.
vite.config.tsreadsBASE_PATHfrom environment variables.- Workflow default is
BASE_PATH=/mAP-viewer/for project pages. - If repository name changes, update
BASE_PATHin.github/workflows/deploy-pages.yml.
- If assets 404 on the deployed site, verify the
BASE_PATHvalue matches/<repo-name>/. - If deployment job is blocked, verify Pages source is set to GitHub Actions.