Skip to content

Mask-RCNN tutorial one-line change suggestion #960

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

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