Skip to main content

pycvt

Install

pip install pycvt --upgrade

dev

uv sync

Usage

from pycvt import (
    load_yolo_annotations,
    save_yolo_annotations,
    load_yolo_names,
    draw_bounding_boxes,
    xyxy2xywh,
    xywh2xyxy,
    xyxy2xywhn,
    xywhn2xyxy,
    box_iou,
    generate_sliding_windows,
    crop_with_bbox,
    sliding_crop,
    scale_boxes,
    get_color,
    example_file,
)

"load_yolo_annotations", # to load yolo format annotations from a file
"save_yolo_annotations", # to save yolo format annotations to a file
"load_yolo_names",      # to load class names from a yolo names file
"draw_bounding_boxes",  # to draw bounding boxes on an image
"xyxy2xywh",            # convert bounding box from (x1, y1, x2, y2) to (x_center, y_center, width, height)
"xywh2xyxy",            # convert bounding box from (x_center, y_center, width, height) to (x1, y1, x2, y2)
"xyxy2xywhn",           # convert bounding box from (x1, y1, x2, y2) to normalized (x_center, y_center, width, height)
"xywhn2xyxy",           # convert bounding box from normalized (x_center, y_center, width, height) to (x1, y1, x2, y2)
"box_iou",              # calculate Intersection over Union (IoU) between two sets of boxes
"generate_sliding_windows",  # generate sliding window coordinates for an image
"crop_with_bbox",         # crop image regions with bounding boxes and adjust boxes accordingly
"sliding_crop",         # crop an image using sliding windows
"scale_boxes",          # scale bounding boxes by a factor
"get_color",             # get a color for a given class id
"example_file",            # one example file for testing purposes  

YOLO Predict CLI

集成后的数据集预测工具可以直接通过 pycvt 使用:

pip install -e .[yolo-predict]
pycvt-yolo-predict --config demo.yaml

也可以在代码里调用:

from pycvt.tools.predict_config import load_predict_config
from pycvt.tools.yolo_dataset import predict_dataset

config = load_predict_config("demo.yaml")
predict_dataset(config, "demo.yaml")

配置格式示例:

dataset: /path/to/dataset.yaml

prediction_store:
  root: predictions
  run: xxx-model
  plot: true

model:
  name: yolov8det
  weights: /models/xxx-model.torchscript
  conf: 0.25
  iou: 0.45
  classes: null
  imgsz: 640
  half: true
  nc: null

ray:
  num_actors: null
  num_cpus: 2.0
  gpus_per_actor: 0.25

Metadata

Release files for pycvt 0.0.1.post202606050005

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

Source distribution (sdist)

Source distribution for pycvt 0.0.1.post202606050005
File Size Uploaded Provenance Actions
pycvt-0.0.1.post202606050005.tar.gz 18.9 kB Without provenance Details for pycvt-0.0.1.post202606050005.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pycvt 0.0.1.post202606050005
File Interpreter ABI Platform Actions
pycvt-0.0.1.post202606050005-py3-none-any.whl Python 3 none any Details for pycvt-0.0.1.post202606050005-py3-none-any.whl

Total release size: 40.2 kB

Release files / pycvt-0.0.1.post202606050005.tar.gz

Download URL pycvt-0.0.1.post202606050005.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e5667206266d5747c6b413de3cc17bfaeb46595ed335f40fc585dea9780a7d7c
BLAKE2b-256 checksum
How to use checksums
3d23c9e50b5b31bbb7cf4e98008571d978dbda91c5142209f469bdeb3e1fe527
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pycvt-0.0.1.post202606050005-py3-none-any.whl

Download URL pycvt-0.0.1.post202606050005-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1e14ca2cf71420c598659952f36b237f2964fc7368bed374cb6638948ff0523
BLAKE2b-256 checksum
How to use checksums
88c173c65b3af36253f769556d90909290bd309db366a07499726195b93193ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pycvt 0.0.1.post202606050005

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