Practical overview
When it fits
Use the model when a counting task can be expressed as a text query over an image, or when you need code and a benchmark-oriented research workflow rather than only a hosted demo.
Who it is for
- Computer-vision researchers studying text-guided object counting
- Developers exploring image-counting or visual inventory workflows
- Teams evaluating counting across varied image domains
Documented uses
- Count a prompted object category in a single image.
- Inspect predicted instance locations alongside the total count.
- Prepare CLOC-based training, validation or test workflows.
Requirements & limits
The repository is public and lists an Apache-2.0 license. A linked Hugging Face demo is presented as a separate way to try the model.
- Single-image inference requires the released Count Anything checkpoint at checkpoints/count_anything.pt.
- Training or fine-tuning from SAM3 initialization additionally requires the official SAM3 pretrained weights, which the repository does not redistribute.
- The repository uses CLOC by default for training and evaluation; dataset preparation is required for those workflows.
- Predictions include points and a count; saved outputs also include point positions and confidence scores in JSON.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up single-image inference
Prepare the documented Python environment and checkpoint for the repository’s single-image inference example.
Before you start
- Conda
- Python 3.12
- Repository dependencies from requirements.txt
- Released Count Anything checkpoint, count_anything.pt
Steps
Create and activate the countanything conda environment with Python 3.12.
Install the repository dependencies with pip install -r requirements.txt.
Download count_anything.pt and place it at checkpoints/count_anything.pt.
Expected outcome
The documented checkpoint path and environment are prepared for the single-image inference example, which takes an image path and text query and saves a point-and-count visualization and prediction JSON.
Guide limitations
- The setup steps alone do not run inference; use the repository’s Single-image Inference instructions for the model call.
- If pip selects an unsuitable CUDA build, the README says to install PyTorch and torchvision builds matching the local CUDA version.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- Mengqi-Lei/count-anything · Official homepage title · retained in its source language

