def from_dict(cls, obj: dict) -> PredictionSingletonInstanceSegmentationAllOf:
        """Create an instance of PredictionSingletonInstanceSegmentationAllOf from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return PredictionSingletonInstanceSegmentationAllOf.parse_obj(obj)

        # raise errors for additional fields in the input
        for _key in obj.keys():
            if _key not in cls.__properties:
                raise ValueError("Error due to additional fields (not defined in PredictionSingletonInstanceSegmentationAllOf) in the input: " + str(obj))

        _obj = PredictionSingletonInstanceSegmentationAllOf.parse_obj({
            "segmentation": obj.get("segmentation"),
            "bbox": obj.get("bbox"),
            "probabilities": obj.get("probabilities")
        })
        return _obj
Create an instance of PredictionSingletonInstanceSegmentationAllOf from a dict
lightly/openapi_generated/swagger_client/models/prediction_singleton_instance_segmentation_all_of.py