Updated API and tests

This commit is contained in:
kinaryml 2023-03-14 22:32:39 -07:00
parent 23681cde0d
commit d83f400b08
2 changed files with 14 additions and 15 deletions

View File

@ -207,20 +207,20 @@ class HandLandmarkerTest(parameterized.TestCase):
_PORTRAIT_EXPECTED_FACE_LANDMARKS_WITH_ATTENTION), _PORTRAIT_EXPECTED_FACE_LANDMARKS_WITH_ATTENTION),
_get_expected_face_blendshapes( _get_expected_face_blendshapes(
_PORTRAIT_EXPECTED_BLENDSHAPES), None), _PORTRAIT_EXPECTED_BLENDSHAPES), None),
# (ModelFileType.FILE_NAME, (ModelFileType.FILE_NAME,
# _FACE_LANDMARKER_WITH_BLENDSHAPES_BUNDLE_ASSET_FILE, _FACE_LANDMARKER_WITH_BLENDSHAPES_BUNDLE_ASSET_FILE,
# _get_expected_face_landmarks( _get_expected_face_landmarks(
# _PORTRAIT_EXPECTED_FACE_LANDMARKS_WITH_ATTENTION), _PORTRAIT_EXPECTED_FACE_LANDMARKS_WITH_ATTENTION),
# _get_expected_face_blendshapes( _get_expected_face_blendshapes(
# _PORTRAIT_EXPECTED_BLENDSHAPES), _PORTRAIT_EXPECTED_BLENDSHAPES),
# _make_expected_facial_transformation_matrixes()), _make_expected_facial_transformation_matrixes()),
# (ModelFileType.FILE_CONTENT, (ModelFileType.FILE_CONTENT,
# _FACE_LANDMARKER_WITH_BLENDSHAPES_BUNDLE_ASSET_FILE, _FACE_LANDMARKER_WITH_BLENDSHAPES_BUNDLE_ASSET_FILE,
# _get_expected_face_landmarks( _get_expected_face_landmarks(
# _PORTRAIT_EXPECTED_FACE_LANDMARKS_WITH_ATTENTION), _PORTRAIT_EXPECTED_FACE_LANDMARKS_WITH_ATTENTION),
# _get_expected_face_blendshapes( _get_expected_face_blendshapes(
# _PORTRAIT_EXPECTED_BLENDSHAPES), _PORTRAIT_EXPECTED_BLENDSHAPES),
# _make_expected_facial_transformation_matrixes()) _make_expected_facial_transformation_matrixes())
) )
def test_detect(self, model_file_type, model_name, expected_face_landmarks, def test_detect(self, model_file_type, model_name, expected_face_landmarks,
expected_face_blendshapes, expected_facial_transformation_matrix): expected_face_blendshapes, expected_facial_transformation_matrix):

View File

@ -162,7 +162,6 @@ def _build_landmarker_result(
facial_transformation_matrixes_results = [] facial_transformation_matrixes_results = []
if _FACE_GEOMETRY_STREAM_NAME in output_packets: if _FACE_GEOMETRY_STREAM_NAME in output_packets:
print(output_packets[_FACE_GEOMETRY_STREAM_NAME])
facial_transformation_matrixes_proto_list = packet_getter.get_proto_list( facial_transformation_matrixes_proto_list = packet_getter.get_proto_list(
output_packets[_FACE_GEOMETRY_STREAM_NAME]) output_packets[_FACE_GEOMETRY_STREAM_NAME])
for proto in facial_transformation_matrixes_proto_list: for proto in facial_transformation_matrixes_proto_list: