Grounded-Segment-Anything icon indicating copy to clipboard operation
Grounded-Segment-Anything copied to clipboard

How to Load a Close-set Fine-tuned Grounding Dino into Grounded SAM

Open narchitect opened this issue 9 months ago • 1 comments

Hello. Following issue #241, I fine-tuned a grounding Dino via mmdetection for a close-set. However, when I try to load these fine-tuned weights into Grounded SAM, it says the model layers are different, and thus, loading fails. I'm curious if there's a way to successfully load a close-set fine-tuned Grounding Dino model into Grounded SAM. It seems it would be highly effective to be able to load the close-set model for downstream tasks. Thanks in advance for your response.

narchitect avatar May 14 '24 12:05 narchitect

Same issue, look at the network defination is slightly different.

rcao-hk avatar May 28 '24 03:05 rcao-hk

Hello, how to solve this problem?

Same issue, look at the network defination is slightly different.

shz0519 avatar Sep 24 '24 03:09 shz0519

Hey @rcao-hk and @shz0519, thanks for your attention, and sorry for the late reply. I’ve resolved the issue by creating new code to perform transfer learning on both models using MMDetection's Grounding DINO and the SAM model. I referenced the Grounded SAM code and modified the bounding box extraction with MMDetection's DINO model.

narchitect avatar Sep 24 '24 14:09 narchitect

Hey @rcao-hk and @shz0519, thanks for your attention, and sorry for the late reply. I’ve resolved the issue by creating new code to perform transfer learning on both models using MMDetection's Grounding DINO and the SAM model. I referenced the Grounded SAM code and modified the bounding box extraction with MMDetection's DINO model.

Thank you for the information. If possible, could you share the method? I am facing the same issue and am struggling with it

yoshi-show1 avatar Oct 17 '24 05:10 yoshi-show1