apple / ml-neuman

Official repository of NeuMan: Neural Human Radiance Field from a Single Video (ECCV 2022)
Other
1.26k stars 141 forks source link

Question about the empty_space_loss #83

Open Net-Maker opened 1 year ago

Net-Maker commented 1 year ago

I am learning the scene part in this excellent work. But I found that the empty_space_loss in paper is like that: image But in our code,it's like:

coarse_empty_space_loss = torch.zeros_like(coarse_rgb_loss)
        if self.penalize_empty_space > 0:
            depth = batch['depth'][:, None].repeat(1, _n).to(device)
            closer_mask = z_vals < (depth * self.opt.margin)
            coarse_empty_space_loss += self.empty_space_loss_fn(
                torch.tanh(torch.relu(out[closer_mask][:, 3])),
                torch.zeros_like(out[closer_mask][:, 3])
            ) * self.penalize_empty_space

I am kind of confuse. could you tell me the meaning of the double activate functions? And where to correspond the formula in the paper?