Embedding

class scenebox.models.assets.Embedding(data, asset_id, asset_type='images', model='default', version='v1', timestamp=None, layer=None, dtype=<class 'numpy.float32'>, ndim=None, session_uid=None)

Create an Embedding.

Parameters:
  • data – Embeddings data.

  • model – The name of the embeddings model. Helps to differentiate from other models.

  • version – The version of the embeddings model. Helps to differentiate several versions of the same model.

  • asset_id – The asset ID associated with the embedding passed in data. Must refer to an asset ID available on SceneBox.

  • asset_type – The type of the asset referred to in asset_id. Currently, only images and objects are supported.

  • timestamp – timestamp of the embeddings. if not provided, ingestion timestamp is used.

  • layer – Layer associated with the embedding.

  • dtype – The datatype of the embedding. Helps to cast data. If not listed, assumed to be np.float32.

  • ndim – Number of dimensions in data. Helps to assert that the dimension calculated by the platform is correct. Raises an error of the calculated dimensions does not match this field. The largest embedding ndim supported is 8192.

  • session_uid – The unique identifier of the session that the asset with asset_id belongs to.

Methods