page.get_images() only returns raster blobs embedded in the PDF's resource dictionary, so vector schematics like Figure 1 — drawn purely with paths/lines — were never extracted, and the VLM only ever saw incidental embedded photos that happened to live near figures. Replace the xref-based extraction with bbox rendering: union the bounding rects of all vector drawings and raster image_info entries on each page, expand a few points, and render the region with get_pixmap(clip=bbox, matrix=2x). The captioner now receives the actual figure — schematic arrows, box labels, legend text, and any inset photos — and produces a caption that describes the figure as a whole, not just one embedded sub-image. Also sharpen the captioner prompt: explicitly tell the VLM the image is a single figure cropped from a PDF page, and not to describe page chrome or body paragraphs. |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| package-lock.json | ||
| package.json | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||