rmsalinas / DBow3

Improved version of DBow2
Other
501 stars 237 forks source link

saved vocabulary bigger than database file? #15

Closed yf13 closed 6 years ago

yf13 commented 6 years ago

When running the utils/demo_generation sample with a few images, the console output seems fine and two files are generated under current folder:

-rw-r--r--   1 u  staff    384686 Nov 12 08:55 small_db.yml.gz
-rw-r--r--   1 u  staff    665344 Nov 12 08:55 small_voc.yml.gz

it seems that the vocabulary should be embedded in the database, but the size of vocabulary file is larger?

When checking the content of the YAML, we can see that the "small_voc.yml.gz" contains descriptors for each node while the "small_db.yml.gz" doesn't.

Is this by design or an issue?

yf13 commented 6 years ago

Seems that the bug is caused when loading vocabulary from YAML for the line

descriptor:dbw3 0 64 xxx xx xxx

The DescManip::fromString() simply get 0 for both type and cols. This can be fixed by the pull request https://github.com/rmsalinas/DBow3/pull/10