김성주

updated data util module

......@@ -43,10 +43,10 @@ def parse_tfrecord(data):
def parse_record(features):
# tfrecord parser for TFRecordIterator (primitive data)
index = int(features['index'])
encoded_image = np.frombuffer(features['image'], dtype = np.uint8)
width = int(features['width'])
height = int(features['height'])
index = int(features['index'][0])
encoded_image = np.frombuffer(features['image'][0], dtype = np.uint8)
width = int(features['width'][0])
height = int(features['height'][0])
boxes = features['boxes']
assert len(boxes) % 5 == 0, 'Annotation error occured in box array.'
......@@ -56,7 +56,7 @@ def parse_record(features):
labels = []
for i in range(box_cnt):
label, x_min, y_min, x_max, y_max = int(boxes[i * 5]), float(boxes[i * 5 + 1]), float(boxes[i * 5 + 2]), float(boxes[i * 5 + 3])
label, x_min, y_min, x_max, y_max = int(boxes[i * 5]), float(boxes[i * 5 + 1]), float(boxes[i * 5 + 2]), float(boxes[i * 5 + 3]), float(boxes[i * 5 + 4])
aligned_boxes.append([x_min, y_min, x_max, y_max])
labels.append(label)
......