-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Errors in Rendering #72
Comments
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. |
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 ***@***.***> 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
<#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)
in
19
20 # rendering components
---> 21 from pytorch3d.renderer import (
22 OpenGLPerspectiveCameras, look_at_view_transform, look_at_rotation,
23 RasterizationSettings, MeshRenderer, MeshRasterizer, BlendParams,
~/Disk/Software/Anaconda3/envs/pytorch3d/lib/python3.6/site-packages/pytorch3d/renderer/init.py in
17 from .lighting import DirectionalLights, PointLights, diffuse, specular
18 from .materials import Materials
---> 19 from .mesh import (
20 GouradShader,
21 MeshRasterizer,
~/Disk/Software/Anaconda3/envs/pytorch3d/lib/python3.6/site-packages/pytorch3d/renderer/mesh/init.py in
2
3 from .rasterize_meshes import rasterize_meshes
----> 4 from .rasterizer import MeshRasterizer, RasterizationSettings
5 from .renderer import MeshRenderer
6 from .shader import (
~/Disk/Software/Anaconda3/envs/pytorch3d/lib/python3.6/site-packages/pytorch3d/renderer/mesh/rasterizer.py in
3
4
----> 5 from dataclasses import dataclass
6 from typing import NamedTuple, Optional
7 import torch
ModuleNotFoundError: No module named 'dataclasses'
The text was updated successfully, but these errors were encountered: