Skip to content
Snippets Groups Projects

[msu_mfsd_mod] Fix annotations

Merged Amir MOHAMMADI requested to merge msumfsdmod into master
1 file
+ 5
6
Compare changes
  • Side-by-side
  • Inline
@@ -52,13 +52,12 @@ class MsuMfsdModBioDatabase(BioDatabase):
@@ -52,13 +52,12 @@ class MsuMfsdModBioDatabase(BioDatabase):
Will return the bounding box annotation of nth frame of the video.
Will return the bounding box annotation of nth frame of the video.
"""
"""
fn = myfile._f.framen
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)
annots = myfile._f._f.bbx(directory=self.original_directory)
# convert width and height to bottomright coordinates
annotations = {'leye': (annots[fn][8], annots[fn][7]),
# bob uses the (y, x) format
'reye': (annots[fn][6], annots[fn][5])}
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}
return annotations
return annotations
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
Loading