Skip to content

Conversation

@hmk114
Copy link
Contributor

@hmk114 hmk114 commented May 25, 2025

The original docstring of MaskRCNN class says the returned mask is a UInt8Tensor in inference mode, which is not true. This can be verified by the following code:

import torch
from torchvision.models.detection import maskrcnn_resnet50_fpn_v2

model = maskrcnn_resnet50_fpn_v2()
model.eval()

with torch.no_grad():
    output = model([torch.randn(3, 100, 100)])

print(output[0]["masks"].dtype) # torch.float32

@pytorch-bot
Copy link

pytorch-bot bot commented May 25, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9083

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

Hi @hmk114!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hmk114

@NicolasHug NicolasHug merged commit 72b9d62 into pytorch:main May 29, 2025
1 check passed
@github-actions
Copy link

Hey @NicolasHug!

You merged this PR, but no labels were added.
The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

@hmk114 hmk114 deleted the patch-1 branch May 29, 2025 13:19
facebook-github-bot pushed a commit that referenced this pull request Jul 30, 2025
Summary: Co-authored-by: Nicolas Hug <[email protected]>

Reviewed By: AntoineSimoulin

Differential Revision: D79175056

fbshipit-source-id: 7b1394d3dccbefcb047fd2427ce0fb46955826c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants