mpc001 / Lipreading_using_Temporal_Convolutional_Networks

ICASSP'22 Training Strategies for Improved Lip-Reading; ICASSP'21 Towards Practical Lipreading with Distilled and Efficient Models; ICASSP'20 Lipreading using Temporal Convolutional Networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about test error

shuanyuu opened this issue · comments

Hi, thanks for sharing your code! While evaluating the code by pertained model, the following error raised:
Traceback (most recent call last):
File "main.py", line 261, in
main()
File "main.py", line 203, in main
dset_loaders = get_data_loaders(args)
File "/Lipreading_using_TCN/lipreading/dataloaders.py", line 53, in get_data_loaders
dset_loaders = {x: torch.utils.data.DataLoader(
File "/Lipreading_using_TCN/lipreading/dataloaders.py", line 53, in
dset_loaders = {x: torch.utils.data.DataLoader(
File "/python3.8/site-packages/torch/utils/data/dataloader.py", line 268, in init
sampler = RandomSampler(dataset, generator=generator)
File "/python3.8/site-packages/torch/utils/data/sampler.py", line 102, in init
raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

In question#3, you recommended to check if (DATA-DIRECTORY) has the following structure:
DATA-DIRECTORY

└───ABOUT
│ │ train
│ │ val
│ │
│ └───test
│ │ ABOUT_00001.npz
│ │ ABOUT_00002.npz
│ │ ...

└───ABSOLUTELY
│ train
│ ...

I checked my and the structure look the same. But I still can’t figure out how to solve the test error.
I would appreciate it if you could give me some advice : )

Hi, it seems that no filename with .npz has been retrieved. Can you please check if self._data_filesis empty? (https://github.com/mpc001/Lipreading_using_Temporal_Convolutional_Networks/blob/master/lipreading/dataset.py#L76)

If you're running on Windows, #16 (change the path separator / need change to \ ) may help.

Hi, thanks for your reply! I am running on linux.
It looks like self._data_files is empty.

Hi @shuanyuu, ideally, search_str_npz contains all possible path names in the respotitory of cropped mouth RoIs folder ({data_directory}) and the code should retrieve all pathnames with .npz in the repository (https://github.com/mpc001/Lipreading_using_Temporal_Convolutional_Networks/blob/master/lipreading/dataset.py#L71). Can you please check if you used a proper search_str_npz to find all the pathnames matching a specified pattern ({data_directory}/*/{data_partition}/*.npz), where {data_partition} is from the choices of ["train", "val", "test"].

Hi, finally I solved the problem. Thanks for helping me out!!!