FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

Dynamic Batch Inference

Open UygarUsta99 opened this issue 1 year ago • 18 comments

I have exported my yolov7 model with dynamic axes as tensorrt.Engine runs fine on single batch but I want to be able to make inference with multiple images.How can I achive this ? How should I feed my images to the model.predict method ? I have tried using model.predict(np.array([im.copy(),im.copy()])) but I get errors. Any help would be much appreciated.

UygarUsta99 avatar Nov 10 '22 08:11 UygarUsta99

Hi, @UygarUsta99 We are working on batch inference this week, I think it will supported in next week. Once the feature is updated, we will comment here to let you know. :)

jiangjiajun avatar Nov 10 '22 09:11 jiangjiajun

Temporary solution:

im_list = [im, im, im]
for i in range(im_list):
    model.predict(i)

or

im_numpy = np.array([im, im])
for  i range(len(im_numpy)):
    model.predict(im_numpy[i])

heliqi avatar Nov 10 '22 09:11 heliqi