Skip to main content

cv-benchkit

CI PyPI Python License Good First Issues

Contributing: Looking to contribute? Check out our good first issues! To claim an issue, post a short comment on the issue before or when opening your PR, and include Closes #<issue-number> in your PR description. First-time contributors (0 prior merged PRs) are prioritized for good first issue tickets to give newcomers a fair start.

Unified computer vision annotation converter and model benchmarking toolkit for PyTorch and NumPy.


Quickstart & Installation

Install cv-benchkit via pip:

pip install cv-benchkit

Or using uv:

uv add cv-benchkit

Or run directly without installation via uvx:

uvx --from cv-benchkit cv-benchkit --help

Features

  • Format Converters: Seamless, vectorized conversions between xyxy, xywh (COCO), cxcywh, and normalized (YOLO) bounding-box representations.
  • Dataset Translators: Two-way translations between COCO JSON, YOLO txt, and Pascal VOC XML.
  • Vectorized Evaluation Metrics: Fast NumPy implementations of pairwise IoU, GIoU, and multiclass confusion matrix calculations with background handling.
  • CLI Utility: Command-line interface for fast dataset conversion and validation.
  • Strictly Typed & Tested: 100% typed with PEP 561 marker, passing mypy --strict, with 95%+ unit test coverage.

Python API Usage

import numpy as np
from cv_benchkit import compute_iou, xyxy_to_normalized, validate_coco_file

# Compute pairwise IoU
boxes_a = np.array([[0, 0, 100, 100], [50, 50, 150, 150]])
boxes_b = np.array([[20, 20, 120, 120]])
iou_matrix = compute_iou(boxes_a, boxes_b)
print(iou_matrix)

# Validate and parse COCO annotations
dataset = validate_coco_file("path/to/annotations.json")

CLI Usage

# Validate COCO dataset
cv-benchkit validate annotations.json

# Convert COCO to YOLO format
cv-benchkit convert --from coco --to yolo --input annotations.json --output ./yolo_labels

# Convert YOLO to COCO format
cv-benchkit convert --from yolo --to coco --input ./yolo_labels --output ./coco_out --image-width 640 --image-height 480 --categories person car bicycle

Contributing & Good First Issues

We welcome first-time open-source contributors! 🚀

We have curated and actively maintain modular, beginner-friendly issues with clear acceptance criteria and verification commands:

👉 Browse All Open Good First Issues (15+ Available)

How to Claim an Issue:

  1. Find an issue labeled good first issue that is not yet assigned.
  2. Comment on the issue: I'd like to work on this! Plan: [one sentence approach].
  3. Read CONTRIBUTING.md and CODE_OF_CONDUCT.md for local setup, community standards, and pull request guidelines.
  4. Also see our Good First Issues Catalog for a comprehensive catalog of upcoming tasks across documentation, converters, and metrics.

Local Development Setup:

git clone https://github.com/udayraj1238/cv-benchkit.git
cd cv-benchkit
uv sync --extra dev
uv run pytest
uv run ruff check .
uv run mypy src/

Security

See SECURITY.md for vulnerability reporting and responsible disclosure.


License

Apache-2.0. See LICENSE for details.

Metadata

Release files for cv-benchkit 0.1.4

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-benchkit 0.1.4
File Size Uploaded Provenance Actions
cv_benchkit-0.1.4.tar.gz 136.3 kB Without provenance Details for cv_benchkit-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cv-benchkit 0.1.4
File Interpreter ABI Platform Actions
cv_benchkit-0.1.4-py3-none-any.whl Python 3 none any Details for cv_benchkit-0.1.4-py3-none-any.whl

Total release size: 153.1 kB

Release files / cv_benchkit-0.1.4.tar.gz

Download URL cv_benchkit-0.1.4.tar.gz
Size 136.3 kB
Tags Source
SHA-256 checksum
How to use checksums
482c0b349d0f801e5fa0c94c673bc35068d47d7a53a3f57ce8d0fa117b59bb1d
BLAKE2b-256 checksum
How to use checksums
011245b5b4b2672da5fb4c08331e093bf5a5e16ed04240abe87675331041d6b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / cv_benchkit-0.1.4-py3-none-any.whl

Download URL cv_benchkit-0.1.4-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fb6b10a2b9bd8e5b861ecfa4f8f718607cb0899cdcb66a24015d7f5a02919b5
BLAKE2b-256 checksum
How to use checksums
0ef09c5cb74065e7037eb003fab8ac836bff7141cd065a3d0451a516672dd497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for cv-benchkit 0.1.4

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.

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