简体   繁体   中英

Conver xml file to LMDB file for caffe

I want to use feature vectors which have been extracted from training image dataset as an input for caffe convolutional neural network. The feature vectors have been saved in xml file. I'm really new in caffe I want know how can I convert xml file to LMDB as an caffe input and how to mention in the model that I'm using feature vectors instead of images. the xml file is : 在此处输入图片说明

If you are willing to use python, then it should be quite easy for you.

First, you need to parse the XML file and read the data into a numpy array.
You can do this using xml python package .

The second stage is to write the data you have in numpy array into lmdb.
You can use this solution to write LMDB using python.

Regarding caffe, as long as your input data is in order, caffe does not care if it works on images, feature vectors or any other input.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM