Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tensorRT 配置 #2

Open
SSJIACV opened this issue Dec 18, 2020 · 7 comments
Open

tensorRT 配置 #2

SSJIACV opened this issue Dec 18, 2020 · 7 comments

Comments

@SSJIACV
Copy link

SSJIACV commented Dec 18, 2020

多谢大佬的详细教程!
我想问一下这个项目下的tensorRT文件夹 是已经包括了 tensorRT推理时 所需要的库了么,不需要自己再另行下载了吧?

@SSJIACV
Copy link
Author

SSJIACV commented Dec 18, 2020

还有就是最后的tensorRT 推理 问题解决了么

@DataXujing
Copy link
Owner

包含了必要的库。关于错误的解决办法,可以参考:linghu8812/tensorrt_inference#12,应该是解决了,我没有尝试

@SSJIACV
Copy link
Author

SSJIACV commented Dec 18, 2020

包含了必要的库。关于错误的解决办法,可以参考:linghu8812/tensorrt_inference#12,应该是解决了,我没有尝试

多谢了

@SSJIACV
Copy link
Author

SSJIACV commented Dec 18, 2020

包含了必要的库。关于错误的解决办法,可以参考:linghu8812/tensorrt_inference#12,应该是解决了,我没有尝试

还有个问题,问您一下,这个mish激活函数(编译Mish_cuda)和预训练模型是什么关系啊,编译不成功,就无法使用 @WongKinYiu 开源的预训练模型么?

我训练efficient-d7的时候,显存11G,网络输入分辨率896的情况下,batchsize=1 才能勉强开始训练
你训yolov5-p7的时候,网络输入分辨率896的batchsize设为4,才能开始训练,请问你的v100是32G显存么?
网络输入分辨率 和 网络depth 、感受野都是对应的吧,如果训练yolov5-p7,但是用分辨率896,性能会不会下降很多啊?

@DataXujing
Copy link
Owner

DataXujing commented Dec 18, 2020

作者用的是Mish-cuda, 在编译的时候把该方法重命名成mc了,所以无法使用预训练模型,尽量编译Mish-cuda,我曾问过作者我这种实现会不会有其他影响,作者的回复是主要的影响还是Mish-cuda的显存优化和运算速度快.

我用的是32G的V100,识别精度肯定会受影响,因为YOLOv4-P7的anchor尺寸比较大, P6和P7的网络分支对原图的缩放比较严重,如果Input分辨率太小,就相当于YOLOv4-p7的 P6和P7分支基本不起作用了。尽量用大分辨率。

感觉YOLOv4-P7之所以精度高策略还是不断的从横向和纵向上搭建更大的网络,并且不断的提高Input的分辨率。YOLOv4-P7的推断速度也不是很快,在V100上我饿测试是大约FPS为6。

@WongKinYiu
Copy link

mish-cuda 裝不起來的話也可以把
https://github.com/DataXujing/ScaledYOLOv4/blob/main/models/common.py#L44
https://github.com/DataXujing/ScaledYOLOv4/blob/main/models/common.py#L76
https://github.com/DataXujing/ScaledYOLOv4/blob/main/models/common.py#L94
https://github.com/DataXujing/ScaledYOLOv4/blob/main/models/common.py#L147
Mish() 換成 nn.LeakyReLU(0.1, inplace=True)
COCO 準度差個 1% 左右, 訓練 batch 能開大可以省不少時間

據說 nn.SiLU(inplace=True) 也不錯, 不過我沒實際測試過

@SSJIACV
Copy link
Author

SSJIACV commented Dec 18, 2020

多谢两位的详细回复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants