Spaces:
Runtime error
Runtime error
2424
Browse files- visualization.py +2 -1
visualization.py
CHANGED
@@ -55,7 +55,8 @@ def vis(args,input_img=None,id=294,return_img=False):
|
|
55 |
|
56 |
if args.frozen_weights is not None:
|
57 |
print("Freeze weights for detector")
|
58 |
-
|
|
|
59 |
device = torch.device(args.device)
|
60 |
|
61 |
# fix the seed for reproducibility
|
|
|
55 |
|
56 |
if args.frozen_weights is not None:
|
57 |
print("Freeze weights for detector")
|
58 |
+
if not torch.cuda.is_available():
|
59 |
+
args.device = 'cpu'
|
60 |
device = torch.device(args.device)
|
61 |
|
62 |
# fix the seed for reproducibility
|