def filter_dets(dets, thres):
    """
    Parameters
    ----------
    dets: 1 x k x 6
    thres: scalar, in [0, 1]
    """
    scores = dets[..., 4]  # 1 x k
    
    mask = scores >= thres  # 1 x k
    filtered_dets = dets[mask]  # k' x 6
    return filtered_dets.view(1, -1, 6)