Document Pipeline (reanimator.pipeline)#

The ReanimatorVLM class orchestrates end-to-end PDF processing, VLM page conversion, boundary stitching, and layout localization.


ReanimatorVLM#

class ReanimatorVLM(
    backend: Optional[VLMBackend] = None,
    localizer: Optional[PDFLocalizer] = None,
    stitcher: Optional[PageStitcher] = None,
    dpi: int = 150,
    parallel_workers: int = 20,
)

Methods#

process_pdf(pdf_path: Union[str, Path], doc_id: Optional[str] = None, verbose: bool = True) -> Document#

Process a local PDF file and return a fully structured Document instance.

download_and_process(arxiv_id: Optional[str] = None, doi: Optional[str] = None, url: Optional[str] = None, output_dir: Optional[Union[str, Path]] = None, email: Optional[str] = None, verbose: bool = True) -> Optional[Document]#

Download paper from arXiv, Unpaywall (DOI), or direct URL, and process end-to-end.


PDFLocalizer#

class PDFLocalizer(
    normalise: bool = True,
    extract_figure_images: bool = True,
    save_dir: Union[str, Path] = "figures",
)

Performs layout bounding box normalization against exact page dimensions and crops figure images to disk.