Closed EagleAiDi closed 1 year ago
same problem.
I found some possible reason as the code blew: https://github.com/SHI-Labs/Matting-Anything/blob/6d4cd9074a1fc09285f9ecf5270519676b5ee113/gradio_app.py#L43
the seg
argument should be "sam_vit_b" or some other options.
and 'sam_mam_vitb.pth' is missing
same problem.
I found some possible reason as the code blew:
the
seg
argument should be "sam_vit_b" or some other options.and 'sam_mam_vitb.pth' is missing
I have found the download link for the weight file mam_sam_vitb.pth: https://huggingface.co/camenduru/Matting-Anything/resolve/main/mam_sam_vitb.pth.
However, I am still encountering the same problem:
mam_model = networks.get_generator_m2m(seg='sam', m2m='sam_decoder_deep')
Hi, Have you solve this yet?
Hi, Have you solve this yet?
mam_model = networks.get_generator_m2m(seg='sam', m2m='sam_decoder_deep') the seg argument should be "sam_vit_b" Is right.
Hi, Have you solve this yet?
mam_model = networks.get_generator_m2m(seg='sam', m2m='sam_decoder_deep') the seg argument should be "sam_vit_b" Is right.
Thanks to your rely! My problem is because of the code changes. I clone the latest code and use sam_vit_b, it needs the original SAM chackpoint as well according to the new code.
same problem
Hello! Author, thank you for sharing your project. I encountered the following error while running your project: Traceback (most recent call last): File "C:\Users\Dell\Matting-Anything\gradio_app.py", line 43, in
mam_model = networks.get_generator_m2m(seg='sam', m2m='sam_decoder_deep')
File "C:\Users\Dell\Matting-Anything\networks\generator_m2m.py", line 44, in get_generator_m2m
generator = sam_m2m(seg=seg, m2m=m2m)
File "C:\Users\Dell\Matting-Anything\networks\generator_m2m.py", line 26, in init
self.seg_model.eval()
File "D:\Anaconda\envs\mam\lib\site-packages\torch\nn\modules\module.py", line 1614, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'sam_m2m' object has no attribute 'seg_model'
Process finished with exit code 1 I believe there might be an issue with the weights. I downloaded three weights from this link: https://drive.google.com/drive/folders/1Bor2jRE0U-U6PIYaCm6SZY7qu_c1GYfq - mam_vitb.pth, mam_vith.pth, mam_vitl.pth. However, I couldn't find sam_mam_vitb.pth. How can I resolve this error? Thank you!