iMoonLab / MeshNet

MeshNet: Mesh Neural Network for 3D Shape Representation (AAAI 2019)
MIT License
333 stars 58 forks source link

Why the class index is different from modelnet40 ? #17

Closed cuge1995 closed 3 years ago

cuge1995 commented 3 years ago
all_classes = ['airplane', 'bathtub', 'bed', 'bench', 'bookshelf', 'bottle',
               'bowl', 'car', 'chair', 'cone', 'cup', 'curtain', 'desk', 'door',
               'dresser', 'flower_pot', 'glass_box', 'guitar', 'keyboard',
               'lamp', 'laptop', 'mantel', 'monitor', 'night_stand', 'person',
               'piano', 'plant', 'radio', 'range_hood', 'sink', 'sofa',
               'stairs', 'stool', 'table', 'tent', 'toilet', 'tv_stand', 'vase',
               'wardrobe', 'xbox']

but in your code:

type_to_index_map = {
    'night_stand': 0, 'range_hood': 1, 'plant': 2, 'chair': 3, 'tent': 4,
    'curtain': 5, 'piano': 6, 'dresser': 7, 'desk': 8, 'bed': 9,
    'sink': 10,  'laptop':11, 'flower_pot': 12, 'car': 13, 'stool': 14,
    'vase': 15, 'monitor': 16, 'airplane': 17, 'stairs': 18, 'glass_box': 19,
    'bottle': 20, 'guitar': 21, 'cone': 22,  'toilet': 23, 'bathtub': 24,
    'wardrobe': 25, 'radio': 26,  'person': 27, 'xbox': 28, 'bowl': 29,
    'cup': 30, 'door': 31,  'tv_stand': 32,  'mantel': 33, 'sofa': 34,
    'keyboard': 35, 'bookshelf': 36,  'bench': 37, 'table': 38, 'lamp': 39
}
thss15fyt commented 3 years ago

The original class index is in dictionary order, while our index depends on the order of function os.listdir(). If you wanted to load our pretrained model, the referred type_to_index_map should be used. Otherwise, you could use any order of class index.