Skip to main content

yscv_detect/
lib.rs

1//! Detection pipeline components for yscv.
2#![forbid(unsafe_code)]
3
4mod anchors;
5mod error;
6mod frame;
7mod heatmap;
8mod model_detector;
9mod nms;
10mod roi;
11#[cfg(test)]
12mod tests;
13mod types;
14mod yolo;
15
16pub use anchors::generate_anchors;
17pub use error::DetectError;
18pub use frame::{
19    FrameFaceDetectScratch, FramePeopleDetectScratch, Rgb8FaceDetectScratch,
20    Rgb8PeopleDetectScratch, detect_faces_from_frame, detect_faces_from_frame_with_scratch,
21    detect_faces_from_rgb8, detect_faces_from_rgb8_with_scratch, detect_people_from_frame,
22    detect_people_from_frame_with_scratch, detect_people_from_rgb8,
23    detect_people_from_rgb8_with_scratch,
24};
25pub use heatmap::{HeatmapDetectScratch, detect_from_heatmap, detect_from_heatmap_with_scratch};
26pub use model_detector::{
27    ModelDetector, ModelDetectorConfig, postprocess_detections, preprocess_rgb8_for_model,
28};
29pub use nms::{batched_nms, iou, non_max_suppression, soft_nms};
30pub use roi::{roi_align, roi_pool};
31pub use types::{BoundingBox, CLASS_ID_FACE, CLASS_ID_PERSON, CRATE_ID, Detection};
32pub use yolo::{
33    YoloConfig, coco_labels, decode_yolov8_output, letterbox_preprocess, yolov8_coco_config,
34};
35#[cfg(feature = "onnx")]
36pub use yolo::{detect_yolov8_from_rgb, detect_yolov8_onnx};