This tool utilizes Ertugrul/Qwen2-VL-7B-Captioner-Relaxed VLM, to caption image files in a batch.
Place all images you wish to caption in the /input directory and run py batch.py.
It's a very fast and fairly robust captioning model that can produce good outputs in 3 different levels of detail.
Python 3.10 or 3.11.
Cuda 12.1.
GPU with ~20gb VRAM
venv_create.bat to automatically create it. Use python 3.10 or above.pip install -r requirements.txt. This is done by step 1 when asked if you use venv_create.batch.py in a text editor and edit any settings you want.venv_create.bat, you can run venv_activate.bat.python batch.py from the virtual environment.This runs captioning on all images in the /input/-folder.
You can edit batch.py in a text editor and edit the DEFAULT_PROMPT value to change the captioning prompt.
Here are some example prompts and their captions:
In one short sentence, caption the key aspects of this image
A whimsical green frog with a playful expression sits on a lily pad amidst a serene pond adorned with large, glossy leaves and delicate yellow flowers.
In one medium sentence, caption the key aspects of this image
A whimsical digital illustration depicts an anthropomorphic frog with human-like features sitting on a lily pad amidst a serene pond adorned with large, glossy green leaves and delicate yellow flowers. The scene is bathed in soft sunlight, creating a tranquil, almost dreamlike atmosphere.
Describe all details of this image
This is a highly detailed, digital artwork depicting an anthropomorphic frog sitting on a lily pad in a serene pond environment. The frog has a light green skin with darker green patches and a prominent white belly. Its eyes are large and expressive, giving it a wise or contemplative look. The frog's mouth is slightly open, revealing a hint of its tongue and teeth, adding a touch of whimsy to the character. It wears a blue scarf around its neck, which adds a casual yet stylish element. The background features lush green foliage, including large, round lily pads that float on calm water reflecting the sky above. There are also delicate yellow flowers emerging from some of the lilies, contributing to the tranquil ambiance. The lighting suggests a sunny day, with sunlight filtering through the leaves, creating a dappled effect on the ground and water surface. The overall color palette is vibrant, with shades of green dominating the scene, complemented by soft blues and yellows. The texture of the lily pads appears smooth but slightly roughened at the edges, while the water looks still and reflective. The composition emphasizes the tranquility and natural beauty of the setting, making the viewer feel immersed in this peaceful landscape.
Caption this image using comma-separated tags
frog, lily pads, pond, water, leaves, nature, green, smiling, cartoonish, illustration, summer, tranquility, outdoor, garden, whimsical, playful, calm, serene,
In one word: What is the primary color of this image.
Green
6 commits
Python
62.9%
Batchfile
37.1%
This tool utilizes Ertugrul/Qwen2-VL-7B-Captioner-Relaxed VLM, to caption image files in a batch.
Place all images you wish to caption in the /input directory and run py batch.py.
It's a very fast and fairly robust captioning model that can produce good outputs in 3 different levels of detail.
Python 3.10 or 3.11.
Cuda 12.1.
GPU with ~20gb VRAM
venv_create.bat to automatically create it. Use python 3.10 or above.pip install -r requirements.txt. This is done by step 1 when asked if you use venv_create.batch.py in a text editor and edit any settings you want.venv_create.bat, you can run venv_activate.bat.python batch.py from the virtual environment.This runs captioning on all images in the /input/-folder.
You can edit batch.py in a text editor and edit the DEFAULT_PROMPT value to change the captioning prompt.
Here are some example prompts and their captions:
In one short sentence, caption the key aspects of this image
A whimsical green frog with a playful expression sits on a lily pad amidst a serene pond adorned with large, glossy leaves and delicate yellow flowers.
In one medium sentence, caption the key aspects of this image
A whimsical digital illustration depicts an anthropomorphic frog with human-like features sitting on a lily pad amidst a serene pond adorned with large, glossy green leaves and delicate yellow flowers. The scene is bathed in soft sunlight, creating a tranquil, almost dreamlike atmosphere.
Describe all details of this image
This is a highly detailed, digital artwork depicting an anthropomorphic frog sitting on a lily pad in a serene pond environment. The frog has a light green skin with darker green patches and a prominent white belly. Its eyes are large and expressive, giving it a wise or contemplative look. The frog's mouth is slightly open, revealing a hint of its tongue and teeth, adding a touch of whimsy to the character. It wears a blue scarf around its neck, which adds a casual yet stylish element. The background features lush green foliage, including large, round lily pads that float on calm water reflecting the sky above. There are also delicate yellow flowers emerging from some of the lilies, contributing to the tranquil ambiance. The lighting suggests a sunny day, with sunlight filtering through the leaves, creating a dappled effect on the ground and water surface. The overall color palette is vibrant, with shades of green dominating the scene, complemented by soft blues and yellows. The texture of the lily pads appears smooth but slightly roughened at the edges, while the water looks still and reflective. The composition emphasizes the tranquility and natural beauty of the setting, making the viewer feel immersed in this peaceful landscape.
Caption this image using comma-separated tags
frog, lily pads, pond, water, leaves, nature, green, smiling, cartoonish, illustration, summer, tranquility, outdoor, garden, whimsical, playful, calm, serene,
In one word: What is the primary color of this image.
Green
6 commits
Python
62.9%
Batchfile
37.1%