Closed wandering007 closed 7 years ago
Problem solved.
The _ccv_dpm_write_checkpoint
function (https://github.com/liuliu/ccv/blob/stable/lib/ccv_dpm.c#L169) writes model file with fprintf(w, "%la %la %la %la\n", ...)
. Then the float-point number is saved in hex format. And these numbers in model file is read by fscanf
. However, fscanf
from gcc in cygwin does not support to read hex number (0x...).
I personally suggest not to save values in hex format, which is kind of old-fashioned and not supported by fscanf
on Windows.
Thank you. That makes sense. The reason to save in hex is to keep the accuracy of the float representation. However, it won't matter in future development because we are pretty settled with SQLite as the on disk format.
I trained a dpm model using
dpmcreate
on Linux. And to use it Windows, I compiled ccv in cygwin successfully. However, when I test the model usingdpmdetect.exe
in cygwin, the results are always no objects detected (https://github.com/liuliu/ccv/blob/stable/bin/dpmdetect.c#L34). But It indeed can detect objects on Linux (Same code, input image and model). On Windows, I didn't useliblinear
,cuda
orgsl
when compiling, but they are not necessary for detecting, if I didn't get it wrong.Pretty weird...What are the probable causes? Compiler differences? I've checked several times but didn't figure it out.