mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
Downloads from utils in a couple of tutorials
Summary: Fixes #514, so we don't assume user of the tutorial has access to utils. Reviewed By: nikhilaravi Differential Revision: D29557294 fbshipit-source-id: 10ac994be65df0822d3ee4e9d690189ff13074a2
This commit is contained in:
parent
68a35543d5
commit
10eb3892da
@ -106,11 +106,6 @@
|
||||
" ray_bundle_to_ray_points,\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# add path for demo utils functions \n",
|
||||
"sys.path.append(os.path.abspath(''))\n",
|
||||
"from utils.plot_image_grid import image_grid\n",
|
||||
"from utils.generate_cow_renders import generate_cow_renders\n",
|
||||
"\n",
|
||||
"# obtain the utilized device\n",
|
||||
"if torch.cuda.is_available():\n",
|
||||
" device = torch.device(\"cuda:0\")\n",
|
||||
@ -125,6 +120,35 @@
|
||||
" device = torch.device(\"cpu\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/plot_image_grid.py\n",
|
||||
"!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/generate_cow_renders.py\n",
|
||||
"from plot_image_grid import image_grid\n",
|
||||
"from generate_cow_renders import generate_cow_renders"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"OR if running locally uncomment and run the following cell:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# from utils.generate_cow_renders import generate_cow_renders\n",
|
||||
"# from utils import image_grid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
@ -92,11 +92,6 @@
|
||||
")\n",
|
||||
"from pytorch3d.transforms import so3_exp_map\n",
|
||||
"\n",
|
||||
"# add path for demo utils functions \n",
|
||||
"sys.path.append(os.path.abspath(''))\n",
|
||||
"from utils.plot_image_grid import image_grid\n",
|
||||
"from utils.generate_cow_renders import generate_cow_renders\n",
|
||||
"\n",
|
||||
"# obtain the utilized device\n",
|
||||
"if torch.cuda.is_available():\n",
|
||||
" device = torch.device(\"cuda:0\")\n",
|
||||
@ -105,6 +100,35 @@
|
||||
" device = torch.device(\"cpu\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/plot_image_grid.py\n",
|
||||
"!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/generate_cow_renders.py\n",
|
||||
"from plot_image_grid import image_grid\n",
|
||||
"from generate_cow_renders import generate_cow_renders"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"OR if running locally uncomment and run the following cell:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# from utils.generate_cow_renders import generate_cow_renders\n",
|
||||
"# from utils import image_grid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
Loading…
x
Reference in New Issue
Block a user