Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.6.0
metadata
title: Trace Visualizer
emoji: π’
colorFrom: green
colorTo: red
sdk: gradio
sdk_version: 6.5.1
app_file: app.py
pinned: false
Trace Model Visualizer
Gradio app for visualizing trace/trajectory predictions from mihirgrao/trace-model.
Features
- Image input: Upload an image
- Trace prediction: Model predicts trajectory points from the image
- Visual overlay: Trace is overlaid on the image with gradient coloring (green start β red end)
- Coordinate output: Predicted trace points are printed below
Installation
pip install -r requirements.txt
Usage
Gradio app
python app.py
Then open the URL (default: http://localhost:7860).
- Click Load Model to load the trace model (first run downloads from Hugging Face)
- Upload an image and optionally enter a task instruction (e.g. "Pick up the red block")
- Click Run Inference
- View the overlay image and predicted trace points
Eval server
Run a FastAPI server for batch evaluation (e.g. from scripts or the Gradio app):
python eval_server.py --model-id mihirgrao/trace-model --port 8001
Endpoints:
POST /predictβ single image + instructionPOST /predict_batchβ batch of{image_path?|image_base64?, instruction}samplesGET /health,GET /model_info
CLI script
python predict_trace.py image.png
python predict_trace.py image.png -i "Pick up the red block"
python predict_trace.py image.png -o output_trace.png -i "Stack the cube on the block"
python predict_trace.py image.png -o output.png -m mihirgrao/trace-model
imageβ Path to input image-i, --instructionβ Task / language instruction (e.g. "Pick up the red block")-o, --outputβ Where to save the overlay (default:<image>_trace.png)-m, --model-idβ Model ID (default: mihirgrao/trace-model)-p, --promptβ Full prompt override (if set, ignores-i)