Ask Your Question
0

what are .yml files how to read them and use for svm training?

asked 2019-01-01 20:00:31 -0500

arti gravatar image

My features are in .yml file like running1.yml, running2.yml,running3.yml, running4.yml, walking1.yml,walking2.yml,walking3.yml,walking4.yml, dancing1.yml,dancing2.yml,dancing3.yml,dancing4.yml......etc. how to read these files and use for svm training. thanks

edit retag flag offensive close merge delete

Comments

you probably need to show us, what is inside your yml files, and how those were generated.

berak gravatar imageberak ( 2019-01-02 02:01:44 -0500 )edit

my features are as follows

%YAML:1.0

vocabulary: !!opencv-matrix rows: 200 cols: 128 dt: f data: [ 8.73926353e+00, 8.75766850e+00, 1.12085886e+01, 1.23650303e+01, 9.84662533e+00, 6.95705509e+00, 5.78834343e+00.........

%YAML:1.0

vocabulary: !!opencv-matrix rows: 1000 cols: 64 dt: f data: [ -1.38034846e-03, -6.16916595e-03, 1.58733840e-03, 6.46027178e-03, -6.20777812e-03, -3.35226655e-02, 8.55479296e-03, 3.38493958e-02, 2.8398050..............

%YAML:1.0

vocabulary: !!opencv-matrix rows: 100 cols: 1 dt: f data: [ 3.23813282e-07, 4.27613676e-01, 2.13928461e-01, 7.87456453e-01, 3.32516313e-01, 7.04238474e-01..............

these gengeted using BOW of lbp ,SIFT, HOG methods

arti gravatar imagearti ( 2019-01-02 03:44:10 -0500 )edit

thanks, but in the future, rather put information like this into your question, not into comments

berak gravatar imageberak ( 2019-01-02 03:57:50 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-01-02 03:53:11 -0500

berak gravatar image

you can read it back like:

FileStorage fs("running3.yml", FileStorage::READ);
Mat voc;
fs["vocabulary"] >> voc;
fs.release();
edit flag offensive delete link more

Comments

Thank you sir

arti gravatar imagearti ( 2019-01-02 05:16:56 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-01-01 20:00:31 -0500

Seen: 45 times

Last updated: Jan 02