kenziyuliu / MS-G3D

[CVPR 2020 Oral] PyTorch implementation of "Disentangling and Unifying Graph Convolutions for Skeleton-Based Action Recognition"
https://arxiv.org/abs/2003.14111
MIT License
430 stars 96 forks source link

Change number of people in model #51

Closed tucachmo2202 closed 2 years ago

tucachmo2202 commented 2 years ago

Hi, thanks for great works,

I see that in your implementation, you fixed 2 as number of skeleton so how to change it to be flexible with any people number? Thank you very much!

kenziyuliu commented 2 years ago

Hi @tucachmo2202,

Thanks for your interest. If I recall correctly the model definition should be able to handle multiple persons (you can adjust the number of skeletons here: https://github.com/kenziyuliu/MS-G3D/blob/master/model/msg3d.py#L187). So for a dataset with multiple skeletons per frame, you can always retrain the model.

If your question was about having the model take a variable number of skeletons at different frames — I don't think it is currently supported. For datasets that may have video sequences with > 2 skeletons (e.g. Kinetics), I believe the workaround was simply to cap the number of skeletons at 2 following previous work (https://github.com/kenziyuliu/MS-G3D/blob/master/data_gen/kinetics_gendata.py#L53).

Hope this helps!

tucachmo2202 commented 2 years ago

Hi @kenziyuliu,

Thank for your supporting. I found the way to change the number of people it is fix the feature of batchnorm1D to in_channels * num_point: https://github.com/kenziyuliu/MS-G3D/blob/master/model/msg3d.py#L1119