AndresCasado / pergamo

Code for PERGAMO, a two step approach to learn deformable models
http://mslab.es/projects/PERGAMO/
38 stars 4 forks source link

Can't run the code #2

Closed nagexiaochengzi closed 1 year ago

nagexiaochengzi commented 1 year ago

Hello, the code is not complete, running can not run the project, can you send a detailed operation, thank you!

AndresCasado commented 1 year ago

Hello.

The repository is still undergoing changes. Please, start over and read the README.md.

If it is still not clear or not working please try to specify what part are you having problems with.

nagexiaochengzi commented 1 year ago

When running python3 reconstruction_script.py --dir /path/to/dataset/DatosDan/sequences, the error Folder "pifu" does not exist for sequence "dan-004". Full path tested: "DatosDanCompressed/sequences/dan-004/dan -004_pifu".

nagexiaochengzi commented 1 year ago

There is no "dan-004_pifu" folder in that directory

AndresCasado commented 1 year ago

~Sorry, that sequence had problems, I thought I had deleted it from the dataset. Delete or move it and it should work.~

The problematic sequence is 014, not 004. I can see the dan-004_pifu folder in the directory. I'll check if the uploaded zip is correct.

AndresCasado commented 1 year ago

The zip is correct. Please check the MD5 checksum of the zip file you downloaded, it should be 7d7d1cfe4f754ad7f8e171eff8e418b6. If it isn't, download the zip again.

nagexiaochengzi commented 1 year ago

Are you talking about the 9.4g file? I did decompress the file and there were a few minor errors. I'll download it again and take a look

AndresCasado commented 1 year ago

Yes, please tell me again if it doesn't work.

nagexiaochengzi commented 1 year ago

Do you have other requirements for environment configuration, such as TensorFlow

AndresCasado commented 1 year ago

It's all in the README, follow the instructions at https://github.com/AndresCasado/pergamo

nagexiaochengzi commented 1 year ago

Now I have a new problem, when I run the python train_regressor.py file, I get the error "No such file or directory: 'data/train_sequence/poses/dan-005/0030_enc.pkl '". So I ran the process_reconstructed_sequence.py and encode_reconstructed_poses.py in the encoder directory, following your run_regression.sh statement to generate the '_enc.pkl' file in the train_sequence/poses/dan-005/ directory, and then cd . Run predict_reconstructed_sequences.py, then run python train_regressor.py again and get an error "UnpicklingError: A load persistent id instruction was encountered,but no persistent_load function was specified ", I suspect that there is a problem with the '_enc.pkl' file generated just now So I put it into local read, and found that I can't read the data, which proves that there is something wrong with the generated '_enc.pkl' file, please tell me how to solve it

AndresCasado commented 1 year ago

I can confirm that was an error. I've fixed it with the new commit f653bb36eae6fb74395700cc853baeba00683ce2

Can you please check if it works for you now?

nagexiaochengzi commented 1 year ago

When I run 'python3 train_regressor.py' I get the error 'Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper_gather)',and I'm looking at what's wrong

AndresCasado commented 1 year ago

I can't replicate, it may be some problem with CUDA and PyTorch on your setup, and I can't provide support on that.

If you check your setup and are sure that it is a problem on our end, please get back to me.

nagexiaochengzi commented 1 year ago

Thank you for always answering my questions, I think it's your code's problem, there is no problem with my environment

AndresCasado commented 1 year ago

I have run it on my computer and it runs, so if it doesn't run for you it has to be an environment problem. I'll try to run it in another computer to double check on my end. Until then I can't help more

nagexiaochengzi commented 1 year ago

Thank you.

nagexiaochengzi commented 1 year ago

Do you have a face book or twitter account, we can use that to communicate

AndresCasado commented 1 year ago

You can email me at andres.casado @ urjc.es (without the spaces)

nagexiaochengzi commented 1 year ago

Thank you, I have emailed you

nagexiaochengzi commented 1 year ago

Hi, did you find out why?

AndresCasado commented 1 year ago

Yes, I just found out the problem. PyTorch has probably changed the function gather, used by Kaolin, and it seems it did not care about the devices before, but now it does.

Knowing which tensor was being problematic, the fix is easy, check commit 13d211b5cba9d500d4bcf5ac88164c871ea28fa4

It is already on master branch.