

{'masks': [array([[False, False, False, ,  True,  True,  True],
         [False, False, False, ,  True,  True,  True],
         [False, False, False, ,  True,  True,  True],
         ,
         [False, False, False, , False, False, False],
         [False, False, False, , False, False, False],
         [False, False, False, , False, False, False]]),
  array([[False, False, False, , False, False, False],
         [False, False, False, , False, False, False],
         [False, False, False, , False, False, False],
         ,
'scores': tensor([0.9972, 0.9917,
        ,
}
We can visualize them like this:
thon
import matplotlib.pyplot as plt
plt.imshow(image, cmap='gray')
for i, mask in enumerate(masks["masks"]):
    plt.imshow(mask, cmap='viridis', alpha=0.1, vmin=0, vmax=1)
plt.axis('off')
plt.show()