rslearn.models.clip¶
clip ¶
OpenAI CLIP models.
CLIP ¶
Bases: FeatureExtractor
CLIP image encoder.
Source code in rslearn/models/clip.py
forward ¶
forward(context: ModelContext) -> FeatureMaps
Compute outputs from the backbone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
ModelContext
|
the model context. Input dicts must include "image" key containing the image to process. The images should have values 0-255. |
required |
Returns:
| Type | Description |
|---|---|
FeatureMaps
|
a FeatureMaps with one feature map from the ViT, which is always Bx24x24x1024. |