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

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.20
File Size Uploaded Provenance
klygo-2.0.20.tar.gz 95.6 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for klygo 2.0.20
File
klygo-2.0.20-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
klygo-2.0.20-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.20-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
klygo-2.0.20-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
klygo-2.0.20-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.20-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
klygo-2.0.20-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
klygo-2.0.20-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.20-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
klygo-2.0.20-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
klygo-2.0.20-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.20-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 6.8 MB

Release files / klygo-2.0.20.tar.gz

Download URL klygo-2.0.20.tar.gz
Size 95.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b1d37f37fe7604f967e6ab0d97f68967d23a9776b3d28b77b39b19e876cba8a1
BLAKE2b-256 checksum
How to use checksums
4f849e810e6e1f15906d9798ea859a3dcbb1d7f81222aa07200941c1d25c9123
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.20-cp313-cp313-win_amd64.whl

Download URL klygo-2.0.20-cp313-cp313-win_amd64.whl
Size 563.0 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
d7b6e0fbb616c238cf29b8c0521f9f0f5e31dd40966d3273a3280eaa68bdf3a7
BLAKE2b-256 checksum
How to use checksums
c17f10746fe4ff32f9546118a818bfbe517be78a209eb7ebd27b678f40752065
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.20-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.20-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 839.4 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
331eb1d887ed4ff3bf0adf9a08a9f10c98baa5c8eb0aab6a1fca6988963a0f91
BLAKE2b-256 checksum
How to use checksums
ef7b2643686c888fc037d589abc3181c8944781fdfed6baae96223bceb1cf844
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.20-cp313-cp313-macosx_11_0_arm64.whl

Download URL klygo-2.0.20-cp313-cp313-macosx_11_0_arm64.whl
Size 466.2 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
52a12486adb7c8b68feff9450c71586a5f282a7b32d35ea3b9d46bde5a995afe
BLAKE2b-256 checksum
How to use checksums
2428a86cb311c82d6bce688251796a703972e46b927a2513672721b1da85a16d
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.20-cp312-cp312-win_amd64.whl

Download URL klygo-2.0.20-cp312-cp312-win_amd64.whl
Size 560.4 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6d144fa75f56b3fdf2a9acbd96ff0c10a7a2e3cfc206dced76d3390012ad3c36
BLAKE2b-256 checksum
How to use checksums
66965fe807ea2f4628bef09c9e31c61b1353369e85917148e99ef316b449e31f
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.20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.20-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 836.7 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3db13d4c1acdf28c2739e2b9572641d9bd3235a4e0c31f798865ca05f3dc8dc2
BLAKE2b-256 checksum
How to use checksums
ae47ad5b4874564a8eb048d4dbce5bcb363a8fc086613035d711308afc5cfb6e
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.20-cp312-cp312-macosx_11_0_arm64.whl

Download URL klygo-2.0.20-cp312-cp312-macosx_11_0_arm64.whl
Size 465.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ce285061f1d314daea1f211741afb2a58bd14f0113e74f5800478df778f54bbd
BLAKE2b-256 checksum
How to use checksums
d553d927c06b740e62e4291f07c9aabc84e46e20750b701c13a61fbc3fc1237e
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.20-cp311-cp311-win_amd64.whl

Download URL klygo-2.0.20-cp311-cp311-win_amd64.whl
Size 555.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3186df5d8254cdbfdcb656e7c7a3013e98fe23e84ed08755417c6b61250be745
BLAKE2b-256 checksum
How to use checksums
ee906338db28e1d2c88237c447a8ef3f918eab8d528f2c5485018abb0791ff6d
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.20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 832.4 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
07ff9bd5d66f30571d23ddb283d01cd285d69275f3683166fcdfd4328829d478
BLAKE2b-256 checksum
How to use checksums
71a75c2c34186d9049fd46bf7e1ae0633baf191a1cb1a6e158d2e37d10fbd1a7
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.20-cp311-cp311-macosx_11_0_arm64.whl

Download URL klygo-2.0.20-cp311-cp311-macosx_11_0_arm64.whl
Size 464.4 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
74ca8d9f64081a3a928db9e66a173481712c12f72fc0e55adbd013674842de75
BLAKE2b-256 checksum
How to use checksums
f689eecc373fa406532d7f3197a7da7b55ec71089f59fc2f93e7d812be87cefa
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.20-cp310-cp310-win_amd64.whl

Download URL klygo-2.0.20-cp310-cp310-win_amd64.whl
Size 322.7 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c2114750c98bc30cf794827702fc7f8ab7d1328d7aed04a0f68851e79d828dd9
BLAKE2b-256 checksum
How to use checksums
6aacc999a12d530d865066ef04d573395ee5688994887e25d892b3fde368b6fa
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.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 495.2 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
86a83762fcfbe071c5370871a669972779017c926fa2757bb5aca19651d607d2
BLAKE2b-256 checksum
How to use checksums
d15c0360143473c5a7ed333850b783966863aca0c7133b776c733a140a9dace4
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.20-cp310-cp310-macosx_11_0_arm64.whl

Download URL klygo-2.0.20-cp310-cp310-macosx_11_0_arm64.whl
Size 278.1 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4eaa1a2c85552ac440272ddae602a823993df6405cb915dd6308a290125de2dd
BLAKE2b-256 checksum
How to use checksums
cd791c213fdd3933b43b95b5180f28cba5c2fbd5677f0f19919735218e234e24
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.20

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