add-script-to-query-AI-model #17
@@ -58,19 +58,19 @@ class AnnotationRepository(MinioAdapter, AnnotationRepositoryInterface):
|
||||
data_str = buffer.read().decode(self.encoding)
|
||||
data = json.loads(data_str)
|
||||
annotation = Annotation(
|
||||
angle=AngleEnum(data["angle"]),
|
||||
angle=AngleEnum(data["angle"]) if data["angle"] is not None else None,
|
||||
angle_uncertainty=bool(data["angle_uncertainty"]),
|
||||
colour=ColourEnum(data["colour"]),
|
||||
colour=ColourEnum(data["colour"]) if data["colour"] is not None else None,
|
||||
colour_uncertainty=bool(data["colour_uncertainty"]),
|
||||
contact=ContactEnum(data["contact"]),
|
||||
contact=ContactEnum(data["contact"]) if data["contact"] is not None else None,
|
||||
contact_uncertainty=bool(data["contact_uncertainty"]),
|
||||
depth=DepthEnum(data["depth"]),
|
||||
depth=DepthEnum(data["depth"]) if data["depth"] is not None else None,
|
||||
depth_uncertainty=bool(data["depth_uncertainty"]),
|
||||
distance=DistanceEnum(data["distance"]),
|
||||
distance=DistanceEnum(data["distance"]) if data["distance"] is not None else None,
|
||||
distance_uncertainty=bool(data["distance_uncertainty"]),
|
||||
lighting=LightingEnum(data["lighting"]),
|
||||
lighting=LightingEnum(data["lighting"]) if data["lighting"] is not None else None,
|
||||
lighting_uncertainty=bool(data["lighting_uncertainty"]),
|
||||
point_of_view=PointOfViewEnum(data["point_of_view"]),
|
||||
point_of_view=PointOfViewEnum(data["point_of_view"]) if data["point_of_view"] is not None else None,
|
||||
point_of_view_uncertainty=bool(data["point_of_view_uncertainty"]),
|
||||
)
|
||||
except (KeyError, ValueError) as e:
|
||||
|
||||
Reference in New Issue
Block a user