Skip to content

Commit

Permalink
Merge pull request #286 from edenai/SD2-878-google-video-person-track…
Browse files Browse the repository at this point in the history
…ing-key-error

[fix] google video person tracking KeyError on landmark_tracking
  • Loading branch information
juandavidcruzgomez authored Dec 9, 2024
2 parents f0409eb + 1aaa08d commit e8c12ee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions edenai_apis/apis/google/google_video_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,11 @@ def video__person_tracking_async__get_job_result(
# Landmarks
landmark_output = {}
for land in time_stamped_object.get("landmarks", []):
landmark_output[land["name"]] = [
land["point"]["x"],
land["point"]["y"],
]
if landmark_name := land.get("name"):
landmark_output[landmark_name] = [
land["point"]["x"],
land["point"]["y"],
]
landmark_tracking = PersonLandmarks(
nose=landmark_output.get("nose", []),
eye_left=landmark_output.get("left_eye", []),
Expand Down

0 comments on commit e8c12ee

Please sign in to comment.