Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The merge from Kaolin makes some bugs #10

Open
SophusDavid opened this issue Jan 9, 2024 · 7 comments
Open

The merge from Kaolin makes some bugs #10

SophusDavid opened this issue Jan 9, 2024 · 7 comments

Comments

@SophusDavid
Copy link

SophusDavid commented Jan 9, 2024

I download the latest code and run as README.md .

Then this error occured:
Traceback (most recent call last):
  File "/home/dcy/code/FlexiCubes/FlexiCubes/examples/optimize.py", line 88, in <module>
    mv, mvp = render.get_random_camera_batch(FLAGS.batch, iter_res=FLAGS.train_res, device=device)
ValueError: too many values to unpack (expected 2)

here i think mv,mvp should change to camera (according to the document of Kaolin) But there are some other bugs . As I am not familiar with the entire code , i cant fix them all .So i make this Issue

@SophusDavid SophusDavid changed the title The merge from Kaolin makes some The merge from Kaolin makes some bugs Jan 9, 2024
@MHassan1122
Copy link

same problem raised as you mentioned.

Traceback (most recent call last):
File "C:\Users\admin\FlexiCubes-main\examples\optimize.py", line 88, in
mv, mvp = render.get_random_camera_batch(FLAGS.batch, iter_res=FLAGS.train_res, device=device)
ValueError: too many values to unpack (expected 2)

@SophusDavid
Copy link
Author

same problem raised as you mentioned.

Traceback (most recent call last): File "C:\Users\admin\FlexiCubes-main\examples\optimize.py", line 88, in mv, mvp = render.get_random_camera_batch(FLAGS.batch, iter_res=FLAGS.train_res, device=device) ValueError: too many values to unpack (expected 2)

I can share my solution:
follow the README.md in the latest commit to install Flexicubes:

conda create -n flexicubes python=3.9
conda activate flexicubes
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
pip install imageio trimesh tqdm matplotlib torch_scatter ninja
pip install git+https://github.com/NVlabs/nvdiffrast/
pip install kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.12.0_cu113.html

check out the git branch to previous commit .
git checkout HEAD^
reinstall Kaolin :
pip install kaolin==0.13.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.12.0_cu113.html

@MHassan1122
Copy link

can you explain me in details.
I followed your instructions but it seem the same problem again.
thanks for you time and kind assistance.

@SophusDavid
Copy link
Author

can you explain me in details. I followed your instructions but it seem the same problem again. thanks for you time and kind assistance.

image

i followed the command lines above and it worked .

the key point is that the latest version of flexicubes uses kaolin 15 but not adapt their code to kaolin 15's api .so you need to change to previous version(git checkout HEAD^)
Then you should to install the previous kaolin
(pip install kaolin==0.13.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.12.0_{your cuda version}.html )
and version of my cuda is 11.3 so i install
pip install kaolin==0.13.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.12.0_cu113.html

hope this will work for you.

@MHassan1122
Copy link

MHassan1122 commented Jan 15, 2024

dear i followed you steps also installed the kaolin==0.13.0 but again same issues i do know what is the problem.

@MHassan1122
Copy link

MHassan1122 commented Jan 29, 2024

Dear @SophusDavid
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\admin\anaconda3\envs\flexicube\lib\site-packages (from Jinja2>=3.0->flask==2.0.3->kaolin==0.13.0) (2.1.4)
I tried many times even with others version as well but all is vain.
the same error
(flexicube) C:\Users\admin\FlexiCubes-main\examples>python optimize.py --ref_mesh data/inputmodels/block.obj --out_dir out/block
Traceback (most recent call last):
File "C:\Users\admin\FlexiCubes-main\examples\optimize.py", line 88, in
mv, mvp = render.get_random_camera_batch(FLAGS.batch, iter_res=FLAGS.train_res, device=device)
ValueError: too many values to unpack (expected 2)

@frankshen07
Copy link
Collaborator

Apologies for the issues caused by the Kaolin merge. I've added back the previous functions we used to produce the paper's results, which do not depend on Kaolin. The error should be resolved now with the latest commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants