NVIDIA / object-detection-tensorrt-example

Running object detection on a webcam feed using TensorRT on NVIDIA GPUs in Python.
211 stars 61 forks source link

Excuse me, can you tell me how to solve this problem? #13

Open Joevaen opened 4 years ago

Joevaen commented 4 years ago

It's a project about hrnet from GITHUB without tensorrt.When i tried to change "output = model(input)" to tensorrt-inference, mistake occured.Can you tell me how to deal with it? Is this bug is from my wrong understandings about TRT or due to the version issue?Thanks a lot.

print(engine.get_binding_shape(0)) h_input = cuda.pagelocked_empty(trt.volume(engine.get_binding_shape(0)), dtype=trt.nptype(trt.float32)) h_output = cuda.pagelocked_empty(trt.volume(engine.get_binding_shape(1)), dtype=trt.nptype(trt.float32)) d_input = cuda.mem_alloc(h_input.nbytes) d_output = cuda.mem_alloc(h_output.nbytes) stream = cuda.Stream() context = engine.create_execution_context()

"get_binding_shape(0)" show bugs.