Create Image Dataset from Video Frames for Caffe

Caffe image dataset requires train.txt and val.txt which are text listing all the files and their labels.

E.g.

Extracting the frames of a video clip can correspond to one label. Thus, the following command can be utilized:

./opencv_frame_extraction -fn="/path/to/your/video.mp4" -label="3"

The command will extract the video frames and provide the text listings with the label provided (default is 0):

_config.yml

Source code:

Github:

FrameExtractionSampleforCaffe

Written on April 17, 2015