Adding Custom Embeddings
Add custom embeddings to your uploads
Last updated
Was this helpful?
Was this helpful?
# example of adding label level embeddings
frame.add_frame_embedding(embedding=[1.0,2.0,3.0, ...])
for label_id, label_embedding in label_embeddings.items():
frame.add_crop_embedding(label_id=label_id, embedding=label_embedding)
# once you have added all the labels, metadata, and embeddings to the frame object
# then add the frame to the dataset
dataset.add_frame(frame)
# example of adding inference level embeddings
inference_frame.add_frame_embedding(embedding=[1.0,2.0,3.0, ...])
for inf_id, inf_embedding in inference_embeddings.items():
inference_frame.add_crop_embedding(label_id=inf_id, embedding=inf_embedding)
# once you have added all the inferences, metadata, and embeddings to the inference frame object
# then add the inference frame to the dataset
inference_set.add_frame(inference_frame)