Skip to content
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

Failed to build Superpoint engine. #174

Open
antithing opened this issue Nov 29, 2024 · 11 comments
Open

Failed to build Superpoint engine. #174

antithing opened this issue Nov 29, 2024 · 11 comments

Comments

@antithing
Copy link

Hi, and thank you for this code! I am compiling on Windows, with CUDA 12.1, TensorRT 8.6, and a RTX 4090 GPU.

When running the test_features application, I get

Error in SuperPoint building triggered here:

std::cout << "Error in SuperPoint building" << std::endl;

Digging in more, this errors at:

auto builder = TensorRTUniquePtr<nvinfer1::IBuilder>(nvinfer1::createInferBuilder(gLogger.getTRTLogger()));

What could this problem be?

I have tried upgrading to TensorRT 10, but I get a lot of compile errors.

Thanks!

@xukuanHIT
Copy link
Collaborator

Hello, I haven't developed programs on Windows before. The provided source code relies on APIs from libraries used on Ubuntu, and I'm not sure if they work the same way on Windows.

@antithing
Copy link
Author

Hi, it actually seems to be related to the 40 series GPU. (I am on a 4090). I think these cards require tensorrt 10.

Is that possible?

@xukuanHIT
Copy link
Collaborator

I have tested it on a 4080, and TensorRT 8.6 works properly.

@antithing
Copy link
Author

Strange. I wonder if it's a windows thing. With airvo I had no issues building on windows

@antithing
Copy link
Author

Okay @xukuanHIT i rebuilt everything and the engine is built! Yay!

Now I have a new crash.

Running the test feature application, the code crashes here:

host_data_buffer[row_shift + col] = float(ptr[0]) / 255.0;

If I comment out that line, it passes the function, if I leave it in, it crashes. I am using teh euroc dataset, everything default. What might be happening here?

Thanks again!

@antithing
Copy link
Author

AH there was a problem with my windows conversion. I have test feature running now! Next step: visual odometry!

@antithing
Copy link
Author

Hi again, I have visual odometry running great, however when i run map refine, or relocation, I have a crash on loading the vocabulary file.


void Database::LoadVocabulary(const std::string voc_path){
  SuperpointVocabulary voc_load;
  std::cout << "loading voc: " << voc_path << std::endl;
  std::ifstream ifs(voc_path, std::ios::binary);
  //crashes below
  boost::archive::binary_iarchive ia(ifs);
  ia >> voc_load;


  _voc = std::make_shared<SuperpointVocabulary>(voc_load);
  
  if(_inverted_file.empty()){
    _inverted_file.resize(_voc->size());
  }
}

What version of boost should I be using? Can you think of anything that might cause this?

Thank you.

@xukuanHIT
Copy link
Collaborator

@antithing Hi, we use boost 1.71.0 on ubuntu. Can you confirm if the dictionary path is correct?

@antithing
Copy link
Author

antithing commented Dec 13, 2024

Hi, yes the path is correct, i am actually hardcoding it just before the boost::archive::binary_iarchive ia(ifs); line to debug.
It seems to be an issue with the actual bin file, could this be a Linux->Windows thing?

Is the dbow superpoint training code included here? I can try training the vocabulary again perhaps

@xukuanHIT
Copy link
Collaborator

@antithing Hi, you can refer to and modify this code to train the dictionary.

@antithing
Copy link
Author

Thank you! What dataset did you train your dictionary on?

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

No branches or pull requests

2 participants