-
Notifications
You must be signed in to change notification settings - Fork 717
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
GroundingDINO Python Package #88
Comments
Sure, for more convenient usage, we will try to update a pypi version for the users in the future release |
Would like to have this available in PyPI as well for easy installation |
I have added the package to PyPI. Will try to get it on conda-forge as well. I would be happy add maintainers to the package if anyone is interested. PyPI: https://pypi.org/project/groundingdino-py pip install groundingdino-py PS: There are some other packages on PyPI with the name I wanted to add groundingdino to PyPI for the downstream package segment-geospatial |
@giswqs - looks like that strips out the CUDA stuff so only runs on CPU (but with no warning); is that correct? |
@yeldarby I think it can still utilize GPU. The GPU installation is handled by torch-gpu, so GroundingDINO does not have to handle it. I learned it from @darshats at #8 and his repo main...darshats:GroundingDINO:main I have been using GroundingDINO with the samgeo-geospatial package. It seems working fine. https://samgeo.gishub.org/examples/text_prompts/ |
GroundingDINO has these custom C++ and CUDA files: https://github.com/IDEA-Research/GroundingDINO/tree/main/groundingdino/models/GroundingDINO/csrc Are the compiled versions of those not needed to run with GPU? |
It failed to compile on my Linux machine with the latest cuda, and that's why I had to remove those cuda stuff from GroundingDINO. After that, the installation went smoothly, and I was able to use it with SAM. It is pretty fast. See the example below. However, I am not sure it GroundingDINO uses GPU or not in this case as I am not a GroundingDINO expert. It would be great if GroundingDINO can make the installation a bit more smooth. There are many installation related issues reported here, and I spent hours trying to install it. 03-text-prompt.mp4 |
Definitely agree! I've been trying to get generic wheels to build linked to various versions of PyTorch and CUDA with I posted a bounty on Replit as a bit of an incentive if anyone wants to make the install more robust! https://replit.com/bounties/@roboflow/package-open-source |
As a followup, I ran a benchmark:
So the GPU acceleration definitely makes a big difference (& the fork appears to be running mostly on GPU). That's probably good enough for my purposes! Besides the 15% slowdown, the only downside is needing to restart the runtime after installing due to Do users have to supply their own |
@yeldarby Thanks for sharing the benchmark. It is great to know the pip package does run on GPU. The pip package already includes the config files. The package only removes the cuda stuff to make the installation easier. All other files remain the same as the original GroundingDINO repo. See https://github.com/giswqs/GroundingDINO/tree/main/groundingdino/config |
Thanks a lot for providing the pip package @giswqs. Even I faced a lot of issues while trying to compile/install this package on my remote machine. This pip package seems to work properly. Can the authors @rentainhe @SlongLiu update this pip installation in the README? |
If anyone wants to be the maintainer of the pypi package, please let me know. I would be happy to add maintainers or transfer the ownership. |
Sure! Thank you so much for providing this!!! We will highlight it in README and Pin this Issue, you can refine the issue name to let more people know this update~ |
|
Sorry for the above comment and confusion..., I verified with inference and it seems to be working fine. I was running the code from wrong directory so it was trying to get the modules not from the pypi package but from the current directory instead. So to confirm, the above pypi package seems to work even with GPU. Thank you again @giswqs |
I have added groundingdino to conda-forge. It can be easily installed with conda. Let me know if anyone is interested in becoming a maintainer of the conda-forge package. mamba install -c conda-forge groundingdino-py |
this saved me, thank u |
Hi and thanks for providing Grounding Dino as a pip package @giswqs ! I compared the inference output of the original repo with the output of the package, and it doesn't seem to be the same. For label inference both the original repo and the pip package give the same result, nevertheless the pip package seems to have issues with sentence prompts. Does anyone else encountered this issue? Cheers, M |
Can you provide some specific examples for better analysis? |
how to install or use on arm64? |
Hi, thanks for the great work! Is there a plan for the official pypi release?
The text was updated successfully, but these errors were encountered: