Datasets:
Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .DS_Store +0 -0
- blocks/.DS_Store +0 -0
- blocks/task1/.DS_Store +0 -0
- blocks/task1/eval.py +40 -0
- blocks/task1/example/.DS_Store +0 -0
- blocks/task1/example/level3/.DS_Store +0 -0
- blocks/task1/example/level3/annotation.txt +8 -0
- blocks/task1/example/level3/answer/0.txt +6 -0
- blocks/task1/example/level3/answer/1.txt +4 -0
- blocks/task1/example/level3/answer/2.txt +4 -0
- blocks/task1/example/level3/answer/3.txt +6 -0
- blocks/task1/example/level3/answer/4.txt +6 -0
- blocks/task1/example/level3/answer/5.txt +6 -0
- blocks/task1/example/level3/answer/6.txt +5 -0
- blocks/task1/example/level3/answer/7.txt +6 -0
- blocks/task1/example/level3/image_input/0.jpg +3 -0
- blocks/task1/example/level3/image_input/1.jpg +3 -0
- blocks/task1/example/level3/image_input/2.jpg +3 -0
- blocks/task1/example/level3/image_input/3.jpg +3 -0
- blocks/task1/example/level3/image_input/4.jpg +3 -0
- blocks/task1/example/level3/image_input/5.jpg +3 -0
- blocks/task1/example/level3/image_input/6.jpg +3 -0
- blocks/task1/example/level3/image_input/7.jpg +3 -0
- blocks/task1/example/level3/pure_text_rep_input/0.txt +3 -0
- blocks/task1/example/level3/pure_text_rep_input/1.txt +1 -0
- blocks/task1/example/level3/pure_text_rep_input/2.txt +1 -0
- blocks/task1/example/level3/pure_text_rep_input/3.txt +3 -0
- blocks/task1/example/level3/pure_text_rep_input/4.txt +3 -0
- blocks/task1/example/level3/pure_text_rep_input/5.txt +3 -0
- blocks/task1/example/level3/pure_text_rep_input/6.txt +2 -0
- blocks/task1/example/level3/pure_text_rep_input/7.txt +3 -0
- blocks/task1/example/level3/table_rep_input/0.txt +2 -0
- blocks/task1/example/level3/table_rep_input/1.txt +4 -0
- blocks/task1/example/level3/table_rep_input/2.txt +4 -0
- blocks/task1/example/level3/table_rep_input/3.txt +2 -0
- blocks/task1/example/level3/table_rep_input/4.txt +2 -0
- blocks/task1/example/level3/table_rep_input/5.txt +2 -0
- blocks/task1/example/level3/table_rep_input/6.txt +3 -0
- blocks/task1/example/level3/table_rep_input/7.txt +2 -0
- blocks/task1/example/level3/text_input/0.txt +1 -0
- blocks/task1/example/level3/text_input/1.txt +1 -0
- blocks/task1/example/level3/text_input/2.txt +1 -0
- blocks/task1/example/level3/text_input/3.txt +1 -0
- blocks/task1/example/level3/text_input/4.txt +1 -0
- blocks/task1/example/level3/text_input/5.txt +1 -0
- blocks/task1/example/level3/text_input/6.txt +1 -0
- blocks/task1/example/level3/text_input/7.txt +1 -0
- blocks/task1/example/level4/annotation.txt +8 -0
- blocks/task1/example/level4/answer/0.txt +5 -0
- blocks/task1/example/level4/answer/1.txt +7 -0
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
blocks/.DS_Store
ADDED
Binary file (8.2 kB). View file
|
|
blocks/task1/.DS_Store
ADDED
Binary file (8.2 kB). View file
|
|
blocks/task1/eval.py
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import csv
|
2 |
+
import os
|
3 |
+
|
4 |
+
def clear_answer(plan):
|
5 |
+
plan = plan.replace('"', '')
|
6 |
+
plan = plan.replace("'", '')
|
7 |
+
plan = plan.replace("\n", '')
|
8 |
+
plan = plan.replace(".", '')
|
9 |
+
plan = plan.replace("*", '')
|
10 |
+
plan = plan.lstrip()
|
11 |
+
plan = plan.rstrip()
|
12 |
+
return plan
|
13 |
+
|
14 |
+
# import ipdb; ipdb.set_trace()
|
15 |
+
count_corr = [0,0,0]
|
16 |
+
invalid = [0,0,0]
|
17 |
+
for level in [3,4,5]:
|
18 |
+
with open("../level%d/annotation.txt"%(level), "r") as f:
|
19 |
+
gt_records = f.read().split('\n')[:-1]
|
20 |
+
for test_id in range(100):
|
21 |
+
try:
|
22 |
+
curr_record = gt_records[test_id]
|
23 |
+
with open("output/output_img/level%d/%d.txt"%(level, test_id), "r") as f:
|
24 |
+
answer = f.read()
|
25 |
+
answer_index = answer.find("<Output>")
|
26 |
+
answer = answer[(answer_index + len("<Output>")):]
|
27 |
+
answer_possible_end_index = answer.find('\n')
|
28 |
+
if answer_possible_end_index != -1:
|
29 |
+
answer = answer[:answer_possible_end_index]
|
30 |
+
answer = clear_answer(answer)
|
31 |
+
if curr_record.lower() == answer.lower():
|
32 |
+
count_corr[level-3] += 1
|
33 |
+
else:
|
34 |
+
print(answer)
|
35 |
+
except:
|
36 |
+
invalid[level-3] += 1
|
37 |
+
# print(test_id)
|
38 |
+
print(count_corr)
|
39 |
+
print(invalid)
|
40 |
+
print("")
|
blocks/task1/example/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
blocks/task1/example/level3/.DS_Store
ADDED
Binary file (8.2 kB). View file
|
|
blocks/task1/example/level3/annotation.txt
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
purple
|
2 |
+
orange
|
3 |
+
orange
|
4 |
+
yellow
|
5 |
+
blue
|
6 |
+
green
|
7 |
+
blue
|
8 |
+
orange
|
blocks/task1/example/level3/answer/0.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 3 blocks in 3 stacks. From left to right:
|
2 |
+
- Stack 1 has 1 level.Level 1 has a red block.
|
3 |
+
- Stack 2 has 1 level.Level 1 has a orange block.
|
4 |
+
- Stack 3 has 1 level.Level 1 has a purple block.
|
5 |
+
As such, for the question "What is the color of the block at stack 3, level 1?", the correct answer is "<Output> purple".
|
6 |
+
<Output> purple
|
blocks/task1/example/level3/answer/1.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 3 blocks in 1 stacks. From left to right:
|
2 |
+
- Stack 1 has 3 level. From bottom to top: level 1 has an orange block, level 2 has an yellow block, level 3 has an red block,
|
3 |
+
As such, for the question "What is the color of the block at stack 1, level 1?", the correct answer is "<Output> orange".
|
4 |
+
<Output> orange
|
blocks/task1/example/level3/answer/2.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 3 blocks in 1 stacks. From left to right:
|
2 |
+
- Stack 1 has 3 level. From bottom to top: level 1 has an red block, level 2 has an blue block, level 3 has an orange block,
|
3 |
+
As such, for the question "What is the color of the block at stack 1, level 3?", the correct answer is "<Output> orange".
|
4 |
+
<Output> orange
|
blocks/task1/example/level3/answer/3.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 3 blocks in 3 stacks. From left to right:
|
2 |
+
- Stack 1 has 1 level.Level 1 has a blue block.
|
3 |
+
- Stack 2 has 1 level.Level 1 has a orange block.
|
4 |
+
- Stack 3 has 1 level.Level 1 has a yellow block.
|
5 |
+
As such, for the question "What is the color of the block at stack 3, level 1?", the correct answer is "<Output> yellow".
|
6 |
+
<Output> yellow
|
blocks/task1/example/level3/answer/4.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 3 blocks in 3 stacks. From left to right:
|
2 |
+
- Stack 1 has 1 level.Level 1 has a orange block.
|
3 |
+
- Stack 2 has 1 level.Level 1 has a green block.
|
4 |
+
- Stack 3 has 1 level.Level 1 has a blue block.
|
5 |
+
As such, for the question "What is the color of the block at stack 3, level 1?", the correct answer is "<Output> blue".
|
6 |
+
<Output> blue
|
blocks/task1/example/level3/answer/5.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 3 blocks in 3 stacks. From left to right:
|
2 |
+
- Stack 1 has 1 level.Level 1 has a purple block.
|
3 |
+
- Stack 2 has 1 level.Level 1 has a blue block.
|
4 |
+
- Stack 3 has 1 level.Level 1 has a green block.
|
5 |
+
As such, for the question "What is the color of the block at stack 3, level 1?", the correct answer is "<Output> green".
|
6 |
+
<Output> green
|
blocks/task1/example/level3/answer/6.txt
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 3 blocks in 2 stacks. From left to right:
|
2 |
+
- Stack 1 has 1 level.Level 1 has a orange block.
|
3 |
+
- Stack 2 has 2 level. From bottom to top: level 1 has an blue block, level 2 has an purple block,
|
4 |
+
As such, for the question "What is the color of the block at stack 2, level 1?", the correct answer is "<Output> blue".
|
5 |
+
<Output> blue
|
blocks/task1/example/level3/answer/7.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 3 blocks in 3 stacks. From left to right:
|
2 |
+
- Stack 1 has 1 level.Level 1 has a orange block.
|
3 |
+
- Stack 2 has 1 level.Level 1 has a green block.
|
4 |
+
- Stack 3 has 1 level.Level 1 has a yellow block.
|
5 |
+
As such, for the question "What is the color of the block at stack 1, level 1?", the correct answer is "<Output> orange".
|
6 |
+
<Output> orange
|
blocks/task1/example/level3/image_input/0.jpg
ADDED
Git LFS Details
|
blocks/task1/example/level3/image_input/1.jpg
ADDED
Git LFS Details
|
blocks/task1/example/level3/image_input/2.jpg
ADDED
Git LFS Details
|
blocks/task1/example/level3/image_input/3.jpg
ADDED
Git LFS Details
|
blocks/task1/example/level3/image_input/4.jpg
ADDED
Git LFS Details
|
blocks/task1/example/level3/image_input/5.jpg
ADDED
Git LFS Details
|
blocks/task1/example/level3/image_input/6.jpg
ADDED
Git LFS Details
|
blocks/task1/example/level3/image_input/7.jpg
ADDED
Git LFS Details
|
blocks/task1/example/level3/pure_text_rep_input/0.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
- Stack with red block
|
2 |
+
- Stack with orange block
|
3 |
+
- Stack with purple block
|
blocks/task1/example/level3/pure_text_rep_input/1.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
- Stack with orange block, yellow block, red block, from bottom to top
|
blocks/task1/example/level3/pure_text_rep_input/2.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
- Stack with red block, blue block, orange block, from bottom to top
|
blocks/task1/example/level3/pure_text_rep_input/3.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
- Stack with blue block
|
2 |
+
- Stack with orange block
|
3 |
+
- Stack with yellow block
|
blocks/task1/example/level3/pure_text_rep_input/4.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
- Stack with orange block
|
2 |
+
- Stack with green block
|
3 |
+
- Stack with blue block
|
blocks/task1/example/level3/pure_text_rep_input/5.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
- Stack with purple block
|
2 |
+
- Stack with blue block
|
3 |
+
- Stack with green block
|
blocks/task1/example/level3/pure_text_rep_input/6.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
- Stack with orange block
|
2 |
+
- Stack with blue block, purple block, from bottom to top
|
blocks/task1/example/level3/pure_text_rep_input/7.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
- Stack with orange block
|
2 |
+
- Stack with green block
|
3 |
+
- Stack with yellow block
|
blocks/task1/example/level3/table_rep_input/0.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
| Stack 1 | Stack 2 | Stack 3 |
|
2 |
+
Level 1 | red | orange | purple |
|
blocks/task1/example/level3/table_rep_input/1.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
| Stack 1 |
|
2 |
+
Level 3 | red |
|
3 |
+
Level 2 | yellow |
|
4 |
+
Level 1 | orange |
|
blocks/task1/example/level3/table_rep_input/2.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
| Stack 1 |
|
2 |
+
Level 3 | orange |
|
3 |
+
Level 2 | blue |
|
4 |
+
Level 1 | red |
|
blocks/task1/example/level3/table_rep_input/3.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
| Stack 1 | Stack 2 | Stack 3 |
|
2 |
+
Level 1 | blue | orange | yellow |
|
blocks/task1/example/level3/table_rep_input/4.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
| Stack 1 | Stack 2 | Stack 3 |
|
2 |
+
Level 1 | orange | green | blue |
|
blocks/task1/example/level3/table_rep_input/5.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
| Stack 1 | Stack 2 | Stack 3 |
|
2 |
+
Level 1 | purple | blue | green |
|
blocks/task1/example/level3/table_rep_input/6.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
| Stack 1 | Stack 2 |
|
2 |
+
Level 2 | | purple |
|
3 |
+
Level 1 | orange | blue |
|
blocks/task1/example/level3/table_rep_input/7.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
| Stack 1 | Stack 2 | Stack 3 |
|
2 |
+
Level 1 | orange | green | yellow |
|
blocks/task1/example/level3/text_input/0.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
What is the color of the block at stack 3, level 1?
|
blocks/task1/example/level3/text_input/1.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
What is the color of the block at stack 1, level 1?
|
blocks/task1/example/level3/text_input/2.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
What is the color of the block at stack 1, level 3?
|
blocks/task1/example/level3/text_input/3.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
What is the color of the block at stack 3, level 1?
|
blocks/task1/example/level3/text_input/4.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
What is the color of the block at stack 3, level 1?
|
blocks/task1/example/level3/text_input/5.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
What is the color of the block at stack 3, level 1?
|
blocks/task1/example/level3/text_input/6.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
What is the color of the block at stack 2, level 1?
|
blocks/task1/example/level3/text_input/7.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
What is the color of the block at stack 1, level 1?
|
blocks/task1/example/level4/annotation.txt
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
green
|
2 |
+
purple
|
3 |
+
yellow
|
4 |
+
red
|
5 |
+
red
|
6 |
+
red
|
7 |
+
yellow
|
8 |
+
green
|
blocks/task1/example/level4/answer/0.txt
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 4 blocks in 2 stacks. From left to right:
|
2 |
+
- Stack 1 has 1 level.Level 1 has a green block.
|
3 |
+
- Stack 2 has 3 level. From bottom to top: level 1 has an red block, level 2 has an orange block, level 3 has an blue block,
|
4 |
+
As such, for the question "What is the color of the block at stack 1, level 1?", the correct answer is "<Output> green".
|
5 |
+
<Output> green
|
blocks/task1/example/level4/answer/1.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The input contains 4 blocks in 4 stacks. From left to right:
|
2 |
+
- Stack 1 has 1 level.Level 1 has a yellow block.
|
3 |
+
- Stack 2 has 1 level.Level 1 has a orange block.
|
4 |
+
- Stack 3 has 1 level.Level 1 has a green block.
|
5 |
+
- Stack 4 has 1 level.Level 1 has a purple block.
|
6 |
+
As such, for the question "What is the color of the block at stack 4, level 1?", the correct answer is "<Output> purple".
|
7 |
+
<Output> purple
|