Skip to content

ImageClassifierModel

Defined in: packages/runntime/src/zoo/tasks/cv/imageClassification.ts:21

What to load. With no config, MobileNetV4-Conv-S from the Hugging Face Hub with the ImageNet class names.

readonly optional labels?: readonly string[]

Defined in: packages/runntime/src/zoo/tasks/cv/imageClassification.ts:26

The class names, by class index; as many as the model has classes. Default: the 1000 ImageNet names.


readonly optional modelPath?: ModelPath

Defined in: packages/runntime/src/zoo/tasks/cv/imageClassification.ts:23

The weights: a MobileNetV4-Conv-S safetensors file, 1000 ImageNet classes.


readonly optional resizeMode?: ResizeMode

Defined in: packages/runntime/src/zoo/tasks/cv/imageClassification.ts:30

How an image is fitted into the model input. Default crop, the middle 87.5% of the centered square, the crop the model was evaluated with; it keeps the subject’s proportions.