mp-02 commited on
Commit
a5a236f
1 Parent(s): 74fb3a1

Update sroie_inference.py

Browse files
Files changed (1) hide show
  1. sroie_inference.py +2 -2
sroie_inference.py CHANGED
@@ -86,11 +86,11 @@ def prediction(image):
86
  d = {k: v.strip() for (k, v) in d.items()}
87
 
88
  if "O" in d: d.pop("O")
89
- if "TOTAL" in d: d.pop("TOTAL")
90
 
91
  blur_boxes = []
92
  for prediction, box in zip(true_predictions, true_boxes):
93
- if prediction != 'O' and prediction != 'TOTAL':
94
  blur_boxes.append(box)
95
 
96
  image = (blur(image, blur_boxes))
 
86
  d = {k: v.strip() for (k, v) in d.items()}
87
 
88
  if "O" in d: d.pop("O")
89
+ if "S-TOTAL" in d: d.pop("S-TOTAL")
90
 
91
  blur_boxes = []
92
  for prediction, box in zip(true_predictions, true_boxes):
93
+ if prediction != 'O' and prediction != 'S-TOTAL':
94
  blur_boxes.append(box)
95
 
96
  image = (blur(image, blur_boxes))