When I follow the instructions in the readme to run the evaluation code, an error occurs.How should I solve it?
Namespace(H=450, O=True, W=450, amb_aud_loss=1, amb_dim=2, amb_eye_loss=1, asr=False, asr_model='ave', asr_play=False, asr_save_feats=False, asr_wav='', att=2, aud='', bg_img='', bound=1, bs_area='upper', ckpt='latest', color_space='srgb', cuda_ray=True, data_range=[0, -1], density_thresh=10, density_thresh_torso=0.01, dt_gamma=0.00390625, emb=False, exp_eye=True, fbg=False, finetune_lips=False, fix_eye=-1, fovy=21.24, fp16=True, fps=50, gui=False, head_ckpt='', ind_dim=4, ind_dim_torso=8, ind_num=20000, init_lips=False, iters=200000, l=10, lambda_amb=0.1, lr=0.01, lr_net=0.001, m=50, max_ray_batch=4096, max_spp=1, max_steps=16, min_near=0.05, num_rays=65536, num_steps=16, offset=[0, 0, 0], part=False, part2=False, patch_size=1, path='data/May', portrait=False, preload=0, pyramid_loss=0, r=10, radius=3.35, scale=4, seed=0, smooth_eye=False, smooth_lips=False, smooth_path=False, smooth_path_window=7, test=True, test_train=False, torso=False, torso_shrink=0.8, train_camera=False, unc_loss=1, update_extra_interval=16, upsample_steps=0, warmup_step=10000, workspace='model/trial_may')
Setting up [LPIPS] perceptual loss: trunk [alex], v[0.1], spatial [off]
/home/sg/miniconda3/envs/synctalk/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/sg/miniconda3/envs/synctalk/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=AlexNet_Weights.IMAGENET1K_V1`. You can also use `weights=AlexNet_Weights.DEFAULT` to get the most up-to-date weights.
warnings.warn(msg)
Loading model from: /home/sg/miniconda3/envs/synctalk/lib/python3.8/site-packages/lpips/weights/v0.1/alex.pth
Setting up [LPIPS] perceptual loss: trunk [alex], v[0.1], spatial [off]
/home/sg/miniconda3/envs/synctalk/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/sg/miniconda3/envs/synctalk/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=AlexNet_Weights.IMAGENET1K_V1`. You can also use `weights=AlexNet_Weights.DEFAULT` to get the most up-to-date weights.
warnings.warn(msg)
Loading model from: /home/sg/miniconda3/envs/synctalk/lib/python3.8/site-packages/lpips/weights/v0.1/alex.pth
[INFO] Trainer: ngp | 2024-03-20_03-36-57 | cuda | fp16 | model/trial_may
[INFO] #parameters: 768165
[INFO] Loading latest checkpoint ...
[WARN] No checkpoint found, model randomly initialized.
[INFO] load 553 test frames.
[INFO] load aud_features: torch.Size([6072, 1, 512])
Loading test data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 553/553 [00:00<00:00, 6888.24it/s]
[INFO] eye_area: -0.06423357874155045 - 0.9898659586906433
==> Start Test, save results to model/trial_may/results
100% 551/553 [00:12<00:00, 44.98it/s]==> Finished Test.
100% 553/553 [00:14<00:00, 38.84it/s]
++> Evaluate at epoch 0 ...
0% 0/553 [00:00<?, ?it/s]/home/sg/miniconda3/envs/synctalk/lib/python3.8/site-packages/face_alignment/api.py:147: UserWarning: No faces were detected.
warnings.warn("No faces were detected.")
Traceback (most recent call last):
File "main.py", line 211, in <module>
trainer.evaluate(test_loader)
File "/home/sg/github/SyncTalk/nerf_triplane/utils.py", line 1039, in evaluate
self.evaluate_one_epoch(loader, name)
File "/home/sg/github/SyncTalk/nerf_triplane/utils.py", line 1403, in evaluate_one_epoch
metric.update(preds, truths)
File "/home/sg/github/SyncTalk/nerf_triplane/utils.py", line 589, in update
lms_pred = self.get_landmarks(preds)
File "/home/sg/github/SyncTalk/nerf_triplane/utils.py", line 560, in get_landmarks
lms = self.predictor.get_landmarks(img)[-1]
TypeError: 'NoneType' object is not subscriptable
0% 0/553 [00:00<?, ?it/s]