Skip to content

Mask-RCNN tutorial one-line change suggestion #960

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

Open
morawi opened this issue Apr 21, 2020 · 7 comments
Open

Mask-RCNN tutorial one-line change suggestion #960

morawi opened this issue Apr 21, 2020 · 7 comments
Labels
easy torchvision Issues relating to image/video tutorials

Comments

@morawi
Copy link

morawi commented Apr 21, 2020

I would like to suggest changing the labels in Mask-RCNN tutorial from

labels = torch.ones((num_objs,), dtype=torch.int64)

to the following:

label = torch.as_tensor(obj_ids, dtype=torch.int64)

that will work if there are more than 2 types of object instances (num_objs) in the image. In fact, the new form will give the same exact vector of labels = torch.ones((num_objs,), dtype=torch.int64) and will work for any number of object instances. I have tried it with a dataset containing 60 object instances and all went well.

Kind regards

@holly1238 holly1238 added the torchvision Issues relating to image/video tutorials label Jul 29, 2021
@svekars svekars added easy docathon-h1-2023 A label for the docathon in H1 2023 labels May 31, 2023
@ver2king
Copy link

/assigntome

@ver2king
Copy link

ver2king commented Jun 7, 2023

Regarding this issue,
I only found a .html file when forking the repo that is relevant to the issue. Therefore, I safely assume that I shall fix that .html file?

@svekars
Copy link
Contributor

svekars commented Jun 12, 2023

This unfortunately won't work. We'll give half credit for the PR but it should not be merged.

@ver2king
Copy link

@svekars As you can see from the original issue (#960), that is the only issue that needs to be changed. May you request what needs to be adjusted to "work"?

@svekars svekars removed the docathon-h1-2023 A label for the docathon in H1 2023 label Oct 30, 2023
@engichang1467
Copy link

@svekars and @morawi I'd like to know if this is still an unresolved issue. If so, then I'd like to work on it 😊

@engichang1467
Copy link

/assigntome

@morawi
Copy link
Author

morawi commented Jan 29, 2024

@svekars and @morawi I'd like to know if this is still an unresolved issue. If so, then I'd like to work on it 😊
From what I remember:
I have tried this change with some other datasets, but not the PennFudan dataset. So, it is not working for the PennFudan for a reason.
If @engichang1467 want to give it a try, I suggest trying it with some other datasets, then investigating why is it not working for the PennFudan, as outlined by @svekars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy torchvision Issues relating to image/video tutorials
Projects
None yet
5 participants