Skip to content

Commit

Permalink
feat: Implement validate_empty_frames
Browse files Browse the repository at this point in the history
  • Loading branch information
nalquas authored and tklockau committed Oct 28, 2024
1 parent 6230564 commit d44b143
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ def validate_empty_frames(scene: raillabel.Scene) -> List[str]:
Returns
-------
list[str]
list of all onthology errors in the scene. If an empty list is returned, then there are no
list of all empty frame errors in the scene. If an empty list is returned, then there are no
errors present.
"""
errors: List[str] = []

for frame_uid, frame in scene.frames.items():
if _is_frame_empty(frame):
errors.append("Frame " + str(frame_uid) + " has no annotations!")

return errors


def _is_frame_empty(frame: raillabel.format.Frame) -> bool:
Expand Down

0 comments on commit d44b143

Please sign in to comment.