IDEA-Research / Grounded-Segment-Anything

Grounded SAM: Marrying Grounding DINO with Segment Anything & Stable Diffusion & Recognize Anything - Automatically Detect , Segment and Generate Anything
https://arxiv.org/abs/2401.14159
Apache License 2.0
14.85k stars 1.37k forks source link

How to do parameter update in grounded_sam_demo.py #398

Open 3D3C opened 10 months ago

3D3C commented 10 months ago

Hi author, in grounded_sam_demo.py there are only text prompts, I added a mask prompt so I need to retrain the parameters, but I still have no parameter update after removing the parameter freeze code in SamPredictor. So I would like to ask if grounded_sam_demo.py can do parameter updates or do I need to rewrite a fine-tuning code myself?

rentainhe commented 10 months ago

You can try to use the open-sourced Grounding-DINO training code as https://github.com/IDEA-Research/GroundingDINO/issues/241 to finetune grounding-dino on your own dataset and replace the original weights of G-DINO in Grounded-SAM to get a better result