dinov2_siglip
dinov2_siglip
¶
DINOv2+SigLIP RGB encoder producing fused patch-token sequences.
DinoV2SigLIPBackboneConfig
dataclass
¶
Resolved timm tower configuration for a paired DINOv2+SigLIP backbone.
DinoV2SigLIPRGBEncoder
¶
DinoV2SigLIPRGBEncoder(input_keys, pretrained, frozen, backbone=value, model_dtype=None, lora_config=None)
Bases: RGBEncoderMixin, Encoder
RGB encoder that concatenates DINOv2 and SigLIP patch features.
Initialize paired timm vision towers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_keys
|
str | list[str]
|
RGB camera observation keys. |
required |
pretrained
|
bool
|
Whether timm should load pretrained tower weights. |
required |
frozen
|
bool
|
Whether to freeze both vision towers. |
required |
backbone
|
str
|
DINOv2+SigLIP paired backbone identifier. |
value
|
model_dtype
|
str | None
|
Precision string from experiment config (e.g. |
None
|
lora_config
|
LoRAAdaptation | None
|
Optional LoRA adapter configuration for the timm towers. |
None
|
Source code in src/versatil/models/encoding/encoders/rgb/dinov2_siglip.py
encode_image_tokens
¶
Encode images into fused DINOv2+SigLIP patch tokens.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
images
|
Tensor
|
RGB tensor with shape |
required |
Returns:
| Type | Description |
|---|---|
Tensor
|
Fused patch tokens with shape |
Source code in src/versatil/models/encoding/encoders/rgb/dinov2_siglip.py
encode
¶
validate_input_metadata
¶
Validate that input metadata is camera metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
Observation key being validated. |
required |
metadata
|
BaseMetadata
|
Metadata from the observation space. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
Error message if incompatible, None if valid. |
Source code in src/versatil/models/encoding/encoders/rgb/dinov2_siglip.py
get_output_specification
¶
Get output specification for fused patch-token features.