Please install requirement packages from requirements.txt file.
Please download data files from this site http://crcv.ucf.edu/data/UCF101/UCF101.rar
SVM
-
To create train and test data for SVM run the following commands
python split_data.py train python split_data.py test This will create train and test folder with relevant video frames. -
To train and test the above created data run the following command
python walk.py
OR -
To test the data from already trained model gunzip svm.pkl.gz file to svm.pkl and run python test_from_model.py
-
To evaluate the results and create heatmap run
python eval_results.py
CNN
-
To create train and test data for CNN run the following commands
python split_data_cnn.py train python split_data_cnn.py test This will create train and test folder with relevant video frames. -
To convert our dataset according to Cifar10 format follow following steps
git clone https://github.com/gskielian/PNG-2-CIFAR10 run ./resize-script.sh to resize image frames to 32*32 rgb pixels now run, python convert-images-to-cifar-format.py this will create batch file for train and test. Copy and paste these files to /tmp/cifar10-data/ folder -
Next train cifar10 model (https://github.com/tensorflow/models/tree/master/tutorials/image/cifar10) on our above created dataset
python cifar10/cifar10_train.py -
To test from trained cifar10 model (https://github.com/tensorflow/models/tree/master/tutorials/image/cifar10) try
python cifar10_eval.py