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

'std::bad_alloc' Error on Changing Image Dimensions in 'config.yaml' #37

Open
parsahemmasi opened this issue Aug 12, 2024 · 2 comments
Open

Comments

@parsahemmasi
Copy link

Description
When I attempt to change the image_width and image_height values in the config.yaml file from the default 320x240 to any other dimensions, the engine file builds successfully. However, during inference, the following error occurs:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted(core dumped)

Steps to Reproduce

  1. Clone the repository.
  2. Modify the config.yaml file to change image_width and image_height values to something other than 320x240 (e.g., 1280x960).
  3. Run the superpointglue_image with two 1280x960 images as input arguments.

Expected Behavior
The inference should run successfully with the updated image dimensions.

Actual Behavior
The process terminates with a std::bad_alloc error, indicating a memory allocation issue.

Environment

  • OS: Ubuntu 20.04.6 LTS
  • Device: NVIDIA Tegra Orin (nvgpu)/integrated
  • CUDA Version: 11.4.315
  • CUDNN Version: 8.6.0.166
  • TensorRT Version: 8.5.2.2

Additional Context

  • The default 320x240 dimensions work without any issues.
  • It appears that the memory allocation fails when dimensions are altered, which might indicate a problem with the engine's handling of different input sizes.
@vickersmt
Copy link

I think you should modify the size of the dynamic input in superpoint.cpp and superglue.cpp,search"profile->setDimensions"

@parsahemmasi
Copy link
Author

I think you should modify the size of the dynamic input in superpoint.cpp and superglue.cpp,search"profile->setDimensions"

I have tried but this time I got an error about building engine.
Would you please explain more?
And what is your recommended modification for inferencing two 1280x960 images?

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