Closed shersoni610 closed 4 years ago
This is a known problem with our release not being compatible with python 3.6. We use a python feature which doesn't exist there. This is fixed in the version on github, and we hope to have a full release soon.
For the moment, as a temporary solution, you can try overwriting the file ~/Disk/Software/Anaconda3/envs/pytorch3d/lib/python3.6/site-packages/pytorch3d/renderer/mesh/rasterizer.py
with the text at https://raw.githubusercontent.com/facebookresearch/pytorch3d/533887a18885c244d89b292036e167d668736124/pytorch3d/renderer/mesh/rasterizer.py
Are you running the notebook locally? What was not working with Python 3.7? As mentioned, dataclasses is available in Python 3.7 - see #31 which is about the same issue.
OP's issue in other pythons is in #47. It seems that pytorch itself would not install.
You can also install dataclasses in python 3.6 and fix the version incompatibility https://pypi.org/project/dataclasses/
@shersoni610 were you able to resolve this problem? If so, please close this issue.
how can I close it?
On Sun, Feb 23, 2020 at 10:26 PM Nikhila Ravi notifications@github.com wrote:
@shersoni610 https://github.com/shersoni610 were you able to resolve this problem? If so, please close this issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebookresearch/pytorch3d/issues/72?email_source=notifications&email_token=ANZR6GWSAPYTXLCELBZJZ3LRENSBXA5CNFSM4KXS47T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWXTTA#issuecomment-590182860, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZR6GS3SRYTHND3BFUFPIDRENSBXANCNFSM4KXS47TQ .
Hello,
I installed Python3.6 when things did not work with 3.7 and 3.8. Now I get the following errors:
Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
Camera position optimization using differentiable rendering In this tutorial we will learn the [x, y, z] position of a camera given a reference image using differentiable rendering.
We will first initialize a renderer with a starting position for the camera. We will then use this to generate an image, compute a loss with the reference image, and finally backpropagate through the entire pipeline to update the position of the camera.
This tutorial shows how to:
load a mesh from an .obj file initialize a Camera, Shader and Renderer, render a mesh set up an optimization loop with a loss function and optimizer Set up and imports import os import torch import numpy as np from tqdm import tqdm_notebook import imageio import torch.nn as nn import torch.nn.functional as F import matplotlib.pyplot as plt from skimage import img_as_ubyte
io utils
from pytorch3d.io import load_obj
datastructures
from pytorch3d.structures import Meshes, Textures
3D transformations functions
from pytorch3d.transforms import Rotate, Translate
rendering components
from pytorch3d.renderer import ( OpenGLPerspectiveCameras, look_at_view_transform, look_at_rotation, RasterizationSettings, MeshRenderer, MeshRasterizer, BlendParams, SilhouetteShader, PhongShader, PointLights )
ModuleNotFoundError Traceback (most recent call last)