dengxl0520 / MemSAM

[CVPR 2024 Oral] MemSAM: Taming Segment Anything Model for Echocardiography Video Segmentation.
MIT License
121 stars 11 forks source link

test_video.py #15

Open mskim1024 opened 2 months ago

mskim1024 commented 2 months ago

Thank you for sharing this work.

I am currently working on testing the CAMUS dataset using a pre-trained checkpoint (sam_vit_b_01ec64.pth) that I downloaded.

Although I encountered several errors in the uploaded code, I managed to fix them and successfully run it.

However, I couldn’t resolve the error that occurs at the "pred_i[0]" in the "eval_camus" function of "evaluation.py", specifically at the line "med_hd95 = medpy_hd95(pred_i[0], gt_i[0], voxelspacing=spacing)".

Upon checking the data values, it appears that all predicted values are 0, which prevents the calculation of the distance and causes the error.

This issue arises with all test sets, so I am wondering if the shared pre-trained model is not suitable for testing with the CAMUS dataset. If that is the case, which dataset is it suitable for testing?

Additionally, setting up a new environment and testing the uploaded code while fixing any arising errors would make the repository more informative for people who refer to it.

I would appreciate your response to my questions. Thank you.

songWell commented 2 months ago

Hello, sam_vit_b_01ec6 is a model of Segment Anything and needs to be fine-tuned on CMAUS, but the same problem still occurs after I fine-tune it. [#8 ]