Model Preparation
Model Preparation
Overview
Model File(s) Preparation
- Train a model of choice or obtain an existing model of interest.
- If the model is in ONNX (
.onnx), OpenVINO IR (.xmland.bin), or TensorFlow Lite (.tflite) format, you can skip this step. If the model is one of the supported PyTorch YOLO models, you can also skip this step. Else convert it to one of the formats mentioned above. For more information, see the guidelines in the Model Source Preparation section on the Model Conversion page. - For custom models, package the model file(s) into an ONNX NN Archive before uploading them to Hub. This is the recommended starting point because it stores the source model's tensor metadata, preprocessing, and optional output metadata together with the model and lets Hub reuse that information during conversion.
Starting from a raw
ONNX file is still supported, but it is the more manual path.Use it when an ONNX NN Archive does not fit your workflow or when you intentionally want to provide the conversion parameters yourself.In that case, make sure all source-model values are entered correctly during conversion.