cheng-hust commited on
Commit
0da3b64
·
verified ·
1 Parent(s): f90adc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -85,8 +85,8 @@ def detect(img,thr=0.2):
85
  lab = labels[i][scr > thrh]
86
  box = boxes[i][scr > thrh]
87
 
88
- label_dict = {7:'person',6:'vehicle',5:'swimming-pool',4:'ship',3:'storage-tank',2:'bridge',1:'airplane'} #AITOD labels
89
- label_color_dict = {7:'red',6:'blue',5:'green',4:'yellow',3:'cyan',2:'magenta',1:'white'}
90
  for idx,b in enumerate(box):
91
  label_i = lab[idx].item()
92
  draw.rectangle(list(b), outline=label_color_dict[label_i], )
 
85
  lab = labels[i][scr > thrh]
86
  box = boxes[i][scr > thrh]
87
 
88
+ label_dict = {8:'wind-mill',7:'person',6:'vehicle',5:'swimming-pool',4:'ship',3:'storage-tank',2:'bridge',1:'airplane'} #AITOD labels
89
+ label_color_dict = {8:'cyan',7:'red',6:'blue',5:'green',4:'yellow',3:'cyan',2:'magenta',1:'white'}
90
  for idx,b in enumerate(box):
91
  label_i = lab[idx].item()
92
  draw.rectangle(list(b), outline=label_color_dict[label_i], )