IFMatch icon indicating copy to clipboard operation
IFMatch copied to clipboard

preprocess the template with the same way as train dataset results in wrong data structure and cause keyError in _get_template_info

Open herical opened this issue 2 years ago • 4 comments

I follow the Dataset and Pre-Processing part to prerocess train dataset and the template but I found that the "surface_pts_n_normal" result of template couldn't satisfied the need in _get_template_info. There are some codes in _get_template_info def _get_template_info(self): ... templ_surf_pth = './data/template/surface_pts_n_normal/%s.mat'%self.template_name templ_surf_mat = loadmat(templ_surf_pth) templ_surf_pc = templ_surf_mat['p'][:, :3] templ_trig_id = np.squeeze(templ_surf_mat['trig_id']) templ_baryc = templ_surf_mat['bary_coord'] ...

It seems that my templ_surf_mat has no key names "trig_id" or "bary_coord" File "<ipython-input-2-5376759be172>", line 1, in <module> templ_surf_mat['trig_id'] KeyError: 'trig_id' File "<ipython-input-3-27547a3a9825>", line 1, in <module> templ_surf_mat['bary_coord'] KeyError: 'bary_coord' The data structure of my templ_surf_mat is: {'__header__': b'MATLAB 5.0 MAT-file Platform: posix, Created on: Mon Oct 10 11:19:59 2022', '__version__': '1.0', '__globals__': [], 'p': array([[]])}

I wonder how to preprocess the template data correctly?

herical avatar Oct 10 '22 12:10 herical