irhum / R2Plus1D-PyTorch

PyTorch implementation of the R2Plus1D convolution based ResNet architecture described in the paper "A Closer Look at Spatiotemporal Convolutions for Action Recognition"
MIT License
363 stars 62 forks source link

bug in my implementation. #6

Open oLIVIa-Ld opened 5 years ago

oLIVIa-Ld commented 5 years ago

hi, team.@yechanp @irhum, I am trying this project but this bug occurred when i'm trying to put my data into the network. could you help me with this error? thanks very much.

Traceback (most recent call last): File "train_r2p1d_ucf.py", line 17, in train_model(model, train_dataloader, val_dataloader, path=save_path) File "/usr/R2plus1D_TSN_combine-master/R2plus1D_TSN_combine-master/trainer.py", line 139, in train_model for inputs, labels in dataloaders[phase]: File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next return self._process_data(data) File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data data.reraise() File "/root/anaconda3/lib/python3.7/site-packages/torch/_utils.py", line 369, in reraise raise self.exc_type(msg) TypeError: Caught TypeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/R2plus1D_TSN_combine-master/R2plus1D_TSN_combine-master/dataset.py", line 48, in getitem buffer = self.loadvideoframe(self.fnames[index]) File "/usr/R2plus1D_TSN_combine-master/R2plus1D_TSN_combine-master/dataset.py", line 60, in loadvideoframe im_path_pattern = self.get_im_path_pattern(fname) File "/usr/R2plus1D_TSN_combine-master/R2plus1D_TSN_combine-master/dataset.py", line 58, in get_im_path_pattern return os.path.join(self.im_path_root, vidname, 'img*.jpg') File "/root/anaconda3/lib/python3.7/posixpath.py", line 80, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType