howerver, the from groundingdino.util.train file does not exit
howerver, the from groundingdino.util.train file does not exit
Can you provide more details, please?
What demo/sample/source code are you referring to?
Which OperatingSystem, which Python version do you use?
How have you set-up your environment? In a Python virtual environment, Cona, or natively? Which versions of the modules have you unstalled, which installation instructions have you followed?
@brmarkus I encountered the same problem. I followed the instructions from both your README and IDEA-Research/GroundingDino. I think the issue may be that GroundingDino has been updated—even on the GroundingDino GitHub page, util.train no longer exists: https://github.com/IDEA-Research/GroundingDINO/blob/main/groundingdino/util/utils.py But I really want to use your method to fine tune GroudningDino. Could you possibly open-source util.train?
Someone might need to find out which commit/branch/tag was the last one working. Referencing dependencies without specifying a version/commit/branch is risky.
There is no file such as train.py in the repo since the first commit.
refer to this https://github.com/IDEA-Research/GroundingDINO/issues/241
this is official response which contain some repos with fine-tuning/training implementation
Looks like you need to follow the blog from https://github.com/spmallick/learnopencv referencing https://learnopencv.com/fine-tuning-grounding-dino/ with:
The above code snippet defines a train function that loads annotations, initializes an Adam optimizer, and iterates over each epoch and image. For every image, it zeroes gradients, calls train_image to compute the loss given image tensors, bounding-box targets, and captions, backpropagates, steps the optimizer, accumulates and logs the loss, and periodically saves the model weights.