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

Question about CondInst #137

Open
lucasjinreal opened this issue Jul 6, 2020 · 8 comments
Open

Question about CondInst #137

lucasjinreal opened this issue Jul 6, 2020 · 8 comments

Comments

@lucasjinreal
Copy link

From the paper it shows CondInst using FCOS output directly feed into mask head generate mask. While looking into the code, it still using proposals (which compute every coodinates of boxes) then feed into mask head for predict mask.

def _forward_mask_heads_train(self, proposals, mask_feats, gt_instances):
        # prepare the inputs for mask heads
        pred_instances = proposals["instances"]

        if 0 <= self.max_proposals < len(pred_instances):
            inds = torch.randperm(len(pred_instances), device=mask_feats.device).long()
            logger.info("clipping proposals from {} to {}".format(
                len(pred_instances), self.max_proposals
            ))
            pred_instances = pred_instances[inds[:self.max_proposals]]

        pred_instances.mask_head_params = pred_instances.top_feats

        loss_mask = self.mask_head(
            mask_feats, self.mask_branch.out_stride,
            pred_instances, gt_instances
        )

my question is, if using features directly from FCOS outputs, why it necessary wrap it into Instance object which is a list of bboxes?

@lucasjinreal
Copy link
Author

Just saw this:
image

In this case, how to disable detector in code avoid compute precise cooridinates of every ROI?

@tianzhi0549
Copy link
Member

@jinfagang the mask head does not use the boxes in the Instances. We use Instances here just for the simplicity of implementation.

@lucasjinreal
Copy link
Author

lucasjinreal commented Jul 6, 2020

@tianzhi0549 I see.. does it need retrain the model if open DISABLE_REL_COORDS on?

@tianzhi0549
Copy link
Member

Yes, because the number of generated parameters is changed.

@lucasjinreal
Copy link
Author

lucasjinreal commented Jul 6, 2020

@tianzhi0549 Does there any model provided with disable boxes? Hoping to see the model performance without detector for instance segmentation task.

@tianzhi0549
Copy link
Member

@tianzhi0549 The results are reported in Table 3 of our paper. We do not have the model for this implementation.

@lucasjinreal
Copy link
Author

@tianzhi0549 Will u consider update such a model? I think just resnet50 is enough for comparasion. Also, I have one last question, even it can be disable in:

if not self.disable_rel_coords:

It still need a value of:

mask_head_inputs = mask_feats[im_inds].reshape(n_inst, self.in_channels, H * W)  <- how to get n_inst if not compute boxes?

It would be great if you guys can provide just one model without detector!

@tianzhi0549
Copy link
Member

@jinfagang 1) Sorry, we do not have such a plan. 2) The number of instances will be the number of positive locations determined by the classification branch.

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

2 participants