8000 [Feature] Support Charades Dataset by congee524 · Pull Request #788 · open-mmlab/mmaction2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Feature] Support Charades Dataset #788

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

Open
wants to merge 14 commits into
base: 0.x
Choose a base branch
from

Conversation

congee524
Copy link
Contributor
@congee524 congee524 commented Apr 7, 2021
  • Charades dataset
  • Sample Charades Frames
  • Train & Test
  • Unit Test
  • Prepare Charades dataset
  • Add Comments

@codecov
Copy link
codecov bot commented Apr 7, 2021

Codecov Report

Attention: Patch coverage is 98.98990% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.24%. Comparing base (6a252b8) to head (748dadb).
Report is 510 commits behind head on 0.x.

Files with missing lines Patch % Lines
mmaction/datasets/charades_dataset.py 98.27% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              0.x     #788      +/-   ##
==========================================
+ Coverage   85.19%   85.24%   +0.04%     
==========================================
  Files         130      132       +2     
  Lines        9418     9504      +86     
  Branches     1591     1626      +35     
==========================================
+ Hits         8024     8102      +78     
+ Misses        997      992       -5     
- Partials      397      410      +13     
Flag Coverage Δ
unittests 85.24% <98.98%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

data_prefix=None,
test_mode=False,
filename_tmpl_prefix='{}-',
filename_tmpl_suffix='{:06}.jpg',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to only have filename_tmpl rather than prefix & suffix:

  1. If you extract frames from the charades videos, it would be better to store frames of different videos in separate subfolders, which is a common practice.
  2. If the format is '{video_name}-{frame_idx}.jpg', you can also implement it with filename_tmpl. For example, you can use filename_tmpl.format(video_name, '{:06}') in the first step.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cannot format {:06} with '{:06}', maybe the suffix is necessary.

Now, I format {} with '{:06}'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's OK, another possible solution is to use partial:

from functools import partial
tmpl = '{}_{:05d}.jpg'
tmpl_vid = partial(tmpl.format, 'blahblah')
frame_pth = tmpl_vid(10)

@dreamerlin dreamerlin mentioned this pull request Apr 7, 2021
9 tasks
Copy link
Member
@kennymckormick kennymckormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please update the data preprocessing part, so it would be easier to check the correctness of the codes.

@congee524
Copy link
Contributor Author

Would you please update the data preprocessing part, so it would be easier to check the correctness of the codes.

The preprocessing script hasn't been implemented yet. I use the slowfast annotations file here

@congee524 congee524 marked this pull request as ready for review April 20, 2021 08:00
@congee524
Copy link
Contributor Author

kindly ping :p @dreamerlin

ann_file_val = 'data/charades/annotations/charades_val_list_rawframes.csv'
ann_file_test = 'data/charades/annotations/charades_val_list_rawframes.csv'

mc_cfg = dict(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this cfg

ann_file_val = 'data/charades/annotations/charades_val_list_rawframes.csv'
ann_file_test = 'data/charades/annotations/charades_val_list_rawframes.csv'

mc_cfg = dict(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

@@ -125,40 +125,45 @@ def extract_feat(self, imgs):
x = self.backbone(imgs)
return x

def average_clip(self, cls_score, num_segs=1):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-implement average_clip using aggregate_clip instead of removing it. And add a warning to tell user to use aggregate_clip. Also give the link of this pr for reference.

def aggregate_clip(self, cls_score, num_segs=1):
if ('average_clips' not in self.test_cfg) and ('maximize_clips'
not in self.test_cfg):
raise KeyError(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that all configs need to change?

@@ -455,6 +455,50 @@ def __repr__(self):
return repr_str


@PIPELINES.register_module()
class SampleCharadesFrames(SampleFrames):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring missing.

Pls briefly explain the difference of this class and the existing ones to help users understand why Charades needs a spearate sampling

@congee524 congee524 added the help wanted Extra attention is needed label Jul 17, 2021
@cir7 cir7 deleted the branch open-mmlab:0.x April 10, 2023 12:26
@cir7 cir7 closed this Apr 10, 2023
@cir7 cir7 reopened this Apr 10, 2023
@cir7 cir7 changed the base branch from master to 0.x April 10, 2023 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0