syp2ysy / VRP-SAM

[CVPR 2024] Official implementation of "VRP-SAM: SAM with Visual Reference Prompt"
MIT License
94 stars 10 forks source link

Reproducing Paper's Result #9

Closed yolandalalala closed 1 month ago

yolandalalala commented 5 months ago

Thanks for proposing this useful and innovative method! This is a very inspiring and impressive work.

I'm trying to reproduce the results presented in the paper. However, I'm only able to train the VRPSAM on vgg16 because the resnet50 I downloaded from 'https://download.pytorch.org/models/resnet50-19c8e357.pth' has a size mismatch error with the code. I saw in your code, you loaded: https://github.com/syp2ysy/VRP-SAM/blob/0711bbb31a74062a153c69ba62cb24b71eaece46/model/base/resnet.py#L321 However, it seems to have a different name than the path at line 16 of resnet.py https://github.com/syp2ysy/VRP-SAM/blob/0711bbb31a74062a153c69ba62cb24b71eaece46/model/base/resnet.py#L16

Could you please kindly provide the download link of resnet101_v2.pth? Thank you so much!

Given the one-shot results I got with vgg16 on COCO-20 fold 0, no matter which prompt type I used, they all seems worse than the result you presented in the paper, miou 43.6. Here is what I got: Point, 28.09 Scribble, 33.43 Box, 35.84 Mask, 38.71

The parameter I used is at below: bsz: 100 lr: 0.0001 weight_decay: 1e-06 epochs: 50 nworker: 8 seed: 321 fold: 0 use_ignore: True num_query: 50 backbone: vgg16

Do you have any idea about what happened here? Thank you so much for answering!

Qiang-Z commented 5 months ago

我也遇到用到了同样的问题,作者用的Resnet50_v2模型,不是Resnet50, 在网上找到相关模型的权重:https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v (I've encountered the same problem as well; the author used the Resnet50_v2 model, not Resnet50. I found the relevant model weights online: https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v.)

yolandalalala commented 5 months ago

我也遇到用到了同样的问题,作者用的Resnet50_v2模型,不是Resnet50, 在网上找到相关模型的权重:https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v (I've encountered the same problem as well; the author used the Resnet50_v2 model, not Resnet50. I found the relevant model weights online: https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v.)

Thanks so much for sharing that! Have you tried to reproduce the paper’s result with resnet50? How does it go?

Qiang-Z commented 5 months ago

我也遇到用到了同样的问题,作者用的Resnet50_v2模型,不是Resnet50, 在网上找到相关模型的权重:https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v (I've encountered the same problem as well; the author used the Resnet50_v2 model, not Resnet50. I found the relevant model weights online: https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v.)

Thanks so much for sharing that! Have you tried to reproduce the paper’s result with resnet50? How does it go?

I'm currently training the model and writing inference code, but I've been busy with other things recently. If you've tested any relevant results, I welcome your sharing.

yolandalalala commented 5 months ago

我也遇到用到了同样的问题,作者用的Resnet50_v2模型,不是Resnet50, 在网上找到相关模型的权重:https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v (I've encountered the same problem as well; the author used the Resnet50_v2 model, not Resnet50. I found the relevant model weights online: https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v.)

Thanks so much for sharing that! Have you tried to reproduce the paper’s result with resnet50? How does it go?

I'm currently training the model and writing inference code, but I've been busy with other things recently. If you've tested any relevant results, I welcome your sharing.

If I understand the code correctly, I thought the inference code is already provided in the repo at here https://github.com/syp2ysy/VRP-SAM/blob/0711bbb31a74062a153c69ba62cb24b71eaece46/common/evaluation.py#L5

Also in the dataloader, you can set the split to 'val' and it will evaluate the validation set accordingly. Using that inference code, I got the following result on F-0: Point, 29.21 Scribble, 44.96 Box, 40.41 Mask, 43.63

This result is also slightly different than the result presented in Table 1 of the paper.

zzz123123123123 commented 4 months ago

我也遇到用到了同样的问题,作者用的Resnet50_v2模型,不是Resnet50, 在网上找到相关模型的权重:https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v (我也遇到过同样的问题;作者使用的是Resnet50_v2模型,而不是 Resnet50。我在网上找到了相关的模型权重:https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v。

非常感谢您的分享!您是否尝试过使用 resnet50 重现论文的结果?进展如何?

我目前正在训练模型和编写推理代码,但我最近一直在忙于其他事情。如果您已经测试了任何相关结果,我欢迎您分享。

I would venture to ask, are you training models and inference code, and how are you going?

JoshMSmith44 commented 3 months ago

I also got lower validation mIoU when running training with the Resnet_v2 weight. My best epoch got 44.09 which is quite similar to results posted here. Only difference was I ran with bsz=8 because I only had a single GPU. Ran with same hyperparameters otherwise including 50 epochs. Used ViT-H as well. @syp2ysy

zzz123123123123 commented 3 months ago

在用Resnet_v2重量进行训练时,我也得到了较低的验证 mIoU。我的最佳纪元是 44.09,这与此处发布的结果非常相似。唯一的区别是我使用 bsz=8 运行,因为我只有一个 GPU。使用相同的超参数运行,否则包括 50 个 epoch。也使用了ViT-H。

I take the liberty to ask, how does the model you trained perform inference tests, have you already written the inference code, and if so, can you share it, thank you very much.@JoshMSmith44

JoshMSmith44 commented 3 months ago

I was reporting the validation mIOU from the training script.

dbsdmlgus50 commented 1 month ago

@yolandalalala @JoshMSmith44 Hello, did the performance written in the paper come out? Also, is the performance you mentioned the validation performance that comes out by turning the train code?