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

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.16
File Size Uploaded Provenance
klygo-2.0.16.tar.gz 91.5 kB With provenance Details

Built distributions (wheels)

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

Download URL klygo-2.0.16.tar.gz
Size 91.5 kB
Tags Source
SHA-256 checksum
How to use checksums
11674eebd7a4582adaa14c08067754667bf5d7e872251e98e9a7f5ea6bdc7115
BLAKE2b-256 checksum
How to use checksums
5d33d60efc4642a86f0bd3f3034e29784cc29a10c612a9832c232c0a716a6c4a
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.16-cp313-cp313-win_amd64.whl

Download URL klygo-2.0.16-cp313-cp313-win_amd64.whl
Size 558.0 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
75c1df49de47b8c367aa528cb8baca53c8eaf24aa50827d4fa793c557e4272da
BLAKE2b-256 checksum
How to use checksums
e8e050c372469499ca359b5c471d6db3fdd94169a5877be952f9fcc5201db952
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.16-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.16-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 834.5 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0b1423b5b60fecb82d5ec7e97c6d61a9955ca37cac6069d1ab5ab4be41733c57
BLAKE2b-256 checksum
How to use checksums
35b6044cd0c68b32ea7fcb69ecd17f149fd0e0c5e7a8970f7fc7fba450bafb64
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.16-cp313-cp313-macosx_11_0_arm64.whl

Download URL klygo-2.0.16-cp313-cp313-macosx_11_0_arm64.whl
Size 461.3 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fd68ab30e04ab78721020895daffa2e65f000337a08c10773be6cbf430e73b4a
BLAKE2b-256 checksum
How to use checksums
a266c45a18c222f1916699b224117cc2016dd1167cc8aa574787f376d517f2d5
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.16-cp312-cp312-win_amd64.whl

Download URL klygo-2.0.16-cp312-cp312-win_amd64.whl
Size 555.4 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
7853a3aacd2b9840e12b2f452ff053f2cc75986542d81f56b7479fd6dd259703
BLAKE2b-256 checksum
How to use checksums
f090037b95fd8d7ce84294eb3032495a4d7a1ed887adc0713fc6c00e599ac9de
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.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 831.8 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fe75f648857b44bdfc83c65b66c3d4e171f279ba342d3a4a61ea373361e7dbdc
BLAKE2b-256 checksum
How to use checksums
c09d4e8e3e3992053a138ac09eea5b383e40055cbc62eb7db735feef46a0c202
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.16-cp312-cp312-macosx_11_0_arm64.whl

Download URL klygo-2.0.16-cp312-cp312-macosx_11_0_arm64.whl
Size 460.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
228ee6bded9c8df3fccda52c145ac143de82f0ce804eed96fcf0c03182bc88ab
BLAKE2b-256 checksum
How to use checksums
4e3cf623e18bc1e71e64a024d4c269e3f6cf48f9210b7ce20f1227d00308160f
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.16-cp311-cp311-win_amd64.whl

Download URL klygo-2.0.16-cp311-cp311-win_amd64.whl
Size 550.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e02fdbd1fc4b266b558f55ee1d5c7c2ea58c073a519d6a3dc70e307ddcd146c7
BLAKE2b-256 checksum
How to use checksums
d6ff4fc3787a79bb26583df06f37687ec5b3560581f8bdb9ee178487bc5f8df7
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.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 827.5 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3681841b2dfc1abc0012460e4118eb1fb700fe7a37381f46c7956473c774221d
BLAKE2b-256 checksum
How to use checksums
35ec2641a59cbfe967a9b3ef85b4c76d2ecb8cafa361c54046c01b9e5aaae83a
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.16-cp311-cp311-macosx_11_0_arm64.whl

Download URL klygo-2.0.16-cp311-cp311-macosx_11_0_arm64.whl
Size 459.5 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
26f63aacb29659d8d9647075c1b90a099899ca14d8a90521a80f60129603988a
BLAKE2b-256 checksum
How to use checksums
9b240f6a667eddf83e4d4e9e5a0151fe3a7f49042c5bca61c73a42aa9bc97990
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.16-cp310-cp310-win_amd64.whl

Download URL klygo-2.0.16-cp310-cp310-win_amd64.whl
Size 317.8 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
1f24fe3ccff67f2b67be606ef39e728aed075549997b383af48e03faeda7185e
BLAKE2b-256 checksum
How to use checksums
0a59a5f604e04cf497ede8b0a0328239950ffbab21eadc930141aaaaec599133
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.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL klygo-2.0.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 490.3 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c9c2c50592f6729bba59bfd9215b1b4dc52c24a7348507a442c572ebc262e9ef
BLAKE2b-256 checksum
How to use checksums
e6581dba40183db5b6052727093deb7e2b2a6db233712eaeb04b298e34aea197
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.16-cp310-cp310-macosx_11_0_arm64.whl

Download URL klygo-2.0.16-cp310-cp310-macosx_11_0_arm64.whl
Size 273.2 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9bafd690d7d56eb4a5556d1c4ef29c44de8a2c676f4c57434737d16460e4ab51
BLAKE2b-256 checksum
How to use checksums
c45dad3fd8c7f84399656f4cc5a6122c9e2c955e94549676dbe13d33d731d0f6
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.16

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