Parsing error lbfmodel.yaml file in android

asked 2018-12-05 01:14:33 -0600

Sar gravatar image

updated 2018-12-05 02:40:44 -0600

I am trying to detect facial points using FacemarkLBF in android app. I have downloaded the lbfmodel.yaml model file from here and stored it in sdcard. When trying to load the model file, it is throwing error :

Error: Parsing error (/data/data/com.ds.openworld/app_model/lbfmodel.yaml(12): Invalid dt in Base64 header) in char* icvYMLParseBase64(CvFileStorage, char, int, CvFileNode*), file ../../modules/core/src/persistence_yml.cpp, line 102

I have also tried to save file as text and xml as stated here in issue no 5. I searched a lot but could not found any solution. Is this error related data types? what is 'dt'? The error while parsing is at line in the model like :

dt: d

It is working for Berak in desktop sample as stated here in the comments Error while loading YAML model file using opencv in android But it is not working in android. Plz help!!

edit retag flag offensive close merge delete

Comments

again, what do you have in lbfmodel.yaml, line 12 ?

berak gravatar imageberak ( 2018-12-05 04:33:55 -0600 )edit

just this = dt: d

Sar gravatar imageSar ( 2018-12-05 05:03:32 -0600 )edit

but that's correct ;(

which opencv version was it, again ?

(is there any chance, you can try with more recent code ?)

berak gravatar imageberak ( 2018-12-05 05:07:51 -0600 )edit

Hey Berak, actually it is binary data look here

Sar gravatar imageSar ( 2018-12-05 05:20:16 -0600 )edit
1

Using OpenCV 3.3.1 Android SDK with contrib modules from https://github.com/chaoyangnz/opencv3...

Sar gravatar imageSar ( 2018-12-05 05:22:09 -0600 )edit

well it's base64 encoded data, so still text.

but i no more think, the yml is the problem, more the outdated code ;(

berak gravatar imageberak ( 2018-12-05 05:33:54 -0600 )edit