stupidog04 commited on
Commit
c139569
·
1 Parent(s): 52ea582

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -63,11 +63,6 @@ def inference(video, lang, time_step):
63
  # Match bboxes to position and store the text read by OCR
64
  while success:
65
  if count % (int(frame_rate * time_step)) == 0:
66
- if count % (int(frame_rate * time_step) * 30) == 0:
67
- # update the largest boxes every 30 frames
68
- bounds = reader.readtext(frame)
69
- largest_boxes = sorted(bounds, key=lambda x: box_size(x), reverse=True)
70
- positions = [box_position(b) for b in largest_boxes]
71
  for i, box in enumerate(largest_boxes):
72
  bbox_pos = box_position(box)
73
  if np.linalg.norm(np.array(bbox_pos) - np.array(positions[i])) < 50:
 
63
  # Match bboxes to position and store the text read by OCR
64
  while success:
65
  if count % (int(frame_rate * time_step)) == 0:
 
 
 
 
 
66
  for i, box in enumerate(largest_boxes):
67
  bbox_pos = box_position(box)
68
  if np.linalg.norm(np.array(bbox_pos) - np.array(positions[i])) < 50: