Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frames of varying length #38

Open
abhiray92 opened this issue Nov 18, 2020 · 10 comments
Open

Frames of varying length #38

abhiray92 opened this issue Nov 18, 2020 · 10 comments

Comments

@abhiray92
Copy link

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?

#5

@abhiray92
Copy link
Author

abhiray92 commented Nov 19, 2020

Hi @HHTseng can you please share the code for varying frame length? Its very important. Thanks

@HHTseng
Copy link
Owner

HHTseng commented Nov 19, 2020

yes I had it sometime before, allow me to take a few days to find it

@abhiray92
Copy link
Author

Hi @HHTseng Did you get a chance to check for the code?
Thanks

@HHTseng
Copy link
Owner

HHTseng commented Nov 22, 2020

Please check out the files in the folder ResNetCRNN_varylength and run UCF101_ResNetCRNN_varlen.py. This necessarily takes longer time to load and run. Let me know if there's any bug spotted, thanks!

@abhiray92
Copy link
Author

abhiray92 commented Nov 22, 2020

@HHTseng Thanks a MILLION! I will update you as soon as I check and run the code.

@abhiray92
Copy link
Author

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'

@abhiray92
Copy link
Author

@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'

@berna-ylmz
Copy link

Did you solve this problem @abhiray92 ?

@abhiray92
Copy link
Author

@Berna-lab Yes, my images were in grayscale, so I just set the value of 'Channel = 1'. And it worked.

@berna-ylmz
Copy link

Thanks @abhiray92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants