import type { InferenceSession } from "onnxruntime-common"; import type { CoreCanvas, PlatformProvider } from "../core/platform.js"; import { BaseDetection, type DetectOptions, type DetectionModelOptions, type DetectionResult } from "./base.interface.js"; export declare class RetinaNetDetection extends BaseDetection { protected className: string; protected modelPath: string; protected session: InferenceSession | null; protected anchorsCache: Float32Array | null; protected anchorsCacheShape: string; protected detectionOptions: DetectionModelOptions; constructor(options?: Partial, platform?: PlatformProvider); initialize(): Promise; /** * Detect face in an image, prioritize face that is largest * @param image * @param options - Optional detection options */ detect(image: ArrayBuffer | CoreCanvas, options?: DetectOptions): Promise; preprocess(canvas: CoreCanvas, height: number, width: number): Float32Array; inference(tensor: Float32Array, shape: [number, number]): Promise; postprocess(outputs: InferenceSession.OnnxValueMapType): { boxes: Float32Array; scores: Float32Array; landmarks: Float32Array; }; protected postprocessWithThreshold(outputs: InferenceSession.OnnxValueMapType, threshold: { confidence: number; nonMaximumSuppression: number; }): { boxes: Float32Array; scores: Float32Array; landmarks: Float32Array; }; protected applyNMSAndTopK(filteredBoxesArray: Float32Array, filteredScoresArray: Float32Array, filteredLandmarksArray: Float32Array, nmsThreshold: number): { boxes: Float32Array; scores: Float32Array; landmarks: Float32Array; }; destroy(): Promise; }