VLM Captioner
Uses a VLM (initially configured to use Qwen2.5-VL-32B-Instruct) to caption images from a dataset.
Dataset Structure
One VLM prompt will be used for each entire image directory.
For each image directory, a mirror file structure is created with the suffix _caption. This structure contains individual .txt caption files with filenames matching that of their image counterparts.
dataset/
└── top_level_folder_1/
├── image_folder_1 (contains prompt for entire folder)/
│ ├── prompt.txt
│ ├── image_1.png
│ ├── image_2.png
│ └── ...
└── ...
Running
First, install the required packages:
pip install -r requirements.txt
Then, run the script:
python vlm_caption_cli.py --input_dir=<input_dir> [--model=<vlm_model>]
Command Line Args
Required Args:
--input_dir=<input_dir> || The path of the input directory containing images to be captioned.
Optional Args:
--model=<vlm_model> || VLM to use to generate captions
--max_length=<max_new_tokens> || Maximum number of new tokens before truncation
--ignore_substring=<ignore_substring> || Ignore files/directories containing this substring
--num_captions=<number_of_captions> || Number of captions to generate per image
--overwrite=<True/False> || If true, overwrites captions that already exist
--output_dir=<output_dir> || The directory to act as the root of the caption file structure. Defaults to `<input_dir>_caption`.
Metadata
Release files for vlm-dataset-captioner 0.0.4
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 |
|---|---|---|---|---|
| vlm_dataset_captioner-0.0.4.tar.gz | 4.4 kB | With provenance | Details for vlm_dataset_captioner-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vlm_dataset_captioner-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for vlm_dataset_captioner-0.0.4-py3-none-any.whl |
Total release size: 10.1 kB
Release files / vlm_dataset_captioner-0.0.4.tar.gz
| Download URL | vlm_dataset_captioner-0.0.4.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b712901663042f88c94b01cf08aa3c13855074dd85916f53d96a6e09d8f3b06
|
|
BLAKE2b-256 checksum How to use checksums |
8bbf3099d837f07e6cda400fa22f09315e9997b2eb4e7531fc6025411f73249b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.
Transparency logRelease files / vlm_dataset_captioner-0.0.4-py3-none-any.whl
| Download URL | vlm_dataset_captioner-0.0.4-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e05058223215301563035d4263c61384c1fc6a9f9e44588a62c3eaa215c5b864
|
|
BLAKE2b-256 checksum How to use checksums |
ae5ae8e9b87a905822e7566aaa90e929b6a8388a104872a86b177dd54162fc95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.
Transparency logSecurity for vlm-dataset-captioner 0.0.4
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vlm_dataset_captioner-0.0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.
Transparency logA 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.