DLR-RM / AugmentedAutoencoder

Official Code: Implicit 3D Orientation Learning for 6D Object Detection from RGB Images
MIT License
338 stars 97 forks source link

Can I train a cube-like model ? #36

Closed skn047 closed 5 years ago

skn047 commented 5 years ago

Hi. I struggled so much and finally I came into be able to train this model(I added normals by using meshlab). https://www.laserdesign.com/sample-files/hot-red-pepper/

The result is like this. AAE_redpepper

But when I train a cube-like model I got this error. https://github.com/skn047/machine_learning/blob/master/red_object_meshlab.ply

root@6e76b1f6d984:/home/kuromiya/Documents/AugmentedAutoencoder# ae_train exp_group/my_autoencoder -d

Traceback (most recent call last): | File "/home/kuromiya/.local/bin/ae_train", line 10, in sys.exit(main()) File "/root/.local/lib/python2.7/site-packages/auto_pose/ae/ae_train.py", line 90, in main dataset.get_training_images(dataset_path, args) File "/root/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 93, in get_training_images self.render_training_images() File "/root/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 245, in render_training_images bgr_x, depth_x = self.renderer.render( File "/root/.local/lib/python2.7/site-packages/auto_pose/ae/utils.py", line 15, in decorator setattr(self, attribute, function(self)) File "/root/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 68, in renderer float(self._kw['vertex_scale']) File "/root/.local/lib/python2.7/site-packages/auto_pose/meshrenderer/meshrenderer.py", line 37, in init vert_norms = gu.geo.load_meshes(models_cad_files, vertex_tmp_store_folder, recalculate_normals=True) File "/root/.local/lib/python2.7/site-packages/auto_pose/meshrenderer/gl_utils/geometry.py", line 57, in load_meshes normals = calc_normals(vertices) if recalculate_normals else mesh.normals File "/root/.local/lib/python2.7/site-packages/auto_pose/meshrenderer/gl_utils/geometry.py", line 69, in calc_normals v3 = vertices[i+2] IndexError: index 8 is out of bounds for axis 0 with size 8

How can I solve this problem ?

MartinSmeyer commented 5 years ago

Yes, normals are usually necessary for rendering. Your model consists of quad meshes, but the renderer only supports triangular meshes (I don't get your error message, but something saying that). simply use meshlab to convert it to a triangular mesh. sample batch_screenshot_03 07 2019

skn047 commented 5 years ago

Thank you for your answering to my question. However I am new to meshlab so I wonder how to convert my model to a triangular mesh. Could you give me some advice or 3d model you used above?

skn047 commented 5 years ago

ping @MartinSmeyer

Could you give me some advice or 3d model you used above?