fix: A lot of fixes relating to bounding-boxes
This commit is contained in:
@@ -29,11 +29,11 @@ pub fn main() -> Result<()> {
|
||||
.change_context(errors::Error)
|
||||
.attach_printable("Failed to detect faces")?;
|
||||
// output.print(20);
|
||||
let aabbs = output
|
||||
let faces = output
|
||||
.postprocess(FaceDetectionConfig::default().with_threshold(detect.threshold))
|
||||
.change_context(errors::Error)
|
||||
.attach_printable("Failed to attach context")?;
|
||||
for bbox in aabbs {
|
||||
for bbox in faces.bbox {
|
||||
tracing::info!("Detected face: {:?}", bbox);
|
||||
use bounding_box::draw::*;
|
||||
let bbox = bbox
|
||||
@@ -41,7 +41,7 @@ pub fn main() -> Result<()> {
|
||||
array.shape()[1] as f32,
|
||||
array.shape()[0] as f32,
|
||||
))
|
||||
.cast()
|
||||
.try_cast()
|
||||
.ok_or(errors::Error)
|
||||
.attach_printable("Failed to cast f32 to usize")?;
|
||||
array.draw(bbox, color::palette::css::GREEN_YELLOW.to_rgba8(), 10);
|
||||
|
||||
Reference in New Issue
Block a user