Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -169,157 +169,11 @@ def ade_palette():
|
|
169 |
[92, 0, 255],
|
170 |
]
|
171 |
|
172 |
-
labels_list = [
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
'tree',
|
178 |
-
'ceiling',
|
179 |
-
'road;route',
|
180 |
-
'bed',
|
181 |
-
'windowpane;window',
|
182 |
-
'grass',
|
183 |
-
'cabinet',
|
184 |
-
'sidewalk;pavement',
|
185 |
-
'person;individual;someone;somebody;mortal;soul',
|
186 |
-
'earth;ground',
|
187 |
-
'door;double;door',
|
188 |
-
'table',
|
189 |
-
'mountain;mount',
|
190 |
-
'plant;flora;plant;life',
|
191 |
-
'curtain;drape;drapery;mantle;pall',
|
192 |
-
'chair',
|
193 |
-
'car;auto;automobile;machine;motorcar',
|
194 |
-
'water',
|
195 |
-
'painting;picture',
|
196 |
-
'sofa;couch;lounge',
|
197 |
-
'shelf',
|
198 |
-
'house',
|
199 |
-
'sea',
|
200 |
-
'mirror',
|
201 |
-
'rug;carpet;carpeting',
|
202 |
-
'field',
|
203 |
-
'armchair',
|
204 |
-
'seat',
|
205 |
-
'fence;fencing',
|
206 |
-
'desk',
|
207 |
-
'rock;stone',
|
208 |
-
'wardrobe;closet;press',
|
209 |
-
'lamp',
|
210 |
-
'bathtub;bathing;tub;bath;tub',
|
211 |
-
'railing;rail',
|
212 |
-
'cushion',
|
213 |
-
'base;pedestal;stand',
|
214 |
-
'box',
|
215 |
-
'column;pillar',
|
216 |
-
'signboard;sign',
|
217 |
-
'chest;of;drawers;chest;bureau;dresser',
|
218 |
-
'counter',
|
219 |
-
'sand',
|
220 |
-
'sink',
|
221 |
-
'skyscraper',
|
222 |
-
'fireplace;hearth;open;fireplace',
|
223 |
-
'refrigerator;icebox',
|
224 |
-
'grandstand;covered;stand',
|
225 |
-
'path',
|
226 |
-
'stairs;steps',
|
227 |
-
'runway',
|
228 |
-
'case;display;case;showcase;vitrine',
|
229 |
-
'pool;table;billiard;table;snooker;table',
|
230 |
-
'pillow',
|
231 |
-
'screen;door;screen',
|
232 |
-
'stairway;staircase',
|
233 |
-
'river',
|
234 |
-
'bridge;span',
|
235 |
-
'bookcase',
|
236 |
-
'blind;screen',
|
237 |
-
'coffee;table;cocktail;table',
|
238 |
-
'toilet;can;commode;crapper;pot;potty;stool;throne',
|
239 |
-
'flower',
|
240 |
-
'book',
|
241 |
-
'hill',
|
242 |
-
'bench',
|
243 |
-
'countertop',
|
244 |
-
'stove;kitchen;stove;range;kitchen;range;cooking;stove',
|
245 |
-
'palm;palm;tree',
|
246 |
-
'kitchen;island',
|
247 |
-
'computer;computing;machine;computing;device;data;processor;electronic;computer;information;processing;system',
|
248 |
-
'swivel;chair',
|
249 |
-
'boat',
|
250 |
-
'bar',
|
251 |
-
'arcade;machine',
|
252 |
-
'hovel;hut;hutch;shack;shanty',
|
253 |
-
'bus;autobus;coach;charabanc;double-decker;jitney;motorbus;motorcoach;omnibus;passenger;vehicle',
|
254 |
-
'towel',
|
255 |
-
'light;light;source',
|
256 |
-
'truck;motortruck',
|
257 |
-
'tower',
|
258 |
-
'chandelier;pendant;pendent',
|
259 |
-
'awning;sunshade;sunblind',
|
260 |
-
'streetlight;street;lamp',
|
261 |
-
'booth;cubicle;stall;kiosk',
|
262 |
-
'television;television;receiver;television;set;tv;tv;set;idiot;box;boob;tube;telly;goggle;box',
|
263 |
-
'airplane;aeroplane;plane',
|
264 |
-
'dirt;track',
|
265 |
-
'apparel;wearing;apparel;dress;clothes',
|
266 |
-
'pole',
|
267 |
-
'land;ground;soil',
|
268 |
-
'bannister;banister;balustrade;balusters;handrail',
|
269 |
-
'escalator;moving;staircase;moving;stairway',
|
270 |
-
'ottoman;pouf;pouffe;puff;hassock',
|
271 |
-
'bottle',
|
272 |
-
'buffet;counter;sideboard',
|
273 |
-
'poster;posting;placard;notice;bill;card',
|
274 |
-
'stage',
|
275 |
-
'van',
|
276 |
-
'ship',
|
277 |
-
'fountain',
|
278 |
-
'conveyer;belt;conveyor;belt;conveyer;conveyor;transporter',
|
279 |
-
'canopy',
|
280 |
-
'washer;automatic;washer;washing;machine',
|
281 |
-
'plaything;toy',
|
282 |
-
'swimming;pool;swimming;bath;natatorium',
|
283 |
-
'stool',
|
284 |
-
'barrel;cask',
|
285 |
-
'basket;handbasket',
|
286 |
-
'waterfall;falls',
|
287 |
-
'tent;collapsible;shelter',
|
288 |
-
'bag',
|
289 |
-
'minibike;motorbike',
|
290 |
-
'cradle',
|
291 |
-
'oven',
|
292 |
-
'ball',
|
293 |
-
'food;solid;food',
|
294 |
-
'step;stair',
|
295 |
-
'tank;storage;tank',
|
296 |
-
'trade;name;brand;name;brand;marque',
|
297 |
-
'microwave;microwave;oven',
|
298 |
-
'pot;flowerpot',
|
299 |
-
'animal;animate;being;beast;brute;creature;fauna',
|
300 |
-
'bicycle;bike;wheel;cycle',
|
301 |
-
'lake',
|
302 |
-
'dishwasher;dish;washer;dishwashing;machine',
|
303 |
-
'screen;silver;screen;projection;screen',
|
304 |
-
'blanket;cover',
|
305 |
-
'sculpture',
|
306 |
-
'hood;exhaust;hood',
|
307 |
-
'sconce',
|
308 |
-
'vase',
|
309 |
-
'traffic;light;traffic;signal;stoplight',
|
310 |
-
'tray',
|
311 |
-
'ashcan;trash;can;garbage;can;wastebin;ash;bin;ash-bin;ashbin;dustbin;trash;barrel;trash;bin',
|
312 |
-
'fan',
|
313 |
-
'pier;wharf;wharfage;dock',
|
314 |
-
'crt;screen',
|
315 |
-
'plate',
|
316 |
-
'monitor;monitoring;device',
|
317 |
-
'bulletin;board;notice;board',
|
318 |
-
'shower',
|
319 |
-
'radiator',
|
320 |
-
'glass;drinking;glass',
|
321 |
-
'clock',
|
322 |
-
'flag']
|
323 |
|
324 |
def label_to_color_image(label):
|
325 |
"""Adds color defined by the dataset colormap to the label.
|
|
|
169 |
[92, 0, 255],
|
170 |
]
|
171 |
|
172 |
+
labels_list = []
|
173 |
+
|
174 |
+
with open(r'labels.txt', 'r') as fp:
|
175 |
+
for line in fp:
|
176 |
+
labels_list.append(line[:-1])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
def label_to_color_image(label):
|
179 |
"""Adds color defined by the dataset colormap to the label.
|