feat: Added threshold for scores and nms
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
mod cli;
|
||||
mod errors;
|
||||
use detector::facedet::retinaface::FaceDetectionConfig;
|
||||
use errors::*;
|
||||
use ndarray_image::*;
|
||||
const RETINAFACE_MODEL: &[u8] = include_bytes!("../models/retinaface.mnn");
|
||||
@@ -29,11 +30,11 @@ pub fn main() -> Result<()> {
|
||||
.attach_printable("Failed to detect faces")?;
|
||||
// output.print(20);
|
||||
let aabbs = output
|
||||
.postprocess(Default::default())
|
||||
.postprocess(FaceDetectionConfig::default().with_threshold(detect.threshold))
|
||||
.change_context(errors::Error)
|
||||
.attach_printable("Failed to attach context")?;
|
||||
for bbox in aabbs {
|
||||
println!("Detected face: {:?}", bbox);
|
||||
tracing::info!("Detected face: {:?}", bbox);
|
||||
use bounding_box::draw::*;
|
||||
let bbox = bbox
|
||||
.denormalize(nalgebra::SVector::<f32, 2>::new(
|
||||
|
||||
Reference in New Issue
Block a user