CUDA-PointPillars icon indicating copy to clipboard operation
CUDA-PointPillars copied to clipboard

What should I do if I want more labels?

Open zexianghui opened this issue 2 years ago • 13 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!

zexianghui avatar Aug 19 '22 15:08 zexianghui

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

maayanYa avatar Sep 05 '22 14:09 maayanYa

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 avatar Jan 04 '23 02:01 liveforday

@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

maayanYa avatar Jan 04 '23 13:01 maayanYa

@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 avatar Jan 06 '23 03:01 liveforday

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

maayanYa avatar Jan 08 '23 11:01 maayanYa

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.

JiyuanWANG12138 avatar Feb 16 '23 01:02 JiyuanWANG12138

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

liveforday avatar Feb 16 '23 03:02 liveforday

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

JiyuanWANG12138 avatar Feb 16 '23 05:02 JiyuanWANG12138

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.

Acuno41 avatar May 25 '23 13:05 Acuno41

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

https://github.com/NVIDIA-AI-IOT/CUDA-PointPillars/pull/77#issuecomment-1508276016

Acuno41 avatar May 26 '23 08:05 Acuno41

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

maayanYa avatar May 29 '23 09:05 maayanYa

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.

Acuno41 avatar Aug 09 '23 07:08 Acuno41

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.

Acuno41 avatar Aug 09 '23 13:08 Acuno41