ZZ-Image-Caption
Image captioner CLI using BLIP and BLIP2 models
Installation
Requirements:
- Python 3.10 or higher
Install using pip:
pip install zz-image-caption
Install pytorch
You may need to install pytorch separately depending on your system to use CUDA (default to use CPU if not available).
Usage
Basic usage:
Print caption for an image to the console
caption image.jpg
Advanced usage:
Rename images in a directory with their captions
caption images/ -o filename
Write metadata for images in a directory with their captions
caption images/ -o metadata
Print caption for an image to the console using the BLIP2 model
caption image.jpg --blip2
Command Line Interface Options
The following table lists all the command-line arguments available with descriptions and additional details:
| Argument | Type | Choices | Default | Description |
|---|---|---|---|---|
-v, --version |
flag | Display the version of the tool. | ||
input |
string | Path to the input image file or directory. | ||
-o, --output |
string | text, json, metadata, filename | Specify the output type. | |
-a, --append |
string | Append string to caption output. | ||
-t, --token |
integer | 32 | Max token length for captioning. | |
-b, --batch |
integer | 1 | Batch size for captioning. | |
-p, --prompt |
string | Prompt for captioning. | ||
--temp, --temperature |
float | 1.0 | Temperature for captioning. | |
--seed |
integer | Seed for reproducibility. | ||
--large |
flag | Use the large model for captioning. | ||
--cpu |
flag | Use CPU instead of GPU (not recommended). | ||
--blip2 |
flag | Use Blip2 model for captioning. | ||
--verbose |
flag | Print verbose output. | ||
--debug |
flag | Print debug output. |
Help:
caption --help
Metadata
Release files for zz-img-caption 0.0.3
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 | |
|---|---|---|---|---|
| zz-img-caption-0.0.3.tar.gz | 7.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zz_img_caption-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / zz-img-caption-0.0.3.tar.gz
| Download URL | zz-img-caption-0.0.3.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b624642758fa555feab16cd9ddda51e1474491c65fe3a25ed26e58d90a74afe
|
|
BLAKE2b-256 checksum How to use checksums |
0bbe35134e3ab65e8ac84f7580ea55ac4d01ddd52cbeab9b6f0083df8b68f6cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|
Release files / zz_img_caption-0.0.3-py3-none-any.whl
| Download URL | zz_img_caption-0.0.3-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04ea82f1019f69602491534d00397af2248bb6fd53beb5fa818903bc40ddeff5
|
|
BLAKE2b-256 checksum How to use checksums |
d91c90e16fde97d08210bbca53c6422bb9704bfe7884fbca76de52fba9adccea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.11
|
Security for zz-img-caption 0.0.3
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.