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

Is this already working? #1

Open
nikste opened this issue Aug 3, 2024 · 4 comments
Open

Is this already working? #1

nikste opened this issue Aug 3, 2024 · 4 comments

Comments

@nikste
Copy link

nikste commented Aug 3, 2024

Hi!
is this already in a usable state?
I've installed it with
pip3 install autodistill-grounded-sam-2 autodistill-yolov8
trying the sample code from the readme results in:

    from autodistill_grounded_sam_2 import GroundedSAM2
  File "autodistill-grounded-sam-2/autodistill_grounded_sam_2/__init__.py", line 1, in <module>
    from autodistill_grounded_sam_2.grounded_sam_2 import GroundedSAM2
  File "autodistill-grounded-sam-2/autodistill_grounded_sam_2/grounded_sam_2.py", line 16, in <module>
    from autodistill_grounded_sam_2.helpers import load_SAM, load_grounding_dino, combine_detections
  File "autodistill-grounded-sam-2/autodistill_grounded_sam_2/helpers.py", line 5, in <module>
    from groundingdino.util.inference import Model
ModuleNotFoundError: No module named 'groundingdino'

did i go wrong somewhere?

@HaneeshMekala
Copy link

pip3 install autodistill-grounding-dino

Try this

@capjamesg
Copy link
Member

Hello there! We are working on a new release with a bug fix for this. The fix is already available on the main branch of this repository, and should thus be installable with:

pip install git+https://github.com/autodistill/autodistill-grounded-sam-2

Let me know if this doesn't work, or if you run into any more issues.

@jaimecorton
Copy link

jaimecorton commented Aug 5, 2024

Hello guys!

I am trying to pip install autodistill-grounded-sam-2 into my venv (Pip version 24.2. Python 3.9.13 on VSCode) through py -m pip install autodistill-grounded-sam-2 and I am getting a build wheel error because of ModuleNotFoundError: No module named 'torch'. Running a quick pip freeze I can see that I have torch installed already:

  • torch==2.1.0+cu121
  • torchaudio==2.3.0+cu121
  • torchvision==0.16.0+cu121
This is the full console message:

 Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "Env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "Env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "Env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "\Temp\pip-build-env-gf3d792_\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "\Temp\pip-build-env-gf3d792_\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires    
          self.run_setup()
        File "\Temp\pip-build-env-gf3d792_\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "\Temp\pip-build-env-gf3d792_\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 21, in <module>
      ModuleNotFoundError: No module named 'torch'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Is there something I might be missing? Thank you in advance!

Jaime

@walternat1ve
Copy link

walternat1ve commented Aug 21, 2024

@jaimecorton whenever you get such an error (and you get plenty of those in this installation process) you just try to install the dependency manually. in this case is would be: python -m pip install torch
afterwards you try the installation process again and it should work if not another dependency is missing for some reason.

i have the feeling this hasnt been tested in a clean environment.

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

5 participants