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

Failure to enter SegmentAny3D module #2

Closed
jamesobutler opened this issue Mar 15, 2024 · 1 comment
Closed

Failure to enter SegmentAny3D module #2

jamesobutler opened this issue Mar 15, 2024 · 1 comment
Assignees

Comments

@jamesobutler
Copy link

I'm observing the following traceback upon switching to the SegmentAny3D module. I'm currently using the latest Slicer Preview (5.7.0-2024-03-13) on Windows.

Traceback (most recent call last):
  File "C:/D/SlicerSegmentAny3D/SegmentAny3D/SegmentAny3D.py", line 154, in __init__
    from models.sam import sam_model_registry as sab_model_registry
  File "C:\D\SlicerSegmentAny3D\SegmentAny3D\models\sam\__init__.py", line 7, in <module>
    from .build_sam import (
  File "C:\D\SlicerSegmentAny3D\SegmentAny3D\models\sam\build_sam.py", line 11, in <module>
    from .modeling import (
  File "C:\D\SlicerSegmentAny3D\SegmentAny3D\models\sam\modeling\__init__.py", line 7, in <module>
    from .sam import Sam
  File "C:\D\SlicerSegmentAny3D\SegmentAny3D\models\sam\modeling\sam.py", line 13, in <module>
    from .image_encoder import ImageEncoderViT
  File "C:\D\SlicerSegmentAny3D\SegmentAny3D\models\sam\modeling\image_encoder.py", line 10, in <module>
    from einops import rearrange
ModuleNotFoundError: No module named 'einops'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/D/SlicerSegmentAny3D/SegmentAny3D/SegmentAny3D.py", line 159, in __init__
    raise RuntimeError("There is a problem about the installation of 'segment-anything' package. Please try again to install!")
RuntimeError: There is a problem about the installation of 'segment-anything' package. Please try again to install!

It appears that in this section that from models.sam import sam_model_registry as sab_model_registry fails because it happens before importing einops.
https://github.com/mazurowski-lab/SlicerSegmentAny3D/blob/e33d0af23ef6d6458a95074b47374a2697582209/SegmentAny3D/SegmentAny3D.py#L153-L157

@Zaferyildiz
Copy link
Member

Thank you for the issue. Problem is solved with the latest commit.

@Zaferyildiz Zaferyildiz self-assigned this Mar 20, 2024
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