/** * WebGPU inference engine for PP-OCRv6 small detection model. * * Architecture (small_det): * MobileNetV3-like backbone (SE blocks, GELU activations) * → FPN neck with 6x Resize+Conv * → DB head with 2× ConvTranspose (stride=2) up to full resolution * → Sigmoid → probability map [1, 1, H, W] * → CPU: DBPostProcess → bounding boxes */ export interface DetBox { x0: number; y0: number; x1: number; y1: number; confidence: number; } export interface DetResult { boxes: DetBox[]; timeMs: number; } export interface PaddleDetOptions { modelUrl: string; onProgress?: (stage: string, pct?: number) => void; } export declare class PaddleDetEngine { device: GPUDevice; private pipelines; private initializers; private activations; private parsedGraph; private onProgress?; private uniformBuffers; private shadowShapeValues; private resolveTensor; init(options: PaddleDetOptions): Promise; private compileShaders; private loadModel; private uploadAsF32; private alloc; private allocTensor; private makeUniform; private makeZeroUniform; private parseGraph; /** * Run detection on a canvas. Returns detected text region boxes. */ detect(image: HTMLCanvasElement | HTMLImageElement): Promise; /** * Resize so shorter side = 736 (preserving aspect ratio, max long side = 4000), * convert to BGR float32 [1,3,H,W] with ImageNet normalization. */ private preprocessToTensor; private walkGraph; private dispatchNode; private dispatchConv; private dispatchUnaryElementwise; private dispatchRelu; private dispatchHardSigmoid; private dispatchSigmoid; private dispatchTanh; private dispatchErf; private dispatchExp; private dispatchSqrt; private dispatchNeg; private dispatchBinaryBroadcast; private dispatchGlobalAveragePool; private dispatchMaxPool; private dispatchReduceMean; private dispatchResize; private dispatchConvTranspose; private dispatchConcat; private dispatchShape; private dispatchGather; private dispatchBatchNorm; } //# sourceMappingURL=engine-ppocr-det.d.ts.map