vehicledino_dinov2_int8.onnx
Hi, I'm testing the vehicledino_dinov2_int8.onnx model for vehicle manufacturer recognition.
The model card lists 42 makes and 323 models, but the downloaded ONNX model outputs makes with 164 classes and models with 2,005 classes.
Could you provide the correct class-index mappings for this specific ONNX file, including the manufacturer names?
The model runs successfully on CPU, but I can't safely interpret its predictions without the corresponding labels.
Thanks!
Hi Tom, thanks for reporting this. You are correct: vehicledino_dinov2_int8.onnx outputs makes with shape (1, 1, 164) and models with shape (1, 1, 2005). The 42/323 output sizes in the model card were incorrect. Sorry for the confusion.
The class-index mappings for this exact export are:
Each JSON file is an array: use the predicted output index directly as the array index. Training retained the original CompCars numeric IDs, so do not sort, compact, or shift the lists. For example, make index 39 is Toyota, 78 is Audi, and 100 is Honda.
Index 0 is an Unknown placeholder. The model-label list also retains unnamed ID positions as Unknown; these should not be interpreted as a trained unknown-vehicle detector. The files preserve the dataset's spellings, including BWM at make index 81.
import json
with open("vehicledino_makes.json", encoding="utf-8") as f:
make_labels = json.load(f)
with open("vehicledino_models.json", encoding="utf-8") as f:
model_labels = json.load(f)
make_logits, model_logits = session.run(
["makes", "models"], {"images": tensor.astype("float32")}
)
assert make_logits.shape[-1] == len(make_labels) == 164
assert model_logits.shape[-1] == len(model_labels) == 2005
make_idx = int(make_logits[0, 0].argmax())
model_idx = int(model_logits[0, 0].argmax())
print(make_idx, make_labels[make_idx])
print(model_idx, model_labels[model_idx])
I checked the mappings against the CompCars metadata and verified the output shapes on CPU using the same INT8 file you downloaded. Its SHA-256 is c8ad401d0fe1f319ab59a12ad0033ac932741823dc732ab461c73d614467870c. The output widths describe the index space, not verified accuracy or training coverage for every class.
Hi,
I've been testing your VehicleDINO INT8 ONNX model on Windows using the CPUExecutionProvider.
The model passes ONNX structural validation, but ONNX Runtime 1.20.1 fails during session initialization with:
NOT_IMPLEMENTED: Could not find an implementation for ConvInteger(10) node with name '/model/backbone/backbone/patch_embed/proj/Conv_quant'
ONNX Runtime 1.31.1 also fails to complete initialization within our test timeout.
Could you confirm which ONNX Runtime version and execution provider you use successfully with this model?
Alternatively, would it be possible to provide an FP32 ONNX export without the ConvInteger quantization operations?
Thanks!
Hi Tom, thanks for the details. The successful INT8 test used:
- ONNX Runtime 1.32.0
- CPUExecutionProvider
- macOS on Apple Silicon (arm64)
The session initialized and completed a synthetic-input smoke test for the make/model outputs. The session options were intra_op_num_threads=4 and inter_op_num_threads=1. I have not verified Windows, so I cannot confirm that upgrading to 1.32.0 resolves the failures you reported.
An unquantized FP32 export is already available: download vehicledino_dinov2.onnx, approximately 450 MiB.
I checked the local FP32 file against the published file's SHA-256 and inspected its graph: it contains no ConvInteger or quantization nodes. Its make/model output dimensions are still 164 and 2,005, and it uses the same label mappings linked above.
You can try loading that file with:
import onnxruntime as ort
session = ort.InferenceSession(
"vehicledino_dinov2.onnx",
providers=["CPUExecutionProvider"],
)
This removes the ConvInteger operation involved in the 1.20.1 error, but Windows execution remains unverified. If the FP32 file also fails or times out, please share your Python version, CPU architecture, ONNX Runtime version, timeout duration, and any initialization logs so we can narrow it down.