{"version":3,"file":"results.cjs","names":[],"sources":["../../src/vision/results.ts"],"sourcesContent":["/** @generated Vendored from @mauriciobenjamin700/ort-vision-sdk-web. Do not hand-edit — regenerate with `npm run vendor:vision`. */\n/**\n * Per-image result envelopes — Ultralytics-style `Results` for the SDK.\n *\n * Each `predict()` call returns a 1-element array of these envelopes,\n * mirroring `YOLO(\"img.jpg\")`. Each envelope holds:\n *\n * - A bulk-array view of the predictions (`Boxes`, `Probs`, `Masks`) with\n *   the exact attribute names Ultralytics uses (`xyxy`, `xywh`, `xyxyn`,\n *   `xywhn`, `cls`, `conf`, `data`, `top1`, `top5`).\n * - Per-instance dataclasses (`DetectionResult`, `SegmentationResult`,\n *   `ClassProbability`) for callers who prefer the OO interface.\n * - `names`: `Record<number, string>` matching Ultralytics' `model.names`.\n * - `origImg` / `origShape` / `path`: provenance for the original input.\n * - `speed`: per-stage timings of the `predict()` call that produced it.\n */\n\nimport { type Speed } from \"./core/timing\";\nimport {\n    type ClassificationResult,\n    type DetectionResult,\n    type RGBImage,\n    type SegmentationResult,\n} from \"./types\";\n\n/**\n * Zero timings for an envelope built outside a `predict()` call.\n *\n * Hand-constructed envelopes (tests, adapters) have nothing to measure, and\n * zeros keep `speed.inference` a plain `number` at every call site instead of\n * forcing an optional check that only ever fires for synthetic data.\n */\nconst NO_SPEED: Speed = { load: 0, preprocess: 0, inference: 0, postprocess: 0 };\n\n/**\n * Bulk numpy-style view of detected boxes for a single image.\n *\n * Mirrors Ultralytics' `Boxes` interface. Coordinates in {@link xyxy} and\n * {@link xywh} are absolute pixels in the original image; the `*n` variants\n * are normalized to `[0, 1]` using `origShape`.\n */\nexport class Boxes {\n    /**\n     * @param xyxy Flat array of length `4 * N` in `[x1, y1, x2, y2, ...]` order.\n     * @param cls One class index per box, length `N`.\n     * @param conf One confidence per box, length `N`.\n     * @param origShape `[height, width]` of the original image.\n     */\n    constructor(\n        public readonly xyxy: Float32Array,\n        public readonly cls: Int32Array,\n        public readonly conf: Float32Array,\n        public readonly origShape: readonly [number, number],\n    ) {}\n\n    /** Number of detected boxes. */\n    get length(): number {\n        return this.cls.length;\n    }\n\n    /** `[N, 4]` shape of the `xyxy` view. */\n    get shape(): readonly [number, number] {\n        return [this.length, 4];\n    }\n\n    /** Boxes as `[N, 4]` `[cx, cy, w, h]` flat array in absolute pixels. */\n    get xywh(): Float32Array {\n        const out = new Float32Array(this.xyxy.length);\n        for (let i = 0; i < this.length; i++) {\n            const x1 = this.xyxy[i * 4] as number;\n            const y1 = this.xyxy[i * 4 + 1] as number;\n            const x2 = this.xyxy[i * 4 + 2] as number;\n            const y2 = this.xyxy[i * 4 + 3] as number;\n            out[i * 4] = (x1 + x2) / 2;\n            out[i * 4 + 1] = (y1 + y2) / 2;\n            out[i * 4 + 2] = x2 - x1;\n            out[i * 4 + 3] = y2 - y1;\n        }\n        return out;\n    }\n\n    /** Boxes as `[N, 4]` `[x1, y1, x2, y2]` normalized to `[0, 1]`. */\n    get xyxyn(): Float32Array {\n        const [h, w] = this.origShape;\n        const out = new Float32Array(this.xyxy.length);\n        if (this.length === 0 || w <= 0 || h <= 0) return out;\n        for (let i = 0; i < this.length; i++) {\n            out[i * 4] = (this.xyxy[i * 4] as number) / w;\n            out[i * 4 + 1] = (this.xyxy[i * 4 + 1] as number) / h;\n            out[i * 4 + 2] = (this.xyxy[i * 4 + 2] as number) / w;\n            out[i * 4 + 3] = (this.xyxy[i * 4 + 3] as number) / h;\n        }\n        return out;\n    }\n\n    /** Boxes as `[N, 4]` `[cx, cy, w, h]` normalized to `[0, 1]`. */\n    get xywhn(): Float32Array {\n        const xywh = this.xywh;\n        const [h, w] = this.origShape;\n        if (this.length === 0 || w <= 0 || h <= 0) return xywh;\n        for (let i = 0; i < this.length; i++) {\n            xywh[i * 4] = (xywh[i * 4] as number) / w;\n            xywh[i * 4 + 1] = (xywh[i * 4 + 1] as number) / h;\n            xywh[i * 4 + 2] = (xywh[i * 4 + 2] as number) / w;\n            xywh[i * 4 + 3] = (xywh[i * 4 + 3] as number) / h;\n        }\n        return xywh;\n    }\n\n    /**\n     * Concatenated `[N, 6]` array of `[x1, y1, x2, y2, conf, cls]`.\n     *\n     * Matches Ultralytics' `boxes.data`.\n     */\n    get data(): Float32Array {\n        const out = new Float32Array(this.length * 6);\n        for (let i = 0; i < this.length; i++) {\n            out[i * 6] = this.xyxy[i * 4] as number;\n            out[i * 6 + 1] = this.xyxy[i * 4 + 1] as number;\n            out[i * 6 + 2] = this.xyxy[i * 4 + 2] as number;\n            out[i * 6 + 3] = this.xyxy[i * 4 + 3] as number;\n            out[i * 6 + 4] = this.conf[i] as number;\n            out[i * 6 + 5] = this.cls[i] as number;\n        }\n        return out;\n    }\n}\n\n/** One selection of the highest-probability classes, descending. */\ninterface TopK {\n    indices: Int32Array;\n    values: Float32Array;\n}\n\n/**\n * Top-k classification probabilities for a single image.\n *\n * Mirrors Ultralytics' `Probs` interface.\n */\nexport class Probs {\n    /** @param data `[numClasses]` per-class probabilities, indexed by class id. */\n    constructor(public readonly data: Float32Array) {}\n\n    /** Number of classes. */\n    get length(): number {\n        return this.data.length;\n    }\n\n    /** `[numClasses]` shape of the underlying vector. */\n    get shape(): readonly [number] {\n        return [this.length];\n    }\n\n    /** Index of the most probable class. */\n    get top1(): number {\n        if (this.data.length === 0) return 0;\n        let best = 0;\n        let bestVal = this.data[0] as number;\n        for (let i = 1; i < this.data.length; i++) {\n            const v = this.data[i] as number;\n            if (v > bestVal) {\n                best = i;\n                bestVal = v;\n            }\n        }\n        return best;\n    }\n\n    /** Probability of the top-1 class. */\n    get top1conf(): number {\n        if (this.data.length === 0) return 0;\n        return this.data[this.top1] as number;\n    }\n\n    /**\n     * Indices of the top-5 most probable classes, descending.\n     *\n     * The array is the memoised selection itself, not a copy — reading it twice\n     * hands back the same object. Treat it as read-only: writing into it edits\n     * what every later read of this `Probs` returns.\n     */\n    get top5(): Int32Array {\n        return this._top(5).indices;\n    }\n\n    /**\n     * Probabilities of the top-5 classes, descending.\n     *\n     * Shares the memoised selection with {@link Probs.top5}, under the same\n     * read-only caveat.\n     */\n    get top5conf(): Float32Array {\n        return this._top(5).values;\n    }\n\n    private _cache = new Map<number, TopK>();\n\n    /**\n     * Memoised {@link Probs._topK}.\n     *\n     * `top5` and `top5conf` are separate getters over the same selection, so a\n     * caller reading both would otherwise pay for it twice — once per frame, in\n     * a camera loop. The probabilities a `Probs` was built from do not change,\n     * so the result is computed once per `k` and kept.\n     *\n     * @param k - How many classes to select.\n     * @returns The cached selection for that `k`.\n     */\n    private _top(k: number): TopK {\n        const hit = this._cache.get(k);\n        if (hit) return hit;\n        const computed = this._topK(k);\n        this._cache.set(k, computed);\n        return computed;\n    }\n\n    /**\n     * Select the `k` highest probabilities without ordering the rest.\n     *\n     * A full sort to read five entries out of a thousand-class vector costs\n     * O(n log n) plus an index array the size of the vector; keeping `k` slots\n     * ordered by insertion and scanning once costs O(n·k) with no allocation\n     * beyond the result. Measured on 1000 classes over 2000 iterations, 134.5 µs\n     * against 1.5 µs for the same output.\n     *\n     * Ties keep the lower class index first, matching the stable sort this\n     * replaced: a candidate only displaces an entry it is strictly greater\n     * than. That is also what keeps this selection in step with the Python\n     * SDK's `np.argsort(-data, kind=\"stable\")`, where the sort is C and the\n     * cost this avoids does not arise.\n     *\n     * @param k - How many classes to select.\n     * @returns Indices and probabilities, descending by probability.\n     */\n    private _topK(k: number): TopK {\n        const size = Math.min(k, this.data.length);\n        const indices = new Int32Array(size);\n        const values = new Float32Array(size);\n        if (size === 0) return { indices, values };\n\n        values.fill(Number.NEGATIVE_INFINITY);\n        for (let i = 0; i < this.data.length; i++) {\n            const value = this.data[i] as number;\n            if (value <= (values[size - 1] as number)) continue;\n            let slot = size - 1;\n            while (slot > 0 && (values[slot - 1] as number) < value) {\n                values[slot] = values[slot - 1] as number;\n                indices[slot] = indices[slot - 1] as number;\n                slot -= 1;\n            }\n            values[slot] = value;\n            indices[slot] = i;\n        }\n        return { indices, values };\n    }\n}\n\n/**\n * Per-instance binary masks for a single image.\n *\n * Each mask is cropped to its instance's bounding box. To paint masks onto\n * a full-image canvas, use `xyxy[i]` as the top-left target.\n */\nexport class Masks {\n    /**\n     * @param data Per-instance binary masks (`Mask` objects from `types.ts`).\n     * @param xyxy Flat `[N, 4]` of bounding-box coordinates in original pixels.\n     * @param origShape `[height, width]` of the original image.\n     */\n    constructor(\n        public readonly data: ReadonlyArray<{\n            readonly data: Uint8Array;\n            readonly width: number;\n            readonly height: number;\n        }>,\n        public readonly xyxy: Float32Array,\n        public readonly origShape: readonly [number, number],\n    ) {}\n\n    /** Number of instance masks. */\n    get length(): number {\n        return this.data.length;\n    }\n\n    /** `[N]` shape of the masks collection. */\n    get shape(): readonly [number] {\n        return [this.length];\n    }\n\n    [Symbol.iterator](): Iterator<{\n        readonly data: Uint8Array;\n        readonly width: number;\n        readonly height: number;\n    }> {\n        return this.data[Symbol.iterator]();\n    }\n}\n\n/**\n * Per-image detection envelope (Ultralytics-style `Results`).\n *\n * Iterating yields per-instance {@link DetectionResult} entries, so legacy\n * code that did `for (const d of detector.predict(img))` only needs an\n * extra `[0]` to bridge:\n *\n * ```typescript\n * for (const d of (await detector.predict(img))[0]) {\n *   console.log(d.cls, d.conf, d.box.xyxy);\n * }\n * ```\n *\n * For numpy-style bulk access, use the `boxes` collection.\n */\nexport class DetectionResults implements Iterable<DetectionResult> {\n    constructor(\n        public readonly boxes: Boxes,\n        public readonly detections: readonly DetectionResult[],\n        public readonly names: Readonly<Record<number, string>>,\n        public readonly origImg: RGBImage,\n        public readonly origShape: readonly [number, number],\n        public readonly path: string | null = null,\n        public readonly speed: Readonly<Speed> = NO_SPEED,\n    ) {}\n\n    /** Number of surviving detections. */\n    get length(): number {\n        return this.detections.length;\n    }\n\n    /** Index into the per-instance detections. */\n    get(index: number): DetectionResult | undefined {\n        return this.detections[index];\n    }\n\n    [Symbol.iterator](): Iterator<DetectionResult> {\n        return this.detections[Symbol.iterator]();\n    }\n}\n\n/**\n * Per-image envelope for a fused detect→classify pipeline.\n *\n * Structurally a {@link DetectionResults} with a second class map: every\n * detection it yields carries a populated `classification`, and the two stages\n * have their own, unrelated label spaces — a detector that finds `sheep`\n * feeding a classifier that answers `famacha_3` shares no class ids with it.\n * Merging them into one `names` record would make `cls` and\n * `classification.cls` look comparable when they are not.\n *\n * ```typescript\n * const result = (await pipeline.predict(\"flock.jpg\"))[0];\n * for (const detection of result) {\n *   console.log(detection.name, detection.conf, detection.classification?.name);\n * }\n * ```\n */\nexport class DetectClassifyResults implements Iterable<DetectionResult> {\n    constructor(\n        public readonly boxes: Boxes,\n        public readonly detections: readonly DetectionResult[],\n        public readonly names: Readonly<Record<number, string>>,\n        public readonly classifierNames: Readonly<Record<number, string>>,\n        public readonly origImg: RGBImage,\n        public readonly origShape: readonly [number, number],\n        public readonly path: string | null = null,\n        public readonly speed: Readonly<Speed> = NO_SPEED,\n    ) {}\n\n    /** Number of surviving detections. */\n    get length(): number {\n        return this.detections.length;\n    }\n\n    /** Index into the per-instance detections. */\n    get(index: number): DetectionResult | undefined {\n        return this.detections[index];\n    }\n\n    [Symbol.iterator](): Iterator<DetectionResult> {\n        return this.detections[Symbol.iterator]();\n    }\n}\n\n/**\n * Per-image classification envelope (Ultralytics-style `Results`).\n */\nexport class ClassificationResults {\n    constructor(\n        public readonly probs: Probs,\n        public readonly result: ClassificationResult,\n        public readonly names: Readonly<Record<number, string>>,\n        public readonly origImg: RGBImage,\n        public readonly origShape: readonly [number, number],\n        public readonly path: string | null = null,\n        public readonly speed: Readonly<Speed> = NO_SPEED,\n    ) {}\n\n    /** Top-1 class index (Ultralytics-style alias). */\n    get cls(): number {\n        return this.probs.top1;\n    }\n\n    /** Top-1 confidence (Ultralytics-style alias). */\n    get conf(): number {\n        return this.probs.top1conf;\n    }\n\n    /** Top-1 class name. */\n    get name(): string {\n        return this.names[this.cls] ?? `class_${this.cls}`;\n    }\n\n    /** Per-class probability list, sorted descending (legacy field). */\n    get probabilities(): readonly ClassificationResult[\"probabilities\"][number][] {\n        return this.result.probabilities;\n    }\n}\n\n/**\n * Per-image instance-segmentation envelope (Ultralytics-style `Results`).\n *\n * Iterating yields per-instance {@link SegmentationResult} entries. `boxes`\n * and `masks` mirror Ultralytics' bulk-array views.\n */\nexport class SegmentationResults implements Iterable<SegmentationResult> {\n    constructor(\n        public readonly boxes: Boxes,\n        public readonly masks: Masks,\n        public readonly detections: readonly SegmentationResult[],\n        public readonly names: Readonly<Record<number, string>>,\n        public readonly origImg: RGBImage,\n        public readonly origShape: readonly [number, number],\n        public readonly path: string | null = null,\n        public readonly speed: Readonly<Speed> = NO_SPEED,\n    ) {}\n\n    /** Number of surviving instances. */\n    get length(): number {\n        return this.detections.length;\n    }\n\n    /** Index into the per-instance results. */\n    get(index: number): SegmentationResult | undefined {\n        return this.detections[index];\n    }\n\n    [Symbol.iterator](): Iterator<SegmentationResult> {\n        return this.detections[Symbol.iterator]();\n    }\n}\n"],"mappings":"AAgCA,IAAM,EAAkB,CAAE,KAAM,EAAG,WAAY,EAAG,UAAW,EAAG,YAAa,CAAE,EASlE,EAAb,KAAmB,CAQK,KACA,IACA,KACA,UAJpB,YACI,EACA,EACA,EACA,EACF,CAJkB,KAAA,KAAA,EACA,KAAA,IAAA,EACA,KAAA,KAAA,EACA,KAAA,UAAA,CACjB,CAGH,IAAI,QAAiB,CACjB,OAAO,KAAK,IAAI,MACpB,CAGA,IAAI,OAAmC,CACnC,MAAO,CAAC,KAAK,OAAQ,CAAC,CAC1B,CAGA,IAAI,MAAqB,CACrB,IAAM,EAAM,IAAI,aAAa,KAAK,KAAK,MAAM,EAC7C,IAAK,IAAI,EAAI,EAAG,EAAI,KAAK,OAAQ,IAAK,CAClC,IAAM,EAAK,KAAK,KAAK,EAAI,GACnB,EAAK,KAAK,KAAK,EAAI,EAAI,GACvB,EAAK,KAAK,KAAK,EAAI,EAAI,GACvB,EAAK,KAAK,KAAK,EAAI,EAAI,GAC7B,EAAI,EAAI,IAAM,EAAK,GAAM,EACzB,EAAI,EAAI,EAAI,I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