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 Magvit2Tokenizer
# Initialize the tokenizer
image_tokenizer = Magvit2Tokenizer()
# Tokenize an image
quants, embedding, codebook_indices = image_tokenizer.encode("path_to_your_image.jpg")
# Print the tokens
print(image_tokens)
image = image_tokenizer.decode(quants)
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
- Join our Slack Channel to discuss and collaborate.
- Follow us on Twitter for updates and news.
Acknowledgements
We would like to thank all the contributors and the community for their support and feedback. 🙏
Metadata
Release files for imagetokenizer 0.0.2
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 | Actions |
|---|---|---|---|---|
| imagetokenizer-0.0.2.tar.gz | 23.6 kB | Without provenance | Details for imagetokenizer-0.0.2.tar.gz |
Release files / imagetokenizer-0.0.2.tar.gz
| Download URL | imagetokenizer-0.0.2.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3df37c69411f4626c90bf22ddc5170c15c7e1c49af64eb7259e4e7fcdd1ef461
|
|
BLAKE2b-256 checksum How to use checksums |
84918b1dc0690a16ea605129f4050ce12be7c4de2f62e1347399b52bfb1872e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for imagetokenizer 0.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.