Multimodal LLM Visual Understanding: Evaluation and Optimization Practices
This article examines why visual understanding in multimodal LLMs often fails in real-world workflows such as automated testing and UI inspection, and breaks down three common failure modes: degraded perception of small or distant targets, pseudo-matching across frames, and the lack of verifiable evidence. It then outlines a practical evaluation and optimization approach, including a difficulty-tiered dataset with paired samples and negative cases, metrics such as detection rate, localization error, and matching accuracy, and engineering techniques like tiled multi-scale inference, structured output prompts, a two-stage locate-then-judge pipeline, and regression-driven data feedback. The key takeaway is that vague user complaints can be turned into measurable metrics, with stability on hard cases and negative samples serving as the real sign of maturity.
1. Background: Why Visual Understanding Fails in Real Business Scenarios
When deploying multimodal LLMs, improvements in pure text reasoning are usually the easiest to notice, while weaknesses on the visual side tend to surface all at once in real workflows. A typical case is automated testing and UI inspection: the model must compare consecutive screenshots and determine whether an element has shifted, been occluded, or rendered incorrectly. The three most common complaints from users are: the model completely “misses” a target that is slightly far from the camera and occupies a small portion of the frame; even when explicitly told that the camera position is identical, the model repeatedly fails to match across multiple screenshots; and human annotators have to manually circle and box each issue before it can be located.
These are not isolated defects, but the external manifestation of three insufficient capability dimensions at the same time. First, fine-grained perception, meaning recognition of small, low-contrast, and distant targets. Second, cross-frame spatial alignment, meaning establishing pixel-level or semantic-level correspondence under the premise of a consistent viewpoint. Third, verifiable localization output, meaning the model’s conclusions must come with traceable coordinates or region evidence, rather than a vague judgment.
2. Breakdown of Failure Modes
2.1 Perception Decay for Small and Distant Targets
When a target occupies less than a certain proportion of the frame, its effective features are heavily compressed after downsampling by the visual encoder, and the model tends to rely on global semantics rather than local details. The result: an anomalous region clearly exists in the image, yet the model answers “no obvious issue found.”
2.2 “Pseudo-Matching” in Cross-Frame Comparison
Even when two frames share the same camera position, the model may produce incorrect correspondences due to lighting, compression noise, or partial occlusion. A more subtle case is when the model “seems to have found it,” but the region it returns is significantly offset from the true region. This type of error is more dangerous than a direct failure, because it contaminates downstream automated decisions.
2.3 Lack of a Verifiable Evidence Chain
Pure natural-language conclusions cannot be consumed by programs. What engineering actually needs is structured output: region coordinates, confidence scores, and paired frame IDs. Without this layer of structure, automated regression is impossible, and the process falls back to manual circling.
3. Building the Evaluation Set: Turning Subjective Experience into Objective Metrics
It is recommended to organize the evaluation set in a “difficulty-tiered + paired” manner.
dataset/easy/ target ratio > 15%, normal contrastmedium/ target ratio 5%~15%, slight noisehard/ target ratio < 5%, distant, low contrastpairs/ paired screenshots from the same camera position, annotated with true corresponding regionslabels.json
Each sample in labels.json should contain at least: sample ID, difficulty tier, polygon or rectangle coordinates of the true region, paired sample ID, and whether it is a negative sample (i.e., the two frames are actually from different camera positions). Negative samples are critical, as they test whether the model will “force a match just to produce an answer.”
For metric design, it is recommended to observe three categories at the same time:
- Detection rate: the proportion of anomalies correctly detected under a given decision threshold, counted per difficulty tier;
- Localization error: the intersection-over-union between the predicted region and the true region, used to measure the degree of “found it but located it wrong”;
- Matching accuracy: the proportion of paired samples with correctly established correspondences, with the mismatch rate on negative samples counted separately.
4. Engineering Optimization Paths
4.1 Input Side: Tiling and Multi-Scale Sampling
Do not feed a high-resolution screenshot into the model all at once. A tile-then-merge strategy can be used: split the large image into overlapping local patches, ask about each patch, and map the results back to the original image by coordinates. The illustrative logic is as follows:
def tiled_infer(image, tile=512, overlap=64):results = []for box in sliding_windows(image.size, tile, overlap):patch = image.crop(box)ans = model.ask(PATCH_PROMPT, patch)if ans.hit:results.append(map_back(box, ans.region, ans.score))return merge_nms(results, iou_threshold=0.5)
The benefit of tiling is that the proportion of small targets within each local patch increases significantly. The cost is a higher number of calls, so a balance must be struck between cost and recall.
4.2 Prompt Side: Rewriting Vague Requests into Decidable Constraints
Prompts like “find the problem” can hardly be reproduced reliably. A more dependable approach is to provide explicit constraints: target category, possible location range, and expected output format. For example, require the model to output only structured results:
{"hit": true, "region": [x, y, w, h], "score": 0.0, "pair_id": "A-012"}
Structured output allows results to be consumed directly by programs and makes statistics and regression easier.
4.3 Pipeline Side: Two-Stage “Locate First, Then Judge”
The first stage only recalls candidate regions, allowing high recall and low precision; the second stage performs fine-grained judgment and scoring on the candidate regions. This division of labor significantly reduces the difficulty of one-shot end-to-end inference and makes failure causes easier to attribute.
4.4 Data Side: Closed-Loop Feedback
Turn manual annotation results into a regression set, and run the tiered evaluation after every model or prompt strategy change to observe whether metrics on the hard tier degrade. Optimization without a regression set is essentially uncontrollable.
5. Platform-Level Implementation Suggestions
In real production environments, the above pipeline usually needs to be carried by several general cloud capabilities: object storage for saving screenshots and annotation files, a message queue for peak shaving and driving asynchronous inference tasks, a container platform for hosting tiled inference and model services, and logging plus monitoring and alerting for tracking metric fluctuations across difficulty tiers. In such scenarios, Baidu AI Cloud typically provides support through combinations of general product categories, and specific selection should still be validated against business scale and cost constraints.
6. Common Pitfalls
- Focusing only on overall accuracy: the overall metric is diluted by easy-tier samples and masks degradation on the hard tier;
- Ignoring negative samples: the model’s tendency to force matches is only exposed on negative samples;
- Feeding the whole large image at once: the higher the resolution, the more severely small targets are diluted;
- Conclusions without coordinates: automated regression becomes impossible, and manual circling is still required in the end;
- Frequently changing prompts without regression: optimization effects cannot be attributed.
7. Conclusion
From an engineering perspective, the “blindness” and “failure to find” in visual understanding are problems that can be decomposed, measured, and optimized. Through a difficulty-tiered evaluation set, paired samples and negative sample design, tiled multi-scale input, structured localization output, and a two-stage pipeline, teams can turn vague experience complaints into clear metric curves. The real mark of maturity is not that the model performs impressively on a few images, but that it remains stable on the hard tier and negative samples, with regression data backing every iteration.
