yiranran / Audio-driven-TalkingFace-HeadPose

Code for "Audio-driven Talking Face Video Generation with Learning-based Personalized Head Pose" (Arxiv 2020) and "Predicting Personalized Head Movement From Short Video and Speech Signal" (TMM 2022)
https://ieeexplore.ieee.org/document/9894719
721 stars 146 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'arcface/iden_feat/19_news/xxx/framexx.npy' #49

Closed 15211 closed 3 years ago

15211 commented 3 years ago

Thanks for your great work! I meet some problem when I try to run step 5 cd render-to-video/ python train_19news_1.py [person_id] [gpu_id]

the errors are FileNotFoundError: [Errno 2] No such file or directory: 'arcface/iden_feat/19_news/311/frame79.npy'(the number seems be random……) and FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/memory_seq_p2p/60_net_G.pth'`

Maybe errors in training leading the test error…But i have no idea how to solve it… Can you give me some help?

the full report:

19_news/311 311_bmold_win3

                                                         < M A T L A B (R) >
                                               Copyright 1984-2018 The MathWorks, Inc.
                                               R2018a (9.4.0.813654) 64-bit (glnxa64)
                                                          February 23, 2018

For online documentation, see http://www.mathworks.com/support For product information, visit www.mathworks.com.

Elapsed time is 17.994871 seconds. Illegal instruction (core dumped) Illegal instruction (core dumped) ----------------- Options --------------- Nw: 3
alpha: 0.3
attention: 1
batch_size: 1
beta1: 0.5
checkpoints_dir: ./checkpoints
continue_train: True [default: False] crop_size: 256
dataroot: 311_bmold_win3 [default: None] dataset_mode: aligned_feature_multi
direction: AtoB
display_env: memory_seq_311 [default: main] display_freq: 400
display_id: 0
display_ncols: 4
display_port: 8097
display_server: http://localhost
display_winsize: 256
do_saturate_mask: False
epoch: 0 [default: latest] epoch_count: 1
gan_mode: vanilla
gpu_ids: 0
iden_feat_dim: 512
iden_feat_dir: arcface/iden_feat/
iden_thres: 0.98
init_gain: 0.02
init_type: normal
input_nc: 3
isTrain: True [default: None] lambda_L1: 100.0
lambda_mask: 2.0 [default: 0.1] lambda_mask_smooth: 1e-05
load_iter: 0 [default: 0] load_size: 286
lr: 0.0001 [default: 0.0002] lr_decay_iters: 50
lr_policy: linear
max_dataset_size: inf
mem_size: 30000
model: memory_seq [default: cycle_gan] n_layers_D: 3
name: memory_seq_p2p/311 [default: experiment_name] ndf: 64
netD: basic
netG: unetac_adain_256
ngf: 64
niter: 60 [default: 100] niter_decay: 0 [default: 100] no_dropout: False
no_flip: False
no_html: False
norm: batch
num_threads: 4
output_nc: 3
phase: train
pool_size: 0
preprocess: resize_and_crop
print_freq: 100
resizemethod: lanczos
save_by_iter: False
save_epoch_freq: 5
save_latest_freq: 5000
serial_batches: False
spatial_feat_dim: 512
suffix:
top_k: 256
update_html_freq: 1000
verbose: False
----------------- End ------------------- dataset [AlignedFeatureMultiDataset] was created The number of training images = 298 initialize network with normal initialize network with normal model [MemorySeqModel] was created loading the model from ./checkpoints/memory_seq_p2p/0_net_G.pth loading the model from ./checkpoints/memory_seq_p2p/0_net_D.pth loading the model from ./checkpoints/memory_seq_p2p/0_net_mem.pth ---------- Networks initialized ------------- [Network G] Total number of parameters : 259.056 M [Network D] Total number of parameters : 2.775 M [Network mem] Total number of parameters : 11.952 M

create web directory ./checkpoints/memory_seq_p2p/311/web... Traceback (most recent call last): File "train.py", line 45, in for i, data in enumerate(dataset): # inner loop within one epoch File "/Audio-driven-TalkingFace-HeadPose-master/render-to-video/data/init.py", line 90, in iter for i, data in enumerate(self.dataloader): File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 819, in next return self._process_data(data) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 846, in _process_data data.reraise() File "/usr/local/lib/python3.6/dist-packages/torch/_utils.py", line 369, in reraise raise self.exc_type(msg) FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/Audio-driven-TalkingFace-HeadPose-master/render-to-video/data/aligned_feature_multi_dataset.py", line 94, in getitem B_feat = np.load(os.path.join(self.opt.iden_feat_dir,ss[-3],ss[-2],ss[-1][:-4]+'.npy')) File "/usr/local/lib/python3.6/dist-packages/numpy/lib/npyio.py", line 422, in load fid = open(os_fspath(file), "rb") FileNotFoundError: [Errno 2] No such file or directory: 'arcface/iden_feat/19_news/311/frame79.npy'

----------------- Options --------------- Nw: 3
alpha: 0.3
aspect_ratio: 1.0
attention: 1
batch_size: 1
blinkframeid: 41
checkpoints_dir: ./checkpoints
crop_size: 256
dataroot: 311_bmold_win3 [default: None] dataset_mode: aligned_feature_multi
direction: AtoB
display_winsize: 256
do_saturate_mask: False
epoch: 60 [default: latest] eval: False
gpu_ids: 0
iden_feat_dim: 512
iden_feat_dir: arcface/iden_feat/
iden_thres: 0.98
imagefolder: images60 [default: images] init_gain: 0.02
init_type: normal
input_nc: 3
isTrain: False [default: None] load_iter: 0 [default: 0] load_size: 256
max_dataset_size: inf
mem_size: 30000
model: memory_seq [default: test] n: 26
n_layers_D: 3
name: memory_seq_p2p/311 [default: experiment_name] ndf: 64
netD: basic
netG: unetac_adain_256
ngf: 64
no_dropout: False
no_flip: False
norm: batch
ntest: inf
num_test: 200 [default: 50] num_threads: 4
output_nc: 3
phase: test
preprocess: resize_and_crop
resizemethod: lanczos
results_dir: ./results/
serial_batches: False
spatial_feat_dim: 512
suffix:
test_batch_list:
test_use_gt: 0
top_k: 256
verbose: False
----------------- End ------------------- dataset [AlignedFeatureMultiDataset] was created initialize network with normal model [MemorySeqModel] was created loading the model from ./checkpoints/memory_seq_p2p/60_net_G.pth Traceback (most recent call last): File "test.py", line 47, in model.setup(opt) # regular setup: load and print networks; create schedulers File "/Audio-driven-TalkingFace-HeadPose-master/render-to-video/models/base_model.py", line 89, in setup self.load_networks(load_suffix) File "/Audio-driven-TalkingFace-HeadPose-master/render-to-video/models/base_model.py", line 202, in load_networks state_dict = torch.load(load_path, map_location=str(self.device)) File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 381, in load f = open(f, 'rb') FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/memory_seq_p2p/60_net_G.pth'

shreyanshdas00 commented 3 years ago

Thanks for your great work! I meet some problem when I try to run step 5 cd render-to-video/ python train_19news_1.py [person_id] [gpu_id]

the errors are FileNotFoundError: [Errno 2] No such file or directory: 'arcface/iden_feat/19_news/311/frame79.npy'(the number seems be random……) and FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/memory_seq_p2p/60_net_G.pth'`

Maybe errors in training leading the test error…But i have no idea how to solve it… Can you give me some help?

the full report:

19_news/311 311_bmold_win3

                                                         < M A T L A B (R) >
                                               Copyright 1984-2018 The MathWorks, Inc.
                                               R2018a (9.4.0.813654) 64-bit (glnxa64)
                                                          February 23, 2018

For online documentation, see http://www.mathworks.com/support For product information, visit www.mathworks.com.

Elapsed time is 17.994871 seconds.

Illegal instruction (core dumped) Illegal instruction (core dumped) ----------------- Options --------------- Nw: 3 alpha: 0.3 attention: 1 batch_size: 1 beta1: 0.5 checkpoints_dir: ./checkpoints continue_train: True [default: False] crop_size: 256 dataroot: 311_bmold_win3 [default: None] dataset_mode: aligned_feature_multi direction: AtoB display_env: memory_seq_311 [default: main] display_freq: 400 display_id: 0 display_ncols: 4 display_port: 8097 display_server: http://localhost display_winsize: 256 do_saturate_mask: False epoch: 0 [default: latest] epoch_count: 1 gan_mode: vanilla gpu_ids: 0 iden_feat_dim: 512 iden_feat_dir: arcface/iden_feat/ iden_thres: 0.98 init_gain: 0.02 init_type: normal input_nc: 3 isTrain: True [default: None] lambda_L1: 100.0 lambda_mask: 2.0 [default: 0.1] lambda_mask_smooth: 1e-05 load_iter: 0 [default: 0] load_size: 286 lr: 0.0001 [default: 0.0002] lr_decay_iters: 50 lr_policy: linear max_dataset_size: inf mem_size: 30000 model: memory_seq [default: cycle_gan] n_layers_D: 3 name: memory_seq_p2p/311 [default: experiment_name] ndf: 64 netD: basic netG: unetac_adain_256 ngf: 64 niter: 60 [default: 100] niter_decay: 0 [default: 100] no_dropout: False no_flip: False no_html: False norm: batch num_threads: 4 output_nc: 3 phase: train pool_size: 0 preprocess: resize_and_crop print_freq: 100 resizemethod: lanczos save_by_iter: False save_epoch_freq: 5 save_latest_freq: 5000 serial_batches: False spatial_feat_dim: 512 suffix: top_k: 256 update_html_freq: 1000 verbose: False ----------------- End ------------------- dataset [AlignedFeatureMultiDataset] was created The number of training images = 298 initialize network with normal initialize network with normal model [MemorySeqModel] was created loading the model from ./checkpoints/memory_seq_p2p/0_net_G.pth loading the model from ./checkpoints/memory_seq_p2p/0_net_D.pth loading the model from ./checkpoints/memory_seq_p2p/0_net_mem.pth ---------- Networks initialized ------------- [Network G] Total number of parameters : 259.056 M [Network D] Total number of parameters : 2.775 M [Network mem] Total number of parameters : 11.952 M create web directory ./checkpoints/memory_seq_p2p/311/web... Traceback (most recent call last): File "train.py", line 45, in for i, data in enumerate(dataset): # inner loop within one epoch File "/Audio-driven-TalkingFace-HeadPose-master/render-to-video/data/init.py", line 90, in iter for i, data in enumerate(self.dataloader): File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 819, in next return self._process_data(data) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 846, in _process_data data.reraise() File "/usr/local/lib/python3.6/dist-packages/torch/_utils.py", line 369, in reraise raise self.exc_type(msg) FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/Audio-driven-TalkingFace-HeadPose-master/render-to-video/data/aligned_feature_multi_dataset.py", line 94, in getitem B_feat = np.load(os.path.join(self.opt.iden_feat_dir,ss[-3],ss[-2],ss[-1][:-4]+'.npy')) File "/usr/local/lib/python3.6/dist-packages/numpy/lib/npyio.py", line 422, in load fid = open(os_fspath(file), "rb") FileNotFoundError: [Errno 2] No such file or directory: 'arcface/iden_feat/19_news/311/frame79.npy'

----------------- Options --------------- Nw: 3 alpha: 0.3 aspect_ratio: 1.0 attention: 1 batch_size: 1 blinkframeid: 41 checkpoints_dir: ./checkpoints crop_size: 256 dataroot: 311_bmold_win3 [default: None] dataset_mode: aligned_feature_multi direction: AtoB display_winsize: 256 do_saturate_mask: False epoch: 60 [default: latest] eval: False gpu_ids: 0 iden_feat_dim: 512 iden_feat_dir: arcface/iden_feat/ iden_thres: 0.98 imagefolder: images60 [default: images] init_gain: 0.02 init_type: normal input_nc: 3 isTrain: False [default: None] load_iter: 0 [default: 0] load_size: 256 max_dataset_size: inf mem_size: 30000 model: memory_seq [default: test] n: 26 n_layers_D: 3 name: memory_seq_p2p/311 [default: experiment_name] ndf: 64 netD: basic netG: unetac_adain_256 ngf: 64 no_dropout: False no_flip: False norm: batch ntest: inf num_test: 200 [default: 50] num_threads: 4 output_nc: 3 phase: test preprocess: resize_and_crop resizemethod: lanczos results_dir: ./results/ serial_batches: False spatial_feat_dim: 512 suffix: test_batch_list: test_use_gt: 0 top_k: 256 verbose: False ----------------- End ------------------- dataset [AlignedFeatureMultiDataset] was created initialize network with normal model [MemorySeqModel] was created loading the model from ./checkpoints/memory_seq_p2p/60_net_G.pth Traceback (most recent call last): File "test.py", line 47, in model.setup(opt) # regular setup: load and print networks; create schedulers File "/Audio-driven-TalkingFace-HeadPose-master/render-to-video/models/base_model.py", line 89, in setup self.load_networks(load_suffix) File "/Audio-driven-TalkingFace-HeadPose-master/render-to-video/models/base_model.py", line 202, in load_networks state_dict = torch.load(load_path, map_location=str(self.device)) File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 381, in load f = open(f, 'rb') FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/memory_seq_p2p/60_net_G.pth'

Hi could you let me know how you solved this error?