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

Error creating tensorrt engine for Single class #7

Closed
Hidayat722 opened this issue Apr 22, 2020 · 8 comments
Closed

Error creating tensorrt engine for Single class #7

Hidayat722 opened this issue Apr 22, 2020 · 8 comments

Comments

@Hidayat722
Copy link

Hi,

I am unable to create tensorrt engine using the default parameters for single class config "yolov3-spp-1cls.cfg. i have also tried different height and width but still not able to produce engine it fails at the serialization step. any help would be appreciated.
Thanks in Advance

@wang-xinyu
Copy link
Owner

@Hidayat722 Did you adapt the CLASS_NUM defined in yololayer.h?

@Hidayat722
Copy link
Author

Yeah i did it but still having problems. Anyhow when i use yolov3-spp.cfg it works which is fine i can use this configuration for training. Anyhow my main concern is that i want to use this engine file with deepstream but i am unable to use it. Since the infer function is different with nvdsparsecustomyolov3 custom function in deepstream, Any solution or suggestion would be appreciated.
Thanks in advance.

@wang-xinyu
Copy link
Owner

wang-xinyu commented Apr 23, 2020

@Hidayat722 I never used deepstream, so not able to help you with it.

For yolov3-spp-1cls, you should adapt several layers, including conv88, conv100 and conv112, change their output channels to 18. Can you try it?

@Hidayat722
Copy link
Author

Well i have instead used the yolov3-spp.cfg for training since it converts to engine file but i am struggline with deepstream thanks for your help

@Hidayat722
Copy link
Author

Hi @wang-xinyu i tried for the single class as you mentioned above but i am getting error with concatenation

len 1024
91
len 256
94
len 256
95
len 512
96
len 256
97
len 512
98
len 256
99
len 512
103
len 128
ERROR: (Unnamed Layer* 209) [Concatenation]: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at input 1 at index 1. Input 0 shape: [256,34,160], Input 1 shape: [512,33,160]
106
len 128
107
len 256
108
len 128
109
len 256
110
len 128
111
len 256
set name out
ERROR: (Unnamed Layer* 209) [Concatenation]: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at input 1 at index 1. Input 0 shape: [256,34,160], Input 1 shape: [512,33,160]
build out

Thanks

@Hidayat722
Copy link
Author

Hi @wang-xinyu I also tried the new version where the outputs have been changed to 3 * (Yolo::CLASS_NUM + 5) but still i am getting the same error for yolov3-spp-1cls.cfg. Any help would be appreciated.

Thanks.

@wang-xinyu
Copy link
Owner

@Hidayat722 What's the input shape are you using? the input H and W should be divisible by 32.

@Hidayat722
Copy link
Author

@wang-xinyu Thanks alot the trick worked for me

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

2 participants