Caffe features to libsvm

247 views
Skip to first unread message

Jos van de Wolfshaar

unread,
Apr 26, 2015, 9:14:11 AM4/26/15
to caffe...@googlegroups.com
Hi everybody,

While I was looking on the web for scripts to convert Caffe features to libsvm compatible text files I could not find anything useful. Hence, I decided to write my own script that extracts the features in the right format. The script can be found at:

It can also be used to extract everything to a plain text format. I hope some of you find it useful!

For downloading libsvm check out:

Cheers,
Jos

Luca Minciullo

unread,
Sep 21, 2015, 8:42:03 AM9/21/15
to Caffe Users
Hi,

first, thank you for you contribution.

What do you exactly mean by mini-batches in your algorithm?

Best,

Luca

Jos van de Wolfshaar

unread,
Sep 21, 2015, 6:48:45 PM9/21/15
to Caffe Users
Hi,

Good to hear that you like it.

I have to admit the 'mini' in mini-batch is redundant and confusing. It's the number of batches that are 
processed. It's more or less a legacy from another script that I used to write this. 

Anyway, let's say that you chose to use 100 mini-batches of 128 images each. That would result in a
text file that contains the features of 100 * 128 images in total.

Hope this makes things clear.

Cheers,
Jos

Op maandag 21 september 2015 14:42:03 UTC+2 schreef Luca Minciullo:
Message has been deleted

Qingkai Lu

unread,
Feb 29, 2016, 1:45:20 AM2/29/16
to Caffe Users
Hi Jos,

Thank you for sharing your script. I am new to caffe and this might be exactly what I need. 

I have one question about how to use this script. I want to use a pre-trained caffe model(e.g. models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel ) to extract features from a set of training images in the libsvm format. How should I specify the path of my images if I use your script?

Thank you in advance for any help!
Reply all
Reply to author
Forward
0 new messages