/** * YOLOv8n person detector for the MCP-side follow-me loop. * * Loads a YOLOv8n ONNX model and runs person-only detection on a single JPEG/PNG * frame. Image decoded with sharp; inference via onnxruntime-node (CPU). * * Model lookup order: * 1. AGENTICROS_YOLOV8_MODEL env var (absolute path) * 2. ~/.agenticros/models/yolov8n.onnx * If the file is missing it is downloaded from AGENTICROS_YOLOV8_URL (or a default * public mirror). 6 MB, one-time. */ export interface PersonDetection { /** Bounding box in original image pixel coordinates. */ x: number; y: number; width: number; height: number; /** Center of the bbox (image pixels). */ cx: number; cy: number; /** Detection confidence [0,1]. */ confidence: number; } export interface DetectorOptions { /** Score threshold for filtering raw detections (default 0.4). */ scoreThreshold?: number; /** IoU threshold for NMS (default 0.5). */ iouThreshold?: number; } export declare class PersonDetector { private session; private readonly scoreThreshold; private readonly iouThreshold; constructor(opts?: DetectorOptions); load(): Promise; /** * Detect people in a JPEG/PNG image buffer. * * Returns bounding boxes in the original image's pixel space. */ detect(image: Buffer | Uint8Array): Promise<{ width: number; height: number; persons: PersonDetection[]; }>; /** * Detect a single COCO class (0..79) in a JPEG/PNG image buffer. * 0=person, 67=cell phone, 56=chair, ... see find-object/coco-classes.ts. */ detectClass(image: Buffer | Uint8Array, classId: number): Promise<{ width: number; height: number; detections: PersonDetection[]; }>; dispose(): Promise; } //# sourceMappingURL=detector.d.ts.map