Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nerfacc
Commits
934f5e9f
Unverified
Commit
934f5e9f
authored
Oct 18, 2022
by
Matthew Tancik
Committed by
GitHub
Oct 18, 2022
Browse files
Support python 3.7 (#77)
* Support python 3.7 * Add dependency
parent
62e70d39
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
8 deletions
+13
-8
examples/train_mlp_dnerf.py
examples/train_mlp_dnerf.py
+2
-2
examples/train_mlp_nerf.py
examples/train_mlp_nerf.py
+2
-2
examples/train_ngp_nerf.py
examples/train_ngp_nerf.py
+2
-2
nerfacc/version.py
nerfacc/version.py
+5
-1
pyproject.toml
pyproject.toml
+2
-1
No files found.
examples/train_mlp_dnerf.py
View file @
934f5e9f
...
...
@@ -185,7 +185,7 @@ if __name__ == "__main__":
elapsed_time
=
time
.
time
()
-
tic
loss
=
F
.
mse_loss
(
rgb
[
alive_ray_mask
],
pixels
[
alive_ray_mask
])
print
(
f
"elapsed_time=
{
elapsed_time
:.
2
f
}
s |
{
step
=
}
| "
f
"elapsed_time=
{
elapsed_time
:.
2
f
}
s |
step=
{
step
}
| "
f
"loss=
{
loss
:.
5
f
}
| "
f
"alive_ray_mask=
{
alive_ray_mask
.
long
().
sum
():
d
}
| "
f
"n_rendering_samples=
{
n_rendering_samples
:
d
}
| num_rays=
{
len
(
pixels
):
d
}
|"
...
...
@@ -235,7 +235,7 @@ if __name__ == "__main__":
# )
# break
psnr_avg
=
sum
(
psnrs
)
/
len
(
psnrs
)
print
(
f
"evaluation:
{
psnr_avg
=
}
"
)
print
(
f
"evaluation:
psnr_avg=
{
psnr_avg
}
"
)
train_dataset
.
training
=
True
if
step
==
max_steps
:
...
...
examples/train_mlp_nerf.py
View file @
934f5e9f
...
...
@@ -211,7 +211,7 @@ if __name__ == "__main__":
elapsed_time
=
time
.
time
()
-
tic
loss
=
F
.
mse_loss
(
rgb
[
alive_ray_mask
],
pixels
[
alive_ray_mask
])
print
(
f
"elapsed_time=
{
elapsed_time
:.
2
f
}
s |
{
step
=
}
| "
f
"elapsed_time=
{
elapsed_time
:.
2
f
}
s |
step=
{
step
}
| "
f
"loss=
{
loss
:.
5
f
}
| "
f
"alive_ray_mask=
{
alive_ray_mask
.
long
().
sum
():
d
}
| "
f
"n_rendering_samples=
{
n_rendering_samples
:
d
}
| num_rays=
{
len
(
pixels
):
d
}
|"
...
...
@@ -257,7 +257,7 @@ if __name__ == "__main__":
# )
# break
psnr_avg
=
sum
(
psnrs
)
/
len
(
psnrs
)
print
(
f
"evaluation:
{
psnr_avg
=
}
"
)
print
(
f
"evaluation:
psnr_avg=
{
psnr_avg
}
"
)
train_dataset
.
training
=
True
if
step
==
max_steps
:
...
...
examples/train_ngp_nerf.py
View file @
934f5e9f
...
...
@@ -254,7 +254,7 @@ if __name__ == "__main__":
elapsed_time
=
time
.
time
()
-
tic
loss
=
F
.
mse_loss
(
rgb
[
alive_ray_mask
],
pixels
[
alive_ray_mask
])
print
(
f
"elapsed_time=
{
elapsed_time
:.
2
f
}
s |
{
step
=
}
| "
f
"elapsed_time=
{
elapsed_time
:.
2
f
}
s |
step=
{
step
}
| "
f
"loss=
{
loss
:.
5
f
}
| "
f
"alive_ray_mask=
{
alive_ray_mask
.
long
().
sum
():
d
}
| "
f
"n_rendering_samples=
{
n_rendering_samples
:
d
}
| num_rays=
{
len
(
pixels
):
d
}
|"
...
...
@@ -301,7 +301,7 @@ if __name__ == "__main__":
# )
# break
psnr_avg
=
sum
(
psnrs
)
/
len
(
psnrs
)
print
(
f
"evaluation:
{
psnr_avg
=
}
"
)
print
(
f
"evaluation:
psnr_avg=
{
psnr_avg
}
"
)
train_dataset
.
training
=
True
if
step
==
max_steps
:
...
...
nerfacc/version.py
View file @
934f5e9f
"""
Copyright (c) 2022 Ruilong Li, UC Berkeley.
"""
from
importlib.metadata
import
version
try
:
from
importlib.metadata
import
version
except
ImportError
:
# Running on pre-3.8 Python; use importlib-metadata package
from
importlib_metadata
import
version
__version__
=
version
(
"nerfacc"
)
pyproject.toml
View file @
934f5e9f
...
...
@@ -9,8 +9,9 @@ description = "A General NeRF Acceleration Toolbox."
readme
=
"README.md"
authors
=
[
{name
=
"Ruilong"
,
email
=
"ruilongli94@gmail.com"
}
]
license
=
{
text
=
"MIT"
}
requires-python
=
">=3.
8
"
requires-python
=
">=3.
7
"
dependencies
=
[
"importlib_metadata>=5.0.0; python_version<'3.8'"
,
"ninja>=1.10.2.3"
,
"pybind11>=2.10.0"
,
"torch>=1.12.0"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment