# 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:
```bash
pip install imagetokenizer
```
### Usage
Here's a quick example of how to use OmniTokenizer:
```python
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](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. 🙏
Raw data
{
"_id": null,
"home_page": "https://github.com/lucasjinreal/ImageTokenizer",
"name": "imagetokenizer",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "deep learning, script helper, tools",
"author": "Lucas Jin",
"author_email": "jinfagang19@163.com",
"download_url": "https://files.pythonhosted.org/packages/84/91/8b1dc0690a16ea605129f4050ce12be7c4de2f62e1347399b52bfb1872e2/imagetokenizer-0.0.2.tar.gz",
"platform": "any",
"description": "# ImageTokenizer: Unified Image and Video Tokenization\n\nWelcome to the **ImageTokenizer** repository! \ud83c\udf89 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. \ud83d\udee0\ufe0f\n\n## Features\n\n- **Unified Interface**: A consistent API for all supported tokenizers.\n- **Extensive Support**: Covers a range of popular image and video tokenizers.\n- **Easy Integration**: Quick setup and integration with your projects.\n\n## Supported Tokenizers\n\nHere's a list of the current supported image tokenizers:\n\n- **OmniTokenizer**: Versatile tokenizer capable of handling both images and videos.\n- **OpenMagvit2**: An open-source version of Magvit2, renowned for its excellent results.\n\n## Getting Started\n\nTo get started with ImageTokenizer, follow these simple steps:\n\n### Installation\n\nYou can install ImageTokenizer using pip:\n\n```bash\npip install imagetokenizer\n```\n\n### Usage\n\nHere's a quick example of how to use OmniTokenizer:\n\n```python\nfrom imagetokenizer import Magvit2Tokenizer\n\n# Initialize the tokenizer\nimage_tokenizer = Magvit2Tokenizer()\n\n# Tokenize an image\nquants, embedding, codebook_indices = image_tokenizer.encode(\"path_to_your_image.jpg\")\n\n# Print the tokens\nprint(image_tokens)\n\nimage = image_tokenizer.decode(quants)\n```\n\n### Documentation\n\nFor more detailed information and examples, please refer to our [official documentation](#).\n\n## Contributing\n\nWe 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. \ud83d\udd27\n\n## License\n\nImageTokenizer is open-source and available under the [MIT License](LICENSE).\n\n## Community\n\n- Join our [Slack Channel](#) to discuss and collaborate.\n- Follow us on [Twitter](#) for updates and news.\n\n## Acknowledgements\n\nWe would like to thank all the contributors and the community for their support and feedback. \ud83d\ude4f\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "Image Tokenizer encode visuals.",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/lucasjinreal/ImageTokenizer"
},
"split_keywords": [
"deep learning",
" script helper",
" tools"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "84918b1dc0690a16ea605129f4050ce12be7c4de2f62e1347399b52bfb1872e2",
"md5": "9b342b9f62b701ce067711c6b8c3a074",
"sha256": "3df37c69411f4626c90bf22ddc5170c15c7e1c49af64eb7259e4e7fcdd1ef461"
},
"downloads": -1,
"filename": "imagetokenizer-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "9b342b9f62b701ce067711c6b8c3a074",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23615,
"upload_time": "2024-06-20T04:14:46",
"upload_time_iso_8601": "2024-06-20T04:14:46.663913Z",
"url": "https://files.pythonhosted.org/packages/84/91/8b1dc0690a16ea605129f4050ce12be7c4de2f62e1347399b52bfb1872e2/imagetokenizer-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-20 04:14:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lucasjinreal",
"github_project": "ImageTokenizer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "imagetokenizer"
}