Skip to main content

cv-benchkit

CI PyPI Python License Good First Issues

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.1

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.1
File Size Uploaded Provenance Actions
cv_benchkit-0.1.1.tar.gz 132.7 kB Without provenance Details for cv_benchkit-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 148.4 kB

Release files / cv_benchkit-0.1.1.tar.gz

Download URL cv_benchkit-0.1.1.tar.gz
Size 132.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9252d91d6a0c0bc6e26c47987c5fbe9351cada115c6542b7d3e1521e636e37c7
BLAKE2b-256 checksum
How to use checksums
c76502d678bfcce2c7443f16690e016ca7a14115fba65d6f0709e8d7665b1dc5
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.1-py3-none-any.whl

Download URL cv_benchkit-0.1.1-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bf9775f0ce999f13863a4fc49c811237bafb9d5c6f61ea82a7298236df51904
BLAKE2b-256 checksum
How to use checksums
e06d355a8efec617dc363616e45890ab64a91d83d7b087d29ac334c32b763575
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.1

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