Skip to content

pdfix/action-generate-alternate-text-blip-large-docker

Repository files navigation

Generate Alternate Text BLIP

Runs locally and uses the BLIP large model to describe image content in alternative text. For PDF output without watermarks, a PDFix SDK license is required.

Table of Contents

Getting started

You need Docker installed. The first run downloads the image and may take longer than later runs.

Usage

Mount a folder into the container and run a subcommand:

docker run --rm -v "$(pwd)":/data -w /data pdfix/alt-text-blip-large:latest <command> [options]

Commands

  • generate-alt-text: Generate alternate text (PDF → PDF or supported image → TXT)

Arguments

generate-alt-text

Option Required Type / expected value Description
--input, -i yes Path to an existing .pdf or supported image file Input PDF or image
--output, -o yes Path for output .pdf or .txt (must match mode) Output file
--model no Path to model directory inside the container (default: model) Local BLIP model path
--overwrite no Boolean string: true/false, yes/no, 1/0 (default: false) Overwrite existing Alt text
--zoom no Float (default 2.0) Page render zoom for PDF mode
--name no String (PDFix account license name) PDFix license name
--key no String (PDFix account license key) PDFix license key

Examples

Generate alternate text for figures in a PDF:

docker run --rm -v "$(pwd)":/data -w /data pdfix/alt-text-blip-large:latest \
  generate-alt-text --name "${LICENSE_NAME}" --key "${LICENSE_KEY}" \
  -i /data/input.pdf -o /data/output.pdf --model /model

Caption a single image to a TXT file:

docker run --rm -v "$(pwd)":/data -w /data pdfix/alt-text-blip-large:latest \
  generate-alt-text -i /data/image.jpg -o /data/output.txt --model /model

Model

The image includes the BLIP large model and runs fully offline (CPU).

Help & support

For PDFix SDK licensing or issues, contact support@pdfix.net.

Licenses

About

Project for docker image that takes image/pdf and adds caption/alternate description for Figure Tags in PDF.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors