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

Confused about the number of classes when segmenting with Mask2Former #298

Open
AndreiMihalea opened this issue Jun 8, 2024 · 0 comments

Comments

@AndreiMihalea
Copy link

Hello,

As I see in the file InternImage/segmentation/mmseg_custom/models/decode_heads /mask2former_head.py, there is this line:

self.cls_embed = nn.Linear(feat_channels, self.num_classes + 1)

I am wondering why the +1 is there. As far as I've understood, it's for the background class. But what if my dataset already has a background class? Should I ignore it in the ToMask transform?

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

1 participant