Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

How to Generate "orb_vocab.dbow2" Format Files ? #121

Closed
ZQxiaoshi opened this issue Sep 25, 2019 · 5 comments
Closed

How to Generate "orb_vocab.dbow2" Format Files ? #121

ZQxiaoshi opened this issue Sep 25, 2019 · 5 comments

Comments

@ZQxiaoshi
Copy link

I'm trying to train my vocabulary,I have generated the Riyml format file,but how to generate. dbow2 format file?
Is there open source code available?

@saweer
Copy link
Contributor

saweer commented Sep 26, 2019

@ZQxiaoshi
Try to use DBoW2::TemplatedVocabulary::create method to create an ORB vocabulary.
I did it with the KITTI sequences.
https://github.com/shinsumicco/DBoW2/blob/master/include/DBoW2/TemplatedVocabulary.h#L84

@ZQxiaoshi
Copy link
Author

@saweer
Thank you very much for your reply.I want to convert Myvoc.txt into an "orb_vocab.dbow2" file.
I've run the specified code and generated the executable “convert_orb_vocab”,When I enter the following command at the terminal:

./convert_orb_vocab /Myvoc.txt /OUT.bin /home/zq/catkin_ws/src/DBoW2/build/ /home/zq/catkin_ws/src/DBoW2/build/

Terminal output:

Usage:
./convert_orb_vocab INPUT_TYPE:(txt|bin) OUTPUT_TYPE:(txt|bin) INPUT_FILEPATH OUTPUT_FILEPATH

Is this a question of command format? What is the correct command format?
Or something else went wrong?

@saweer
Copy link
Contributor

saweer commented Sep 26, 2019

@ZQxiaoshi
Try this:

./convert_orb_vocab txt bin /path/to/Myvoc.txt /path/to/OUT.bin

You may also create a vocabulary in binary format with DBoW2::TemplatedVocabulary::saveToBinaryFile method.
https://github.com/shinsumicco/DBoW2/blob/master/include/DBoW2/TemplatedVocabulary.h#L248

@ZQxiaoshi
Copy link
Author

ZQxiaoshi commented Sep 27, 2019

@saweer
Thank you very much! It works correctly!

@shinsumicco
Copy link
Collaborator

Thanks, @saweer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants