MCPcopy
hub / github.com/PaddlePaddle/PaddleOCR / packDetBatchTensor

Function packDetBatchTensor

paddleocr-js/packages/core/src/models/det.ts:375–379  ·  view source on GitHub ↗
(ort: OrtModule, preps: DetPreprocessResult[])

Source from the content-addressed store, hash-verified

373}
374
375function packDetBatchTensor(ort: OrtModule, preps: DetPreprocessResult[]): Tensor {
376 const maxH = Math.max(...preps.map((p) => p.dstH));
377 const maxW = Math.max(...preps.map((p) => p.dstW));
378 return createBatchDetTensor(ort, preps, maxH, maxW);
379}
380
381function batchDetOutputPlaneOffset(dims: readonly number[], batchIndex: number): number {
382 const tail = dims.slice(1).reduce((a, b) => a * b, 1);

Callers 1

predictFunction · 0.85

Calls 1

createBatchDetTensorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…