-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added binary version of vocabulary to speedup ORB_SLAM2 start #21
base: master
Are you sure you want to change the base?
Conversation
If you ever had weird results with this code for few observations, here is why...
RANSAC subset sampling bug fix
This works extremely nice straight out of the box! From a loading time of 20.8 sec to 0.48 sec on my 5 year old really slow AMD A6-3410MX. Thanks a bunch, makes testing much more fun! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works straight away and changed loading time from 20 sec to 0.5 sec!
You're very welcome. You make the that time i spend preparing the patch On Fri, Sep 16, 2016 at 6:07 PM, Joel Harsten [email protected]
|
Hi @poine , |
@thanabadee Blsc It is difficult to answer your question. Framerate depends on the If you are concerned about miniaturization and power consumption, i would If power consumption is not critical to your application, i would suggest Hth Poine On Thu, Oct 6, 2016 at 6:52 PM, Thanabadee Blsc [email protected]
|
@poine Did you try with localization-only mode on XU4? Or was it with mapping + loop-closing? |
added binary version of vocabulary to speedup ORB_SLAM2 start
This method is from raulmur#21. But it hasn't been accepted and now the branch has conflicts. So I change the code manually.
added binary version of vocabulary to speedup ORB_SLAM2 start (4122702) For Windows 8.1, Visual Studio 2017 : Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h rest works perfect, many thanks ! (0.45sec to load ORBvoc.bin) |
i am a new, i do not know how to convert, the line which your added is what, thank you. |
i'm not an expert but if you managed to get orb to work you should know what i write about next, otherwise it's useless.
hope i could help you |
Changelog: - Implemented binary ORB Vocabulary from ORBSLAM pull 21 raulmur#21 - Added load and save binary functions to TemplatedVocabulary.h - Added bin_vocabulary.cc which converts vocabulary to binary - Edited System.cc to use new binary load/save methods - Edited CMakeLists, build.sh, .gitnore to reflect changes in build files - ORBSLAM loading times have been significantly increased - Requires reubuild of all ORBSLAM code to implement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked the file changes with the vanilla version of ORB_SLAM2 on:
Ubuntu 18.04,
CMAKE 3.10.2,
g++7.4.0.
The solution works as expected.
After adding the code I completely rebuilt the 'ORB_SLAM2' project , yet the ORBvoc.bin was nowhere to find. |
Disclaimer: I don't intend to create spam. If the ORB_SLAM2 developers wish me to stop posting, I will cease immediately. ORB_SLAM2 seems to be inactive, but there are a number of community patches, including yours, which provide important bugfixes or improvements. Therefore I have created a new project ORB_SLAM_COMMUNITY (https://github.com/jeremysalwen/ORB_SLAM_COMMUNITY) to gather together these improvements and continue active development. I have already merged this PR in the ORB_SLAM_COMMUNITY version. We would welcome any other contributions you might have. |
Import patches from openrealm version to here. Original patches seem to be from user poine in PR raulmur/ORB_SLAM2#21. Thus added as author attribution.
I am a noob at both C++ and git, so please be forgiving.
This is a patch to speedup ORB-SLAM2 startup by loading the vocabulary from a binary file instead of ascii.
I tested it on linux on an intel I7 and an arm Exynos5422 (odroid xu4)
ascii | binary
I7 12.06s | 0.2s
arm 77s | 1s
(ORB_SLAM2 was just not usable on the arm with a startup duration of 77s)
I added a line to build.sh to convert Vocabulary/ORBvoc.txt to Vocabulary/ORBvoc.bin
ORB_SLAM2 uses file extension to choose between ascii and binary.
Test with
./Examples/Monocular/mono_tum Vocabulary/ORBvoc.bin Examples/Monocular/TUM1.yaml /data/tum/rgbd_dataset_freiburg1_xyz/
versus
./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml /data/tum/rgbd_dataset_freiburg1_xyz/
Regards
Poine