NVIDIA-AI-IOT / CUDA-PointPillars

A project demonstrating how to use CUDA-PointPillars to deal with cloud points data from lidar.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What should I do if I want more labels?

zexianghui opened this issue · comments

Hello, dear developer
If the model I retrained contains more labels, how can I modify the original code? Please give me some advice
For example, labels of my model are "car", "pedestrian","cyclist","indicator" and "truck", while the open source code is only "car", "pedestrian" and "cyclist".
Thank you very much!

Hi @1301706592 , did you manage to solve this issue ?

commented

you do not need to modify any original code. All you need to do is executing exporter.py, it wll generate a new version param.h and pointpillar.onnx. replace param.h and pointpillar.onnx in the project. the labels depends on your model completely which trained by OpenPcdet @zexianghui @maayanYa

@liveforday Thank you for your response !
That's what I did and it worked good on OpenPCDet , but running with the ONNX file on your project - inference time increased significantly to an unreasonable time and I received a lot ( ~ thousands ) of false predictions , for example :

WhatsApp Image 2023-01-04 at 14 50 01

So I assumed changing only the params.h wasn't enough but couldn't figure out what else is needed

commented

@maayanYa I haved met similar problems before. In my case the programme is running ok when I used my own model with 5 label. But when I increased the number of label to 10, the number of predicted boxes exploded and the prediction took a long time. but it still worked good on OpenPCDet .
Later, we found that this is not about the number of labels, it was about what parameters did you choose to save to the pth file. However, this part is not my responsibility in my team, so I will reply to you again when I figure it out.

@liveforday Thank you !! Looking forward for your reply :)

Hello, I have a question , can I print the predict label by this code ? After I simplify the model, the output is just the bbox, how can I add the object's own label? Looking forward for your reply.

commented

Yes, you can. The output has the label id, you could refer to SaveBoxPred function in the main.cpp file at 100 row. The last two value of output is id and score

Thank you very much, i'm so stupid I thought it was the number id...

Hello eveyone, I met the same problem. Is there any update on this one ?

@maayanYa I haved met similar problems before. In my case the programme is running ok when I used my own model with 5 label. But when I increased the number of label to 10, the number of predicted boxes exploded and the prediction took a long time. but it still worked good on OpenPCDet . Later, we found that this is not about the number of labels, it was about what parameters did you choose to save to the pth file. However, this part is not my responsibility in my team, so I will reply to you again when I figure it out.

Hello again, after updating the exporter code with below comment custom model training exported and worked fine for me.

#77 (comment)

@Acuno41 It works for me as well ! Thank you !!

Hello again everyone,

After sometime i was able to train my custom data with 3 classes with OpenPCDet and export it successfully. Both OpenPCDet and c++ side the model worked fine and generated OK results. Then i also trained same data with 12 classes with OpenPCDet and export it successfully. But this time c++ side generated completely random results while OpenPCDet side reuslts looking good.

Is anyone encountered this type of issue ? or is anyone can successfully export the model with much more classes ?

I would be glad if anyone can help.
Thank you.

I found out that the "MAX_POINTS_PER_VOXEL" parameter in the pointpillar.yaml file is the problem. When I change the parameter from the default 32 to something different, it causes the problem I described above.
I am looking for solution.