6
0

MediaImageLabel.py 313 B

12345678910
  1. from pycs.database.Result import Result
  2. class MediaImageLabel:
  3. def __init__(self, result: Result):
  4. self.label = result.label
  5. self.frame = result.data['frame'] if 'frame' in result.data else None
  6. def serialize(self) -> dict:
  7. return dict({'type': 'image-label'}, **self.__dict__)