agenticresearch / README.md
sqort's picture
Add LocateAnything C++ detection server
4e9edc4
|
Raw
History Blame Contribute Delete
1.63 kB
metadata
title: LocateAnything Detection
emoji: πŸ”
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: mit

LocateAnything Detection API

Serves NVIDIA LocateAnything-3B via locate-anything.cpp as an HTTP API.

Open-vocabulary object detection: give it an image + text prompt, get back labeled bounding boxes.

Also see Modal backend config (la_backend = "modal") for GPU-accelerated vLLM via Modal's serverless platform.

API

GET /health

{"status": "ok", "model_loaded": true, "model_path": "/app/models/locate-anything-q4_k.gguf"}

POST /detect

Multipart form:

  • image β€” JPEG/PNG file
  • prompt β€” text prompt (e.g. "Locate the person.")

Response:

{
  "success": true,
  "detections": [
    {"label": "person", "box": [0.1, 0.2, 0.5, 0.8]}
  ],
  "elapsed_s": 5.2
}

Boxes are normalized [x1, y1, x2, y2] in 0–1 range.

Deploy

  1. Create a new Hugging Face Space with Docker SDK
  2. Set Space hardware to CPU (free) or upgrade to CPU-upgraded for faster inference
  3. Upload the files from this hf_space/ directory to the Space root
  4. The Space auto-builds and starts β€” check /health after ~10 minutes

Resources