Skip to main content
QUICK REVIEW

[Paper Review] InternLM-XComposer2-4KHD: A Pioneering Large Vision-Language Model Handling Resolutions from 336 Pixels to 4K HD

Xiaoyi Dong, Pan Zhang|arXiv (Cornell University)|Apr 9, 2024
Multimodal Machine Learning ApplicationsComputer Science7 citations
TL;DR

Introduces InternLM-XComposer2-4KHD, a large vision-language model that handles resolutions from 336 to 4K HD, using dynamic patch configuration and a global-local input design, achieving competitive results with 7B parameters and surpassing some closed APIs on multiple HD-OCR benchmarks.

ABSTRACT

The Large Vision-Language Model (LVLM) field has seen significant advancements, yet its progression has been hindered by challenges in comprehending fine-grained visual content due to limited resolution. Recent efforts have aimed to enhance the high-resolution understanding capabilities of LVLMs, yet they remain capped at approximately 1500 x 1500 pixels and constrained to a relatively narrow resolution range. This paper represents InternLM-XComposer2-4KHD, a groundbreaking exploration into elevating LVLM resolution capabilities up to 4K HD (3840 x 1600) and beyond. Concurrently, considering the ultra-high resolution may not be necessary in all scenarios, it supports a wide range of diverse resolutions from 336 pixels to 4K standard, significantly broadening its scope of applicability. Specifically, this research advances the patch division paradigm by introducing a novel extension: dynamic resolution with automatic patch configuration. It maintains the training image aspect ratios while automatically varying patch counts and configuring layouts based on a pre-trained Vision Transformer (ViT) (336 x 336), leading to dynamic training resolution from 336 pixels to 4K standard. Our research demonstrates that scaling training resolution up to 4K HD leads to consistent performance enhancements without hitting the ceiling of potential improvements. InternLM-XComposer2-4KHD shows superb capability that matches or even surpasses GPT-4V and Gemini Pro in 10 of the 16 benchmarks. The InternLM-XComposer2-4KHD model series with 7B parameters are publicly available at https://github.com/InternLM/InternLM-XComposer.

Motivation & Objective

  • Expand LVLM resolution capabilities to 4K HD and beyond while supporting resolutions from 336 to 4K on diverse inputs.
  • Develop a dynamic patch-based image partitioning and training strategy that preserves aspect ratios and enables higher-resolution understanding.
  • Improve high-resolution OCR and document understanding through targeted pre-training and fine-tuning.
  • Demonstrate competitive performance against closed-source APIs and existing open-source LVLMs on a broad suite of benchmarks.

Proposed method

  • Extend InternLM-XComposer2 with a Vision Encoder (ViT-L/14) and a 7B LLM (InternLM2-7B) connected via Partial LoRA for efficient alignment.
  • Introduce Dynamic Image Partition: resize and pad input to a grid of 336px patches, adjustable up to HD-25/HD-55 and 4KHD, while preserving image aspect ratios.
  • Implement Global-Local Format: process both a global 336x336 view and local patch-based features, merging them into a unified representation.
  • Add a learnable newline token at the end of each patch row to clearly delineate 2D structure and reduce training ambiguity.
  • Pre-train with vision encoder fine-tuned and LLM frozen, aligning visual tokens to the LLM using a mix of semantic, world-knowledge, and capability data; adopt a low-rank Partial LoRA with a training strategy including LLDR decay and staged learning rates.
  • Fine-tune with a mixed-resolution strategy (HD-55 for high-res tasks; dynamic resolution for others) to optimize performance across HD-OCR and general vision-language tasks.

Experimental results

Research questions

  • RQ1How does increasing training and inference resolutions impact performance on high-resolution tasks like OCR, charts, and infographics?
  • RQ2Can dynamic patch configuration with automatic layout scale LVLM capabilities from 336px to 4K, while preserving aspect ratios?
  • RQ3What is the impact of global-view vs. local patches and the newline token on 2D image understanding in LVLMs?
  • RQ4How does IXC2-4KHD compare to closed-source APIs and open-source LVLMs across a broad benchmark suite, including HD-OCR tasks?

Key findings

  • IXC2-4KHD achieves competitive results with 7B parameters, matching or surpassing GPT-4V and Gemini Pro on 10 of 16 benchmarks.
  • The model attains SOTA results in 6 of 16 benchmarks among open-source LVLMs, approaching closed APIs in several tasks.
  • Training up to 4K HD resolution yields consistent gains on HD-OCR tasks with no observed saturation within the tested range.
  • DocVQA 90.0 and ChartQA 81.0 on the evaluated benchmarks demonstrate strong OCR and chart-reading capabilities, outperforming several baselines.
  • InfographicVQA reaches 68.6%, surpassing recent open-source doc-level models by a wide margin; OCRBench attains 67.5%.
  • The model supports 4KHD input (3840x1600) and demonstrates robust performance when inferring at higher resolutions than used in training.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.