
Classifies an Image with a HuggingFace, timm, or Optimum network and projects one internal ranked result into the connected output arm: top-1 Classification, ranked [Classification], a String label, and more.
Classify frames from a file source and publish the ranked classes as JSON.
Classify a video stream and overlay the predicted label on each frame for visual review.
model_bundle file slot takes the model bundle (model.onnx and model.json) that the timm image classifier trainer commits. When it is bound the worker runs that ONNX model with onnxruntime, on CUDA when device asks for it, else on CPU; preprocesses each frame as model.json states (resize the shorter side, center crop, scale to 0..1, normalise); applies softmax; and labels the classes with model.json's class names. The output shapes, threshold and top_k behave as for any other source of weights. model and revision must then both be Nothing, so the platform fetches no repository, and num_classes, class_names and the checkpoint slot must be unset; otherwise the worker refuses to start. Exactly one weights source is allowed: the bound bundle, or model together with revision. Giving neither, only one of the two, or both sources fails startup. Unbound, the worker loads the repository model names at revision.checkpoint file slot takes one weights file (a safetensors, torch checkpoint or weights file whose keys match the loaded network exactly) that is loaded over the weights of a timm or transformers network. A mismatching key fails startup. A repository holding ONNX files cannot apply it and refuses to start with one.threshold and top_k is fixed at deploy, so switching weights means redeploying; the platform downloads exactly the commit revision names into its cache before the worker starts, and the worker reads that snapshot offline. The commit pins the files, but what the hub still decides can change underneath a deploy: a repository that is deleted, renamed, made private or gated, or a commit removed by a history rewrite, makes the deploy fail at the download, and a cache that was cleared needs the hub reachable again. A gated repository needs hf_token.class_names), when num_classes is set without class_names, or when num_classes or the checkpoint slot is set on an ONNX repository. An error during inference ends the worker with that error instead of emitting a substitute result. Only a zero-area frame emits the empty result: an empty list, 0 for the class id, an empty string for the label.model must name only reviewed repositories, and that code cannot fetch anything beyond the pinned snapshot. A large network needs GPU memory; the whole class vector is scored and sorted per frame, so a very wide label set costs time on every frame. Weights and the hf_token-gated repositories carry their own licenses, which this component's license does not cover.model or revision changes both the label set and the score calibration. A multi-label transformers head, or one with a single output, is scored with sigmoid as the transformers pipeline does; every other head with softmax.live-test prerelease
Automated release