gina9726 commited on
Commit
475b162
·
verified ·
1 Parent(s): cd0c940

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +2 -2
demo.py CHANGED
@@ -239,8 +239,8 @@ class VideoCLSModel(VideoModel):
239
  def predict(self, idx=0):
240
  all_outputs, all_targets = self.forward(idx)
241
  preds, targets = all_outputs.numpy(), all_targets.numpy()
242
- #sel = np.where(np.cumsum(sorted(preds[0].tolist(), reverse=True)) > 0.06)[0][0]
243
- sel = 5
244
  df = pd.DataFrame(self.labels)
245
  pred_action = df.iloc[preds[0].argsort()[-sel:]].values.tolist()
246
  gt_action = df.iloc[np.where(targets[0])[0]].values.tolist()
 
239
  def predict(self, idx=0):
240
  all_outputs, all_targets = self.forward(idx)
241
  preds, targets = all_outputs.numpy(), all_targets.numpy()
242
+ sel = np.where(np.cumsum(sorted(preds[0].tolist(), reverse=True)) > 0.055)[0][0]
243
+ #sel = 5
244
  df = pd.DataFrame(self.labels)
245
  pred_action = df.iloc[preds[0].argsort()[-sel:]].values.tolist()
246
  gt_action = df.iloc[np.where(targets[0])[0]].values.tolist()