File size: 4,534 Bytes
e986ee1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
COLOR_VALUES = [255, 224, 196, 168, 140, 112, 84, 56, 28, 0]
SIZE_VALUES = [0.4, 0.5, 0.6, 0.7, 0.8, 0.9]
TYPE_VALUES = ["none", "triangle", "square", "pentagon", "hexagon", "circle"]
ANGLE_VALUES = [-135, -90, -45, 0, 45, 90, 135, 180]
RENDER_POSITIONS_GROUPED = [
    [(0.5, 0.5, 1, 1)],
    # ...
    [(0.25, 0.25, 0.5, 0.5),
     (0.25, 0.75, 0.5, 0.5),
     (0.75, 0.25, 0.5, 0.5),
     (0.75, 0.75, 0.5, 0.5)],
    # ...
    [(0.16, 0.16, 0.33, 0.33),
     (0.16, 0.5, 0.33, 0.33),
     (0.16, 0.83, 0.33, 0.33),
     (0.5, 0.16, 0.33, 0.33),
     (0.5, 0.5, 0.33, 0.33),
     (0.5, 0.83, 0.33, 0.33),
     (0.83, 0.16, 0.33, 0.33),
     (0.83, 0.5, 0.33, 0.33),
     (0.83, 0.83, 0.33, 0.33)],
    # ...
    [(0.5, 0.5, 1, 1)],
    [(0.5, 0.5, 0.33, 0.33)],
    # ...
    [(0.5, 0.5, 1, 1)],
    [(0.42, 0.42, 0.15, 0.15),
     (0.42, 0.58, 0.15, 0.15),
     (0.58, 0.42, 0.15, 0.15),
     (0.58, 0.58, 0.15, 0.15)],
    # ....
    [(0.5, 0.25, 0.5, 0.5)],
    [(0.5, 0.75, 0.5, 0.5)],
    # ...
    [(0.25, 0.5, 0.5, 0.5)],
    [(0.75, 0.5, 0.5, 0.5)],
    # ...
]
RENDER_POSITIONS = [pos_ for group_pos_ in RENDER_POSITIONS_GROUPED for pos_ in group_pos_]
MAPPING = {
    "distribute_nine":
        {0.16: 0,
         0.5: 1,
         0.83: 2},
    "distribute_four":
        {0.25: 0,
         0.75: 1},
    'in_distribute_four_out_center_single':
        {0.42: 0,
         0.58: 1}
}
MUL = {
    "distribute_nine": 3,
    "distribute_four": 2,
    'in_distribute_four_out_center_single': 2
}
TYPES = ["triangle", "square", "pentagon", "hexagon", "circle"]
TYPES_NONE = ["none", "triangle", "square", "pentagon", "hexagon", "circle"]
SIZES = ["vs", "s", "m", "h", "vh", "e"]
SIZES_NAME = ["Very Small", "Small", "Medium", "High", "Very High", "Enormous"]
COLORS = ["vs", "s", "m", "h", "vh", "e"]

SAMPLE_TARGET = [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 9, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0,
        0, 1, 3],
       [1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 3, 0, 0, 0, 0,
        0, 3, 3],
       [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0, 0, 0, 0,
        0, 0, 3],
       [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 5, 2, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
        3, 2, 1],
       [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 3, 2, 1,
        3, 0, 1],
       [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 2, 0, 0, 7, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 0, 0, 3, 3,
        3, 1, 0],
       [6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 6, 5, 0, 8, 5, 1, 0, 0, 0, 3, 2, 0, 0, 1, 0,
        3, 3, 3]]