MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / evaluate

Method evaluate

monai/auto3dseg/operations.py:86–103  ·  view source on GitHub ↗

Applies the callables to the data, and convert the numerics to list or Python numeric types (int/float). Args: data: input data

(self, data: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

84 }
85
86 def evaluate(self, data: Any, **kwargs: Any) -> dict:
87 """
88 Applies the callables to the data, and convert the
89 numerics to list or Python numeric types (int/float).
90
91 Args:
92 data: input data
93 """
94 ret = super().evaluate(data, **kwargs)
95 for k, v in self.data_addon.items():
96 cache = v[0]
97 idx = v[1]
98 if isinstance(v, tuple) and cache in ret:
99 ret.update({k: ret[cache][idx]})
100
101 for k, v in ret.items():
102 ret[k] = v.tolist() # type: ignore
103 return ret
104
105
106class SummaryOperations(Operations):

Callers 1

Calls 2

evaluateMethod · 0.45
updateMethod · 0.45

Tested by 1