def _closest_object_x_location_pp(x):
    """Predict the absolute x position of the closest object."""
    # Label distribution:

    # Location feature contains (x, y, z) in meters w.r.t. the camera.
    idx = tf.math.argmin(x['objects']['location'][:, 2])
    xloc = x['objects']['location'][idx, 0]
    thrs = np.array([-100, -6.4, -3.5, 0.0, 3.3, 23.9])
    label = tf.reduce_max(tf.where((thrs - xloc) < 0))
    return {'image': x['image'], 'label': label}
Predict the absolute x position of the closest object.
clip_benchmark/clip_benchmark/datasets/kitti.py