Closed rogcomfox closed 4 months ago
You can check the type of inputs
for the inputs, i put all of the inputs to gpu instead of cpu like this
#for tensor backend
resized_img = T.ToTensor()(resized_img)[None].to("cuda:0", non_blocking=True)
blob = {"images" : resized_img, "orig_target_sizes": torch.tensor([[640,640]]).to("cuda:0", non_blocking=True)}
"orig_target_sizes": torch.tensor([[640,640]]).to("cuda:0", non_blocking=True)
replace this as
"orig_target_sizes": torch.tensor([[640,640]]).to(device="cuda:0", dtype=torch.int32, non_blocking=True)
thank you so much for your suggestion! it finally works like a charm
Hi there, thank you for your great work of RT-DETR. I trained RT-DETR using my own dataset and convert the onnx model to TensorRT following this #124. when I do inference, the bounding boxes coordinates always produces zero value like this screenshot. for inference I follow your code in trtinfer.py.