AnonyCAD commited on
Commit
45f037d
1 Parent(s): 9819e55

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .DS_Store +0 -0
  2. blocks/.DS_Store +0 -0
  3. blocks/task1/.DS_Store +0 -0
  4. blocks/task1/eval.py +40 -0
  5. blocks/task1/example/.DS_Store +0 -0
  6. blocks/task1/example/level3/.DS_Store +0 -0
  7. blocks/task1/example/level3/annotation.txt +8 -0
  8. blocks/task1/example/level3/answer/0.txt +6 -0
  9. blocks/task1/example/level3/answer/1.txt +4 -0
  10. blocks/task1/example/level3/answer/2.txt +4 -0
  11. blocks/task1/example/level3/answer/3.txt +6 -0
  12. blocks/task1/example/level3/answer/4.txt +6 -0
  13. blocks/task1/example/level3/answer/5.txt +6 -0
  14. blocks/task1/example/level3/answer/6.txt +5 -0
  15. blocks/task1/example/level3/answer/7.txt +6 -0
  16. blocks/task1/example/level3/image_input/0.jpg +3 -0
  17. blocks/task1/example/level3/image_input/1.jpg +3 -0
  18. blocks/task1/example/level3/image_input/2.jpg +3 -0
  19. blocks/task1/example/level3/image_input/3.jpg +3 -0
  20. blocks/task1/example/level3/image_input/4.jpg +3 -0
  21. blocks/task1/example/level3/image_input/5.jpg +3 -0
  22. blocks/task1/example/level3/image_input/6.jpg +3 -0
  23. blocks/task1/example/level3/image_input/7.jpg +3 -0
  24. blocks/task1/example/level3/pure_text_rep_input/0.txt +3 -0
  25. blocks/task1/example/level3/pure_text_rep_input/1.txt +1 -0
  26. blocks/task1/example/level3/pure_text_rep_input/2.txt +1 -0
  27. blocks/task1/example/level3/pure_text_rep_input/3.txt +3 -0
  28. blocks/task1/example/level3/pure_text_rep_input/4.txt +3 -0
  29. blocks/task1/example/level3/pure_text_rep_input/5.txt +3 -0
  30. blocks/task1/example/level3/pure_text_rep_input/6.txt +2 -0
  31. blocks/task1/example/level3/pure_text_rep_input/7.txt +3 -0
  32. blocks/task1/example/level3/table_rep_input/0.txt +2 -0
  33. blocks/task1/example/level3/table_rep_input/1.txt +4 -0
  34. blocks/task1/example/level3/table_rep_input/2.txt +4 -0
  35. blocks/task1/example/level3/table_rep_input/3.txt +2 -0
  36. blocks/task1/example/level3/table_rep_input/4.txt +2 -0
  37. blocks/task1/example/level3/table_rep_input/5.txt +2 -0
  38. blocks/task1/example/level3/table_rep_input/6.txt +3 -0
  39. blocks/task1/example/level3/table_rep_input/7.txt +2 -0
  40. blocks/task1/example/level3/text_input/0.txt +1 -0
  41. blocks/task1/example/level3/text_input/1.txt +1 -0
  42. blocks/task1/example/level3/text_input/2.txt +1 -0
  43. blocks/task1/example/level3/text_input/3.txt +1 -0
  44. blocks/task1/example/level3/text_input/4.txt +1 -0
  45. blocks/task1/example/level3/text_input/5.txt +1 -0
  46. blocks/task1/example/level3/text_input/6.txt +1 -0
  47. blocks/task1/example/level3/text_input/7.txt +1 -0
  48. blocks/task1/example/level4/annotation.txt +8 -0
  49. blocks/task1/example/level4/answer/0.txt +5 -0
  50. 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

  • SHA256: 16bbf31e502cad4101223d7bec561ff7dfb8e2be926a8aa4de7076ecf8e0f1be
  • Pointer size: 130 Bytes
  • Size of remote file: 10.3 kB
blocks/task1/example/level3/image_input/1.jpg ADDED

Git LFS Details

  • SHA256: 793306fae96b18f69efe75779947de2809fd12f65c2bdc6aa42e95b4797398f2
  • Pointer size: 129 Bytes
  • Size of remote file: 8.94 kB
blocks/task1/example/level3/image_input/2.jpg ADDED

Git LFS Details

  • SHA256: 18d55c01f4b8bc110e03829e1f6305b9cda18a548fc539272f361f50b27deb5d
  • Pointer size: 129 Bytes
  • Size of remote file: 8.72 kB
blocks/task1/example/level3/image_input/3.jpg ADDED

Git LFS Details

  • SHA256: 4e13a152d5e2101ce4f0f70d8d6ccabff48d9012328d904a5bfd936b11a3267a
  • Pointer size: 129 Bytes
  • Size of remote file: 9.61 kB
blocks/task1/example/level3/image_input/4.jpg ADDED

Git LFS Details

  • SHA256: 1627db8c80699b79b8ffbd8f344d2e520d4cc92a584187f60d183c66b8018189
  • Pointer size: 129 Bytes
  • Size of remote file: 8.86 kB
blocks/task1/example/level3/image_input/5.jpg ADDED

Git LFS Details

  • SHA256: 06c248a760842eeba06ebd63b867116bb2f62af29098ba8c27829918258a09b4
  • Pointer size: 129 Bytes
  • Size of remote file: 9.33 kB
blocks/task1/example/level3/image_input/6.jpg ADDED

Git LFS Details

  • SHA256: eecd3e71a417f1bc80b48371b25034ee8d0953ed6cf6283ee26ce30cc15d5f04
  • Pointer size: 130 Bytes
  • Size of remote file: 10.7 kB
blocks/task1/example/level3/image_input/7.jpg ADDED

Git LFS Details

  • SHA256: ed8e3af63c07731af06aff7904beaf6da5d1adfe44733b208d6c7f776f90db9a
  • Pointer size: 129 Bytes
  • Size of remote file: 9.61 kB
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