    def encode_vision(self, image):
        """encode image / videos as features.

        Args:
            image (torch.Tensor): The input images.
            test (bool): Whether testing.

        Returns: tuple.
            - vision_embeds (torch.Tensor): The output features. Shape: [B,N,C].

        """
        T = image.shape[1]
        use_image = True if T == 1 else False
        image = image.permute(0, 2, 1, 3, 4) # [B,T,C,H,W] -> [B,C,T,H,W]
        # whether save temporal dimension
        keep_temporal = self.config.model.vision_encoder.keep_temporal
        vision_embeds, _ = self.vision_encoder(
            image, None, None, use_image, keep_temporal,
        )
        return vision_embeds
encode image / videos as features.

Args:
image (torch.Tensor): The input images.
test (bool): Whether testing.

Returns: tuple.
- vision_embeds (torch.Tensor): The output features. Shape: [B,N,C].
videomamba/video_mm/models/umt_qa.py