Depth Accuracy Metrics

~10 mincode completion

Implement depth_metrics(pred, gt) returning the array [abs_rel, delta1, within5]. Predictions are positive.

Where this shows up

~10 min

8 employers weight this skill

4 autonomy companies, 1 defense company, 1 health and bio company, 1 enterprise vendor, 1 AI product company. Top match scores 93.

Python
import numpy as np


def depth_metrics(pred, gt):
    """
    Absolute relative error, delta < 1.25 accuracy, and the within-5% share.

    Args:
        pred: predicted depths, any shape, all positive
        gt:   ground-truth depths, same shape; values <= 0 are invalid
              (at least one value is valid)

    Returns:
        array [abs_rel, delta1, within5]
    """
    # YOUR CODE HERE
    pass
Loading docs…

The AI Mentor needs an account

It reads your code and the failing tests and nudges you toward the fix without handing you the answer. Free accounts get it on every problem you're working on today.