Filter-out-class-ids not working with yolo?

• Hardware Platform (Jetson / GPU)
Jetson Xavier NX and AGX
• DeepStream Version
5.1
• JetPack Version (valid for Jetson only)
4.5.1
• Issue Type( questions, new requirements, bugs)
Question

Hello nvidia family and friends,

I have a piece of code where I detect people. To that end I used Peoplenet, that is trained to recognise 3 classes: Person, Bag and Face.
I only need to detect people and I was successfully able to configure things to only detect people using the filter-out-class-ids property.
However, Peoplenet only has an 80-86% accuracy in detecting people, so I thought I would give a try and use yolov5.
After many struggles I was able to use it, but the yolo network has 80 classes.
The filter-out-class-ids property doesn’t seem to work in this case. It’s all or nothing, whatever class ids I put in the list.

Would someone have any idea of how I could make the yolo work to only detect the
person class ?

Thank you very much in advance for your esteemed help.

Cheers

Hi,

We want to reproduce this issue in our environment for checking.
Would you mind sharing the model and corresponding configure/source to run YOLOv5?

Thanks.

Hello,

Sure, with pleasure.
Not being too sure how to share it with you, I created a tar.gz archive that can be downloaded here:

Please let me know if you prefer another mean for sharing the project.

However, there are a few things to take into account, but it should not be too complicated to modify.
This project controls a Gimbal in order for the camera to track people. You will probably have to comment the parts related to that.
Also, this project is made to use an RTSP source, and there is a fonction that runs at the beginning of the main function to set the network card accordingly. You will also have to comment that part out.
Apart from that it should be straight-forward.

In the config file I commented out the filter-out-class-ids property. If I uncomment it, I don’t see any class being recognised, it’s like all or nothing. I also tried with leaving 1 or 2 classes.
The current state of the config file may not be optimised, I think I filtered out every classes except the first two ones, as I was running a few tests.

Please let me know if you have questions.

Thank you very much for your help !

Cheers

Thanks a lot.

We are checking this internally.
Will share more information with you later.

Hi

We try your source but meet some problems like a missing source named common.
Would you mind modifing the sample into a standalone application so we can check the issue directly?

Thanks.

Hello @AastaLLL,

The ‘common’ resource is the one from the deepstream_python_apps repository (GitHub - NVIDIA-AI-IOT/deepstream_python_apps: DeepStream SDK Python bindings and sample applications).
I forgot to specify that part :-p
My app was developped based on one of the provided examples, and I had it placed in the apps directory.
If this is not enough, I will provide a standalone app, but I will unfortunately not have time to do it before Saturday.

Cheers

Hi,

Do you have time to generate a standalone app this week?
Thanks.

Hello AastaLLL,

I gave you the link the the common resource, so I thought that it was enough.
I will try to make a standalone app asap.

Let me get back to you

Hi again,

Please find the standalone version here
I may have just forgotten to comment out the call to the function that sets my network card at the beginning of the main function.
Also, you will need to change the IP address of the RTSP source, or modify the source entirely.

Hopefully this could help you

Best

Thanks for the update.
Will update more information with you later.

Hi,

Thanks for your patience.

We test your example and this issue comes from a typo.

diff --git a/apps/project/config/pgie_config.txt b/apps/project/config/pgie_config.txt
index 0b7d222..faede55 100644
--- a/apps/project/config/pgie_config.txt
+++ b/apps/project/config/pgie_config.txt
@@ -40,7 +40,7 @@ network-mode=2
 #num-detected-classes=3
 num-detected-classes=80
 #filter-out-class-ids=1;2
-filter-out-class-ids=1;2;3;4;5;6;7;8;9;0;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;49;50;51;52;53;54;55;56;57;58;59;60;61;62;63;64;65;66;67;68;69;70;71;72;73;74;75;76;77;78;79
+filter-out-class-ids=1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;49;50;51;52;53;54;55;56;57;58;59;60;61;62;63;64;65;66;67;68;69;70;71;72;73;74;75;76;77;78;79
 #cluster-mode=1
 cluster-mode=4
 interval=0

After updating the 0 into 10, the output can work as expected.
Thanks.

Hahaha !
I gave myself the facepalm of the century!

Sorry for the stupidity displayed here :-)

And thank you very much for you help with this.