Skip to content

Commit 1407244

Browse files
author
Haozhe Qi
committed
update
1 parent 9088edc commit 1407244

File tree

6 files changed

+8
-62
lines changed

6 files changed

+8
-62
lines changed

llava/action/calculate_action_model_acc.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

llava/action/ek_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def collate_fn(batch):
346346
from llava.action.generate_interval_pred import get_lookup_dict
347347
if eval_args.test_type.startswith('temporal_cot'):
348348
lookup_table = get_lookup_dict(eval_args.val_metadata,
349-
eval_args.action_representation,
349+
'GT_random_narration',
350350
test_type = eval_args.test_type,
351351
pseudo_folder = eval_args.pseudo_folder)
352352

llava/action/utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,8 @@ def format_task_related_prompt(question, question_type, meta_data = None, perspe
268268
suffix = "Here are the options of actions you are selecting:\n" + suffix
269269
ret = prefix + suffix
270270

271-
elif question_type == "direct_narration":
272-
273-
if learn_neighbor_actions == "prior" and meta_data and random.random() < 0.1:
274-
ret = f"{perspective_prefix} {prev2_offset} seconds ago, you started an action {prev2_narration}. {prev1_offset} seconds ago, you started an action {prev1_narration}. What action are you currently performing? Give a short sentence such as 'move knife'. "
275-
else:
276-
ret = f"{perspective_prefix} What action are you performing? Give a short sentence such as 'move knife'."
271+
elif question_type == "direct_narration":
272+
ret = f"{perspective_prefix} What action are you performing? Give a short sentence such as 'move knife'."
277273

278274
elif question_type == "temporal_detection":
279275
ret = question

llava/model/builder.py

100755100644
File mode changed.

llava/train/train.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,12 +1289,12 @@ def _get_item(self, i) -> Dict[str, torch.Tensor]:
12891289
start_timestamp = round(float(self.list_data_dict[i]['start_timestamp']), 2)
12901290
end_timestamp = round(float(self.list_data_dict[i]['end_timestamp']), 2)
12911291
uid = f"{vid}_{start_timestamp}_{end_timestamp}"
1292-
# if True:
1293-
# meta_data = self.train_triple_lookup_narration.get(uid, None)
1294-
if 'official_key' in sources[0]['question_type']:
1295-
meta_data = self.train_triple_lookup_official.get(uid, None)
1296-
elif 'GT_random_narration' in sources[0]['question_type']:
1292+
if True:
12971293
meta_data = self.train_triple_lookup_narration.get(uid, None)
1294+
# if 'official_key' in sources[0]['question_type']:
1295+
# meta_data = self.train_triple_lookup_official.get(uid, None)
1296+
# elif 'GT_random_narration' in sources[0]['question_type']:
1297+
# meta_data = self.train_triple_lookup_narration.get(uid, None)
12981298

12991299

13001300
if 'EK100' not in video_file and 'EKframes' not in video_folder:

run_todi2.sbatch

100755100644
File mode changed.

0 commit comments

Comments
 (0)