vietanhdev / anylabeling

Effortless AI-assisted data labeling with AI support from YOLO, Segment Anything (SAM+SAM2), MobileSAM!!
https://anylabeling.nrl.ai
GNU General Public License v3.0
2.2k stars 236 forks source link

Crash when loading SAM Model #70

Closed dhunjoshi closed 1 year ago

dhunjoshi commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@dhunjoshi Please try the latest version:

vietanhdev commented 1 year ago

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

vietanhdev commented 1 year ago

From AnyLabeling v0.2.22, to load custom models: