niais / mv-ignet

The Official PyTorch implementation of "Learning Multi-View Interactional Skeleton Graph for Action Recognition" in TPAMI 2020
BSD 2-Clause "Simplified" License
25 stars 4 forks source link

what does this A_25 = np.array([[... means in HPGNet.py? #1

Open southsea0725 opened 3 years ago

southsea0725 commented 3 years ago

Would you please tell me A_25 = np.array([[... means ? If I use 17 key points, how to modify this variable ? thanks

niais commented 3 years ago

Would you please tell me A_25 = np.array([[... means ? If I use 17 key points, how to modify this variable ? thanks

A_25 here is an embedding matrix that clusters the skeleton (25 joints) into 5 groups. Please refer to the paper for the skeleton topology.

# skeleton partitions for NTU-RGB+D
trunk: [1, 2, 3, 4]
left arm: [5, 6, 7, 8, 22, 23]
right arm: [9, 10, 11, 12, 24, 25]
left leg: [13, 14, 15, 16]
right leg: [17, 18, 19, 20]

We use it to embed 25 joints into 5 parts to extract higher-level semantic features. BTW, you can simply uncomment A_embed = torch.ones([A.size(0), A.size(1), group_num]) in HPGNet to let the network learn clusters itself. This operation won't decrease the performance.