vis4d.eval.common.depth
Depth estimation evaluator.
Classes
|
Depth estimation evaluator. |
- class DepthEvaluator(min_depth=0.0, max_depth=80.0, scale=1.0, epsilon=0.001)[source]
Depth estimation evaluator.
- __init__(min_depth=0.0, max_depth=80.0, scale=1.0, epsilon=0.001)[source]
Initialize the optical flow evaluator.
- Parameters:
min_depth (float) – Minimum depth to evaluate. Defaults to 0.001.
max_depth (float) – Maximum depth to evaluate. Defaults to 80.0.
scale (float) – Scale factor for depth. Defaults to 1.0.
epsilon (float) – Small value to avoid logarithms of small values. Defaults to 1e-3.
- property metrics: list[str]
Supported metrics.
- process_batch(prediction, groundtruth)[source]
Process a batch of data.
- Parameters:
prediction (np.array) – Prediction optical flow, in shape (B, H, W).
groundtruth (np.array) – Target optical flow, in shape (B, H, W).
- Return type:
None
- evaluate(metric)[source]
Evaluate predictions.
Returns a dict containing the raw data and a short description string containing a readablae result.
- Parameters:
metric (str) – Metric to use. See @property metric
- Return type:
tuple[Dict[str,Union[float,int,Tensor]],str]- Returns:
metric_data, description tuple containing the metric data (dict with metric name and value) as well as a short string with shortened information.
- Raises:
RuntimeError – if no data has been registered to be evaluated.
ValueError – if metric is not supported.