Skip to content

Mask-RCNN tutorial one-line change suggestion #960

Open
@morawi

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

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