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:
Ethan Weber authored and GitHub committed 2022-05-26 10:18:08 -04:00
1 parent 5e9d064db6
commit 3226a1c989
18 files changed
+118 -67

No files matched your search

+2 -1
View File
@@ -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):