vahidrezanezhad commited on
Commit
cdc00a0
·
verified ·
1 Parent(s): eef8577

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -31,10 +31,11 @@ def visualize_model_output(prediction):
31
  print(output.shape,'shape of output')
32
 
33
  for unq_class in unique_classes:
34
- rgb_class_unique = rgb_colors[str(unq_class)]
35
- output[:,:,0] = rgb_class_unique[0]
36
- output[:,:,1] = rgb_class_unique[1]
37
- output[:,:,2] = rgb_class_unique[2]
 
38
 
39
  return output
40
 
 
31
  print(output.shape,'shape of output')
32
 
33
  for unq_class in unique_classes:
34
+ print(unq_class,'unq_class')
35
+ rgb_class_unique = rgb_colors[str(int(unq_class))]
36
+ output[:,:,0][prediction[:,:,0]==unq_class] = rgb_class_unique[0]
37
+ output[:,:,1][prediction[:,:,0]==unq_class] = rgb_class_unique[1]
38
+ output[:,:,2][prediction[:,:,0]==unq_class] = rgb_class_unique[2]
39
 
40
  return output
41