Skip to content

Commit

Permalink
Update vision.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMurd committed Jan 15, 2024
1 parent e873469 commit 7d117a3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ghunt/parsers/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def __init__(self):
self.face_annotations: List[VisionFaceAnnotation] = []

def _scrape(self, vision_data: Dict[str, any]):
for face_data in vision_data["faceAnnotations"]:
face_annotation = VisionFaceAnnotation()
face_annotation._scrape(face_data)
self.face_annotations.append(face_annotation)
if 'faceAnnotations' in vision_data:
for face_data in vision_data["faceAnnotations"]:
face_annotation = VisionFaceAnnotation()
face_annotation._scrape(face_data)
self.face_annotations.append(face_annotation)
else:
print("No face annotations found in the vision data.")

0 comments on commit 7d117a3

Please sign in to comment.