Git Product home page Git Product logo

Comments (7)

nicholasjprimianomd avatar nicholasjprimianomd commented on June 10, 2024

I see two main issues:

  1. "/content/Open-GroundingDino/models/GroundingDINO/ms_deform_attn.py:31: UserWarning: Failed to load custom C++ ops. Running on CPU mode Only!
    warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!")"

  2. "NameError: name '_C' is not defined" which is possibly related to a cuda issue per the official grounding dino github

from open-groundingdino.

BIGBALLON avatar BIGBALLON commented on June 10, 2024

I see two main issues:

  1. "/content/Open-GroundingDino/models/GroundingDINO/ms_deform_attn.py:31: UserWarning: Failed to load custom C++ ops. Running on CPU mode Only!
    warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!")"
  2. "NameError: name '_C' is not defined" which is possibly related to a cuda issue per the official grounding dino github

Hi, @nicholasprimiano

  • I think this may be caused by the CUDA operator not being compiled correctly.
  • Is it possible to compile the operator before executing it in colab?
  • #7

from open-groundingdino.

BIGBALLON avatar BIGBALLON commented on June 10, 2024

This PR fixed this issue

#10

from open-groundingdino.

lanhas avatar lanhas commented on June 10, 2024

For the following problems:
1. UserWarning: Failed to load custom C++ ops. Running on CPU mode Only!
2."NameError: name '_C' is not defined"
I solved this by installing groundingdino-0.1.0 via the official code for Grounding-DINO.

I found that "ms_deform_attn.py" contains "from groundingdino import_C ", but groundingdino is not installed.

from open-groundingdino.

BIGBALLON avatar BIGBALLON commented on June 10, 2024

@lanhas

I found that "ms_deform_attn.py" contains "from groundingdino import_C ", but groundingdino is not installed.

This PR fixed your issue #10 by change
"from groundingdino import_C " to "import MultiScaleDeformableAttention as _C"

from open-groundingdino.

lanhas avatar lanhas commented on June 10, 2024

@lanhas

I found that "ms_deform_attn.py" contains "from groundingdino import_C ", but groundingdino is not installed.

This PR fixed your issue #10 by change "from groundingdino import_C " to "import MultiScaleDeformableAttention as _C"

Oops, you updated the code of "ms_deform_attn.py", I still use the previous version.

from open-groundingdino.

BIGBALLON avatar BIGBALLON commented on June 10, 2024

@lanhas aha, please check the latest code, most of the bugs have been fixed

  • models/GroundingDINO/ms_deform_attn.py: fixed ops error.
  • models/GroundingDINO/ops/test.py: do not test for large channles
  • main.py: add args to make eval not required training dataset
  • requirements.txt: update version
  • test_dist.sh: add test with torch.distributed.launch
  • README.md: update spec and slurm/dist usage

from open-groundingdino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.