-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Hi @ppwwyyxx ,
====Some background:====
I am able to run a pre-trained model on any input image to get mask predictions as well as the bounding boxes. I have set my model in eval mode, as required.
In doing so, I also display the output of my model as below:
output = model([inputs])
print('output instances are:', output[0]['instances'])
This gives me 7 class predictions for different objects in my image, i.e, num_instances = 7.
So far so good.
====My question:====
I am also getting the mask features from the same pre-trained model used above, using the following code:
features = model.backbone(images.tensor)
proposals, _ = model.proposal_generator(images, features)
instances, _ = model.roi_heads(images, features, proposals)
(I have omitted the required two lines to get mask features for brevity.)
The num_instances here is 5, which is different from when I run the model without any incisions, as described earlier (it was 7 there).
I am curious to know why this inconsistency.
Can you clarify? Thanks.