(box_encodings, anchors, encode_angle_to_vector=False, smooth_dim=False)
return torch.cat([xg, yg, zg, wg, lg, hg, rg], dim=-1)
box decode for VoxelNet in lidar
    Args:
        boxes ([N, 7] Tensor): normal boxes: x, y, z, w, l, h, r
        anchors ([N, 7] Tensor): anchors
box decode for VoxelNet in lidar
    Args:
        boxes ([N, 7] Tensor): normal boxes: x, y, z, w, l, h, r
        anchors ([N, 7] Tensor): anchors
box decode for VoxelNet in lidar Args : boxes ( [ N 7 ] Tensor ) : normal boxes : x y z w l h r anchors ( [ N 7 ] Tensor ) : anchors
def second_box_decode(box_encodings, anchors, encode_angle_to_vector=False, smooth_dim=False):
    """box decode for VoxelNet in lidar
    Args:
        boxes ([N, 7] Tensor): normal boxes: x, y, z, w, l, h, r
        anchors ([N, 7] Tensor): anchors
    """
    xa, ya, za, wa, la, ha, ra = torch.split(anchors, 1, dim=-1)
    if encode_angle_to_vector:
        xt, yt, zt, wt, lt, ht, rtx, rty = torch.split(
            box_encodings, 1, dim=-1)

    else:
        xt, yt, zt, wt, lt, ht, rt = torch.split(box_encodings, 1, dim=-1)

    # xt, yt, zt, wt, lt, ht, rt = torch.split(box_encodings, 1, dim=-1)
    za = za + ha / 2
    diagonal = torch.sqrt(la**2 + wa**2)
    xg = xt * diagonal + xa
    yg = yt * diagonal + ya
    zg = zt * ha + za
    if smooth_dim:
        lg = (lt + 1) * la
        wg = (wt + 1) * wa
        hg = (ht + 1) * ha
    else:

        lg = torch.exp(lt) * la
        wg = torch.exp(wt) * wa
        hg = torch.exp(ht) * ha
    if encode_angle_to_vector:
        rax = torch.cos(ra)
        ray = torch.sin(ra)
        rgx = rtx + rax
        rgy = rty + ray
        rg = torch.atan2(rgy, rgx)
    else:
        rg = rt + ra
    zg = zg - hg / 2
    return torch.cat([xg, yg, zg, wg, lg, hg, rg], dim=-1)
def second_box_decode ( box_encodings , anchors , encode_angle_to_vector = False , smooth_dim = False ) : xa , ya , za , wa , la , ha , ra = torch . split ( anchors , 1 , dim = - 1 ) if encode_angle_to_vector : xt , yt , zt , wt , lt , ht , rtx , rty = torch . split ( box_encodings , 1 , dim = - 1 ) else : xt , yt , zt , wt , lt , ht , rt = torch . split ( box_encodings , 1 , dim = - 1 ) # xt, yt, zt, wt, lt, ht, rt = torch.split(box_encodings, 1, dim=-1) za = za + ha / 2 diagonal = torch . sqrt ( la ** 2 + wa ** 2 ) xg = xt * diagonal + xa yg = yt * diagonal + ya zg = zt * ha + za if smooth_dim : lg = ( lt + 1 ) * la wg = ( wt + 1 ) * wa hg = ( ht + 1 ) * ha else : lg = torch . exp ( lt ) * la wg = torch . exp ( wt ) * wa hg = torch . exp ( ht ) * ha if encode_angle_to_vector : rax = torch . cos ( ra ) ray = torch . sin ( ra ) rgx = rtx + rax rgy = rty + ray rg = torch . atan2 ( rgy , rgx ) else : rg = rt + ra zg = zg - hg / 2 return torch . cat ( [ xg , yg , zg , wg , lg , hg , rg ] , dim = - 1 )