HackerPapers

arXiv:2210.03347cs.CL

Pix2Struct: Screenshot Parsing as Pretraining for Visual Language Understanding

Kenton Lee, Mandar Joshi, Iulia Turc, Hexiang Hu, Fangyu Liu, Julian Eisenschlos, Urvashi Khandelwal, Peter Shaw, Ming-Wei Chang, Kristina Toutanova

Abstract

Visually-situated language is ubiquitous -- sources range from textbooks with diagrams to web pages with images and tables, to mobile apps with buttons and forms. Perhaps due to this diversity, previous work has typically relied on domain-specific recipes with limited sharing of the underlying data, model architectures, and objectives. We present Pix2Struct, a pretrained image-to-text model for purely visual language understanding, which can be finetuned on tasks containing visually-situated language. Pix2Struct is pretrained by learning to parse masked screenshots of web pages into simplified HTML. The web, with its richness of visual elements cleanly reflected in the HTML structure, provides a large source of pretraining data well suited to the diversity of downstream tasks. Intuitively, this objective subsumes common pretraining signals such as OCR, language modeling, image captioning. In addition to the novel pretraining strategy, we introduce a variable-resolution input representation and a more flexible integration of language and vision inputs, where language prompts such as questions are rendered directly on top of the input image. For the first time, we show that a single pretrained model can achieve state-of-the-art results in six out of nine tasks across four domains: documents, illustrations, user interfaces, and natural images.

arXiv comments
Accepted at ICML
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.CVComputer Vision and Pattern Recognition

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Oct 2022 to Jan 2023.

Comments linking this paper, per year.

Discussed in comments2 threads

    • Pix2Struct: Screenshot Parsing as Pretraining for Visual Language Understanding https://arxiv.org/abs/2210.03347 https://github.com/google-research/pix2struct

      felixrView on HNParent context

    • There is a visual demo here: https://sites.google.com/view/llm4html/home. This work is very exciting to me for a few reasons: - HTML is an incredibly rich source of visually structured information, with a semi-structured representation. This is as opposed to PDFs, which are…

      ankrgylView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.