Skip to content

Mask-RCNN tutorial one-line change suggestion #960

Open

Description

@morawi

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

Activity

  1. ver2king commented on May 31, 2023

    @ver2king

    /assigntome

  2. ver2king commented on Jun 7, 2023

    @ver2king

    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?

  3. svekars commented on Jun 12, 2023

    @svekars
    Contributor

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

  4. ver2king commented on Jun 12, 2023

    @ver2king

    @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"?

  5. engichang1467 commented on Jan 27, 2024

    @engichang1467

    @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 😊

  6. engichang1467 commented on Jan 27, 2024

    @engichang1467

    /assigntome

  7. morawi commented on Jan 29, 2024

    @morawi
    Author

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    easytorchvisionIssues relating to image/video tutorials

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions