Predict TIMM
Overview
Classifies every image in a dataset and saves the predicted class as an annotation in the output dataset: an image tag named after the class, with the score on a confidence tag beside it.
Pick a Destination dataset to add the predictions to a dataset you already have, such as a labeling pool or an active-learning set. Existing assets are kept, and new predictions replace any previous annotations for the same image. Leave it empty and the node writes into a dataset of its own, one version per run.
Predict with a classifier you trained here, or with a public ImageNet checkpoint when you just want to see what a generic model makes of your images.
The badge counts the annotated images and opens the output dataset.
Pretrained Models
- resnet50
- resnet101
- efficientnet_b0
- efficientnet_b1
- efficientnet_b2
- efficientnet_b3
- efficientnet_b4
- efficientnetv2_s
- efficientnetv2_m
- efficientnetv2_l
- mobilenetv3_large_100
- mobilenetv3_small_100
- convnext_tiny
- convnext_small
- convnext_base
- convnext_large
- vit_small_patch16_224
- vit_base_patch16_224
- vit_large_patch16_224
- swin_tiny_patch4_window7_224
- swin_small_patch4_window7_224
- swin_base_patch4_window7_224
- deit_small_patch16_224
- deit_base_patch16_224
Prerequisites
How it works
FAQ
Does it change the input dataset?
No. Predictions land in the output dataset and the source keeps whatever it already had.
What does Merge mode decide?
Replace leaves only the new predictions in the output dataset, which is what you want before an evaluation node. Keep both carries the input annotations over next to the predictions, which is what you want when comparing them side by side.
What does a pretrained model actually predict?
The 1000 ImageNet classes. That is useful for a quick sanity check or for coarse sorting, but it will not name your own categories, which is why most runs pick a model trained here.
Does every image get a class?
Every image the model scores above the confidence threshold does. Raise the threshold to leave uncertain images unannotated instead of forcing a guess.
How do I know whether the predictions are any good?
Run the matching evaluation node against a ground-truth dataset. Prediction alone reports how many images were annotated, not how correct the annotations are.
Can I run this without choosing the framework by hand?
Yes, through Apply model. It reads the framework off the model asset and dispatches to this node, which is what you want when the model is only picked at runtime.
Inputs
Dataset whose images are classified. Predictions are added to the output dataset, not to this one. Key: DATASET.
Dataset the predictions are added to, keeping what it already holds. An image it already annotates gets the new prediction instead. Leave empty to use the node’s own output dataset, which a rerun writes a new version of. Key: DST_DATASET.
Model to run inference with, from this workspace or the zoo. The node is handed the resolved version and runs on its weights: the model stored for it (safetensors with its config.json, or an ONNX graph), or the published weights its zoo tag names, downloaded and checked against their SHA-256. Weights go through the safe-weights check before anything loads them, so with the policy on a pickle is refused until it is converted. Only versions with a class vocabulary are offered, a backbone has to be fine-tuned before it can predict. Key: MODEL.
Classes to keep in predictions. Images classified as other classes are skipped. Leave empty to keep all classes. Values come from MODEL. Key: CLASSES.
Number of images the model runs on at once, written as batch_size. Larger batches are faster on a GPU with spare memory. Key: CONFIG.
Number of images downloaded at once while the model works through the previous batch. Raise it when downloads, not inference, are the bottleneck. Minimum: 1. Key: DOWNLOAD_BATCH_SIZE.
Number of downloaded batches allowed to wait on disk ahead of the model. Higher values keep the GPU fed but use more disk space. Minimum: 1. Key: PREFETCH_BATCHES.
Outputs
Dataset with the input images plus the classifier prediction annotations: the destination dataset when one is picked, otherwise the node’s own. Shown as an artifact. Key: OUTPUT_DATASET.
Number of images annotated. Shown on the node as a badge. Selecting the badge opens OUTPUT_DATASET. Key: PRED_COUNT.
Models and configuration
Model is the one place the weights come from: a model of this workspace, or one of the zoo entries listed above. The node is handed the resolved version and runs on its weights — the model stored for it, or the published weights of its zoo tag, downloaded and checked against their SHA-256 for an entry that hosts none.
A zoo entry predicts the 1000 ImageNet classes rather than yours, so most runs pick a model trained here.
Classes narrows the output to the listed class names. Config holds the inference settings, including the confidence threshold and the batch size.
Runtime
The node runs in its own GPU container. The first run takes longer while the worker pulls the image and downloads the selected weights.
Images are fetched ahead of the model to keep the GPU busy. Download Batch Size sets how many arrive at once and Prefetch Batches how many wait on local disk, so raise them for fast storage and lower them when disk is tight.
JSON config
Machine-readable node interface for automation and advanced usage.