Skip to content

Commit

Permalink
read bounding boxes from file
Browse files Browse the repository at this point in the history
  • Loading branch information
DragosBobolea committed Sep 22, 2019
1 parent e44b5da commit 71d6540
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bounding_box_helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import os
import numpy as np


def load_bounding_boxes(filepath):
with open(filepath,'r') as f:
text = f.read()
lines = text.split('\n')
boxes = np.array([line.split('\t')[:4] for line in lines if line],dtype=np.int32)

return boxes

0 comments on commit 71d6540

Please sign in to comment.