ThibaultGROUEIX / 3D-CODED

Pytorch Implementation for the project : `3D-CODED` and `Learning Elementary Structure`

Home Page:http://imagine.enpc.fr/~groueixt/3D-CODED/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run demo failed

yanghtr opened this issue · comments

I tried to run the demo using:

python inference/correspondences.py --dir_name learning_elementary_structure_trained_models/1patch_deformation

It downloaded the models successfully but when the network forward, there is an error:

start regression...
Initial Loss: 0.0002441386750433594
[: 2999/3000] reg loss:  9.243113163392991e-05Traceback (most recent call last):
  File "inference/correspondences.py", line 408, in <module>
    inf.forward(opt.inputA, opt.inputB)
  File "inference/correspondences.py", line 120, in forward
    self.reconstruct(inputA)
  File "inference/correspondences.py", line 369, in reconstruct
    mesh, meshReg = self.run(input, scalefactor, input_p)
  File "inference/correspondences.py", line 315, in run
    pointsReconstructed1 = self.regress(input_network)
  File "inference/correspondences.py", line 180, in regress
    pointsReconstructed = self.network.decode_full(input_param)  # forward pass
  File "./auxiliary/model.py", line 243, in decode_full
    rand_grid = self.template[0].template_learned_HR[batch * i:batch * (i + 1)].view(x.size(0), batch,self.dim_template).transpose(1,2).contiguous()
AttributeError: 'GetTemplate' object has no attribute 'template_learned_HR'

I didn't modify the codes and just follow the instructions.
When I went deep to see the codes, I found that self.template is indeed a GetTemplate object, in line 178 of auxiliary/model.py:

self.template = [GetTemplate(start_from, dataset_train)]

And it seems that GetTemplate class indeed doesn't have the attribute template_learned_HR.

I wonder how to fix this. Did I miss something? Thank you very much.

Hi @yanghtr

Thanks for pointing this out !
It's fixed in the latest commit,
Please let me know if you run into other issues,

Best regards,
Thibault

It works! Thank you very much!