fschmid56 / EfficientAT

This repository aims at providing efficient CNNs for Audio Tagging. We provide AudioSet pre-trained models ready for downstream training and extraction of audio embeddings.
MIT License
218 stars 41 forks source link

error when evualte with "python ex_audioset.py --cuda --model_name="mn10_as"" #8

Closed mmuguang closed 1 year ago

mmuguang commented 1 year ago

Warning: FMAX is None setting to 15000 Dataset from /data/xiaoshengchang/audioset/mp3/eval_segments_mp3.hdf with length 18887. Running AudioSet evaluation for model 'mn10_as' on device 'cuda' 69%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 109/158 [00:29<00:07, 6.86it/s]Failed to read frame size: Could not seek to 1026. 82%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉ | 129/158 [00:35<00:07, 3.66it/s] Traceback (most recent call last): File "/data/xiaoshengchang/EfficientAT-main/ex_audioset.py", line 348, in evaluate(args) File "/data/xiaoshengchang/EfficientAT-main/ex_audioset.py", line 266, in evaluate for batch in tqdm(dl): File "/opt/conda/lib/python3.9/site-packages/tqdm/std.py", line 1195, in iter for obj in iterable: File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 628, in next data = self._next_data() File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1313, in _next_data return self._process_data(data) File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1359, in _process_data data.reraise() File "/opt/conda/lib/python3.9/site-packages/torch/_utils.py", line 542, in reraise raise RuntimeError(msg) from None RuntimeError: Caught ValueError in DataLoader worker process 9. Original Traceback (most recent call last): File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 58, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/data/xiaoshengchang/EfficientAT-main/datasets/audioset.py", line 154, in getitem waveform = decode_mp3(self.dataset_file['mp3'][index]) File "/data/xiaoshengchang/EfficientAT-main/datasets/audioset.py", line 37, in decode_mp3 container = av.open(io.BytesIO(mp3_arr.tobytes())) File "av/container/core.pyx", line 401, in av.container.core.open File "av/container/core.pyx", line 272, in av.container.core.Container.cinit File "av/container/core.pyx", line 292, in av.container.core.Container.err_check File "av/error.pyx", line 336, in av.error.err_check av.error.ValueError: [Errno 22] Invalid argument: ''; last error log: [mp3] Failed to read frame size: Could not seek to 1026.

AntyRia commented 1 year ago

hi,Have you solved it yet?

fschmid56 commented 1 year ago

Since mmuguang closed the issue and the current code version works fine for others, maybe it had to do with corrupted audio files?