Preface¶
DeepSeek records at most 384 visual tokens per image. When processing high-resolution images or dense documents (such as receipts, tables, charts, or long screenshots), this budget is often insufficient to retain all details, causing small text or edge information to be lost. The DSH Vision Tiler plugin uses image tiling technology to assign an independent image budget to each local region while preserving a complete, auditable coverage view of the source image.
What Is This¶
This is a vision model helper tool in the DeepSeek Harness (DSH) plugin ecosystem, developed by the maintainer zyh20041227. It splits a high-resolution image into a global overview, overlapping coverage tiles, and optional detailed crops for dense regions, for DSH models to read. The plugin uses pure JavaScript and built-in WebAssembly, avoiding dependency conflicts with native image build libraries.
Installation and Enablement¶
Use the DSH command-line tool to install the plugin. Because the npm registry version has not been released, a fixed GitHub version tag must be used.
- Ensure that DeepSeek Harness and an image-capable model profile are installed.
- Ensure that Node.js 22 or higher is installed on the system.
- Run the installation command:
dsh plugin --profile web add github:zyh20041227/improved_vision_for_deepseek#v0.2.3
After installation, you can verify that the plugin loaded successfully by running dsh --profile web --dump-config.
Core Features¶
- 100% geometric coverage: Tiles are audited to ensure every pixel of the source image is covered.
- Overlapping seams: Text and shapes spanning tile boundaries remain visible in adjacent tiles, preventing content from being cut off.
- Content-aware cutting: In document mode, the algorithm moves seams into low-ink areas.
- Dense-region review: Optionally generates 512×512 detail crops to supplement basic coverage.
- Bounded batching: Large numbers of tiles are returned in batches according to model safety thresholds.
- Traceable output: Each tile carries source coordinates, role, batch status, and conservative token limits.
- Decode support: Supports decoding PNG/JPEG/BMP/GIF/TIFF, uses built-in WASM to decode WebP, and supports EXIF orientation correction.
Typical Usage¶
The DSH plugin registers a tool named segment_image. Developers need to instruct the model in the prompt to call this tool and continue processing the remaining tile batches after the model returns the first batch.
Example invocation:
Call segment_image for D:\images\document.png with mode=document and batch_index=0.
If remaining_batch_indices is not empty, read every remaining batch before answering.
Report uncertain_regions and cite the tile IDs used.
Tool parameter descriptions:
| Parameter | Meaning |
|---|---|
path |
Absolute path, or a path relative to the DSH process directory |
mode |
Mode, optional auto, document, diagram, or photo |
strategy |
Strategy, default adaptive; uniform is also available |
batch_index |
Zero-based batch index for output |
Use Cases and Notes¶
Use cases: processing dense text, tables, small text charts, or high-resolution documents. Benchmark tests show that in specific tests, using this plugin improved the model’s exact code recognition rate (F1) from 19.68% to 96.44%.
Notes:
* No native builds required: Version v0.2.3 uses pure JS and WebAssembly, so there is no need to configure allow-build.
* Token limits: DeepSeek’s 384-token limit is a hard constraint; the plugin mitigates rather than eliminates this limit through tiling.
* Semantic recognition: The plugin guarantees geometric coverage, but it cannot guarantee that the model semantically recognizes every visible character (such as blurred text, compression artifacts, or special fonts).
* Version pinning: A fixed GitHub version is currently used, with no dependency on the npm registry.
* System requirements: Requires a Node.js 22+ environment.
Short Conclusion¶
The DSH Vision Tiler plugin solves the insufficient token budget problem of DeepSeek vision models when processing high-density images through geometric coverage and overlapping seams. With traceable output and bounded batching, it provides developers with a controllable image processing pipeline. For more technical details and benchmark data, see its GitHub repository and technical report.
Links:
* GitHub repository
* Plugin directory page