Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve this project with RNN (LSTM) #47

Closed
Yorkzhang19961122 opened this issue Mar 25, 2020 · 3 comments
Closed

Improve this project with RNN (LSTM) #47

Yorkzhang19961122 opened this issue Mar 25, 2020 · 3 comments

Comments

@Yorkzhang19961122
Copy link

Thank you for your excellent project!
What if I want to change the model to RNN (LSTM)?

@felixchenfy
Copy link
Owner

You may check the Trouble shooting: section in README. Basically, you need to read the code, find the files that define the feature and model, and then change them. It will be lots of changes. Sorry about that.

I copied it here for your convinience:

Trouble shooting:

  • How to change features?

    In utils/lib_feature_proc.py, in the class FeatureGenerator, change the function def add_cur_skeleton!

    The function reads in a raw skeleton and outputs the feature generated from this raw skeleton as well as previous skeletons. The feature will then be saved to features_X.csv by the script s3_preprocess_features.py for the next training step.

  • How to include joints of the head?

    You need to change the aforementioned add_cur_skeleton function.

    I suggest you to write a new function to extract the head features, and then append them to the returned variable(feature) of add_cur_skeleton.

    Please read def retrain_only_body_joints in utils/lib_feature_proc.py if you want to add the head joints.

  • How to change the classifier to RNN?

    There are two major changes to do:

    First, change the aforementioned add_cur_skeleton. Instead of manually extracing time-serials features as does by the current script, you may simply stack the input skeleton with previous skeletons and then output it.

    Second, change the def __init__ and def predict function of class ClassifierOfflineTrain in utils/lib_classifier.py to add an RNN model.

@Yorkzhang19961122
Copy link
Author

thank you for your reply:)

@athulvingt
Copy link

have u tried it with LSTM @Yorkzhang19961122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants