yuangan / EAT_code

Official code for ICCV 2023 paper: "Efficient Emotional Adaptation for Audio-Driven Talking-Head Generation".
Other
275 stars 31 forks source link

Error when running preprocess.py No module named resamply #9

Closed G-force78 closed 1 year ago

G-force78 commented 1 year ago

============== extract lmk for crop ================= [INFO] loading facial landmark predictor... 100% 1/1 [00:00<00:00, 2.87it/s] ======= extract speech in deepspeech_features ======= Traceback (most recent call last): File "/content/EAT_code/preprocess/deepspeech_features/extract_ds_features.py", line 10, in from deepspeech_features import conv_audios_to_deepspeech File "/content/EAT_code/preprocess/deepspeech_features/deepspeech_features.py", line 10, in import resampy ModuleNotFoundError: No module named 'resampy'

Traceback (most recent call last): File "/content/EAT_code/preprocess/vid2vid/data_preprocess.py", line 26, in for i, data in tqdm(enumerate(dataset)): File "/usr/local/lib/python3.10/dist-packages/tqdm/std.py", line 1178, in iter for obj in iterable: File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 530, in next data = self._next_data() File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 1224, in _next_data return self._process_data(data) File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 1250, in _process_data data.reraise() File "/usr/local/lib/python3.10/dist-packages/torch/_utils.py", line 457, in reraise raise exception AssertionError: Caught AssertionError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/content/EAT_code/preprocess/vid2vid/data/face_preprocess_eat.py", line 36, in getitem assert(0) AssertionError

============== organize file for demo =============== cp: cannot stat './deepfeature32/output.npy': No such file or directory

G-force78 commented 1 year ago

Solved that by just installing resampy but seems deepspeech is missing too. No such file or directory: '/root/.tensorflow/models/deepspeech-0_1_0-b90017e8.pb.zip'

G-force78 commented 1 year ago

Ok so downloaded deepspeech frozen model and changed pathway but now get this error

Traceback (most recent call last): File "/content/EAT_code/preprocess/deepspeech_features/extract_ds_features.py", line 139, in main() File "/content/EAT_code/preprocess/deepspeech_features/extract_ds_features.py", line 131, in main extract_features( File "/content/EAT_code/preprocess/deepspeech_features/extract_ds_features.py", line 80, in extract_features conv_audios_to_deepspeech( File "/content/EAT_code/preprocess/deepspeech_features/deepspeech_features.py", line 41, in conv_audios_to_deepspeech graph, logits_ph, input_node_ph, input_lengths_ph = prepare_deepspeech_net( File "/content/EAT_code/preprocess/deepspeech_features/deepspeech_features.py", line 103, in prepare_deepspeech_net graph_def.ParseFromString(f.read()) google.protobuf.message.DecodeError: Error parsing message with type 'tensorflow.GraphDef'

yuangan commented 1 year ago

Hi, have you resolved the issue? We use resampy==0.4.2 and tensorflow-gpu==1.15.0. I suggest using mamba to install the environment. I have made several updates to the environment.yml file. Please ensure that you are using the latest version.

G-force78 commented 1 year ago

I will try again with tensorflow installed, I should have said I'm suing the colab, do you have to use this command for it conda/mamba env create -f environment.yml ?

yuangan commented 1 year ago

Colab operates with the latest version of Python, which unfortunately isn’t compatible with many packages. We have tested our demo code exclusively in Colab. As for preprocessing custom videos, I have handled that locally to avoid any potential issues.

yuangan commented 1 year ago

I have updated the README to eliminate any ambiguity. Thank you for your trial. You can download our EAT environment here as a reference.