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

return process_data, record.label, record.metadata #21

Open
fengfan028 opened this issue Apr 27, 2021 · 5 comments
Open

return process_data, record.label, record.metadata #21

fengfan028 opened this issue Apr 27, 2021 · 5 comments

Comments

@fengfan028
Copy link

What is the record.metadata here? in dataset.py line 184
return process_data, record.label, record.metadata

@fengfan028
Copy link
Author

i use ucf101, not epic-kitchens

@ekazakos
Copy link
Owner

Hi,
record.metadata is the narration_id for EPIC-KITCHENS-100 data, and is used for model evaluation / submission in the action recognition challenge. It is defined here:

@property
def metadata(self):
return {'narration_id': self._series['narration_id'] if 'narration_id' in self._series else self._index}

For UCF101, first you need to create a ucf101_record.py in video_records/, see video_records/epickitchens100_record.py as an example. Also have a look in the readme under Train/evaluate with other datasets for more info.

Then, if there are any useful metadata in UCF101, that you would like to store along with the predictions of the model for evaluation purposes, you can also store them in the UCF101 video record as shown above.

@fengfan028
Copy link
Author

Hi,
record.metadata is the narration_id for EPIC-KITCHENS-100 data, and is used for model evaluation / submission in the action recognition challenge. It is defined here:

@property
def metadata(self):
return {'narration_id': self._series['narration_id'] if 'narration_id' in self._series else self._index}

For UCF101, first you need to create a ucf101_record.py in video_records/, see video_records/epickitchens100_record.py as an example. Also have a look in the readme under Train/evaluate with other datasets for more info.

Then, if there are any useful metadata in UCF101, that you would like to store along with the predictions of the model for evaluation purposes, you can also store them in the UCF101 video record as shown above.

Thanks very much for your reply! I have a another question:
I use pytorch version 1.8.1, when running train.py, it has the following error:
image
it seems def forward(self, input_tensor): and def backward(self, grad_output): in class SegmentConsensus(torch.autograd.Function): should use @staticmethod, but how to modify them?

@ekazakos
Copy link
Owner

Ah thanks for spotting that! There are 2 valid options:

  1. You can just use static methods without any further modifications as shown here: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function
  2. You can just delete backward, PyTorch is doing the backprop automatically so it is not needed.

I will update the code soon to be compatible with PyTorch 1.8.1 by implementing option 2.

@fengfan028
Copy link
Author

Ah thanks for spotting that! There are 2 valid options:

  1. You can just use static methods without any further modifications as shown here: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function
  2. You can just delete backward, PyTorch is doing the backprop automatically so it is not needed.

I will update the code soon to be compatible with PyTorch 1.8.1 by implementing option 2.

thans a lot! bug has been fixed.

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

2 participants