Multimodal Perception Gap and Visual Primitives: A Practical Guide

    This article explains why multimodal models often see an image but fail on dense counting, precise localization, and spatial reasoning, and how visual primitives address the gap. It covers the perception gap and the reference gap, the core idea of visual primitives such as points, boxes, and polygons, and the differences between native visual primitives and think-with-image approaches. It also outlines a practical verification workflow with decidable test sets, structured-output checks, consistency comparisons, and layered metrics, followed by engineering practices for agent frameworks and common misconceptions. The goal is to help developers build reproducible multimodal evaluation baselines and choose or combine approaches based on task characteristics.

    1. Background: Why Multimodal Models See but Cannot Describe Accurately

    A recurring pattern in real-world use of multimodal large models is that a model can recognize the general scene in an image yet frequently fails on tasks such as dense counting, fine-grained localization, and complex spatial relationship judgment. These failures are not simply caused by insufficient image resolution, nor can they be solved by merely enlarging the visual encoder. They involve two levels of gaps.

    The first is the perception gap. Once an image is compressed into a limited number of visual tokens, information about small objects, densely arranged objects, and low-contrast regions is largely lost. Key details are already missing at the “seeing” stage, so later reasoning cannot recover them.

    The second is the reference gap. Even if the model sees the image clearly, describing target positions only in natural language, such as “the third person from the top left” or “the block near the edge,” is inherently ambiguous. Natural language lacks stable coordinate semantics. As the number of targets grows or spatial relationships become more complex, the reference chain breaks down, showing up as counting errors, localization drift, and failed path planning.

    Therefore, improving multimodal capability requires more than “seeing the image more clearly.” The model also needs a means to unambiguously point to visual objects during reasoning. This is the problem that visual primitive approaches attempt to solve.

    2. Core Idea of Visual Primitives

    Visual primitives can be summarized as a set of structured visual markers that the model can output directly, serving as “pointers” that precisely describe objects in a continuous visual space. Common primitive types include points, bounding boxes, and polygons, corresponding to three semantics: position, extent, and contour.

    Compared with free-form text descriptions, visual primitives offer three engineering advantages:

    1. Closed semantics: a point is a point and a box is a box, leaving no room for interpretation such as “roughly around that position”;
    2. Parseable and executable: structured markers can be parsed directly by external programs and mapped back to pixel coordinates, making them easy to use in tool chains;
    3. Composable reasoning: complex tasks can be decomposed into primitive sequences such as “locate first, then count, then plan,” making the reasoning chain more stable.

    At the implementation level, this capability is typically reflected as special markers added to the vocabulary to wrap a set of coordinate data. A schematic structure is as follows (it only expresses a general format and is not the interface of any specific product):

    1. <point> x1,y1 ; x2,y2 ... </point>
    2. <box> x1,y1,x2,y2 ; ... </box>
    3. <polygon> x1,y1 ; x2,y2 ; ... </polygon>

    When the model outputs these markers, it is essentially generating “references that point to image regions” rather than a natural language description that must be understood again. This moves the reference process from “fuzzy semantics” to “precise data structures.”

    3. Differences Between the Two Technical Approaches

    Two lines of thinking have long existed in multimodal visual processing.

    Approach 1: Native visual primitives. The model introduces structured visual markers during training, so it operates on visual regions directly with primitives during internal reasoning. In theory, this gives the most precise reference and is most friendly to dense counting and complex localization.

    Approach 2: Think with image. The model treats image operations as external tool capabilities, iteratively observing through cropping, zooming, annotation, and re-input, completing tasks in a way closer to how humans “look at images repeatedly.” This approach has low implementation cost and strong interpretability, but places higher demands on tool-call orchestration and context management.

    Notably, the two are not mutually exclusive. A mature agent framework can switch strategies across tasks: prefer primitive-style output for structured localization tasks, and adopt iterative cropping and re-input for exploratory observation tasks. To determine which approach a deployment actually uses, do not rely only on promotional descriptions; verify it through reproducible experiments.

    4. How to Verify Whether a Multimodal System Truly Has Structured Visual Capability

    Since official examples may differ from real deployment behavior, a more reliable engineering practice is to build your own verification process.

    Step 1: Construct test sets with decidable answers. For example, generate synthetic images with a known number of people, maze images with known paths, and regularly arranged shapes with known counts. The answers for such samples are unique and can be automatically checked.

    Step 2: Check whether the output is structured. Observe whether the model provides parseable coordinate markers in its answers rather than only text descriptions. If it outputs only natural language, it can basically be determined that it does not use primitive-style reference.

    1. import re
    2. def has_visual_primitive(text: str) -> bool:
    3. pattern = r"<(point|box|polygon)>.*?</\1>"
    4. return re.search(pattern, text, flags=re.S) is not None

    Step 3: Run consistency comparisons. Test the same image repeatedly under different prompts, resolutions, and context lengths, and compute the variance in accuracy. If metrics fluctuate sharply with phrasing, the model still relies on natural language reference.

    Step 4: Use layered evaluation metrics. At minimum, include counting accuracy, localization error (such as center-point pixel distance or intersection over union), spatial relationship judgment accuracy, and multi-step planning success rate. A single accuracy figure can hide the structure of the problem.

    5. Engineering Practices in Agent Frameworks

    When carrying multimodal capabilities in intelligent coding tools or agent frameworks, configuration and observability often become bottlenecks more easily than the model itself. Common problems include inconsistent configuration formats, unclear upgrade paths, official documentation aimed at developers rather than end users, and inconsistent integration between third-party and built-in methods.

    Suggestions for improvement:

    • Unified configuration entry: use a declarative configuration file to describe the model, tool set, and operating profile, avoiding parallel use of command-line arguments and file configuration;
    • Traceable versions: pin dependency versions and record changes, then run regression cases after upgrades to prevent capabilities from silently degrading;
    • Explicit capability switches: make capabilities such as visual primitives and iterative image observation into readable switch items for controlled experiments;
    • Observable tool chains: record each image crop, zoom, and annotation as structured logs to make it easier to trace failure causes;
    • Automated evaluation: integrate the test sets above into a continuous integration process to form a capability baseline.

    Schematic configuration (general format):

    1. model: multimodal-chat
    2. profile: web
    3. capabilities:
    4. visual_primitive: true
    5. iterative_image_observation: true
    6. limits:
    7. max_image_tokens: 4096
    8. max_tool_calls: 8

    6. Common Misconceptions and Conclusion

    Misconception 1: attributing counting errors simply to resolution. In fact, improper reference methods can also cause logical breakdowns and errors even at high resolution.

    Misconception 2: assuming that adding special markers equals having primitive capability. Markers are only carriers; what matters is whether the training and reasoning chain truly operates on primitives.

    Misconception 3: replacing self-built evaluation with official demos. Demo samples are curated, so engineering decisions must be based on reproducible, automatically verifiable benchmarks.

    Overall, the value of visual primitives lies in turning visual reference from fuzzy semantics into precise data structures, thereby mitigating the reference gap, while the value of thinking with image lies in engineering flexibility and interpretability. For developers, a more pragmatic path is to first establish a layered evaluation baseline, then choose or combine the two approaches based on task characteristics, and stabilize capabilities through unified configuration, pinned versions, and full-chain logging. Relying on general cloud capabilities (such as object storage for image data, container platforms for running inference services, and logging services with monitoring and alerting for observability) can help set up this reproducible multimodal verification and release loop faster.