Detecting Scene Breaks in Videos using Deep CNN
Installation
You need to install:
- Torch7
- cunn for training on GPU
- cudnn for faster training on GPU
- tds for some data structures
- display for graphs
You can install all of these with the commands:
# install torch first
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
# install libraries
luarocks install cunn
luarocks install cudnn
luarocks install tds
luarocks install https://raw.githubusercontent.com/szym/display/master/display-scm-0.rockspecModel
Imagenet pretrained VGG16 - modified to do binary classification
Data Setup
Check iPython notebook to preprocess data assuming you already extracted frames from the video.
After you create this file, open main.lua and change data_list to point to this file. You can specify a data_root too, which will be prepended to each filename.
Training
Finally, to start training, just do:
$ CUDA_VISIBLE_DEVICES=0 th main.luaDuring training, it will dump snapshots to the checkpoints/ directory every epoch. Each time you start a new experiment, you should change the name (in opt), to avoid overwriting previous experiments. The code will not warn you about this (to keep things simple).
Evaluation
To evaluate your model, you can use the eval.lua script. It mostly follows the same format as main.lua. It reads your validation/testing dataset from a file similar to before, and sequentially runs through it, calculating the accuracy.
Graphics, Logs
If you want to see graphics and the loss over time, in a different shell on the same machine, run this command:
$ th -ldisplay.start 8000 0.0.0.0
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
