Open abhiray92 opened 4 years ago
Hi @HHTseng can you please share the code for varying frame length? Its very important. Thanks
yes I had it sometime before, allow me to take a few days to find it
Hi @HHTseng Did you get a chance to check for the code? Thanks
Please check out the files in the folder ResNetCRNN_varylength and run _UCF101_ResNetCRNNvarlen.py. This necessarily takes longer time to load and run. Let me know if there's any bug spotted, thanks!
@HHTseng Thanks a MILLION! I will update you as soon as I check and run the code.
I got the below error after running the code - PS: I have made a few changes to run the model on grayscale images. The mean and std for the transforms parameter has been set to mean=[0.5], std=[0.225].
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\abhir\.conda\envs\torch\lib\site-packages\torch\utils\data\_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\abhir\.conda\envs\torch\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\abhir\.conda\envs\torch\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Theses\video-classification\ResNetCRNN_varylength\functions.py", line 51, in __getitem__
channels = len(self.transform.__dict__['transforms'][2].__dict__['mean']) # get number of channels from Transformation
KeyError: 'mean'
@HHTseng I am constantly getting this error -
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\abhir\.conda\envs\torch\lib\site-packages\torch\utils\data\_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\abhir\.conda\envs\torch\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\abhir\.conda\envs\torch\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Theses\video-classification\CRNN\functions.py", line 51, in __getitem__
channels = len(self.transform.__dict__['transforms'][2].__dict__['mean']) # get number of channels from Transformation
KeyError: 'mean'
Did you solve this problem @abhiray92 ?
@Berna-lab Yes, my images were in grayscale, so I just set the value of 'Channel = 1'. And it worked.
Thanks @abhiray92
HI @HHTseng , the CRNN model is working fine for me, however, the videos in my dataset has varying frame length, I believe you already have the code for this issue as discussed in the link below . Can you please share the code for the same?
https://github.com/HHTseng/video-classification/issues/5