You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use a YOLOv5 trained model to provide box prompts to MedSA. However, when I try to load them both in the same script, I run into name collisions. Try 1:
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\contextlib.py", line 137, in __exit__
self.gen.throw(typ, value, traceback)
File "M:\Dev\CXR\.venv\lib\site-packages\torch\hub.py", line 93, in _add_to_sys_path
yield
File "M:\Dev\CXR\.venv\lib\site-packages\torch\hub.py", line 597, in _load_local
model = entry(*args, **kwargs)
File "M:\Dev\CXR\yolov5\hubconf.py", line 88, in custom
return _create(path, autoshape=autoshape, verbose=_verbose, device=device)
File "M:\Dev\CXR\yolov5\hubconf.py", line 34, in _create
from models.common import AutoShape, DetectMultiBackend
ImportError: cannot import name 'AutoShape' from 'models.common' (M:\Dev\CXR\Medical-SAM-Adapter\models\common\__init__.py)
I am trying to use a YOLOv5 trained model to provide box prompts to MedSA. However, when I try to load them both in the same script, I run into name collisions. Try 1:
produces:
Trying to apply advice from this discussion:
produces:
Both YOLOv5 and MedSA have module named
models
. How to avoid this name collision?The text was updated successfully, but these errors were encountered: