python - Convert pixel data (in txt file) in libsvm format -
i trying perform prediction libsvm recognition of specific object in image. able convert images using sobel operator , stored pixel value of 1 of image txt file. so, have txt file looks that:
14 18 0 173 176 145 175 177 155 20 21 7 19 18 13 9 7 8 3 1 4 3 1 2 5 4 2 1 0 0 [...]
my problem not familiar libsvm data format wondering: how modify file using python in order make usable libsvm?
thanks lot!!
a converter shouldn't difficult better not saving txt! don't need intermediate step. can input image data libsvm directly using libsvm python bindings or (my recomendation) scikits, see example:
http://scikit-learn.org/0.13/auto_examples/plot_digits_classification.html
note: scikits uses libsvm.
Comments
Post a Comment