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

NaN loss in PyTorch3D Tutorial "Fit a Mesh with Texture via Rendering" #991

Closed
simon-cross opened this issue Dec 13, 2021 · 12 comments
Closed
Assignees
Labels
installation Installation questions or issues potential-bug Potential bug to flag an issue that needs to be looked into Stale

Comments

@simon-cross
Copy link

I am trying to run the PyTorch3D tutorial "Fit a Mesh with Texture via Rendering" with the new version 0.6.1 of PyTorch3D, and I get NaN loss.

Before running the tutorial code, I first uninstalled the previous version of PyTorch3D with the following command:

pip3 uninstall pytorch3d

This is the output of the previous command:

Found existing installation: pytorch3d 0.6.0
Uninstalling pytorch3d-0.6.0:
  Would remove:
    /usr/local/lib/python3.6/dist-packages/pytorch3d-0.6.0.dist-info/*
    /usr/local/lib/python3.6/dist-packages/pytorch3d/*
Proceed (Y/n)? y
  Successfully uninstalled pytorch3d-0.6.0

Then, I installed PyTorch3D again with the command

pip3 install "git+https://github.com/facebookresearch/pytorch3d.git"

This is the output of the previous command:

Collecting git+https://github.com/facebookresearch/pytorch3d.git
  Cloning https://github.com/facebookresearch/pytorch3d.git to /tmp/pip-req-build-zxcafvw8
  Running command git clone --filter=blob:none -q https://github.com/facebookresearch/pytorch3d.git /tmp/pip-req-build-zxcafvw8
  Resolved https://github.com/facebookresearch/pytorch3d.git to commit d049cd2e0102a6b2e08bf2b595131d5177638081
  Preparing metadata (setup.py) ... done
Requirement already satisfied: fvcore in /usr/local/lib/python3.6/dist-packages (from pytorch3d==0.6.1) (0.1.5.post20211023)
Requirement already satisfied: iopath in /usr/local/lib/python3.6/dist-packages (from pytorch3d==0.6.1) (0.1.9)
Requirement already satisfied: Pillow in /usr/local/lib/python3.6/dist-packages (from fvcore->pytorch3d==0.6.1) (8.4.0)
Requirement already satisfied: dataclasses in /usr/local/lib/python3.6/dist-packages (from fvcore->pytorch3d==0.6.1) (0.8)
Requirement already satisfied: tabulate in /usr/local/lib/python3.6/dist-packages (from fvcore->pytorch3d==0.6.1) (0.8.9)
Requirement already satisfied: yacs>=0.1.6 in /usr/local/lib/python3.6/dist-packages (from fvcore->pytorch3d==0.6.1) (0.1.8)
Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.6/dist-packages (from fvcore->pytorch3d==0.6.1) (6.0)
Requirement already satisfied: termcolor>=1.1 in /usr/local/lib/python3.6/dist-packages (from fvcore->pytorch3d==0.6.1) (1.1.0)
Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from fvcore->pytorch3d==0.6.1) (4.62.3)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from fvcore->pytorch3d==0.6.1) (1.19.5)
Requirement already satisfied: portalocker in /usr/local/lib/python3.6/dist-packages (from iopath->pytorch3d==0.6.1) (2.3.2)
Building wheels for collected packages: pytorch3d
  Building wheel for pytorch3d (setup.py) ... done
  Created wheel for pytorch3d: filename=pytorch3d-0.6.1-cp36-cp36m-linux_x86_64.whl size=32424674 sha256=dc36bb306027f523d9858c5d42700f951f5814910ac86cc542c5c8f00dbc2bde
  Stored in directory: /tmp/pip-ephem-wheel-cache-lnrz08sz/wheels/5e/1f/72/d2daef00746d0b6c681dce55b94f2cedbce8c038fbd2076174
Successfully built pytorch3d
Installing collected packages: pytorch3d
Successfully installed pytorch3d-0.6.1
@bottler
Copy link
Contributor

bottler commented Dec 13, 2021

Just to confirm, the install command took many minutes?

@simon-cross
Copy link
Author

Yes, it took several minutes.

@patricklabatut patricklabatut added potential-bug Potential bug to flag an issue that needs to be looked into installation Installation questions or issues labels Dec 14, 2021
@simon-cross
Copy link
Author

I have just installed PyTorch3D on a second machine with a newer version of Ubuntu and slightly different versions of the required components necessary to run PyTorch3D, but I still get NaN loss when running the tutorial.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 15, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@simon-cross
Copy link
Author

simon-cross commented Jan 26, 2022

I have just installed PyTorch3D again and run the tutorial, but I still get NaN loss. Have you fixed the problem with perspective_correct?

@bottler
Copy link
Contributor

bottler commented Jan 27, 2022

Not completely.

@bottler bottler reopened this Jan 27, 2022
@github-actions github-actions bot removed the Stale label Jan 28, 2022
@jiangsijia9495
Copy link

I have just installed PyTorch3D on a second machine with a newer version of Ubuntu and slightly different versions of the required components necessary to run PyTorch3D, but I still get NaN loss when running the tutorial.

This has been reported a few times and the master issue is #561. It should be fixed in the latest code in the main branch which you could use instead of a release either by building from source or using a nightly build. You can also add perspective_correct=False to the RasterizationSettings objects to avoid the problem.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Mar 19, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Apr 24, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Installation questions or issues potential-bug Potential bug to flag an issue that needs to be looked into Stale
Projects
None yet
Development

No branches or pull requests

4 participants