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

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.18
File Size Uploaded Provenance
klygo-2.0.18.tar.gz 91.8 kB With provenance Details

Built distributions (wheels)

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

Download URL klygo-2.0.18.tar.gz
Size 91.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8daf23acdd82f83497579edbacc57c6a88e0222dad5f72c6bc5d4270e3a7a2a2
BLAKE2b-256 checksum
How to use checksums
d19847f03ff650efb057ddeda8963aa74c16193d50b8097bb84b4f3edbc5106a
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.18-cp313-cp313-win_amd64.whl

Download URL klygo-2.0.18-cp313-cp313-win_amd64.whl
Size 558.3 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
20596ed74a68e7a0a95475be74beed19d170ecaa3e0c5b51e2b1004f076b2210
BLAKE2b-256 checksum
How to use checksums
08b0fe427e0ad3a90148e21efcd940fb9fd4063721e9f907c634213c146315d7
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.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.18-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 834.7 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
4ba6328cd93e7b637c865d47a77d1db2a8803c34b7e7ab9a888f6342c9a54cf8
BLAKE2b-256 checksum
How to use checksums
a88692a339991a9db43771055535c63734e2465599051df53b0ad6080c0f416a
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.18-cp313-cp313-macosx_11_0_arm64.whl

Download URL klygo-2.0.18-cp313-cp313-macosx_11_0_arm64.whl
Size 461.5 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1a9af347fcf7a36c8985e503c4fbcc5f46ff426f515eb02e8d5f7d7b5c06c9da
BLAKE2b-256 checksum
How to use checksums
d3d012350046e048a616c5b3aac8d4821e84ea71e727354153df4d14a05a367f
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.18-cp312-cp312-win_amd64.whl

Download URL klygo-2.0.18-cp312-cp312-win_amd64.whl
Size 555.7 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
1213a87b29a8dec9e276f830a43618bcf30f11b21ff7cbc8b9f2f14fda78d4ed
BLAKE2b-256 checksum
How to use checksums
cee07c0ca54fab7d7a63c51d91b7c47dcfd44c76c7acd174890b5268db9de257
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.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 832.0 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7fb5b0c93c11490f5ce867b959150b3a48facc797747347e8244d6f96b50d746
BLAKE2b-256 checksum
How to use checksums
0df25040c3f34a9a51940e837dd95a225178762806182d26e62a65d3ea77d60f
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.18-cp312-cp312-macosx_11_0_arm64.whl

Download URL klygo-2.0.18-cp312-cp312-macosx_11_0_arm64.whl
Size 461.1 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
19fc66b9f46a3fad09e46386716ff4f6016b20889485fea1b920551aba66482e
BLAKE2b-256 checksum
How to use checksums
6d579fb7a4e6f82a874e5094d7e2070f426f21925705d17218311e4c7de36931
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.18-cp311-cp311-win_amd64.whl

Download URL klygo-2.0.18-cp311-cp311-win_amd64.whl
Size 551.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
272cf365d73b06bcd1e10f7abce4d7f99979ceb694238d26f795700f1484c06a
BLAKE2b-256 checksum
How to use checksums
44c5eccd70003b61bd5a639304a1f7b6d0050bf7994fff5ce187ca037dc033ae
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.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 827.7 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c876cbe07a3f566b91787b4b00bceed25132a02440174ec68c941da46314560b
BLAKE2b-256 checksum
How to use checksums
f5665793ace35a914b0ecd1174595c0b7756e3131eda3a2464ced95852625b3d
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.18-cp311-cp311-macosx_11_0_arm64.whl

Download URL klygo-2.0.18-cp311-cp311-macosx_11_0_arm64.whl
Size 459.8 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0fffa462db40605b130e9d358f0ef3bb864a1a29c275e1b73574f245a448ce71
BLAKE2b-256 checksum
How to use checksums
80eeb927342b779c4ce4a314e3321bfc025936f206ec36c774827639b91d6248
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.18-cp310-cp310-win_amd64.whl

Download URL klygo-2.0.18-cp310-cp310-win_amd64.whl
Size 318.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
3f14e43279f2e1c07fbfd874cc0c29ff238595b0a6e1dc763dd2ca6f26e65844
BLAKE2b-256 checksum
How to use checksums
793f685d743d877487e4d161b0f0c998071c26bb173d1c3e7f15244a128f2841
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.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 490.5 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fee58dd77cb3bb78ca4e5e3b050201fe0c92af9d56995f67c3aeb3b69d1f8893
BLAKE2b-256 checksum
How to use checksums
ef36aa664f3b62fa441d57424a817649f69bec2eedbd14d82a132b3de60099cd
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.18-cp310-cp310-macosx_11_0_arm64.whl

Download URL klygo-2.0.18-cp310-cp310-macosx_11_0_arm64.whl
Size 273.4 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
07c3a891d24ce835a2c9d2a9fbb0c16c34d4e96758591c84bb2197d50d9cf982
BLAKE2b-256 checksum
How to use checksums
82e0fb7fb08a1beafbc4ca6b9e57df2a867417319547a3b2666ec537d66ff598
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.18

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