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.27k stars 240 forks source link

The software crashes when loading the model #185

Open lonelywanderer8 opened 1 month ago

lonelywanderer8 commented 1 month ago

I encountered a software crash while loading the SAM model. Error message: Traceback (most recent call last): File "D:\anaconda\envs\anylabelme\lib\site-packages\anylabeling\utils.py", line 15, in run self.func(*self.args, **self.kwargs) File "D:\anaconda\envs\anylabelme\lib\site-packages\anylabeling\services\auto_labeling\model_manager.py", line 438, in _load_model from .segment_anything import SegmentAnything File "D:\anaconda\envs\anylabelme\lib\site-packages\anylabeling\services\auto_labeling\segment_anything.py", line 20, in from .sam2_onnx import SegmentAnything2ONNX File "D:\anaconda\envs\anylabelme\lib\site-packages\anylabeling\services\auto_labeling\sam2_onnx.py", line 11, in class SegmentAnything2ONNX: File "D:\anaconda\envs\anylabelme\lib\site-packages\anylabeling\services\auto_labeling\sam2_onnx.py", line 20, in SegmentAnything2ONNX def encode(self, cv_image: np.ndarray) -> list[np.ndarray]: TypeError: 'type' object is not subscriptable

pinnintipraneethkumar commented 1 month ago

which python version you are using? if you are using python 3.8 and earlier please upgarde to python3.9 or later and try.

zhoujialos commented 1 month ago

I also encountered a software crash while loading the SAM model. My python version is python3.12