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

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.15
File Size Uploaded Provenance
klygo-2.0.15.tar.gz 90.9 kB With provenance Details

Built distributions (wheels)

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

Download URL klygo-2.0.15.tar.gz
Size 90.9 kB
Tags Source
SHA-256 checksum
How to use checksums
316cc27075df8c8347b911316e7a3a9bc674c25db67216c6b35d6345f114da65
BLAKE2b-256 checksum
How to use checksums
ef8319e95241f80ff43517f7064d122ea382ba4661e0fb8f9778133620c20529
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.15-cp313-cp313-win_amd64.whl

Download URL klygo-2.0.15-cp313-cp313-win_amd64.whl
Size 557.2 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
3f6fd2df819e36eb5b89a90ea75a6320d38f43aa15bee2d134461465cc219f5d
BLAKE2b-256 checksum
How to use checksums
6b1725c65f2925976e7e9adcf5a42bee227b077c314c03173b331317bcf828df
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.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 833.7 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3745f2fdac13d1cb9e3582f9cbeab742f354a99826e400b344e0fc54f2300a3f
BLAKE2b-256 checksum
How to use checksums
7a26ad588e6c289f30466b31a24efdb9cfdec530e7325f9517a805da625adf6a
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.15-cp313-cp313-macosx_11_0_arm64.whl

Download URL klygo-2.0.15-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
0c9882da3960fe06a377eaed7f219b362257b21eb68e552bf18f58e2048ea066
BLAKE2b-256 checksum
How to use checksums
1e87acfd68a98f5656faccee57752e9b4dbc331671c8234fb372c537f6dfe348
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.15-cp312-cp312-win_amd64.whl

Download URL klygo-2.0.15-cp312-cp312-win_amd64.whl
Size 554.7 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
a9227d85a18841d92f75c2453a7a9cab3868cb6da4fef7652b9f70ab3c611d23
BLAKE2b-256 checksum
How to use checksums
a5f524221f1ae7c025d623a8ee0a626b1d70fa4c864dab9178bd6997d389dd56
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.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.15-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
46719f1b5c175bec1ee594ef0bfadb6ba3b1a5a7402fc1adfe93a0c8cfabefa6
BLAKE2b-256 checksum
How to use checksums
45db337db4c607798a30b819f8561abeaa74c7943a3194d66b54ac800842cc99
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.15-cp312-cp312-macosx_11_0_arm64.whl

Download URL klygo-2.0.15-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
a17c89a374f28caa17dc2f318537990509b6127820f476a1cf0fe263a76a6d10
BLAKE2b-256 checksum
How to use checksums
3cc38161684572f0f315b16b084e85315945af5a48fda817fd36305bc62452bf
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.15-cp311-cp311-win_amd64.whl

Download URL klygo-2.0.15-cp311-cp311-win_amd64.whl
Size 550.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
8218e55aec3b2dcee064feffca06f353df0626f1aefc4b6340431cb935e396fe
BLAKE2b-256 checksum
How to use checksums
48d8d90493b3999534706eebcf4405eb03d12a8b561af48287b3022a6f8725a5
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.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 826.7 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6cdc0b321d584b7d6e530e020c2fbd22c3f93f72f0b9892da8fb2a88cac7be17
BLAKE2b-256 checksum
How to use checksums
1909b01881f8e1bea03a3f29473587474912e81a30f197e7662e4c4203c66a5f
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.15-cp311-cp311-macosx_11_0_arm64.whl

Download URL klygo-2.0.15-cp311-cp311-macosx_11_0_arm64.whl
Size 458.7 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1fa397d9c007595eb352caef2bfd174dc0a69815ee01784935fa5f72e1890e5e
BLAKE2b-256 checksum
How to use checksums
26fb2b9adf35b3cfcd24b8c7c1d485653aaaca2eadd3b54e221f1c374208b87c
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.15-cp310-cp310-win_amd64.whl

Download URL klygo-2.0.15-cp310-cp310-win_amd64.whl
Size 317.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
ece1f6438b7a4b61e692adceb8f191577092ad7ec1b07774916514cf1166b4f0
BLAKE2b-256 checksum
How to use checksums
d048223be48494a3ccccd279c48f79bd5bf9f83595e9b2fbe823f0798d152517
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.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 489.5 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
862ccecd6ad83772ab81941e1c60dcff1c0e549ecbbf311c5072d3ffb6cd7978
BLAKE2b-256 checksum
How to use checksums
f95a0570874086052c0f0a52d5207fa378d8d9ace6017ebb000332b0f183fd55
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.15-cp310-cp310-macosx_11_0_arm64.whl

Download URL klygo-2.0.15-cp310-cp310-macosx_11_0_arm64.whl
Size 272.4 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
587bde12e4bd0ac65a2d372f254e47e5514eb8d14f88e683ee3f3afeac110538
BLAKE2b-256 checksum
How to use checksums
962c868e73642578f588c2a68cbc1de29c0014271490c0baba0ab31631f18391
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.15

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