kaolin icon indicating copy to clipboard operation
kaolin copied to clipboard

Fix Dib-Renderer ImageRecon example

Open Shubhamjain27 opened this issue 3 years ago • 6 comments

Fixed the training, eval, and collate_function code to match updates to the ShapeNet class.

Related Issues: #289 #170 #146 #25

Tests: Ubuntu 18.04 CUDA 10.2 Pytorch 1.3

  • Ran python script to completion (including visualization).

Shubhamjain27 avatar Jul 11 '20 13:07 Shubhamjain27

Hi Shubham, just a small doubt. If you've run the code to complete visualization, then can you please specify the number of iterations you used for the training to get a good result?

archana1998 avatar Jul 16 '20 12:07 archana1998

Fixed the training, eval, and collate_function code to match updates to the ShapeNet class.

Related Issues: #289 #170 #146 #25

Tests: Ubuntu 18.04 CUDA 10.2 Pytorch 1.3

  • Ran python script to completion (including visualization).

After I modified it according to your file, the following problems appeared in the running evaluation. Have you encountered it before? Is there a good solution? (kaolin_test) zyz@ZYZ:~/Project/kaolin/examples/ImageRecon/Dib$ python eval.py converting to voxels: 100%|██████████████| 2034/2034 [00:00<00:00, 29123.63it/s] converting to surface meshes: 100%|██████| 2034/2034 [00:00<00:00, 29205.99it/s] converting to points: 100%|██████████████| 2034/2034 [00:00<00:00, 93667.26it/s] Traceback (most recent call last): File "eval.py", line 54, in cache_dir='cache/',train = False, split = .7) TypeError: init() got an unexpected keyword argument 'cache_dir'

After I remove cache_dir, it's following problem (kaolin_test) zyz@ZYZ:~/Project/kaolin/examples/ImageRecon/Dib$ python eval.py converting to voxels: 100%|██████████████| 2034/2034 [00:00<00:00, 28294.12it/s] converting to surface meshes: 100%|██████| 2034/2034 [00:00<00:00, 27876.14it/s] converting to points: 100%|██████████████| 2034/2034 [00:00<00:00, 92047.24it/s] Traceback (most recent call last): File "eval.py", line 56, in valid_set = kal.dataloader.ShapeNet.Combination([points_set_valid, images_set_valid, meshes_set_valid], root='/media/zyz/Project/DataSET/ShapeNetCore_v1/') AttributeError: module 'kaolin' has no attribute 'dataloader'

zyz-notebooks avatar Oct 01 '20 07:10 zyz-notebooks

Hi @zyz-1998 , yes this dataloder will not work. The api has been update to kal.datasets. I have incorporated these changes in my pull request. Hope that helps.

Shubhamjain27 avatar Oct 01 '20 08:10 Shubhamjain27

Hi @zyz-1998 , yes this dataloder will not work. The api has been update to kal.datasets. I have incorporated these changes in my pull request. Hope that helps.

Thank you very much for your help. I conducted the evaluation smoothly, but it seems that I did not get useful information in the terminal, such as the inability to visualize

zyz-notebooks avatar Oct 01 '20 09:10 zyz-notebooks

In the eval code, there is visualisation code as well. You have to set the args.vis to True. Also, the images and meshes can be saved in case running on EC2 machine.

Shubhamjain27 avatar Oct 02 '20 10:10 Shubhamjain27

Thanks, @Shubhamjain27! What version of ShapeNet did you use to train DIB-R? If I use ShapeNetCore.v2 I'm missing the models (I only find normalized models) and the renders. If you had to put it up together, how did you do it? Thank you!

cduguet avatar Feb 08 '21 02:02 cduguet