﻿# DPT readout tokens: feature reassembly is part of the depth model

Preserve DPT intermediate feature selection, readout-token handling and reassembly layers when changing the visual backbone of a dense prediction model.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-dpt-readout-reassembly-interface/
Language: en

## Recognize the dense prediction pathway

DPT turns transformer representations into dense image predictions through additional processing. The [paper](https://arxiv.org/abs/2103.13413) introduces reassembly and fusion rather than treating a backbone token sequence as an already completed depth map. When exchanging encoders or exporting components, identify which intermediate features feed that pathway. A compatible final hidden size does not independently establish that the downstream dense head receives the representations it was trained to interpret.

## Inspect the readout policy

The [Transformers configuration](https://huggingface.co/docs/transformers/model_doc/dpt) distinguishes readout policies that ignore, add or project the readout token into spatial features. These are different computations, not display preferences. A checkpoint trained with one policy does not automatically retain the same behavior if another policy is selected because it appears simpler to export. Preserve the associated learned projections and the treatment of nonspatial tokens in the selected model variant.

## Match the intermediate feature set

The [official DPT project](https://github.com/isl-org/DPT) provides reference architectures and released models. Backbone stages or transformer layers contribute selected features to the dense pathway. Check their order, resolution and channel dimensions together. Substituting the last hidden state for every requested intermediate output can satisfy superficial shape checks after an extra projection while discarding the multilevel information expected by the reassembly and fusion layers.

## Separate reassembly from image resizing

Reassembly constructs feature maps for later fusion. It is not merely the final resizing of a predicted depth image to the input photograph. Diagnose an incorrectly aligned output by inspecting these stages separately. Confirm token-grid interpretation before investigating the final interpolation. Also preserve the image processor and any crop or padding applied before the backbone, since spatial correspondence can be lost outside the transformer even when its own hidden states are numerically correct.

## Evaluate a faithful component substitution

Use an intermediate-output comparison to investigate an export or optimization, then evaluate the complete model on the intended depth protocol. A smooth-looking depth preview cannot prove that a changed backbone interface preserved the trained computation. The guides to [vision patch grids](/journal/vit-image-patches-token-sequence/) and [tensor-axis meaning](/journal/tensor-axes-batch-sequence-hidden/) provide background. DPT's specific boundary is the feature-to-dense pathway: readout handling, reassembly and fusion remain model components, not interchangeable formatting around an encoder.
