Skip to main content

More for Keys, Less for Values: Adaptive KV Cache Quantization 🐍🚀🎉🦕

Project description

More for Keys, Less for Values: Adaptive KV Cache Quantization

Installation

To install the package, use pip:

pip install kvq

Usage

To use the package, import it in your Python code:

import kvq

medviz.layered_plot(image_path="dataset/1-1.nii", mask_paths=["dataset/small_bowel.nii", "dataset/1-1-label.nii"], mask_colors=["red", "yellow"], title="Layered Plot")

The layered_plot function creates a layered plot of an image and one or more masks. The masks are overlaid on top of the image using the specified colors. The resulting plot can be used to visualize the location of structures or regions of interest in the image.

import medviz

medviz.gif(
    image_path="dataset/1-1.nii",
    mask_paths=[
        "dataset/small_bowel.nii",
        "dataset/1-1-label.nii",
        "dataset/vertebrae_L3.nii.gz",
        "dataset/vertebrae_L4.nii.gz",
        "dataset/vertebrae_L5.nii.gz",
    ],
    mask_colors=["red", "yellow", "green", "blue", "purple"],
    title="Expert Annotations",
    interval=70,
    start_slice=30,
    end_slice=130,
    save_path="animation.gif",
)

The gif function creates an animated GIF of an image and one or more masks. The masks are overlaid on top of the image using the specified colors. The resulting GIF can be used to visualize the location of structures or regions of interest in the image.

GitHub repository: https://github.com/mohsenhariri/kvq

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kvq-0.0.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kvq-0.0.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file kvq-0.0.1.tar.gz.

File metadata

  • Download URL: kvq-0.0.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kvq-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5c12f6f34cc35b1d1dc412224cb900235d4b3dae18c542c818bda8e09f6759ab
MD5 4a9cb01f66a0caae17a0e5c2f787217d
BLAKE2b-256 128e2ae601fbc103225b20bef2af526faec26cd34d5a0aeb61859bf792e3d4e8

See more details on using hashes here.

File details

Details for the file kvq-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: kvq-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kvq-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c52b53d58b69f34d146ec3ce962e510a684a0e136a150b95650da877e70f0bd6
MD5 2dd3ceeb4c1fee6945a8e2a718f2ef6f
BLAKE2b-256 8615d820b4e898c7278831db4d9d69e2f5097717ab73baf424716195df7b179d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page