This is the code for our paper "Unsupervised Learning of Deep Feature Representation for Clustering Egocentric Actions, IJCAI 2017".
The folder contains following files.
-
train_2D_mult_auto_ver4.py : Train multilayer 2D convolutional autoencoders to extract frame level features.
-
test_2D_conv.py : Extract spatial features from the video
-
lstm_2D_conv_ver4.py : Train lstm autoencoder to learn splice level representations
-
test_lstm.py : Extract splice level representations
-
opti.py : Extract dense optical flow and save it for each splice
-
raw_frame.py : Extract raw frames and save them for each splice
-
ind2vec.m confusion.m : Helper functions
-
cluster.m : Clusters the features extracted from the LSTM
-
make_gtea.m : Sample code to generate GT in required format (from GTEA dataset in this case)
-
match_greedy2.m : Code for greedy matching of generated labels and GT
-
readNPY.m, readNPYheader.m : Helper functions to read .npy files in matlab
-
metadata_S2.mat : Contains information regarding video length etc.
-
gteagroundtruth : Contains sample files to form GT for GTEA dataset
-
complete.sh : Runs entire feature extraction pipeline (from optical flow extraction to LSTM features)
- In order to run these codes you will need to extract dense optical flow and raw frames from the video (use code opti.py and raw_frames.py).
- All videos were converted to 15 fps and splices were formed at 2 sec for short term actions and 30 sec for long term actions.