Skip to content

Commit e9e3bd1

Browse files
author
Ye Shaokai
committed
Merge branch 'shaokai/dev' of github.com:yeshaokai/LLaVA-NeXT into shaokai/dev
2 parents c614e7e + 1407244 commit e9e3bd1

File tree

6 files changed

+9
-62
lines changed

6 files changed

+9
-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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def get_args_parser():
130130
parser.add_argument('--output_dir', default = None, type = str)
131131
parser.add_argument("--perspective", default = "first_person", type = str)
132132
parser.add_argument('--benchmark_testing', action='store_true', default = False)
133+
parser.add_argument('--include_time_instruction', action='store_true', default = False)
133134
return parser
134135

135136
def prepare_llava(pretrained):
@@ -345,7 +346,7 @@ def collate_fn(batch):
345346
from llava.action.generate_interval_pred import get_lookup_dict
346347
if eval_args.test_type.startswith('temporal_cot'):
347348
lookup_table = get_lookup_dict(eval_args.val_metadata,
348-
eval_args.action_representation,
349+
'GT_random_narration',
349350
test_type = eval_args.test_type,
350351
pseudo_folder = eval_args.pseudo_folder)
351352

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)