We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
draw_bounding_boxes
1 parent 237e0b4 commit 582d12aCopy full SHA for 582d12a
torchvision/utils.py
@@ -189,7 +189,7 @@ def draw_bounding_boxes(
189
if image.size(0) == 1:
190
image = torch.tile(image, (3, 1, 1))
191
192
- ndarr = image.permute(1, 2, 0).numpy()
+ ndarr = image.permute(1, 2, 0).cpu().numpy()
193
img_to_draw = Image.fromarray(ndarr)
194
195
img_boxes = boxes.to(torch.int64).tolist()
0 commit comments