fesvhtr commited on
Commit
b9cc0d4
·
verified ·
1 Parent(s): a7838fc

Update Timestamp instruction to mmss format

Browse files
Files changed (1) hide show
  1. scripts/fill_cuva_test.py +9 -1
scripts/fill_cuva_test.py CHANGED
@@ -7,6 +7,14 @@ DETECTION_INSTRUCTION = (
7
  "Determine whether the video contains an anomalous event. "
8
  "Output 1 if an anomaly is present."
9
  )
 
 
 
 
 
 
 
 
10
 
11
  EXPECTED_TEST_TASKS = {
12
  "Classification",
@@ -33,7 +41,7 @@ def build_instruction_map(gt_rows):
33
  task_to_instruction = {}
34
  for row in gt_rows:
35
  task = row["task"]
36
- instruction = row["instruction"]
37
  existing = task_to_instruction.get(task)
38
  if existing is None:
39
  task_to_instruction[task] = instruction
 
7
  "Determine whether the video contains an anomalous event. "
8
  "Output 1 if an anomaly is present."
9
  )
10
+ TIMESTAMP_INSTRUCTION = (
11
+ "\n"
12
+ " Locate the position of the anomalous segment in the video. "
13
+ "Report the start and end timestamps in mmss format rather than seconds, "
14
+ "and use the following output format:\n"
15
+ " [xxxx, xxxx]\n"
16
+ " "
17
+ )
18
 
19
  EXPECTED_TEST_TASKS = {
20
  "Classification",
 
41
  task_to_instruction = {}
42
  for row in gt_rows:
43
  task = row["task"]
44
+ instruction = TIMESTAMP_INSTRUCTION if task == "Timestamp" else row["instruction"]
45
  existing = task_to_instruction.get(task)
46
  if existing is None:
47
  task_to_instruction[task] = instruction