cv2
Convert a tensor to an image.
pip install opencv-python
import cv2
cv2.imwrite('test.png', bool_tensor.to(torch.int)*255)
Convert a tensor to an image.
pip install opencv-python
import cv2
cv2.imwrite('test.png', bool_tensor.to(torch.int)*255)