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.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| klygo-2.0.19.tar.gz | 95.5 kB | With provenance | Details |
Built distributions (wheels)
Total release size: 6.8 MB
Release files / klygo-2.0.19.tar.gz
| Download URL | klygo-2.0.19.tar.gz |
|---|---|
| Size | 95.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21505c7afe8ea26e094cc7b952152d69283152f8d52a37f2e01c4f710c288e23
|
|
BLAKE2b-256 checksum How to use checksums |
38c53b7b3b2b0c865fc34a98b9144a71a516971a547e7e580909a4776b12a233
|
| 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 logRelease files / klygo-2.0.19-cp313-cp313-win_amd64.whl
| Download URL | klygo-2.0.19-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 562.9 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5c6f9809a365399f8fe3f35b18cf2c85bd8543f8e0217f021f2da69cd8233fe7
|
|
BLAKE2b-256 checksum How to use checksums |
2a5f04c734a6667603510dc279a0f56b4142b5dd35ed4763de1411dd9340c9b3
|
| 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 logRelease files / klygo-2.0.19-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | klygo-2.0.19-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 839.3 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
4ea654b52dd63a4fc766a681ea37d6130a7a4baa00927248ca3f59520587a1d5
|
|
BLAKE2b-256 checksum How to use checksums |
228c3f7f859df28a18cf82e05980ce927c523730145b93cc5fe6d89a323cbcac
|
| 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 logRelease files / klygo-2.0.19-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | klygo-2.0.19-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 466.1 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6a7e980ddf1a23100684439a2a3b8779b9fa5d15a692c35f9a1fa0b0a40318bd
|
|
BLAKE2b-256 checksum How to use checksums |
4fbe26308bbf362608830a84d916e1095375839ef27eabfc496995acc087898b
|
| 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 logRelease files / klygo-2.0.19-cp312-cp312-win_amd64.whl
| Download URL | klygo-2.0.19-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 560.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7f58f32f3e792df27e11ceed41efcc51599142007b5deb6f702ff8e44396afce
|
|
BLAKE2b-256 checksum How to use checksums |
421e1aec2b943ef8ce0d55f0195ea1e72b1d3ea797244c7c298492baae87a7d9
|
| 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 logRelease files / klygo-2.0.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | klygo-2.0.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 836.6 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
7e68ab7a9668d2f8a328a7112c7e7e9eb952ccb40216596dbee6bf3b2a4f2c13
|
|
BLAKE2b-256 checksum How to use checksums |
f1106c5c92f65a2905b967a45f9d72f17c88c9df46fef6749bade23ef643558c
|
| 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 logRelease files / klygo-2.0.19-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | klygo-2.0.19-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 465.7 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9c68b83397a2ca90b9aca45231c76f1cdf770f8b08d972b68caae3a3b97393fc
|
|
BLAKE2b-256 checksum How to use checksums |
c0b3403a3a57194155ef2a07380ddc671100818f82bb9100b6674805ad7bb822
|
| 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 logRelease files / klygo-2.0.19-cp311-cp311-win_amd64.whl
| Download URL | klygo-2.0.19-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 555.6 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2ecafa09927aff182e1e2dbd0d55073c6855a245a36be7540cebe83f68511133
|
|
BLAKE2b-256 checksum How to use checksums |
78e0817f8138b9581bd09cedb0d5825d5bfa6c0a325ccdb890a2c2e66c581af5
|
| 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 logRelease files / klygo-2.0.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | klygo-2.0.19-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 |
3dee6807c88687a9688a8f311d6c122cc29e7056cd2f57980996ed3fa3592635
|
|
BLAKE2b-256 checksum How to use checksums |
161f8fe215de45cab27c162803610ae9ded12e342fed363321a12b04e98bb2ce
|
| 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 logRelease files / klygo-2.0.19-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | klygo-2.0.19-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 |
6925fe7136fa07b46b247ac902053297157ea8d880e09303c040afa725ab40c9
|
|
BLAKE2b-256 checksum How to use checksums |
07f7cca23c64a3951d55bd795c194bc9064b2799a03883fd17d0806bc0e29e1f
|
| 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 logRelease files / klygo-2.0.19-cp310-cp310-win_amd64.whl
| Download URL | klygo-2.0.19-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 322.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
bb90421d934c80f5d1490f0eebfa7bd98592b30aa541372c83090931fb08690b
|
|
BLAKE2b-256 checksum How to use checksums |
be863aec9f0953c9876c81cbd646af894f9787c35f089e2e18d7a1c489db902e
|
| 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 logRelease files / klygo-2.0.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | klygo-2.0.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 495.1 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f20166854b064d75f10fe773b9f3005e8ba8b5a43be204d6c31c035e202a3d96
|
|
BLAKE2b-256 checksum How to use checksums |
940ec2c461e3485c804cea361027df569edde38bf7a38749caadfdf4d5b66839
|
| 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 logRelease files / klygo-2.0.19-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | klygo-2.0.19-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 278.0 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a778de28b40d6393ea80c25561d32e06e8a883630d7900b94e11a607b585b03d
|
|
BLAKE2b-256 checksum How to use checksums |
0af60f934e871ff85c5cb15f24dc4a65979f72bf4954b2a27671186d69951670
|
| 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 logSecurity for klygo 2.0.19
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.
Attestation for klygo-2.0.19.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 logA 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.