Commit 3968a435 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

[FaceCrop] Fix right and left eye positions

parent d03eb424
......@@ -11,7 +11,6 @@ database = DatabaseConnector(
IJBCBioDatabase(original_directory=ijbc_directory, protocol="1:1"),
annotation_type = "eyes-center",
fixed_positions = None,
allow_scoring_with_all_biometric_references = False
)
#ijbc_covariates = DatabaseConnector(
......
......@@ -125,8 +125,8 @@ class FaceCrop(Base):
if cropped_positions == "eyes-center":
eyes_distance = (face_size + 1) / 2.0
eyes_center = (face_size / 4.0, (face_size - 0.5) / 2.0)
right_eye = (eyes_center[0], eyes_center[1] + eyes_distance / 2)
left_eye = (eyes_center[0], eyes_center[1] - eyes_distance / 2)
right_eye = (eyes_center[0], eyes_center[1] - eyes_distance / 2)
left_eye = (eyes_center[0], eyes_center[1] + eyes_distance / 2)
cropped_positions = {"reye": right_eye, "leye": left_eye}
elif cropped_positions == "bounding-box":
......@@ -162,7 +162,9 @@ class FaceCrop(Base):
self.mask_sigma = mask_sigma
self.mask_neighbors = mask_neighbors
self.mask_seed = mask_seed
self.annotator = load_resource(annotator, "annotator")
if isinstance(annotator, str):
annotator = load_resource(annotator, "annotator")
self.annotator = annotator
self.allow_upside_down_normalized_faces = allow_upside_down_normalized_faces
# create objects required for face cropping
......
......@@ -25,7 +25,6 @@ def __appropriate__(*args):
__appropriate__(
Base,
FaceCrop,
FaceDetect,
TanTriggs,
INormLBP,
HistogramEqualization,
......
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