insight-face-rs 1.4.0

Face detection and recognition library using ONNX Runtime (Rust)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::types::{BoundingBox, DetectedFace, FaceEmbedding, FaceLandmarks};

pub struct Face {
    pub score: f32,
    pub bbox: BoundingBox,
    pub landmarks: FaceLandmarks,
    pub embedding: FaceEmbedding,
}
impl Face {
    pub fn from(face: DetectedFace, embedding: FaceEmbedding) -> Self {
        Self {
            score: face.score,
            bbox: face.bbox,
            landmarks: face.landmarks,
            embedding: embedding,
        }
    }
}