import type { LabelDefinition, ClassMapDefinition } from './labels.js';
export declare const MODEL_FORMATS: readonly ["onnx", "coreml", "openvino", "tflite", "pt"];
export type ModelFormat = (typeof MODEL_FORMATS)[number];
export type ModelOutputFormat = 'yolo' | 'ssd' | 'embedding' | 'classification' | 'ocr' | 'segmentation';
export interface ModelFormatEntry {
    readonly url: string;
    readonly sizeMB: number;
    /** Whether this format is a directory bundle (e.g., .mlpackage) rather than a single file */
    readonly isDirectory?: boolean;
    /**
     * For directory formats: list of files relative to the directory root.
     * The downloader fetches each file from `{url}/{file}` and saves to `{modelDir}/{file}`.
     * If omitted for a directory format, the downloader probes HuggingFace API (slower).
     */
    readonly files?: readonly string[];
    /** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
    readonly runtimes?: readonly ('node' | 'python')[];
}
/**
 * Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
 * The downloader fetches from `url` and saves to `{modelsDir}/{filename}`.
 */
export interface ModelExtraFile {
    readonly url: string;
    readonly filename: string;
    readonly sizeMB: number;
}
export interface ModelCatalogEntry {
    readonly id: string;
    readonly name: string;
    readonly description: string;
    readonly formats: Partial<Readonly<Record<ModelFormat, ModelFormatEntry>>>;
    readonly inputSize: {
        readonly width: number;
        readonly height: number;
    };
    readonly labels: readonly LabelDefinition[];
    readonly inputLayout?: 'nchw' | 'nhwc';
    readonly inputNormalization?: 'zero-one' | 'imagenet' | 'none';
    readonly preprocessMode?: 'letterbox' | 'resize';
    /**
     * Auxiliary files required at runtime (labels JSON, charset dict, etc.).
     * Downloaded into the same modelsDir alongside the model file.
     */
    readonly extraFiles?: readonly ModelExtraFile[];
}
export interface DetectionModel {
    readonly id: string;
    readonly name: string;
    readonly labels: readonly string[];
    readonly inputSize: {
        readonly width: number;
        readonly height: number;
    };
}
export interface ModelDownloadOptions {
    readonly url: string;
    readonly fallbackUrls?: readonly string[];
    readonly destDir: string;
    readonly filename?: string;
    readonly expectedSha256?: string;
    readonly onProgress?: (downloaded: number, total: number) => void;
}
export interface ModelDownloadResult {
    readonly filePath: string;
    readonly downloadedBytes: number;
    readonly fromCache: boolean;
}
export interface CustomModelMetadata {
    readonly name: string;
    readonly inputSize: {
        readonly width: number;
        readonly height: number;
    };
    readonly labels: readonly LabelDefinition[];
    readonly classMap?: ClassMapDefinition;
    readonly inputLayout?: 'nchw' | 'nhwc';
    readonly inputNormalization?: 'zero-one' | 'imagenet' | 'none';
    readonly outputFormat: ModelOutputFormat;
}
//# sourceMappingURL=models.d.ts.map