yerfor / GeneFace

GeneFace: Generalized and High-Fidelity 3D Talking Face Synthesis; ICLR 2023; Official code
MIT License
2.44k stars 290 forks source link

IndexError: index 13400 is out of bounds for dimension 0 with size 13000 #198

Closed tailangjun closed 9 months ago

tailangjun commented 9 months ago

我用人物胸部以上的视频来训练,结果在步骤4. 训练头部RAD-NeRF渲染器时报错,麻烦大佬帮忙看看,谢谢

执行脚本如下

python tasks/run.py \
--config=egs/datasets/videos/${VIDEO_ID}/lm3d_radnerf.yaml \
--exp_name=${VIDEO_ID}/lm3d_radnerf

报错信息如下

Loading model from: /opt/anaconda3/envs/geneface/lib/python3.9/site-packages/lpips/weights/v0.1/alex.pth | Copied codes to checkpoints/Teacher01-face/lm3d_radnerf/codes/20230915194830. | cond_prenet Trainable Parameters: 0.050M | cond_att_net Trainable Parameters: 0.004M | position_embedder Trainable Parameters: 1.807M | ambient_net Trainable Parameters: 0.029M | ambient_embedder Trainable Parameters: 1.111M | sigma_net Trainable Parameters: 0.041M | direction_embedder Trainable Parameters: 0.000M | color_net Trainable Parameters: 0.019M Sanity Val: 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 4.16step/s] | Validation results@0: {'total_loss': 0.2622, 'mse_loss': 0.0085, 'lpips_loss': 0.2537} 46step [00:04, 9.92step/s, ambient_loss=0.0914, head_psnr=27, lr_0=0.0005, mse_loss=0.00198, weights_entropy_loss=0.116]
Traceback (most recent call last): File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/tasks/run.py", line 19, in run_task() File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/tasks/run.py", line 14, in run_task task_cls.start() File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/utils/commons/base_task.py", line 251, in start trainer.fit(cls) File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/utils/commons/trainer.py", line 122, in fit self.run_single_process(self.task) File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/utils/commons/trainer.py", line 186, in run_single_process self.train() File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/utils/commons/trainer.py", line 286, in train pbar_metrics, tb_metrics = self.run_training_batch(batch_idx, batch) File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/utils/commons/trainer.py", line 333, in run_training_batch output = task_ref.training_step(*args) File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/utils/commons/base_task.py", line 109, in training_step loss_ret = self._training_step(sample, batch_idx, optimizer_idx) File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/tasks/radnerfs/radnerf.py", line 194, in _training_step loss_output, model_out = self.run_model(sample) File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/tasks/radnerfs/radnerf.py", line 133, in run_model model_out = self.model.render(rays_o, rays_d, cond_inp, bg_coords, poses, index=idx, staged=False, bg_color=bg_color, perturb=True, force_all_rays=False, **hparams) File "/home/tailangjun/Documents/AIGenHuman/2DHuman/GeneFace/modules/radnerfs/renderer.py", line 289, in render ind_code = self.individual_embeddings[index] IndexError: index 13400 is out of bounds for dimension 0 with size 13000

tailangjun commented 9 months ago

搞清楚了,训练的视频中有个地方有扭头,把这段截断就好了

muximuxi commented 9 months ago

搞清楚了,训练的视频中有个地方有扭头,把这段截断就好了

请问原视频中不能有扭头的,只能是正视前方的视频对吗?我现在处理的视频中有很多扭头的地方,处理postnet的时候也报这个错误了