Skip to content

Commit 001de66

Browse files
author
Ye Shaokai
committed
WIP
1 parent 4d2d2be commit 001de66

File tree

2 files changed

+84
-8
lines changed

2 files changed

+84
-8
lines changed

llava/action/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def remove_option_letter(answer):
9696
else:
9797
return answer
9898

99-
def generate_label_map(anno_root, action_representation, cache_file = None):
99+
def generate_label_map(anno_root, action_representation, cache_file = 'cache_file.pkl'):
100100
print("Preprocess ek100 action label space")
101101
vn_list = []
102102
mapping_vn2narration = {}
@@ -140,7 +140,7 @@ def generate_label_map(anno_root, action_representation, cache_file = None):
140140
narration = row[8]
141141
if 'cut' in action_representation:
142142
import spacy
143-
nlp = spacy.load('en_core_web_sm')
143+
nlp = spacy.load('en_core_web_sm', disable=['ner', 'textcat'])
144144
narration = remove_sub_nouns(nlp, narration, row[9], row[13], cache_file = cache_file)
145145

146146
if vn not in mapping_vn2narration:

shaokai_generate_train.sh

Lines changed: 82 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,89 @@ export PYTHONPATH=/data/shaokai/LLaVA-NeXT:$PYTHONPATH
33
export PYTHONPATH=/usr/local/lib/python3.10/site-packages/decord-0.6.0-py3.10-linux-x86_64.egg/:$PYTHONPATH
44

55

6+
7+
# python3 llava/action/generate_description.py \
8+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
9+
# --out_folder /data/shaokai/EK100_inst_train/ \
10+
# --train_predictions /data/shaokai/AVION_PREDS/avion_pred_ids_train.json \
11+
# --gen_type avion_mc \
12+
# --action_representation GT_random_narration \
13+
# --n_options 5
14+
15+
# python3 llava/action/generate_description.py \
16+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
17+
# --out_folder /data/shaokai/EK100_inst_train/ \
18+
# --train_predictions /data/shaokai/AVION_PREDS/avion_pred_ids_train.json \
19+
# --gen_type avion_mc \
20+
# --action_representation official_key \
21+
# --n_options 5
22+
23+
24+
# python3 llava/action/generate_description.py \
25+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
26+
# --out_folder /data/shaokai/EK100_inst_train/ \
27+
# --train_predictions /data/shaokai/AVION_PREDS/avion_pred_ids_train.json \
28+
# --gen_type avion_mc \
29+
# --action_representation GT_random_narration \
30+
# --n_options 10
31+
32+
33+
# python3 llava/action/generate_description.py \
34+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
35+
# --out_folder /data/shaokai/EK100_inst_train/ \
36+
# --train_predictions /data/shaokai/AVION_PREDS/avion_pred_ids_train.json \
37+
# --gen_type avion_mc \
38+
# --action_representation GT_random_narration \
39+
# --n_options 20
40+
41+
# python3 llava/action/generate_description.py \
42+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
43+
# --out_folder /data/shaokai/EK100_inst_train/ \
44+
# --train_predictions /data/shaokai/TIM_PREDS/tim_pred_ids_train.json \
45+
# --gen_type tim_mc \
46+
# --action_representation GT_random_narration \
47+
# --n_options 5
48+
649
python3 llava/action/generate_description.py \
7-
--train_metadata /storage-rcp-pure/upmwmathis_scratch/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
8-
--out_folder /storage-rcp-pure/upmwmathis_scratch/shaokai/EK100_inst_train/ \
9-
--train_predictions /storage-rcp-pure/upmwmathis_scratch/shaokai/TIM_PREDS/avion_pred_ids_train.json \
10-
--gen_type avion_mc \
11-
--action_representation official_key \
12-
--n_options 20
50+
--train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
51+
--out_folder /data/shaokai/EK100_inst_train/ \
52+
--train_predictions /data/shaokai/TIM_PREDS/tim_pred_ids_train.json \
53+
--gen_type tim_mc \
54+
--action_representation topk_narration_cut_key \
55+
--n_options 5
56+
57+
# python3 llava/action/generate_description.py \
58+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
59+
# --out_folder /data/shaokai/EK100_inst_train/ \
60+
# --train_predictions /data/shaokai/TIM_PREDS/tim_pred_ids_train.json \
61+
# --gen_type tim_mc \
62+
# --action_representation GT_random_narration \
63+
# --n_options 5
64+
65+
66+
# python3 llava/action/generate_description.py \
67+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
68+
# --out_folder /data/shaokai/EK100_inst_train/ \
69+
# --train_predictions /data/shaokai/TIM_PREDS/tim_pred_ids_train.json \
70+
# --gen_type tim_mc \
71+
# --action_representation official_key \
72+
# --n_options 5
73+
74+
# python3 llava/action/generate_description.py \
75+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
76+
# --out_folder /data/shaokai/EK100_inst_train/ \
77+
# --train_predictions /data/shaokai/TIM_PREDS/tim_pred_ids_train.json \
78+
# --gen_type tim_mc \
79+
# --action_representation GT_random_narration \
80+
# --n_options 10
81+
82+
# python3 llava/action/generate_description.py \
83+
# --train_metadata /data/shaokai/epic-kitchens-100-annotations/EPIC_100_train.csv \
84+
# --out_folder /data/shaokai/EK100_inst_train/ \
85+
# --train_predictions /data/shaokai/TIM_PREDS/tim_pred_ids_train.json \
86+
# --gen_type tim_mc \
87+
# --action_representation official_key \
88+
# --n_options 10
1389

1490

1591
# python3 action/generate_description.py \

0 commit comments

Comments
 (0)