react-native-executorch
Version:
An easy way to run AI models in React Native with ExecuTorch
41 lines (35 loc) • 1.52 kB
JavaScript
;
import { Imagenet1kLabel } from '../constants/classification';
export { Imagenet1kLabel };
/**
* Configuration for a custom classification model.
* @typeParam T - The {@link LabelEnum} type for the model.
* @property labelMap - The enum-like object mapping class names to indices.
* @property preprocessorConfig - Optional preprocessing parameters.
* @property preprocessorConfig.normMean - Per-channel mean values for input normalization.
* @property preprocessorConfig.normStd - Per-channel standard deviation values for input normalization.
* @category Types
*/
/**
* Per-model config for {@link ClassificationModule.fromModelName}.
* Each model name maps to its required fields.
* @category Types
*/
/**
* Union of all built-in classification model names.
* @category Types
*/
/**
* Props for the `useClassification` hook.
* @typeParam C - A {@link ClassificationModelSources} config specifying which built-in model to load.
* @property model - The model config containing `modelName` and `modelSource`.
* @property {boolean} [preventLoad] - Boolean that can prevent automatic model loading (and downloading the data if you load it for the first time) after running the hook.
* @category Types
*/
/**
* Return type for the `useClassification` hook.
* Manages the state and operations for Computer Vision image classification.
* @typeParam L - The {@link LabelEnum} representing the model's class labels.
* @category Types
*/
//# sourceMappingURL=classification.js.map