Giter Site home page Giter Site logo

skelemoa / synse-zsl Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 4.0 10.27 MB

Official PyTorch code for the ICIP 2021 paper 'Syntactically Guided Generative Embeddings For Zero Shot Skeleton Action Recognition'

License: MIT License

Python 40.49% Jupyter Notebook 59.51%
action-recognition computer-vision generalized-zero-shot-learning icip2021 pose pose-skeleton pytorch skeleton-based-action-recognition vision-and-language zero-shot-learning

synse-zsl's People

Contributors

cvitatma avatar divyanshusharma1709 avatar pranaygupta36 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

synse-zsl's Issues

RuntimeError: DataLoader worker (pid(s) 27447) exited unexpectedly

Hi, I'm yet to train SynSE from scratch because this error keep happening intermittently, but always before reaching epoch 1700, often around 1200. Did it ever happen to you?

python3 synse_training.py --ntu=60 --phase=train --ss=5 --st=r --dataset=/home/dario/temp/synse_resources/ntu_results/shift_5_r/ --ve=shift --wdir=/home/dario/temp/synse_resources/language_modelling/synse_5_r_retrain --le=bert --mode=train --num_cycles=10 --num_epoch_per_cycle=1700 --latent_size=100 --gpu=0

at synse/synse_training.py

def train_one_cycle(cycle_num, cycle_length):
...
            (inputs, target) = next(iter(train_loader))

RuntimeError: DataLoader worker (pid(s) 27447) exited unexpectedly

What is gtest_out.npy?

In synse_resources/ntu_results/shift_10_r/ we have
g_label.npy - 50906 NTU120 action labels
gtest.npy - 50906 ShiftGCN 256D features
and gtest_out.npy - a 50906x120 array between [-19.3308 39.108074]

What is gtest_out.npy? The output of the ShiftGCN classification layer (can't be, it's 120d, and you said you trained ShiftGCN only on the 110 seen classes)?
Why is the size 50906? (NTU120 has in total 52 940 samples, and only 302 are samples with missing skeletons)

What is synse_10_r_unseen_zs.npy and synse_10_r_seen_zs.npy

In synse_resources/language_modelling/repo_test_synse_10_r_val/bert/ we have
synse_10_r_unseen_zs.npy - of shape (4821, 10) and min max [ 0.0077835037 , 0.47233814 ]
and synse_10_r_seen_zs.npy - of shape (3240, 10) and min max [ 0.009033936 , 0.7786457 ]

My guess for synse_10_r_unseen_zs.npy is the unseen classes probabilities as output of softmax (SynSEclassifier(sequence_encoder(ShiftGCN_embeddings))) passed by (is this essentially correct?)
But I have no guess for synse_10_r_seen_zs.npy, given it's also of width 10

What is val*.npy, where does it come from, and how do you determined the sample size of it?

Hi,

I wonder where does val_label.npy, val_out.npy, and val.npy came from?
My guess is that they are randomly drawn from the validation split of the seen classes in the val setting.
For example, for NTU 55/5, we also take the 50/5 split in the 55 seen classes for training the gate module, and the val*.npys are taken from the validation split of the 50 seen classes.

I have another question about the size of val*.npys:

  • for NTU 55/5, you take 2000 samples
  • for NTU 48/12, you take 1440 samples
  • for NTU 110/10, you take 3240 samples
  • for NTU 96/24, you take 7200 samples.

I wonder if I could know how do you decide how many samples to take?
Thanks in advance!

[Question] Why did ShiftGCN perform so much better than MS-G3D?

Hi,

You performed ablation tests comparing using ShiftGCN vs MS-G3D, and the resulting accuracy drop was striking.

However MS-G3D published results slightly outperform ShiftGCN on the NTU-60 action recognition task.

Do you have thoughts on why ShiftGCN performed so much better in this case? (Was MS-G3D at least faster?)

[Questions] Only calling Dataloader once per epoch? Training classifier from scratch at each cycle?

at synse/synse_training.py

def train_one_cycle(cycle_num, cycle_length):
...
    for epoch in range(s_epoch, e_epoch):
...
        (inputs, target) = next(iter(train_loader))


if __name__ == "__main__":
...
            train_one_cycle(num_cycle, cycle_length)
...
            zsl_acc, val_out_embs, cls = train_classifier()

the dataloader is only called once per epoch, so only 64 samples are used for training each epoch, and a classifier is trained from scratch after each cycle.

  • Did you test training with all training samples per epoch and concluded only training with a few samples per epoch gave better results?

  • Did you test training the classifier from where it left off last cycle and concluded training from scratch each time gave better results?

Confused about some folders

in /synse_resources/ntu_results,what is the different between shift_val_24 and shif_24.
And the test_label in the two folders are not the same.
the labels in shift_val_24 match with the ReadMe,but the other one is not.

NTU split

Hi, how you split the NTU-60 dataset. Did you use the files in the CS split or the CV split? Did you remove any samples?
Thanks

How to replicate ablation test with MS-G3D?

How to replicate ablation test with MS-G3D?

Running this command:
synse_training.py --ntu=60 --phase=train --ss=5 --st=r --wdir=/home/dario/temp/synse_resources/language_modelling/repo_test_synse_5_r --le=bert --load_classifier --num_cycles=10 --num_epoch_per_cycle=1700 --latent_size=100 --load_epoch=3399 --mode=eval --gpu=0
--dataset=/home/dario/temp/synse_resources/ntu_results/msg3d_5_r/
--ve=msg3d

yields at

def load_models(load_epoch):
    sequence_encoder.load_state_dict(torch.load(se_checkpoint)['state_dict'])
Exception has occurred: RuntimeError
Error(s) in loading state_dict for Encoder:
	size mismatch for mu_transformation.0.weight: copying a param with shape torch.Size([100, 256]) from checkpoint, the shape in current model is torch.Size([100, 384]).
	size mismatch for logvar_transformation.0.weight: copying a param with shape torch.Size([100, 256]) from checkpoint, the shape in current model is torch.Size([100, 384]).

se_checkpoint == '/home/dario/temp/synse_resources/language_modelling/repo_test_synse_5_r/bert/se_3399.pth.tar'

some questions about visual feature extractor

Hello, I follow this paper and use shift-gcn to extract the visual features.
There are some questions.
1、I use the seen classes to train the shift-gcn, but without the test data, how can i choose the best epoch?
2、For each stream in shift-gcn, i can get a type of visual embedding. So how to get the 4s embeddding? just add them up in a ratio of [0.6,0.6,0.4,0.4]?
3、the best.pt in synse_resources/ntu_results/shift_5_r/weights/ is the weight for all the 4s shift-gcn models?
(maybe each stream has a best.pt?)

thank you for your work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.