--- title: LocateAnything Detection emoji: 🔍 colorFrom: blue colorTo: green sdk: docker pinned: false license: mit --- # LocateAnything Detection API Serves [NVIDIA LocateAnything-3B](https://huggingface.co/nvidia/LocateAnything-3B) via [locate-anything.cpp](https://github.com/mudler/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` ```json {"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: ```json { "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](https://huggingface.co/new-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 - Model: [mudler/locate-anything.cpp-gguf](https://huggingface.co/mudler/locate-anything.cpp-gguf) - C++ engine: [mudler/locate-anything.cpp](https://github.com/mudler/locate-anything.cpp) - Official model: [nvidia/LocateAnything-3B](https://huggingface.co/nvidia/LocateAnything-3B)