shape_as_points icon indicating copy to clipboard operation
shape_as_points copied to clipboard

How to run inference on learning based Model.

Open NiluK opened this issue 1 year ago • 0 comments

Hello, great paper.

I have successfully managed to run inference on this model via the Optimization based Model and it has produced some decent results but not quite what the paper shows.

What are the steps I need to run inference via the learning based model? I tried replacing the configs in the demo with my own pointcloud but it gave me this error:

<torch.utils.data.dataloader.DataLoader object at 0x7fdc75c91430>
Loading model...
https://s3.eu-central-1.amazonaws.com/avg-projects/shape_as_points/models/ours_outlier_7x.pt
=> Loading checkpoint from url...
Generating...
  0%|                                                                                                                                                                   | 0/2 [00:00<?, ?it/s]WARNING - 2023-01-16 21:08:42,915 - core - Error occured when loading field gt_points of model 0
  0%|                                                                                                                                                                   | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "generate.py", line 232, in <module>
    main()
  File "generate.py", line 104, in main
    for it, data in enumerate(tqdm(test_loader)):
  File "/opt/conda/envs/sap/lib/python3.8/site-packages/tqdm/std.py", line 1167, in __iter__
    for obj in iterable:
  File "/opt/conda/envs/sap/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/opt/conda/envs/sap/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 561, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
[mesh-f71edd87-064e-4cfc-ab1b-9.zip](https://github.com/autonomousvision/shape_as_points/files/10429561/mesh-f71edd87-064e-4cfc-ab1b-9.zip)

  File "/opt/conda/envs/sap/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
    return self.collate_fn(data)
  File "/opt/conda/envs/sap/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 86, in default_collate
    raise TypeError(default_collate_err_msg_format.format(elem_type))
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'NoneType'>

Thanks.

This is the npz I want to test, it is generated by Point-E and the paper says applying SAP could be a next step

mesh-f71edd87-064e-4cfc-ab1b-9.zip

NiluK avatar Jan 16 '23 21:01 NiluK