Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation detect error: c, mh, mw = protos.shape # CHW AttributeError: 'list' object has no attribute 'shape' #528

Open
bcnbruno opened this issue Jul 2, 2024 · 2 comments

Comments

@bcnbruno
Copy link

bcnbruno commented Jul 2, 2024

          Okay, I think i found a solution for this one. You have to change line where process_mask function is called. So inside segment/predict.py change:
masks = process_mask(proto[i], det[:, 6:], det[:, :4], im.shape[2:], upsample=True) # HWC

into:

masks = process_mask(proto[2].squeeze(0), det[:, 6:], det[:, :4], im.shape[2:], upsample=True)  # HWC

That fixed the problem for me.

Originally posted by @wojhok in #219 (comment)

@bcnbruno bcnbruno closed this as completed Jul 2, 2024
@bcnbruno bcnbruno reopened this Jul 2, 2024
@plutus123
Copy link

plutus123 commented Jul 7, 2024

Thanks it's working fine now

@janelyd
Copy link

janelyd commented Jul 25, 2024

i have tried the Instance Segmentation with yolov9 and i've also faced with the error : AttributeError: 'list' object has no attribute 'shape'.

This solution worked for me after dealing with this issue for hours. Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants