whatisgithub

What is locate-anything.cpp?

mudler/locate-anything.cpp — explained in plain English

Analysis updated 2026-05-18

53C++Audience · developerComplexity · 4/5LicenseSetup · moderate

In one sentence

A fast C++ port of NVIDIA's LocateAnything-3B that finds objects in an image from a text description, no Python needed.

Mindmap

mindmap
  root((locate-anything.cpp))
    What it does
      Finds objects by text prompt
      Draws bounding boxes
    Tech stack
      C++
      ggml
      CUDA
    Use cases
      Local object detection
      Embed in C++ apps
    Performance
      Faster than PyTorch version
      No Python needed
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Detect objects in an image by typing a text prompt like person or car

USE CASE 2

Run object detection locally on CPU or GPU with no Python runtime

USE CASE 3

Get a JSON list of bounding boxes plus an optional annotated image

USE CASE 4

Embed the detector in other C++ software via the included library or C interface

What is it built with?

C++ggmlCMakeCUDA

How does it compare?

mudler/locate-anything.cppadtyahac/acrobat-editorsnanas/forza-horizon-spotify-radio
Stars535353
LanguageC++C++C++
Setup difficultymoderatemoderatemoderate
Complexity4/52/52/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires building from source with CMake and downloading a separate model file, about 6.3 GB for q8_0.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

This project is a C++ implementation of NVIDIA's LocateAnything-3B, an AI model that finds objects in images based on text descriptions you give it. You provide an image and a text prompt (for example, "person" or "car"), and the model draws bounding boxes around all matching objects it finds. The result is both a JSON list of detected items with coordinates and, optionally, an annotated image with boxes drawn on it. The model combines a 3-billion-parameter language model with a vision component. It works by converting image coordinates into special tokens, so the AI reads locations the same way it reads words. The team behind this project also maintains LocalAI, a broader open-source tool for running AI models locally without requiring a cloud service. The main advantage over the official NVIDIA release is speed and reduced dependencies. At inference time, no Python installation is required. On a modern desktop CPU, this version runs roughly 1.5 to 3 times faster than the official PyTorch-based model, depending on configuration. On an NVIDIA GPU it runs about twice as fast. The detections produced are identical or nearly identical to the official model, verified by the developers through benchmark comparisons across multiple scenes. To use it, you build from source using CMake, download a pre-built model file from Hugging Face (the recommended q8_0 variant is about 6.3 GB), and run the command-line tool with an image and a text prompt. Multiple categories can be specified in a single prompt by separating them with a special delimiter. There are also a C++ library and a flat C interface for embedding the detector in other software. The project is MIT-licensed. It offers several model file variants of different sizes and precision levels, trading some detection accuracy for smaller file size and faster inference.

Copy-paste prompts

Prompt 1
Build this project with CMake and run it on a sample image with the prompt person
Prompt 2
Explain how this port compares in speed and accuracy to the official LocateAnything-3B
Prompt 3
Download the q8_0 model file and show me the command to detect multiple object categories at once
Prompt 4
Show me how to use the C++ library interface to embed this detector in my own app

Frequently asked questions

What is locate-anything.cpp?

A fast C++ port of NVIDIA's LocateAnything-3B that finds objects in an image from a text description, no Python needed.

What language is locate-anything.cpp written in?

Mainly C++. The stack also includes C++, ggml, CMake.

What license does locate-anything.cpp use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is locate-anything.cpp to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is locate-anything.cpp for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.