Created an image processing tool focused on batch captioning, since JoyCaption’s demo only captions one image at a time.
- Clone this repository
git clone https://github.com/LightCyan01/JoyCaption-Batch-Image-Captioner.git
cd JoyCaption-Batch-Image-Captioner- Clone the JoyCaption model
git clone https://huggingface.co/fancyfeast/llama-joycaption-beta-one-hf-llava- Create venv and activate
python -m venv venv
venv\Scripts\activate- Install requirements
For GPU:
pip install -r requirements-cuda.txtFor CPU:
pip install -r requirements.txt- Run GUI
python image_captioner.py- CLI Alternative
python batch_caption.py <image_folder> [options]Examples:
python batch_caption.py "C:\MyImages"
# Overwrite existing captions
python batch_caption.py "C:\MyImages" --overwrite
# Use descriptive style
python batch_caption.py "C:\MyImages" --style descriptive
# Custom model path
python batch_caption.py "C:\MyImages" --model "path/to/custom/model"Options:
--style: Caption style (training,descriptive,straightforward) - Default:training--overwrite: Overwrite existing caption files--model: Custom model path - Default:llama-joycaption-beta-one-hf-llava
Caption Styles:
training(default): Short, factual descriptions perfect for LoRA trainingdescriptive: Long, detailed descriptionsstraightforward: Concise, objective captions
Creates .txt files alongside each image.
Credits:
- JoyCaption: https://github.com/fpgaminer/joycaption
