oskarastrom commited on
Commit
5c03d26
·
1 Parent(s): c1b62e3

Update detect_frames.py

Browse files
Files changed (1) hide show
  1. scripts/detect_frames.py +4 -0
scripts/detect_frames.py CHANGED
@@ -77,6 +77,7 @@ def detect(in_seq_dir, out_seq_dir, model, device, verbose):
77
  else:
78
  inference_list.append(tensor)
79
  pbar.update(1)
 
80
 
81
  print('converted tensor')
82
  json_obj = {
@@ -85,10 +86,13 @@ def detect(in_seq_dir, out_seq_dir, model, device, verbose):
85
  'width': width,
86
  'height': height
87
  }
 
88
  json_string = json.dumps(json_obj)
 
89
 
90
  with open(os.path.join(out_seq_dir, 'pred.json'), 'w') as f:
91
  f.write(json_string)
 
92
 
93
  def argument_parser():
94
  parser = argparse.ArgumentParser()
 
77
  else:
78
  inference_list.append(tensor)
79
  pbar.update(1)
80
+ pbar.close()
81
 
82
  print('converted tensor')
83
  json_obj = {
 
86
  'width': width,
87
  'height': height
88
  }
89
+ print('created object')
90
  json_string = json.dumps(json_obj)
91
+ print('created string')
92
 
93
  with open(os.path.join(out_seq_dir, 'pred.json'), 'w') as f:
94
  f.write(json_string)
95
+ print('saved string')
96
 
97
  def argument_parser():
98
  parser = argparse.ArgumentParser()