Giter Site home page Giter Site logo

Comments (2)

Asad-Ismail avatar Asad-Ismail commented on August 26, 2024

Hi @tarunsk1998 thank you for pointing it out should be fixed now see this commit
757928c#r138678714

from grounding-dino-finetuning.

tarunsk1998 avatar tarunsk1998 commented on August 26, 2024

Hi @Asad-Ismail,

I tried the latest code, but faced a follow up issue while running the test.py file.

The below is the error,
C:\venv\lib\site-packages\transformers\modeling_utils.py:993: FutureWarning: The device argument is deprecated and will be removed in v5 of Transformers.
warnings.warn(
Traceback (most recent call last):
File "C:\Grounding-Dino-FineTuning\test.py", line 124, in
process_video(model_weights=model_weights, model_config=model_config,
File "C:\Grounding-Dino-FineTuning\test.py", line 90, in process_video
boxes, logits, phrases = predict(
File "C:\Grounding-Dino-FineTuning\groundingdino\util\inference.py", line 76, in predict
outputs = model(image[None], captions=[caption])
File "C:\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Grounding-Dino-FineTuning\groundingdino\models\GroundingDINO\groundingdino.py", line 303, in forward
self.set_image_tensor(samples)
File "C:\Grounding-Dino-FineTuning\groundingdino\models\GroundingDINO\groundingdino.py", line 212, in set_image_tensor
self.features, self.poss = self.backbone(samples)
File "C:\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Grounding-Dino-FineTuning\groundingdino\models\GroundingDINO\backbone\backbone.py", line 151, in forward
xs = self0
File "C:\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Grounding-Dino-FineTuning\groundingdino\models\GroundingDINO\backbone\swin_transformer.py", line 716, in forward
x = self.patch_embed(x)
File "C:\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Grounding-Dino-FineTuning\groundingdino\models\GroundingDINO\backbone\swin_transformer.py", line 491, in forward
x = self.proj(x) # B C Wh Ww
File "C:\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\venv\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "C:\venv\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (unsigned char) and bias type (float) should be the same

Let me know if this is a known issue and how I can rectified this issue.

from grounding-dino-finetuning.

Related Issues (2)

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.