Changed labels to float

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-05-22 15:01:50 +02:00
parent ca33f77ecc
commit 693fb4d55c

View File

@ -264,11 +264,11 @@ def load_scenenet_val(photo_paths: Sequence[Sequence[str]],
for instance in frame_instances: for instance in frame_instances:
bbox = instance['bbox'] bbox = instance['bbox']
labels.append([ labels.append([
cats_to_classes[instance['coco_id']], float(cats_to_classes[instance['coco_id']]),
bbox[0], # x min float(bbox[0]), # x min
bbox[1], # y min float(bbox[1]), # y min
bbox[2], # x max float(bbox[2]), # x max
bbox[3], # y max float(bbox[3]), # y max
]) ])
len_labels = len(labels) len_labels = len(labels)
@ -278,7 +278,7 @@ def load_scenenet_val(photo_paths: Sequence[Sequence[str]],
final_image_paths.append(image_path) final_image_paths.append(image_path)
final_labels.append(labels) final_labels.append(labels)
empty_label = [[-1, 0, 0, 0, 0]] empty_label = [[-1.0, 0.0, 0.0, 0.0, 0.0]]
real_final_labels = [] real_final_labels = []
for labels in final_labels: for labels in final_labels:
_labels = labels[:] _labels = labels[:]