VGG以特定格式提取特征

时间:2016-07-08 01:05:40

标签: machine-learning computer-vision caffe feature-extraction vgg-net

我试图让this repo工作。我按照说明使用这个脚本获取了样本数据(取自同一个repo):

#!/usr/bin/env sh
# This script downloads the trained S2VT VGG (RGB) model,
# associated vocabulary, and frame features for the validation set.

echo "Downloading Model and Data [~400MB] ..."

wget --no-check-certificate https://www.dropbox.com/s/wn6k2oqurxzt6e2/s2s_vgg_pstream_allvocab_fac2_iter_16000.caffemodel
wget --no-check-certificate https://www.dropbox.com/s/20mxirwrqy1av01/yt_allframes_vgg_fc7_val.txt
wget --no-check-certificate https://www.dropbox.com/s/v1lrc6leknzgn3x/yt_coco_mvad_mpiimd_vocabulary.txt

echo "Organizing..."

DIR="./snapshots"
if [ ! -d "$DIR" ]; then
    mkdir $DIR
fi
mv s2s_vgg_pstream_allvocab_fac2_iter_16000.caffemodel $DIR"/s2vt_vgg_rgb.caffemodel"

echo "Done."

在下一步他们说我需要sample video frames and extract VGG features for the frames。我不确定如何做到这一点。我已关注instruction on Caffe,但功能格式不同。

那么如何以与yt_allframes_vgg_fc7_val.txt相同的格式提取VGG功能?

1 个答案:

答案 0 :(得分:0)

此repo提供了从视频中提取VGG功能的脚本 - https://github.com/jesu9/VGGFeatExtract

特别是,请参阅脚本video_demo.py。这将输出您必须转换为txt文件的mat文件。

VGG 16层模型和原型文件可用于 - https://gist.github.com/ksimonyan/211839e770f7b538e2d8