Package the handler and onnx model in a .mar file with torch-model-archiver.
I think the preprocessing step with letterbox can go unchanged, it fits the problem of object detection and preserves aspect ratio of the images as much as possible. Though if the ONNX model is dynamic and doesn't need a fixed image size, this can also be removed from the handler.
I think the main things to do are
torch-model-archiver
.I think the preprocessing step with letterbox can go unchanged, it fits the problem of object detection and preserves aspect ratio of the images as much as possible. Though if the ONNX model is dynamic and doesn't need a fixed image size, this can also be removed from the handler.