Skip to main content

cvsuite

PyPI License: MIT

cvsuite is a computer vision toolkit for reproducible, filesystem-to-filesystem dataset work, organized around one CLI:

cvsuite <branch> <src> [transform] <output>
  • Convert between multiple annotation formats (YOLO, COCO, LabelMe, class folders, segmentation masks, VQA manifests).
  • Auto-label raw images from a text prompt with foundation grounding models (fm) such as SAM 3 or Grounding DINO.
  • Collect caption from images or answer questions about them with vision-language models.
  • Sort files into class folders with zero-shot classifiers.
  • Read text off with OCR.
  • Generate and edit images with diffusion models.
  • Then do the unglamorous half of the job: unzip and flatten a dump of files, drop exact and near-duplicates, fix orientation, normalize size and format, and draw a balanced sample for training.
cvsuite label ./dataset-yolo to-coco ./dataset-coco
cvsuite label ./images ground --provider gsam --prompt "fire" to-results ./labeled
cvsuite vlm ./images caption --provider qwen to-json ./captions
cvsuite class ./images infer --provider clip --prompt "good,bad" to-class-dir ./sorted
cvsuite gen create --provider flux --prompt "a red fox in the snow" to-dst ./fox.png
cvsuite prep arrange ./dump ./clean --unzip --exact-dedup --rename-seq

Examples

To generate these examples locally, run ./scripts/generate_examples.sh.

Image Generation (cvsuite gen)

cvsuite gen create --provider stable_diffusion --precision fp16 --prompt "a red fox in the snow" to-dst ./fox.png

A red fox in the snow

Zero-Shot Grounding (cvsuite label ground)

cvsuite label ./images ground --provider gsam --prompt "fire" to-results ./labeled

Fire detection with grounding overlay

OCR Text Detection (cvsuite label ocr)

cvsuite label ./images/ocr.jpg ocr --provider paddleocr to-results ./ocr-out

OCR text detection with recognized boxes

Recognized text:

Recognized text

Visual Question Answering (cvsuite vlm ask)

cvsuite vlm ./images/dog.jpg ask --prompt "How many dogs are in this image?" --provider qwen to-json ./answers

Dog photo used for VQA

Generated answer (see docs/example_data/answers/dog.json):

Generated answer

More in the cookbook.

You point a branch at a source, optionally run a transform, and materialize a destination layout. There is deliberately no universal "convert anything to anything" command.

How it works

flowchart LR
    SRC["<u>source</u><br>yolo · coco · labelme<br>images · shards · …"] --> TOOL

    TOOL{"<u>pick a tool</u><br>label · class · vlm · gen"} -->|ingest| DS["VisionDataset"]

    DS --> TF["<u>transforms, in order</u><br>sample · split · select · ground<br>ocr · infer · caption · vqa"]
    TF -->|"next transform"| TF

    DS -->|output command| DST["<u>destination</u><br>yolo · coco · class-dir<br/>json · shards · …"]

Whichever tool you pick, the spine is the same: the source is ingested into a shared VisionDataset, transforms mutate that dataset, and an output command materializes it. What differs per tool is the ingest heuristics, which transforms exist, and the export rules.

A run applies any number of transforms, left to right, before the output command: cvsuite label ./raw sample --count 500 split --val-frac 0.2 to-yolo ./out. FM-backed transforms (ground, ocr, infer, caption, vqa, and the gen actions) hand the dataset to an isolated provider subprocess that mutates records in place; a chain holds at most one, and it comes first. cvsuite prep is the exception to all of this, since it works directly on folders and never builds a dataset.

Branches

Branch Purpose
cvsuite label annotated datasets: YOLO / COCO / LabelMe / image-only ingest, sample / ground / ocr / ops / filter transforms, export to any label format
cvsuite class class-directory datasets: infer with zero-shot classifiers, class-aware sample, export via to-class-dir
cvsuite vlm vision-language datasets: caption / ask / vqa / map-answers, export to flat JSON / shards / VQA-style
cvsuite gen text-to-image and image-edit generation, materialized via to-dst
cvsuite prep raw image folder cleanup: arrange / process / sample / orient, file-first
cvsuite eda explore a dataset: image table, class and box statistics, health checks, near-duplicate twins across splits and metadata shortcuts as figures in a report folder (pip install "cv-suite[eda]")
cvsuite common shared operations: FM cache paths, inspection, and purge

Install

pip install cv-suite

Or from source:

git clone https://github.com/ptonso/cv-suite
pip install -e ./cv-suite

The base install ships the CLI and the I/O layer. Foundation-model backends run in isolated per-model virtualenvs provisioned on first use. See docs/getting-started.md.

Documentation

  • docs/ contains the guides: the mental model, getting started, and a cookbook of common workflows.
  • specs/ is the technical source of truth: architecture, the dataset contract, per-branch behavior, and the constraints that must not break.

Names

  • PyPI distribution: cv-suite
  • import package and CLI: cvsuite

License

MIT. See LICENSE.

Metadata

Release files for cv-suite 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cv-suite 0.1.0
File Size Uploaded Provenance Actions
cv_suite-0.1.0.tar.gz 346.1 kB Without provenance Details for cv_suite-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cv-suite 0.1.0
File Interpreter ABI Platform Actions
cv_suite-0.1.0-py3-none-any.whl Python 3 none any Details for cv_suite-0.1.0-py3-none-any.whl

Total release size: 835.3 kB

Release files / cv_suite-0.1.0.tar.gz

Download URL cv_suite-0.1.0.tar.gz
Size 346.1 kB
Tags Source
SHA-256 checksum
How to use checksums
11947b9782deb57f94f04ef97bef270930e80fd85f2fcdf4e280420f0c93fc4e
BLAKE2b-256 checksum
How to use checksums
fd693f271fdd9e8735a9986666559b9c54eb0d497cb4fb5132065d4eafdebeaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cv_suite-0.1.0-py3-none-any.whl

Download URL cv_suite-0.1.0-py3-none-any.whl
Size 489.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1435cd018c144420574d95faade3a22244ff9b20308724080d92d0bd72dd51f3
BLAKE2b-256 checksum
How to use checksums
b745c604a65c40e3191d70f2f18dbcbe4fd5969d54807077416c6322657fafef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for cv-suite 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page