-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[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
base: 0.x
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
data_prefix=None, | ||
test_mode=False, | ||
filename_tmpl_prefix='{}-', | ||
filename_tmpl_suffix='{:06}.jpg', |
There was a problem hiding this comment.
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:
- 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.
- 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.
There was a problem hiding this comment.
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}'
There was a problem hiding this comment.
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)
9f2b423
to
bf0f8f4
Compare
There was a problem hiding this 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.
e6ff69f
to
5231a6d
Compare
db3e6da
to
0f77636
Compare
The preprocessing script hasn't been implemented yet. I use the slowfast annotations file here |
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( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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
Uh oh!
There was an error while loading. Please reload this page.