uni-medical / SAM-Med3D

SAM-Med3D: An Efficient General-purpose Promptable Segmentation Model for 3D Volumetric Medical Image
Apache License 2.0
427 stars 56 forks source link

修复更改checkpiont参数无法读取的问题 #45

Closed adrianzzk closed 3 months ago

adrianzzk commented 4 months ago

我发现在更改checkpoint的路径后并不能读取到pth文件,发现源代码里

self.init_checkpoint(join(self.args.work_dir, self.args.task_name, 'sam_model_latest.pth'))

读取到的是工作目录里面最新的pth,于是作了以下更改:

self.init_checkpoint(self.args.checkpoint)
blueyo0 commented 3 months ago

Hi, this issue is fixed in commit 3a4036c37d1eb988de3b7d2e826bef870f2b7cf5.

FYI, 事实上我本地一直用的是fix提交的这一版本,忘记push上来了,光顾着改readme,没有仔细review代码,抱歉影响使用 🥲 。