mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 22:38:48 +08:00
CPU usage improvement and minor changes (#108)
* cpu fixes, masking logic but commented out, nerfw and semanticnerf in progress * pylint
This commit is contained in:
1 parent
5e9d064db6
commit
3226a1c989
18 files changed
+118
-67
No files matched your search
@@ -10,6 +10,7 @@ import torch.nn.functional as F
|
||||
from torch.nn.parameter import Parameter
|
||||
|
||||
from mattport.nerf.field_modules.encoding import Encoding, HashEncoding, SHEncoding
|
||||
from mattport.nerf.field_modules.field_heads import FieldHeadNames
|
||||
from mattport.nerf.fields.base import Field
|
||||
from mattport.nerf.fields.nerf_field import NeRFField
|
||||
from mattport.structures.rays import PointSamples
|
||||
@@ -112,7 +113,7 @@ class TCNNInstantNGPField(Field):
|
||||
h = torch.cat([d, density_embedding.view(-1, self.geo_feat_dim)], dim=-1)
|
||||
h = self.mlp_head(h).view(*point_samples.directions.shape[:-1], -1).to(dtype)
|
||||
rgb = torch.sigmoid(h)
|
||||
return {"rgb": rgb}
|
||||
return {FieldHeadNames.RGB: rgb}
|
||||
|
||||
|
||||
class TorchInstantNGPField(NeRFField):
|
||||
|
||||
Reference in new issue
Block a user