NVIDIA-AI-IOT / torch2trt

An easy to use PyTorch to TensorRT converter
MIT License
4.6k stars 676 forks source link

How can I use my torch2trt engine on images ? #285

Open Kmarconi opened 4 years ago

Kmarconi commented 4 years ago

Hi, I was wondering if anyone knew how can I use my torch2trt engine on images and get back the tensor with detections in it ? I know that i need to preprocess my image to send it to my model but after, what can I do ?

Thanks

ma-siddiqui commented 4 years ago

Hi, Same I am looking for using trt inference server?

I know to load and run engine using tensorrt sdk. Examples can be found when tensorrt SDK is installed.

Kmarconi commented 4 years ago

Yeah loading engine is not the problem but how can i run inference and display the result of it is more what I'm looking for.

gioipv commented 3 years ago

Hello, after convert to trt, save model. u can load model again and refer. u can refer to this file:. https://github.com/NVIDIA-AI-IOT/torch2trt/blob/master/torch2trt/test.py