hulianyuyy / CorrNet

Continuous Sign Language Recognition with Correlation Network (CVPR 2023)
84 stars 14 forks source link

Unable to train #13

Closed atonyo11 closed 5 months ago

atonyo11 commented 8 months ago

Hi, I run:

cd ./preprocess
python datataset_preprocess-T.py --process-image --multiprocessing
cd ..
python main.py --device 0

datataset_preprocess is ok, but training phrase was error. Can you provide me with some advice

./dataset/phoenix2014-T
Traceback (most recent call last):
  File "/home/CorrNet/main.py", line 255, in <module>
./dataset/phoenix2014-T/features/fullFrame-256x256px/train/19April_2010_Monday_heute-776/1/*.png
    processor.start()
  File "/home/CorrNet/main.py", line 67, in start
    seq_train(self.data_loader['train'], self.model, self.optimizer,
  File "/home/CorrNet/seq_scripts.py", line 20, in seq_train
    for batch_idx, data in enumerate(tqdm(loader)):
  File "/home/miniconda3/envs/ml/lib/python3.9/site-packages/tqdm/std.py", line 1180, in __iter__
    for obj in iterable:
  File "/home/miniconda3/envs/ml/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/home/miniconda3/envs/ml/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
    return self._process_data(data)
  File "/home/miniconda3/envs/ml/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
    data.reraise()
  File "/home/miniconda3/envs/ml/lib/python3.9/site-packages/torch/_utils.py", line 434, in reraise
    raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/miniconda3/envs/ml/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/miniconda3/envs/ml/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/miniconda3/envs/ml/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/CorrNet/dataset/dataloader_video.py", line 50, in __getitem__
    input_data, label = self.normalize(input_data, label)
  File "/home/CorrNet/dataset/dataloader_video.py", line 89, in normalize
    video, label = self.data_aug(video, label, file_id)
  File "/home/CorrNet/utils/video_augmentation.py", line 24, in __call__
    image = t(image)
  File "/home/CorrNet/utils/video_augmentation.py", line 119, in __call__
    if isinstance(clip[0], np.ndarray):
IndexError: list index out of range
hulianyuyy commented 8 months ago

This is mostly caused by a wrong dataset link. You could check the dataset path. To ensure you correctly load the images, you can print the size of input_data in line 50 in dataset_loader.py to see whether it is a null tensor. You may also refer to this issue for more information.

atonyo11 commented 8 months ago

This is mostly caused by a wrong dataset link. You could check the dataset path. To ensure you correctly load the images, you can print the size of input_data in line 50 in dataset_loader.py to see whether it is a null tensor. You may also refer to this issue for more information.

Thank you! Can you update your code about it?

hulianyuyy commented 7 months ago

This is not a error in the code. In fact, this is about the dataset link you create. You should modify the original dataset path you link. I will keep up with this issue and see how to reduce the related issues.