Spaces:
Runtime error
Runtime error
Commit
•
9cdf809
1
Parent(s):
d60c9bb
Update kernel_utils.py
Browse files- kernel_utils.py +0 -4
kernel_utils.py
CHANGED
@@ -325,8 +325,6 @@ def predict_on_video(face_extractor, video_path, batch_size, input_size, models,
|
|
325 |
x = torch.tensor(x, device="cpu").float()
|
326 |
# Preprocess the images.
|
327 |
x = x.permute((0, 3, 1, 2))
|
328 |
-
print(x.shape)
|
329 |
-
print(type(x))
|
330 |
for i in range(len(x)):
|
331 |
x[i] = normalize_transform(x[i] / 255.)
|
332 |
# Make a prediction, then take the average.
|
@@ -341,8 +339,6 @@ def predict_on_video(face_extractor, video_path, batch_size, input_size, models,
|
|
341 |
preds.append(strategy(bpred))
|
342 |
return np.mean(preds)
|
343 |
except Exception as e:
|
344 |
-
print(x.shape)
|
345 |
-
print(type(x))
|
346 |
print("Prediction error on video %s: %s" % (video_path, str(e)))
|
347 |
|
348 |
return 0.5
|
|
|
325 |
x = torch.tensor(x, device="cpu").float()
|
326 |
# Preprocess the images.
|
327 |
x = x.permute((0, 3, 1, 2))
|
|
|
|
|
328 |
for i in range(len(x)):
|
329 |
x[i] = normalize_transform(x[i] / 255.)
|
330 |
# Make a prediction, then take the average.
|
|
|
339 |
preds.append(strategy(bpred))
|
340 |
return np.mean(preds)
|
341 |
except Exception as e:
|
|
|
|
|
342 |
print("Prediction error on video %s: %s" % (video_path, str(e)))
|
343 |
|
344 |
return 0.5
|