class_docstr: Wraps an OWL-ViT FLAX model for convenient inference.
  
  All public methods apply to a single example and take and return Numpy arrays.
  
  Attributes:
    config: ConfigDict with model configuration.
    module: OWL-ViT Flax module.
    variables: Variable dict to be used with module.apply.
docstr: Scores image features against queries.
  
  Args:
    image: Single uint8 Numpy image of any size. Will be converted to float
      and resized before passing it to the model.
    query_embeddings: Text- or image-derived queries.
    num_queries: Number of true queries, in case embeddings are padded.
  
  Returns:
    Index and score of the top query for each predicted box in the image.
docstr_tok: ["Scores","image","features","against","queries",".","Args",":","image",":","Single","uint8","Numpy","image","of","any","size",".","Will","be","converted","to","float","and","resized","before","passing","it","to","the","model",".","query_embeddings",":","Text-","or","image-derived","queries",".","num_queries",":","Number","of","true","queries",",","in","case","embeddings","are","padded",".","Returns",":","Index","and","score","of","the","top","query","for","each","predicted","box","in","the","image","."]
code: def get_scores(
      self,
      image: np.ndarray,
      query_embeddings: np.ndarray,
      num_queries: int,
  ) -> Tuple[np.ndarray, np.ndarray]:
      """Scores image features against queries.
  
      Args:
        image: Single uint8 Numpy image of any size. Will be converted to float
          and resized before passing it to the model.
        query_embeddings: Text- or image-derived queries.
        num_queries: Number of true queries, in case embeddings are padded.
  
      Returns:
        Index and score of the top query for each predicted box in the image.
      """
      image_features, _, _ = self.embed_image(image)
      out = self._predict_classes_jitted(
          image_features=image_features[None, ...],
          query_embeddings=query_embeddings[None, ...],
      )
      logits = np.array(out["pred_logits"])[
          0, :, :num_queries
      ]  # Remove padding.
      top_query_ind = np.argmax(logits, axis=-1)
      scores = sigmoid(np.max(logits, axis=-1))
      return top_query_ind, scores
  
imports: import dataclasses
  import functools
  from typing import Any, Dict, Tuple
  from flax import linen
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.base_models import box_utils
  from scenic.projects.owl_vit.notebooks import numpy_cache
  from scipy import special
  from skimage import transform
  import tensorflow
label_desc: Use image node_id 8 for calling the Model obj's underlying member method code with example usage: obj.get_scores(image, query_embeddings, num_queries) and returns: top_query_ind,  scores