<reponame>anhquancao/xmuda-extend
import numpy as np
import torch

semantic_kitti_class_frequencies = np.array([5.41773033e+09, 1.57835390e+07, 1.25136000e+05, 1.18809000e+05, 
                              6.46799000e+05, 8.21951000e+05, 2.62978000e+05, 2.83696000e+05, 
                              2.04750000e+05, 6.16887030e+07, 4.50296100e+06, 4.48836500e+07, 
                              2.26992300e+06, 5.68402180e+07, 1.57196520e+07, 1.58442623e+08, 
                              2.06162300e+06, 3.69705220e+07, 1.15198800e+06, 3.34146000e+05])
class_weights = torch.FloatTensor([0.05, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
class_weights_2d = torch.tensor([[2.451535,   1.61722757, 3.76430508, 3.30470327, 2.70467675, 2.66727774,
                                  3.35100329, 3.53497056, 3.51571106, 1.,         2.12430303, 1.30751046,
                                  2.56581265, 1.4156228,  1.49546134, 1.05270659, 2.30553103, 1.53045148,
                                  2.55582273, 3.07786581]])
kitti_class_names = ['empty', 'car', 'bicycle', 'motorcycle', 'truck', 
               'other-vehicle', 'person', 'bicyclist', 'motorcyclist', 
               'road', 'parking', 'sidewalk', 'other-ground', 'building', 
               'fence', 'vegetation', 'trunk', 'terrain', 'pole', 'traffic-sign']


kitti_class_cluster_4 = {
    # 'empty', 
    0: 0,
    # 'car', 
    1: 3,
    # 'bicycle', 
    2: 3,
    # 'motorcycle', 
    3: 3,
    # 'truck', 
    4: 3,
    # 'other-vehicle', 
    5: 3,
    # 'person', 
    6: 3,
    # 'bicyclist', 
    7: 3,
    # 'motorcyclist', 
    8: 3,
    # 'road', 
    9: 1,
    # 'parking', 
    10: 1,
    # 'sidewalk', 
    11: 1,
    # 'other-ground', 
    12: 1,
    # 'building', 
    13: 2,
    # 'fence', 
    14: 2,
    # 'vegetation',
    15: 2,
    # 'trunk',
    16: 2,
    # 'terrain',
    17: 2,
    # 'pole', 
    18: 2,
    # 'traffic-sign'
    19: 2,
}

kitti_class_cluster_6 = {
    # 'empty', 
    0: 0,
    # 'car', 
    1: 3,
    # 'bicycle', 
    2: 5,
    # 'motorcycle', 
    3: 5,
    # 'truck', 
    4: 3,
    # 'other-vehicle', 
    5: 3,
    # 'person', 
    6: 5,
    # 'bicyclist', 
    7: 5,
    # 'motorcyclist', 
    8: 5,
    # 'road', 
    9: 1,
    # 'parking', 
    10: 1,
    # 'sidewalk', 
    11: 1,
    # 'other-ground', 
    12: 1,
    # 'building', 
    13: 2,
    # 'fence', 
    14: 2,
    # 'vegetation',
    15: 2,
    # 'trunk',
    16: 4,
    # 'terrain',
    17: 1,
    # 'pole', 
    18: 4,
    # 'traffic-sign'
    19: 4,
}
import numpy as np
import torch

semantic_kitti_class_frequencies = np.array([5.41773033e+09, 1.57835390e+07, 1.25136000e+05, 1.18809000e+05, 
                              6.46799000e+05, 8.21951000e+05, 2.62978000e+05, 2.83696000e+05, 
                              2.04750000e+05, 6.16887030e+07, 4.50296100e+06, 4.48836500e+07, 
                              2.26992300e+06, 5.68402180e+07, 1.57196520e+07, 1.58442623e+08, 
                              2.06162300e+06, 3.69705220e+07, 1.15198800e+06, 3.34146000e+05])
class_weights = torch.FloatTensor([0.05, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
class_weights_2d = torch.tensor([[2.451535,   1.61722757, 3.76430508, 3.30470327, 2.70467675, 2.66727774,
                                  3.35100329, 3.53497056, 3.51571106, 1.,         2.12430303, 1.30751046,
                                  2.56581265, 1.4156228,  1.49546134, 1.05270659, 2.30553103, 1.53045148,
                                  2.55582273, 3.07786581]])
kitti_class_names = ['empty', 'car', 'bicycle', 'motorcycle', 'truck', 
               'other-vehicle', 'person', 'bicyclist', 'motorcyclist', 
               'road', 'parking', 'sidewalk', 'other-ground', 'building', 
               'fence', 'vegetation', 'trunk', 'terrain', 'pole', 'traffic-sign']


kitti_class_cluster_4 = {
    # 'empty', 
    0: 0,
    # 'car', 
    1: 3,
    # 'bicycle', 
    2: 3,
    # 'motorcycle', 
    3: 3,
    # 'truck', 
    4: 3,
    # 'other-vehicle', 
    5: 3,
    # 'person', 
    6: 3,
    # 'bicyclist', 
    7: 3,
    # 'motorcyclist', 
    8: 3,
    # 'road', 
    9: 1,
    # 'parking', 
    10: 1,
    # 'sidewalk', 
    11: 1,
    # 'other-ground', 
    12: 1,
    # 'building', 
    13: 2,
    # 'fence', 
    14: 2,
    # 'vegetation',
    15: 2,
    # 'trunk',
    16: 2,
    # 'terrain',
    17: 2,
    # 'pole', 
    18: 2,
    # 'traffic-sign'
    19: 2,
}

kitti_class_cluster_6 = {
    # 'empty', 
    0: 0,
    # 'car', 
    1: 3,
    # 'bicycle', 
    2: 5,
    # 'motorcycle', 
    3: 5,
    # 'truck', 
    4: 3,
    # 'other-vehicle', 
    5: 3,
    # 'person', 
    6: 5,
    # 'bicyclist', 
    7: 5,
    # 'motorcyclist', 
    8: 5,
    # 'road', 
    9: 1,
    # 'parking', 
    10: 1,
    # 'sidewalk', 
    11: 1,
    # 'other-ground', 
    12: 1,
    # 'building', 
    13: 2,
    # 'fence', 
    14: 2,
    # 'vegetation',
    15: 2,
    # 'trunk',
    16: 4,
    # 'terrain',
    17: 1,
    # 'pole', 
    18: 4,
    # 'traffic-sign'
    19: 4,
}
# 'empty', # 'car', # 'bicycle', # 'motorcycle', # 'truck', # 'other-vehicle', # 'person', # 'bicyclist', # 'motorcyclist', # 'road', # 'parking', # 'sidewalk', # 'other-ground', # 'building', # 'fence', # 'vegetation', # 'trunk', # 'terrain', # 'pole', # 'traffic-sign' # 'empty', # 'car', # 'bicycle', # 'motorcycle', # 'truck', # 'other-vehicle', # 'person', # 'bicyclist', # 'motorcyclist', # 'road', # 'parking', # 'sidewalk', # 'other-ground', # 'building', # 'fence', # 'vegetation', # 'trunk', # 'terrain', # 'pole', # 'traffic-sign'