Fictionarry / ER-NeRF

[ICCV'23] Efficient Region-Aware Neural Radiance Fields for High-Fidelity Talking Portrait Synthesis
https://fictionarry.github.io/ER-NeRF/
MIT License
894 stars 124 forks source link

,Calculated output size: (192x0x0). Output size is too small #13

Open fordeep3d opened 11 months ago

fordeep3d commented 11 months ago

Thank you for sharing, I have an error,

==> Start Training Epoch 2, lr=0.000000 ... loss=0.0031 (0.0118), lr=0.000610: : 22% 51/227 [00:03<00:10, 16.09it/s]Traceback (most recent call last): File "main.py", line 374, in trainer.train(train_loader, valid_loader, max_epochs) File "/data/ER-NERF2/nerf_triplane/utils.py", line 977, in train self.train_one_epoch(train_loader) File "/data/ER-NERF2/nerf_triplane/utils.py", line 1239, in train_one_epoch preds, truths, loss = self.train_step(data) File "/data/ER-NERF2/nerf_triplane/utils.py", line 816, in train_step loss = loss + 0.01 self.criterion_lpips_alex(pred_rgb, rgb) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(input, kwargs) File "/opt/conda/lib/python3.7/site-packages/lpips/lpips.py", line 119, in forward outs0, outs1 = self.net.forward(in0_input), self.net.forward(in1_input) File "/opt/conda/lib/python3.7/site-packages/lpips/pretrained_networks.py", line 85, in forward h = self.slice3(h) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, *kwargs) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/container.py", line 141, in forward input = module(input) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(input, kwargs) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/pooling.py", line 164, in forward self.return_indices) File "/opt/conda/lib/python3.7/site-packages/torch/_jit_internal.py", line 422, in fn return if_false(*args, **kwargs) File "/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py", line 797, in _max_pool2d return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)

RuntimeError: Given input size: (192x2x2). Calculated output size: (192x0x0). Output size is too small

Is there any solution??

skyz8421 commented 11 months ago

What is the resolution of the image you provided?

Fictionarry commented 11 months ago

The problem occurred while calculating LPIPS. Could you give out the used --patch_size param and the resolution of your video?

Fictionarry commented 11 months ago

I think it's because the lip rect is too small in some cases, and a temporary solution is given now. You can try if it solves the problem.