From 8ea6534b7ef9d3ac386b7b9a3c4135d6233a4465 Mon Sep 17 00:00:00 2001 From: Justin Date: Mon, 30 Jan 2023 18:03:00 +0000 Subject: [PATCH] annealing --- nerfstudio/models/nerfacto.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nerfstudio/models/nerfacto.py b/nerfstudio/models/nerfacto.py index 21f4f6c81..360edfc3d 100644 --- a/nerfstudio/models/nerfacto.py +++ b/nerfstudio/models/nerfacto.py @@ -316,10 +316,9 @@ class NerfactoModel(Model): outputs["rendered_pred_normal_loss"] ) #depth regularity loss - if self.step>100: - p=3 - patches = outputs['depth'].view(-1,p,p) #Bx3x3 - loss_dict['depth_reg'] = .1*torch.mean(torch.sum((patches.view(-1,p*p) - patches[:,p//2,p//2][:,None])**2,dim=1)) + p=3 + patches = outputs['depth'].view(-1,p,p) #Bx3x3 + loss_dict['depth_reg'] = np.interp(self.step,[0,500],[0,1])*torch.mean(torch.sum((patches.view(-1,p*p) - patches[:,p//2,p//2][:,None])**2,dim=1)) return loss_dict