Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A little bug about the result saving #9

Open
Connaught0 opened this issue Dec 29, 2023 · 0 comments
Open

A little bug about the result saving #9

Connaught0 opened this issue Dec 29, 2023 · 0 comments

Comments

@Connaught0
Copy link

# 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant