Skip to main content

Image Tokenizer encode visuals.

Project description

ImageTokenizer: Unified Image and Video Tokenization

Welcome to the ImageTokenizer repository! 🎉 This Python package is designed to simplify the process of image and video tokenization, a crucial step for various applications such as image/video generation and understanding. We provide a variety of popular tokenizers with a simple and unified interface, making your coding experience seamless and efficient. 🛠️

Features

  • Unified Interface: A consistent API for all supported tokenizers.
  • Extensive Support: Covers a range of popular image and video tokenizers.
  • Easy Integration: Quick setup and integration with your projects.

Supported Tokenizers

Here's a list of the current supported image tokenizers:

  • OmniTokenizer: Versatile tokenizer capable of handling both images and videos.
  • OpenMagvit2: An open-source version of Magvit2, renowned for its excellent results.

Getting Started

To get started with ImageTokenizer, follow these simple steps:

Installation

You can install ImageTokenizer using pip:

pip install imagetokenizer

Usage

Here's a quick example of how to use OmniTokenizer:

from imagetokenizer import OmniTokenizer

# Initialize the tokenizer
image_tokenizer = OmniTokenizer()

# Tokenize an image
image_tokens = image_tokenizer.encode("path_to_your_image.jpg")

# Print the tokens
print(image_tokens)

image = image_tokenizer.decode(image_tokens)

Documentation

For more detailed information and examples, please refer to our official documentation.

Contributing

We welcome contributions! If you have an idea for a new tokenizer or want to improve existing ones, feel free to submit a pull request or create an issue. 🔧

License

ImageTokenizer is open-source and available under the MIT License.

Community

Acknowledgements

We would like to thank all the contributors and the community for their support and feedback. 🙏

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

imagetokenizer-0.0.1.tar.gz (23.4 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: imagetokenizer-0.0.1.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for imagetokenizer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1434959d8b2564ca9adb51f90725b7509ffc63de8b74b44976fc98e8cbf2566e
MD5 16f6833d21c7256016d90ce68e9669a7
BLAKE2b-256 c21ea7db22e1c8bb2ede8360c2d80001e39744e677cfc4325810955dbdd6449f

See more details on using hashes here.

Supported by

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