Introduction

When the DeepSeek visual model processes images, if the size exceeds approximately 800×800 equivalent pixels, it automatically downscales the image, which can cause fine text, chart details, or icons in screenshots to be erased. The dsh-v4flash-tiler plugin is designed to solve detail loss in this scenario by automatically slicing overly large images on the host side into grid tiles with row and column coordinates, then sending them to the model for analysis.

Plugin Overview

This is an automatic tiling plugin for large images used with DeepSeek visual models. It is maintained by doublehappy123 and released under the MIT license. It supports the DeepSeek v4Flash vision model, automatically slices oversized chat images, and labels the grid and coordinates so that the model can reassemble the full image by coordinates while preserving the original sharpness.

Key Features

  1. Auto tiling: Images with any side length exceeding 1024px are automatically tiled; images smaller than this size remain unchanged.
  2. Coordinate labels: Tiled slices are accompanied by row and column coordinates, and grid metadata is provided.
  3. Limits and overlap: A single image is sliced into at most 9 tiles, with 15% overlap between tiles.
  4. Independent grouping: Tiles from each original image form their own group, and cross-image mixing is prohibited.
  5. Detail protection: Prevents details from being erased by automatic downscaling to approximately 800px.
  6. Failure fallback: If tiling fails, the original image is automatically used as fallback, and the reason is explained in the message.

Installation and Enablement

Install the Python engine before installation. Run the following steps:

  1. Install the Python engine
   pip install -e ./engine
  1. Install the plugin to the specified profile
   dsh plugin --profile web add github:doublehappy123/dsh-v4flash-tiler
  1. Restart DSH (this profile)

Note: The plugin stack is independent per profile; install it separately for each profile.

Typical Usage

Automatic Tiling in Chat

Send any image directly in the chat interface. If the image size exceeds the limit, the system automatically tiles it and labels the row and column coordinates; if the image size is within limits or tiling fails, the original image passes through unchanged.

Manual CLI Analysis

After installing engine, use the CLI tool:

# 仅查看分块计划,不调用 API
v4flash-tiler --image screenshot.png --mode auto --dry-run

# 调用 API 分析图片
v4flash-tiler --image screenshot.png --prompt "提取全部文字"

Note: Manual CLI analysis mode additionally requires setting the environment variable DEEPSEEK_API_KEY.

Python API Call

from v4flash_tiler import DeepSeekVisionClient

result = DeepSeekVisionClient().analyze_image("large.png", prompt="分析这张图")

Use Cases and Notes

This plugin is suitable for scenarios that require processing large screenshots, dense small text, or charts.

  • Token estimation: input tokens per tile are about 384, and 9 tiles are about 3400 tokens per image.
  • Limit protection: the total number of tiles per message is protected by the DSH attachment limit; oversized images pass through as the original image.
  • Permissions: the plugin runs with the permissions of the current dsh process; review the source code and license before installation.

Conclusion

This plugin solves the detail-loss issue when the DeepSeek v4Flash model processes large images by using a grid tiling mechanism, and ensures analysis accuracy with row and column coordinate metadata. For more technical details and source code, refer to the links below.