Commit 89c0b87c authored by Anjith GEORGE's avatar Anjith GEORGE

Save the reprojected annotations

parent 76d9c6f0
Pipeline #39055 failed with stage
in 5 minutes and 51 seconds
......@@ -335,7 +335,7 @@ class HQWMCAPadDatabase(PadDatabase):
for ii, sk in enumerate(sorted_keys):
rep_frame_annotations[sk]=[rep_image_points[ii,:][0],rep_image_points[ii,:][1]]
rep_frame_annotations[sk]=[int(rep_image_points[ii,:][0]),int(rep_image_points[ii,:][1])]
if rep_frame_annotations:
......@@ -348,6 +348,14 @@ class HQWMCAPadDatabase(PadDatabase):
print('rep_annotations.keys', rep_annotations.keys(), rep_annotations)
r_file_path=file_path.replace('raw_annotations','rep_annotations')
bob.io.base.create_directories_safe(directory=os.path.split(r_file_path)[0], dryrun=False)
with open(r_file_path, 'w+') as json_file:
json_file.write(json.dumps(rep_annotations))
if len(rep_annotations.keys()) < 2:
print('KEYS LESSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...........')
return rep_annotations
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment