-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCategoryFilter.py
More file actions
181 lines (140 loc) · 3.39 KB
/
CategoryFilter.py
File metadata and controls
181 lines (140 loc) · 3.39 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
def filter_type_object_detection_sun_rgbd(word):
# filters for bathtub
if word == "tub":
return "bathtub"
# filters for bed
if word == "bunk_bed":
return "bed"
# filters for shelf
if word == "bookcase":
return "bookshelf"
# filters for box
# filters for chair
if word == "rocking_chair":
return "chair"
if word == "lawn_chair":
return "chair"
if word == "stack_of_chairs":
return "chair"
if word == "chairs":
return "chair"
if word == "high_chair":
return "chair"
if word == "lounge_chair":
return "chair"
if word == "chair_thumb":
return "chair"
if word == "rocking_chair":
return "chair"
if word == "lawn_chair":
return "chair"
if word == "stacked chairs":
return "chair"
# counter
if word == "kitchen island":
return "counter"
# desk
# door
if word == "cdoor":
return "door"
# dresser
# garbage-bin
if word == "garbage_bin ":
return "garbage-bin"
if word == "garbage_bin":
return "garbage-bin"
if word == "recycle_bin":
return "garbage-bin"
# lamp
if word == "walllamp":
return "lamp"
# monitor
# night-stand
if word == "nightstand":
return "night-stand"
if word == "night_stand":
return "night-stand"
# pillow
# sink
if word == "kitchen_sink":
return "sink"
# sofa
if word == "sofa_chair":
return "sofa"
if word == "sofa_bed":
return "sofa"
if word == "ottoman":
return "sofa"
# table
if word == "coffee_table":
return "table"
if word == "endtable":
return "table"
if word == "entable":
return "table"
if word == "dining table":
return "table"
if word == "sidetable":
return "table"
if word == "end_table":
return "table"
if word == "side_table":
return "table"
if word == "coffeetable":
return "table"
if word == "centertable":
return "table"
if word == "ping_pong_table":
return "table"
if word == "pingpongtable":
return "table"
if word == "long_office_table":
return "table"
if word == "bar_table":
return "table"
# television
if word == "tv":
return "television"
if word == "flat_screen_tv":
return "television"
# toilet
return word
def filter_type_instance_segmentation_sun_rgbd(word):
# bathtub
if word == "bathtab":
return "bathtub"
if word == "bath_dub":
return "bathtub"
# bed
if word == "bunk bed":
return "bed"
# chair
if word == "stacked chairs":
return "chair"
if word == "plastic chair":
return "chair"
if word == "sofa_chair":
return "chair"
# table
if word == "game table":
return "table"
if word == "ping pong table":
return "table"
if word == "coffee table":
return "table"
# monitor
if word == "computer_monitor":
return "monitor"
if word == "tv":
return "monitor"
if word == "television":
return "monitor"
if word == "garbage bin":
return "garbage-bin"
# pillow
# sofa
if word == "beige_sofa":
return "sofa"
# toilet
# desk
return word