Self-Supervised-Multimodal-Shape-Matching icon indicating copy to clipboard operation
Self-Supervised-Multimodal-Shape-Matching copied to clipboard

A little bug about the result saving

Open Connaught0 opened this issue 2 years ago • 0 comments

# visualize results
            if self.opt.get('visualize', False):
                data_x, data_y = data['first'], data['second']
                verts_x, verts_y = to_numpy(data_x['verts']), to_numpy(data_y['verts'])
                name_x, name_y = data['first']['name'][0], data['second']['name'][0]
                if 'faces' in data_x:
                    if os.path.isfile('figures/texture.png'):
                        shutil.copy('figures/texture.png',
                                    os.path.join(self.opt['path']['visualization'], 'texture.png'))
                    faces_x, faces_y = to_numpy(data_x['faces']), to_numpy(data_y['faces'])
                    file_x = os.path.join(self.opt['path']['visualization'], f'{name_x}.obj')
                    file_y = os.path.join(self.opt['path']['visualization'], f'{name_x}-{name_y}.obj')
                    write_obj_pair(file_x, file_y, verts_x, faces_x, verts_y, faces_y, Pyx, 'texture.png')
                else:
                    file_x = os.path.join(self.opt['path']['visualization'], f'{name_x}.ply')
                    file_y = os.path.join(self.opt['path']['visualization'], f'{name_y}-{name_x}.ply')
                    write_point_cloud_pair(file_x, file_y, verts_x, verts_y, p2p)

In the base_model.py the ply saving name might set in a wrong order, it would be f'{name_x}-{name_y}.ply' which same like previous.

Connaught0 avatar Dec 29 '23 08:12 Connaught0