Skip to content

Add matplotlib implementation as tex rendering fallback, and subsequent improvements to text visualization and output sizing#16

Open
zzyking wants to merge 1 commit into
xmed-lab:mainfrom
zzyking:feature/tex-render-fallback
Open

Add matplotlib implementation as tex rendering fallback, and subsequent improvements to text visualization and output sizing#16
zzyking wants to merge 1 commit into
xmed-lab:mainfrom
zzyking:feature/tex-render-fallback

Conversation

@zzyking

@zzyking zzyking commented Jan 5, 2026

Copy link
Copy Markdown

Summary (diff vs previous)

  • Added a first-class matplotlib/CV fallback for text rendering (escapes $, consistent spacing/padding) so environments without texlive-xetex/sudo still produce readable outputs; docs now mention the fallback and Pillow was added for DPI-aware saves.
  • Set default render DPI to 200 and switched to PIL-based saving to speed up renders while keeping clarity.
  • Tightened default viz sizing (width 800) with aspect-ratio helpers; video outputs scale per-frame to avoid too wide composite image-text outputs, which observably slows down processing.
  • Removed fitz from requirements because pymupdf can fully replace it.

Motivation

  • texlive-xetex is bulky and often unavailable on clusters without sudo. The fallback keeps text viz usable and quicker, while DPI/sizing tweaks prevent oversized outputs.

Testing

  • Selected one visualization for each settings in demo.py (qwen2vl, internvl3, qwen2vl_video from top to bottom)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant