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

ModuleNotFoundError: No module named 'sam2' #299

Closed
2 tasks done
eddy961206 opened this issue Aug 6, 2024 · 3 comments
Closed
2 tasks done

ModuleNotFoundError: No module named 'sam2' #299

eddy961206 opened this issue Aug 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@eddy961206
Copy link

Search before asking

  • I have searched the Roboflow Notebooks issues and found no similar bug report.

Notebook name

grounded-sam-2-auto-label.ipynb

Bug

I didn't modify 'grounded-sam-2-auto-label.ipynb'.

When I execute
'from autodistill_grounded_sam_2 import GroundedSAM2'
cell,

I get an error like this :


ModuleNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from autodistill_grounded_sam_2 import GroundedSAM2

2 frames
/usr/local/lib/python3.10/dist-packages/autodistill_grounded_sam_2/helpers.py in load_SAM()
77 urllib.request.urlretrieve(url, SAM_CHECKPOINT_PATH)
78
---> 79 from sam2.build_sam import build_sam2
80 from sam2.sam2_image_predictor import SAM2ImagePredictor
81

ModuleNotFoundError: No module named 'sam2'

I exectued 'pip install git+https://github.com/autodistill/autodistill-grounded-sam-2 rf_groundingdino -q' this cell before. but I can't find why it can't find module named 'sam2'.

Environment

  • Google Colab
  • Window

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@eddy961206 eddy961206 added the bug Something isn't working label Aug 6, 2024
@SkalskiP
Copy link
Collaborator

SkalskiP commented Aug 6, 2024

Hi @capjamesg 👋🏻 could you take a look at this?

@capjamesg
Copy link
Collaborator

@eddy961206 I have just pushed a fix to the autodistill-grounded-sam-2 package. This issue should now be fixed. Can you try to run the notebook again?

Please note that installation may take several minutes as SAM 2 is a large package that takes a while to build in development environments.

@eddy961206
Copy link
Author

@capjamesg It works perfectly. Thanks for your great work!!!

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