BiSeNet: ensure tensors are the same type

This commit is contained in:
David Chatel
2024-05-31 12:40:24 +02:00
parent 6c665979cb
commit 89057b4f2f
+1 -1
View File
@@ -180,7 +180,7 @@ def mask_BiSeNet(crop,
model_path = os.path.join(models_dir, 'bisenet', '79999_iter.pth')
bisenet.load_state_dict(torch.load(model_path))
bisenet.eval()
crop_t = crop.permute(0,3,1,2).cuda()
crop_t = crop.permute(0,3,1,2).cuda().float()
segms_t = bisenet(crop_t)[0].argmax(1).float()
dic = {