docstr: Returns the image embeddings for the currently set image, with
  shape 1xCxHxW, where C is the embedding dimension and (H,W) are
  the embedding spatial dimension of SAM (typically C=256, H=W=64).
docstr_tok: ["Returns","the","image","embeddings","for","the","currently","set","image",",","with","shape","1xCxHxW",",","where","C","is","the","embedding","dimension","and","(","H",",","W",")","are","the","embedding","spatial","dimension","of","SAM","(","typically","C=256",",","H=W=64",")","."]
code: def get_image_embedding(self) -> paddle.Tensor:
      """
      Returns the image embeddings for the currently set image, with
      shape 1xCxHxW, where C is the embedding dimension and (H,W) are
      the embedding spatial dimension of SAM (typically C=256, H=W=64).
      """
      if not self.is_image_set:
          raise RuntimeError(
              "An image must be set with .set_image(...) to generate an embedding."
          )
      assert (
          self.features is not None
      ), "Features must exist if an image has been set."
      return self.features
  
file_path: PaddleSeg/contrib/SegmentAnything/segment_anything/predictor.py
imports: import numpy
  from typing import Optional, Tuple
  import paddle
  from .modeling import Sam
  from .utils.transforms import ResizeLongestSide
label_desc: Use image node_id 6 for calling the SamPredictor obj's underlying member method code with example usage: obj.get_image_embedding() and returns: self