Remove redundant data (#103)

RaySamples contained fields for bin_starts and bin_ends. These are also stored in the frustums. This PR removes them from the RaySamples.
This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-07-07 18:07:34 -07:00
1 parent be45d5c9bb
commit 74280110ce
12 files changed
+145682 -145693

No files matched your search

+8 -15
View File
@@ -9,14 +9,14 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"import torch\n",
"from pyrad.cameras.rays import RayBundle\n",
"from pyrad.graphs.modules import ray_sampler\n",
"from matplotlib import pyplot as plt"
"from matplotlib import pyplot as plt\n"
]
},
{
@@ -30,7 +30,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 13,
"metadata": {},
"outputs": [
{
@@ -102,26 +102,19 @@
" origins=torch.ones([1, 3]),\n",
" directions=torch.ones([1, 3]),\n",
" pixel_area=torch.ones([1, 1]),\n",
" nears=torch.ones([1]) * near,\n",
" fars=torch.ones([1]) * far,\n",
" nears=torch.ones([1, 1]) * near,\n",
" fars=torch.ones([1, 1]) * far,\n",
" )\n",
"\n",
" samples = sampler.generate_ray_samples(ray_bundle)\n",
" samples.bin_starts.shape\n",
" samples.frustums.starts.shape\n",
"\n",
" plt.hist(samples.bin_starts, alpha=0.5, bins=100)\n",
" plt.hist(samples.frustums.starts[0,:,0], alpha=0.5, bins=100)\n",
" plt.xlabel(\"Distance\")\n",
" plt.ylabel(\"# Samples\")\n",
" plt.title(name)\n",
" plt.show()"
" plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {