Struct VLMVideoEmbedder
pub struct VLMVideoEmbedder(/* private fields */);Expand description
VLM Video Embedder functionality, to compute embeddings for video search.
Implementations§
§impl VLMVideoEmbedder
impl VLMVideoEmbedder
pub fn new() -> Self
pub fn compute_embeddings(
&mut self,
clip_data: &ClipData,
compute_single_unit_only: bool,
) -> Result<Option<VideoEmbedding>, Error>
pub fn compute_embeddings( &mut self, clip_data: &ClipData, compute_single_unit_only: bool, ) -> Result<Option<VideoEmbedding>, Error>
Compute video embeddings on data collected using VLMVideoCollection.
Depending on the size of the collected data, this can be compute-heavy.
The user can optionally set compute_single_unit_only to compute only a
single part of the video embeddings. When compute_single_unit_only is
set, this needs to be called in a loop with the same arguments. The return
value will inform the user whether all units were computed: it returns
None when a single unit was successfully computed (but not everything),
and the resulting embeddings when all embeddings have been computed.
§Arguments
clip_data: The data collected usingVLMVideoCollection::start_clipandVLMVideoCollection::end_clip.compute_single_unit_only: Can be set to do a partial computation of the embeddings. If set, this needs to be called in a loop, see above.
§Errors
Error::ClipNotYetStartedwhen an empty clip is providedError::InvalidClipDatawhen the clip data is invalid
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VLMVideoEmbedder
impl RefUnwindSafe for VLMVideoEmbedder
impl !Send for VLMVideoEmbedder
impl !Sync for VLMVideoEmbedder
impl Unpin for VLMVideoEmbedder
impl UnwindSafe for VLMVideoEmbedder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more