Skip to content
Snippets Groups Projects

Several features

Merged Tiago de Freitas Pereira requested to merge pytorch-datasets into master
Compare and
28 files
+ 2130
33
Compare changes
  • Side-by-side
  • Inline
Files
28
@@ -15,8 +15,8 @@ def bounding_box_to_annotations(bbx):
A dictionary with topleft and bottomright keys.
"""
landmarks = {
'topleft': bbx.topleft,
'bottomright': bbx.bottomright,
"topleft": bbx.topleft,
"bottomright": bbx.bottomright,
}
return landmarks
@@ -38,10 +38,11 @@ def min_face_size_validator(annotations, min_face_size=(32, 32)):
"""
if not annotations:
return False
for source in ('direct', 'eyes', None):
for source in ("direct", "eyes", None):
try:
bbx = bob.ip.facedetect.bounding_box_from_annotation(
source=source, **annotations)
source=source, **annotations
)
break
except Exception:
if source is None:
@@ -59,6 +60,7 @@ from .bobipfacedetect import BobIpFacedetect
from .bobipflandmark import BobIpFlandmark
from .bobipmtcnn import BobIpMTCNN
from .bobiptinyface import BobIpTinyface
from .faceX_106landmarks import FaceX106Landmarks, FaceXDetector
# gets sphinx autodoc done right - don't remove it
@@ -88,4 +90,4 @@ __appropriate__(
BobIpTinyface,
)
__all__ = [_ for _ in dir() if not _.startswith('_')]
\ No newline at end of file
__all__ = [_ for _ in dir() if not _.startswith("_")]
Loading