mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 14:58:55 +08:00
Refactor field heads
This commit is contained in:
1 parent
08c181cd5e
commit
a9e6cad0fb
5 files changed
+80
-38
No files matched your search
@@ -7,6 +7,7 @@ from typing import Tuple
|
||||
|
||||
from torch import nn
|
||||
from torchtyping import TensorType
|
||||
from mattport.nerf.field_modules.field_heads import FieldHeadNames
|
||||
|
||||
from mattport.structures.rays import PointSamples
|
||||
|
||||
@@ -39,5 +40,5 @@ class Field(nn.Module):
|
||||
"""Evaluates the field at points along the ray."""
|
||||
density, density_embedding = self.get_density(point_samples)
|
||||
field_outputs = self.get_outputs(point_samples, density_embedding=density_embedding)
|
||||
field_outputs["density"] = density
|
||||
field_outputs[FieldHeadNames.DENSITY] = density
|
||||
return field_outputs
|
||||
Reference in new issue
Block a user