React + Node demo for the Ironsite-style question: can the worker safely reach the target in this scene?
The app lets you:
- capture a live camera frame
- upload an image or a long video and extract a frame server-side with
ffmpeg - ask a model for a baseline reachability answer plus scene annotations
- run local YOLO detections on the extracted frame
- ask K2 Think V2 to critique the scene reasoning using the structured geometry
- run a deterministic geometry layer for distance and obstruction checks
- compare the raw model answer against the reasoning-layer verdict
- Install dependencies:
npm install - Create a local env file:
cp .env.example .env - Add your API keys to
.env.K2_API_KEYenables the K2 Think V2 reasoning panel.OPENAI_API_KEYis optional if you want the OpenAI baseline as well.
Start the API server:
npm run serverIn a second terminal, start the frontend:
npm run devOpen http://localhost:5173.
- Upload a construction image or video, or capture a live camera frame.
- For videos, upload once, enter a timestamp in seconds, and click
Extract frame from video. - Click
Analyze frame. - Show the judge:
Baseline model answerversusReasoning layerversusK2 Think V2 assessment - Use the overlay to point out YOLO detections, worker/target boxes, path, and blockers.
npm test