Skip to content
Snippets Groups Projects
Commit 23f93bd6 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'msumfsdmod' into 'master'

[msu_mfsd_mod] Fix annotations

See merge request !23
parents ffe11ae4 dfce1f71
No related branches found
No related tags found
1 merge request!23[msu_mfsd_mod] Fix annotations
Pipeline #
......@@ -52,13 +52,12 @@ class MsuMfsdModBioDatabase(BioDatabase):
Will return the bounding box annotation of nth frame of the video.
"""
fn = myfile._f.framen
# Frame index, 4 coordinates of the face rectangle (left, top, right,
# bottom), 4 coordinates of the left and right eyes (xleft, yleft
# xright, yright).
annots = myfile._f._f.bbx(directory=self.original_directory)
# convert width and height to bottomright coordinates
# bob uses the (y, x) format
topleft = (annots[fn][1], annots[fn][0])
bottomright = (annots[fn][1] + annots[fn][3],
annots[fn][0] + annots[fn][2])
annotations = {'topleft': topleft, 'bottomright': bottomright}
annotations = {'leye': (annots[fn][8], annots[fn][7]),
'reye': (annots[fn][6], annots[fn][5])}
return annotations
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
......
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