ThibaultGROUEIX / AtlasNet

This repository contains the source codes for the paper "AtlasNet: A Papier-Mâché Approach to Learning 3D Surface Generation ". The network is able to synthesize a mesh (point cloud + connectivity) from a low-resolution point cloud, or from an image.
http://imagine.enpc.fr/~groueixt/atlasnet/
MIT License
677 stars 119 forks source link

Error for final report generation. #91

Open xfanhe opened 6 months ago

xfanhe commented 6 months ago

Thank you for your code! I'm a beginner for 3D reconstruction and two problems (perhaps? : ) ) were found when I try to run the code.

Generate a mesh and save it for the report.

The problem is at training/trainer.py, the generate_mesh(self) function. The path for the mesh generation is below,and then save it.

        path = '/'.join([self.opt.training_media_path, str(self.flags.media_count)]) + ".obj"
        mesh_processor.save(mesh, path, self.colormap)

But the mesh_processor.save(mesh, path, self.colormap) will change the extension to .ply,which will overwrite somewhere an existing file.

pymesh.save_mesh(path[:-3] + "ply", mesh, *mesh.get_attribute_names(), ascii=True)

The http server for the final report.

The command to start a simple http server is as below in auxiliary/visualization.py.

cmd = f"{sys.executable} -m http.server {http_port} > /dev/null 2>&1"
CMD = f'TMUX=0 tmux new-session -d -s httpserver \; send-keys "{cmd}" Enter'
os.system(CMD)

In my case(python 3.6.13, the same as the requirement.),it failed. And the command cmd = f"{sys.executable} -m http.server {http_port} > /dev/null 2>&1" works well for me.