Imported from https://github.com/alexandervakhitov/ORB_SLAM2_SEGO