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
use std::sync::Once;

static INIT: Once = Once::new();

pub(crate) fn ensure_backend_initialized() {
    INIT.call_once(|| {
        #[cfg(feature = "backend-tract")]
        ort::set_api(ort_tract::api());
        #[cfg(feature = "backend-candle")]
        ort::set_api(ort_candle::api());
    });
}