type ResizeEnum = 'squash' | 'fit-short' | 'fit-long' | 'crop'; type BoundingBox = { label: string; x: number; y: number; width: number; height: number; }; /** * Maps a predicted bounding box from reference output coordinates to client image coordinates, * adjusting for the resize mode. This is necessary because the reference image dimensions * that the bounding boxes are relative to may differ from the displayed image due to cropping * and resizing. * * Supported resize modes: * - 'squash': The image is resized to fit the client image exactly, potentially distorting the aspect ratio. * - 'fit-short': The shorter axis is fit to the client image, cropping the longer axis to maintain aspect ratio. * - 'fit-long': The longer axis is fit to the client image, padding the shorter axis to maintain aspect ratio. * - 'crop': Deprecated mode; returns a zeroed bounding box. * * @param resizeMode - The resize mode used during preprocessing. * @param box - The predicted bounding box from the model, with normalized coordinates (0 to 1). * @param img - Image dimension information: * - clientWidth: The target width of the image as displayed on the client. * - clientHeight: The target height of the image as displayed on the client. * - referenceWidth: The width of the image used as the reference for bounding box predictions. * - referenceHeight: The height of the image used as the reference for bounding box predictions. * @returns An object containing the mapped bounding box coordinates in pixel units for display in the client: * - x: The x-coordinate of the top-left corner in pixels. * - y: The y-coordinate of the top-left corner in pixels. * - width: The width of the bounding box in pixels. * - height: The height of the bounding box in pixels. */ export declare const mapPredictionToOriginalImage: (resizeMode: ResizeEnum, box: BoundingBox, img: { clientWidth: number; clientHeight: number; referenceWidth: number; referenceHeight: number; }) => { x: number; y: number; height: number; width: number; }; export declare const getMaskPercent: (side: 'vertical' | 'horizontal', img: { clientWidth: number; clientHeight: number; referenceWidth: number; referenceHeight: number; }) => number; export declare const maskCropped: (els: { maskLeft: HTMLElement; maskRight: HTMLElement; maskTop: HTMLElement; maskBottom: HTMLElement; }, img: { clientWidth: number; clientHeight: number; referenceWidth: number; referenceHeight: number; }) => void; export {};