Skip to content
Snippets Groups Projects
Commit d7c770d6 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Merge branch 'replay_fix' into 'master'

Fix replay database annotations loading

See merge request !17
parents 408cc1f5 8ac7d28e
No related branches found
No related tags found
1 merge request!17Fix replay database annotations loading
...@@ -151,13 +151,13 @@ class All(View): ...@@ -151,13 +151,13 @@ class All(View):
elif output == 'annotations': elif output == 'annotations':
annotations_list = [] annotations_list = []
for i in range(obj.annotations.shape[0]): for annotation in obj.annotations:
annotations_list.append({ annotations_list.append({
'frame_id': np.uint64(obj.annotations[i][0]), 'frame_id': np.uint64(annotation[0]),
'top-left-x': np.int32(obj.annotations[i][1]), 'top-left-x': np.int32(annotation[1]),
'top-left-y': np.int32(obj.annotations[i][2]), 'top-left-y': np.int32(annotation[2]),
'width': np.int32(obj.annotations[i][3]), 'width': np.int32(annotation[3]),
'height': np.int32(obj.annotations[i][4]) 'height': np.int32(annotation[4])
}) })
return { return {
...@@ -244,13 +244,13 @@ class Templates(View): ...@@ -244,13 +244,13 @@ class Templates(View):
elif output == 'annotations': elif output == 'annotations':
annotations_list = [] annotations_list = []
for i in range(obj.annotations.shape[0]): for annotation in obj.annotations:
annotations_list.append({ annotations_list.append({
'frame_id': np.uint64(obj.annotations[i][0]), 'frame_id': np.uint64(annotation[0]),
'top-left-x': np.int32(obj.annotations[i][1]), 'top-left-x': np.int32(annotation[1]),
'top-left-y': np.int32(obj.annotations[i][2]), 'top-left-y': np.int32(annotation[2]),
'width': np.int32(obj.annotations[i][3]), 'width': np.int32(annotation[3]),
'height': np.int32(obj.annotations[i][4]) 'height': np.int32(annotation[4])
}) })
return { return {
...@@ -348,13 +348,13 @@ class ProbesReal(View): ...@@ -348,13 +348,13 @@ class ProbesReal(View):
elif output == 'annotations': elif output == 'annotations':
annotations_list = [] annotations_list = []
for i in range(obj.annotations.shape[0]): for annotation in obj.annotations:
annotations_list.append({ annotations_list.append({
'frame_id': np.uint64(obj.annotations[i][0]), 'frame_id': np.uint64(annotation[0]),
'top-left-x': np.int32(obj.annotations[i][1]), 'top-left-x': np.int32(annotation[1]),
'top-left-y': np.int32(obj.annotations[i][2]), 'top-left-y': np.int32(annotation[2]),
'width': np.int32(obj.annotations[i][3]), 'width': np.int32(annotation[3]),
'height': np.int32(obj.annotations[i][4]) 'height': np.int32(annotation[4])
}) })
return { return {
...@@ -470,13 +470,13 @@ class ProbesAttack(View): ...@@ -470,13 +470,13 @@ class ProbesAttack(View):
elif output == 'annotations': elif output == 'annotations':
annotations_list = [] annotations_list = []
for i in range(obj.annotations.shape[0]): for annotation in obj.annotations:
annotations_list.append({ annotations_list.append({
'frame_id': np.uint64(obj.annotations[i][0]), 'frame_id': np.uint64(annotation[0]),
'top-left-x': np.int32(obj.annotations[i][1]), 'top-left-x': np.int32(annotation[1]),
'top-left-y': np.int32(obj.annotations[i][2]), 'top-left-y': np.int32(annotation[2]),
'width': np.int32(obj.annotations[i][3]), 'width': np.int32(annotation[3]),
'height': np.int32(obj.annotations[i][4]) 'height': np.int32(annotation[4])
}) })
return { return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment