Skip to main content

klygo

Thư viện Python hỗ trợ xử lý ZIP, quản lý dataset YOLO, đọc/ghi cấu hình và ảnh, nhận diện vật thể zero-shot, crop và trực quan hóa kết quả.

Cài đặt

git clone https://github.com/IchigoMazone/klygo.git
cd klygo
uv sync

Các package

  • klygo.archive: nén, giải nén, tìm kiếm, kiểm tra, chỉnh sửa, gộp và chia ZIP.
  • klygo.datasets: partition, repartition, unpartition, merge, split và remap dataset YOLO.
  • klygo.io: đọc/ghi YAML, JSON, TOML; đọc ảnh bằng PIL hoặc OpenCV.
  • klygo.models: nhận diện zero-shot trên ảnh, thư mục ảnh và video.
  • klygo.visualize: hiển thị, vẽ bbox, crop, đọc crop và thống kê dataset.

Sử dụng nhanh

Archive

import klygo.archive as ar

ar.compress("dataset", "dataset.zip", overwrite=True)
ar.extract("dataset.zip", output_dir="extracted", overwrite=True)
files = ar.search("dataset.zip", "images/*.jpg")

Dataset YOLO

import klygo.datasets as ds

ds.partition(
    source="raw_dataset.zip",
    target="dataset",
    ratios=(0.8, 0.1, 0.1),
    overwrite=True,
)

info = ds.get_dataset_info("dataset")
print(info)

Đọc cấu hình và ảnh

import klygo.io as io

config = io.Config("config.yaml").read()
pil_images = io.read_images("dataset/images", backend="pil")
opencv_images = io.read_images("dataset/images", backend="opencv")

Model

from klygo.models import Model

model = Model()

predictions = model.predict(
    source="dataset/images",
    prompt="car. person.",
)

detected_frames = model.detect(
    source="traffic.mp4",
    output_path="detected.mp4",
    annotated_dir="annotated",
    dataset_dir="generated_dataset",
    prompt="car. person.",
)

detection_results = model.detect(
    source="dataset/images",
    prompt="car. person.",
    metadata=True,
)

crop_results = model.crop(
    source="traffic.mp4",
    target="crops",
    prompt="car. person.",
)

Visualize

import klygo.visualize as vis

grid = vis.read_crops("crops")  # lưới 5 x 5 mặc định
vis.show_image(grid, title="Detected objects")

saved_detections = vis.read_detections("annotated")

Quy ước đường dẫn

  • source: file hoặc thư mục đầu vào.
  • *_path: đường dẫn file.
  • *_dir: đường dẫn thư mục.
  • target: file hoặc thư mục đầu ra linh hoạt.

Tài liệu chi tiết

Metadata

Release files for klygo 2.0.14

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

Source distribution (sdist)

Source distribution for klygo 2.0.14
File Size Uploaded Provenance
klygo-2.0.14.tar.gz 90.9 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for klygo 2.0.14
File
klygo-2.0.14-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
klygo-2.0.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
klygo-2.0.14-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
klygo-2.0.14-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
klygo-2.0.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
klygo-2.0.14-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
klygo-2.0.14-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
klygo-2.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
klygo-2.0.14-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
klygo-2.0.14-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
klygo-2.0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
klygo-2.0.14-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 6.7 MB

Release files / klygo-2.0.14.tar.gz

Download URL klygo-2.0.14.tar.gz
Size 90.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e00764a46e8c35aeaa02642184f5bc81429068789a529872a89b2cebb8306247
BLAKE2b-256 checksum
How to use checksums
c849d7f7ef59ce5fd7995b36dbdc96c4517e1566e24cc641b66a79a9658ce7d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp313-cp313-win_amd64.whl

Download URL klygo-2.0.14-cp313-cp313-win_amd64.whl
Size 557.3 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
ff2743b4a50b002199b058f9508d9ab8efa1334bb0c6586e89cbe8bec8e7a294
BLAKE2b-256 checksum
How to use checksums
80ea205d5a43ae83bc2641d824dc11f26def22e1a7ae99bc25e3f84d66ec3542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 833.8 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8640d8c0b009abdd497c014fd972437a48ebdba1ef0687b643b62e6f16fc25e7
BLAKE2b-256 checksum
How to use checksums
455187b9baf7c9080a50e9b6cfff1f14c47b86785710343ee8ca2d9a9d9af59b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp313-cp313-macosx_11_0_arm64.whl

Download URL klygo-2.0.14-cp313-cp313-macosx_11_0_arm64.whl
Size 460.5 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f45dc46be8dc3c9477b791a14d65aa63ec0e1b85b517d61614d74d1b54b43b6f
BLAKE2b-256 checksum
How to use checksums
e5e1f754193890724c1c0d7c20e3cd1a6367b3a7c0677032c4db6799f65137e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp312-cp312-win_amd64.whl

Download URL klygo-2.0.14-cp312-cp312-win_amd64.whl
Size 554.7 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4a729da8ec3f4009bc4e38eaddee4ab676b2843cea5411e94eaddca8adca5160
BLAKE2b-256 checksum
How to use checksums
286c3278d90c6e293931ba30a828df8fd1f08149d40c7ee4f55c4b5c46e822aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 831.0 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0088f79117cd60a14f9ea9bb8077cf64356ff034eaec33ee7a91bf5654d31c59
BLAKE2b-256 checksum
How to use checksums
d7767c0998eaae4939a0cb473ac11de2579bc8e75102e50883564c1c9d63c06f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp312-cp312-macosx_11_0_arm64.whl

Download URL klygo-2.0.14-cp312-cp312-macosx_11_0_arm64.whl
Size 460.1 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cde411f2ed82f736c7c6f0946d7af124b23641f613eac6c228626d3364fa7cec
BLAKE2b-256 checksum
How to use checksums
eb4c34168c36e12402d7308fed3e792246ee5097bfc5a6399972ca6daf8760ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp311-cp311-win_amd64.whl

Download URL klygo-2.0.14-cp311-cp311-win_amd64.whl
Size 550.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
7492eccffdd730c883f49af39480a5665a55b27314c79125658e7fab75000591
BLAKE2b-256 checksum
How to use checksums
2edd722efa7a6f152f0e45840a88e32c9143857b93bdd5c8cd7fe6d1e3240cf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 826.8 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ab905b0df00f67cbdcf4b53dca8fbe8fea68fc21fced6d47d17a242554c58ecd
BLAKE2b-256 checksum
How to use checksums
568569441395b3d50c6a45acd4267a8ebfc9e48f0cbaf5a27ec31eacd1b77d3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp311-cp311-macosx_11_0_arm64.whl

Download URL klygo-2.0.14-cp311-cp311-macosx_11_0_arm64.whl
Size 458.8 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
39f7b175165ac9c3660b0ad16baab9076a6ab9a292d594e948764ee6bb5dc2e5
BLAKE2b-256 checksum
How to use checksums
c1e324b221d8d4cbf51d3e6022a69c2c89113f2041955b517bcab8843b909fbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp310-cp310-win_amd64.whl

Download URL klygo-2.0.14-cp310-cp310-win_amd64.whl
Size 317.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
924ca520931de727a91cb6de2df852f50a1289763ef46414f83006b66f881cb3
BLAKE2b-256 checksum
How to use checksums
4e21a2a7a6291ee491eedd0e2ed6f20899041adbdd763e11d163d86776bc4e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 489.6 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fe04ac9ab2070b2a8272a22a699f5b0125b42f950fc52bcda6acc532700e6d54
BLAKE2b-256 checksum
How to use checksums
069ef578134891a8937bc6cbd7eca59ccb3719a1cca9a802b8c94b54aed0b19b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / klygo-2.0.14-cp310-cp310-macosx_11_0_arm64.whl

Download URL klygo-2.0.14-cp310-cp310-macosx_11_0_arm64.whl
Size 272.5 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ab548aa686feb47f8661069c2f0368866a13cbb082e5342f9308f0773429a52d
BLAKE2b-256 checksum
How to use checksums
705dc32d2947f52347ef641b8d778f1df5eb575fdf167145b3429f01465f5e99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Security for klygo 2.0.14

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.

Full provenance

All 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for klygo-2.0.14.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

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.

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