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

Does this repository compatible with yolov5 V3? #9

Open
luvwinnie opened this issue Oct 20, 2020 · 17 comments
Open

Does this repository compatible with yolov5 V3? #9

luvwinnie opened this issue Oct 20, 2020 · 17 comments

Comments

@luvwinnie
Copy link

Seems like the yolov5 has released a V3 version, does this repository compatible with it?

@zineos
Copy link

zineos commented Oct 20, 2020

I just try, and it work.

@luvwinnie
Copy link
Author

luvwinnie commented Oct 20, 2020

@zineos THank you for confirming... Just one thing is that, if I use custom model. the thing we should modified is only the number of class? Because my custom seems like getting a lot of bounding boxes when using with deepstream.

@zineos
Copy link

zineos commented Oct 20, 2020

Are you replacing yololayer.cu and hardswish.cu file in tensorrtx/yolov5 ?

@luvwinnie
Copy link
Author

luvwinnie commented Oct 21, 2020

@zineos yes I have replace the hardswish.cu and yololayer.cu in tensorrtx/yolov5. I tested my model with the yolov5 detect.py seems like the model perform very well for example detecting person, it didn't show multiple box in same image. However, I got multiple boxes after converting to Deepstream app.
The detect.py use the model and half to 16fp model, and my deepstream config also using the FP16 optimization so suppose they have almost same result but it didn't.

@luvwinnie
Copy link
Author

If I use a custom model any parameter i should change?

@zineos
Copy link

zineos commented Oct 21, 2020

For now, I have no idea

@luvwinnie
Copy link
Author

@zineos Thank you for help, I would like to find the problem and report here.

@luvwinnie
Copy link
Author

@zineos The tensorrtx seems like remove the hardswish for V3, maybe this is the problem/

a commit in tensorrtx

yolov5 hswish plugin replaced by x*hsigmoid 4980365 wang-xinyu [email protected] 2020/09/10 20:43

@KevinZhanggg
Copy link

@luvwinnie Hi, Have you solved the issue about having a lot of bboxes. I am trying to make it work with yolov5 4.0

@luvwinnie
Copy link
Author

@KevinZhanggg This repository i think it need to use yolov5 version 2.0 or version 3.0/3.1 instead of version 4.0. Because it seems like the yolov5 changed some layers in the latest version.

Everytime the yolov5 updated the cuda layer in this repository need to be updated.

Btw, i haven't tested with version4.0 but use the version 3.0 instead.

@KevinZhanggg
Copy link

@luvwinnie yeah You are definitely right. It seems like some files have to be changed for yolov5 4.0.

@KevinZhanggg
Copy link

@luvwinnie Did you solve multiple bbox issue when you implement yolov5 3.0 ? I have the same error.

@wxthss82
Copy link

wxthss82 commented Mar 2, 2021

@KevinZhanggg This repository i think it need to use yolov5 version 2.0 or version 3.0/3.1 instead of version 4.0. Because it seems like the yolov5 changed some layers in the latest version.

Everytime the yolov5 updated the cuda layer in this repository need to be updated.

Btw, i haven't tested with version4.0 but use the version 3.0 instead.

@luvwinnie
Thank you for your information. I have some questions which I want to share with you.

  1. We can use tensorrtx to convert to yolov5 v3 or v4 engine, both can predict correctly. When we execute: export LD_PRELOAD=/root/tensorrtx/yolov5/build_v4/libmyplugins.so ; sudo ./yolov5 -d ../samples. I think yolov5 related layers info exists in libmyplugins.so.
  2. I compare the preprocess func in v3 with v4, it seems the same.
  3. So I think if I use corrensponding v3 or v4 libmyplugins.so, we can use deepstream-app to get the same result, but failed.

Could you give me a hand? Thanks!

@luvwinnie
Copy link
Author

luvwinnie commented Mar 3, 2021

@KevinZhanggg I'm not sure what was the problem however i retrained my model then the multiple boxes gone. of course you need to tune the NUM_CLASSES and also the class and nms confidence to make it work with your custom model. The most stable one is the model trained with evolved yaml file.

@wxthss82 What do you mean "So I think if I use corrensponding v3 or v4 libmyplugins.so, we can use deepstream-app to get the same result, but failed." ?

@wxthss82
Copy link

wxthss82 commented Mar 3, 2021

@luvwinnie I mean that if I use yolov5l v3 version of libmyplugins.so, I can use deepstream-app and get the correct result. But when I use yolov5l v4 version of libmyplugins.so, I get many boxes in deepstream-app.

@luvwinnie
Copy link
Author

luvwinnie commented Mar 4, 2021

@wxthss82 Yes that is expeceted because the yolov5 v4 seems like changed the layers compare to v3, this repo only compatible until v3 of yolov5. It need to change write the tensorrtx layer to make it compatible with latest yolov5

Take a look with this tensorrtx that what changed in v4 of yolov5

@constantinfite
Copy link

Hi, I have the same problem with yolov5-v.3, I run deepstream on 2 camera but I have multiple bounding boxes in the preview window.
I didn't change the parse-bbox-func-name.
Also I didn't replace the file yololayer.cu and hardswish.cu file in tensorrtx/yolov5 because when I runthe command make in the directory build it causes a error.

Can you tell me how to solve this issue please ?
Thanks !

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

5 participants