Generate captions for images using GIT from MSFT
Project description
imgcap
A CLI to generate captions for images using the GiT model from MSFT
Install
Install imgcap
in your system using:
pip install imgcap
The model size is of 707MB and once initially downloaded, it will be stored in the ~/.cache/huggingface/hub/
.
Usage
Run the CLI tool as follows
nameit [OPTIONS] PATHS..
Options
--output [pretty|json]
: Specify the output format (default: pretty).--max-tokens INTEGER
: Maximum number of tokens in the generated caption (default: 50).--recursive
: Recursively process directories to find images.--threads INTEGER
: Number of threads to use for processing (default: 1)
Example commands
- Generate captions for a single image:
imgcap ./path/to/image.jpg --output pretty
- Generate captions for all images in a directory:
imgcap ./path/to/directory --recursive --output json
- Use multiple threads for faster processing:
imgcap ./images --threads 4
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imgcap-0.2.tar.gz
(3.9 kB
view details)
Built Distribution
imgcap-0.2-py3-none-any.whl
(3.4 kB
view details)
File details
Details for the file imgcap-0.2.tar.gz
.
File metadata
- Download URL: imgcap-0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd41d141735a0211bff4355745bbf60982fedbbf6bbba057a828c2521e901bb9 |
|
MD5 | 81e4f2e76e9fe5b5cbeb3ee9adb47634 |
|
BLAKE2b-256 | 1a0020041f486bfd148c48dc888f8ab21250834f11cee6d8e0e3e242752e7614 |
File details
Details for the file imgcap-0.2-py3-none-any.whl
.
File metadata
- Download URL: imgcap-0.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfe9e1111f3e2be8d7314ee8ed82dea6cc49398f9d3da8c8f95a5aab9efe2f7d |
|
MD5 | 0c2e1b3826f4a01437fe890dd29b24ba |
|
BLAKE2b-256 | ae3cdc5311ab0d5110a1e8561accb98b2fcdb69547ead62921403b67bb6e95f9 |