From 89057b4f2fc24a6ff6a26074025de227eec39014 Mon Sep 17 00:00:00 2001 From: David Chatel Date: Fri, 31 May 2024 12:40:24 +0200 Subject: [PATCH] BiSeNet: ensure tensors are the same type --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 4f6d7ad..e025117 100644 --- a/utils.py +++ b/utils.py @@ -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 = {