InsightFace-REST
InsightFace-REST copied to clipboard
SCRFD ONNX model batch size
trafficstars
Hi, can't seem to get onnx scrfd inference working with batch sizes greater than 1. It's failing during the prepare phase. Here is the code I'm running:
onnx_batch_size = 64
height, width = [640,640]
reshaped = reshape(model, n=onnx_batch_size, h=height, w=width)
onnx_model = reshaped.SerializeToString()
config = Configs(models_dir="/models/onnx/scrfd_10g_gnkps/")
outputs = config.get_outputs_order("scrfd_10g_gnkps")
detector = scrfd(onnx_model, onnx_backend, outputs)
detector.prepare(nms=0.4)
I'm getting this error message:
index: 0 Got: 1 Expected: 64
Please fix either the inputs or the model.
Currently batch inference is supported only for TensorRT