enazoe / yolo-tensorrt

TensorRT8.Support Yolov5n,s,m,l,x .darknet -> tensorrt. Yolov4 Yolov3 use raw darknet *.weights and *.cfg fils. If the wrapper is useful to you,please Star it.
MIT License
1.19k stars 314 forks source link

尺寸不是1:1 #5

Open zhangxiaopang88 opened 4 years ago

zhangxiaopang88 commented 4 years ago

您好,您试过尺寸不是1:1的模型吗,我试尺寸是1:1的测试成功,不是1:1的测试结果为空

enazoe commented 4 years ago

@zhangxiaopang88 没有测试过,如果模型输入尺寸不是1:1,那么模型里对应的kernel步长之类的可能也要跟着改,但是非标准的可能trt不支持,你可以多测试下

zhangxiaopang88 commented 4 years ago

我把关于长宽不相等的断言给注掉了, // assert(inputDims.d[0] == inputDims.d[1]); assert(kernelSize.d[0] == kernelSize.d[1]); assert(stride.d[0] == stride.d[1]); assert(padding.d[0] == padding.d[1]); 其他的条件都满足,您看还需要修改哪些地方,能给个建议吗 @enazoe

enazoe commented 4 years ago

个人感觉是trt不支持这种不规则的filters

zhangxiaopang88 commented 4 years ago

我看到输入尺寸不一致的例子,应该是支持的输入尺寸不一致的情况,我再查查资料 @enazoe

xuhao1 commented 4 years ago

@zhangxiaopang88 I am also dealing with input size inequality, have you find any solution? (My Linux Notebook has no pinyin input method...)

xuhao1 commented 4 years ago

If simply comment all assert, the network gives a lot of wrong detection results...

zhangxiaopang88 commented 4 years ago

我尝试再次对比,我改动的并不大,只是涉及GridSize的地方改成宽高,处理1:1输入的话不报异常,但是不是1:1的话就会有问题,我准备把yolo转成onnx试试能不能成功

aybora commented 4 years ago

Hey @zhangxiaopang88 and @xuhao1, I also have inequal sized input images. Have you any progress on that issue?

enazoe commented 4 years ago

reference this commit 2edde41546bd58f13f2f51c4c9ecbe966f3267a8 @aybora @xuhao1 @zhangxiaopang88