BLAME#


class invertedai.api.BlameResponse(*, agents_at_fault: Optional[Tuple[int, ...]], reasons: Optional[Dict[int, List[str]]], confidence_score: Optional[float], birdviews: Optional[List[Image]])[source]#

Response returned from an API call to iai.blame().

agents_at_fault: Optional[Tuple[int, ...]]#

A tuple containing all agents predicted to be at fault. If empty, BLAME has predicated no agents are at fault.

birdviews: Optional[List[Image]]#

If get_birdviews was set, this contains the resulting image.

confidence_score: Optional[float]#

Float value between [0,1] indicating BLAME’s confidence in the response where 0.0 represents the minimum confidence and 1.0 represents maximum.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'agents_at_fault': FieldInfo(annotation=Union[Tuple[int, ...], NoneType], required=True), 'birdviews': FieldInfo(annotation=Union[List[invertedai.common.Image], NoneType], required=True), 'confidence_score': FieldInfo(annotation=Union[float, NoneType], required=True), 'reasons': FieldInfo(annotation=Union[Dict[int, List[str]], NoneType], required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

reasons: Optional[Dict[int, List[str]]]#

A dictionary with agent IDs as keys corresponding to “agents_at_fault” paired with a list of reasons why the keyed agent is at fault (e.g. traffic_light_violation).