Skip to main content

yscv_recognize/
types.rs

1use yscv_tensor::Tensor;
2
3#[derive(Debug, Clone, PartialEq)]
4pub struct IdentityEmbedding {
5    pub id: String,
6    pub embedding: Tensor,
7}
8
9#[derive(Debug, Clone, PartialEq)]
10pub struct Recognition {
11    pub identity: Option<String>,
12    pub score: f32,
13}
14
15impl Recognition {
16    pub fn is_known(&self) -> bool {
17        self.identity.is_some()
18    }
19}