guillaume-chevalier / LSTM-Human-Activity-Recognition

Human Activity Recognition example using TensorFlow on smartphone sensors dataset and an LSTM RNN. Classifying the type of movement amongst six activity categories - Guillaume Chevalier
MIT License
3.33k stars 935 forks source link

something about video #12

Closed Twinkle123321 closed 6 years ago

Twinkle123321 commented 6 years ago

Hi,thank you for your wonderful turtiol,there exist three lines in the vedio,they may resprent three data sets in your code,every moment each line has only one value,I wonder how do you get the 3-dimension datas?would you help me understand it?thank you

guillaume-chevalier commented 6 years ago

The 3 lines in the video are related to the acceleration. There is also the gyroscope, which os not represented in the video.

If you search for _acc_ in the project, you will find those lines:

INPUT_SIGNAL_TYPES = [
    "body_acc_x_",
    "body_acc_y_",
    "body_acc_z_",
    "body_gyro_x_",
    "body_gyro_y_",
    "body_gyro_z_",
    "total_acc_x_",
    "total_acc_y_",
    "total_acc_z_"
]

A low-pass filter has been applied to the accelerometer data so as to separate the gravity signal from the fine movements signal. This is why there are 6 dimensions for the _acc_ data rather than 3: the signal is copied and the copy has been applied the low-pass filter.

Twinkle123321 commented 6 years ago

thank you very much,I get it,I have another question about parameter,hoping you could give me some suggestions,the parameters'initialization is random,through optimize function,model can find best parameters.how can I save these best parameters,if I want to detect the activities in real time(that is to say,when I input a series of data,the model can tell me what the label of activities is.)