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

Crash when loading SAM Model #70

Closed
dhunjoshi opened this issue May 3, 2023 · 4 comments
Closed

Crash when loading SAM Model #70

dhunjoshi opened this issue May 3, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@dhunjoshi
Copy link

Using GTX1650 GPU.

Traceback (most recent call last):
File "D:\anaconda3\envs\anylabeling\lib\site-packages\anylabeling\utils.py", line 15, in run
self.func(*self.args, **self.kwargs)
File "D:\anaconda3\envs\anylabeling\lib\site-packages\anylabeling\services\auto_labeling\model_manager.py", line 151, in _load_model
model_info["model"] = SegmentAnything(
File "D:\anaconda3\envs\anylabeling\lib\site-packages\anylabeling\services\auto_labeling\segment_anything.py", line 74, in init
self.encoder_session = onnxruntime.InferenceSession(
File "D:\anaconda3\envs\anylabeling\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 360, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "D:\anaconda3\envs\anylabeling\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 408, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
RuntimeError: D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1106 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\anaconda3\envs\anylabeling\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"

@web-ho
Copy link

web-ho commented May 4, 2023

Try reinstalling, as mentioned you are using GPU. So, check if you are installing the correct requirements.txt.

If the error didn't resolve check if the specified .dll file is present. Can also look for more info here

@vietanhdev
Copy link
Owner

@dhunjoshi Please try the latest version:

  • For CPU version:
pip install -U anylabeling
  • For GPU version:
pip install -U anylabeling-gpu

Thank you!

@vietanhdev vietanhdev self-assigned this May 4, 2023
@vietanhdev vietanhdev added the bug Something isn't working label May 4, 2023
@vietanhdev
Copy link
Owner

Documentation for GPU support: https://anylabeling.com/docs/gpu.

@vietanhdev
Copy link
Owner

From AnyLabeling v0.2.22, to load custom models:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants