finetune-anything icon indicating copy to clipboard operation
finetune-anything copied to clipboard

Fine-tune SAM (Segment Anything Model) for computer vision tasks such as semantic segmentation, matting, detection ... in specific scenarios

Results 30 finetune-anything issues
Sort by recently updated
recently updated
newest added

How can I fine tune the dataset annotated with labelme, which only has images and labels? Thank you.

https://github.com/ziqi-jin/finetune-anything/blob/1e5640d7796b078248b1c24a18ca34c6d834f025/extend_sam/__init__.py#L34C5-L34C18 The default args are not passed into get_scheduler in [train.py](https://github.com/ziqi-jin/finetune-anything/blob/1e5640d7796b078248b1c24a18ca34c6d834f025/train.py#L42) ``` max_epoch=1, n_epochs_init=50, n_epochs_decay=50, ``` As a result, `cosine` and `linear` scheduler does not work properly. `cosine` will oscillate...

最近在尝试使用作者的FA模型来微调SAM,指导遥感图像的语义分割任务。在确定我的数据标注没有任何问题的前提下,FA模型无法成功训练多分类的语义分割任务。通过仔细研究SAM的源码,我发现SAM之所以可以实现无语义输出的全景分割,是因为其自动使用了32x32大小的网格提示点来覆盖整张图像,每一个点都是一个提示,经过embedding后会与特征图进行信息交互,从而获得一个对象掩膜信息;理论上32x32个点提示会输出很多掩膜对象,SAM源码对其进行了各种过滤操作,例如基于阈值过滤、重叠较多的掩膜对象使用NMS再次过滤。 本项目作者提供的SAM微调框架中,作者尝试不使用任何提示来微调SAM的做法我认为是行不通的。此时你的 sparse_prompt_embeddings是一个大小为[1,0,256]的空embedding,将其输入到mask decoder与image embedding交互没有任何意义。尽管作者修改了mask decoder为其增加了语义分割头,但是输出的masks(大小为[1,32,256,256])由于没有提示的信息注入,他无法定位到对象的信息,就算后面再用mlp将32映射到分类个数,也没有意义。因此很难训练。 以上只是我的个人看法,如有不对的地方也欢迎大家随时交流讨论,希望作者能及时关注并回复,谢谢!

感谢大佬非常优秀的工作 当我使用交叉熵loss进行训练时,loss一直不下降,而且mIoU一直是7左右,不知道有没有什么解决办法 ![image](https://github.com/ziqi-jin/finetune-anything/assets/113352745/d088cf8e-8624-4dc8-9909-46ba40478436) Thank you for the compliment. When I train using cross-entropy loss, the loss consistently does not decrease, and the mIoU (mean Intersection over Union) remains around 7....

作者您好,可以编写一个如何使用labelme标注生成的数据集使用该代码库进行微调训练的说明吗?看了很久不是很明白/config里面的yml文件中的dataset配置如何改成自己的数据集的格式

Hi, Can I finetune the model using my own dataset. I have point prompts and binary mask label. please advice thanks

我已经修改了SamRunner里面的在.cuda时候的gpu_id,以及get_model时候的gpu_id,仍然提示我有一部分参数or数据在cuda:0上 我应当如何解决

Thank you very much for the work you provided, but I encountered some difficulties when loading pre-trained models for prediction and outputting visualization results. Will there be any update for...

Hi, will there be a paper for this or other documents describing all the changes made to the original SAM architecture?