I have been following this official guide https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html 13  and would like to visualise bboxes and ground truth mask. How can I do that?
Target looks this way:
{‘boxes’: tensor([[849., 525., 959., 635.],
[581., 659., 737., 867.],
[890., 734., 959., 813.],
[632., 839., 855., 945.]]),
‘labels’: tensor([1, 1, 1, 1]),
‘masks’: tensor([[[0, 0, 0,  …, 0, 0, 0],
[0, 0, 0,  …, 0, 0, 0],
[0, 0, 0,  …, 0, 0, 0],
…,
[0, 0, 0,  …, 0, 0, 0],
[0, 0, 0,  …, 0, 0, 0],
[0, 0, 0,  …, 0, 0, 0]],
     [[0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      ...,
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0]],

     [[0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      ...,
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0]],

     [[0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      ...,
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0],
      [0, 0, 0,  ..., 0, 0, 0]]], dtype=torch.uint8),

‘image_id’: tensor([1]),
‘area’: tensor([12100., 32448.,  5451., 23638.]),
‘iscrowd’: tensor([0, 0, 0, 0])}
I would like to get something like this:

image.jpg906×438 168 KB