liuliu / ccv

C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library
http://libccv.org
Other
7.09k stars 1.72k forks source link

swtcreate.c segmentation fault #55

Open jaderberg opened 11 years ago

jaderberg commented 11 years ago

I am currently trying to reproduce your results for the SWT text detection performance by using bin/swtcreate.c. I run in to a segmentation fault however during the search for std_ratio. Do you have any idea what the issue could be? Also could you publish the parameters used to produce the results here http://libccv.org/doc/doc-swt/?

Update: After testing on my laptop as well as a cluster it appears there is a memory leak somewhere causing an excessive use of memory

liuliu commented 11 years ago

Which dataset do you use for the swtcreate computation?

jaderberg commented 11 years ago

ICDAR 2003 scene test set. My laptop ran out of memory when swtcreate was using around 2.5GB.

liuliu commented 11 years ago

It is expected to use a few GiBs for swtcreate, if you are not sure if this is memory related, turn off the 1GiB cache in ccv_enable_cache line in swtcreate.c

I am not sure if there is a memory leak or it is expected to run to 2GiB, all functions that is implemented in lib/*.c are checked with valgrind for memory leak issues, but swtcreate.c is not.

jaderberg commented 11 years ago

disabling the ccv_enable_cache line does allow it to run on my mac osx laptop for longer, however I still run out of memory and the program stops computing, and I still encounter a segmentation fault on a linux cluster

liuliu commented 11 years ago

@jaderberg I will verify it with valgrind before the next release.