Open tarunsk1998 opened 8 months ago
Hi @tarunsk1998 thank you for pointing it out should be fixed now see this commit https://github.com/Asad-Ismail/Grounding-Dino-FineTuning/commit/757928cf0c94a55b6290bf92165d84453cf2363f#r138678714
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
Let me know if this is a known issue and how I can rectified this issue.
I followed the document to set the library code. I generated my custom dataset as provided in the sample CSV file.
I used the groundingdino_swint_ogc.pth pre-trained model for the finetuning purpose and its corresponding config file. I ran the train.py provided in this code for training and the new weights were saved in my machine.
However, the issue appeared when I tried to test the model using the test.py file provided in this code. I configured the model path to the generated fine-tuned model while trying to predict a test image.
The Error is as below: File "Grounding-Dino-FineTuning\groundingdino\util\inference.py" in Line number 37: model.load_state_dict(clean_state_dict(checkpoint["model"]), strict=False) KeyError: 'model'
Let me know how this issue can be rectified. Could the train.py script be missing something?